/*! For license information please see SEQTA.js.LICENSE.txt */ (()=>{var e={168:(e,t,n)=>{const r=n(874),o={};for(const e of Object.keys(r))o[r[e]]=e;const a={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};e.exports=a;for(const e of Object.keys(a)){if(!("channels"in a[e]))throw new Error("missing channels property: "+e);if(!("labels"in a[e]))throw new Error("missing channel labels property: "+e);if(a[e].labels.length!==a[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:n}=a[e];delete a[e].channels,delete a[e].labels,Object.defineProperty(a[e],"channels",{value:t}),Object.defineProperty(a[e],"labels",{value:n})}a.rgb.hsl=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.min(t,n,r),a=Math.max(t,n,r),i=a-o;let s,l;a===o?s=0:t===a?s=(n-r)/i:n===a?s=2+(r-t)/i:r===a&&(s=4+(t-n)/i),s=Math.min(60*s,360),s<0&&(s+=360);const c=(o+a)/2;return l=a===o?0:c<=.5?i/(a+o):i/(2-a-o),[s,100*l,100*c]},a.rgb.hsv=function(e){let t,n,r,o,a;const i=e[0]/255,s=e[1]/255,l=e[2]/255,c=Math.max(i,s,l),u=c-Math.min(i,s,l),d=function(e){return(c-e)/6/u+.5};return 0===u?(o=0,a=0):(a=u/c,t=d(i),n=d(s),r=d(l),i===c?o=r-n:s===c?o=1/3+t-r:l===c&&(o=2/3+n-t),o<0?o+=1:o>1&&(o-=1)),[360*o,100*a,100*c]},a.rgb.hwb=function(e){const t=e[0],n=e[1];let r=e[2];const o=a.rgb.hsl(e)[0],i=1/255*Math.min(t,Math.min(n,r));return r=1-1/255*Math.max(t,Math.max(n,r)),[o,100*i,100*r]},a.rgb.cmyk=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.min(1-t,1-n,1-r);return[100*((1-t-o)/(1-o)||0),100*((1-n-o)/(1-o)||0),100*((1-r-o)/(1-o)||0),100*o]},a.rgb.keyword=function(e){const t=o[e];if(t)return t;let n,a=1/0;for(const t of Object.keys(r)){const o=(s=r[t],((i=e)[0]-s[0])**2+(i[1]-s[1])**2+(i[2]-s[2])**2);o.04045?((t+.055)/1.055)**2.4:t/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92,[100*(.4124*t+.3576*n+.1805*r),100*(.2126*t+.7152*n+.0722*r),100*(.0193*t+.1192*n+.9505*r)]},a.rgb.lab=function(e){const t=a.rgb.xyz(e);let n=t[0],r=t[1],o=t[2];return n/=95.047,r/=100,o/=108.883,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,o=o>.008856?o**(1/3):7.787*o+16/116,[116*r-16,500*(n-r),200*(r-o)]},a.hsl.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;let o,a,i;if(0===n)return i=255*r,[i,i,i];o=r<.5?r*(1+n):r+n-r*n;const s=2*r-o,l=[0,0,0];for(let e=0;e<3;e++)a=t+1/3*-(e-1),a<0&&a++,a>1&&a--,i=6*a<1?s+6*(o-s)*a:2*a<1?o:3*a<2?s+(o-s)*(2/3-a)*6:s,l[e]=255*i;return l},a.hsl.hsv=function(e){const t=e[0];let n=e[1]/100,r=e[2]/100,o=n;const a=Math.max(r,.01);return r*=2,n*=r<=1?r:2-r,o*=a<=1?a:2-a,[t,100*(0===r?2*o/(a+o):2*n/(r+n)),(r+n)/2*100]},a.hsv.rgb=function(e){const t=e[0]/60,n=e[1]/100;let r=e[2]/100;const o=Math.floor(t)%6,a=t-Math.floor(t),i=255*r*(1-n),s=255*r*(1-n*a),l=255*r*(1-n*(1-a));switch(r*=255,o){case 0:return[r,l,i];case 1:return[s,r,i];case 2:return[i,r,l];case 3:return[i,s,r];case 4:return[l,i,r];case 5:return[r,i,s]}},a.hsv.hsl=function(e){const t=e[0],n=e[1]/100,r=e[2]/100,o=Math.max(r,.01);let a,i;i=(2-n)*r;const s=(2-n)*o;return a=n*o,a/=s<=1?s:2-s,a=a||0,i/=2,[t,100*a,100*i]},a.hwb.rgb=function(e){const t=e[0]/360;let n=e[1]/100,r=e[2]/100;const o=n+r;let a;o>1&&(n/=o,r/=o);const i=Math.floor(6*t),s=1-r;a=6*t-i,0!=(1&i)&&(a=1-a);const l=n+a*(s-n);let c,u,d;switch(i){default:case 6:case 0:c=s,u=l,d=n;break;case 1:c=l,u=s,d=n;break;case 2:c=n,u=s,d=l;break;case 3:c=n,u=l,d=s;break;case 4:c=l,u=n,d=s;break;case 5:c=s,u=n,d=l}return[255*c,255*u,255*d]},a.cmyk.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100,o=e[3]/100;return[255*(1-Math.min(1,t*(1-o)+o)),255*(1-Math.min(1,n*(1-o)+o)),255*(1-Math.min(1,r*(1-o)+o))]},a.xyz.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100;let o,a,i;return o=3.2406*t+-1.5372*n+-.4986*r,a=-.9689*t+1.8758*n+.0415*r,i=.0557*t+-.204*n+1.057*r,o=o>.0031308?1.055*o**(1/2.4)-.055:12.92*o,a=a>.0031308?1.055*a**(1/2.4)-.055:12.92*a,i=i>.0031308?1.055*i**(1/2.4)-.055:12.92*i,o=Math.min(Math.max(0,o),1),a=Math.min(Math.max(0,a),1),i=Math.min(Math.max(0,i),1),[255*o,255*a,255*i]},a.xyz.lab=function(e){let t=e[0],n=e[1],r=e[2];return t/=95.047,n/=100,r/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,[116*n-16,500*(t-n),200*(n-r)]},a.lab.xyz=function(e){let t,n,r;n=(e[0]+16)/116,t=e[1]/500+n,r=n-e[2]/200;const o=n**3,a=t**3,i=r**3;return n=o>.008856?o:(n-16/116)/7.787,t=a>.008856?a:(t-16/116)/7.787,r=i>.008856?i:(r-16/116)/7.787,t*=95.047,n*=100,r*=108.883,[t,n,r]},a.lab.lch=function(e){const t=e[0],n=e[1],r=e[2];let o;return o=360*Math.atan2(r,n)/2/Math.PI,o<0&&(o+=360),[t,Math.sqrt(n*n+r*r),o]},a.lch.lab=function(e){const t=e[0],n=e[1],r=e[2]/360*2*Math.PI;return[t,n*Math.cos(r),n*Math.sin(r)]},a.rgb.ansi16=function(e,t=null){const[n,r,o]=e;let i=null===t?a.rgb.hsv(e)[2]:t;if(i=Math.round(i/50),0===i)return 30;let s=30+(Math.round(o/255)<<2|Math.round(r/255)<<1|Math.round(n/255));return 2===i&&(s+=60),s},a.hsv.ansi16=function(e){return a.rgb.ansi16(a.hsv.rgb(e),e[2])},a.rgb.ansi256=function(e){const t=e[0],n=e[1],r=e[2];return t===n&&n===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)},a.ansi16.rgb=function(e){let t=e%10;if(0===t||7===t)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];const n=.5*(1+~~(e>50));return[(1&t)*n*255,(t>>1&1)*n*255,(t>>2&1)*n*255]},a.ansi256.rgb=function(e){if(e>=232){const t=10*(e-232)+8;return[t,t,t]}let t;return e-=16,[Math.floor(e/36)/5*255,Math.floor((t=e%36)/6)/5*255,t%6/5*255]},a.rgb.hex=function(e){const t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".substring(t.length)+t},a.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let n=t[0];3===t[0].length&&(n=n.split("").map((e=>e+e)).join(""));const r=parseInt(n,16);return[r>>16&255,r>>8&255,255&r]},a.rgb.hcg=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.max(Math.max(t,n),r),a=Math.min(Math.min(t,n),r),i=o-a;let s,l;return s=i<1?a/(1-i):0,l=i<=0?0:o===t?(n-r)/i%6:o===n?2+(r-t)/i:4+(t-n)/i,l/=6,l%=1,[360*l,100*i,100*s]},a.hsl.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=n<.5?2*t*n:2*t*(1-n);let o=0;return r<1&&(o=(n-.5*r)/(1-r)),[e[0],100*r,100*o]},a.hsv.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=t*n;let o=0;return r<1&&(o=(n-r)/(1-r)),[e[0],100*r,100*o]},a.hcg.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;if(0===n)return[255*r,255*r,255*r];const o=[0,0,0],a=t%1*6,i=a%1,s=1-i;let l=0;switch(Math.floor(a)){case 0:o[0]=1,o[1]=i,o[2]=0;break;case 1:o[0]=s,o[1]=1,o[2]=0;break;case 2:o[0]=0,o[1]=1,o[2]=i;break;case 3:o[0]=0,o[1]=s,o[2]=1;break;case 4:o[0]=i,o[1]=0,o[2]=1;break;default:o[0]=1,o[1]=0,o[2]=s}return l=(1-n)*r,[255*(n*o[0]+l),255*(n*o[1]+l),255*(n*o[2]+l)]},a.hcg.hsv=function(e){const t=e[1]/100,n=t+e[2]/100*(1-t);let r=0;return n>0&&(r=t/n),[e[0],100*r,100*n]},a.hcg.hsl=function(e){const t=e[1]/100,n=e[2]/100*(1-t)+.5*t;let r=0;return n>0&&n<.5?r=t/(2*n):n>=.5&&n<1&&(r=t/(2*(1-n))),[e[0],100*r,100*n]},a.hcg.hwb=function(e){const t=e[1]/100,n=t+e[2]/100*(1-t);return[e[0],100*(n-t),100*(1-n)]},a.hwb.hcg=function(e){const t=e[1]/100,n=1-e[2]/100,r=n-t;let o=0;return r<1&&(o=(n-r)/(1-r)),[e[0],100*r,100*o]},a.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},a.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},a.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},a.gray.hsl=function(e){return[0,0,e[0]]},a.gray.hsv=a.gray.hsl,a.gray.hwb=function(e){return[0,100,e[0]]},a.gray.cmyk=function(e){return[0,0,0,e[0]]},a.gray.lab=function(e){return[e[0],0,0]},a.gray.hex=function(e){const t=255&Math.round(e[0]/100*255),n=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(n.length)+n},a.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]}},85:(e,t,n)=>{const r=n(168),o=n(111),a={};Object.keys(r).forEach((e=>{a[e]={},Object.defineProperty(a[e],"channels",{value:r[e].channels}),Object.defineProperty(a[e],"labels",{value:r[e].labels});const t=o(e);Object.keys(t).forEach((n=>{const r=t[n];a[e][n]=function(e){const t=function(...t){const n=t[0];if(null==n)return n;n.length>1&&(t=n);const r=e(t);if("object"==typeof r)for(let e=r.length,t=0;t1&&(t=n),e(t))};return"conversion"in e&&(t.conversion=e.conversion),t}(r)}))})),e.exports=a},111:(e,t,n)=>{const r=n(168);function o(e,t){return function(n){return t(e(n))}}function a(e,t){const n=[t[e].parent,e];let a=r[t[e].parent][e],i=t[e].parent;for(;t[i].parent;)n.unshift(t[i].parent),a=o(r[t[i].parent][i],a),i=t[i].parent;return a.conversion=n,a}e.exports=function(e){const t=function(e){const t=function(){const e={},t=Object.keys(r);for(let n=t.length,r=0;r{"use strict";e.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},818:(e,t,n)=>{var r=n(874),o=n(851),a=Object.hasOwnProperty,i=Object.create(null);for(var s in r)a.call(r,s)&&(i[r[s]]=s);var l=e.exports={to:{},get:{}};function c(e,t,n){return Math.min(Math.max(t,e),n)}function u(e){var t=Math.round(e).toString(16).toUpperCase();return t.length<2?"0"+t:t}l.get=function(e){var t,n;switch(e.substring(0,3).toLowerCase()){case"hsl":t=l.get.hsl(e),n="hsl";break;case"hwb":t=l.get.hwb(e),n="hwb";break;default:t=l.get.rgb(e),n="rgb"}return t?{model:n,value:t}:null},l.get.rgb=function(e){if(!e)return null;var t,n,o,i=[0,0,0,1];if(t=e.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(o=t[2],t=t[1],n=0;n<3;n++){var s=2*n;i[n]=parseInt(t.slice(s,s+2),16)}o&&(i[3]=parseInt(o,16)/255)}else if(t=e.match(/^#([a-f0-9]{3,4})$/i)){for(o=(t=t[1])[3],n=0;n<3;n++)i[n]=parseInt(t[n]+t[n],16);o&&(i[3]=parseInt(o+o,16)/255)}else if(t=e.match(/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)){for(n=0;n<3;n++)i[n]=parseInt(t[n+1],0);t[4]&&(t[5]?i[3]=.01*parseFloat(t[4]):i[3]=parseFloat(t[4]))}else{if(!(t=e.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)))return(t=e.match(/^(\w+)$/))?"transparent"===t[1]?[0,0,0,0]:a.call(r,t[1])?((i=r[t[1]])[3]=1,i):null:null;for(n=0;n<3;n++)i[n]=Math.round(2.55*parseFloat(t[n+1]));t[4]&&(t[5]?i[3]=.01*parseFloat(t[4]):i[3]=parseFloat(t[4]))}for(n=0;n<3;n++)i[n]=c(i[n],0,255);return i[3]=c(i[3],0,1),i},l.get.hsl=function(e){if(!e)return null;var t=e.match(/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(t){var n=parseFloat(t[4]);return[(parseFloat(t[1])%360+360)%360,c(parseFloat(t[2]),0,100),c(parseFloat(t[3]),0,100),c(isNaN(n)?1:n,0,1)]}return null},l.get.hwb=function(e){if(!e)return null;var t=e.match(/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(t){var n=parseFloat(t[4]);return[(parseFloat(t[1])%360+360)%360,c(parseFloat(t[2]),0,100),c(parseFloat(t[3]),0,100),c(isNaN(n)?1:n,0,1)]}return null},l.to.hex=function(){var e=o(arguments);return"#"+u(e[0])+u(e[1])+u(e[2])+(e[3]<1?u(Math.round(255*e[3])):"")},l.to.rgb=function(){var e=o(arguments);return e.length<4||1===e[3]?"rgb("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+")":"rgba("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+", "+e[3]+")"},l.to.rgb.percent=function(){var e=o(arguments),t=Math.round(e[0]/255*100),n=Math.round(e[1]/255*100),r=Math.round(e[2]/255*100);return e.length<4||1===e[3]?"rgb("+t+"%, "+n+"%, "+r+"%)":"rgba("+t+"%, "+n+"%, "+r+"%, "+e[3]+")"},l.to.hsl=function(){var e=o(arguments);return e.length<4||1===e[3]?"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)":"hsla("+e[0]+", "+e[1]+"%, "+e[2]+"%, "+e[3]+")"},l.to.hwb=function(){var e=o(arguments),t="";return e.length>=4&&1!==e[3]&&(t=", "+e[3]),"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+t+")"},l.to.keyword=function(e){return i[e.slice(0,3)]}},767:(e,t,n)=>{const r=n(818),o=n(85),a=["keyword","gray","hex"],i={};for(const e of Object.keys(o))i[[...o[e].labels].sort().join("")]=e;const s={};function l(e,t){if(!(this instanceof l))return new l(e,t);if(t&&t in a&&(t=null),t&&!(t in o))throw new Error("Unknown model: "+t);let n,c;if(null==e)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(e instanceof l)this.model=e.model,this.color=[...e.color],this.valpha=e.valpha;else if("string"==typeof e){const t=r.get(e);if(null===t)throw new Error("Unable to parse color from string: "+e);this.model=t.model,c=o[this.model].channels,this.color=t.value.slice(0,c),this.valpha="number"==typeof t.value[c]?t.value[c]:1}else if(e.length>0){this.model=t||"rgb",c=o[this.model].channels;const n=Array.prototype.slice.call(e,0,c);this.color=h(n,c),this.valpha="number"==typeof e[c]?e[c]:1}else if("number"==typeof e)this.model="rgb",this.color=[e>>16&255,e>>8&255,255&e],this.valpha=1;else{this.valpha=1;const t=Object.keys(e);"alpha"in e&&(t.splice(t.indexOf("alpha"),1),this.valpha="number"==typeof e.alpha?e.alpha:0);const r=t.sort().join("");if(!(r in i))throw new Error("Unable to parse color from object: "+JSON.stringify(e));this.model=i[r];const{labels:a}=o[this.model],s=[];for(n=0;n(e%360+360)%360)),saturationl:u("hsl",1,d(100)),lightness:u("hsl",2,d(100)),saturationv:u("hsv",1,d(100)),value:u("hsv",2,d(100)),chroma:u("hcg",1,d(100)),gray:u("hcg",2,d(100)),white:u("hwb",1,d(100)),wblack:u("hwb",2,d(100)),cyan:u("cmyk",0,d(100)),magenta:u("cmyk",1,d(100)),yellow:u("cmyk",2,d(100)),black:u("cmyk",3,d(100)),x:u("xyz",0,d(95.047)),y:u("xyz",1,d(100)),z:u("xyz",2,d(108.833)),l:u("lab",0,d(100)),a:u("lab",1),b:u("lab",2),keyword(e){return void 0!==e?new l(e):o[this.model].keyword(this.color)},hex(e){return void 0!==e?new l(e):r.to.hex(this.rgb().round().color)},hexa(e){if(void 0!==e)return new l(e);const t=this.rgb().round().color;let n=Math.round(255*this.valpha).toString(16).toUpperCase();return 1===n.length&&(n="0"+n),r.to.hex(t)+n},rgbNumber(){const e=this.rgb().color;return(255&e[0])<<16|(255&e[1])<<8|255&e[2]},luminosity(){const e=this.rgb().color,t=[];for(const[n,r]of e.entries()){const e=r/255;t[n]=e<=.04045?e/12.92:((e+.055)/1.055)**2.4}return.2126*t[0]+.7152*t[1]+.0722*t[2]},contrast(e){const t=this.luminosity(),n=e.luminosity();return t>n?(t+.05)/(n+.05):(n+.05)/(t+.05)},level(e){const t=this.contrast(e);return t>=7?"AAA":t>=4.5?"AA":""},isDark(){const e=this.rgb().color;return(2126*e[0]+7152*e[1]+722*e[2])/1e4<128},isLight(){return!this.isDark()},negate(){const e=this.rgb();for(let t=0;t<3;t++)e.color[t]=255-e.color[t];return e},lighten(e){const t=this.hsl();return t.color[2]+=t.color[2]*e,t},darken(e){const t=this.hsl();return t.color[2]-=t.color[2]*e,t},saturate(e){const t=this.hsl();return t.color[1]+=t.color[1]*e,t},desaturate(e){const t=this.hsl();return t.color[1]-=t.color[1]*e,t},whiten(e){const t=this.hwb();return t.color[1]+=t.color[1]*e,t},blacken(e){const t=this.hwb();return t.color[2]+=t.color[2]*e,t},grayscale(){const e=this.rgb().color,t=.3*e[0]+.59*e[1]+.11*e[2];return l.rgb(t,t,t)},fade(e){return this.alpha(this.valpha-this.valpha*e)},opaquer(e){return this.alpha(this.valpha+this.valpha*e)},rotate(e){const t=this.hsl();let n=t.color[0];return n=(n+e)%360,n=n<0?360+n:n,t.color[0]=n,t},mix(e,t){if(!e||!e.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof e);const n=e.rgb(),r=this.rgb(),o=void 0===t?.5:t,a=2*o-1,i=n.alpha()-r.alpha(),s=((a*i==-1?a:(a+i)/(1+a*i))+1)/2,c=1-s;return l.rgb(s*n.red()+c*r.red(),s*n.green()+c*r.green(),s*n.blue()+c*r.blue(),n.alpha()*o+r.alpha()*(1-o))}};for(const e of Object.keys(o)){if(a.includes(e))continue;const{channels:t}=o[e];l.prototype[e]=function(...t){return this.model===e?new l(this):t.length>0?new l(t,e):new l([...(n=o[this.model][e].raw(this.color),Array.isArray(n)?n:[n]),this.valpha],e);var n},l[e]=function(...n){let r=n[0];return"number"==typeof r&&(r=h(n,t)),new l(r,e)}}function c(e){return function(t){return function(e,t){return Number(e.toFixed(t))}(t,e)}}function u(e,t,n){e=Array.isArray(e)?e:[e];for(const r of e)(s[r]||(s[r]=[]))[t]=n;return e=e[0],function(r){let o;return void 0!==r?(n&&(r=n(r)),o=this[e](),o.color[t]=r,o):(o=this[e]().color[t],n&&(o=n(o)),o)}}function d(e){return function(t){return Math.max(0,Math.min(e,t))}}function h(e,t){for(let n=0;n1?n-1:0),o=1;o2&&void 0!==arguments[2]?arguments[2]:f;t&&t(e,null);let a=r.length;for(;a--;){let t=r[a];if("string"==typeof t){const e=o(t);e!==t&&(n(r)||(r[a]=e),t=e)}e[t]=!0}return e}function k(t){const n=s(null);for(const[r,a]of e(t))void 0!==o(t,r)&&(n[r]=a);return n}function L(e,t){for(;null!==e;){const n=o(e,t);if(n){if(n.get)return E(n.get);if("function"==typeof n.value)return E(n.value)}e=r(e)}return function(e){return console.warn("fallback value for",e),null}}const M=a(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),S=a(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),T=a(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),A=a(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),_=a(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),N=a(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),I=a(["#text"]),D=a(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),O=a(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),B=a(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),H=a(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),R=i(/\{\{[\w\W]*|[\w\W]*\}\}/gm),V=i(/<%[\w\W]*|[\w\W]*%>/gm),j=i(/\${[\w\W]*}/gm),P=i(/^data-[\-\w.\u00B7-\uFFFF]/),F=i(/^aria-[\-\w]+$/),U=i(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),$=i(/^(?:\w+script|data):/i),z=i(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),q=i(/^html$/i);var Q=Object.freeze({__proto__:null,MUSTACHE_EXPR:R,ERB_EXPR:V,TMPLIT_EXPR:j,DATA_ATTR:P,ARIA_ATTR:F,IS_ALLOWED_URI:U,IS_SCRIPT_OR_DATA:$,ATTR_WHITESPACE:z,DOCTYPE_NAME:q});const W=function(){return"undefined"==typeof window?null:window};return function t(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:W();const r=e=>t(e);if(r.version="3.0.6",r.removed=[],!n||!n.document||9!==n.document.nodeType)return r.isSupported=!1,r;let{document:o}=n;const i=o,l=i.currentScript,{DocumentFragment:c,HTMLTemplateElement:w,Node:E,Element:R,NodeFilter:V,NamedNodeMap:j=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:P,DOMParser:F,trustedTypes:$}=n,z=R.prototype,Z=L(z,"cloneNode"),Y=L(z,"nextSibling"),G=L(z,"childNodes"),J=L(z,"parentNode");if("function"==typeof w){const e=o.createElement("template");e.content&&e.content.ownerDocument&&(o=e.content.ownerDocument)}let X,K="";const{implementation:ee,createNodeIterator:te,createDocumentFragment:ne,getElementsByTagName:re}=o,{importNode:oe}=i;let ae={};r.isSupported="function"==typeof e&&"function"==typeof J&&ee&&void 0!==ee.createHTMLDocument;const{MUSTACHE_EXPR:ie,ERB_EXPR:se,TMPLIT_EXPR:le,DATA_ATTR:ce,ARIA_ATTR:ue,IS_SCRIPT_OR_DATA:de,ATTR_WHITESPACE:he}=Q;let{IS_ALLOWED_URI:fe}=Q,me=null;const pe=x({},[...M,...S,...T,..._,...I]);let ge=null;const ve=x({},[...D,...O,...B,...H]);let ye=Object.seal(s(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Ce=null,be=null,we=!0,Ee=!0,xe=!1,ke=!0,Le=!1,Me=!1,Se=!1,Te=!1,Ae=!1,_e=!1,Ne=!1,Ie=!0,De=!1,Oe=!0,Be=!1,He={},Re=null;const Ve=x({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let je=null;const Pe=x({},["audio","video","img","source","image","track"]);let Fe=null;const Ue=x({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),$e="http://www.w3.org/1998/Math/MathML",ze="http://www.w3.org/2000/svg",qe="http://www.w3.org/1999/xhtml";let Qe=qe,We=!1,Ze=null;const Ye=x({},[$e,ze,qe],m);let Ge=null;const Je=["application/xhtml+xml","text/html"];let Xe=null,Ke=null;const et=o.createElement("form"),tt=function(e){return e instanceof RegExp||e instanceof Function},nt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Ke||Ke!==e){if(e&&"object"==typeof e||(e={}),e=k(e),Ge=Ge=-1===Je.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,Xe="application/xhtml+xml"===Ge?m:f,me="ALLOWED_TAGS"in e?x({},e.ALLOWED_TAGS,Xe):pe,ge="ALLOWED_ATTR"in e?x({},e.ALLOWED_ATTR,Xe):ve,Ze="ALLOWED_NAMESPACES"in e?x({},e.ALLOWED_NAMESPACES,m):Ye,Fe="ADD_URI_SAFE_ATTR"in e?x(k(Ue),e.ADD_URI_SAFE_ATTR,Xe):Ue,je="ADD_DATA_URI_TAGS"in e?x(k(Pe),e.ADD_DATA_URI_TAGS,Xe):Pe,Re="FORBID_CONTENTS"in e?x({},e.FORBID_CONTENTS,Xe):Ve,Ce="FORBID_TAGS"in e?x({},e.FORBID_TAGS,Xe):{},be="FORBID_ATTR"in e?x({},e.FORBID_ATTR,Xe):{},He="USE_PROFILES"in e&&e.USE_PROFILES,we=!1!==e.ALLOW_ARIA_ATTR,Ee=!1!==e.ALLOW_DATA_ATTR,xe=e.ALLOW_UNKNOWN_PROTOCOLS||!1,ke=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Le=e.SAFE_FOR_TEMPLATES||!1,Me=e.WHOLE_DOCUMENT||!1,Ae=e.RETURN_DOM||!1,_e=e.RETURN_DOM_FRAGMENT||!1,Ne=e.RETURN_TRUSTED_TYPE||!1,Te=e.FORCE_BODY||!1,Ie=!1!==e.SANITIZE_DOM,De=e.SANITIZE_NAMED_PROPS||!1,Oe=!1!==e.KEEP_CONTENT,Be=e.IN_PLACE||!1,fe=e.ALLOWED_URI_REGEXP||U,Qe=e.NAMESPACE||qe,ye=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&tt(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(ye.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&tt(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(ye.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(ye.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Le&&(Ee=!1),_e&&(Ae=!0),He&&(me=x({},[...I]),ge=[],!0===He.html&&(x(me,M),x(ge,D)),!0===He.svg&&(x(me,S),x(ge,O),x(ge,H)),!0===He.svgFilters&&(x(me,T),x(ge,O),x(ge,H)),!0===He.mathMl&&(x(me,_),x(ge,B),x(ge,H))),e.ADD_TAGS&&(me===pe&&(me=k(me)),x(me,e.ADD_TAGS,Xe)),e.ADD_ATTR&&(ge===ve&&(ge=k(ge)),x(ge,e.ADD_ATTR,Xe)),e.ADD_URI_SAFE_ATTR&&x(Fe,e.ADD_URI_SAFE_ATTR,Xe),e.FORBID_CONTENTS&&(Re===Ve&&(Re=k(Re)),x(Re,e.FORBID_CONTENTS,Xe)),Oe&&(me["#text"]=!0),Me&&x(me,["html","head","body"]),me.table&&(x(me,["tbody"]),delete Ce.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw b('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw b('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');X=e.TRUSTED_TYPES_POLICY,K=X.createHTML("")}else void 0===X&&(X=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));const o="dompurify"+(n?"#"+n:"");try{return e.createPolicy(o,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+o+" could not be created."),null}}($,l)),null!==X&&"string"==typeof K&&(K=X.createHTML(""));a&&a(e),Ke=e}},rt=x({},["mi","mo","mn","ms","mtext"]),ot=x({},["foreignobject","desc","title","annotation-xml"]),at=x({},["title","style","font","a","script"]),it=x({},S);x(it,T),x(it,A);const st=x({},_);x(st,N);const lt=function(e){h(r.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){e.remove()}},ct=function(e,t){try{h(r.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){h(r.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!ge[e])if(Ae||_e)try{lt(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},ut=function(e){let t=null,n=null;if(Te)e=""+e;else{const t=p(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===Ge&&Qe===qe&&(e=''+e+"");const r=X?X.createHTML(e):e;if(Qe===qe)try{t=(new F).parseFromString(r,Ge)}catch(e){}if(!t||!t.documentElement){t=ee.createDocument(Qe,"template",null);try{t.documentElement.innerHTML=We?K:r}catch(e){}}const a=t.body||t.documentElement;return e&&n&&a.insertBefore(o.createTextNode(n),a.childNodes[0]||null),Qe===qe?re.call(t,Me?"html":"body")[0]:Me?t.documentElement:a},dt=function(e){return te.call(e.ownerDocument||e,e,V.SHOW_ELEMENT|V.SHOW_COMMENT|V.SHOW_TEXT,null)},ht=function(e){return"function"==typeof E&&e instanceof E},ft=function(e,t,n){ae[e]&&u(ae[e],(e=>{e.call(r,t,n,Ke)}))},mt=function(e){let t=null;if(ft("beforeSanitizeElements",e,null),(n=e)instanceof P&&("string"!=typeof n.nodeName||"string"!=typeof n.textContent||"function"!=typeof n.removeChild||!(n.attributes instanceof j)||"function"!=typeof n.removeAttribute||"function"!=typeof n.setAttribute||"string"!=typeof n.namespaceURI||"function"!=typeof n.insertBefore||"function"!=typeof n.hasChildNodes))return lt(e),!0;var n;const o=Xe(e.nodeName);if(ft("uponSanitizeElement",e,{tagName:o,allowedTags:me}),e.hasChildNodes()&&!ht(e.firstElementChild)&&C(/<[/\w]/g,e.innerHTML)&&C(/<[/\w]/g,e.textContent))return lt(e),!0;if(!me[o]||Ce[o]){if(!Ce[o]&>(o)){if(ye.tagNameCheck instanceof RegExp&&C(ye.tagNameCheck,o))return!1;if(ye.tagNameCheck instanceof Function&&ye.tagNameCheck(o))return!1}if(Oe&&!Re[o]){const t=J(e)||e.parentNode,n=G(e)||e.childNodes;if(n&&t)for(let r=n.length-1;r>=0;--r)t.insertBefore(Z(n[r],!0),Y(e))}return lt(e),!0}return e instanceof R&&!function(e){let t=J(e);t&&t.tagName||(t={namespaceURI:Qe,tagName:"template"});const n=f(e.tagName),r=f(t.tagName);return!!Ze[e.namespaceURI]&&(e.namespaceURI===ze?t.namespaceURI===qe?"svg"===n:t.namespaceURI===$e?"svg"===n&&("annotation-xml"===r||rt[r]):Boolean(it[n]):e.namespaceURI===$e?t.namespaceURI===qe?"math"===n:t.namespaceURI===ze?"math"===n&&ot[r]:Boolean(st[n]):e.namespaceURI===qe?!(t.namespaceURI===ze&&!ot[r])&&!(t.namespaceURI===$e&&!rt[r])&&!st[n]&&(at[n]||!it[n]):!("application/xhtml+xml"!==Ge||!Ze[e.namespaceURI]))}(e)?(lt(e),!0):"noscript"!==o&&"noembed"!==o&&"noframes"!==o||!C(/<\/no(script|embed|frames)/i,e.innerHTML)?(Le&&3===e.nodeType&&(t=e.textContent,u([ie,se,le],(e=>{t=g(t,e," ")})),e.textContent!==t&&(h(r.removed,{element:e.cloneNode()}),e.textContent=t)),ft("afterSanitizeElements",e,null),!1):(lt(e),!0)},pt=function(e,t,n){if(Ie&&("id"===t||"name"===t)&&(n in o||n in et))return!1;if(Ee&&!be[t]&&C(ce,t));else if(we&&C(ue,t));else if(!ge[t]||be[t]){if(!(gt(e)&&(ye.tagNameCheck instanceof RegExp&&C(ye.tagNameCheck,e)||ye.tagNameCheck instanceof Function&&ye.tagNameCheck(e))&&(ye.attributeNameCheck instanceof RegExp&&C(ye.attributeNameCheck,t)||ye.attributeNameCheck instanceof Function&&ye.attributeNameCheck(t))||"is"===t&&ye.allowCustomizedBuiltInElements&&(ye.tagNameCheck instanceof RegExp&&C(ye.tagNameCheck,n)||ye.tagNameCheck instanceof Function&&ye.tagNameCheck(n))))return!1}else if(Fe[t]);else if(C(fe,g(n,he,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==v(n,"data:")||!je[e])if(xe&&!C(de,g(n,he,"")));else if(n)return!1;return!0},gt=function(e){return e.indexOf("-")>0},vt=function(e){ft("beforeSanitizeAttributes",e,null);const{attributes:t}=e;if(!t)return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ge};let o=t.length;for(;o--;){const a=t[o],{name:i,namespaceURI:s,value:l}=a,c=Xe(i);let h="value"===i?l:y(l);if(n.attrName=c,n.attrValue=h,n.keepAttr=!0,n.forceKeepAttr=void 0,ft("uponSanitizeAttribute",e,n),h=n.attrValue,n.forceKeepAttr)continue;if(ct(i,e),!n.keepAttr)continue;if(!ke&&C(/\/>/i,h)){ct(i,e);continue}Le&&u([ie,se,le],(e=>{h=g(h,e," ")}));const f=Xe(e.nodeName);if(pt(f,c,h)){if(!De||"id"!==c&&"name"!==c||(ct(i,e),h="user-content-"+h),X&&"object"==typeof $&&"function"==typeof $.getAttributeType)if(s);else switch($.getAttributeType(f,c)){case"TrustedHTML":h=X.createHTML(h);break;case"TrustedScriptURL":h=X.createScriptURL(h)}try{s?e.setAttributeNS(s,i,h):e.setAttribute(i,h),d(r.removed)}catch(e){}}}ft("afterSanitizeAttributes",e,null)},yt=function e(t){let n=null;const r=dt(t);for(ft("beforeSanitizeShadowDOM",t,null);n=r.nextNode();)ft("uponSanitizeShadowNode",n,null),mt(n)||(n.content instanceof c&&e(n.content),vt(n));ft("afterSanitizeShadowDOM",t,null)};return r.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,o=null,a=null,s=null;if(We=!e,We&&(e="\x3c!--\x3e"),"string"!=typeof e&&!ht(e)){if("function"!=typeof e.toString)throw b("toString is not a function");if("string"!=typeof(e=e.toString()))throw b("dirty is not a string, aborting")}if(!r.isSupported)return e;if(Se||nt(t),r.removed=[],"string"==typeof e&&(Be=!1),Be){if(e.nodeName){const t=Xe(e.nodeName);if(!me[t]||Ce[t])throw b("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof E)n=ut("\x3c!----\x3e"),o=n.ownerDocument.importNode(e,!0),1===o.nodeType&&"BODY"===o.nodeName||"HTML"===o.nodeName?n=o:n.appendChild(o);else{if(!Ae&&!Le&&!Me&&-1===e.indexOf("<"))return X&&Ne?X.createHTML(e):e;if(n=ut(e),!n)return Ae?null:Ne?K:""}n&&Te&<(n.firstChild);const l=dt(Be?e:n);for(;a=l.nextNode();)mt(a)||(a.content instanceof c&&yt(a.content),vt(a));if(Be)return e;if(Ae){if(_e)for(s=ne.call(n.ownerDocument);n.firstChild;)s.appendChild(n.firstChild);else s=n;return(ge.shadowroot||ge.shadowrootmode)&&(s=oe.call(i,s,!0)),s}let d=Me?n.outerHTML:n.innerHTML;return Me&&me["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&C(q,n.ownerDocument.doctype.name)&&(d="\n"+d),Le&&u([ie,se,le],(e=>{d=g(d,e," ")})),X&&Ne?X.createHTML(d):d},r.setConfig=function(){nt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Se=!0},r.clearConfig=function(){Ke=null,Se=!1},r.isValidAttribute=function(e,t,n){Ke||nt({});const r=Xe(e),o=Xe(t);return pt(r,o,n)},r.addHook=function(e,t){"function"==typeof t&&(ae[e]=ae[e]||[],h(ae[e],t))},r.removeHook=function(e){if(ae[e])return d(ae[e])},r.removeHooks=function(e){ae[e]&&(ae[e]=[])},r.removeAllHooks=function(){ae={}},r}()}()},171:e=>{e.exports=function(e){return!(!e||"string"==typeof e)&&(e instanceof Array||Array.isArray(e)||e.length>=0&&(e.splice instanceof Function||Object.getOwnPropertyDescriptor(e,e.length-1)&&"String"!==e.constructor.name))}},483:(e,t,n)=>{e.exports=function e(t,n,r){function o(i,s){if(!n[i]){if(!t[i]){if(a)return a(i,!0);var l=new Error("Cannot find module '"+i+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[i]={exports:{}};t[i][0].call(c.exports,(function(e){return o(t[i][1][e]||e)}),c,c.exports,e,t,n,r)}return n[i].exports}for(var a=void 0,i=0;i=43)}})).catch((function(){return!1}))}(e).then((function(e){return h=e}))}function C(e){var t=f[e.name],n={};n.promise=new i((function(e,t){n.resolve=e,n.reject=t})),t.deferredOperations.push(n),t.dbReady?t.dbReady=t.dbReady.then((function(){return n.promise})):t.dbReady=n.promise}function b(e){var t=f[e.name].deferredOperations.pop();if(t)return t.resolve(),t.promise}function w(e,t){var n=f[e.name].deferredOperations.pop();if(n)return n.reject(t),n.promise}function E(e,t){return new i((function(n,r){if(f[e.name]=f[e.name]||{forages:[],db:null,dbReady:null,deferredOperations:[]},e.db){if(!t)return n(e.db);C(e),e.db.close()}var a=[e.name];t&&a.push(e.version);var i=o.open.apply(o,a);t&&(i.onupgradeneeded=function(t){var n=i.result;try{n.createObjectStore(e.storeName),t.oldVersion<=1&&n.createObjectStore(d)}catch(n){if("ConstraintError"!==n.name)throw n;console.warn('The database "'+e.name+'" has been upgraded from version '+t.oldVersion+" to version "+t.newVersion+', but the storage "'+e.storeName+'" already exists.')}}),i.onerror=function(e){e.preventDefault(),r(i.error)},i.onsuccess=function(){var t=i.result;t.onversionchange=function(e){e.target.close()},n(t),b(e)}}))}function x(e){return E(e,!1)}function k(e){return E(e,!0)}function L(e,t){if(!e.db)return!0;var n=!e.db.objectStoreNames.contains(e.storeName),r=e.versione.db.version;if(r&&(e.version!==t&&console.warn('The database "'+e.name+"\" can't be downgraded from version "+e.db.version+" to version "+e.version+"."),e.version=e.db.version),o||n){if(n){var a=e.db.version+1;a>e.version&&(e.version=a)}return!0}return!1}function M(e){return a([v(atob(e.data))],{type:e.type})}function S(e){return e&&e.__local_forage_encoded_blob}function T(e){var t=this,n=t._initReady().then((function(){var e=f[t._dbInfo.name];if(e&&e.dbReady)return e.dbReady}));return l(n,e,e),n}function A(e,t,n,r){void 0===r&&(r=1);try{var o=e.db.transaction(e.storeName,t);n(null,o)}catch(o){if(r>0&&(!e.db||"InvalidStateError"===o.name||"NotFoundError"===o.name))return i.resolve().then((function(){if(!e.db||"NotFoundError"===o.name&&!e.db.objectStoreNames.contains(e.storeName)&&e.version<=e.db.version)return e.db&&(e.version=e.db.version+1),k(e)})).then((function(){return function(e){C(e);for(var t=f[e.name],n=t.forages,r=0;r>4,u[l++]=(15&r)<<4|o>>2,u[l++]=(3&o)<<6|63&a;return c}function W(e){var t,n=new Uint8Array(e),r="";for(t=0;t>2],r+=N[(3&n[t])<<4|n[t+1]>>4],r+=N[(15&n[t+1])<<2|n[t+2]>>6],r+=N[63&n[t+2]];return n.length%3==2?r=r.substring(0,r.length-1)+"=":n.length%3==1&&(r=r.substring(0,r.length-2)+"=="),r}var Z={serialize:function(e,t){var n="";if(e&&(n=q.call(e)),e&&("[object ArrayBuffer]"===n||e.buffer&&"[object ArrayBuffer]"===q.call(e.buffer))){var r,o=D;e instanceof ArrayBuffer?(r=e,o+=O):(r=e.buffer,"[object Int8Array]"===n?o+=H:"[object Uint8Array]"===n?o+=R:"[object Uint8ClampedArray]"===n?o+=V:"[object Int16Array]"===n?o+=j:"[object Uint16Array]"===n?o+=F:"[object Int32Array]"===n?o+=P:"[object Uint32Array]"===n?o+=U:"[object Float32Array]"===n?o+=$:"[object Float64Array]"===n?o+=z:t(new Error("Failed to get type for BinaryArray"))),t(o+W(r))}else if("[object Blob]"===n){var a=new FileReader;a.onload=function(){var n="~~local_forage_type~"+e.type+"~"+W(this.result);t(D+B+n)},a.readAsArrayBuffer(e)}else try{t(JSON.stringify(e))}catch(n){console.error("Couldn't convert value into a JSON string: ",e),t(null,n)}},deserialize:function(e){if(e.substring(0,9)!==D)return JSON.parse(e);var t,n=e.substring(13),r=e.substring(9,13);if(r===B&&I.test(n)){var o=n.match(I);t=o[1],n=n.substring(o[0].length)}var i=Q(n);switch(r){case O:return i;case B:return a([i],{type:t});case H:return new Int8Array(i);case R:return new Uint8Array(i);case V:return new Uint8ClampedArray(i);case j:return new Int16Array(i);case F:return new Uint16Array(i);case P:return new Int32Array(i);case U:return new Uint32Array(i);case $:return new Float32Array(i);case z:return new Float64Array(i);default:throw new Error("Unkown type: "+r)}},stringToBuffer:Q,bufferToString:W};function Y(e,t,n,r){e.executeSql("CREATE TABLE IF NOT EXISTS "+t.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],n,r)}function G(e,t,n,r,o,a){e.executeSql(n,r,o,(function(e,i){i.code===i.SYNTAX_ERR?e.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[t.storeName],(function(e,s){s.rows.length?a(e,i):Y(e,t,(function(){e.executeSql(n,r,o,a)}),a)}),a):a(e,i)}),a)}function J(e,t,n,r){var o=this;e=c(e);var a=new i((function(a,i){o.ready().then((function(){void 0===t&&(t=null);var s=t,l=o._dbInfo;l.serializer.serialize(t,(function(t,c){c?i(c):l.db.transaction((function(n){G(n,l,"INSERT OR REPLACE INTO "+l.storeName+" (key, value) VALUES (?, ?)",[e,t],(function(){a(s)}),(function(e,t){i(t)}))}),(function(t){if(t.code===t.QUOTA_ERR){if(r>0)return void a(J.apply(o,[e,s,n,r-1]));i(t)}}))}))})).catch(i)}));return s(a,n),a}var X={_driver:"webSQLStorage",_initStorage:function(e){var t=this,n={db:null};if(e)for(var r in e)n[r]="string"!=typeof e[r]?e[r].toString():e[r];var o=new i((function(e,r){try{n.db=openDatabase(n.name,String(n.version),n.description,n.size)}catch(e){return r(e)}n.db.transaction((function(o){Y(o,n,(function(){t._dbInfo=n,e()}),(function(e,t){r(t)}))}),r)}));return n.serializer=Z,o},_support:"function"==typeof openDatabase,iterate:function(e,t){var n=this,r=new i((function(t,r){n.ready().then((function(){var o=n._dbInfo;o.db.transaction((function(n){G(n,o,"SELECT * FROM "+o.storeName,[],(function(n,r){for(var a=r.rows,i=a.length,s=0;s '__WebKitDatabaseInfoTable__'",[],(function(n,r){for(var o=[],a=0;a0}var te={_driver:"localStorageWrapper",_initStorage:function(e){var t={};if(e)for(var n in e)t[n]=e[n];return t.keyPrefix=K(e,this._defaultConfig),ee()?(this._dbInfo=t,t.serializer=Z,i.resolve()):i.reject()},_support:function(){try{return"undefined"!=typeof localStorage&&"setItem"in localStorage&&!!localStorage.setItem}catch(e){return!1}}(),iterate:function(e,t){var n=this,r=n.ready().then((function(){for(var t=n._dbInfo,r=t.keyPrefix,o=r.length,a=localStorage.length,i=1,s=0;s=0;n--){var r=localStorage.key(n);0===r.indexOf(e)&&localStorage.removeItem(r)}}));return s(n,e),n},length:function(e){var t=this.keys().then((function(e){return e.length}));return s(t,e),t},key:function(e,t){var n=this,r=n.ready().then((function(){var t,r=n._dbInfo;try{t=localStorage.key(e)}catch(e){t=null}return t&&(t=t.substring(r.keyPrefix.length)),t}));return s(r,t),r},keys:function(e){var t=this,n=t.ready().then((function(){for(var e=t._dbInfo,n=localStorage.length,r=[],o=0;o=0;t--){var n=localStorage.key(t);0===n.indexOf(e)&&localStorage.removeItem(n)}})):i.reject("Invalid arguments"),s(r,t),r}},ne=function(e,t){for(var n=e.length,r=0;r{"use strict";var r=n(171),o=Array.prototype.concat,a=Array.prototype.slice,i=e.exports=function(e){for(var t=[],n=0,i=e.length;n{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var r={};(()=>{"use strict";n.d(r,{Fg:()=>Xe,lH:()=>Rt,KL:()=>kt,Tb:()=>nt,AE:()=>Ue,Lw:()=>Ct,Ue:()=>Ke,Xz:()=>Vt,xD:()=>Pt,E3:()=>dt,Lq:()=>Ut,gU:()=>Ft});const e={duration:.3,delay:0,endDelay:0,repeat:0,easing:"ease"},t=e=>1e3*e,o=e=>e/1e3,a=()=>{},i=e=>e;function s(e,t=!0){if(e&&"finished"!==e.playState)try{e.stop?e.stop():(t&&e.commitStyles(),e.cancel())}catch(e){}}const l=e=>e(),c=(t,n,r=e.duration)=>new Proxy({animations:t.map(l).filter(Boolean),duration:r,options:n},u),u={get:(e,t)=>{const n=e.animations[0];switch(t){case"duration":return e.duration;case"currentTime":return o((null==n?void 0:n[t])||0);case"playbackRate":case"playState":return null==n?void 0:n[t];case"finished":return e.finished||(e.finished=Promise.all(e.animations.map(d)).catch(a)),e.finished;case"stop":return()=>{e.animations.forEach((e=>s(e)))};case"forEachNative":return t=>{e.animations.forEach((n=>t(n,e)))};default:return void 0===(null==n?void 0:n[t])?void 0:()=>e.animations.forEach((e=>e[t]()))}},set:(e,n,r)=>{switch(n){case"currentTime":r=t(r);case"playbackRate":for(let t=0;te.finished,h=e=>"object"==typeof e&&Boolean(e.createAnimation),f=e=>"number"==typeof e,m=e=>Array.isArray(e)&&!f(e[0]),p=(e,t,n)=>-n*e+n*t+e,g=(e,t,n)=>t-e==0?1:(n-e)/(t-e);function v(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=g(0,t,r);e.push(p(n,1,o))}}const y=(e,t,n)=>Math.min(Math.max(n,e),t);const C=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,b=1e-7,w=12;function E(e,t,n,r){if(e===t&&n===r)return i;return o=>0===o||1===o?o:C(function(e,t,n,r,o){let a,i,s=0;do{i=t+(n-t)/2,a=C(i,r,o)-e,a>0?n=i:t=i}while(Math.abs(a)>b&&++sn=>{const r=(n="end"===t?Math.min(n,.999):Math.max(n,.001))*e,o="end"===t?Math.floor(r):Math.ceil(r);return y(0,1,o/e)},k=e=>"function"==typeof e,L=e=>Array.isArray(e)&&f(e[0]),M={ease:E(.25,.1,.25,1),"ease-in":E(.42,0,1,1),"ease-in-out":E(.42,0,.58,1),"ease-out":E(0,0,.58,1)},S=/\((.*?)\)/;function T(e){if(k(e))return e;if(L(e))return E(...e);if(M[e])return M[e];if(e.startsWith("steps")){const t=S.exec(e);if(t){const e=t[1].split(",");return x(parseFloat(e[0]),e[1].trim())}}return i}class A{constructor(t,n=[0,1],{easing:r,duration:o=e.duration,delay:a=e.delay,endDelay:s=e.endDelay,repeat:l=e.repeat,offset:c,direction:u="normal"}={}){if(this.startTime=null,this.rate=1,this.t=0,this.cancelTimestamp=null,this.easing=i,this.duration=0,this.totalDuration=0,this.repeat=0,this.playState="idle",this.finished=new Promise(((e,t)=>{this.resolve=e,this.reject=t})),r=r||e.easing,h(r)){const e=r.createAnimation(n);r=e.easing,n=e.keyframes||n,o=e.duration||o}this.repeat=l,this.easing=m(r)?i:T(r),this.updateDuration(o);const d=function(e,t=function(e){const t=[0];return v(t,e-1),t}(e.length),n=i){const r=e.length,o=r-t.length;return o>0&&v(t,o),o=>{let a=0;for(;a{const r=t-e;return((n-e)%r+r)%r+e})(0,e.length,t)]:e}(n,a);return i=s(i),p(e[a],e[a+1],i)}}(n,c,m(r)?r.map(T):i);this.tick=e=>{var n;let r=0;r=void 0!==this.pauseTime?this.pauseTime:(e-this.startTime)*this.rate,this.t=r,r/=1e3,r=Math.max(r-a,0),"finished"===this.playState&&void 0===this.pauseTime&&(r=this.totalDuration);const o=r/this.duration;let i=Math.floor(o),l=o%1;!l&&o>=1&&(l=1),1===l&&i--;const c=i%2;("reverse"===u||"alternate"===u&&c||"alternate-reverse"===u&&!c)&&(l=1-l);const h=r>=this.totalDuration?1:Math.min(l,1),f=d(this.easing(h));t(f),void 0===this.pauseTime&&("finished"===this.playState||r>=this.totalDuration+s)?(this.playState="finished",null===(n=this.resolve)||void 0===n||n.call(this,f)):"idle"!==this.playState&&(this.frameRequestId=requestAnimationFrame(this.tick))},this.play()}play(){const e=performance.now();this.playState="running",void 0!==this.pauseTime?this.startTime=e-this.pauseTime:this.startTime||(this.startTime=e),this.cancelTimestamp=this.startTime,this.pauseTime=void 0,this.frameRequestId=requestAnimationFrame(this.tick)}pause(){this.playState="paused",this.pauseTime=this.t}finish(){this.playState="finished",this.tick(0)}stop(){var e;this.playState="idle",void 0!==this.frameRequestId&&cancelAnimationFrame(this.frameRequestId),null===(e=this.reject)||void 0===e||e.call(this,!1)}cancel(){this.stop(),this.tick(this.cancelTimestamp)}reverse(){this.rate*=-1}commitStyles(){}updateDuration(e){this.duration=e,this.totalDuration=e*(this.repeat+1)}get currentTime(){return this.t}set currentTime(e){void 0!==this.pauseTime||0===this.rate?this.pauseTime=e:this.startTime=performance.now()-e/this.rate}get playbackRate(){return this.rate}set playbackRate(e){this.rate=e}}class _{setAnimation(e){this.animation=e,null==e||e.finished.then((()=>this.clearAnimation())).catch((()=>{}))}clearAnimation(){this.animation=this.generator=void 0}}const N=new WeakMap;function I(e){return N.has(e)||N.set(e,{transforms:[],values:new Map}),N.get(e)}const D=["","X","Y","Z"],O={x:"translateX",y:"translateY",z:"translateZ"},B={syntax:"",initialValue:"0deg",toDefaultUnit:e=>e+"deg"},H={translate:{syntax:"",initialValue:"0px",toDefaultUnit:e=>e+"px"},rotate:B,scale:{syntax:"",initialValue:1,toDefaultUnit:i},skew:B},R=new Map,V=e=>`--motion-${e}`,j=["x","y","z"];["translate","scale","rotate","skew"].forEach((e=>{D.forEach((t=>{j.push(e+t),R.set(V(e+t),H[e])}))}));const P=(e,t)=>j.indexOf(e)-j.indexOf(t),F=new Set(j),U=e=>F.has(e),$=e=>e.sort(P).reduce(z,"").trim(),z=(e,t)=>`${e} ${t}(var(${V(t)}))`,q=e=>e.startsWith("--"),Q=new Set,W=(e,t)=>document.createElement("div").animate(e,t),Z={cssRegisterProperty:()=>"undefined"!=typeof CSS&&Object.hasOwnProperty.call(CSS,"registerProperty"),waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate"),partialKeyframes:()=>{try{W({opacity:[1]})}catch(e){return!1}return!0},finished:()=>Boolean(W({opacity:[0,1]},{duration:.001}).finished),linearEasing:()=>{try{W({opacity:0},{easing:"linear(0, 1)"})}catch(e){return!1}return!0}},Y={},G={};for(const e in Z)G[e]=()=>(void 0===Y[e]&&(Y[e]=Z[e]()),Y[e]);const J=(t,n)=>k(t)?G.linearEasing()?`linear(${((e,t)=>{let n="";const r=Math.round(t/.015);for(let t=0;t`cubic-bezier(${e}, ${t}, ${n}, ${r})`;function K(e){return O[e]&&(e=O[e]),U(e)?V(e):e}const ee=(e,t)=>{t=K(t);let n=q(t)?e.style.getPropertyValue(t):getComputedStyle(e)[t];if(!n&&0!==n){const e=R.get(t);e&&(n=e.initialValue)}return n},te=(e,t,n)=>{t=K(t),q(t)?e.style.setProperty(t,n):e.style[t]=n},ne=e=>"string"==typeof e;function re(e,t){var n;let r=(null==t?void 0:t.toDefaultUnit)||i;const o=e[e.length-1];if(ne(o)){const e=(null===(n=o.match(/(-?[\d.]+)([a-z%]*)/))||void 0===n?void 0:n[2])||"";e&&(r=t=>t+e)}return r}function oe(n,r,o,i={},l){const c=window.__MOTION_DEV_TOOLS_RECORD,u=!1!==i.record&&c;let d,{duration:p=e.duration,delay:g=e.delay,endDelay:v=e.endDelay,repeat:y=e.repeat,easing:C=e.easing,persist:b=!1,direction:w,offset:E,allowWebkitAcceleration:x=!1}=i;const L=I(n),M=U(r);let S=G.waapi();M&&((e,t)=>{O[t]&&(t=O[t]);const{transforms:n}=I(e);var r,o;o=t,-1===(r=n).indexOf(o)&&r.push(o),e.style.transform=$(n)})(n,r);const T=K(r),A=function(e,t){return e.has(t)||e.set(t,new _),e.get(t)}(L.values,T),N=R.get(T);return s(A.animation,!(h(C)&&A.generator)&&!1!==i.record),()=>{const e=()=>{var e,t;return null!==(t=null!==(e=ee(n,T))&&void 0!==e?e:null==N?void 0:N.initialValue)&&void 0!==t?t:0};let s=function(e,t){for(let n=0;nArray.isArray(e)?e:[e])(o),e);const L=re(s,N);if(h(C)){const t=C.createAnimation(s,"opacity"!==r,e,T,A);C=t.easing,s=t.keyframes||s,p=t.duration||p}if(q(T)&&(G.cssRegisterProperty()?function(e){if(!Q.has(e)){Q.add(e);try{const{syntax:t,initialValue:n}=R.has(e)?R.get(e):{};CSS.registerProperty({name:e,inherits:!1,syntax:t,initialValue:n})}catch(e){}}}(T):S=!1),M&&!G.linearEasing()&&(k(C)||m(C)&&C.some(k))&&(S=!1),S){N&&(s=s.map((e=>f(e)?N.toDefaultUnit(e):e))),1!==s.length||G.partialKeyframes()&&!u||s.unshift(e());const r={delay:t(g),duration:t(p),endDelay:t(v),easing:m(C)?void 0:J(C,p),direction:w,iterations:y+1,fill:"both"};d=n.animate({[T]:s,offset:E,easing:m(C)?C.map((e=>J(e,p))):void 0},r),d.finished||(d.finished=new Promise(((e,t)=>{d.onfinish=e,d.oncancel=t})));const o=s[s.length-1];d.finished.then((()=>{b||(te(n,T,o),d.cancel())})).catch(a),x||(d.playbackRate=1.000001)}else if(l&&M)s=s.map((e=>"string"==typeof e?parseFloat(e):e)),1===s.length&&s.unshift(parseFloat(e())),d=new l((e=>{te(n,T,L?L(e):e)}),s,Object.assign(Object.assign({},i),{duration:p,easing:C}));else{const e=s[s.length-1];te(n,T,N&&f(e)?N.toDefaultUnit(e):e)}return u&&c(n,r,s,{duration:p,delay:g,easing:C,repeat:y,offset:E},"motion-one"),A.setAnimation(d),d}}const ae=(e,t)=>e[t]?Object.assign(Object.assign({},e),e[t]):Object.assign({},e);function ie(e=.1,{start:t=0,from:n=0,easing:r}={}){return(o,a)=>{const i=f(n)?n:function(e,t){if("first"===e)return 0;{const n=t-1;return"last"===e?n:n/2}}(n,a),s=Math.abs(i-o);let l=e*s;if(r){const t=a*e;l=T(r)(l/t)*t}return t+l}}function se(e,t,n){return k(e)?e(t,n):e}const le=(ce=A,function(e,t,n={}){const r=(e=function(e,t){return"string"==typeof e?e=document.querySelectorAll(e):e instanceof Element&&(e=[e]),Array.from(e||[])}(e)).length;Boolean(r),Boolean(t);const o=[];for(let a=0;a{const n=new A(e,[0,1],t);return n.finished.catch((()=>{})),n}],t,t.duration)}function de(e,t,n){return(k(e)?ue:le)(e,t,n)}function he(e,t,n){const r=Math.max(t-5,0);return o=n-e(r),(a=t-r)?o*(1e3/a):0;var o,a}function fe(e){return f(e)&&!isNaN(e)}function me(e){return ne(e)?parseFloat(e):e}const pe=function(e){const t=new WeakMap;return(e={})=>{const n=new Map,r=(t=0,r=100,a=0,i=!1)=>{const s=`${t}-${r}-${a}-${i}`;return n.has(s)||n.set(s,(({stiffness:e=100,damping:t=10,mass:n=1,from:r=0,to:a=1,velocity:i=0,restSpeed:s,restDistance:l}={})=>{i=i?o(i):0;const c={done:!1,hasReachedTarget:!1,current:r,target:a},u=a-r,d=Math.sqrt(e/n)/1e3,h=((e=100,t=10,n=1)=>t/(2*Math.sqrt(e*n)))(e,t,n),f=Math.abs(u)<5;let m;if(s||(s=f?.01:2),l||(l=f?.005:.5),h<1){const e=d*Math.sqrt(1-h*h);m=t=>a-Math.exp(-h*d*t)*((h*d*u-i)/e*Math.sin(e*t)+u*Math.cos(e*t))}else m=e=>a-Math.exp(-d*e)*(u+(d*u-i)*e);return e=>{c.current=m(e);const t=0===e?i:he(m,e,c.current),n=Math.abs(t)<=s,o=Math.abs(a-c.current)<=l;var u,d,h;return c.done=n&&o,c.hasReachedTarget=(u=r,d=a,h=c.current,u=d||u>d&&h<=d),c}})(Object.assign({from:t,to:r,velocity:a},e))),n.get(s)},a=(e,n)=>(t.has(e)||t.set(e,function(e,t=i){let n,r=10,o=e(0);const a=[t(o.current)];for(;!o.done&&r<1e4;)o=e(r),a.push(t(o.done?o.target:o.current)),void 0===n&&o.hasReachedTarget&&(n=r),r+=10;const s=r-10;return 1===a.length&&a.push(o.current),{keyframes:a,duration:s/1e3,overshootDuration:(null!=n?n:s)/1e3}}(e,n)),t.get(e));return{createAnimation:(e,t=!0,n,o,s)=>{let l,c,u,d=0,h=i;const f=e.length;if(t)if(h=re(e,o?R.get(K(o)):void 0),u=me(e[f-1]),f>1&&null!==e[0])c=me(e[0]);else{const e=null==s?void 0:s.generator;if(e){const{animation:t,generatorStartTime:n}=s,r=(null==t?void 0:t.startTime)||n||0,o=(null==t?void 0:t.currentTime)||performance.now()-r,a=e(o).current;c=a,d=he((t=>e(t).current),o,a)}else n&&(c=me(n()))}if(fe(c)&&fe(u)){const e=r(c,u,d,null==o?void 0:o.includes("scale"));l=Object.assign(Object.assign({},a(e,h)),{easing:"linear"}),s&&(s.generator=e,s.generatorStartTime=performance.now())}return l||(l={easing:"ease",duration:a(r(0,100)).overshootDuration}),l}}}}();var ge=n(767);const ve=JSON.parse('{"YouTube":{"link":"https://www.youtube.com/","viewBox":"0 0 24 24","icon":"M10,15L15.19,12L10,9V15M21.56,7.17C21.69,7.64 21.78,8.27 21.84,9.07C21.91,9.87 21.94,10.56 21.94,11.16L22,12C22,14.19 21.84,15.8 21.56,16.83C21.31,17.73 20.73,18.31 19.83,18.56C19.36,18.69 18.5,18.78 17.18,18.84C15.88,18.91 14.69,18.94 13.59,18.94L12,19C7.81,19 5.2,18.84 4.17,18.56C3.27,18.31 2.69,17.73 2.44,16.83C2.31,16.36 2.22,15.73 2.16,14.93C2.09,14.13 2.06,13.44 2.06,12.84L2,12C2,9.81 2.16,8.2 2.44,7.17C2.69,6.27 3.27,5.69 4.17,5.44C4.64,5.31 5.5,5.22 6.82,5.16C8.12,5.09 9.31,5.06 10.41,5.06L12,5C16.19,5 18.8,5.16 19.83,5.44C20.73,5.69 21.31,6.27 21.56,7.17Z"},"Outlook":{"link":"https://outlook.office365.com/mail/inbox","viewBox":"0 0 24 24","icon":"M8.56 12.03Q8.56 12.41 8.5 12.76 8.39 13.1 8.2 13.38 8 13.65 7.71 13.81 7.41 13.97 7 13.97 6.58 13.97 6.29 13.8 6 13.63 5.81 13.35 5.62 13.07 5.54 12.72 5.45 12.37 5.45 12 5.45 11.64 5.54 11.28 5.62 10.93 5.81 10.65 6 10.37 6.31 10.2 6.61 10.03 7.03 10.03 7.46 10.03 7.75 10.2 8.05 10.38 8.23 10.66 8.41 10.95 8.5 11.3 8.56 11.66 8.56 12.03M22 12V19.81Q22 20.2 21.73 20.5 21.45 20.75 21.06 20.75H7.94Q7.55 20.75 7.27 20.5 7 20.2 7 19.81V17H2.83Q2.5 17 2.24 16.76 2 16.5 2 16.17V7.83Q2 7.5 2.24 7.24 2.5 7 2.83 7H8.25V4.13Q8.25 3.76 8.5 3.5 8.76 3.25 9.13 3.25H19.87Q20.24 3.25 20.5 3.5 20.75 3.76 20.75 4.13V11.04L21.79 11.64H21.8Q21.88 11.7 21.94 11.8 22 11.89 22 12M17 5.13V7.63H19.5V5.13M17 8.88V11.38H19.5V8.88M17 12.63V14.15L19.54 12.63M12.63 5.13V7.63H15.75V5.13M12.63 8.88V11.38H15.75V8.88M12.63 12.63V14.32L14.64 15.56L15.75 14.9V12.63M9.5 5.13V7H11.27Q11.33 7 11.38 7.04V5.12M7 15.32Q7.73 15.32 8.32 15.06 8.9 14.8 9.31 14.35 9.71 13.9 9.91 13.28 10.12 12.66 10.13 11.94 10.13 11.25 9.92 10.65 9.72 10.06 9.32 9.62 8.93 9.18 8.37 8.93 7.8 8.68 7.08 8.68 6.31 8.68 5.71 8.93 5.12 9.18 4.71 9.63 4.3 10.09 4.09 10.71 3.88 11.34 3.88 12.08 3.88 12.78 4.09 13.38 4.31 13.97 4.71 14.4 5.11 14.83 5.68 15.08 6.26 15.32 7 15.32M8.25 19.5H18.57L12 15.4V16.17Q12 16.5 11.76 16.76 11.5 17 11.17 17H8.25M20.75 19.39V13.36L15.83 16.31Z"},"Office":{"link":"http://office.com","viewBox":"0 0 24 24","icon":"M19.94 5.59V18.39Q19.94 19.06 19.55 19.59 19.16 20.11 18.5 20.29L12.77 21.94Q12.65 21.97 12.5 22H12.28Q11.95 22 11.68 21.91 11.41 21.82 11.13 21.67L7.38 19.55Q7.17 19.43 7.05 19.24 6.93 19.05 6.93 18.81 6.93 18.45 7.19 18.2 7.44 17.95 7.8 17.95H12.66V6.14L9 7.44Q8.57 7.6 8.3 8 8.03 8.38 8.03 8.85V15.58Q8.03 16 7.82 16.34 7.62 16.68 7.25 16.88L5.53 17.82Q5.29 17.95 5.05 17.95 4.64 17.95 4.35 17.66 4.06 17.37 4.06 16.95V7.47Q4.06 6.95 4.33 6.5 4.61 6 5.06 5.74L11.22 2.24Q11.43 2.12 11.67 2.06 11.91 2 12.15 2 12.32 2 12.46 2.03 12.6 2.05 12.77 2.1L18.5 3.69Q18.83 3.78 19.09 3.96 19.35 4.14 19.54 4.39 19.74 4.65 19.84 4.95 19.94 5.26 19.94 5.59M18.62 18.39V5.59Q18.62 5.36 18.5 5.19 18.35 5 18.13 4.96L15.31 4.18Q15 4.09 14.65 4 14.32 3.89 14 3.81V20.21L18.13 19Q18.35 18.96 18.5 18.79 18.62 18.62 18.62 18.39Z"},"Spotify":{"link":"https://accounts.spotify.com/en/login","viewBox":"0 0 24 24","icon":"M17.9,10.9C14.7,9 9.35,8.8 6.3,9.75C5.8,9.9 5.3,9.6 5.15,9.15C5,8.65 5.3,8.15 5.75,8C9.3,6.95 15.15,7.15 18.85,9.35C19.3,9.6 19.45,10.2 19.2,10.65C18.95,11 18.35,11.15 17.9,10.9M17.8,13.7C17.55,14.05 17.1,14.2 16.75,13.95C14.05,12.3 9.95,11.8 6.8,12.8C6.4,12.9 5.95,12.7 5.85,12.3C5.75,11.9 5.95,11.45 6.35,11.35C10,10.25 14.5,10.8 17.6,12.7C17.9,12.85 18.05,13.35 17.8,13.7M16.6,16.45C16.4,16.75 16.05,16.85 15.75,16.65C13.4,15.2 10.45,14.9 6.95,15.7C6.6,15.8 6.3,15.55 6.2,15.25C6.1,14.9 6.35,14.6 6.65,14.5C10.45,13.65 13.75,14 16.35,15.6C16.7,15.75 16.75,16.15 16.6,16.45M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z"},"Google":{"link":"https://google.com","viewBox":"0 0 24 24","icon":"M12,20L15.46,14H15.45C15.79,13.4 16,12.73 16,12C16,10.8 15.46,9.73 14.62,9H19.41C19.79,9.93 20,10.94 20,12A8,8 0 0,1 12,20M4,12C4,10.54 4.39,9.18 5.07,8L8.54,14H8.55C9.24,15.19 10.5,16 12,16C12.45,16 12.88,15.91 13.29,15.77L10.89,19.91C7,19.37 4,16.04 4,12M15,12A3,3 0 0,1 12,15A3,3 0 0,1 9,12A3,3 0 0,1 12,9A3,3 0 0,1 15,12M12,4C14.96,4 17.54,5.61 18.92,8H12C10.06,8 8.45,9.38 8.08,11.21L5.7,7.08C7.16,5.21 9.44,4 12,4M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z"},"DuckDuckGo":{"link":"https://duckduckgo.com/","viewBox":"0 0 32 32","icon":"M16 0c-8.839 0-16 7.161-16 16s7.161 16 16 16c8.839 0 16-7.161 16-16s-7.161-16-16-16zM16 30.667c-8.099 0-14.667-6.568-14.667-14.667s6.568-14.667 14.667-14.667c8.099 0 14.667 6.568 14.667 14.667s-6.568 14.667-14.667 14.667zM29.625 16c0 6.406-4.422 11.776-10.38 13.234-0.359-0.698-0.708-1.359-1-1.917 0.859 0.328 2.573 0.953 2.943 0.818 0.505-0.193 0.38-4.198-0.182-4.328-0.453-0.099-2.177 1.12-2.859 1.615l0.047 0.208c0.104 0.526 0.193 1.323 0.042 1.661 0 0.005-0.005 0.016-0.005 0.016-0.021 0.047-0.052 0.089-0.094 0.12-0.375 0.25-1.438 0.38-2 0.25-0.031-0.005-0.057-0.016-0.089-0.026-0.922 0.526-2.677 1.479-3 1.297-0.438-0.255-0.5-3.573-0.438-4.385 0.047-0.615 2.203 0.38 3.255 0.906 0.234-0.219 0.802-0.365 1.307-0.417-0.76-1.849-1.318-3.969-0.979-5.474 0 0.005 0.005 0.005 0.005 0.005 0.474 0.328 3.641 1.401 5.214 1.37s4.151-0.99 3.87-1.766c-0.281-0.771-2.849 0.682-5.521 0.432-1.984-0.182-2.333-1.073-1.896-1.719 0.552-0.818 1.557 0.151 3.214-0.344 1.661-0.495 3.984-1.38 4.844-1.859 1.995-1.115-0.833-1.573-1.5-1.266-0.63 0.297-2.828 0.849-3.849 1.094 0.568-2.021-0.807-5.531-2.344-7.068-0.5-0.5-1.271-0.813-2.141-0.979-0.333-0.458-0.87-0.896-1.63-1.302-1.474-0.771-3.156-1.047-4.797-0.781l-0.031 0.005-0.042 0.005 0.005 0.005c-0.198 0.036-0.318 0.104-0.479 0.13 0.198 0.021 0.943 0.37 1.411 0.557-0.234 0.089-0.552 0.146-0.797 0.245-0.094 0.016-0.182 0.036-0.271 0.073-0.229 0.109-0.406 0.5-0.401 0.688 1.12-0.115 2.776-0.031 3.99 0.328-0.859 0.12-1.646 0.344-2.214 0.646-0.021 0.010-0.042 0.021-0.068 0.036-0.068 0.026-0.141 0.057-0.198 0.089-1.823 0.958-2.63 3.203-2.151 5.896 0.432 2.432 2.219 10.786 3.052 14.755-5.297-1.87-9.094-6.917-9.094-12.854 0-7.526 6.099-13.625 13.625-13.625s13.625 6.099 13.625 13.625zM12.125 12.776c-0.557 0-1.010 0.453-1.010 1.010s0.453 1.010 1.010 1.010c1.349 0 1.349-2.021 0-2.021zM12.578 13.708c-0.146 0-0.26-0.115-0.26-0.26 0-0.141 0.115-0.26 0.26-0.26 0.349 0 0.349 0.521 0 0.521zM18.875 12.318c-0.49-0.016-0.901 0.375-0.901 0.87 0 0.49 0.411 0.885 0.901 0.865 1.156 0 1.156-1.734 0-1.734zM19.26 13.12c-0.12 0-0.224-0.099-0.224-0.224 0-0.12 0.104-0.224 0.224-0.224 0.302 0 0.302 0.448 0 0.448zM12.417 10.859c0 0-0.76-0.344-1.5 0.12-0.74 0.469-0.714 0.943-0.714 0.943s-0.391-0.875 0.656-1.307c1.047-0.427 1.557 0.245 1.557 0.245zM19.401 10.792c0 0-0.547-0.313-0.974-0.307-0.875 0.010-1.109 0.396-1.109 0.396s0.146-0.917 1.26-0.734c0.365 0.068 0.672 0.307 0.823 0.646z"},"CoolMathGames":{"link":"https://coolmathgames.com/","viewBox":"0 0 24 24","icon":"M16.5,9L13.5,12L16.5,15H22V9M9,16.5V22H15V16.5L12,13.5M7.5,9H2V15H7.5L10.5,12M15,7.5V2H9V7.5L12,10.5L15,7.5Z"},"SACE":{"link":"https://apps.sace.sa.edu.au/students-online/login.do","viewBox":"0 0 125.2 125","icon":"M103,40.1H84.8v-18C84.8,9.9,74.8,0,62.6,0C50.4,0,40.3,9.9,40.3,22.1c0,12.2,10,22.1,22.2,22.1h18.1v36H44.5v-18c0-12.2-10-22.1-22.2-22.1S0,50,0,62.2s10,22.1,22.2,22.1h18.1v18c0,12.2,10,22.1,22.2,22.1s22.2-9.9,22.2-22.1v-18h18.1c12.4,0,22.4-9.9,22.4-22.1S115.2,40.1,103,40.1z M40.3,80.2H22.2c-10,0-18.1-8.1-18.1-18s8.1-18,18.1-18s18.1,8.1,18.1,18V80.2zM80.7,102.3c0,9.9-8.1,18-18.1,18s-18.1-8.1-18.1-18v-18h36.2V102.3z M80.7,40.1H62.6c-10,0-18.1-8.1-18.1-18c0-9.9,8.1-18,18.1-18s18.1,8.1,18.1,18V40.1z M102.9,80.2H84.8v-36h18.1c10,0,18.1,8.1,18.1,18S112.9,80.2,102.9,80.2z"},"GoogleScholar":{"link":"https://scholar.google.com","viewBox":"0 0 24 24","icon":"M21.35,11.1H12.18V13.83H18.69C18.36,17.64 15.19,19.27 12.19,19.27C8.36,19.27 5,16.25 5,12C5,7.9 8.2,4.73 12.2,4.73C15.29,4.73 17.1,6.7 17.1,6.7L19,4.72C19,4.72 16.56,2 12.1,2C6.42,2 2.03,6.8 2.03,12C2.03,17.05 6.16,22 12.25,22C17.6,22 21.5,18.33 21.5,12.91C21.5,11.76 21.35,11.1 21.35,11.1V11.1Z"},"Gmail":{"link":"https://mail.google.com","viewBox":"0 0 24 24","icon":"M20,18H18V9.25L12,13L6,9.25V18H4V6H5.2L12,10.25L18.8,6H20M20,4H4C2.89,4 2,4.89 2,6V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V6C22,4.89 21.1,4 20,4Z"},"Netflix":{"link":"https://netflix.com","viewBox":"0 0 24 24","icon":"M6.5,2H10.5L13.44,10.83L13.5,2H17.5V22C16.25,21.78 14.87,21.64 13.41,21.58L10.5,13L10.43,21.59C9.03,21.65 7.7,21.79 6.5,22V2Z"},"EducationPerfect":{"link":"https://app.educationperfect.com/","viewBox":"4.425358206338695 10.109853742009532 167.75614842212613 167.76529918293508","icon":"M 41.218842,159.903778 C 32.220757000000006,154.49694799999997 28.320898,146.39567599999998 27.144720000000003,136.691025 C 24.344646000000004,113.587677 21.58695,90.479164 18.767124000000003,67.378227 C 16.473593,48.588874999999994 27.314493000000002,35.167511 46.150131,33.008185999999995 C 69.436394,30.338643999999995 92.70422400000001,27.486617999999993 115.943047,24.432179999999995 C 132.274689,22.285605999999994 146.786301,32.505539 148.981033,48.8368 C 152.235703,73.05532099999999 155.27562,97.309608 157.905701,121.602943 C 159.93542499999998,140.350937 148.836945,152.964386 130.02818299999998,155.067184 C 107.06863399999999,157.634018 84.15766899999998,160.637604 61.23078899999999,163.49321 C 54.302176999999986,164.35621600000002 47.67153899999999,163.743561 41.21884199999999,159.90377800000002 M 90.16155199999999,104.49991600000001 C 90.16451299999999,111.81823700000001 90.16574099999998,119.136559 90.17105099999999,126.45488000000002 C 90.17446899999999,131.15861500000003 93.67040999999999,130.323944 96.55354299999999,130.48759500000003 C 99.573128,130.65899700000003 101.204872,129.66064500000002 101.05652599999999,126.23024700000002 C 100.843948,121.31488000000002 101.00233499999999,116.38347600000002 101.00233499999999,110.84864000000002 C 102.03786499999998,111.51373300000002 102.54609699999999,111.83288600000002 103.04710399999999,112.16302500000002 C 112.86791199999999,118.63465100000002 124.983047,115.43300600000002 129.53965799999997,104.62981400000002 C 131.216278,100.65472400000003 131.70472699999996,95.99940500000002 131.89942899999997,91.61723300000003 C 132.25656099999998,83.57922400000002 129.14271499999998,76.85495800000002 121.90178699999997,72.91539800000002 C 114.83421299999998,69.07015200000002 107.87258899999998,70.25764500000002 101.40912599999997,75.00357800000002 C 100.15898099999997,69.73184200000001 95.94058999999997,71.49647500000002 92.94792199999998,71.84281900000002 C 91.83303799999997,71.97184800000002 90.34555799999998,75.20201900000002 90.28659099999997,77.05806700000002 C 90.00683599999998,85.86446400000003 90.16157499999997,94.68465400000002 90.16155199999997,104.49991600000003 M 47.135135999999974,102.84149200000003 C 47.50462699999997,103.58536500000002 47.86649299999998,104.33315300000002 48.24474299999997,105.07254000000003 C 55.63482299999997,119.51831800000004 75.42236299999998,117.51798200000003 83.29843899999997,107.84790800000003 C 84.09340699999997,106.87186400000003 84.45175199999997,105.03819300000004 84.12631199999997,103.84413100000003 C 83.93784299999997,103.15265700000003 81.92327899999997,102.47944600000004 80.82456999999997,102.60716200000003 C 77.76956899999996,102.96225700000004 74.59602399999997,103.31630700000004 71.77092699999997,104.43350200000003 C 64.22663099999997,107.41690800000003 57.34320099999997,104.57150300000004 57.25969299999997,97.83805100000004 C 65.24485799999997,97.83805100000004 73.23475599999998,97.99984700000003 81.20797699999997,97.70718400000004 C 82.88577299999997,97.64559900000005 85.63535299999997,96.20201100000004 85.96279899999998,94.90748600000003 C 88.05384099999998,86.64054900000004 82.07756799999997,75.75166300000004 74.07153299999997,72.37247500000004 C 64.91693899999997,68.50850700000004 54.85903499999998,71.43896500000004 49.47143599999997,79.54177900000003 C 44.77263999999997,86.60865000000004 45.10080699999997,94.24294300000004 47.13513599999997,102.84149200000003 L 47.135135999999974,102.84149200000003 M 47.035309,102.444016 C 45.100806999999996,94.24294300000001 44.772639999999996,86.60865000000001 49.471436,79.541779 C 54.859035,71.43896500000001 64.916939,68.50850700000001 74.071533,72.37247500000001 C 82.077568,75.75166300000001 88.053841,86.64054900000001 85.962799,94.907486 C 85.63535300000001,96.202011 82.885773,97.645599 81.207977,97.70718400000001 C 73.234756,97.99984700000002 65.244858,97.83805100000001 57.259693,97.83805100000001 C 57.343201,104.571503 64.226631,107.416908 71.770927,104.433502 C 74.596024,103.31630700000001 77.769569,102.96225700000001 80.82457,102.607162 C 81.923279,102.479446 83.937843,103.152657 84.126312,103.844131 C 84.451752,105.038193 84.093407,106.871864 83.298439,107.847908 C 75.422363,117.517982 55.634823,119.51831800000001 48.244743,105.07254 C 47.866493,104.33315300000001 47.504627,103.58536500000001 47.035309,102.444016 M 68.89061,81.05638900000001 C 60.57823199999999,80.556335 57.77417799999999,82.19622000000001 57.24161899999999,88.020081 L 74.64141099999999,88.020081 C 74.94538899999999,87.678658 75.24935899999998,87.337227 75.55333699999998,86.995804 C 73.60168499999999,85.07057200000001 71.65003199999998,83.14534800000001 68.89060999999998,81.05638900000001 L 68.89061,81.05638900000001"}}'),ye=JSON.parse('{"welcome":"\\n \\n ","assessments":"\\n \\n","courses":"\\n \\n","dashboard":"\\n \\n","messages":"\\n \\n","notices":"\\n \\n","portals":"\\n \\n","reports":"\\n \\n","settings":"\\n \\n","timetable":"\\n \\n"}');var Ce=n(856);function be(e,t=!1){var n=new DOMParser;e=Ce.sanitize(e,{ADD_ATTR:["onclick"]});var r=n.parseFromString(e,"text/html");return t&&(r.body.style.cssText="height: auto; overflow: scroll; margin: 0px; background: var(--background-primary);"),r.body}const we='\n \n \n \n \n ',Ee=String.raw` `,xe=String.raw` `;function ke(e,t=.5,n=10){let r;r=void 0===e.bksliderinput?150-e:150-e.bksliderinput;const o=n-t;["bg","bg2","bg3"].forEach(((e,n)=>{const a=document.getElementsByClassName(e);if(0===a.length)return;const i=((e,n=0)=>t+(e/200+n)*o)(r,.05*n);a[0].style.animationDuration=`${i}s`}))}function Le(e,t=.75,n=.55){if(e.includes("gradient"))return Le(function(e){try{const t=/#[0-9a-fA-F]{6}|rgb\(\s*\d+\s*,\s*\d+\s*,\s*\d+\s*\)|rgba\(\s*\d+\s*,\s*\d+\s*,\s*\d+\s*,\s*[\d.]+\s*\)/gi,n=e.match(t);if(!n)throw new Error("No valid color stops found in the provided CSS gradient.");return function(e){let t=0,n=0,r=0;return e.forEach((e=>{t+=e.red(),n+=e.green(),r+=e.blue()})),ge.rgb(t/e.length,n/e.length,r/e.length)}(n.map((e=>e.toLowerCase().replace(/\s+/g,""))).map((e=>ge(e)))).hex()}catch(e){return console.error(`Error: ${e.message}`),null}}(e),t,n);const r=ge(e).hsl().object(),o=r.s*(1-n),a=r.l+(100-r.l)*t;return ge.hsl(r.h,o,a).rgb().string()}function Me(e,t){let n=ge(e.toLowerCase());const r=n.rgb().object();return n=ge.rgb(Math.min(Math.max(0,r.r+r.r*t),255),Math.min(Math.max(0,r.g+r.g*t),255),Math.min(Math.max(0,r.b+r.b*t),255)),n.string()}function Se(e,t=0){const n=/rgba?\(([^)]+)\)/gi;if(e.toLowerCase().includes("gradient")){let r,o=e,a=new Set;for(;null!==(r=n.exec(e));)a.add(r[0]);for(let e of a){const n=Me(e,t);o=o.replace(new RegExp(e,"gi"),n)}return o}return Me(e,t)}const Te=e=>chrome.runtime.getURL(e),Ae=e=>Object.entries(e).forEach((([e,t])=>((e,t)=>document.documentElement.style.setProperty(e,t))(e,t)));let _e=null;function Ne(e,t=null){const n=t||e.selectedColor;e.transparencyEffects&&document.documentElement.classList.add("transparencyEffects"),_e="boolean"==typeof e?.DarkMode?e.DarkMode:_e,"boolean"==typeof e&&(_e=e);const r={"--better-sub":"#161616","--better-alert-highlight":"#c61851","--better-main":n};let o={};null!==_e&&(o=_e?{"--betterseqta-logo":`url(${Te("icons/betterseqta-light-full.png")})`}:{"--better-pale":Le(n),"--betterseqta-logo":`url(${Te("icons/betterseqta-dark-full.png")})`},_e?(document.documentElement.style.removeProperty("--better-pale"),document.documentElement.classList.add("dark")):document.documentElement.classList.remove("dark"));const a={"--text-color":kt(n)>210?"black":"white","--better-light":"#ffffff"===n?"#b7b7b7":Se(n,.95)};Ae({...r,...o,...a}),null!==_e&&(document.querySelector("link[rel*='icon']").href=Te("icons/icon-48.png"));let i=document.getElementsByTagName("iframe"),s=nt();for(let e=0;e{const{css:t,className:n,images:r,darkMode:o,defaultColour:a}=await Ie.getItem(`css_${e}`),i=document.createElement("style");i.innerHTML=t,document.head.appendChild(i),window.currentThemeStyle&&document.head.removeChild(window.currentThemeStyle),window.currentThemeStyle=i,window.currentThemeClass&&document.body.classList.remove(window.currentThemeClass),n&&(document.body.classList.add(n),window.currentThemeClass=n),r&&await Promise.all(Object.keys(r).map((async t=>{const n=await Ie.getItem(`images_${e}_${t}`),r=URL.createObjectURL(n);document.documentElement.style.setProperty(t,`url(${r})`)}))),chrome.storage.local.set({DarkMode:o,selectedColor:a})},Be=async(e,t)=>{const n=await(async e=>{const{css:t,images:n,className:r,darkMode:o,defaultColour:a}=await(async e=>{const t=await fetch(e,{cache:"no-store"});return await t.json()})(e);return{css:await(async e=>{const t=await fetch(e);return await t.text()})(t),images:n,className:r,darkMode:o,defaultColour:a}})(t);await(async(e,t)=>{await Ie.setItem(`css_${t}`,e),await Promise.all(Object.entries(e.images).map((([e,n])=>(async(e,t,n)=>{try{const r=await fetch(n);if(!r.ok)throw new Error(r.statusText);const o=await r.blob();await Ie.setItem(`images_${e}_${t}`,o)}catch(e){console.error(`Failed to save image for ${t}: ${e}`)}})(t,e,n))))})(n,e),await He(e,t)},He=async(e,t)=>{await(async e=>null!==await Ie.getItem(`css_${e}`))(e)||await Be(e,t),await Ie.setItem("selectedTheme",e),await Oe(e).catch((e=>{console.error(`Failed to apply theme: ${e}`)}))},Re=async()=>{window.currentThemeStyle&&(document.head.removeChild(window.currentThemeStyle),window.currentThemeStyle=null),De&&(document.body.classList.remove(De),De="");const e=await Ie.getItem("selectedTheme");if(e){const t=await Ie.getItem(`css_${e}`);t&&t.images&&Object.keys(t.images).forEach((e=>{document.documentElement.style.removeProperty(e)}))}Ie.removeItem("selectedTheme")};let Ve,je,Pe=window.chrome,Fe=!1,Ue=!1,$e="",ze=new Date;var qe=!1,Qe=!1,We=!1;function Ze(e){return new Promise((t=>setTimeout(t,e)))}function Ye(e){e.animatedbk?Xe():(Ke(),document.getElementById("container").style.background="var(--background-secondary)")}async function Ge(){try{var e=document.getElementById("loading");e.style.opacity="0",await Ze(501),e.remove()}catch(e){console.log(e)}chrome.storage.local.get(["justupdated"],(function(e){e.justupdated&&function(){const e=document.createElement("div");e.id="whatsnewbk",e.classList.add("whatsnewBackground");const t=document.createElement("div");t.classList.add("whatsnewContainer");var n=be(`
\n

What's New

\n

BetterSEQTA+ V${chrome.runtime.getManifest().version}

\n
`).firstChild;let r=document.createElement("div");r.classList.add("whatsnewImgContainer");let o=document.createElement("video"),a=document.createElement("source");a.setAttribute("src",chrome.runtime.getURL("resources/update-video.mp4")),a.setAttribute("type","video/mp4"),o.autoplay=!0,o.muted=!0,o.loop=!0,o.appendChild(a),o.classList.add("whatsnewImg"),r.appendChild(o);let i=document.createElement("div");i.classList.add("whatsnewTextContainer");let s=be('

DESIGN OVERHAUL

').firstChild;i.append(s);let l=be(String.raw`

3.2.0 - Custom Themes

  • Added transparency (blur) effects
  • Added custom themes
  • Added colour picker history
  • Heaps of bug fixes
  • 3.1.3 - Custom Backgrounds

  • Added custom backgrounds with support for images and videos
  • Overhauled topbar
  • New animated hamburger icon
  • Minor bug fixes
  • 3.1.2 - New settings menu!

  • Overhauled the settings menu
  • Added custom gradients
  • Added HEAPS of animations
  • Fixed a bug where shortcuts don't show up
  • Other minor bugs fixed
  • 3.1.1 - Minor Bug fixes

  • Fixed assessments overlapping
  • Fixed houses not displaying if they aren't a specific color
  • Fixed Chrome Webstore Link
  • 3.1.0 - Design Improvements

  • Minor UI improvements
  • Added Animation Speed Slider
  • Animation now enables and disables without reloading SEQTA
  • Changed logo
  • 3.0.0 - BetterSEQTA+ *Complete Overhaul*

  • Redesigned appearance
  • Upgraded to manifest V3 (longer support)
  • Fixed transitional glitches
  • Under the hood improvements
  • Fixed News Feed
  • 2.0.7 - Added support to other domains + Minor bug fixes

  • Fixed BetterSEQTA+ not loading on some pages
  • Fixed text colour of notices being unreadable
  • Fixed pages not reloading when saving changes
  • 2.0.2 - Minor bug fixes

  • Fixed indicator for current lesson
  • Fixed text colour for DM messages list in Light mode
  • Fixed user info text colour
  • Sleek New Layout

  • Updated with a new font and presentation, BetterSEQTA+ has never looked better.
  • New Updated Sidebar

  • Condensed appearance with new updated icons.
  • Independent Light Mode and Dark Mode

  • Dark mode and Light mode are now available to pick alongside your chosen Theme Colour. Your Theme Colour will now become an accent colour for the page. Light/Dark mode can be toggled with the new button, found in the top-right of the menu bar.
  • Create Custom Shortcuts

  • Found in the BetterSEQTA+ Settings menu, custom shortcuts can now be created with a name and URL of your choice.
  • `).firstChild,c=be(String.raw`
    Report bugs and feedback:
    `).firstChild,u=document.createElement("div");u.id="whatsnewclosebutton",t.append(n),t.append(r),t.append(i),t.append(l),t.append(c),t.append(u),e.append(t),document.getElementById("container").append(e);let d=document.getElementById("whatsnewbk");de([document.getElementsByClassName("whatsnewContainer")[0],d],{scale:[0,1],opacity:[0,1]},{easing:pe({stiffness:220,damping:18})}),de(".whatsnewTextContainer *",{opacity:[0,1],y:[10,0]},{delay:ie(.05,{start:.1}),duration:.5,easing:[.22,.03,.26,1]}),chrome.storage.local.remove(["justupdated"]),d.addEventListener("click",(function(e){e.target===d&&Je()})),document.getElementById("whatsnewclosebutton").addEventListener("click",(function(){Je()}))}()}))}async function Je(){const e=document.getElementById("whatsnewbk");de([document.getElementsByClassName("whatsnewContainer")[0],e],{opacity:[1,0],scale:[1,0]},{easing:[.22,.03,.26,1]}).finished.then((()=>{e.remove()}))}function Xe(){var e=document.getElementById("container"),t=document.getElementById("menu"),n=document.createElement("div");n.classList.add("bg"),e.insertBefore(n,t);var r=document.createElement("div");r.classList.add("bg"),r.classList.add("bg2"),e.insertBefore(r,t);var o=document.createElement("div");o.classList.add("bg"),o.classList.add("bg3"),e.insertBefore(o,t)}function Ke(){var e=document.getElementsByClassName("bg"),t=document.getElementsByClassName("bg2"),n=document.getElementsByClassName("bg3");0!=e.length&&0!=t.length&&0!=n.length&&(e[0].remove(),t[0].remove(),n[0].remove())}function et(e){return new Promise((t=>{if(document.querySelector(e))return t(document.querySelector(e));const n=new MutationObserver((()=>{document.querySelector(e)&&(t(document.querySelector(e)),n.disconnect())}));n.observe(document.body,{childList:!0,subtree:!0})}))}async function tt(e){void 0===e.contentDocument.documentElement.childNodes[1]?(await Ze(1e3),tt(e)):e.contentDocument.documentElement.childNodes[1].style.color="white"}function nt(){var e=chrome.runtime.getURL("css/iframe.css"),t=document.createElement("link");return t.setAttribute("rel","stylesheet"),t.setAttribute("type","text/css"),t.setAttribute("href",e),t}function rt(){let e=nt();new MutationObserver((function(t){t.forEach((function(t){t.addedNodes.forEach((function(t){"IFRAME"==t.tagName&&chrome.storage.local.get(["DarkMode"],(function(n){je=n.DarkMode,je&&(tt(t),"white"!=t.contentDocument.documentElement.childNodes[1].style.color&&(t.contentDocument.documentElement.childNodes[1].style.color="white"),t.contentDocument.documentElement.firstChild.innerHTML.includes("iframe.css")||t.contentDocument.documentElement.firstChild.appendChild(e),t.addEventListener("load",(function(){"white"!=t.contentDocument.documentElement.childNodes[1].style.color&&(t.contentDocument.documentElement.childNodes[1].style.color="white"),t.contentDocument.documentElement.firstChild.innerHTML.includes("iframe.css")||t.contentDocument.documentElement.firstChild.appendChild(e)})))}))}))}))})).observe(document.body,{subtree:!0,childList:!0})}async function ot(){switch(await bt(!0),window.location.href.split("/")[4]){case"news":console.log("[BetterSEQTA+] Started Init"),chrome.storage.local.get(null,(function(e){e.onoff&&(zt(),chrome.storage.local.get(null,(function(e){e.notificationcollector&&Ft()})),Ge())}));break;case"home":case void 0:window.location.replace(`${location.origin}/#?page=/home`),console.log("[BetterSEQTA] Started Init"),chrome.storage.local.get(null,(function(e){e.onoff&&jt()}));break;default:Ge(),chrome.storage.local.get(null,(function(e){e.notificationcollector&&Ft()}))}new MutationObserver((function(e){e.forEach((function(e){e.addedNodes.forEach((function(e){if(e.classList.contains("messages"))document.getElementById("title").firstChild.innerText="Direct Messages",document.title="Direct Messages ― SEQTA Learn",function(e){let t=document.createElement("div");t.classList.add("messages-filterbutton"),t.innerText="Filter",document.getElementsByClassName("MessageList__MessageList___3DxoC")[0].firstChild.append(t),new MutationObserver((function(e){e.forEach((function(e){e.addedNodes.forEach((function(e){e.dataset.message}))}))})).observe(e,{subtree:!0,childList:!0})}(e),et("[data-message]").then((()=>{de("[data-message]",{opacity:[0,1],y:[10,0]},{delay:ie(.05),duration:.5,easing:[.22,.03,.26,1]})}));else if(e.classList.contains("notices"))!function(e){const t=new MutationObserver((function(e){e.forEach((function(e){e.addedNodes.forEach((function(e){chrome.storage.local.get(["DarkMode"],(function(t){if(je=t.DarkMode,e.classList.contains("notice")){var n=kt(e.style.cssText.split(" ")[1]);je&&n<100&&(e.style.cssText="--color: undefined;")}}))}))}))}));t.observe(e,{subtree:!0,childList:!0})}(e);else if(e.classList.contains("dashboard")){let e=!1;et(".dashlet").then((()=>{e||(e=!0,de(".dashboard *:not(.dashlet-timetable), .dashboard .message *",{opacity:[0,1],y:[10,0]},{delay:ie(.01),duration:.5,easing:[.22,.03,.26,1]}))}))}else if(e.classList.contains("documents")){let e=!1;et(".document").then((()=>{e||(e=!0,de(".documents tbody tr.document",{opacity:[0,1],y:[10,0]},{delay:ie(.05),duration:.5,easing:[.22,.03,.26,1]}))}))}else if(e.classList.contains("reports")){let e=!1;et(".report").then((()=>{e||(e=!0,de(".reports .item",{opacity:[0,1],y:[10,0]},{delay:ie(.05,{start:.2}),duration:.5,easing:[.22,.03,.26,1]}))}))}}))}))})).observe(document.querySelector("#main"),{subtree:!1,childList:!0})}function at(){et(".login").then((()=>{Ge()})),et(".day-container").then((()=>{Ge()})),et("[data-key=welcome]").then((e=>{e.classList.remove("active")})),et(".code").then((e=>{e.innerText.includes("BetterSEQTA")||ot()})),document.addEventListener("load",(function(){rt()}),!0)}function it(e){let t=e;var n=document.querySelector("#menu").firstChild.childNodes;let r=[];for(let e=0;e{const e=await Ie.getItem("selectedTheme");e&&await Oe(e).catch((e=>{console.error(`Failed to apply current theme: ${e}`)}))})(),chrome.storage.local.get(null,(function(e){!function(e){const t=e.onoff;je=e.DarkMode,void 0===t&&chrome.runtime.sendMessage({type:"setDefaultStorage"});const n=()=>{et(".code").then(st)};var r,o,a;t?(console.log("[BetterSEQTA+] Enabled"),r=chrome.runtime.getURL("css/injected.css"),(o=document.createElement("link")).setAttribute("rel","stylesheet"),o.setAttribute("type","text/css"),o.setAttribute("href",r),document.head.appendChild(o),document.getElementsByTagName("html")[0].appendChild(o),function(){const e=chrome.runtime.getURL("fonts/IconFamily.woff"),t=document.createElement("style");t.setAttribute("type","text/css"),t.innerHTML=`\n @font-face {\n font-family: 'IconFamily';\n src: url('${e}') format('woff');\n font-weight: normal;\n font-style: normal;\n }`,document.head.appendChild(t)}(),Ne(e),a="",chrome.storage.local.get(null,(function(e){for(let t=0;t ${we}
    v${chrome.runtime.getManifest().version}
    `);document.getElementsByTagName("html")[0].append(e.firstChild)}(),ut(),Pe&&"undefined"!==Pe||at(),window.addEventListener("load",at)):(Pe&&"undefined"!==Pe||n(),window.addEventListener("load",n))}(e)}))}document.childNodes[1].textContent?.includes("SEQTA")||Qe||(Qe=!0)}),!0),new class{constructor(){this.darkMode=new Promise(((e,t)=>{chrome.storage.local.get("DarkMode",(n=>{if(chrome.runtime.lastError)return t(chrome.runtime.lastError);e(n.DarkMode)}))})),chrome.storage.onChanged.addListener(this.handleStorageChanges.bind(this))}handleStorageChanges(e){Object.keys(e).forEach((t=>{switch(t){case"selectedColor":this.handleSelectedColorChange(e.selectedColor.newValue);break;case"shortcuts":this.handleShortcutsChange(e.shortcuts.oldValue,e.shortcuts.newValue);break;case"DarkMode":this.darkMode=e.DarkMode.newValue,console.log(this.darkMode);break;case"customshortcuts":e.customshortcuts.newValue&&this.handleCustomShortcutsChange(e.customshortcuts.oldValue,e.customshortcuts.newValue);break;case"notificationcollector":this.handleNotificationCollectorChange(e.notificationcollector);break;case"bksliderinput":ke(e.bksliderinput.newValue);break;case"animatedbk":e.animatedbk.newValue?Xe():(Ke(),document.getElementById("container").style.background="var(--background-secondary)");break;case"transparencyEffects":e.transparencyEffects.newValue?document.documentElement.classList.add("transparencyEffects"):document.documentElement.classList.remove("transparencyEffects")}}))}handleSelectedColorChange(e){try{Ne(this.darkMode,e)}catch(e){console.error(e)}}handleNotificationCollectorChange(e){e.newValue?Ft():Ut()}handleCustomShortcutsChange(e,t){if(t.length>e.length)Rt(t[e.length]);else if(t.length!t.some((t=>JSON.stringify(e)===JSON.stringify(t)))));n&&Vt(n)}}handleShortcutsChange(e,t){const n=t.filter((t=>e.some((e=>{const n=e.name===t.name,r=!e.enabled,o=t.enabled;return n&&r&&o})))),r=t.filter((t=>e.some((e=>{const n=e.name===t.name,r=e.enabled,o=!t.enabled;return n&&r&&o}))));Pt(n),Vt(r)}},new class{constructor(){chrome.runtime.onMessage.addListener(this.routeMessage.bind(this))}routeMessage(e,t,n){switch(e.info){case"EditSidebar":this.editSidebar();break;case"SetTheme":return console.log(e),He(e.body.themeName,e.body.themeURL).then((()=>{n({status:"success"})})),!0;case"DownloadTheme":return Be(e.body.themeName,e.body.themeURL).then((()=>{n({status:"success"})})),!0;case"ListThemes":return(async()=>({themes:(await Ie.keys()).filter((e=>e.startsWith("css_"))).map((e=>e.replace("css_",""))),selectedTheme:await Ie.getItem("selectedTheme")}))().then((e=>{n(e)})),!0;case"DisableTheme":return Re().then((()=>{n({status:"success"})})),!0;case"DeleteTheme":return(async e=>{await Ie.getItem("selectedTheme")===e&&await Re(),await Ie.removeItem(`css_${e}`),await Promise.all((await Ie.keys()).filter((t=>t.startsWith(`images_${e}`))).map((e=>Ie.removeItem(e))))})(e.body.themeName).then((()=>{n({status:"success"})})),!0;default:console.log("Unknown request info:",e.info)}}editSidebar(){Ue||(Ct(),dt())}};var lt,ct=!1;async function ut(){if(!ct){await Ze(1e3);var e=document.getElementsByClassName("code")[0];e&&!$e&&(ot(),Ge(),ct=!0),e||ut()}}function dt(){var e=document.getElementById("ExtensionPopup");1==Fe&&(e.classList.add("hide"),de("#ExtensionPopup",{opacity:[1,0],scale:[1,0]},{easing:pe({stiffness:220,damping:18})}),Fe=!1),e.classList.add("hide")}function ht(e){this.style.opacity="0.4",lt=this,e.dataTransfer.effectAllowed="move",e.dataTransfer.setData("text/html",this.innerHTML)}function ft(){this.classList.add("over")}function mt(e){e.stopPropagation(),this.classList.remove("over")}function pt(e){return e.preventDefault(),e.dataTransfer.dropEffect="move",!1}function gt(){if(lt!=this){const e=this.parentNode,t=this.nextSibling===lt?this:this.nextSibling;lt.parentNode.insertBefore(this,lt),e.insertBefore(lt,t);let n=e.childNodes,r=[];for(let e=0;e{e.setAttribute(t.nodeName,t.nodeValue)}))}function Ct(){chrome.storage.local.get(null,(function(e){var t=document.getElementById("container"),n=document.getElementById("menu");if("0"==e.defaultmenuorder.length){let e=n.firstChild.childNodes,t=[];for(let n=0;n`).firstChild;if(t.append(r),!t.dataset.betterseqta){var c=document.createElement("section");c.innerHTML=t.innerHTML,yt(c,t),n.firstChild.insertBefore(c,t),t.remove()}}if(0==Object.keys(e.menuitems).length){f=n.firstChild.childNodes;for(var u={},d=0;d{m(),p(t)}))}function g(){l=n.firstChild.childNodes,a.remove(),o.remove(),Ue=!1,n.style.setProperty("--menuHidden","none");for(let t=0;t'),o=document.getElementById("menu"),a=o.firstChild;a.insertBefore(r.firstChild,a.firstChild),fetch(`${location.origin}/seqta/student/login`,{method:"POST",headers:{"Content-Type":"application/json; charset=utf-8"},body:JSON.stringify({mode:"normal",query:null,redirect_url:location.origin})}).then((e=>e.json())).then((e=>{let t=e.payload;var n=document.getElementsByClassName("titlebar")[0];n.append(be('
    ').firstChild);var r=be(`

    ${t.userDesc}

    ${$e}

    `).firstChild;n.append(r);var o=document.getElementsByClassName("logout")[0];document.getElementById("logouttooltip").appendChild(o),fetch(`${location.origin}/seqta/student/load/message/people`,{method:"POST",headers:{"Content-Type":"application/json; charset=utf-8"},body:JSON.stringify({mode:"student"})}).then((e=>e.json())).then((e=>{let n=e.payload;var r=n.findIndex((function(e){return e.firstname==t.userDesc.split(" ")[0]&&e.surname==t.userDesc.split(" ")[1]}));let o=document.getElementsByClassName("userInfohouse")[0];if(n[r]?.house){o.style.background=n[r].house_colour;try{let e=kt(n[r]?.house_colour);o.style.color=e&&e>300?"black":e<300?"white":"black",o.innerText=n[r].year+n[r].house}catch(e){o.innerText=n[r].house}}else o.innerText=n[r].year}))}));var i=be('
  • ');a.appendChild(i.firstChild),(s=document.createElement("div")).classList.add("editmenu");let l=be('');s.append(l.firstChild),o.appendChild(s);let c=document.createElement("div");c.classList.add("icon-cover"),c.id="icon-cover",o.appendChild(c);var s=document.querySelector("#editmenu");s.addEventListener("click",(function(){Ue||Ct()})),document.querySelector("#icon-cover").addEventListener("click",(function(){location.href="../#?page=/home",jt(),document.getElementById("menu").firstChild.classList.remove("noscroll")})),document.getElementById("homebutton").addEventListener("click",(function(){Ue||jt()})),document.getElementById("newsbutton").addEventListener("click",(function(){Ue||zt()}))}if(async function(){console.log("Starting appendBackgroundToUI...");const e=document.getElementById("container"),t=document.createElement("iframe");t.id="background",t.classList.add("imageBackground"),t.setAttribute("excludeDarkCheck","true"),t.src=chrome.runtime.getURL("backgrounds/background.html"),e.appendChild(t)}(),function(){const e=document.createElement("link");e.href=chrome.runtime.getURL("popup/popup.css"),e.type="text/css",e.rel="stylesheet",document.querySelector("html").appendChild(e);const t=document.createElement("div");t.classList.add("outside-container","hide"),t.id="ExtensionPopup",document.body.appendChild(t);const n=document.createElement("iframe");n.src=chrome.runtime.getURL("interface/index.html"),n.id="ExtensionIframe",n.allowTransparency=!0,n.style.width="384px",n.style.height="600px",n.style.border="none",n.setAttribute("excludeDarkCheck",!0),t.appendChild(n),document.getElementById("container").onclick=e=>{null==e.target.closest("#AddedSettings")&&Fe&&(t.classList.add("hide"),de("#ExtensionPopup",{opacity:[1,0],scale:[1,0]},{easing:[.22,.03,.26,1]}),Fe=!1)}}(),e){var l=be(''),c=document.getElementById("content");c.append(l.firstChild);const e=await new Promise((e=>{chrome.storage.local.get(null,e)})),t=e.DarkMode,n=be(`\n \n `);c.append(n.firstChild),Ne(t,e.selectedColor),document.getElementById("LightDarkModeButton").addEventListener("click",(async()=>{const e=await new Promise((e=>{chrome.storage.local.get(null,e)})),t=!e.DarkMode;chrome.storage.local.set({DarkMode:t}),Ne(t,e.selectedColor),document.getElementById("darklighttooliptext").innerText=Et(t)}));const r=document.getElementById("menuToggle");r.innerHTML="";for(let e=0;e<3;e++){const e=document.createElement("div");e.className="hamburger-line",r.appendChild(e)}}else l=be(''),(c=document.getElementById("content")).append(l.firstChild);var u=document.getElementById("AddedSettings"),d=document.getElementById("ExtensionPopup");u.addEventListener("click",(function(){Fe?(d.classList.add("hide"),de("#ExtensionPopup",{opacity:[1,0],scale:[1,0]},{easing:pe({stiffness:220,damping:18})}),Fe=!1):(d.classList.remove("hide"),de("#ExtensionPopup",{opacity:[0,1],scale:[0,1]},{easing:pe({stiffness:260,damping:24})}),Fe=!0)}))}}let wt;function Et(e){return wt=e?"Switch to light theme":"Switch to dark theme",wt}function xt(e,t){var n=e.from,r=e.until;let o=new Date,a=new Date(o.getTime());a.setHours(n.split(":")[0]),a.setMinutes(n.split(":")[1]),a.setSeconds("00");let i=new Date(o.getTime());i.setHours(r.split(":")[0]),i.setMinutes(r.split(":")[1]),i.setSeconds("00");var s=a.getTime()-o.getTime(),l=Math.floor(s/1e3/60);let c=ao,u=e.code+t;const d=new Date;var h=document.getElementById(u);h?ze.toLocaleDateString("en-au")==d.toLocaleDateString("en-au")&&(c?h.classList.add("activelesson"):null!=h&&h.classList.remove("activelesson")):clearInterval(Ve),5==l&&chrome.storage.local.get("lessonalert",(function(t){t.lessonalert&&(window.Notification?"granted"===Notification.permission?new Notification("Next Lesson in 5 Minutes:",{body:"Subject: "+e.description+" \nRoom: "+e.room+" \nTeacher: "+e.staff}):Notification.requestPermission().then((function(t){"granted"===t?new Notification("Next Lesson in 5 Minutes:",{body:"Subject: "+e.description+" \nRoom: "+e.room+" \nTeacher: "+e.staff}):console.log("User blocked notifications.")})).catch((function(e){console.error(e)})):console.log("Browser does not support notifications."))}))}function kt(e){const t=/rgba?\(([^)]+)\)/gi;if(e.includes("gradient")){let n,r=[];for(;null!==(n=t.exec(e));){const e=n[1],[t,o,a]=e.split(",").map((e=>e.trim())),i=Math.sqrt(t**2+o**2+a**2);r.push(i)}return r.reduce(((e,t)=>e+t),0)/r.length}{const t=ge.rgb(e).object();return Math.sqrt(t.r**2+t.g**2+t.b**2)}}function Lt(e,t,n=""){const r="../#?page=/assessments/";return n?`${r}${e}:${t}&item=${n}`:`${r}${e}:${t}`}function Mt(e,t){if(!e)throw new Error("No lesson provided.");const{code:n,colour:r,description:o,staff:a,room:i,from:s,until:l,attendanceTitle:c,programmeID:u,metaID:d,assessments:h}=e;let f=`\n
    \n

    ${o||"Unknown"}

    \n

    ${a||"Unknown"}

    \n

    ${i||"Unknown"}

    \n

    ${s||"Unknown"} - ${l||"Unknown"}

    \n
    ${c||"Unknown"}
    \n `;return 0!==u&&(f+=`\n
    ${Ee}
    \n
    ${xe}
    \n `),h&&h.length>0&&(f+=`\n
    \n \n \n \n
    ${h.map((e=>`

    ${e.title}

    `)).join("")}
    \n
    \n `),f+="
    ",be(f)}function St(e){if(e)var t=e.label;else t=" ";return t}function Tt(e,t){var n=new XMLHttpRequest;n.open("POST",`${location.origin}/seqta/student/load/timetable?`,!0),n.setRequestHeader("Content-Type","application/json; charset=utf-8"),n.onreadystatechange=function(){if(4===n.readyState){var e=JSON.parse(n.response);let a=[];var r=document.getElementById("day-container");if(e.payload.items.length>0){if(!r.innerText||t){for(let t=0;t{let t=e;for(let e=0;ee.name===n));r?(a[e].colour=`--item-colour: ${r.value};`,kt(r.value)>300&&(a[e].invert=!0)):a[e].colour="--item-colour: #8e8e8e;",a[e].from=a[e].from.substring(0,5),a[e].until=a[e].until.substring(0,5),a[e].attendanceTitle=St(a[e].attendance)}r.innerText="";for(let e=0;et.date?1:0}function _t(e,t,n,r,o,a){let i=document.createElement(e);return void 0!==t&&i.classList.add(t),void 0!==n&&(i.id=n),void 0!==r&&(i.innerText=r),void 0!==o&&(i.innerHTML=o),void 0!==a&&(i.style=a),i}function Nt(e,t,n=void 0){const r=new Date(e),o=t.assessments,a=t.div;let i=document.createElement("div");if(i.classList.add("upcoming-date-title"),n){let e=document.createElement("h5");e.classList.add("upcoming-special-day"),e.innerText=n,i.append(e),a.setAttribute("data-day",n)}let s=document.createElement("h5");s.innerText=r.toLocaleDateString("en-AU",{weekday:"long",month:"long",day:"numeric"}),i.append(s),a.append(i);let l=document.createElement("div");l.classList.add("upcoming-date-assessments");for(let e=0;e\n \n ').firstChild;r.append(a);let i=document.createElement("div");i.classList.add("upcoming-details");let s=document.createElement("h5");s.innerText=`${t.subject} assessment`;let c=document.createElement("p");c.innerText=t.title,c.classList.add("upcoming-assessment-title"),c.onclick=function(){document.querySelector("#menu ul").classList.add("noscroll"),location.href=`../#?page=/assessments/${t.programmeID}:${t.metaclassID}&item=${t.id}`},i.append(s),i.append(c),n.append(r),n.append(i),l.append(n),fetch(`${location.origin}/seqta/student/assessment/submissions/get`,{method:"POST",headers:{"Content-Type":"application/json; charset=utf-8"},body:JSON.stringify({assessment:t.id,metaclass:t.metaclassID,student:69})}).then((e=>e.json())).then((e=>{if(e.payload.length>0){const e=document.querySelector(`#assessment${t.id}`);let n=document.createElement("div");n.classList.add("upcoming-submittedtext"),n.innerText="Submitted",e.append(n)}}))}return a.append(l),a}function It(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()-1===t.getDate()?"Yesterday":e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()?"Today":e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()+1===t.getDate()?"Tomorrow":void 0}function Dt(e,t,n){let r=_t("label","upcoming-checkbox-container");r.innerText=e;let o=_t("input");o.type="checkbox",o.checked=n,o.id=`filter-${e}`,r.style=t;let a=_t("span","upcoming-checkmark");return r.append(o),r.append(a),o.addEventListener("change",(function(e){chrome.storage.local.get(null,(function(t){let n=t.subjectfilters;n[e.target.id.split("-")[1]]=e.target.checked,chrome.storage.local.set({subjectfilters:n})}))})),r}function Ot(e,t){let n=_t("div","upcoming-blank"),r=_t("p","upcoming-hiddenassessment"),o="";t>1&&(o="s"),r.innerText=`${t} hidden assessment${o} due`,n.append(r),n.setAttribute("data-hidden",!0),e.append(n)}function Bt(e){for(var t in e){let n=document.querySelectorAll(`[data-subject="${t}"]`);for(let r=0;r0&&(o.parentNode.parentNode.hasAttribute("data-day")?Ot(o.parentNode.parentNode,o.parentNode.querySelectorAll(".hidden").length):o.parentNode.parentNode.classList.add("hidden")):o.parentNode.parentNode.classList.remove("hidden")}}}async function Ht(){return fetch(`${location.origin}/seqta/student/load/prefs?`,{method:"POST",headers:{"Content-Type":"application/json; charset=utf-8"},body:JSON.stringify({request:"userPrefs",asArray:!0,user:69})}).then((e=>e.json())).then((e=>e.payload))}function Rt(e){var t=document.createElement("a");t.setAttribute("href",e.url),t.setAttribute("target","_blank");var n=document.createElement("div");n.classList.add("shortcut"),n.classList.add("customshortcut");let r=be(`\n \n \n ${e.icon}\n \n \n `).firstChild;r.classList.add("shortcuticondiv");var o=document.createElement("p");o.textContent=e.name,n.append(r),n.append(o),t.append(n),document.getElementById("shortcuts").append(t)}function Vt(e){e.forEach((e=>{document.querySelectorAll(".shortcut").forEach((t=>{const n=t.parentElement,r=t.querySelector("p");let o=(r?r.textContent:"")===e.name;e.url&&(o=o&&n.getAttribute("href")===e.url),o&&n.remove()}))}))}function jt(){setTimeout((function(){console.log("[BetterSEQTA] Started Loading Home Page"),document.title="Home ― SEQTA Learn",document.querySelector("[data-key=home]").classList.add("active");var e=document.getElementById("main");e.innerHTML="",document.getElementById("title").firstChild.innerText="Home",document.querySelector('link[rel*="icon"]').href=chrome.runtime.getURL("icons/icon-48.png"),ze=new Date;var t=be('
    ');e.append(t.firstChild);const n=new Date;var r=n.getFullYear()+"-"+(n.getMonth()+1)+"-"+n.getDate(),o=be('
    ');document.getElementById("home-container").append(o.firstChild);var a=be('

    Today\'s Lessons

    ');document.getElementById("home-container").append(a.firstChild);var i=document.getElementById("home-timetable-back"),s=document.getElementById("home-timetable-forward");function l(e){ze.setDate(ze.getDate()+e),Tt(ze.getFullYear()+"-"+(ze.getMonth()+1)+"-"+ze.getDate(),!0),function(){var e=document.getElementById("home-lesson-subtitle");const t=new Date;t.getYear()==ze.getYear()&&t.getMonth()==ze.getMonth()?t.getDate()==ze.getDate()?e.innerText="Today's Lessons":t.getDate()-1==ze.getDate()?e.innerText="Yesterday's Lessons":t.getDate()+1==ze.getDate()?e.innerText="Tomorrow's Lessons":e.innerText=`${ze.toLocaleString("en-us",{weekday:"short"})} ${ze.toLocaleDateString("en-au")}`:e.innerText=`${ze.toLocaleString("en-us",{weekday:"short"})} ${ze.toLocaleDateString("en-au")}`}()}i.addEventListener("click",(function(){l(-1)})),s.addEventListener("click",(function(){l(1)})),chrome.storage.local.get(["shortcuts"],(function(e){Pt(Object.values(e)[0])}));var c=document.createElement("div");c.classList.add("upcoming-container"),c.classList.add("border");let u=_t("div","upcoming-title"),d=document.createElement("h2");d.classList.add("home-subtitle"),d.innerText="Upcoming Assessments",u.append(d);let h=_t("div","upcoming-filters","upcoming-filters");u.append(h),c.append(u);let f=document.createElement("div");f.id="upcoming-items",f.classList.add("upcoming-items"),c.append(f),document.getElementById("home-container").append(c);var m=be(String.raw`

    Notices

    `);document.getElementById("home-container").append(m.firstChild),de(".home-container > div",{opacity:[0,1],y:[10,0]},{delay:ie(.2,{start:0}),duration:.6,easing:[.22,.03,.26,1]}),Tt(r);var p=new XMLHttpRequest;let g;p.open("POST",`${location.origin}/seqta/student/load/notices?`,!0),p.setRequestHeader("Content-Type","application/json; charset=utf-8"),p.onreadystatechange=function(){if(4===p.readyState){var e=JSON.parse(p.response),t=document.getElementById("notice-container");if(0==e.payload.length){if(!t.innerText){var n=document.createElement("div");n.textContent="No notices for today.",n.classList.add("dummynotice"),t.append(n)}}else t.innerText||chrome.storage.local.get(["DarkMode"],(function(n){je=n.DarkMode;for(let u=0;u'+e.payload[u].title+"");if(r.append(o.firstChild),null!=e.payload[u].label_title){var a=be('
    '+e.payload[u].label_title+"
    ");r.append(a.firstChild)}var i=be('
    '+e.payload[u].staff+"
    ");let d;r.append(i.firstChild);var s=be(e.payload[u].contents,d=!0);for(let e=0;ee.json())).then((e=>e.payload)).then((e=>{(async function(){try{const e=await fetch(`${location.origin}/seqta/student/load/subjects?`,{method:"POST",headers:{"Content-Type":"application/json; charset=utf-8"},body:JSON.stringify({})});if(!e.ok)throw new Error(`HTTP error! Status: ${e.status}`);return(await e.json()).payload}catch(e){console.error("Oops! There was a problem fetching active classes:",e)}})().then((t=>{for(let e=0;e{let a=n;for(let t=0;te.name===n));r?(e[t].colour=`--item-colour: ${r.value};`,kt(r.value)):e[t].colour="--item-colour: #8e8e8e;"}let i,s,l=[];for(let e=0;ee.name===r));o?(t.colour=`--item-colour: ${o.value};`,kt(o.value)>300&&(t.invert=!0)):t.colour="--item-colour: #8e8e8e;"}!function(e){chrome.storage.local.get(null,(function(t){let n=t.subjectfilters,r=document.querySelector("#upcoming-filters");for(let t=0;t0){document.getElementsByClassName("shortcut-container")[0].style.display="block";for(let e=0;e`).firstChild;i.classList.add("shortcuticondiv");let s=document.createElement("p");s.textContent=r,a.append(i),a.append(s),o.append(a),document.getElementById("shortcuts").appendChild(o)}function zt(){setTimeout((function(){console.log("[BetterSEQTA] Started Loading News Page"),document.title="News ― SEQTA Learn",document.querySelector("[data-key=news]").classList.add("active");var e=document.getElementById("main");e.innerHTML="";var t=be('

    Latest Headlines - ABC News

    ');e.append(t.firstChild),document.getElementById("title").firstChild.innerText="News",function(e,t){let n=be(String.raw`
    ${we}
    `).firstChild;document.querySelector("#news-container").appendChild(n)}(),chrome.runtime.sendMessage({type:"sendNews"},(function(e){let t=e.news.articles;var n=document.querySelector("#news-container");document.getElementById("newsloading").remove();for(let e=0;e