/*! CSS-POLYFILLS - v0.1.0 - 2021-03-08 - https://github.com/FremyCompany/css-polyfills - Copyright (c) 2021 François REMY; MIT-Licensed !*/ !function(){"use strict";var a={exports:{}},b=function(){var b={},c=function(a){return b[a]};return c.define=function(c){b[c]=a.exports,a.exports={}},c}();!function(a,b){a.console||(a.console={backlog:"",log:function(b){this.backlog+=b+"\n",a.debug&&alert(b)},dir:function(b){try{var c=function(a){return a.innerHTML?{tagName:a.tagName,className:a.className,id:a.id,innerHTML:a.innerHTML.substr(0,100)}:{nodeName:a.nodeName,nodeValue:a.nodeValue}},d=function(b){var d=[];return JSON.stringify(b,function(b,e){if("object"==typeof e){if(!d.indexOf(e))return"__cycle__";if(e instanceof a.Node)return c(e);d.push(e)}return e})};this.log(d(b))}catch(a){this.log(b)}},warn:function(a){this.log(a)},error:function(a){this.log("ERROR:"),this.log(a)}},a.onerror||(a.onerror=function(){console.log([].slice.call(arguments,0).join("\n"))})),a.cssConsole={enabled:!!a.debug,warnEnabled:!0,log:function(a){this.enabled&&console.log(a)},dir:function(a){this.enabled&&console.dir(a)},warn:function(a){this.warnEnabled&&console.warn(a)},error:function(a){console.error(a)}}}(window,document),b.define("src/core/polyfill-dom-console.js"),function(){for(var a=["webkit","moz","ms","o"],b=0;b=0&&a|\[|\{|\(|\]|\}|\)|\|)\/\*\*\//g,"$1").replace(/\/\*\*\/(\!|\:|\;|\@|\.|\,|\*|\=|\&|\\|\/|\<|\>|\[|\{|\(|\]|\}|\)|\|)/g,"$1"))}function e(a,b,c){return a>=b&&a<=c}function f(a){return e(a,48,57)}function g(a){return f(a)||e(a,65,70)||e(a,97,102)}function h(a){return e(a,65,90)}function i(a){return e(a,97,122)}function j(a){return h(a)||i(a)}function k(a){return a>=128}function l(a){return j(a)||k(a)||95==a}function m(a){return l(a)||f(a)||45==a}function n(a){return e(a,0,8)||11==a||e(a,14,31)||127==a}function o(a){return 10==a}function p(a){return o(a)||9==a||32==a}function q(a){this.message=a}function r(a){for(var b=[],c=0;c=a.length?-1:a[b]},u=function(a){if(void 0===a&&(a=1),a>3)throw"Spec Error: no more than three codepoints of lookahead.";return t(d+a)},D=function(a){return void 0===a&&(a=1),d+=a,b=t(d),o(b)?k():i+=a,!0},S=function(){return d-=1,o(b)?(h-=1,i=j):i-=1,q.line=h,q.column=i,!0},aa=function(a){return void 0===a&&(a=b),-1==a},ba=function(){},ca=function(){return console.log("Parse error at index "+d+", processing codepoint 0x"+b.toString(16)+"."),!0},da=function(){if(ea(),D(),p(b)){for(;p(u());)D();return new x}if(34==b)return ha();if(35==b){if(m(u())||ka(u(1),u(2))){var a=new W;return ma(u(1),u(2),u(3))&&(a.type="id"),a.value=qa(),a}return new R(b)}return 36==b?61==u()?(D(),new N):new R(b):39==b?ha():40==b?new I:41==b?new J:42==b?61==u()?(D(),new O):new R(b):43==b?pa()?(S(),fa()):new R(b):44==b?new C:45==b?pa()?(S(),fa()):45==u(1)&&62==u(2)?(D(2),new z):na()?(S(),ga()):new R(b):46==b?pa()?(S(),fa()):new R(b):58==b?new A:59==b?new B:60==b?33==u(1)&&45==u(2)&&45==u(3)?(D(3),new y):new R(b):64==b?ma(u(1),u(2),u(3))?new V(qa()):new R(b):91==b?new G:92==b?la()?(S(),ga()):(ca(),new R(b)):93==b?new H:94==b?61==u()?(D(),new M):new R(b):123==b?new E:124==b?61==u()?(D(),new L):124==u()?(D(),new P):new R(b):125==b?new F:126==b?61==u()?(D(),new K):new R(b):f(b)?(S(),fa()):l(b)?(S(),ga()):aa()?new Q:new R(b)},ea=function(){for(;47==u(1)&&42==u(2);)for(D(2);;){if(D(),42==b&&47==u()){D();break}if(aa())return void ca()}},fa=function(){var a=ra();if(ma(u(1),u(2),u(3))){var b=new _;return b.value=a.value,b.repr=a.repr,b.type=a.type,b.unit=qa(),b}if(37==u()){D();var b=new $;return b.value=a.value,b.repr=a.repr,b}var b=new Z;return b.value=a.value,b.repr=a.repr,b.type=a.type,b},ga=function(){var a=qa();if("url"==a.toLowerCase()&&40==u()){for(D();p(u(1))&&p(u(2));)D();return 34==u()||39==u()?new U(a):!p(u())||34!=u(2)&&39!=u(2)?ia():new U(a)}return 40==u()?(D(),new U(a)):new T(a)},ha=function(a){void 0===a&&(a=b);for(var c="";D();){if(b==a||aa())return new X(c);if(o(b))return ca(),S(),new v;92==b?aa(u())?ba():o(u())?D():c+=s(ja()):c+=s(b)}},ia=function(){for(var a=new Y("");p(u());)D();if(aa(u()))return a;for(;D();){if(41==b||aa())return a;if(p(b)){for(;p(u());)D();return 41==u()||aa(u())?(D(),a):(ta(),new w)}if(34==b||39==b||40==b||n(b))return ca(),ta(),new w;if(92==b){if(!la())return ca(),ta(),new w;a.value+=s(ja())}else a.value+=s(b)}},ja=function(){if(D(),g(b)){for(var a=[b],c=0;c<5&&g(u());c++)D(),a.push(b);p(u())&&D();var d=parseInt(a.map(function(a){return String.fromCharCode(a)}).join(""),16);return d>Ga&&(d=65533),d}return aa()?65533:b},ka=function(a,b){return 92==a&&!o(b)},la=function(){return ka(b,u())},ma=function(a,b,c){return 45==a?l(b)||45==b||ka(b,c):!!l(a)||92==a&&ka(a,b)},na=function(){return ma(b,u(1),u(2))},oa=function(a,b,c){return 43==a||45==a?!!f(b)||!(46!=b||!f(c)):46==a?!!f(b):!!f(a)},pa=function(){return oa(b,u(1),u(2))},qa=function(){for(var a="";D();)if(m(b))a+=s(b);else{if(!la())return S(),a;a+=s(ja())}},ra=function(){var a="",c="integer";for(43!=u()&&45!=u()||(D(),a+=s(b));f(u());)D(),a+=s(b);if(46==u(1)&&f(u(2)))for(D(),a+=s(b),D(),a+=s(b),c="number";f(u());)D(),a+=s(b);var d=u(1),e=u(2),g=u(3);if(69!=d&&101!=d||!f(e)){if((69==d||101==d)&&(43==e||45==e)&&f(g))for(D(),a+=s(b),D(),a+=s(b),D(),a+=s(b),c="number";f(u());)D(),a+=s(b)}else for(D(),a+=s(b),D(),a+=s(b),c="number";f(u());)D(),a+=s(b);return{type:c,value:sa(a),repr:a}},sa=function(a){return+a},ta=function(){for(;D();){if(45==b||aa())return;la()?(ja(),ba()):ba()}},ua=0;!aa(u());)if(e.push(da()),ua++>2*a.length)throw new Error("The CSS Tokenizer is infinite-looping");return e}function u(){return this}function v(){return this}function w(){return this}function x(){return this}function y(){return this}function z(){return this}function A(){return this}function B(){return this}function C(){return this}function D(){return this}function E(){return this.value="{",this.mirror="}",this}function F(){return this.value="}",this.mirror="{",this}function G(){return this.value="[",this.mirror="]",this}function H(){return this.value="]",this.mirror="[",this}function I(){return this.value="(",this.mirror=")",this}function J(){return this.value=")",this.mirror="(",this}function K(){return this}function L(){return this}function M(){return this}function N(){return this}function O(){return this}function P(){return this}function Q(){return this}function R(a){return this.value=s(a),this}function S(){return this}function T(a){this.value=a}function U(a){this.value=a,this.mirror=")"}function V(a){this.value=a}function W(a){this.value=a,this.type="unrestricted"}function X(a){this.value=a}function Y(a){this.value=a}function Z(){this.value=null,this.type="integer",this.repr=""}function $(){this.value=null,this.repr=""}function _(){this.value=null,this.type="integer",this.repr="",this.unit=""}function aa(a){a=""+a;for(var b="",c=a.charCodeAt(0),d=0;d=128||45==f||95==f||e(f,48,57)||e(f,65,90)||e(f,97,122)?b+=a[d]:b+="\\"+a[d]}return b}function ba(a){a=""+a;for(var b="",c=(a.charCodeAt(0),0);c=128||45==d||95==d||e(d,48,57)||e(d,65,90)||e(d,97,122)?b+=a[c]:b+="\\"+d.toString(16)+" "}return b}function ca(a){a=""+a;for(var b="",c=0;c=0;d--)if(!(b.value[d]instanceof x)){if(!(b.value[d]instanceof T&&b.value[d].ASCIIMatch("important"))){if(c&&b.value[d]instanceof R&&"!"==b.value[d].value){b.value.splice(d,b.value.length),b.important=!0;break}break}c=!0}return b}function la(a){return a.consume(),a.token instanceof E||a.token instanceof G||a.token instanceof I?ma(a):a.token instanceof U?na(a):a.token}function ma(a){for(var b=a.token.mirror,c=new Ca(a.token.value);a.consume();){if(a.token instanceof Q||a.token instanceof D&&a.token.value==b)return c;a.reconsume(),c.value.push(la(a))}}function na(a){for(var b=new Da(a.token.value);a.consume();){if(a.token instanceof Q||a.token instanceof J)return b;a.reconsume(),b.value.push(la(a))}}function oa(a){if("string"==typeof a)return new da(t(a));if(a instanceof da)return a;if(void 0!==a.length)return new da(a);throw SyntaxError(a)}function pa(a){a=oa(a);var b=new ya;return b.value=ga(a,"top-level"),b}function qa(a){return a=oa(a),ga(a)}function ra(a){for(a=oa(a);a.next()instanceof x;)a.consume();if(a.next()instanceof Q)throw SyntaxError();if(a.next()instanceof V)var b=ha(a);else{var b=ia(a);if(!b)throw SyntaxError()}for(;a.next()instanceof x;)a.consume();if(a.next()instanceof Q)return b;throw SyntaxError()}function sa(a){for(a=oa(a);a.next()instanceof x;)a.consume();if(!(a.next()instanceof T))throw SyntaxError();var b=ka(a);if(!b)throw new SyntaxError;return b}function ta(a){return a=oa(a),ja(a)}function ua(a){for(a=oa(a);a.next()instanceof x;)a.consume();if(a.next()instanceof Q)throw SyntaxError();var b=la(a);if(!b)throw SyntaxError();for(;a.next()instanceof x;)a.consume();if(!(a.next()instanceof Q))throw new SyntaxError;return b}function va(a){a=oa(a);for(var b=new c;;){var d=la(a);if(d instanceof Q)return b;b.push(d)}}function wa(a){a=oa(a);for(var b=new c;;)for(var d=new c;;){var e=la(a);if(e instanceof Q)return b.push(d),b;if(e instanceof C){b.push(d);break}d.push(e)}}function xa(){return this}function ya(){return this.value=new c,this}function za(a){return this.name=a,this.prelude=new c,this.value=null,this}function Aa(){return this.prelude=new c,this.selector=this.prelude,this.value=null,this}function Ba(a){return this.name=a,this.value=new c,this.important=!1,this}function Ca(a){return this.name=a,this.value=new c,this}function Da(a){return this.name=a,this.value=new c,this}function Ea(){return this.value=new c,this}var Fa={tokenize:function(a){},parse:function(a){}};Fa.TokenList=c,Fa.TokenListToCSSString=d;var Ga=1114111;return q.prototype=new Error,q.prototype.name="InvalidCharacterError",u.prototype.toJSON=function(){return{token:this.tokenType}},u.prototype.toString=function(){return this.tokenType},u.prototype.toCSSString=function(){return""+this},v.prototype=new u,v.prototype.tokenType="BADSTRING",v.prototype.toCSSString=function(){return"'"},w.prototype=new u,w.prototype.tokenType="BADURL",w.prototype.toCSSString=function(){return"url("},x.prototype=new u,x.prototype.tokenType="WHITESPACE",x.prototype.toString=function(){return"WS"},x.prototype.toCSSString=function(){return" "},y.prototype=new u,y.prototype.tokenType="CDO",y.prototype.toCSSString=function(){return"\x3c!--"},z.prototype=new u,z.prototype.tokenType="CDC",z.prototype.toCSSString=function(){return"--\x3e"},A.prototype=new u,A.prototype.tokenType=":",B.prototype=new u,B.prototype.tokenType=";",C.prototype=new u,C.prototype.tokenType=",",C.prototype.value=";",D.prototype=new u,E.prototype=new D,E.prototype.tokenType="{",F.prototype=new D,F.prototype.tokenType="}",G.prototype=new D,G.prototype.tokenType="[",H.prototype=new D,H.prototype.tokenType="]",I.prototype=new D,I.prototype.tokenType="(",J.prototype=new D,J.prototype.tokenType=")",K.prototype=new u,K.prototype.tokenType="~=",L.prototype=new u,L.prototype.tokenType="|=",M.prototype=new u,M.prototype.tokenType="^=",N.prototype=new u,N.prototype.tokenType="$=",O.prototype=new u,O.prototype.tokenType="*=",P.prototype=new u,P.prototype.tokenType="||",Q.prototype=new u,Q.prototype.tokenType="EOF",Q.prototype.toCSSString=function(){return""},R.prototype=new u,R.prototype.tokenType="DELIM",R.prototype.toString=function(){return"DELIM("+this.value+")"},R.prototype.toCSSString=function(){return"\\"==this.value?"\\\n":this.value},S.prototype=new u,S.prototype.ASCIIMatch=function(a){return this.value.toLowerCase()==a.toLowerCase()},T.prototype=new S,T.prototype.tokenType="IDENT",T.prototype.toString=function(){return"IDENT("+this.value+")"},T.prototype.toCSSString=function(){return aa(this.value)},U.prototype=new S,U.prototype.tokenType="FUNCTION",U.prototype.toString=function(){return"FUNCTION("+this.value+")"},U.prototype.toCSSString=function(){return aa(this.value)+"("},V.prototype=new S,V.prototype.tokenType="AT-KEYWORD",V.prototype.toString=function(){return"AT("+this.value+")"},V.prototype.toCSSString=function(){return"@"+aa(this.value)},W.prototype=new S,W.prototype.tokenType="HASH",W.prototype.toString=function(){return"HASH("+this.value+")"},W.prototype.toCSSString=function(){return"#"+("id"==this.type?aa:ba)(this.value)},X.prototype=new S,X.prototype.tokenType="STRING",X.prototype.toString=function(){return'"'+ca(this.value)+'"'},Y.prototype=new S,Y.prototype.tokenType="URL",Y.prototype.toString=function(){return"URL("+this.value+")"},Y.prototype.toCSSString=function(){return'url("'+ca(this.value)+'")'},Z.prototype=new u,Z.prototype.tokenType="NUMBER",Z.prototype.toString=function(){return"integer"==this.type?"INT("+this.value+")":"NUMBER("+this.value+")"},Z.prototype.toJSON=function(){var a=this.constructor.prototype.constructor.prototype.toJSON.call(this);return a.value=this.value,a.type=this.type,a.repr=this.repr,a},Z.prototype.toCSSString=function(){return this.repr},$.prototype=new u,$.prototype.tokenType="PERCENTAGE",$.prototype.toString=function(){return"PERCENTAGE("+this.value+")"},$.prototype.toCSSString=function(){return this.repr+"%"},_.prototype=new u,_.prototype.tokenType="DIMENSION",_.prototype.toString=function(){return"DIM("+this.value+","+this.unit+")"},_.prototype.toCSSString=function(){var a=this.repr,b=aa(this.unit);return"e"!=b[0].toLowerCase()||"-"!=b[1]&&!e(b.charCodeAt(1),48,57)||(b="\\65 "+b.slice(1,b.length)),a+b},Fa.tokenize=t,Fa.IdentToken=T,Fa.IdentifierToken=T,Fa.FunctionToken=U,Fa.AtKeywordToken=V,Fa.HashToken=W,Fa.StringToken=X,Fa.BadStringToken=v,Fa.URLToken=Y,Fa.BadURLToken=w,Fa.DelimToken=R,Fa.NumberToken=Z,Fa.PercentageToken=$,Fa.DimensionToken=_,Fa.IncludeMatchToken=K,Fa.DashMatchToken=L,Fa.PrefixMatchToken=M,Fa.SuffixMatchToken=N,Fa.SubstringMatchToken=O,Fa.ColumnToken=P,Fa.WhitespaceToken=x,Fa.CDOToken=y,Fa.CDCToken=z,Fa.ColonToken=A,Fa.SemicolonToken=B,Fa.CommaToken=C,Fa.OpenParenToken=I,Fa.CloseParenToken=J,Fa.OpenSquareToken=G,Fa.CloseSquareToken=H,Fa.OpenCurlyToken=E,Fa.CloseCurlyToken=F,Fa.EOFToken=Q,Fa.CSSParserToken=u,Fa.GroupingToken=D,da.prototype.tokenAt=function(a){return a0||b.length>0)&&a.push(b),a},Ea.prototype=new xa,Ea.prototype.type="FUNCTION-ARG",Ea.prototype.toCSSString=function(){return this.value.toCSSString()+", "},Fa.CSSParserRule=xa,Fa.Stylesheet=ya,Fa.AtRule=za,Fa.StyleRule=Aa,Fa.Declaration=Ba,Fa.SimpleBlock=Ca,Fa.Func=Da,Fa.parseAStylesheet=pa,Fa.parseAListOfRules=qa,Fa.parseARule=ra,Fa.parseADeclaration=sa,Fa.parseAListOfDeclarations=ta,Fa.parseAComponentValue=ua,Fa.parseAListOfComponentValues=va,Fa.parseACommaSeparatedListOfComponentValues=wa,Fa.parse=pa,Fa.parseCSSValue=va,Fa}(),b.define("src/core/css-syntax.js"),a.exports=function(a,c){b("src/core/polyfill-dom-console.js");var d={cloneMouseEvent:function(a){var b=c.createEvent("MouseEvent");return b.initMouseEvent(a.type,a.canBubble||a.bubbles,a.cancelable,a.view,a.detail,a.screenX,a.screenY,a.clientX,a.clientY,a.ctrlKey,a.altKey,a.shiftKey,a.metaKey,a.button,a.relatedTarget),b},cloneKeyboardEvent:function(a){return d.cloneCustomEvent(a)},cloneCustomEvent:function(a){var b=c.createEvent("CustomEvent");b.initCustomEvent(a.type,a.canBubble||a.bubbles,a.cancelable,"detail"in a?a.detail:a);for(var d in a)try{if(a[d]!=b[d]&&a[d]!=a.target)try{b[d]=a[d]}catch(c){Object.defineProperty(b,d,{get:function(){return a[d]}})}}catch(a){}return b},cloneEvent:function(a){return a instanceof MouseEvent?d.cloneMouseEvent(a):a instanceof KeyboardEvent?d.cloneKeyboardEvent(a):d.cloneCustomEvent(a)},EventTarget:{implementsIn:function(a,b){b||"function"!=typeof a||(a=a.prototype),a.dispatchEvent=d.EventTarget.prototype.dispatchEvent,a.addEventListener=d.EventTarget.prototype.addEventListener,a.removeEventListener=d.EventTarget.prototype.removeEventListener},prototype:{}}};return d.EventTarget.prototype.addEventListener=function(a,b){this.eventListeners||(this.eventListeners=[]);var c=this.eventListeners[a]||(this.eventListeners[a]=[]);-1==c.indexOf(b)&&c.push(b)},d.EventTarget.prototype.removeEventListener=function(a,b){this.eventListeners||(this.eventListeners=[]);var c,d=this.eventListeners[a]||(this.eventListeners[a]=[]);-1!==(c=d.indexOf(b))&&d.splice(c,1)},d.EventTarget.prototype.dispatchEvent=function(a){function b(a,b,c){Object.defineProperty(b,c,{get:function(){var b=a[c];return"function"==typeof b?b.bind(a):b},set:function(b){a[c]=b}})}function d(a,c){try{Object.defineProperty(a,"target",{get:function(){return c}})}catch(a){}finally{if(a.target!==c){var e=Object.create(Object.getPrototypeOf(a));e=d(e,c);for(key in a)"target"!=key&&b(a,e,key);return e}return a}}if(this.eventListeners||(this.eventListeners=[]),"string"==typeof a){if(!this.eventListeners[a]||0==this.eventListeners[a].length)return}else if(!this.eventListeners[a.type]||0==this.eventListeners[a.type].length)return;var e=a;if("object"==typeof e)try{e=d(e,this)}catch(a){}else{if("string"!=typeof e)throw new Error("dispatchEvent expect an Event object or a string containing the event type");e=c.createEvent("CustomEvent"),e.initCustomEvent(a,!0,!1,this);try{e=d(e,this)}catch(a){}}for(var f=this.eventListeners[e.type]||(this.eventListeners[e.type]=[]),g=f.length;g--;)try{f[g](e)}catch(a){setImmediate(function(){throw a})}return e.isDefaultPrevented},d}(window,document),b.define("src/core/dom-events.js"),a.exports=function(a,b){function c(a,b,c){var d=this;b||(b=function(){}),c||(c=a);var e=!1,f=!1,g=!1,h=null,i=function(){g=!0;try{h&&h(d)}catch(a){setImmediate(function(){throw a})}g&&j()},j=(this.schedule=function(b){if(f)throw new Error("Cannot schedule on a disconnected event stream");if(e&&!g)throw new Error("Cannot schedule on an already-scheduled event stream");h=b,g=!1,e?c(i):(a(i),e=!0)},this.dispose=function(){e&&(b(),d=null,i=null,h=null,e=!1,f=!0,g=!1)})}function d(a){var b=0;c.call(this,function(a){b=requestAnimationFrame(a)},function(){cancelAnimationFrame(b)})}function e(a){var b=0,d="number"==typeof a?+a:"timeout"in a?+a.timeout:333;c.call(this,function(a){b=setTimeout(a,d)},function(){clearTimeout(b)})}function f(){var b="PointerEvent"in a?"pointermove":"MSPointerEvent"in a?"MSPointerMove":"mousemove",d=!1,e=null,f=function(){d||(a.removeEventListener(b,f,!0),d=requestAnimationFrame(e))};c.call(this,function(c){e=c,a.addEventListener(b,f,!0)},function(){a.removeEventListener(b,f,!0),cancelAnimationFrame(d),f=null,e=null,d=!1},function(c){e=c,d=!1,a.addEventListener(b,f,!0)})}function g(){var b="PointerEvent"in a?"pointerup":"MSPointerEvent"in a?"MSPointerUp":"mouseup",d="PointerEvent"in a?"pointerdown":"MSPointerEvent"in a?"MSPointerDown":"mousedown",e=!1,f=null,g=function(){e||(a.removeEventListener(b,g,!0),a.removeEventListener(d,g,!0),e=requestAnimationFrame(f))};c.call(this,function(c){f=c,a.addEventListener(b,g,!0),a.addEventListener(d,g,!0)},function(){a.removeEventListener(b,g,!0),a.removeEventListener(d,g,!0),cancelAnimationFrame(e),g=null,f=null,e=!1},function(c){f=c,e=!1,a.addEventListener(b,g,!0),a.addEventListener(d,g,!0)})}function h(){var a=null,d=null,e=!1,f=0,g=function(){d==b.activeElement&&e==b.hasFocus()?setTimeout(g,333):(d=b.activeElement,e=b.hasFocus(),a())};c.call(this,function(b){a=b,f=setTimeout(g,500)},function(){clearTimeout(f),g=null,a=null,f=0},function(b){a=b,f=setTimeout(g,100)})}function i(a,b){var d=this,e=null,f=!1,g=!1,h=function(c){c==a&&(f=!0),c==b&&(g=!0),f&&g||e(d)};c.call(this,function(c){e=c,a.schedule(h),b.schedule(h)},function(){a.dispose(),b.dispose()},function(c){e=c,f&&a.schedule(h),g&&b.schedule(h),f=g=!1})}var j;return j="MutationObserver"in a?function(a){if(a)var d="target"in a?a.target:b.documentElement,e={subtree:!("subtree"in a)||!!a.subtree,attributes:!("attributes"in a)||!!a.attributes,childList:!("childList"in a)||!!a.childList,characterData:"characterData"in a&&!!a.characterData};else var d=b.documentElement,e={subtree:!0,attributes:!0,childList:!0,characterData:!1};var f=null;c.call(this,function(a){e&&(f=new MutationObserver(a),f.observe(d,e),d=null,e=null)},function(){f&&f.disconnect(),f=null},function(){f.takeRecords()})}:"MutationEvent"in a?function(a){var d=!1;if(a)var e="target"in a?a.target:b.documentElement;else var e=b.documentElement;var f=null,g=function(){!d&&g&&(b.removeEventListener("DOMContentLoaded",g,!1),b.removeEventListener("DOMContentLoaded",g,!1),e.removeEventListener("DOMSubtreeModified",g,!1),d=requestAnimationFrame(f))};c.call(this,function(a){f=a,b.addEventListener("DOMContentLoaded",g,!1),e.addEventListener("DOMSubtreeModified",g,!1)},function(){b.removeEventListener("DOMContentLoaded",g,!1),e.removeEventListener("DOMSubtreeModified",g,!1),cancelAnimationFrame(d),g=null,f=null,d=!1},function(a){f=a,d=!1,e.addEventListener("DOMSubtreeModified",g,!1)})}:d,{EventStream:c,AnimationFrameEventStream:d,TimeoutEventStream:e,MouseEventStream:f,MouseButtonEventStream:g,DOMUpdateEventStream:j,FocusEventStream:h,CompositeEventStream:i}}(window,document),b.define("src/core/dom-experimental-event-streams.js"),a.exports=function(a,c){function d(a,b,d){var e,d=d||c,m=[],n=function e(f){f.schedule(e);for(var g=[],h=m.slice(0),i=d.querySelectorAll(a),j=g.length=i.length;j;)g.push(i[--j]);m=g.slice(0),i=null,h=h.filter(function(a){if(a===c.documentElement||c.documentElement.contains(a))return!0;try{b.onremoved&&b.onremoved(a)}catch(a){setImmediate(function(){throw a})}return!1});for(var k=h.pop(),l=g.pop();k||l;)if(k===l)k=h.pop(),l=g.pop();else if(!l||k&&0!=(43&l.compareDocumentPosition(k))){try{b.onremoved&&b.onremoved(k)}catch(a){setImmediate(function(){throw a})}k=h.pop()}else{try{b.onadded&&b.onadded(l)}catch(a){setImmediate(function(){throw a})}l=g.pop()}},o=a.replace(/:(dir|lang|root|empty|blank|nth-child|nth-last-child|first-child|last-child|only-child|nth-of-type|nth-last-of-child|fist-of-type|last-of-type|only-of-type|not|matches|default)\b/gi,"");if(-1==o.indexOf(":"))e=new f({target:d});else if(e=new f({target:d}),f!=g){var p=/:(focus|active)\b/gi;if(p.test(o)){e=new h(new i,e);var p=/:(focus)\b/gi;o=o.replace(p,"")}var p=/:(active)\b/gi;p.test(o)&&(e=new h(new j,e),o=o.replace(p,""));var p=/:(target|checked|indeterminate|valid|invalid|in-range|out-of-range|user-error)\b/gi;if(p.test(o)){e=new h(new k(250),e),o=o.replace(p,"");var p=/:(any-link|link|visited|local-link|enabled|disabled|read-only|read-write|required|optional)\b/gi;o=o.replace(p,"")}var p=/:(any-link|link|visited|local-link|enabled|disabled|read-only|read-write|required|optional)\b/gi;p.test(o)&&(e=new h(new k(333),e),o=o.replace(p,""));var p=/:(hover)\b/gi;p.test(o)&&(e=new h(new l,e),o=o.replace(p,"")),-1!==o.indexOf(":")&&(e=new g)}n(e)}var e=b("src/core/dom-experimental-event-streams.js"),f=e.DOMUpdateEventStream,g=e.AnimationFrameEventStream,h=e.CompositeEventStream,i=e.FocusEventStream,j=e.MouseButtonEventStream,k=e.TimeoutEventStream,l=e.MouseEventStream;return d}(window,document),b.define("src/core/dom-query-selector-live.js"),a.exports=function(a,c){b("src/core/polyfill-dom-console.js"),b("src/core/polyfill-dom-requestAnimationFrame.js");var d=b("src/core/css-syntax.js"),e=b("src/core/dom-events.js"),f=b("src/core/dom-query-selector-live.js"),g={computeSelectorPriorityOf:function(a){"string"==typeof a&&(a=d.parse(a.trim()+"{}").value[0].selector);for(var b=0,c=0,e=0,f=0;f255&&(numberOfIds=255),c>255&&(c=255),e>255&&(e=255),256*(256*b+c)+e},findAllMatchingRules:function(a){return this.findAllMatchingRulesWithPseudo(a)},findAllMatchingRulesWithPseudo:function(a,b){b=b?(""+b).toLowerCase():b;for(var c=[],e=function(f){try{for(var h=f.length;h--;){var i=f[h];if(!i.disabled)if(i instanceof d.StyleRule)for(var j=i.subRules||g.splitRule(i),k=j.length;k--;){var l=j[k].selector.toCSSString().replace(/ *(\/\*\*\/| ) */g," ").trim();if(b){var m=l.toLowerCase(),n=l.length-b.length-1;if(n<=0)continue;if(m.lastIndexOf("::"+b)==n-1)l=l.substr(0,n-1);else{if(m.lastIndexOf(":"+b)!=n)continue;l=l.substr(0,n)}0==l.trim().length?l="*":" "==l[l.length-1]?l+="*":"+"==l[l.length-1]?l+="*":">"==l[l.length-1]?l+="*":"~"==l[l.length-1]&&(l+="*")}var o=!1;try{if(a.matches)o=a.matches(l);else if(a.matchesSelector)o=a.matchesSelector(l);else if(a.oMatchesSelector)o=a.oMatchesSelector(l);else if(a.msMatchesSelector)o=a.msMatchesSelector(l);else if(a.mozMatchesSelector)o=a.mozMatchesSelector(l);else{if(!a.webkitMatchesSelector)throw new Error("no element.matches?");o=a.webkitMatchesSelector(l)}}catch(a){setImmediate(function(){throw a})}o&&c.push(j[k])}else i instanceof d.AtRule&&"media"==i.name&&e(i.toStylesheet().value)}}catch(a){setImmediate(function(){throw a})}},f=g.stylesheets.length;f--;){var h=g.stylesheets[f];e(h)}return c},allCSSProperties:null,getAllCSSProperties:function(){if(this.allCSSProperties)return this.allCSSProperties;for(var a=getComputedStyle(c.documentElement),b=new Array(a.length),d=a.length;d--;)b[d]=a[d];return-1==b.indexOf("content")&&b.push("content"),-1==b.indexOf("counter-reset")&&(b.push("counter-reset"),b.push("counter-increment"),g.computationUnsafeProperties["counter-reset"]=!0),this.allCSSProperties=b},computationUnsafeProperties:{bottom:!0,direction:!0,display:!0,"font-size":!0,height:!0,left:!0,"line-height":!0,"margin-left":!0,"margin-right":!0,"margin-bottom":!0,"margin-top":!0,"max-height":!0,"max-width":!0,"min-height":!0,"min-width":!0,"padding-left":!0,"padding-right":!0,"padding-bottom":!0,"padding-top":!0,right:!0,"text-align":!0,"text-align-last":!0,top:!0,width:!0,__proto__:null},inheritingProperties:{"border-collapse":!0,"border-spacing":!0,"caption-side":!0,color:!0,cursor:!0,direction:!0,"empty-cells":!0,"font-family":!0,"font-size":!0,"font-style":!0,"font-variant":!0,"font-weight":!0,font:!0,"letter-spacing":!0,"line-height":!0,"list-style-image":!0,"list-style-position":!0,"list-style-type":!0,"list-style":!0,orphans:!0,quotes:!0,"text-align":!0,"text-indent":!0,"text-transform":!0,visibility:!0,"white-space":!0,widows:!0,"word-break":!0,"word-spacing":!0,"word-wrap":!0,__proto__:null},defaultStylesForTag:Object.create?Object.create(null):{},getDefaultStyleForTag:function(a){ var b=this.defaultStylesForTag[a];if(b)return b;var d=c.createElement(a),e=this.defaultStylesForTag[a]=getComputedStyle(d);return e.display?e:(c.head.insertBefore(d,c.head.firstChild),e)},getSpecifiedStyle:function(b,e,f){var h;if((h=b.getAttribute("data-css-regions-fragment-of"))&&(h=c.querySelector('[data-css-regions-fragment-source="'+h+'"]')))return g.getSpecifiedStyle(h,e);if(b.currentStyle&&!a.opera){var i=b.myStyle[e]||b.currentStyle[e];return d.parseAListOfComponentValues(i)}try{if(i=b.style.getPropertyValue(e)||b.myStyle[e])return d.parseAListOfComponentValues(i)}catch(a){}var j=!1,k=0,i=new d.TokenList,l=f||(e in g.monitoredProperties?b.myMatchedRules||[]:g.findAllMatchingRules(b)),m=function(a){for(var b=a.length;b--;)if(!a[b].disabled)if(a[b]instanceof d.StyleRule){for(var c=a[b].getDeclarations(),f=c.length-1;f>=0;f--)if("DECLARATION"==c[f].type&&c[f].name==e){var h=g.computeSelectorPriorityOf(a[b].selector);j?c[f].important&&h>=k&&(k=h,i=c[f].value):c[f].important?(j=!0,k=h,i=c[f].value):h>=k&&(k=h,i=c[f].value)}}else a[b]instanceof d.AtRule&&"media"==a[b].name&&m(a[b].toStylesheet())};return m(l),i||null},stylesheets:[],loadStyleSheet:function(a,b){var c=d.parse(a).value;void 0!==b?g.stylesheets[b]=c:b=g.stylesheets.push(c),g.startMonitoringStylesheet(c)},loadStyleSheetTag:function(a,b){if(!a.hasAttribute("data-css-polyfilled")){if("LINK"==a.tagName)try{g.stylesheets[b]=new d.TokenList;var c=new XMLHttpRequest;c.href=a.href,c.open("GET",a.href,!0),c.ruleIndex=b,c.onreadystatechange=function(){4==this.readyState&&(200==this.status||0==this.status?g.loadStyleSheet(this.responseText,this.ruleIndex):cssConsole.log("css-cascade polyfill failled to load: "+this.href))},c.send()}catch(b){cssConsole.log("css-cascade polyfill failled to load: "+a.href)}else g.loadStyleSheet(a.textContent,b);a.setAttribute("data-css-polyfilled",!0)}},selectorForStylesheets:"style:not([data-no-css-polyfill]):not([data-css-polyfilled]), link[rel=stylesheet]:not([data-no-css-polyfill]):not([data-css-polyfilled])",loadAllStyleSheets:function(){var a=c.head||c.documentElement,b=a.querySelectorAll(g.selectorForStylesheets),d=this.stylesheets.length;this.stylesheets.length+=b.length;for(var e=b.length;e--;){var f=b[e];g.loadStyleSheetTag(f,d+e)}},monitoredProperties:Object.create?Object.create(null):{},monitoredPropertiesHandler:{onupdate:function(a,b){for(var c=g.monitoredProperties,d=b.getDeclarations(),e=d.length-1;e>=0;e--)if("DECLARATION"==d[e].type&&d[e].name in c){for(var f=c[d[e].name],h=f.length;h--;)f[h].onupdate(a,b);break}}},startMonitoringProperties:function(a,b){for(var c=a.length;c--;){var d=a[c];(g.monitoredProperties[d]||(g.monitoredProperties[d]=[])).push(b)}for(var e=0;e=0;f--)if("DECLARATION"==e[f].type&&e[f].name in g.monitoredProperties){g.startMonitoringRule(b[c]);break}}else b[c]instanceof d.AtRule&&"media"==b[c].name&&a.matchMedia&&g.startMonitoringMedia(b[c])},startMonitoringMedia:function(b){try{var c=a.matchMedia(b.prelude.toCSSString()),d=b.toStylesheet().value;g.updateMedia(d,!c.matches,!1),c.addListener(function(a){g.updateMedia(d,!a.matches,!0)}),g.startMonitoringStylesheet(d)}catch(a){setImmediate(function(){throw a})}},updateMedia:function(a,b,d){for(var e=a.length;e--;){a[e].disabled=b;var f=a[e].subRules;if(f)for(var h=f.length;h--;)f[h].disabled=b}if(d)for(var e=a.length;e--;)for(var i=c.querySelectorAll(a[e].selector.toCSSString()),h=i.length;h--;)g.monitoredPropertiesHandler.onupdate(i[h],a[e])},splitRule:function(a){var b=[],c=new d.StyleRule;c.disabled=a.disabled;for(var e=0;e0?b.toCSSString():""}},set:function(b){this.clip=void 0===this.clip?"":this.clip;try{if(!this.parentElement)throw new Error("Please use the anHTMLElement.myStyle property to set polyfilled properties")}catch(a){return void setImmediate(function(){throw a})}this.parentElement.getAttribute("data-style-"+a)!=b&&this.parentElement.setAttribute("data-style-"+a,b)}},e=[];try{e.push(Object.getPrototypeOf(c.documentElement.style)||CSSStyleDeclaration)}catch(a){}for(var f=e.length;f--;){var h=e[f];Object.defineProperty(h,a,b),Object.defineProperty(h,g.toCamelCase(a),b)}g.startMonitoringRule(d.parse('[style*="'+a+'"]{'+a+":attr(style)}").value[0]),g.startMonitoringRule(d.parse("[data-style-"+a+"]{"+a+":attr(style)}").value[0]),g.getAllCSSProperties().push(a),g.computationUnsafeProperties[a]=!0}};return e.EventTarget.implementsIn(g),Object.defineProperty(Element.prototype,"myStyle",{get:function(){var a=this.style;return a.parentElement||(a.parentElement=this),a}}),"no_auto_stylesheet_detection"in a||(g.loadAllStyleSheets(),c.addEventListener("DOMContentLoaded",function(){g.loadAllStyleSheets(),f(g.selectorForStylesheets,{onadded:function(a){g.loadStyleSheetTag(a),g.dispatchEvent("stylesheetadded")}})})),g}(window,document),b.define("src/core/css-cascade.js"),a.exports=function(a,b){function c(a){var b=a.usedStyle||getComputedStyle(a);return b.parentElement||(b.parentElement=a),b}function d(a){var b=a.cascadedStyle||a.specifiedStyle||a.currentStyle||getComputedStyle(a);return b.parentElement||(b.parentElement=a),b}function e(a){var b=a.style;return b.parentElement||(b.parentElement=a),b}function f(a){var b=a.style;return b.parentElement||(b.parentElement=a),b}function g(a,b,d){var e=null,g=c(a).getPropertyValue(b);if(d instanceof Array){if(d.indexOf(g)>=0)return null;d=""+d[0]}else d=""+d;if(g!=d){var h=f(a);e={value:h.getPropertyValue(b),priority:h.getPropertyPriority(b),property:b},h.setProperty(b,"",""),h.setProperty(b,""+d,"important")}return e}function h(a,b,c){var c=c||[];for(var d in b)if(b.hasOwnProperty(key)){var e=g(a,d,b[d]);e&&c.push(e)}return c}function i(a,b){if(b){var c=f(a);c.setProperty(b.property,"",""),b.value&&(c.setProperty(b.property,b.value,""),c.setProperty(b.property,b.value,b.priority))}}function j(a,b){if(b&&b.length>0)for(var c=b.length;c--;)i(a,b[c])}return{styleOf:e,usedStyleOf:c,currentStyleOf:d,runtimeStyleOf:f,enforceStyle:g,enforceStyles:h,restoreStyle:i,restoreStyles:j}}(window),b.define("src/core/css-style.js"),a.exports=function(a,b){function c(){var a=this||Object.create(d.prototype),c=b.createElement("style");c.id="virtual-stylesheet-"+e++,c.setAttribute("data-no-css-polyfill","true"),c.appendChild(b.createTextNode("")),b.querySelector(":root > head").appendChild(c);var f=c.sheet;f.cssRules||(f.cssRules=f.rules),f.removeRule=f.removeRule||function(a){return f.deleteRule(a)},f.addRule=f.addRule||function(a,b,c){var d=a+"{"+b+"}",e="number"==typeof c?c:f.cssRules.length;return f.insertRule(d,e)};var g=[];a.stylesheets=Object.create(null),a.createStyleSheet=function(b){return a.stylesheets[b]||(a.stylesheets[b]=new d(this,b))},a.addRule=function(a,b,c,d){a+=" ",b+=" ",g.push({stylesheet:c,selector:a,declarations:b,enabled:d}),d&&f.addRule(a,b)},a.disableAllRules=function(a){for(var b=f.cssRules.length,c=g.length;c--;){var d=g[c];d.enabled&&(b--,d.stylesheet==a&&(f.removeRule(b),d.enabled=!1))}},a.enableAllRules=function(a){for(var b=0,c=0;cb.order?1:-1}),this.items=d.map(function(a){return a.item}),this.reset();var e=j(this.element),g="";if((g=e["grid-template"])&&this.parseGridTemplate(g),(g=e["grid-template-rows"])&&this.parseRowsTemplate(g),(g=e["grid-template-columns"])&&this.parseColumnsTemplate(g),(g=e["grid-template-areas"])&&this.parseAreasTemplate(g),(g=e["grid-auto-rows"])&&this.parseAutoRowsBreadth(g),(g=e["grid-auto-columns"])&&this.parseAutoColumnsBreadth(g),g=e["grid-auto-flow"]){var h=g.trim().toLowerCase().split(/\s+/g);h.indexOf("row")>=0?(this.growX=!1,this.growY=!0):h.indexOf("column")>=0&&(this.growX=!0,this.growY=!1),h.indexOf("dense")>=0?this.growDense=!0:this.growDense=!1}(g=e["grid-row-gap"])&&this.parseGridRowGap(g),(g=e["grid-column-gap"])&&this.parseGridColumnGap(g),(g=e["grid-gap"])&&this.parseGridGap(g);var i=e;this.hlPadding=parseInt(i.getPropertyValue("border-left-width"))+parseInt(i.getPropertyValue("padding-left")),this.hrPadding=parseInt(i.getPropertyValue("border-right-width"))+parseInt(i.getPropertyValue("padding-right")),this.vtPadding=parseInt(i.getPropertyValue("border-top-width"))+parseInt(i.getPropertyValue("padding-top")),this.vbPadding=parseInt(i.getPropertyValue("border-bottom-width"))+parseInt(i.getPropertyValue("padding-bottom"))},resetItems:function(){for(var a=this.items.length;a--;){var b=this.items[a];b.xStart=b.xEnd=b.yStart=b.yEnd=-1}},resetLinesToSpecified:function(){this.xLines=this.specifiedXLines.slice(0),this.xSizes=this.specifiedXSizes.slice(0),this.yLines=this.specifiedYLines.slice(0),this.ySizes=this.specifiedYSizes.slice(0)},parseTrackBreadthToken:function(a){if(a instanceof h.IdentifierToken){if("auto"==a.value)return{type:v,value:"auto"};if("min-content"==a.value)return{type:z,value:"min-content"};if("max-content"==a.value)return{type:A,value:"max-content"}}else{if(a instanceof h.DimensionToken)return"fr"==a.unit?{type:x,value:a.value}:{type:w,value:p.convertToPixels(a.toCSSString(),this.element)};if(a instanceof h.PercentageToken)return{type:y,value:a.value};if(a instanceof h.NumberToken&&0===a.value)return{type:w,value:0};console.warn("This token could not be parsed:",a.toCSSString())}return null},parseTrackBreadth:function(a,b){var c=!1,e=new d,f=function(){var d=this.parseTrackBreadthToken(a[b]);if(d)return b++,d;console.error("INVALID DECLARATION: grid-template-rows/columns: "+a.toCSSString()+" (unrecognized track breadth)"),c=!0};if(a[b]instanceof h.Func&&"minmax"==a[b].name){var g=a,i=b,j=g[i].getArguments();if(2!=j.length)return console.error("INVALID DECLARATION: grid-template-rows/columns: "+g.toCSSString()+" (invalid number of arguments to the minmax function)"),void(c=!0);a=j[0].filter(function(a){return!(a instanceof h.WhitespaceToken)}),b=0;var k=f.call(this);e.minType=k.type,e.minValue=k.value,a=j[1].filter(function(a){return!(a instanceof h.WhitespaceToken)}),b=0;var k=f.call(this);e.maxType=k.type,e.maxValue=k.value,a=g,b=i+1}else{var k=f.call(this);e.minType=e.maxType=k.type,e.minValue=e.maxValue=k.value}return{result:e,I:b}},parseAutoRowsBreadth:function(a){var b=h.parseCSSValue(a),c=b.filter(function(a){return!(a instanceof h.WhitespaceToken)});c.toCSSString=function(){return b.toCSSString()};var d=this.parseTrackBreadth(c,0);if(!d.result)throw"TODO: better error message";this.defaultYSize=d.result},parseAutoColumnsBreadth:function(a){var b=h.parseCSSValue(a),c=b.filter(function(a){return!(a instanceof h.WhitespaceToken)});c.toCSSString=function(){return b.toCSSString()};var d=this.parseTrackBreadth(c,0);if(!d.result)throw"TODO: better error message";this.defaultXSize=d.result},parseGridTemplate:function(a){var b=!1,a=a.replace(/\/\*(.*?)\*\//g,""),c=a.split("/");if(2==c.length){if(this.parseColumnsTemplate(c[0]))return b=!0;a=c[1]}else if(c.length>=3)return b=!0;if(/"|'/.test(a)){var d=[];if(a=a.replace(/\s*("(?:.*?)"|'(?:.*?)')\s*([-_a-zA-Z0-9]*)\s*/g,function(a,b,c){return d.push(b)," "+(c||"auto")+" "}),a=a.replace(/\)\s*\(/g," "),this.parseRowsTemplate(a))return b=!0;if(this.parseAreasTemplate(d.join(" ")))return b=!0}else if(this.parseRowsTemplate(a))return b=!0;return b},parseAreasTemplate:function(a){var b=h.parseCSSValue(a),c=b.filter(function(a){return!(a instanceof h.WhitespaceToken)});c.toCSSString=function(){return b.toCSSString()};for(var d=0,e=/^([-_a-zA-Z0-9]+|[.]+)\s*/,f=[],g=Object.create(null);c[d];){for(var i=""+c[d++].value,j=[];""!==i;){var k=e.exec(i);if(!k||2!=k.length)return!0;i=i.substr(k[0].length);var l=k[1];if("."!=l&&"."!=l[0]){if(g[l]||(g[l]={xStart:j.length,xEnd:j.length+1,yStart:d-1,yEnd:d}),g[l].xStart>j.length)return!0;if(g[l].yStart>d-1)return!0;g[l].xEnd=Math.max(g[l].xEnd,j.length+1),g[l].yEnd=Math.max(g[l].yEnd,d)}j.push(k[1])}f.push(j)}for(var m in g)for(var n=g[m],o=n.yStart;o=g;h--)for(var i=d;i=m;i--)for(var h=j;h=this.xLines.length;)this.xLines.push(["*"]),this.xSizes.push(this.defaultXSize)},b=function(a){for(;a>=this.yLines.length;)this.yLines.push(["*"]),this.ySizes.push(this.defaultYSize)};this.resetLinesToSpecified(),a.call(this,1),b.call(this,1);for(var c=this.items.length;c--;){var d=this.items[c];if(d.xEnd>0&&a.call(this,d.xEnd),d.yEnd>0&&b.call(this,d.yEnd),!(d.xEnd>0&&d.yEnd>0)){if(d.specifiedXEnd.type==r||d.specifiedXStart.type==r){var e=(this.findXStart(d),this.findXEnd(d));a.call(this,e)}if(d.specifiedYEnd.type==r||d.specifiedYStart.type==r){var f=this.findYStart(d),g=this.findYEnd(d);g<=f&&(g=f+1),b.call(this,g)}d.specifiedXEnd.type==s&&void 0===d.specifiedXEnd.name&&a.call(this,d.specifiedXEnd.index),d.specifiedYEnd.type==s&&void 0===d.specifiedYEnd.name&&b.call(this,d.specifiedYEnd.index)}}if(this.growY){for(;this.ySizes.length>this.rcMatrix.length;)this.rcMatrix.push([]);for(var h=this.rcMatrix.length;h--;)this.rcMatrix[h].length=this.xSizes.length}else{for(;this.xSizes.length>this.rcMatrix.length;)this.rcMatrix.push([]);for(var h=this.rcMatrix.length;h--;)this.rcMatrix[h].length=this.ySizes.length}},scheduleRelayout:function(){function a(){for(var a=[],c=b.element;c=c.parentNode;)"scrollTop"in c&&a.push({element:c,left:c.scrollLeft,top:c.scrollTop});return a}var b=this;b.isLayoutScheduled||(b.isLayoutScheduled=!0,requestAnimationFrame(function(){try{var c=a();b.revokePolyfilledStyle(),b.updateFromElement(),b.performLayout(),b.generatePolyfilledStyle(),c.forEach(function(a){a.element.scrollTop=a.top,a.element.scrollLeft=a.left})}finally{b.isLayoutScheduled=!1}}))},performLayout:function(){this.buildImplicitMatrix();var a={x:0,y:0};if(this.growY)for(var b=0;bd&&a.y++,a.x=d;var e=this.findXEnd(c);d>=e&&(e=d+1),c.xStart=d,c.xEnd=e;var f=1;c.specifiedYEnd.type==s&&(f=void 0===c.specifiedYEnd.name?c.specifiedYEnd.index:1);a:for(;;){this.ensureRows(a.y+f);for(var g=a.y+f-1;g>=a.y;g--)for(var h=d;hthis.rcMatrix[0].length&&(a.y++,this.ensureRows(a.y+f),a.x=0),!0};a:for(;;){this.ensureRows(a.y+f);for(var g=a.y+f-1;g>=a.y;g--)for(var h=a.x+i-1;h>=a.x;h--)if(this.rcMatrix[g][h]){j.call(this);continue a}break}c.xStart=a.x,c.xEnd=a.x+i,c.yStart=a.y,c.yEnd=a.y+f,this.markAsOccupied(c)}}else for(var b=0;bk&&a.x++,a.y=k;var l=this.findYEnd(c);k>=l&&(l=k+1),c.yStart=k,c.yEnd=l;var i=1;c.specifiedXEnd.type==s&&(void 0===c.specifiedXEnd.name?i=c.specifiedXEnd.index:(i=1,console.error("[CSS-GRID] UNSUPPORTED: grid-row/column: auto / span [0-9]+ [A-Z]+")));a:for(;;){this.ensureColumns(a.x+i);for(var h=a.x+i-1;h>=a.x;h--)for(var g=k;gthis.rcMatrix[0].length&&(a.x++,this.ensureRows(a.x+i),a.y=0),!0};a:for(;;){this.ensureColumns(a.x+i);for(var h=a.x+i-1;h>=a.x;h--)for(var g=a.y+f-1;g>=a.y;g--)if(this.rcMatrix[h][g]){j.call(this);continue a}break}c.xStart=a.x,c.xEnd=a.x+i,c.yStart=a.y,c.yEnd=a.y+f,this.markAsOccupied(c)}}this.computeAbsoluteTrackBreadths()},computeAbsoluteTrackBreadths:function(){var a=n("no-children",this.element);a.set(this.element,{border:"none",padding:"0px","min-height":"0px"});for(var b=this.items.length;b--;)a.set(this.items[b],{display:"none"});var c=1,d=9999999,e=this.growY?this.rcMatrix.length:this.rcMatrix[0].length,f=this.growY?this.rcMatrix[0].length:this.rcMatrix.length,g=this.element.offsetWidth-this.hlPadding-this.hrPadding,h=this.element.offsetHeight-this.vtPadding-this.vbPadding,i=Math.max(0,g-Math.max(0,f-1)*this.colGap),k=Math.max(0,h-Math.max(0,e-1)*this.rowGap);a.revoke();var l=function(a){var b=0,e=d;switch(a.minType){case w:b=a.minValue;break;case y:b=a.minValue*s/100}switch(a.maxType){case w:e=a.minValue;break;case y:e=a.minValue*s/100;break;case x:e=b;break;default:e=d}return{base:b,limit:e,breadth:0,flags:0|(e==d?c:0)}},m=function(a,b,e,f,g){var h=e.length,i=f/h;if("base"==b){if(g)for(var j=e.length;j--;){var k=e[j].x,l=a[k].base+i;g&&a[k].flags&0==c&&l>a[k].limit&&(i-=l-a[k].limit)}for(var j=e.length;j--;){var k=e[j].x;a[k].base+=i}}else if("limit"==b)for(var j=e.length;j--;){var k=e[j].x;a[k].flags&c&&a[k].limit==d?a[k].limit=a[k].base+i:a[k].limit+=i}},o=function(a,b,e,f,g,h){for(var i=0,j=b.length;j--;){var k=!1;if(b[j].minType==z||b[j].minType==v)for(var l=this.items.length;l--;){var n=this.items[l],o=g(n),p=h(n);o>j||p<=j||p-o!=1||(a[j].base=Math.max(a[j].base,e(n)),i++,k=!0)}else if(b[j].minType==A)for(var l=this.items.length;l--;){var n=this.items[l],o=g(n),p=h(n);o>j||p<=j||p-o!=1||(a[j].base=Math.max(a[j].base,f(n)),i++,k=!0)}if(b[j].maxType==z)for(var l=this.items.length;l--;){var n=this.items[l],o=g(n),p=h(n);o>j||p<=j||p-o!=1||(a[j].limit==d?a[j].limit=e(n):a[j].limit=Math.max(a[j].limit,e(n)),k||i++)}else if(b[j].maxType==A||b[j].minType==v)for(var l=this.items.length;l--;){var n=this.items[l],o=g(n),p=h(n);o>j||p<=j||p-o!=1||(a[j].limit==d?a[j].limit=f(n):a[j].limit=Math.max(a[j].limit,f(n)),k||i++)}a[j].limit!=d&&(a[j].flags=a[j].flags&~c)}for(var q=2;id&&(s=d);var u=function(c,e,f){for(;;){for(var g=c,h=o;h0)m(a,e,j,g,!0);else if("min-content"==f){var j=i.filter(function(a){return a.maxIsMinContent||a.maxIsMaxContent},0),k=j.length;k>=1?m(a,e,j,g,!1):m(a,e,i,g,!1)}else if("max-content"==f){var j=i.filter(function(a){return a.maxIsMaxContent},0),k=j.length;k>=1?m(a,e,j,g,!1):m(a,e,i,g,!1)}}else"limit"==e&&m(a,e,i,g)}},w=function(){for(var b=a.length;b--;)a[b].limit!=d&&(a[b].flags=a[b].flags&~c)};u(e(n),"base","min-content"),w(),u(f(n),"base","max-content"),w(),u(e(n),"limit","min-content"),u(f(n),"limit","max-content"),w(),i++}}},p=function(a,b,c,d,e,f,g,h){var i=a.map(function(c,d){return{x:d,base:a[d].base,limit:a[d].limit,minIsMinContent:b[d].minType==z||b[d].minType==v,minIsMaxContent:b[d].minType==A,maxIsMinContent:b[d].maxType==z,maxIsMaxContent:b[d].maxType==A||b[d].maxType==v}});for(i.sort(function(a,b){return a.limit-b.limit});;){for(var j=d,k=a.length;k--;)j-=a[k].base;if(j<=1/1024)return;var l=i=i.filter(function(a){return(a.minIsMinContent||a.minIsMaxContent)&&a.base0&&o>0&&(i=Math.max(i,n/o))}for(var q=a.length;q--;)if(b[q].maxType==x){var r=i*b[q].maxValue;a[q].base0;){for(var i=n/t,u=!1,j=s.length;j--;){var q=s[j],r=i*b[q].maxValue;a[q].base=0&&(i.width=e+"px"),["auto","0px"].indexOf(a.getPropertyValue("height"))>=0&&(i.height=g+"px"),b.set(this.element,i)},revokePolyfilledStyle:function(){n("css-grid",this.element).revoke()},findXStart:function(a){var b=-1;return a.specifiedXStart.type!==r?0:(a.specifiedXStart.name?(void 0===a.specifiedXStart.index&&(b=this.findXLine(a.specifiedXStart.name+"-start",0,0,!0)),-1==b&&(b=this.findXLine(a.specifiedXStart.name,0,(a.specifiedXStart.index||1)-1))):b=(a.specifiedXStart.index||1)-1,b<0&&(b=0),a.xStart=b)},findYStart:function(a){var b=-1;return a.specifiedYStart.type!==r?0:(a.specifiedYStart.name?(void 0===a.specifiedYStart.index&&(b=this.findYLine(a.specifiedYStart.name+"-start",0,0,!0)),-1==b&&(b=this.findYLine(a.specifiedYStart.name,0,(a.specifiedYStart.index||1)-1))):b=(a.specifiedYStart.index||1)-1,b<0&&(b=0),a.yStart=b)},findXEnd:function(a){var b=-1,c=a.xStart;switch(a.specifiedXEnd.type){case r:a.specifiedXEnd.name?(void 0===a.specifiedXEnd.index&&(b=this.findXLine(a.specifiedXEnd.name+"-end",0,0,!0)),-1==b&&(b=this.findXLine(a.specifiedXEnd.name,0,(a.specifiedXEnd.index||1)-1))):b=(a.specifiedXEnd.index||1)-1;break;case s:b=a.specifiedXEnd.name?this.findXLine(a.specifiedXEnd.name,c+1,(a.specifiedXEnd.index||1)-1):c+(0|a.specifiedXEnd.index||1);break;case q:b=c+1}return b<=c&&(b=c+1),a.xEnd=b},findYEnd:function(a){var b=-1,c=a.yStart;switch(a.specifiedYEnd.type){case r:a.specifiedYEnd.name?(void 0===a.specifiedYEnd.index&&(b=this.findYLine(a.specifiedYEnd.name+"-end",0,0,!0)),-1==b&&(b=this.findYLine(a.specifiedYEnd.name,0,(a.specifiedYEnd.index||1)-1))):b=(a.specifiedYEnd.index||1)-1;break;case s:a.specifiedYEnd.name?-1==(b=this.findYLine(a.specifiedYEnd.name,c+1,(a.specifiedYEnd.index||1)-1))&&(b=0):b=c+(0|a.specifiedYEnd.index||1);break;case q:b=c+1}return b<=c&&(b=c+1),a.yEnd=b},findXLine:function(a,b,c,d){if(b|=0,c|=0,!a)return b+c=0||!d&&this.xLines[f].indexOf("*")>=0){if(!(c>0))return f;e=f,c--}return d||(console.warn("[CSS-GRID] Missing "+(c+1)+' lines named "'+a+'" after line '+b+"."),e=this.xLines.length+c+1,this.ensureRows(e)),e},findYLine:function(a,b,c,d){if(b|=0,c|=0,!a)return b+c=0||!d&&this.yLines[f].indexOf("*")>=0){if(!(c>0))return f;e=f,c--}return d||(console.warn("[CSS-GRID] Missing "+(c+1)+' lines named "'+a+'" after line '+b+"."),e=this.yLines.length+c+1,this.ensureColumns(e)),e}},{LOCATE_LINE:r,LOCATE_SPAN:s,LOCATE_AREA:3,LOCATE_AUTO:q,ALIGN_START:0,ALIGN_CENTER:t,ALIGN_END:2,ALIGN_FIT:u,TRACK_BREADTH_AUTO:v,TRACK_BREADTH_LENGTH:w,TRACK_BREADTH_FRACTION:x,TRACK_BREADTH_PERCENTAGE:y,TRACK_BREADTH_MIN_CONTENT:z,TRACK_BREADTH_MAX_CONTENT:A,GridLayout:g,GridItem:f,GridItemPosition:e,GridTrackBreadth:d}}(window,document),b.define("src/css-grid/lib/grid-layout.js"),function(a,c){if("gridRow"in c.body.style)return void console.warn("Polyfill skipped");b("src/core/polyfill-dom-console.js");var d=b("src/core/css-cascade.js"),e=b("src/css-grid/lib/grid-layout.js"),f=!1,g=function(){if(!f){f=!0;for(var b=["grid","grid-template","grid-template-rows","grid-template-columns","grid-template-areas","grid-areas","grid-auto-flow","grid-row-gap","grid-column-gap","grid-gap"],g=["grid-area","grid-row","grid-column","grid-row-start","grid-row-end","grid-column-start","grid-column-end","order"],h=b.length;h--;)d.polyfillStyleInterface(b[h]);for(var h=g.length;h--;)d.polyfillStyleInterface(g[h]);d.startMonitoringProperties(b,{onupdate:function(b,d){if(cssConsole.dir({message:"onupdate",element:b,selector:d.selector.toCSSString(),rule:d}),b.gridLayout)b.gridLayout.scheduleRelayout();else{b.gridLayout=new e.GridLayout(b),b.gridLayout.scheduleRelayout(),"MutationObserver"in a?(function(){var a=new MutationObserver(function(a){b.gridLayout.scheduleRelayout()}),d=c.documentElement,e={subtree:!0,attributes:!1,childList:!0,characterData:!0};a.observe(d,e)}(),function(){new MutationObserver(function(a){b.gridLayout.scheduleRelayout()})}()):"MutationEvent"in a&&b.addEventListener("DOMSubtreeModified",function(){b.gridLayout.isLayoutScheduled||b.gridLayout.scheduleRelayout()},!0);var f=b.offsetWidth,g=b.offsetHeight,h=function(){b.gridLayout&&(f==b.offsetWidth&&g==b.offsetHeight||(f=b.offsetWidth,g=b.offsetHeight,b.gridLayout.scheduleRelayout()),requestAnimationFrame(h))};requestAnimationFrame(h),a.addEventListener("load",function(){b.gridLayout&&b.gridLayout.scheduleRelayout()});for(var i=b.querySelectorAll("img"),j=i.length;j--;)i[j].addEventListener("load",function(){b.gridLayout&&b.gridLayout.scheduleRelayout()})}}}),d.startMonitoringProperties(g,{onupdate:function(a,b){cssConsole.dir({message:"onupdate",element:a,selector:b.selector.toCSSString(),rule:b}),a.parentGridLayout&&a.parentGridLayout.scheduleRelayout()}})}};e.enablePolyfill=g;try{"no_auto_css_grid"in a||g()}catch(a){setImmediate(function(){throw a})}}(window,document),b.define("src/css-grid/polyfill.js"),b("src/css-grid/polyfill.js"),b.define("src/requirements.js"),window.cssPolyfills={require:b}}(); //# sourceMappingURL=css-polyfills.min.js.map