@engie-group/fluid-design-system
Version:
The Fluid Design System is ENGIE’s open-source library to create, build and deliver ENGIE digital services in a more efficient way.
1 lines • 157 kB
JavaScript
window.NJStore=window.NJStore||[];const e=(()=>{const e=window.NJStore;return{set(t,n,i){void 0===t.key&&(t.key={key:n,id:e.length}),e[t.key.id]=i},get:(t,n)=>(t.key&&n&&void 0===n.id&&(n=t.key),n&&void 0!==n.id?e[n.id]:null),delete(t,n){if(void 0===t.key)return;const i=t.key;i.key===n&&(delete e[i.id],delete t.key)}}})(),t={setData(t,n,i){e.set(t,n,i)},getData:(t,n)=>e.get(t,n),removeData(t,n){e.delete(t,n)}};class AbstractComponent{constructor(e,t,n={}){!t||t instanceof Element||console.error(Error(`${t} is not an HTML Element`)),this.options=n,this.element=t}static init(e,n={},i){const s=[],r=document.querySelectorAll(i);for(let i=0;i<r.length;i++){const o=r[i];if(!o.key||o.key.key!==e.DATA_KEY){const a=new e(r[i],n);o.key||t.setData(r[i],e.DATA_KEY,a),s.push(a)}}return s}}var n,i,s,r,o,a;!function(e){e.LIBRARY_LOG_TAG="[FLUID]",e.KEY_PREFIX="nj",e.DATA_API_KEY=".data-api"}(n||(n={})),function(e){e.mouseenter="mouseover",e.mouseleave="mouseout"}(i||(i={})),function(e){e.beforehide="beforehide",e.click="click",e.close="close",e.closed="closed",e.hide="hide",e.hidden="hidden",e.input="input",e.keydown="keydown",e.keyup="keyup",e.onchange="onchange",e.show="show",e.shown="shown",e.inserted="inserted",e.focusin="focusin",e.focusout="focusout",e.mouseenter="mouseenter",e.mouseleave="mouseleave",e.mouseup="mouseup",e.mousedown="mousedown",e.decrement="decrement",e.increment="increment"}(s||(s={})),function(e){e.click="click",e.dblclick="dblclick",e.mouseup="mouseup",e.mousedown="mousedown",e.contextmenu="contextmenu",e.mousewheel="mousewheel",e.DOMMouseScroll="DOMMouseScroll",e.mouseover="mouseover",e.mouseout="mouseout",e.mousemove="mousemove",e.selectstart="selectstart",e.selectend="selectend",e.keydown="keydown",e.keypress="keypress",e.keyup="keyup",e.orientationchange="orientationchange",e.touchstart="touchstart",e.touchmove="touchmove",e.touchend="touchend",e.touchcancel="touchcancel",e.pointerdown="pointerdown",e.pointermove="pointermove",e.pointerup="pointerup",e.pointerleave="pointerleave",e.pointercancel="pointercancel",e.gesturestart="gesturestart",e.gesturechange="gesturechange",e.gestureend="gestureend",e.focus="focus",e.blur="blur",e.change="change",e.reset="reset",e.select="select",e.submit="submit",e.focusin="focusin",e.focusout="focusout",e.load="load",e.unload="unload",e.beforeunload="beforeunload",e.resize="resize",e.move="move",e.DOMContentLoaded="DOMContentLoaded",e.readystatechange="readystatechange",e.error="error",e.abort="abort",e.scroll="scroll"}(r||(r={}));class EventHandler{static NAMESPACE_REGEX=/[^.]*(?=\..*)\.|.*/;static STRIPNAME_REGEX=/\..*/;static KEYEVENT_REGEX=/^key/;static STRIPUID_REGEX=/::\d+$/;static EVENTREGISTRY={};static uidEvent=1;static getUidEvent(e,t){return t&&`${t}::${EventHandler.uidEvent++}`||e.uidEvent||EventHandler.uidEvent++}static getEvent(e){const t=EventHandler.getUidEvent(e);return e.uidEvent=t,EventHandler.EVENTREGISTRY[t]=EventHandler.EVENTREGISTRY[t]||{}}static fixEvent(e,t){null===e.which&&EventHandler.KEYEVENT_REGEX.test(e.type)&&(e.which=null!==e.charCode?e.charCode:e.keyCode),e.delegateTarget=t}static njHandler(e,t){const n=i=>(EventHandler.fixEvent(i,e),n.oneOff&&EventHandler.off(e,i.type,t),t.apply(e,[i]));return n}static njDelegationHandler(e,t,n){const i=s=>{const r=e.querySelectorAll(t);for(let t=s.target;t&&t!==this;t=t.parentNode)for(let o=r.length;o>=0;o--)if(r[o]===t)return EventHandler.fixEvent(s,t),i.oneOff&&EventHandler.off(e,s.type,n),n.apply(t,[s]);return null};return i}static findHandler(e,t,n=null){for(const i in e){if(!Object.prototype.hasOwnProperty.call(e,i))continue;const s=e[i];if(s.originalHandler===t&&s.delegationSelector===n)return e[i]}return null}static normalizeParams(e,t,n){const s="string"==typeof t,o=s?n:t;let a=e.replace(EventHandler.STRIPNAME_REGEX,"");const l=i[a];l&&(a=l);return"string"==typeof r[a]||(a=e),[s,o,a]}static addHandler(e,t,n,i,s){if("string"!=typeof t||null==e)return;n||(n=i,i=null);const r=EventHandler.getEvent(e);for(const o of t.split(" ")){const[t,a,l]=EventHandler.normalizeParams(o,n,i),c=r[l]||(r[l]={}),d=EventHandler.findHandler(c,a,t?n:null);if(d)return void(d.oneOff=d.oneOff&&s);const u=EventHandler.getUidEvent(a,o.replace(EventHandler.NAMESPACE_REGEX,"")),h=t?EventHandler.njDelegationHandler(e,n,i):EventHandler.njHandler(e,n);h.delegationSelector=t?n:null,h.originalHandler=a,h.oneOff=s,h.uidEvent=u,c[u]=h,e.addEventListener(l,h,t)}}static removeHandler(e,t,n,i,s){const r=EventHandler.findHandler(t[n],i,s);null!==r&&(e.removeEventListener(n,r,Boolean(s)),delete t[n][r.uidEvent])}static removeNamespacedHandlers(e,t,n,i){const s=t[n]||{};for(const r in s)if(Object.prototype.hasOwnProperty.call(s,r)&&r.indexOf(i)>-1){const i=s[r];EventHandler.removeHandler(e,t,n,i.originalHandler,i.delegationSelector)}}static on(e,t,n,i){EventHandler.addHandler(e,t,n,i,!1)}static one(e,t,n,i){EventHandler.addHandler(e,t,n,i,!0)}static off(e,t,n,i){if("string"!=typeof t||null==e)return;const[s,r,o]=EventHandler.normalizeParams(t,n,i),a=o!==t,l=EventHandler.getEvent(e);if(void 0!==r){if(!l||!l[o])return;return void EventHandler.removeHandler(e,l,o,r,s?n:null)}if("."===t.charAt(0))for(const n in l)Object.prototype.hasOwnProperty.call(l,n)&&EventHandler.removeNamespacedHandlers(e,l,n,t.substr(1));const c=l[o]||{};for(const n in c){if(!Object.prototype.hasOwnProperty.call(c,n))continue;const i=n.replace(EventHandler.STRIPUID_REGEX,"");if(!a||t.indexOf(i)>-1){const t=c[n];EventHandler.removeHandler(e,l,o,t.originalHandler,t.delegationSelector)}}}static trigger(e,t,n){if("string"!=typeof t||null==e)return null;const i=t.replace(EventHandler.STRIPNAME_REGEX,""),s="string"==typeof r[i],o=!0;let a=null;return s?(a=document.createEvent("HTMLEvents"),a.initEvent(i,o,!0)):a=new window.CustomEvent(t,{bubbles:o,cancelable:!0}),void 0!==n&&Object.keys(n).forEach((e=>{Object.defineProperty(a,e,{get:()=>n[e]})})),e.dispatchEvent(a),a}}class Accordion extends AbstractComponent{static NAME=`${n.KEY_PREFIX}-accordion`;static DATA_KEY=`${n.KEY_PREFIX}.accordion`;static EVENT_KEY=`.${Accordion.DATA_KEY}`;static ACTIONS={expand:"accordion-expand",collapse:"accordion-collapse"};static SELECTOR={default:`.${Accordion.NAME}`,details:`details.${Accordion.NAME}-item`,expandAllBtn:`.${Accordion.NAME}__action[data-${Accordion.ACTIONS.expand}]`,collapseAllBtn:`.${Accordion.NAME}__action[data-${Accordion.ACTIONS.collapse}]`};constructor(e){super(Accordion,e),t.setData(e,Accordion.DATA_KEY,this),this.root=e,this.details=this.root.querySelectorAll(Accordion.SELECTOR.details),this.expandAllBtn=this.root.querySelector(Accordion.SELECTOR.expandAllBtn),this.collapseAllBtn=this.root.querySelector(Accordion.SELECTOR.collapseAllBtn),this.setListeners()}static init(e={}){return super.init(this,e,Accordion.SELECTOR.default)}dispose(){t.removeData(this.element,Accordion.DATA_KEY);for(let e=0,t=this.details.length;e<t;e++)EventHandler.off(this.details[e],"toggle");EventHandler.off(this.expandAllBtn,"click"),EventHandler.off(this.expandAllBtn,"click"),this.element=null}static getInstance(e){return t.getData(e,Accordion.DATA_KEY)}setListeners(){for(let e=0,t=this.details.length;e<t;e++)EventHandler.on(this.details[e],"toggle",this.toggleExclusiveAccordion(this.details[e]));EventHandler.on(this.expandAllBtn,"click",this.clickOnAction(Accordion.ACTIONS.expand)),EventHandler.on(this.collapseAllBtn,"click",this.clickOnAction(Accordion.ACTIONS.collapse))}toggleExclusiveAccordion(e){return t=>{const n=e.getAttribute("name");"open"===t.newState&&this.root.querySelectorAll(`${Accordion.SELECTOR.details}[name=${n}][open]`).forEach((t=>{t!==e&&t.removeAttribute("open")}))}}clickOnAction(e){return()=>{this.details.forEach((t=>{e===Accordion.ACTIONS.expand?t.setAttribute("open",""):t.removeAttribute("open")}))}}}a={},function(e,t){function n(){this._delay=0,this._endDelay=0,this._fill="none",this._iterationStart=0,this._iterations=1,this._duration=0,this._playbackRate=1,this._direction="normal",this._easing="linear",this._easingFunction=h}function i(){return e.isDeprecated("Invalid timing inputs","2016-03-02","TypeError exceptions will be thrown instead.",!0)}function s(t,i,s){var r=new n;return i&&(r.fill="both",r.duration="auto"),"number"!=typeof t||isNaN(t)?void 0!==t&&Object.getOwnPropertyNames(t).forEach((function(n){if("auto"!=t[n]){if(("number"==typeof r[n]||"duration"==n)&&("number"!=typeof t[n]||isNaN(t[n])))return;if("fill"==n&&-1==d.indexOf(t[n]))return;if("direction"==n&&-1==u.indexOf(t[n]))return;if("playbackRate"==n&&1!==t[n]&&e.isDeprecated("AnimationEffectTiming.playbackRate","2014-11-28","Use Animation.playbackRate instead."))return;r[n]=t[n]}})):r.duration=t,r}function r(e,t,n,i){return e<0||e>1||n<0||n>1?h:function(s){function r(e,t,n){return 3*e*(1-n)*(1-n)*n+3*t*(1-n)*n*n+n*n*n}if(s<=0){var o=0;return e>0?o=t/e:!t&&n>0&&(o=i/n),o*s}if(s>=1){var a=0;return n<1?a=(i-1)/(n-1):1==n&&e<1&&(a=(t-1)/(e-1)),1+a*(s-1)}for(var l=0,c=1;l<c;){var d=(l+c)/2,u=r(e,n,d);if(Math.abs(s-u)<1e-5)return r(t,i,d);u<s?l=d:c=d}return r(t,i,d)}}function o(e,t){return function(n){if(n>=1)return 1;var i=1/e;return(n+=t*i)-n%i}}function a(e){g||(g=document.createElement("div").style),g.animationTimingFunction="",g.animationTimingFunction=e;var t=g.animationTimingFunction;if(""==t&&i())throw new TypeError(e+" is not a valid value for easing");return t}function l(e){if("linear"==e)return h;var t=v.exec(e);if(t)return r.apply(this,t.slice(1).map(Number));var n=T.exec(e);if(n)return o(Number(n[1]),E);var i=S.exec(e);return i?o(Number(i[1]),{start:m,middle:p,end:E}[i[2]]):f[e]||h}function c(e,t,n){if(null==t)return b;var i=n.delay+e+n.endDelay;return t<Math.min(n.delay,i)?_:t>=Math.min(n.delay+e,i)?y:N}var d="backwards|forwards|both|none".split("|"),u="reverse|alternate|alternate-reverse".split("|"),h=function(e){return e};n.prototype={_setMember:function(t,n){this["_"+t]=n,this._effect&&(this._effect._timingInput[t]=n,this._effect._timing=e.normalizeTimingInput(this._effect._timingInput),this._effect.activeDuration=e.calculateActiveDuration(this._effect._timing),this._effect._animation&&this._effect._animation._rebuildUnderlyingAnimation())},get playbackRate(){return this._playbackRate},set delay(e){this._setMember("delay",e)},get delay(){return this._delay},set endDelay(e){this._setMember("endDelay",e)},get endDelay(){return this._endDelay},set fill(e){this._setMember("fill",e)},get fill(){return this._fill},set iterationStart(e){if((isNaN(e)||e<0)&&i())throw new TypeError("iterationStart must be a non-negative number, received: "+e);this._setMember("iterationStart",e)},get iterationStart(){return this._iterationStart},set duration(e){if("auto"!=e&&(isNaN(e)||e<0)&&i())throw new TypeError("duration must be non-negative or auto, received: "+e);this._setMember("duration",e)},get duration(){return this._duration},set direction(e){this._setMember("direction",e)},get direction(){return this._direction},set easing(e){this._easingFunction=l(a(e)),this._setMember("easing",e)},get easing(){return this._easing},set iterations(e){if((isNaN(e)||e<0)&&i())throw new TypeError("iterations must be non-negative, received: "+e);this._setMember("iterations",e)},get iterations(){return this._iterations}};var m=1,p=.5,E=0,f={ease:r(.25,.1,.25,1),"ease-in":r(.42,0,1,1),"ease-out":r(0,0,.58,1),"ease-in-out":r(.42,0,.58,1),"step-start":o(1,m),"step-middle":o(1,p),"step-end":o(1,E)},g=null,A="\\s*(-?\\d+\\.?\\d*|-?\\.\\d+)\\s*",v=new RegExp("cubic-bezier\\("+A+","+A+","+A+","+A+"\\)"),T=/steps\(\s*(\d+)\s*\)/,S=/steps\(\s*(\d+)\s*,\s*(start|middle|end)\s*\)/,b=0,_=1,y=2,N=3;e.cloneTimingInput=function(e){if("number"==typeof e)return e;var t={};for(var n in e)t[n]=e[n];return t},e.makeTiming=s,e.numericTimingToObject=function(e){return"number"==typeof e&&(e=isNaN(e)?{duration:0}:{duration:e}),e},e.normalizeTimingInput=function(t,n){return s(t=e.numericTimingToObject(t),n)},e.calculateActiveDuration=function(e){return Math.abs(function(e){return 0===e.duration||0===e.iterations?0:e.duration*e.iterations}(e)/e.playbackRate)},e.calculateIterationProgress=function(e,t,n){var i=c(e,t,n),s=function(e,t,n,i,s){switch(i){case _:return"backwards"==t||"both"==t?0:null;case N:return n-s;case y:return"forwards"==t||"both"==t?e:null;case b:return null}}(e,n.fill,t,i,n.delay);if(null===s)return null;var r=function(e,t,n,i,s){var r=s;return 0===e?t!==_&&(r+=n):r+=i/e,r}(n.duration,i,n.iterations,s,n.iterationStart),o=function(e,t,n,i,s,r){var o=e===1/0?t%1:e%1;return 0!==o||n!==y||0===i||0===s&&0!==r||(o=1),o}(r,n.iterationStart,i,n.iterations,s,n.duration),a=function(e,t,n,i){return e===y&&t===1/0?1/0:1===n?Math.floor(i)-1:Math.floor(i)}(i,n.iterations,o,r),l=function(e,t,n){var i=e;if("normal"!==e&&"reverse"!==e){var s=t;"alternate-reverse"===e&&(s+=1),i="normal",s!==1/0&&s%2!=0&&(i="reverse")}return"normal"===i?n:1-n}(n.direction,a,o);return n._easingFunction(l)},e.calculatePhase=c,e.normalizeEasing=a,e.parseEasingFunction=l}(o={}),function(e,t){function n(e,t){return e in l&&l[e][t]||t}function i(e,t,i){if(!function(e){return"display"===e||0===e.lastIndexOf("animation",0)||0===e.lastIndexOf("transition",0)}(e)){var s=r[e];if(s)for(var a in o.style[e]=t,s){var l=s[a],c=o.style[l];i[l]=n(l,c)}else i[e]=n(e,t)}}function s(e){var t=[];for(var n in e)if(!(n in["easing","offset","composite"])){var i=e[n];Array.isArray(i)||(i=[i]);for(var s,r=i.length,o=0;o<r;o++)(s={}).offset="offset"in e?e.offset:1==r?1:o/(r-1),"easing"in e&&(s.easing=e.easing),"composite"in e&&(s.composite=e.composite),s[n]=i[o],t.push(s)}return t.sort((function(e,t){return e.offset-t.offset})),t}var r={background:["backgroundImage","backgroundPosition","backgroundSize","backgroundRepeat","backgroundAttachment","backgroundOrigin","backgroundClip","backgroundColor"],border:["borderTopColor","borderTopStyle","borderTopWidth","borderRightColor","borderRightStyle","borderRightWidth","borderBottomColor","borderBottomStyle","borderBottomWidth","borderLeftColor","borderLeftStyle","borderLeftWidth"],borderBottom:["borderBottomWidth","borderBottomStyle","borderBottomColor"],borderColor:["borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"],borderLeft:["borderLeftWidth","borderLeftStyle","borderLeftColor"],borderRadius:["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"],borderRight:["borderRightWidth","borderRightStyle","borderRightColor"],borderTop:["borderTopWidth","borderTopStyle","borderTopColor"],borderWidth:["borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth"],flex:["flexGrow","flexShrink","flexBasis"],font:["fontFamily","fontSize","fontStyle","fontVariant","fontWeight","lineHeight"],margin:["marginTop","marginRight","marginBottom","marginLeft"],outline:["outlineColor","outlineStyle","outlineWidth"],padding:["paddingTop","paddingRight","paddingBottom","paddingLeft"]},o=document.createElementNS("http://www.w3.org/1999/xhtml","div"),a={thin:"1px",medium:"3px",thick:"5px"},l={borderBottomWidth:a,borderLeftWidth:a,borderRightWidth:a,borderTopWidth:a,fontSize:{"xx-small":"60%","x-small":"75%",small:"89%",medium:"100%",large:"120%","x-large":"150%","xx-large":"200%"},fontWeight:{normal:"400",bold:"700"},outlineWidth:a,textShadow:{none:"0px 0px 0px transparent"},boxShadow:{none:"0px 0px 0px 0px transparent"}};e.convertToArrayForm=s,e.normalizeKeyframes=function(t){if(null==t)return[];window.Symbol&&Symbol.iterator&&Array.prototype.from&&t[Symbol.iterator]&&(t=Array.from(t)),Array.isArray(t)||(t=s(t));for(var n=t.map((function(t){var n={};for(var s in t){var r=t[s];if("offset"==s){if(null!=r){if(r=Number(r),!isFinite(r))throw new TypeError("Keyframe offsets must be numbers.");if(r<0||r>1)throw new TypeError("Keyframe offsets must be between 0 and 1.")}}else if("composite"==s){if("add"==r||"accumulate"==r)throw{type:DOMException.NOT_SUPPORTED_ERR,name:"NotSupportedError",message:"add compositing is not supported"};if("replace"!=r)throw new TypeError("Invalid composite mode "+r+".")}else r="easing"==s?e.normalizeEasing(r):""+r;i(s,r,n)}return null==n.offset&&(n.offset=null),null==n.easing&&(n.easing="linear"),n})),r=!0,o=-1/0,a=0;a<n.length;a++){var l=n[a].offset;if(null!=l){if(l<o)throw new TypeError("Keyframes are not loosely sorted by offset. Sort or specify offsets.");o=l}else r=!1}return n=n.filter((function(e){return e.offset>=0&&e.offset<=1})),r||function(){var e=n.length;null==n[e-1].offset&&(n[e-1].offset=1),e>1&&null==n[0].offset&&(n[0].offset=0);for(var t=0,i=n[0].offset,s=1;s<e;s++){var r=n[s].offset;if(null!=r){for(var o=1;o<s-t;o++)n[t+o].offset=i+(r-i)*o/(s-t);t=s,i=r}}}(),n}}(o),function(e){var t={};e.isDeprecated=function(e,n,i,s){var r=s?"are":"is",o=new Date,a=new Date(n);return a.setMonth(a.getMonth()+3),!(o<a&&(e in t||console.warn("Web Animations: "+e+" "+r+" deprecated and will stop working on "+a.toDateString()+". "+i),t[e]=!0,1))},e.deprecated=function(t,n,i,s){var r=s?"are":"is";if(e.isDeprecated(t,n,i,s))throw new Error(t+" "+r+" no longer supported. "+i)}}(o),function(){if(document.documentElement.animate){var e=document.documentElement.animate([],0),t=!0;if(e&&(t=!1,"play|currentTime|pause|reverse|playbackRate|cancel|finish|startTime|playState".split("|").forEach((function(n){void 0===e[n]&&(t=!0)}))),!t)return}!function(e,t,n){t.convertEffectInput=function(n){var i=function(e){for(var t={},n=0;n<e.length;n++)for(var i in e[n])if("offset"!=i&&"easing"!=i&&"composite"!=i){var s={offset:e[n].offset,easing:e[n].easing,value:e[n][i]};t[i]=t[i]||[],t[i].push(s)}for(var r in t){var o=t[r];if(0!=o[0].offset||1!=o[o.length-1].offset)throw{type:DOMException.NOT_SUPPORTED_ERR,name:"NotSupportedError",message:"Partial keyframes are not supported"}}return t}(e.normalizeKeyframes(n)),s=function(n){var i=[];for(var s in n)for(var r=n[s],o=0;o<r.length-1;o++){var a=o,l=o+1,c=r[a].offset,d=r[l].offset,u=c,h=d;0==o&&(u=-1/0,0==d&&(l=a)),o==r.length-2&&(h=1/0,1==c&&(a=l)),i.push({applyFrom:u,applyTo:h,startOffset:r[a].offset,endOffset:r[l].offset,easingFunction:e.parseEasingFunction(r[a].easing),property:s,interpolation:t.propertyInterpolation(s,r[a].value,r[l].value)})}return i.sort((function(e,t){return e.startOffset-t.startOffset})),i}(i);return function(e,n){if(null!=n)s.filter((function(e){return n>=e.applyFrom&&n<e.applyTo})).forEach((function(i){var s=n-i.startOffset,r=i.endOffset-i.startOffset,o=0==r?0:i.easingFunction(s/r);t.apply(e,i.property,i.interpolation(o))}));else for(var r in i)"offset"!=r&&"easing"!=r&&"composite"!=r&&t.clear(e,r)}}}(o,a),function(e,t,n){function i(e){return e.replace(/-(.)/g,(function(e,t){return t.toUpperCase()}))}function s(e,t,n){r[n]=r[n]||[],r[n].push([e,t])}var r={};t.addPropertiesHandler=function(e,t,n){for(var r=0;r<n.length;r++)s(e,t,i(n[r]))};var o={backgroundColor:"transparent",backgroundPosition:"0% 0%",borderBottomColor:"currentColor",borderBottomLeftRadius:"0px",borderBottomRightRadius:"0px",borderBottomWidth:"3px",borderLeftColor:"currentColor",borderLeftWidth:"3px",borderRightColor:"currentColor",borderRightWidth:"3px",borderSpacing:"2px",borderTopColor:"currentColor",borderTopLeftRadius:"0px",borderTopRightRadius:"0px",borderTopWidth:"3px",bottom:"auto",clip:"rect(0px, 0px, 0px, 0px)",color:"black",fontSize:"100%",fontWeight:"400",height:"auto",left:"auto",letterSpacing:"normal",lineHeight:"120%",marginBottom:"0px",marginLeft:"0px",marginRight:"0px",marginTop:"0px",maxHeight:"none",maxWidth:"none",minHeight:"0px",minWidth:"0px",opacity:"1.0",outlineColor:"invert",outlineOffset:"0px",outlineWidth:"3px",paddingBottom:"0px",paddingLeft:"0px",paddingRight:"0px",paddingTop:"0px",right:"auto",strokeDasharray:"none",strokeDashoffset:"0px",textIndent:"0px",textShadow:"0px 0px 0px transparent",top:"auto",transform:"",verticalAlign:"0px",visibility:"visible",width:"auto",wordSpacing:"normal",zIndex:"auto"};t.propertyInterpolation=function(n,s,a){var l=n;/-/.test(n)&&!e.isDeprecated("Hyphenated property names","2016-03-22","Use camelCase instead.",!0)&&(l=i(n)),"initial"!=s&&"initial"!=a||("initial"==s&&(s=o[l]),"initial"==a&&(a=o[l]));for(var c=s==a?[]:r[l],d=0;c&&d<c.length;d++){var u=c[d][0](s),h=c[d][0](a);if(void 0!==u&&void 0!==h){var m=c[d][1](u,h);if(m){var p=t.Interpolation.apply(null,m);return function(e){return 0==e?s:1==e?a:p(e)}}}}return t.Interpolation(!1,!0,(function(e){return e?a:s}))}}(o,a),function(e,t,n){t.KeyframeEffect=function(n,i,s,r){var o,a=function(t){var n=e.calculateActiveDuration(t),i=function(i){return e.calculateIterationProgress(n,i,t)};return i._totalDuration=t.delay+n+t.endDelay,i}(e.normalizeTimingInput(s)),l=t.convertEffectInput(i),c=function(){l(n,o)};return c._update=function(e){return null!==(o=a(e))},c._clear=function(){l(n,null)},c._hasSameTarget=function(e){return n===e},c._target=n,c._totalDuration=a._totalDuration,c._id=r,c}}(o,a),function(e,t){function n(e,t,n){n.enumerable=!0,n.configurable=!0,Object.defineProperty(e,t,n)}function i(e){this._element=e,this._surrogateStyle=document.createElementNS("http://www.w3.org/1999/xhtml","div").style,this._style=e.style,this._length=0,this._isAnimatedProperty={},this._updateSvgTransformAttr=function(e,t){return!(!t.namespaceURI||-1==t.namespaceURI.indexOf("/svg"))&&(r in e||(e[r]=/Trident|MSIE|IEMobile|Edge|Android 4/i.test(e.navigator.userAgent)),e[r])}(window,e),this._savedTransformAttr=null;for(var t=0;t<this._style.length;t++){var n=this._style[t];this._surrogateStyle[n]=this._style[n]}this._updateIndices()}function s(e){if(!e._webAnimationsPatchedStyle){var t=new i(e);try{n(e,"style",{get:function(){return t}})}catch(t){e.style._set=function(t,n){e.style[t]=n},e.style._clear=function(t){e.style[t]=""}}e._webAnimationsPatchedStyle=e.style}}var r="_webAnimationsUpdateSvgTransformAttr",o={cssText:1,length:1,parentRule:1},a={getPropertyCSSValue:1,getPropertyPriority:1,getPropertyValue:1,item:1,removeProperty:1,setProperty:1},l={removeProperty:1,setProperty:1};for(var c in i.prototype={get cssText(){return this._surrogateStyle.cssText},set cssText(e){for(var t={},n=0;n<this._surrogateStyle.length;n++)t[this._surrogateStyle[n]]=!0;for(this._surrogateStyle.cssText=e,this._updateIndices(),n=0;n<this._surrogateStyle.length;n++)t[this._surrogateStyle[n]]=!0;for(var i in t)this._isAnimatedProperty[i]||this._style.setProperty(i,this._surrogateStyle.getPropertyValue(i))},get length(){return this._surrogateStyle.length},get parentRule(){return this._style.parentRule},_updateIndices:function(){for(;this._length<this._surrogateStyle.length;)Object.defineProperty(this,this._length,{configurable:!0,enumerable:!1,get:function(e){return function(){return this._surrogateStyle[e]}}(this._length)}),this._length++;for(;this._length>this._surrogateStyle.length;)this._length--,Object.defineProperty(this,this._length,{configurable:!0,enumerable:!1,value:void 0})},_set:function(t,n){this._style[t]=n,this._isAnimatedProperty[t]=!0,this._updateSvgTransformAttr&&"transform"==e.unprefixedPropertyName(t)&&(null==this._savedTransformAttr&&(this._savedTransformAttr=this._element.getAttribute("transform")),this._element.setAttribute("transform",e.transformToSvgMatrix(n)))},_clear:function(t){this._style[t]=this._surrogateStyle[t],this._updateSvgTransformAttr&&"transform"==e.unprefixedPropertyName(t)&&(this._savedTransformAttr?this._element.setAttribute("transform",this._savedTransformAttr):this._element.removeAttribute("transform"),this._savedTransformAttr=null),delete this._isAnimatedProperty[t]}},a)i.prototype[c]=function(e,t){return function(){var n=this._surrogateStyle[e].apply(this._surrogateStyle,arguments);return t&&(this._isAnimatedProperty[arguments[0]]||this._style[e].apply(this._style,arguments),this._updateIndices()),n}}(c,c in l);for(var d in document.documentElement.style)d in o||d in a||function(e){n(i.prototype,e,{get:function(){return this._surrogateStyle[e]},set:function(t){this._surrogateStyle[e]=t,this._updateIndices(),this._isAnimatedProperty&&!this._isAnimatedProperty[e]&&(this._style[e]=t)}})}(d);e.apply=function(t,n,i){s(t),t.style._set(e.propertyName(n),i)},e.clear=function(t,n){t._webAnimationsPatchedStyle&&t.style._clear(e.propertyName(n))}}(a),function(e){window.Element.prototype.animate=function(t,n){var i="";return n&&n.id&&(i=n.id),e.timeline._play(e.KeyframeEffect(this,t,n,i))}}(a),function(e,t){function n(e,t,i){if("number"==typeof e&&"number"==typeof t)return e*(1-i)+t*i;if("boolean"==typeof e&&"boolean"==typeof t)return i<.5?e:t;if(e.length==t.length){for(var s=[],r=0;r<e.length;r++)s.push(n(e[r],t[r],i));return s}throw"Mismatched interpolation arguments "+e+":"+t}e.Interpolation=function(e,t,i){return function(s){return i(n(e,t,s))}}}(a),function(e,t){var n=function(){function e(e,t){for(var n=[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],i=0;i<4;i++)for(var s=0;s<4;s++)for(var r=0;r<4;r++)n[i][s]+=t[i][r]*e[r][s];return n}return function(t,n,i,s,r){for(var o=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]],a=0;a<4;a++)o[a][3]=r[a];for(a=0;a<3;a++)for(var l=0;l<3;l++)o[3][a]+=t[l]*o[l][a];var c=s[0],d=s[1],u=s[2],h=s[3],m=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];m[0][0]=1-2*(d*d+u*u),m[0][1]=2*(c*d-u*h),m[0][2]=2*(c*u+d*h),m[1][0]=2*(c*d+u*h),m[1][1]=1-2*(c*c+u*u),m[1][2]=2*(d*u-c*h),m[2][0]=2*(c*u-d*h),m[2][1]=2*(d*u+c*h),m[2][2]=1-2*(c*c+d*d),o=e(o,m);var p=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];for(i[2]&&(p[2][1]=i[2],o=e(o,p)),i[1]&&(p[2][1]=0,p[2][0]=i[0],o=e(o,p)),i[0]&&(p[2][0]=0,p[1][0]=i[0],o=e(o,p)),a=0;a<3;a++)for(l=0;l<3;l++)o[a][l]*=n[a];return function(e){return 0==e[0][2]&&0==e[0][3]&&0==e[1][2]&&0==e[1][3]&&0==e[2][0]&&0==e[2][1]&&1==e[2][2]&&0==e[2][3]&&0==e[3][2]&&1==e[3][3]}(o)?[o[0][0],o[0][1],o[1][0],o[1][1],o[3][0],o[3][1]]:o[0].concat(o[1],o[2],o[3])}}();e.composeMatrix=n,e.quat=function(t,n,i){var s=e.dot(t,n);s=function(e,t,n){return Math.max(Math.min(e,n),t)}(s,-1,1);var r=[];if(1===s)r=t;else for(var o=Math.acos(s),a=1*Math.sin(i*o)/Math.sqrt(1-s*s),l=0;l<4;l++)r.push(t[l]*(Math.cos(i*o)-s*a)+n[l]*a);return r}}(a),function(e,t,n){e.sequenceNumber=0;var i=function(e,t,n){this.target=e,this.currentTime=t,this.timelineTime=n,this.type="finish",this.bubbles=!1,this.cancelable=!1,this.currentTarget=e,this.defaultPrevented=!1,this.eventPhase=Event.AT_TARGET,this.timeStamp=Date.now()};t.Animation=function(t){this.id="",t&&t._id&&(this.id=t._id),this._sequenceNumber=e.sequenceNumber++,this._currentTime=0,this._startTime=null,this._paused=!1,this._playbackRate=1,this._inTimeline=!0,this._finishedFlag=!0,this.onfinish=null,this._finishHandlers=[],this._effect=t,this._inEffect=this._effect._update(0),this._idle=!0,this._currentTimePending=!1},t.Animation.prototype={_ensureAlive:function(){this.playbackRate<0&&0===this.currentTime?this._inEffect=this._effect._update(-1):this._inEffect=this._effect._update(this.currentTime),this._inTimeline||!this._inEffect&&this._finishedFlag||(this._inTimeline=!0,t.timeline._animations.push(this))},_tickCurrentTime:function(e,t){e!=this._currentTime&&(this._currentTime=e,this._isFinished&&!t&&(this._currentTime=this._playbackRate>0?this._totalDuration:0),this._ensureAlive())},get currentTime(){return this._idle||this._currentTimePending?null:this._currentTime},set currentTime(e){e=+e,isNaN(e)||(t.restart(),this._paused||null==this._startTime||(this._startTime=this._timeline.currentTime-e/this._playbackRate),this._currentTimePending=!1,this._currentTime!=e&&(this._idle&&(this._idle=!1,this._paused=!0),this._tickCurrentTime(e,!0),t.applyDirtiedAnimation(this)))},get startTime(){return this._startTime},set startTime(e){e=+e,isNaN(e)||this._paused||this._idle||(this._startTime=e,this._tickCurrentTime((this._timeline.currentTime-this._startTime)*this.playbackRate),t.applyDirtiedAnimation(this))},get playbackRate(){return this._playbackRate},set playbackRate(e){if(e!=this._playbackRate){var n=this.currentTime;this._playbackRate=e,this._startTime=null,"paused"!=this.playState&&"idle"!=this.playState&&(this._finishedFlag=!1,this._idle=!1,this._ensureAlive(),t.applyDirtiedAnimation(this)),null!=n&&(this.currentTime=n)}},get _isFinished(){return!this._idle&&(this._playbackRate>0&&this._currentTime>=this._totalDuration||this._playbackRate<0&&this._currentTime<=0)},get _totalDuration(){return this._effect._totalDuration},get playState(){return this._idle?"idle":null==this._startTime&&!this._paused&&0!=this.playbackRate||this._currentTimePending?"pending":this._paused?"paused":this._isFinished?"finished":"running"},_rewind:function(){if(this._playbackRate>=0)this._currentTime=0;else{if(!(this._totalDuration<1/0))throw new DOMException("Unable to rewind negative playback rate animation with infinite duration","InvalidStateError");this._currentTime=this._totalDuration}},play:function(){this._paused=!1,(this._isFinished||this._idle)&&(this._rewind(),this._startTime=null),this._finishedFlag=!1,this._idle=!1,this._ensureAlive(),t.applyDirtiedAnimation(this)},pause:function(){this._isFinished||this._paused||this._idle?this._idle&&(this._rewind(),this._idle=!1):this._currentTimePending=!0,this._startTime=null,this._paused=!0},finish:function(){this._idle||(this.currentTime=this._playbackRate>0?this._totalDuration:0,this._startTime=this._totalDuration-this.currentTime,this._currentTimePending=!1,t.applyDirtiedAnimation(this))},cancel:function(){this._inEffect&&(this._inEffect=!1,this._idle=!0,this._paused=!1,this._finishedFlag=!0,this._currentTime=0,this._startTime=null,this._effect._update(null),t.applyDirtiedAnimation(this))},reverse:function(){this.playbackRate*=-1,this.play()},addEventListener:function(e,t){"function"==typeof t&&"finish"==e&&this._finishHandlers.push(t)},removeEventListener:function(e,t){if("finish"==e){var n=this._finishHandlers.indexOf(t);n>=0&&this._finishHandlers.splice(n,1)}},_fireEvents:function(e){if(this._isFinished){if(!this._finishedFlag){var t=new i(this,this._currentTime,e),n=this._finishHandlers.concat(this.onfinish?[this.onfinish]:[]);setTimeout((function(){n.forEach((function(e){e.call(t.target,t)}))}),0),this._finishedFlag=!0}}else this._finishedFlag=!1},_tick:function(e,t){this._idle||this._paused||(null==this._startTime?t&&(this.startTime=e-this._currentTime/this.playbackRate):this._isFinished||this._tickCurrentTime((e-this._startTime)*this.playbackRate)),t&&(this._currentTimePending=!1,this._fireEvents(e))},get _needsTick(){return this.playState in{pending:1,running:1}||!this._finishedFlag},_targetAnimations:function(){var e=this._effect._target;return e._activeAnimations||(e._activeAnimations=[]),e._activeAnimations},_markTarget:function(){var e=this._targetAnimations();-1===e.indexOf(this)&&e.push(this)},_unmarkTarget:function(){var e=this._targetAnimations(),t=e.indexOf(this);-1!==t&&e.splice(t,1)}}}(o,a),function(e,t,n){function i(e){var t=c;c=[],e<E.currentTime&&(e=E.currentTime),E._animations.sort(s),E._animations=a(e,!0,E._animations)[0],t.forEach((function(t){t[1](e)})),o()}function s(e,t){return e._sequenceNumber-t._sequenceNumber}function r(){this._animations=[],this.currentTime=window.performance&&performance.now?performance.now():0}function o(){m.forEach((function(e){e()})),m.length=0}function a(e,n,i){p=!0,h=!1,t.timeline.currentTime=e,u=!1;var s=[],r=[],o=[],a=[];return i.forEach((function(t){t._tick(e,n),t._inEffect?(r.push(t._effect),t._markTarget()):(s.push(t._effect),t._unmarkTarget()),t._needsTick&&(u=!0);var i=t._inEffect||t._needsTick;t._inTimeline=i,i?o.push(t):a.push(t)})),m.push.apply(m,s),m.push.apply(m,r),u&&requestAnimationFrame((function(){})),p=!1,[o,a]}var l=window.requestAnimationFrame,c=[],d=0;window.requestAnimationFrame=function(e){var t=d++;return 0==c.length&&l(i),c.push([t,e]),t},window.cancelAnimationFrame=function(e){c.forEach((function(t){t[0]==e&&(t[1]=function(){})}))},r.prototype={_play:function(n){n._timing=e.normalizeTimingInput(n.timing);var i=new t.Animation(n);return i._idle=!1,i._timeline=this,this._animations.push(i),t.restart(),t.applyDirtiedAnimation(i),i}};var u=!1,h=!1;t.restart=function(){return u||(u=!0,requestAnimationFrame((function(){})),h=!0),h},t.applyDirtiedAnimation=function(e){if(!p){e._markTarget();var n=e._targetAnimations();n.sort(s),a(t.timeline.currentTime,!1,n.slice())[1].forEach((function(e){var t=E._animations.indexOf(e);-1!==t&&E._animations.splice(t,1)})),o()}};var m=[],p=!1,E=new r;t.timeline=E}(o,a),function(e,t){function n(e,t){for(var n=0,i=0;i<e.length;i++)n+=e[i]*t[i];return n}function i(e,t){return[e[0]*t[0]+e[4]*t[1]+e[8]*t[2]+e[12]*t[3],e[1]*t[0]+e[5]*t[1]+e[9]*t[2]+e[13]*t[3],e[2]*t[0]+e[6]*t[1]+e[10]*t[2]+e[14]*t[3],e[3]*t[0]+e[7]*t[1]+e[11]*t[2]+e[15]*t[3],e[0]*t[4]+e[4]*t[5]+e[8]*t[6]+e[12]*t[7],e[1]*t[4]+e[5]*t[5]+e[9]*t[6]+e[13]*t[7],e[2]*t[4]+e[6]*t[5]+e[10]*t[6]+e[14]*t[7],e[3]*t[4]+e[7]*t[5]+e[11]*t[6]+e[15]*t[7],e[0]*t[8]+e[4]*t[9]+e[8]*t[10]+e[12]*t[11],e[1]*t[8]+e[5]*t[9]+e[9]*t[10]+e[13]*t[11],e[2]*t[8]+e[6]*t[9]+e[10]*t[10]+e[14]*t[11],e[3]*t[8]+e[7]*t[9]+e[11]*t[10]+e[15]*t[11],e[0]*t[12]+e[4]*t[13]+e[8]*t[14]+e[12]*t[15],e[1]*t[12]+e[5]*t[13]+e[9]*t[14]+e[13]*t[15],e[2]*t[12]+e[6]*t[13]+e[10]*t[14]+e[14]*t[15],e[3]*t[12]+e[7]*t[13]+e[11]*t[14]+e[15]*t[15]]}function s(e){var t=e.rad||0;return((e.deg||0)/360+(e.grad||0)/400+(e.turn||0))*(2*Math.PI)+t}function r(e){switch(e.t){case"rotatex":var t=s(e.d[0]);return[1,0,0,0,0,Math.cos(t),Math.sin(t),0,0,-Math.sin(t),Math.cos(t),0,0,0,0,1];case"rotatey":return t=s(e.d[0]),[Math.cos(t),0,-Math.sin(t),0,0,1,0,0,Math.sin(t),0,Math.cos(t),0,0,0,0,1];case"rotate":case"rotatez":return t=s(e.d[0]),[Math.cos(t),Math.sin(t),0,0,-Math.sin(t),Math.cos(t),0,0,0,0,1,0,0,0,0,1];case"rotate3d":var n=e.d[0],i=e.d[1],r=e.d[2],o=(t=s(e.d[3]),n*n+i*i+r*r);if(0===o)n=1,i=0,r=0;else if(1!==o){var a=Math.sqrt(o);n/=a,i/=a,r/=a}var l=Math.sin(t/2),c=l*Math.cos(t/2),d=l*l;return[1-2*(i*i+r*r)*d,2*(n*i*d+r*c),2*(n*r*d-i*c),0,2*(n*i*d-r*c),1-2*(n*n+r*r)*d,2*(i*r*d+n*c),0,2*(n*r*d+i*c),2*(i*r*d-n*c),1-2*(n*n+i*i)*d,0,0,0,0,1];case"scale":return[e.d[0],0,0,0,0,e.d[1],0,0,0,0,1,0,0,0,0,1];case"scalex":return[e.d[0],0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"scaley":return[1,0,0,0,0,e.d[0],0,0,0,0,1,0,0,0,0,1];case"scalez":return[1,0,0,0,0,1,0,0,0,0,e.d[0],0,0,0,0,1];case"scale3d":return[e.d[0],0,0,0,0,e.d[1],0,0,0,0,e.d[2],0,0,0,0,1];case"skew":var u=s(e.d[0]),h=s(e.d[1]);return[1,Math.tan(h),0,0,Math.tan(u),1,0,0,0,0,1,0,0,0,0,1];case"skewx":return t=s(e.d[0]),[1,0,0,0,Math.tan(t),1,0,0,0,0,1,0,0,0,0,1];case"skewy":return t=s(e.d[0]),[1,Math.tan(t),0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"translate":return[1,0,0,0,0,1,0,0,0,0,1,0,n=e.d[0].px||0,i=e.d[1].px||0,0,1];case"translatex":return[1,0,0,0,0,1,0,0,0,0,1,0,n=e.d[0].px||0,0,0,1];case"translatey":return[1,0,0,0,0,1,0,0,0,0,1,0,0,i=e.d[0].px||0,0,1];case"translatez":return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,r=e.d[0].px||0,1];case"translate3d":return[1,0,0,0,0,1,0,0,0,0,1,0,n=e.d[0].px||0,i=e.d[1].px||0,r=e.d[2].px||0,1];case"perspective":return[1,0,0,0,0,1,0,0,0,0,1,e.d[0].px?-1/e.d[0].px:0,0,0,0,1];case"matrix":return[e.d[0],e.d[1],0,0,e.d[2],e.d[3],0,0,0,0,1,0,e.d[4],e.d[5],0,1];case"matrix3d":return e.d}}function o(e){return 0===e.length?[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]:e.map(r).reduce(i)}var a=function(){function e(e){return e[0][0]*e[1][1]*e[2][2]+e[1][0]*e[2][1]*e[0][2]+e[2][0]*e[0][1]*e[1][2]-e[0][2]*e[1][1]*e[2][0]-e[1][2]*e[2][1]*e[0][0]-e[2][2]*e[0][1]*e[1][0]}function t(e){var t=i(e);return[e[0]/t,e[1]/t,e[2]/t]}function i(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1]+e[2]*e[2])}function s(e,t,n,i){return[n*e[0]+i*t[0],n*e[1]+i*t[1],n*e[2]+i*t[2]]}return function(r){var o=[r.slice(0,4),r.slice(4,8),r.slice(8,12),r.slice(12,16)];if(1!==o[3][3])return null;for(var a=[],l=0;l<4;l++)a.push(o[l].slice());for(l=0;l<3;l++)a[l][3]=0;if(0===e(a))return null;var c,d=[];o[0][3]||o[1][3]||o[2][3]?(d.push(o[0][3]),d.push(o[1][3]),d.push(o[2][3]),d.push(o[3][3]),c=function(e,t){for(var n=[],i=0;i<4;i++){for(var s=0,r=0;r<4;r++)s+=e[r]*t[r][i];n.push(s)}return n}(d,function(e){return[[e[0][0],e[1][0],e[2][0],e[3][0]],[e[0][1],e[1][1],e[2][1],e[3][1]],[e[0][2],e[1][2],e[2][2],e[3][2]],[e[0][3],e[1][3],e[2][3],e[3][3]]]}(function(t){for(var n=1/e(t),i=t[0][0],s=t[0][1],r=t[0][2],o=t[1][0],a=t[1][1],l=t[1][2],c=t[2][0],d=t[2][1],u=t[2][2],h=[[(a*u-l*d)*n,(r*d-s*u)*n,(s*l-r*a)*n,0],[(l*c-o*u)*n,(i*u-r*c)*n,(r*o-i*l)*n,0],[(o*d-a*c)*n,(c*s-i*d)*n,(i*a-s*o)*n,0]],m=[],p=0;p<3;p++){for(var E=0,f=0;f<3;f++)E+=t[3][f]*h[f][p];m.push(E)}return m.push(1),h.push(m),h}(a)))):c=[0,0,0,1];var u=o[3].slice(0,3),h=[];h.push(o[0].slice(0,3));var m=[];m.push(i(h[0])),h[0]=t(h[0]);var p=[];h.push(o[1].slice(0,3)),p.push(n(h[0],h[1])),h[1]=s(h[1],h[0],1,-p[0]),m.push(i(h[1])),h[1]=t(h[1]),p[0]/=m[1],h.push(o[2].slice(0,3)),p.push(n(h[0],h[2])),h[2]=s(h[2],h[0],1,-p[1]),p.push(n(h[1],h[2])),h[2]=s(h[2],h[1],1,-p[2]),m.push(i(h[2])),h[2]=t(h[2]),p[1]/=m[2],p[2]/=m[2];var E=function(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}(h[1],h[2]);if(n(h[0],E)<0)for(l=0;l<3;l++)m[l]*=-1,h[l][0]*=-1,h[l][1]*=-1,h[l][2]*=-1;var f,g,A=h[0][0]+h[1][1]+h[2][2]+1;return A>1e-4?(f=.5/Math.sqrt(A),g=[(h[2][1]-h[1][2])*f,(h[0][2]-h[2][0])*f,(h[1][0]-h[0][1])*f,.25/f]):h[0][0]>h[1][1]&&h[0][0]>h[2][2]?g=[.25*(f=2*Math.sqrt(1+h[0][0]-h[1][1]-h[2][2])),(h[0][1]+h[1][0])/f,(h[0][2]+h[2][0])/f,(h[2][1]-h[1][2])/f]:h[1][1]>h[2][2]?(f=2*Math.sqrt(1+h[1][1]-h[0][0]-h[2][2]),g=[(h[0][1]+h[1][0])/f,.25*f,(h[1][2]+h[2][1])/f,(h[0][2]-h[2][0])/f]):(f=2*Math.sqrt(1+h[2][2]-h[0][0]-h[1][1]),g=[(h[0][2]+h[2][0])/f,(h[1][2]+h[2][1])/f,.25*f,(h[1][0]-h[0][1])/f]),[u,m,p,g,c]}}();e.dot=n,e.makeMatrixDecomposition=function(e){return[a(o(e))]},e.transformListToMatrix=o}(a),function(e){function t(e,t){var n=e.exec(t);if(n)return[n=e.ignoreCase?n[0].toLowerCase():n[0],t.substr(n.length)]}function n(e,t){var n=e(t=t.replace(/^\s*/,""));if(n)return[n[0],n[1].replace(/^\s*/,"")]}function i(e,t,n,i,s){for(var r=[],o=[],a=[],l=function(e,t){for(var n=e,i=t;n&&i;)n>i?n%=i:i%=n;return e*t/(n+i)}(i.length,s.length),c=0;c<l;c++){var d=t(i[c%i.length],s[c%s.length]);if(!d)return;r.push(d[0]),o.push(d[1]),a.push(d[2])}return[r,o,function(t){var i=t.map((function(e,t){return a[t](e)})).join(n);return e?e(i):i}]}e.consumeToken=t,e.consumeTrimmed=n,e.consumeRepeated=function(e,i,s){e=n.bind(null,e);for(var r=[];;){var o=e(s);if(!o)return[r,s];if(r.push(o[0]),!(o=t(i,s=o[1]))||""==o[1])return[r,s];s=o[1]}},e.consumeParenthesised=function(e,t){for(var n=0,i=0;i<t.length&&(!/\s|,/.test(t[i])||0!=n);i++)if("("==t[i])n++;else if(")"==t[i]&&(0==--n&&i++,n<=0))break;var s=e(t.substr(0,i));return null==s?void 0:[s,t.substr(i)]},e.ignore=function(e){return function(t){var n=e(t);return n&&(n[0]=void 0),n}},e.optional=function(e,t){return function(n){return e(n)||[t,n]}},e.consumeList=function(t,n){for(var i=[],s=0;s<t.length;s++){var r=e.consumeTrimmed(t[s],n);if(!r||""==r[0])return;void 0!==r[0]&&i.push(r[0]),n=r[1]}if(""==n)return i},e.mergeNestedRepeated=i.bind(null,null),e.mergeWrappedNestedRepeated=i,e.mergeList=function(e,t,n){for(var i=[],s=[],r=[],o=0,a=0;a<n.length;a++)if("function"==typeof n[a]){var l=n[a](e[o],t[o++]);i.push(l[0]),s.push(l[1]),r.push(l[2])}else!function(e){i.push(!1),s.push(!1),r.push((function(){return n[e]}))}(a);return[i,s,function(e){for(var t="",n=0;n<e.length;n++)t+=r[n](e[n]);return t}]}}(a),function(e){function t(t){var n={inset:!1,lengths:[],color:null},i=e.consumeRepeated((function(t){var i=e.consumeToken(/^inset/i,t);return i?(n.inset=!0,i):(i=e.consumeLengthOrPercent(t))?(n.lengths.push(i[0]),i):(i=e.consumeColor(t))?(n.color=i[0],i):void 0}),/^/,t);if(i&&i[0].length)return[n,i[1]]}var n=function(t,n,i,s){function r(e){return{inset:e,color:[0,0,0,0],lengths:[{px:0},{px:0},{px:0},{px:0}]}}for(var o=[],a=[],l=0;l<i.length||l<s.length;l++){var c=i[l]||r(s[l].inset),d=s[l]||r(i[l].inset);o.push(c),a.push(d)}return e.mergeNestedRepeated(t,n,o,a)}.bind(null,(function(t,n){for(;t.lengths.length<Math.max(t.lengths.length,n.lengths.length);)t.lengths.push({px:0});for(;n.lengths.length<Math.max(t.lengths.length,n.lengths.length);)n.lengths.push({px:0});if(t.inset==n.inset&&!!t.color==!!n.color){for(var i,s=[],r=[[],0],o=[[],0],a=0;a<t.lengths.length;a++){var l=e.mergeDimensions(t.lengths[a],n.lengths[a],2==a);r[0].push(l[0]),o[0].push(l[1]),s.push(l[2])}if(t.color&&n.color){var c=e.mergeColors(t.color,n.color);r[1]=c[0],o[1]=c[1],i=c[2]}return[r,o,function(e){for(var n=t.inset?"inset ":" ",r=0;r<s.length;r++)n+=s[r](e[0][r])+" ";return i&&(n+=i(e[1])),n}]}}),", ");e.addPropertiesHandler((function(n){var i=e.consumeRepeated(t,/^,/,n);if(i&&""==i[1])return i[0]}),n,["box-shadow","text-shadow"])}(a),function(e,t){function n(e){return e.toFixed(3).replace(/0+$/,"").replace(/\.$/,"")}function i(e,t,n){return Math.min(t,Math.max(e,n))}function s(e){if(/^\s*[-+]?(\d*\.)?\d+\s*$/.test(e))return Number(e)}function r(e,t){return function(s,r){return[s,r,function(s){return n(i(e,t,s))}]}}function o(e){var t=e.trim().split(/\s*[\s,]\s*/);if(0!==t.length){for(var n=[],i=0;i<t.length;i++){var r=s(t[i]);if(void 0===r)return;n.push(r)}return n}}e.clamp=i,e.addPropertiesHandler(o,(function(e,t){if(e.length==t.length)return[e,t,function(e){return e.map(n).join(" ")}]}),["stroke-dasharray"]),e.addPropertiesHandler(s,r(0,1/0),["border-image-width","line-height"]),e.addPropertiesHandler(s,r(0,1),["opacity","shape-image-threshold"]),e.addPropertiesHandler(s,(function(e,t){if(0!=e)return r(0,1/0)(e,t)}),["flex-grow","flex-shrink"]),e.addPropertiesHandler(s,(function(e,t){return[e,t,function(e){return Math.round(i(1,1/0,e))}]}),["orphans","widows"]),e.addPropertiesHandler(s,(function(e,t){return[e,t,Math.round]}),["z-index"]),e.parseNumber=s,e.parseNumberList=o,e.mergeNumbers=function(e,t){return[e,t,n]},e.numberToString=n}(a),function(e,t){e.addPropertiesHandler(String,(function(e,t){if("visible"==e||"visible"==t)return[0,1,function(n){return n<=0?e:n>=1?t:"visible"}]}),["visibility"])}(a),function(e,t){function n(e){e=e.trim(),r.fillStyle="#000",r.fillStyle=e;var t=r.fillStyle;if(r.fillStyle="#fff",r.fillStyle=e,t==r.fillStyle){r.fillRect(0,0,1,1);var n=r.getImageData(0,0,1,1).data;r.clearRect(0,0,1,1);var i=n[3]/255;return[n[0]*i,n[1]*i,n[2]*i,i]}}function i(t,n){return[t,n,function(t){function n(e){return Math.max(0,Math.min(255,e))}if(t[3])for(var i=0;i<3;i++)t[i]=Math.round(n(t[i]/t[3]));return t[3]=e.numberToString(e.clamp(0,1,t[3])),"rgba("+t.join(",")+")"}]}var s=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");s.width=s.height=1;var r=s.getContext("2d");e.addPropertiesHandler(n,i,["background-color","border-bottom-color","border-left-color","border-right-color","border-top-color","color","fill","flood-color","lighting-color","outline-color","stop-color","stroke","text-decoration-color"]),e.consumeColor=e.consumeParenthesised.bind(null,n),e.mergeColors=i}(a),function(e,t){function n(e){function t(){var t=o.exec(e);r=t?t[0]:void 0}function n(){if("("!==r)return function(){var e=Number(r);return t(),e}();t();var e=s();return")"!==r?NaN:(t(),e)}function i(){for(var e=n();"*"===r||"/"===r;){var i=r;t();var s=n();"*"===i?e*=s:e/=s}return e}function s(){for(var e=i();"+"===r||"-"===r;){var n=r;t();var s=i();"+"===n?e+=s:e-=s}return e}var r,o=/([\+\-\w\.]+|[\(\)\*\/])/g;return t(),s()}function i(e,t){if("0"==(t=t.trim().toLowerCase())&&"px".search(e)>=0)return{px:0};if(/^[^(]*$|^calc/.test(t)){t=t.replace(/calc\(/g,"(");var i={};t=t.replace(e,(function(e){return i[e]=null,"U"+e}));for(var s="U("+e.source+")",r=t.replace(/[-+]?(\d*\.)?\d+([Ee][-+]?\d+)?/g,"N").replace(new RegExp("N"+s,"g"),"D").replace(/\s[+-]\s/g,"O").replace(/\s/g,""),o=[/N\*(D)/g,/(N|D)[*\/]N/g,/(N|D)O\1/g,/\((N|D)\)/g],a=0;a<o.length;)o[a].test(r)?(r=r.replace(o[a],"$1"),a=0):a++;if("D"==r){for(var l in i){var c=n(t.replace(new RegExp("U"+l,"g"),"").replace(new RegExp(s,"g"),"*0"));if(!isFinite(c))return;i[l]=c}return i}}}function s(e,t){return r(e,t,!0)}function r(t,n,i){var s,r=[];for(s in t)r.push(s);for(s in n)r.indexOf(s)<0&&r.push(s);return t=r.map((function(e){return t[e]||0})),n=r.map((function(e){return n[e]||0})),[t,n,function(t){var n=t.map((function(n,s){return 1==t.length&&i&&(n=Math.max(n,0)),e.numberToString(n)+r[s]})).join(" + ");return t.length>1?"calc("+n+")":n}]}var o="px|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc",a=i.bind(null,new RegExp(o,"g")),l=i.bind(null,new RegExp(o+"|%","g")),c=i.bind(null,/deg|rad|grad|turn/g);e.parseLength=a,e.parseLengthOrPercent=l,e.consumeLengthOrPercent=e.consumeParenthesised.bind(null,l),e.parseAngle=c,e.mergeDimensions=r;var d=e.consumeParenthesised.bind(null,a),u=e.consumeRepeated.bind(void 0,d,/^/),h=e.consumeRepeated.bind(void 0,u,/^,/);e.consumeSizePairList=h;var m=e.mergeNestedRepeated.bind(void 0,s," "),p=e.mergeNestedRepeated.bind(void 0,m,",");e.mergeNonNegativeSizePair=m,e.addPropertiesHandler((function(e){var t=h(e);if(t&&""==t[1])return t[0]}),p,["background-size"]),e.addPropertiesHandler(l,s,["border-bottom-width","border-image-width","border-left-width","border-right-width","border-top-width","flex-basis","font-size","height","line-height","max-height","max-width","outline-width","width"]),e.addPropertiesHandler(l,r,["border-bottom-left-radius","border-bottom-right-radius","border-top-left-radius","border-top-right-radius","bottom","left","letter-spacing","margin-bottom","margin-left","margin-right","margin-top","min-height","min-width","outline-offset","padding-bottom","padding-left","padding-right","padding-top","perspective","right","shape-margin","stroke-dashoffset","text-indent","top","vertical-align","word-spacing"])}(a),function(e,t){function n(t){return e.consumeLengthOrPercent(t)||e.consumeToken(/^auto/,t)}function i(t){var i=e.consumeList([e.ignore(e.consumeToken.bind(null,/^rect/)),e.ignore(e.consumeToken.bind(null,/^\(/)),e.consumeRepeated.bind(null,n,/^,/),e.ignore(e.consumeToken.bind(null,/^\)/))],t);if(i&&4==i[0].length)return i[0]}var s=e.mergeWrappedNestedRepeated.bind(null,(function(e){return"rect("+e+")"}),(function(t,n){return"auto"==t||"auto"==n?[!0,!1,function(i){var s=i?t:n;if("auto"==s)return"auto";var r=e.mergeDimensions(s,s);return r[2](r[0])}]:e.mergeDimensions(t,n)}),", ");e.parseBox=i,e.mergeBoxes=s,e.addPropertiesHandler(i,s,["clip"])}(a),function(e,t){function n(e){return function(t){var n=0;return e.map((function(e){return e===c?t[n++]:e}))}}function i(e){return e}function s(t){if("none"==(t=t.toLowerCase().trim()))return[];for(var n,i=/\s*(\w+)\(([^)]*)\)/g,s=[],r=0;n=i.exec(t);){if(n.index!=r)return;r=n.index+n[0].length;var o=n[1],a=h[o];if(!a)return;var l=n[2].split(","),c=a[0];if(c.length<l.length)return;for(var m=[],p=0;p<c.length;p++){var E,f=l[p],g=c[p];if(void 0===(E=f?{A:function(t){return"0"==t.trim()?u:e.parseAngle(t)},N:e.parseNumber,T:e.parseLengthOrPercent,L:e.parseLength}[g.toUpperCase()](f):{a:u,n:m[0],t:d}[g]))return;m.push(E)}if(s.push({t:o,d:m}),i.lastIndex==t.length)return s}}function r(e){return e.toFixed(6).replace(".000000","")}function o(t,n){if(t.decompositionPair!==n){t.decompositionPair=n;var i=e.makeMatrixDecomposition(t)}if(n.decompositionPair!==t){n.decompositionPair=t;var s=e.makeMatrixDecomposition(n)}return null==i[0]||null==s[0]?[[!1],[!0],function(e){return e?n[0].d:t[0].d}]:(i[0].push(0),s[0].push(1),[i,s,function(t){var n=e.quat(i[0][3],s[0][3],t[5]);return e.composeMatrix(t[0],t[1],t[2],n,t[4]).map(r).join(",")}])}function a(e){return e.replace(/[xy]/,"")}function l(e){return e.replace(/(x|y|z|3d)?$/,"3d")}var c=null,d={px:0},u={deg:0},h={matrix:["NNNNNN",[c,c,0,0,c,c,0,0,0,0,1,0,c,c,0,1],i],matrix3d:["NNNNNNNNNNNNNNNN",i],rotate:["A"],rotatex:["A"],rotatey:["A"],rotatez:["A"],rotate3d:["NNNA"],perspective:["L"],scale:["Nn",n([c,c,1]),i],scalex:["N",n([c,1,1]),n([c,1])],scaley:["N",n([1,c,1]),n([1,c])],scalez:["N",n([1,1,c])],scale3d:["NNN",i],skew:["Aa",null,i],skewx:["A",null,n([c,u])],skewy:["A",null,n([u,c])],translate:["Tt",n([c,c,d]),i],translatex:["T",n([c,d,d]),n([c,d])],translatey:["T",n([d,c,d]),n([d,c])],translatez:["L",n([d,d,c])],translate3d:["TTL",i]};e.addPropertiesHandler(s,(function(t,n){var i=e.makeMatrixDecomposition&&!0,s=!1;if(!t.length||!n.length){t.length||(s=!0,t=n,n=[]);for(var r=0;r<t.length;r++){var c=t[r].t,d=t[r].d,u="scale"==c.substr(0,5)?1:0;n.push({t:c,d:d.map((function(e){if("number"==typeof e)return u;var t={};for(var n in e)t[n]=u;return t}))})}}var m=function(e,t){return"perspective"==e&&"perspective"==t||("matrix"==e||"matrix3d"==e)&&("matrix"==t||"matrix3d"==t)},p=[],E=[],f=[];if(t.length!=n.length){if(!i)return;p=[(_=o(t,n))[0]],E=[_[1]],f=[["matrix",[_[2]]]]}else for(r=0;r<t.length;r++){var g=t[r].t,A=n[r].t,v=t[r].d,T=n[r].d,S=h[g],b=h[A];if(m(g,A)){if(!i)return;var _=o([t[r]],[n[r]]);p.push(_[0]),E.push(_[1]),f.push(["matrix",[_[2]]])}else{if(g==A)c=g;else if(S[2]&&b[2]&&a(g)==a(A))c=a(g),v=S[2](v),T=b[2](T);else{if(!S[1]||!b[1]||l(g)!=l(A)){if(!i)return;p=[(_=o(t,n))[0]],E=[_[1]],f=[["matrix",[_[2]]]];break}c=l(g),v=S[1](v),T=b[1](T)}for(var y=[],N=[],L=[],C=0;C<v.length;C++)_=("number"==typeof v[C]?e.mergeNumbers:e.mergeDimensions)(v[C],T[C]),y[C]=_[0],N[C]=_[1],L.push(_[2]);p.push(y),E.push(N),f.push([c,L])}}if(s){var w=p;p=E,E=w}return[p,E,function(e){return e.map((function(e,t){var n=e.map((function(e,n){return f[t][1][n](e)})).join(",");return"matrix"==f[t][0]&&16==n.split(",").length&&(f[t][0]="matrix3d"),f[t][0]+"("+n+")"})).join(" ")}]}),["transform"]),e.transformToSvgMatrix=function(t){var n=e.transformListToMatrix(s(t));return"matrix("+r(n[0])+" "+r(n[1])+" "+r(n[4])+" "+r(n[5])+" "+r(n[12])+" "+r(n[13])+")"}}(a),function(e){function t(t){return t=100*Math.round(t/100),400===(t=e.clamp(100,900,t))?"normal":700===t?"bold":String(t)}e.addPropertiesHandler((function(e){var t=Number(e);if(!(isNaN(t)||t<100||t>900||t%100!=0))return t}),(function(e,n){return[e,n,t]}),["font-weight"])}(a),function(e){function t(e){var t={};for(var n in e)t[n]=-e[n];return t}function n(t){return e.consumeToken(/^(left|center|right|top|bottom)\b/i,t)||e.consumeL