????JFIF??x?x????'
Server IP : 79.136.114.73 / Your IP : 18.117.229.144 Web Server : Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.29 OpenSSL/1.0.1f System : Linux b8009 3.13.0-170-generic #220-Ubuntu SMP Thu May 9 12:40:49 UTC 2019 x86_64 User : www-data ( 33) PHP Version : 5.5.9-1ubuntu4.29 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/www.astacus.eu/wp-content/plugins/LayerSlider/static/pixie/ |
Upload File : |
!function(r){function e(e){for(var t,p,a=e[0],c=e[1],f=e[2],l=0,s=[];l<a.length;l++)o[p=a[l]]&&s.push(o[p][0]),o[p]=0;for(t in c)Object.prototype.hasOwnProperty.call(c,t)&&(r[t]=c[t]);for(i&&i(e);s.length;)s.shift()();return u.push.apply(u,f||[]),n()}function n(){for(var r,e=0;e<u.length;e++){for(var n=u[e],t=!0,a=1;a<n.length;a++)0!==o[n[a]]&&(t=!1);t&&(u.splice(e--,1),r=p(p.s=n[0]))}return r}var t={},o={0:0},u=[];function p(e){if(t[e])return t[e].exports;var n=t[e]={i:e,l:!1,exports:{}};return r[e].call(n.exports,n,n.exports,p),n.l=!0,n.exports}p.m=r,p.c=t,p.d=function(r,e,n){p.o(r,e)||Object.defineProperty(r,e,{configurable:!1,enumerable:!0,get:n})},p.r=function(r){Object.defineProperty(r,"__esModule",{value:!0})},p.n=function(r){var e=r&&r.__esModule?function(){return r.default}:function(){return r};return p.d(e,"a",e),e},p.o=function(r,e){return Object.prototype.hasOwnProperty.call(r,e)},p.p="assets/";var a=window.webpackJsonp=window.webpackJsonp||[],c=a.push.bind(a);a.push=e,a=a.slice();for(var f=0;f<a.length;f++)e(a[f]);var i=c;n()}([]); //# sourceMappingURL=runtime.fbb64b8700d58ff90a3b.js.map (window.webpackJsonp=window.webpackJsonp||[]).push([[2],{"+auO":function(t,e,n){var r=n("XKFU"),o=n("lvtm");r(r.S,"Math",{cbrt:function(t){return o(t=+t)*Math.pow(Math.abs(t),1/3)}})},"+oPb":function(t,e,n){"use strict";n("OGtf")("blink",function(t){return function(){return t(this,"blink","","")}})},"+rLv":function(t,e,n){var r=n("dyZX").document;t.exports=r&&r.documentElement},"/KAi":function(t,e,n){var r=n("XKFU"),o=n("dyZX").isFinite;r(r.S,"Number",{isFinite:function(t){return"number"==typeof t&&o(t)}})},"/SS/":function(t,e,n){var r=n("XKFU");r(r.S,"Object",{setPrototypeOf:n("i5dc").set})},"/e88":function(t,e){t.exports="\t\n\v\f\r \xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029\ufeff"},"0/R4":function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},"0E+W":function(t,e,n){n("elZq")("Array")},"0LDn":function(t,e,n){"use strict";n("OGtf")("italics",function(t){return function(){return t(this,"i","","")}})},"0TWp":function(t,e,n){!function(){"use strict";!function(t){var e=t.performance;function n(t){e&&e.mark&&e.mark(t)}function r(t,n){e&&e.measure&&e.measure(t,n)}if(n("Zone"),t.Zone)throw new Error("Zone already loaded.");var o,i=function(){function e(t,e){this._properties=null,this._parent=t,this._name=e?e.name||"unnamed":"<root>",this._properties=e&&e.properties||{},this._zoneDelegate=new u(this,this._parent&&this._parent._zoneDelegate,e)}return e.assertZonePatched=function(){if(t.Promise!==x.ZoneAwarePromise)throw new Error("Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten.\nMost likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loading zone.js.)")},Object.defineProperty(e,"root",{get:function(){for(var t=e.current;t.parent;)t=t.parent;return t},enumerable:!0,configurable:!0}),Object.defineProperty(e,"current",{get:function(){return O.zone},enumerable:!0,configurable:!0}),Object.defineProperty(e,"currentTask",{get:function(){return P},enumerable:!0,configurable:!0}),e.__load_patch=function(o,i){if(x.hasOwnProperty(o))throw Error("Already loaded patch: "+o);if(!t["__Zone_disable_"+o]){var a="Zone:"+o;n(a),x[o]=i(t,e,F),r(a,a)}},Object.defineProperty(e.prototype,"parent",{get:function(){return this._parent},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return this._name},enumerable:!0,configurable:!0}),e.prototype.get=function(t){var e=this.getZoneWith(t);if(e)return e._properties[t]},e.prototype.getZoneWith=function(t){for(var e=this;e;){if(e._properties.hasOwnProperty(t))return e;e=e._parent}return null},e.prototype.fork=function(t){if(!t)throw new Error("ZoneSpec required!");return this._zoneDelegate.fork(this,t)},e.prototype.wrap=function(t,e){if("function"!=typeof t)throw new Error("Expecting function got: "+t);var n=this._zoneDelegate.intercept(this,t,e),r=this;return function(){return r.runGuarded(n,this,arguments,e)}},e.prototype.run=function(t,e,n,r){void 0===e&&(e=void 0),void 0===n&&(n=null),void 0===r&&(r=null),O={parent:O,zone:this};try{return this._zoneDelegate.invoke(this,t,e,n,r)}finally{O=O.parent}},e.prototype.runGuarded=function(t,e,n,r){void 0===e&&(e=null),void 0===n&&(n=null),void 0===r&&(r=null),O={parent:O,zone:this};try{try{return this._zoneDelegate.invoke(this,t,e,n,r)}catch(t){if(this._zoneDelegate.handleError(this,t))throw t}}finally{O=O.parent}},e.prototype.runTask=function(t,e,n){if(t.zone!=this)throw new Error("A task can only be run in the zone of creation! (Creation: "+(t.zone||d).name+"; Execution: "+this.name+")");if(t.state!==y||t.type!==E){var r=t.state!=k;r&&t._transitionTo(k,b),t.runCount++;var o=P;P=t,O={parent:O,zone:this};try{t.type==w&&t.data&&!t.data.isPeriodic&&(t.cancelFn=null);try{return this._zoneDelegate.invokeTask(this,t,e,n)}catch(t){if(this._zoneDelegate.handleError(this,t))throw t}}finally{t.state!==y&&t.state!==S&&(t.type==E||t.data&&t.data.isPeriodic?r&&t._transitionTo(b,k):(t.runCount=0,this._updateTaskCount(t,-1),r&&t._transitionTo(y,k,y))),O=O.parent,P=o}}},e.prototype.scheduleTask=function(t){if(t.zone&&t.zone!==this)for(var e=this;e;){if(e===t.zone)throw Error("can not reschedule task to "+this.name+" which is descendants of the original zone "+t.zone.name);e=e.parent}t._transitionTo(m,y);var n=[];t._zoneDelegates=n,t._zone=this;try{t=this._zoneDelegate.scheduleTask(this,t)}catch(e){throw t._transitionTo(S,m,y),this._zoneDelegate.handleError(this,e),e}return t._zoneDelegates===n&&this._updateTaskCount(t,1),t.state==m&&t._transitionTo(b,m),t},e.prototype.scheduleMicroTask=function(t,e,n,r){return this.scheduleTask(new c(T,t,e,n,r,null))},e.prototype.scheduleMacroTask=function(t,e,n,r,o){return this.scheduleTask(new c(w,t,e,n,r,o))},e.prototype.scheduleEventTask=function(t,e,n,r,o){return this.scheduleTask(new c(E,t,e,n,r,o))},e.prototype.cancelTask=function(t){if(t.zone!=this)throw new Error("A task can only be cancelled in the zone of creation! (Creation: "+(t.zone||d).name+"; Execution: "+this.name+")");t._transitionTo(_,b,k);try{this._zoneDelegate.cancelTask(this,t)}catch(e){throw t._transitionTo(S,_),this._zoneDelegate.handleError(this,e),e}return this._updateTaskCount(t,-1),t._transitionTo(y,_),t.runCount=0,t},e.prototype._updateTaskCount=function(t,e){var n=t._zoneDelegates;-1==e&&(t._zoneDelegates=null);for(var r=0;r<n.length;r++)n[r]._updateTaskCount(t.type,e)},e.__symbol__=D,e}(),a={name:"",onHasTask:function(t,e,n,r){return t.hasTask(n,r)},onScheduleTask:function(t,e,n,r){return t.scheduleTask(n,r)},onInvokeTask:function(t,e,n,r,o,i){return t.invokeTask(n,r,o,i)},onCancelTask:function(t,e,n,r){return t.cancelTask(n,r)}},u=function(){function t(t,e,n){this._taskCounts={microTask:0,macroTask:0,eventTask:0},this.zone=t,this._parentDelegate=e,this._forkZS=n&&(n&&n.onFork?n:e._forkZS),this._forkDlgt=n&&(n.onFork?e:e._forkDlgt),this._forkCurrZone=n&&(n.onFork?this.zone:e.zone),this._interceptZS=n&&(n.onIntercept?n:e._interceptZS),this._interceptDlgt=n&&(n.onIntercept?e:e._interceptDlgt),this._interceptCurrZone=n&&(n.onIntercept?this.zone:e.zone),this._invokeZS=n&&(n.onInvoke?n:e._invokeZS),this._invokeDlgt=n&&(n.onInvoke?e:e._invokeDlgt),this._invokeCurrZone=n&&(n.onInvoke?this.zone:e.zone),this._handleErrorZS=n&&(n.onHandleError?n:e._handleErrorZS),this._handleErrorDlgt=n&&(n.onHandleError?e:e._handleErrorDlgt),this._handleErrorCurrZone=n&&(n.onHandleError?this.zone:e.zone),this._scheduleTaskZS=n&&(n.onScheduleTask?n:e._scheduleTaskZS),this._scheduleTaskDlgt=n&&(n.onScheduleTask?e:e._scheduleTaskDlgt),this._scheduleTaskCurrZone=n&&(n.onScheduleTask?this.zone:e.zone),this._invokeTaskZS=n&&(n.onInvokeTask?n:e._invokeTaskZS),this._invokeTaskDlgt=n&&(n.onInvokeTask?e:e._invokeTaskDlgt),this._invokeTaskCurrZone=n&&(n.onInvokeTask?this.zone:e.zone),this._cancelTaskZS=n&&(n.onCancelTask?n:e._cancelTaskZS),this._cancelTaskDlgt=n&&(n.onCancelTask?e:e._cancelTaskDlgt),this._cancelTaskCurrZone=n&&(n.onCancelTask?this.zone:e.zone),this._hasTaskZS=null,this._hasTaskDlgt=null,this._hasTaskDlgtOwner=null,this._hasTaskCurrZone=null;var r=n&&n.onHasTask;(r||e&&e._hasTaskZS)&&(this._hasTaskZS=r?n:a,this._hasTaskDlgt=e,this._hasTaskDlgtOwner=this,this._hasTaskCurrZone=t,n.onScheduleTask||(this._scheduleTaskZS=a,this._scheduleTaskDlgt=e,this._scheduleTaskCurrZone=this.zone),n.onInvokeTask||(this._invokeTaskZS=a,this._invokeTaskDlgt=e,this._invokeTaskCurrZone=this.zone),n.onCancelTask||(this._cancelTaskZS=a,this._cancelTaskDlgt=e,this._cancelTaskCurrZone=this.zone))}return t.prototype.fork=function(t,e){return this._forkZS?this._forkZS.onFork(this._forkDlgt,this.zone,t,e):new i(t,e)},t.prototype.intercept=function(t,e,n){return this._interceptZS?this._interceptZS.onIntercept(this._interceptDlgt,this._interceptCurrZone,t,e,n):e},t.prototype.invoke=function(t,e,n,r,o){return this._invokeZS?this._invokeZS.onInvoke(this._invokeDlgt,this._invokeCurrZone,t,e,n,r,o):e.apply(n,r)},t.prototype.handleError=function(t,e){return!this._handleErrorZS||this._handleErrorZS.onHandleError(this._handleErrorDlgt,this._handleErrorCurrZone,t,e)},t.prototype.scheduleTask=function(t,e){var n=e;if(this._scheduleTaskZS)this._hasTaskZS&&n._zoneDelegates.push(this._hasTaskDlgtOwner),(n=this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt,this._scheduleTaskCurrZone,t,e))||(n=e);else if(e.scheduleFn)e.scheduleFn(e);else{if(e.type!=T)throw new Error("Task is missing scheduleFn.");v(e)}return n},t.prototype.invokeTask=function(t,e,n,r){return this._invokeTaskZS?this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt,this._invokeTaskCurrZone,t,e,n,r):e.callback.apply(n,r)},t.prototype.cancelTask=function(t,e){var n;if(this._cancelTaskZS)n=this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt,this._cancelTaskCurrZone,t,e);else{if(!e.cancelFn)throw Error("Task is not cancelable");n=e.cancelFn(e)}return n},t.prototype.hasTask=function(t,e){try{return this._hasTaskZS&&this._hasTaskZS.onHasTask(this._hasTaskDlgt,this._hasTaskCurrZone,t,e)}catch(e){this.handleError(t,e)}},t.prototype._updateTaskCount=function(t,e){var n=this._taskCounts,r=n[t],o=n[t]=r+e;if(o<0)throw new Error("More tasks executed then were scheduled.");0!=r&&0!=o||this.hasTask(this.zone,{microTask:n.microTask>0,macroTask:n.macroTask>0,eventTask:n.eventTask>0,change:t})},t}(),c=function(){function e(n,r,o,i,a,u){this._zone=null,this.runCount=0,this._zoneDelegates=null,this._state="notScheduled",this.type=n,this.source=r,this.data=i,this.scheduleFn=a,this.cancelFn=u,this.callback=o;var c=this;this.invoke=n===E&&i&&i.useG?e.invokeTask:function(){return e.invokeTask.call(t,c,this,arguments)}}return e.invokeTask=function(t,e,n){t||(t=this),M++;try{return t.runCount++,t.zone.runTask(t,e,n)}finally{1==M&&g(),M--}},Object.defineProperty(e.prototype,"zone",{get:function(){return this._zone},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return this._state},enumerable:!0,configurable:!0}),e.prototype.cancelScheduleRequest=function(){this._transitionTo(y,m)},e.prototype._transitionTo=function(t,e,n){if(this._state!==e&&this._state!==n)throw new Error(this.type+" '"+this.source+"': can not transition to '"+t+"', expecting state '"+e+"'"+(n?" or '"+n+"'":"")+", was '"+this._state+"'.");this._state=t,t==y&&(this._zoneDelegates=null)},e.prototype.toString=function(){return this.data&&void 0!==this.data.handleId?this.data.handleId:Object.prototype.toString.call(this)},e.prototype.toJSON=function(){return{type:this.type,state:this.state,source:this.source,zone:this.zone.name,runCount:this.runCount}},e}(),s=D("setTimeout"),f=D("Promise"),l=D("then"),p=[],h=!1;function v(e){0===M&&0===p.length&&(o||t[f]&&(o=t[f].resolve(0)),o?o[l](g):t[s](g,0)),e&&p.push(e)}function g(){if(!h){for(h=!0;p.length;){var t=p;p=[];for(var e=0;e<t.length;e++){var n=t[e];try{n.zone.runTask(n,null,null)}catch(t){F.onUnhandledError(t)}}}F.microtaskDrainDone(),h=!1}}var d={name:"NO ZONE"},y="notScheduled",m="scheduling",b="scheduled",k="running",_="canceling",S="unknown",T="microTask",w="macroTask",E="eventTask",x={},F={symbol:D,currentZoneFrame:function(){return O},onUnhandledError:j,microtaskDrainDone:j,scheduleMicroTask:v,showUncaughtError:function(){return!i[D("ignoreConsoleErrorUncaughtError")]},patchEventTarget:function(){return[]},patchOnProperties:j,patchMethod:function(){return j},bindArguments:function(){return null},setNativePromise:function(t){t&&"function"==typeof t.resolve&&(o=t.resolve(0))}},O={parent:null,zone:new i(null,null)},P=null,M=0;function j(){}function D(t){return"__zone_symbol__"+t}r("Zone","Zone"),t.Zone=i}("undefined"!=typeof window&&window||"undefined"!=typeof self&&self||global),Zone.__load_patch("ZoneAwarePromise",function(t,e,n){var r=Object.getOwnPropertyDescriptor,o=Object.defineProperty,i=n.symbol,a=[],u=i("Promise"),c=i("then"),s="__creationTrace__";n.onUnhandledError=function(t){if(n.showUncaughtError()){var e=t&&t.rejection;e?console.error("Unhandled Promise rejection:",e instanceof Error?e.message:e,"; Zone:",t.zone.name,"; Task:",t.task&&t.task.source,"; Value:",e,e instanceof Error?e.stack:void 0):console.error(t)}},n.microtaskDrainDone=function(){for(;a.length;)for(var t=function(){var t=a.shift();try{t.zone.runGuarded(function(){throw t})}catch(t){l(t)}};a.length;)t()};var f=i("unhandledPromiseRejectionHandler");function l(t){n.onUnhandledError(t);try{var r=e[f];r&&"function"==typeof r&&r.call(this,t)}catch(t){}}function p(t){return t&&t.then}function h(t){return t}function v(t){return I.reject(t)}var g=i("state"),d=i("value"),y=i("finally"),m=i("parentPromiseValue"),b=i("parentPromiseState"),k="Promise.then",_=null,S=!0,T=!1,w=0;function E(t,e){return function(n){try{P(t,e,n)}catch(e){P(t,!1,e)}}}var x=function(){var t=!1;return function(e){return function(){t||(t=!0,e.apply(null,arguments))}}},F="Promise resolved with itself",O=i("currentTaskTrace");function P(t,r,i){var u,c=x();if(t===i)throw new TypeError(F);if(t[g]===_){var f=null;try{"object"!=typeof i&&"function"!=typeof i||(f=i&&i.then)}catch(e){return c(function(){P(t,!1,e)})(),t}if(r!==T&&i instanceof I&&i.hasOwnProperty(g)&&i.hasOwnProperty(d)&&i[g]!==_)j(i),P(t,i[g],i[d]);else if(r!==T&&"function"==typeof f)try{f.call(i,c(E(t,r)),c(E(t,!1)))}catch(e){c(function(){P(t,!1,e)})()}else{t[g]=r;var l=t[d];if(t[d]=i,t[y]===y&&r===S&&(t[g]=t[b],t[d]=t[m]),r===T&&i instanceof Error){var p=e.currentTask&&e.currentTask.data&&e.currentTask.data[s];p&&o(i,O,{configurable:!0,enumerable:!1,writable:!0,value:p})}for(var h=0;h<l.length;)D(t,l[h++],l[h++],l[h++],l[h++]);if(0==l.length&&r==T){t[g]=w;try{throw new Error("Uncaught (in promise): "+((u=i)&&u.toString===Object.prototype.toString?(u.constructor&&u.constructor.name||"")+": "+JSON.stringify(u):u?u.toString():Object.prototype.toString.call(u))+(i&&i.stack?"\n"+i.stack:""))}catch(r){var v=r;v.rejection=i,v.promise=t,v.zone=e.current,v.task=e.currentTask,a.push(v),n.scheduleMicroTask()}}}}return t}var M=i("rejectionHandledHandler");function j(t){if(t[g]===w){try{var n=e[M];n&&"function"==typeof n&&n.call(this,{rejection:t[d],promise:t})}catch(t){}t[g]=T;for(var r=0;r<a.length;r++)t===a[r].promise&&a.splice(r,1)}}function D(t,e,n,r,o){j(t);var i=t[g],a=i?"function"==typeof r?r:h:"function"==typeof o?o:v;e.scheduleMicroTask(k,function(){try{var r=t[d],o=n&&y===n[y];o&&(n[m]=r,n[b]=i);var u=e.run(a,void 0,o&&a!==v&&a!==h?[]:[r]);P(n,!0,u)}catch(t){P(n,!1,t)}},n)}var I=function(){function t(e){if(!(this instanceof t))throw new Error("Must be an instanceof Promise.");this[g]=_,this[d]=[];try{e&&e(E(this,S),E(this,T))}catch(t){P(this,!1,t)}}return t.toString=function(){return"function ZoneAwarePromise() { [native code] }"},t.resolve=function(t){return P(new this(null),S,t)},t.reject=function(t){return P(new this(null),T,t)},t.race=function(t){var e,n,r=new this(function(t,r){e=t,n=r});function o(t){r&&(r=e(t))}function i(t){r&&(r=n(t))}for(var a=0,u=t;a<u.length;a++){var c=u[a];p(c)||(c=this.resolve(c)),c.then(o,i)}return r},t.all=function(t){for(var e,n,r=new this(function(t,r){e=t,n=r}),o=0,i=[],a=0,u=t;a<u.length;a++){var c=u[a];p(c)||(c=this.resolve(c)),c.then(function(t){return function(n){i[t]=n,--o||e(i)}}(o),n),o++}return o||e(i),r},t.prototype.then=function(t,n){var r=new this.constructor(null),o=e.current;return this[g]==_?this[d].push(o,r,t,n):D(this,o,r,t,n),r},t.prototype.catch=function(t){return this.then(null,t)},t.prototype.finally=function(t){var n=new this.constructor(null);n[y]=y;var r=e.current;return this[g]==_?this[d].push(r,n,t,t):D(this,r,n,t,t),n},t}();I.resolve=I.resolve,I.reject=I.reject,I.race=I.race,I.all=I.all;var K=t[u]=t.Promise,U=e.__symbol__("ZoneAwarePromise"),Z=r(t,"Promise");Z&&!Z.configurable||(Z&&delete Z.writable,Z&&delete Z.value,Z||(Z={configurable:!0,enumerable:!0}),Z.get=function(){return t[U]?t[U]:t[u]},Z.set=function(e){e===I?t[U]=e:(t[u]=e,e.prototype[c]||X(e),n.setNativePromise(e))},o(t,"Promise",Z)),t.Promise=I;var L,A=i("thenPatched");function X(t){var e=t.prototype,n=r(e,"then");if(!n||!1!==n.writable&&n.configurable){var o=e.then;e[c]=o,t.prototype.then=function(t,e){var n=this;return new I(function(t,e){o.call(n,t,e)}).then(t,e)},t[A]=!0}}if(K){X(K);var C=t.fetch;"function"==typeof C&&(t.fetch=(L=C,function(){var t=L.apply(this,arguments);if(t instanceof I)return t;var e=t.constructor;return e[A]||X(e),t}))}return Promise[e.__symbol__("uncaughtPromiseErrors")]=a,I});var t=Object.getOwnPropertyDescriptor,e=Object.defineProperty,n=Object.getPrototypeOf,r=Object.create,o=Array.prototype.slice,i="addEventListener",a="removeEventListener",u=Zone.__symbol__(i),c=Zone.__symbol__(a),s="true",f="false",l="__zone_symbol__";function p(t,e){return Zone.current.wrap(t,e)}function h(t,e,n,r,o){return Zone.current.scheduleMacroTask(t,e,n,r,o)}var v=Zone.__symbol__,g="undefined"!=typeof window,d=g?window:void 0,y=g&&d||"object"==typeof self&&self||global,m="removeAttribute",b=[null];function k(t,e){for(var n=t.length-1;n>=0;n--)"function"==typeof t[n]&&(t[n]=p(t[n],e+"_"+n));return t}function _(t){return!t||!1!==t.writable&&!("function"==typeof t.get&&void 0===t.set)}var S="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope,T=!("nw"in y)&&void 0!==y.process&&"[object process]"==={}.toString.call(y.process),w=!T&&!S&&!(!g||!d.HTMLElement),E=void 0!==y.process&&"[object process]"==={}.toString.call(y.process)&&!S&&!(!g||!d.HTMLElement),x={},F=function(t){if(t=t||y.event){var e=x[t.type];e||(e=x[t.type]=v("ON_PROPERTY"+t.type));var n=(this||t.target||y)[e],r=n&&n.apply(this,arguments);return void 0==r||r||t.preventDefault(),r}};function O(n,r,o){var i=t(n,r);if(!i&&o&&t(o,r)&&(i={enumerable:!0,configurable:!0}),i&&i.configurable){delete i.writable,delete i.value;var a=i.get,u=i.set,c=r.substr(2),s=x[c];s||(s=x[c]=v("ON_PROPERTY"+c)),i.set=function(t){var e=this;e||n!==y||(e=y),e&&(e[s]&&e.removeEventListener(c,F),u&&u.apply(e,b),"function"==typeof t?(e[s]=t,e.addEventListener(c,F,!1)):e[s]=null)},i.get=function(){var t=this;if(t||n!==y||(t=y),!t)return null;var e=t[s];if(e)return e;if(a){var o=a&&a.call(this);if(o)return i.set.call(this,o),"function"==typeof t[m]&&t.removeAttribute(r),o}return null},e(n,r,i)}}function P(t,e,n){if(e)for(var r=0;r<e.length;r++)O(t,"on"+e[r],n);else{var o=[];for(var i in t)"on"==i.substr(0,2)&&o.push(i);for(var a=0;a<o.length;a++)O(t,o[a],n)}}var M=v("originalInstance");function j(t){var n=y[t];if(n){y[v(t)]=n,y[t]=function(){var e=k(arguments,t);switch(e.length){case 0:this[M]=new n;break;case 1:this[M]=new n(e[0]);break;case 2:this[M]=new n(e[0],e[1]);break;case 3:this[M]=new n(e[0],e[1],e[2]);break;case 4:this[M]=new n(e[0],e[1],e[2],e[3]);break;default:throw new Error("Arg list too long.")}},I(y[t],n);var r,o=new n(function(){});for(r in o)"XMLHttpRequest"===t&&"responseBlob"===r||function(n){"function"==typeof o[n]?y[t].prototype[n]=function(){return this[M][n].apply(this[M],arguments)}:e(y[t].prototype,n,{set:function(e){"function"==typeof e?(this[M][n]=p(e,t+"."+n),I(this[M][n],e)):this[M][n]=e},get:function(){return this[M][n]}})}(r);for(r in n)"prototype"!==r&&n.hasOwnProperty(r)&&(y[t][r]=n[r])}}function D(e,r,o){for(var i=e;i&&!i.hasOwnProperty(r);)i=n(i);!i&&e[r]&&(i=e);var a,u=v(r);if(i&&!(a=i[u])&&(a=i[u]=i[r],_(i&&t(i,r)))){var c=o(a,u,r);i[r]=function(){return c(this,arguments)},I(i[r],a)}return a}function I(t,e){t[v("OriginalDelegate")]=e}var K=!1,U=!1;function Z(){if(K)return U;K=!0;try{var t=d.navigator.userAgent;return-1===t.indexOf("MSIE ")&&-1===t.indexOf("Trident/")&&-1===t.indexOf("Edge/")||(U=!0),U}catch(t){}}Zone.__load_patch("toString",function(t){var e=Function.prototype.toString,n=v("OriginalDelegate"),r=v("Promise"),o=v("Error"),i=function(){if("function"==typeof this){var i=this[n];if(i)return"function"==typeof i?e.apply(this[n],arguments):Object.prototype.toString.call(i);if(this===Promise){var a=t[r];if(a)return e.apply(a,arguments)}if(this===Error){var u=t[o];if(u)return e.apply(u,arguments)}}return e.apply(this,arguments)};i[n]=e,Function.prototype.toString=i;var a=Object.prototype.toString;Object.prototype.toString=function(){return this instanceof Promise?"[object Promise]":a.apply(this,arguments)}});var L={useG:!0},A={},X={},C=/^__zone_symbol__(\w+)(true|false)$/,R="__zone_symbol__propagationStopped";function z(t,e,r){var o=r&&r.add||i,u=r&&r.rm||a,c=r&&r.listeners||"eventListeners",p=r&&r.rmAll||"removeAllListeners",h=v(o),g="."+o+":",d="prependListener",y="."+d+":",m=function(t,e,n){if(!t.isRemoved){var r=t.callback;"object"==typeof r&&r.handleEvent&&(t.callback=function(t){return r.handleEvent(t)},t.originalDelegate=r),t.invoke(t,e,[n]);var o=t.options;o&&"object"==typeof o&&o.once&&e[u].call(e,n.type,t.originalDelegate?t.originalDelegate:t.callback,o)}},b=function(e){if(e=e||t.event){var n=this||e.target||t,r=n[A[e.type][f]];if(r)if(1===r.length)m(r[0],n,e);else for(var o=r.slice(),i=0;i<o.length&&(!e||!0!==e[R]);i++)m(o[i],n,e)}},k=function(e){if(e=e||t.event){var n=this||e.target||t,r=n[A[e.type][s]];if(r)if(1===r.length)m(r[0],n,e);else for(var o=r.slice(),i=0;i<o.length&&(!e||!0!==e[R]);i++)m(o[i],n,e)}};function _(e,r){if(!e)return!1;var i=!0;r&&void 0!==r.useG&&(i=r.useG);var a=r&&r.vh,m=!0;r&&void 0!==r.chkDup&&(m=r.chkDup);var _=!1;r&&void 0!==r.rt&&(_=r.rt);for(var S=e;S&&!S.hasOwnProperty(o);)S=n(S);if(!S&&e[o]&&(S=e),!S)return!1;if(S[h])return!1;var T,w={},E=S[h]=S[o],x=S[v(u)]=S[u],F=S[v(c)]=S[c],O=S[v(p)]=S[p];r&&r.prepend&&(T=S[v(r.prepend)]=S[r.prepend]);var P=i?function(){if(!w.isExisting)return E.call(w.target,w.eventName,w.capture?k:b,w.options)}:function(t){return E.call(w.target,w.eventName,t.invoke,w.options)},M=i?function(t){if(!t.isRemoved){var e=A[t.eventName],n=void 0;e&&(n=e[t.capture?s:f]);var r=n&&t.target[n];if(r)for(var o=0;o<r.length;o++)if(r[o]===t){r.splice(o,1),t.isRemoved=!0,0===r.length&&(t.allRemoved=!0,t.target[n]=null);break}}if(t.allRemoved)return x.call(t.target,t.eventName,t.capture?k:b,t.options)}:function(t){return x.call(t.target,t.eventName,t.invoke,t.options)},j=r&&r.diff?r.diff:function(t,e){var n=typeof e;return"function"===n&&t.callback===e||"object"===n&&t.originalDelegate===e},D=Zone[Zone.__symbol__("BLACK_LISTED_EVENTS")],K=function(e,n,r,o,u,c){return void 0===u&&(u=!1),void 0===c&&(c=!1),function(){var p=this||t,h=arguments[1];if(!h)return e.apply(this,arguments);var v=!1;if("function"!=typeof h){if(!h.handleEvent)return e.apply(this,arguments);v=!0}if(!a||a(e,h,p,arguments)){var g,d=arguments[0],y=arguments[2];if(D)for(var b=0;b<D.length;b++)if(d===D[b])return e.apply(this,arguments);var k=!1;void 0===y?g=!1:!0===y?g=!0:!1===y?g=!1:(g=!!y&&!!y.capture,k=!!y&&!!y.once);var _,S=Zone.current,T=A[d];if(T)_=T[g?s:f];else{var E=l+(d+f),x=l+(d+s);A[d]={},A[d][f]=E,A[d][s]=x,_=g?x:E}var F,O=p[_],P=!1;if(O){if(P=!0,m)for(b=0;b<O.length;b++)if(j(O[b],h))return}else O=p[_]=[];var M=p.constructor.name,I=X[M];I&&(F=I[d]),F||(F=M+n+d),w.options=y,k&&(w.options.once=!1),w.target=p,w.capture=g,w.eventName=d,w.isExisting=P;var K=i?L:null;K&&(K.taskData=w);var U=S.scheduleEventTask(F,h,K,r,o);return w.target=null,K&&(K.taskData=null),k&&(y.once=!0),U.options=y,U.target=p,U.capture=g,U.eventName=d,v&&(U.originalDelegate=h),c?O.unshift(U):O.push(U),u?p:void 0}}};return S[o]=K(E,g,P,M,_),T&&(S[d]=K(T,y,function(t){return T.call(w.target,w.eventName,t.invoke,w.options)},M,_,!0)),S[u]=function(){var e,n=this||t,r=arguments[0],o=arguments[2];e=void 0!==o&&(!0===o||!1!==o&&!!o&&!!o.capture);var i=arguments[1];if(!i)return x.apply(this,arguments);if(!a||a(x,i,n,arguments)){var u,c=A[r];c&&(u=c[e?s:f]);var l=u&&n[u];if(l)for(var p=0;p<l.length;p++){var h=l[p];if(j(h,i))return l.splice(p,1),h.isRemoved=!0,0===l.length&&(h.allRemoved=!0,n[u]=null),h.zone.cancelTask(h),_?n:void 0}return x.apply(this,arguments)}},S[c]=function(){for(var e=[],n=N(this||t,arguments[0]),r=0;r<n.length;r++){var o=n[r];e.push(o.originalDelegate?o.originalDelegate:o.callback)}return e},S[p]=function(){var e=this||t,n=arguments[0];if(n){var r=A[n];if(r){var o=e[r[f]],i=e[r[s]];if(o){var a=o.slice();for(h=0;h<a.length;h++)this[u].call(this,n,(c=a[h]).originalDelegate?c.originalDelegate:c.callback,c.options)}if(i)for(a=i.slice(),h=0;h<a.length;h++){var c;this[u].call(this,n,(c=a[h]).originalDelegate?c.originalDelegate:c.callback,c.options)}}}else{for(var l=Object.keys(e),h=0;h<l.length;h++){var v=C.exec(l[h]),g=v&&v[1];g&&"removeListener"!==g&&this[p].call(this,g)}this[p].call(this,"removeListener")}if(_)return this},I(S[o],E),I(S[u],x),O&&I(S[p],O),F&&I(S[c],F),!0}for(var S=[],T=0;T<e.length;T++)S[T]=_(e[T],r);return S}function N(t,e){var n=[];for(var r in t){var o=C.exec(r),i=o&&o[1];if(i&&(!e||i===e)){var a=t[r];if(a)for(var u=0;u<a.length;u++)n.push(a[u])}}return n}var q=v("zoneTask");function V(t,e,n,r){var o=null,i=null;n+=r;var a={};function u(e){var n=e.data;return n.args[0]=function(){try{e.invoke.apply(this,arguments)}finally{e.data&&e.data.isPeriodic||("number"==typeof n.handleId?delete a[n.handleId]:n.handleId&&(n.handleId[q]=null))}},n.handleId=o.apply(t,n.args),e}function c(t){return i(t.data.handleId)}o=D(t,e+=r,function(n){return function(o,i){if("function"==typeof i[0]){var s=h(e,i[0],{handleId:null,isPeriodic:"Interval"===r,delay:"Timeout"===r||"Interval"===r?i[1]||0:null,args:i},u,c);if(!s)return s;var f=s.data.handleId;return"number"==typeof f?a[f]=s:f&&(f[q]=s),f&&f.ref&&f.unref&&"function"==typeof f.ref&&"function"==typeof f.unref&&(s.ref=f.ref.bind(f),s.unref=f.unref.bind(f)),"number"==typeof f||f?f:s}return n.apply(t,i)}}),i=D(t,n,function(e){return function(n,r){var o,i=r[0];"number"==typeof i?o=a[i]:(o=i&&i[q])||(o=i),o&&"string"==typeof o.type?"notScheduled"!==o.state&&(o.cancelFn&&o.data.isPeriodic||0===o.runCount)&&("number"==typeof i?delete a[i]:i&&(i[q]=null),o.zone.cancelTask(o)):e.apply(t,r)}})}var H=Object[v("defineProperty")]=Object.defineProperty,W=Object[v("getOwnPropertyDescriptor")]=Object.getOwnPropertyDescriptor,G=Object.create,B=v("unconfigurables");function Y(t,e){return t&&t[B]&&t[B][e]}function J(t,e,n){return Object.isFrozen(n)||(n.configurable=!0),n.configurable||(t[B]||Object.isFrozen(t)||H(t,B,{writable:!0,value:{}}),t[B]&&(t[B][e]=!0)),n}function Q(t,e,n,r){try{return H(t,e,n)}catch(i){if(!n.configurable)throw i;void 0===r?delete n.configurable:n.configurable=r;try{return H(t,e,n)}catch(r){var o=null;try{o=JSON.stringify(n)}catch(t){o=n.toString()}console.log("Attempting to configure '"+e+"' with descriptor '"+o+"' on object '"+t+"' and got error, giving up: "+r)}}}var $=["absolutedeviceorientation","afterinput","afterprint","appinstalled","beforeinstallprompt","beforeprint","beforeunload","devicelight","devicemotion","deviceorientation","deviceorientationabsolute","deviceproximity","hashchange","languagechange","message","mozbeforepaint","offline","online","paint","pageshow","pagehide","popstate","rejectionhandled","storage","unhandledrejection","unload","userproximity","vrdisplyconnected","vrdisplaydisconnected","vrdisplaypresentchange"],tt=["encrypted","waitingforkey","msneedkey","mozinterruptbegin","mozinterruptend"],et=["load"],nt=["blur","error","focus","load","resize","scroll","messageerror"],rt=["bounce","finish","start"],ot=["loadstart","progress","abort","error","load","progress","timeout","loadend","readystatechange"],it=["upgradeneeded","complete","abort","success","error","blocked","versionchange","close"],at=["close","error","open","message"],ut=["error","message"],ct=["abort","animationcancel","animationend","animationiteration","auxclick","beforeinput","blur","cancel","canplay","canplaythrough","change","compositionstart","compositionupdate","compositionend","cuechange","click","close","contextmenu","curechange","dblclick","drag","dragend","dragenter","dragexit","dragleave","dragover","drop","durationchange","emptied","ended","error","focus","focusin","focusout","gotpointercapture","input","invalid","keydown","keypress","keyup","load","loadstart","loadeddata","loadedmetadata","lostpointercapture","mousedown","mouseenter","mouseleave","mousemove","mouseout","mouseover","mouseup","mousewheel","orientationchange","pause","play","playing","pointercancel","pointerdown","pointerenter","pointerleave","pointerlockchange","mozpointerlockchange","webkitpointerlockerchange","pointerlockerror","mozpointerlockerror","webkitpointerlockerror","pointermove","pointout","pointerover","pointerup","progress","ratechange","reset","resize","scroll","seeked","seeking","select","selectionchange","selectstart","show","sort","stalled","submit","suspend","timeupdate","volumechange","touchcancel","touchmove","touchstart","touchend","transitioncancel","transitionend","waiting","wheel"].concat(["webglcontextrestored","webglcontextlost","webglcontextcreationerror"],["autocomplete","autocompleteerror"],["toggle"],["afterscriptexecute","beforescriptexecute","DOMContentLoaded","fullscreenchange","mozfullscreenchange","webkitfullscreenchange","msfullscreenchange","fullscreenerror","mozfullscreenerror","webkitfullscreenerror","msfullscreenerror","readystatechange","visibilitychange"],$,["beforecopy","beforecut","beforepaste","copy","cut","paste","dragstart","loadend","animationstart","search","transitionrun","transitionstart","webkitanimationend","webkitanimationiteration","webkitanimationstart","webkittransitionend"],["activate","afterupdate","ariarequest","beforeactivate","beforedeactivate","beforeeditfocus","beforeupdate","cellchange","controlselect","dataavailable","datasetchanged","datasetcomplete","errorupdate","filterchange","layoutcomplete","losecapture","move","moveend","movestart","propertychange","resizeend","resizestart","rowenter","rowexit","rowsdelete","rowsinserted","command","compassneedscalibration","deactivate","help","mscontentzoom","msmanipulationstatechanged","msgesturechange","msgesturedoubletap","msgestureend","msgesturehold","msgesturestart","msgesturetap","msgotpointercapture","msinertiastart","mslostpointercapture","mspointercancel","mspointerdown","mspointerenter","mspointerhover","mspointerleave","mspointermove","mspointerout","mspointerover","mspointerup","pointerout","mssitemodejumplistitemremoved","msthumbnailclick","stop","storagecommit"]);function st(t,e,n,r){t&&P(t,function(t,e,n){if(!n)return e;var r=n.filter(function(e){return e.target===t});if(!r||0===r.length)return e;var o=r[0].ignoreProperties;return e.filter(function(t){return-1===o.indexOf(t)})}(t,e,n),r)}function ft(u,c){if(!T||E){var s="undefined"!=typeof WebSocket;if(function(){if((w||E)&&!t(HTMLElement.prototype,"onclick")&&"undefined"!=typeof Element){var n=t(Element.prototype,"onclick");if(n&&!n.configurable)return!1}var r=XMLHttpRequest.prototype,o=t(r,"onreadystatechange");if(o){e(r,"onreadystatechange",{enumerable:!0,configurable:!0,get:function(){return!0}});var i=!!(u=new XMLHttpRequest).onreadystatechange;return e(r,"onreadystatechange",o||{}),i}var a=v("fake");e(r,"onreadystatechange",{enumerable:!0,configurable:!0,get:function(){return this[a]},set:function(t){this[a]=t}});var u,c=function(){};return(u=new XMLHttpRequest).onreadystatechange=c,i=u[a]===c,u.onreadystatechange=null,i}()){var f=c.__Zone_ignore_on_properties;if(w){var l=window;st(l,ct.concat(["messageerror"]),f,n(l)),st(Document.prototype,ct,f),void 0!==l.SVGElement&&st(l.SVGElement.prototype,ct,f),st(Element.prototype,ct,f),st(HTMLElement.prototype,ct,f),st(HTMLMediaElement.prototype,tt,f),st(HTMLFrameSetElement.prototype,$.concat(nt),f),st(HTMLBodyElement.prototype,$.concat(nt),f),st(HTMLFrameElement.prototype,et,f),st(HTMLIFrameElement.prototype,et,f);var h=l.HTMLMarqueeElement;h&&st(h.prototype,rt,f);var g=l.Worker;g&&st(g.prototype,ut,f)}st(XMLHttpRequest.prototype,ot,f);var d=c.XMLHttpRequestEventTarget;d&&st(d&&d.prototype,ot,f),"undefined"!=typeof IDBIndex&&(st(IDBIndex.prototype,it,f),st(IDBRequest.prototype,it,f),st(IDBOpenDBRequest.prototype,it,f),st(IDBDatabase.prototype,it,f),st(IDBTransaction.prototype,it,f),st(IDBCursor.prototype,it,f)),s&&st(WebSocket.prototype,at,f)}else!function(){for(var t=function(t){var e=ct[t],n="on"+e;self.addEventListener(e,function(t){var e,r,o=t.target;for(r=o?o.constructor.name+"."+n:"unknown."+n;o;)o[n]&&!o[n][lt]&&((e=p(o[n],r))[lt]=o[n],o[n]=e),o=o.parentElement},!0)},e=0;e<ct.length;e++)t(e)}(),j("XMLHttpRequest"),s&&function(e,n){var u=n.WebSocket;n.EventTarget||z(n,[u.prototype]),n.WebSocket=function(e,n){var c,s,f=arguments.length>1?new u(e,n):new u(e),l=t(f,"onmessage");return l&&!1===l.configurable?(c=r(f),s=f,[i,a,"send","close"].forEach(function(t){c[t]=function(){var e=o.call(arguments);if(t===i||t===a){var n=e.length>0?e[0]:void 0;if(n){var r=Zone.__symbol__("ON_PROPERTY"+n);f[r]=c[r]}}return f[t].apply(f,e)}})):c=f,P(c,["close","error","message","open"],s),c};var c=n.WebSocket;for(var s in u)c[s]=u[s]}(0,c)}}var lt=v("unbound");Zone.__load_patch("util",function(t,e,n){n.patchOnProperties=P,n.patchMethod=D,n.bindArguments=k}),Zone.__load_patch("timers",function(t){V(t,"set","clear","Timeout"),V(t,"set","clear","Interval"),V(t,"set","clear","Immediate")}),Zone.__load_patch("requestAnimationFrame",function(t){V(t,"request","cancel","AnimationFrame"),V(t,"mozRequest","mozCancel","AnimationFrame"),V(t,"webkitRequest","webkitCancel","AnimationFrame")}),Zone.__load_patch("blocking",function(t,e){for(var n=["alert","prompt","confirm"],r=0;r<n.length;r++)D(t,n[r],function(n,r,o){return function(r,i){return e.current.run(n,t,i,o)}})}),Zone.__load_patch("EventTarget",function(t,e,n){var r=e.__symbol__("BLACK_LISTED_EVENTS");t[r]&&(e[r]=t[r]),function(t,e){!function(t,e){var n=t.Event;n&&n.prototype&&e.patchMethod(n.prototype,"stopImmediatePropagation",function(t){return function(e,n){e[R]=!0,t&&t.apply(e,n)}})}(t,e)}(t,n),function(t,e){var n="Anchor,Area,Audio,BR,Base,BaseFont,Body,Button,Canvas,Content,DList,Directory,Div,Embed,FieldSet,Font,Form,Frame,FrameSet,HR,Head,Heading,Html,IFrame,Image,Input,Keygen,LI,Label,Legend,Link,Map,Marquee,Media,Menu,Meta,Meter,Mod,OList,Object,OptGroup,Option,Output,Paragraph,Pre,Progress,Quote,Script,Select,Source,Span,Style,TableCaption,TableCell,TableCol,Table,TableRow,TableSection,TextArea,Title,Track,UList,Unknown,Video",r="ApplicationCache,EventSource,FileReader,InputMethodContext,MediaController,MessagePort,Node,Performance,SVGElementInstance,SharedWorker,TextTrack,TextTrackCue,TextTrackList,WebKitNamedFlow,Window,Worker,WorkerGlobalScope,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload,IDBRequest,IDBOpenDBRequest,IDBDatabase,IDBTransaction,IDBCursor,DBIndex,WebSocket".split(","),o=[],i=t.wtf,a=n.split(",");i?o=a.map(function(t){return"HTML"+t+"Element"}).concat(r):t.EventTarget?o.push("EventTarget"):o=r;for(var u=t.__Zone_disable_IE_check||!1,c=t.__Zone_enable_cross_context_check||!1,p=Z(),h="function __BROWSERTOOLS_CONSOLE_SAFEFUNC() { [native code] }",v=0;v<ct.length;v++){var g=l+((k=ct[v])+f),d=l+(k+s);A[k]={},A[k][f]=g,A[k][s]=d}for(v=0;v<n.length;v++)for(var y=a[v],m=X[y]={},b=0;b<ct.length;b++){var k;m[k=ct[b]]=y+".addEventListener:"+k}var _=[];for(v=0;v<o.length;v++){var S=t[o[v]];_.push(S&&S.prototype)}z(t,_,{vh:function(t,e,n,r){if(!u&&p){if(c)try{var o;if("[object FunctionWrapper]"===(o=e.toString())||o==h)return t.apply(n,r),!1}catch(e){return t.apply(n,r),!1}else if("[object FunctionWrapper]"===(o=e.toString())||o==h)return t.apply(n,r),!1}else if(c)try{e.toString()}catch(e){return t.apply(n,r),!1}return!0}}),e.patchEventTarget=z}(t,n);var o=t.XMLHttpRequestEventTarget;o&&o.prototype&&n.patchEventTarget(t,[o.prototype]),j("MutationObserver"),j("WebKitMutationObserver"),j("IntersectionObserver"),j("FileReader")}),Zone.__load_patch("on_property",function(e,n,r){ft(0,e),Object.defineProperty=function(t,e,n){if(Y(t,e))throw new TypeError("Cannot assign to read only property '"+e+"' of "+t);var r=n.configurable;return"prototype"!==e&&(n=J(t,e,n)),Q(t,e,n,r)},Object.defineProperties=function(t,e){return Object.keys(e).forEach(function(n){Object.defineProperty(t,n,e[n])}),t},Object.create=function(t,e){return"object"!=typeof e||Object.isFrozen(e)||Object.keys(e).forEach(function(n){e[n]=J(t,n,e[n])}),G(t,e)},Object.getOwnPropertyDescriptor=function(t,e){var n=W(t,e);return Y(t,e)&&(n.configurable=!1),n},function(n){if((w||E)&&"registerElement"in e.document){var r=document.registerElement,o=["createdCallback","attachedCallback","detachedCallback","attributeChangedCallback"];document.registerElement=function(e,n){return n&&n.prototype&&o.forEach(function(e){var r,o,i,a,u="Document.registerElement::"+e,c=n.prototype;if(c.hasOwnProperty(e)){var s=t(c,e);s&&s.value?(s.value=p(s.value,u),a=(i=s).configurable,Q(r=n.prototype,o=e,i=J(r,o,i),a)):c[e]=p(c[e],u)}else c[e]&&(c[e]=p(c[e],u))}),r.call(document,e,n)},I(document.registerElement,r)}}()}),Zone.__load_patch("canvas",function(t){var e=t.HTMLCanvasElement;void 0!==e&&e.prototype&&e.prototype.toBlob&&function(t,n,r){var o=null;function i(t){var e=t.data;return e.args[e.cbIdx]=function(){t.invoke.apply(this,arguments)},o.apply(e.target,e.args),t}o=D(e.prototype,"toBlob",function(t){return function(e,n){var r=function(t,e){return{name:"HTMLCanvasElement.toBlob",target:t,cbIdx:0,args:e}}(e,n);return r.cbIdx>=0&&"function"==typeof n[r.cbIdx]?h(r.name,n[r.cbIdx],r,i,null):t.apply(e,n)}})}()}),Zone.__load_patch("XHR",function(t,e){!function(e){var s=XMLHttpRequest.prototype,f=s[u],l=s[c];if(!f){var p=t.XMLHttpRequestEventTarget;if(p){var v=p.prototype;f=v[u],l=v[c]}}var g="readystatechange",d="scheduled";function y(t){XMLHttpRequest[i]=!1;var e=t.data,r=e.target,a=r[o];f||(f=r[u],l=r[c]),a&&l.call(r,g,a);var s=r[o]=function(){r.readyState===r.DONE&&!e.aborted&&XMLHttpRequest[i]&&t.state===d&&t.invoke()};return f.call(r,g,s),r[n]||(r[n]=t),_.apply(r,e.args),XMLHttpRequest[i]=!0,t}function m(){}function b(t){var e=t.data;return e.aborted=!0,S.apply(e.target,e.args)}var k=D(s,"open",function(){return function(t,e){return t[r]=0==e[2],t[a]=e[1],k.apply(t,e)}}),_=D(s,"send",function(){return function(t,e){return t[r]?_.apply(t,e):h("XMLHttpRequest.send",m,{target:t,url:t[a],isPeriodic:!1,delay:null,args:e,aborted:!1},y,b)}}),S=D(s,"abort",function(){return function(t){var e=t[n];if(e&&"string"==typeof e.type){if(null==e.cancelFn||e.data&&e.data.aborted)return;e.zone.cancelTask(e)}}})}();var n=v("xhrTask"),r=v("xhrSync"),o=v("xhrListener"),i=v("xhrScheduled"),a=v("xhrURL")}),Zone.__load_patch("geolocation",function(e){e.navigator&&e.navigator.geolocation&&function(e,n){for(var r=e.constructor.name,o=function(o){var i=n[o],a=e[i];if(a){if(!_(t(e,i)))return"continue";e[i]=function(t){var e=function(){return t.apply(this,k(arguments,r+"."+i))};return I(e,t),e}(a)}},i=0;i<n.length;i++)o(i)}(e.navigator.geolocation,["getCurrentPosition","watchPosition"])}),Zone.__load_patch("PromiseRejectionEvent",function(t,e){function n(e){return function(n){N(t,e).forEach(function(r){var o=t.PromiseRejectionEvent;if(o){var i=new o(e,{promise:n.promise,reason:n.rejection});r.invoke(i)}})}}t.PromiseRejectionEvent&&(e[v("unhandledPromiseRejectionHandler")]=n("unhandledrejection"),e[v("rejectionHandledHandler")]=n("rejectionhandled"))})}()},"0l/t":function(t,e,n){"use strict";var r=n("XKFU"),o=n("CkkT")(2);r(r.P+r.F*!n("LyE8")([].filter,!0),"Array",{filter:function(t){return o(this,t,arguments[1])}})},"0mN4":function(t,e,n){"use strict";n("OGtf")("fixed",function(t){return function(){return t(this,"tt","","")}})},"0sh+":function(t,e,n){var r=n("quPj"),o=n("vhPU");t.exports=function(t,e,n){if(r(e))throw TypeError("String#"+n+" doesn't accept regex!");return String(o(t))}},"11IZ":function(t,e,n){var r=n("dyZX").parseFloat,o=n("qncB").trim;t.exports=1/r(n("/e88")+"-0")!=-1/0?function(t){var e=o(String(t),3),n=r(e);return 0===n&&"-"==e.charAt(0)?-0:n}:r},"1MBn":function(t,e,n){var r=n("DVgA"),o=n("JiEa"),i=n("UqcF");t.exports=function(t){var e=r(t),n=o.f;if(n)for(var a,u=n(t),c=i.f,s=0;u.length>s;)c.call(t,a=u[s++])&&e.push(a);return e}},"1TsA":function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},"1sa7":function(t,e){t.exports=Math.log1p||function(t){return(t=+t)>-1e-8&&t<1e-8?t-t*t/2:Math.log(1+t)}},2:function(t,e,n){t.exports=n("hN/g")},"25dN":function(t,e,n){var r=n("XKFU");r(r.S,"Object",{is:n("g6HL")})},"2OiF":function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},"2Spj":function(t,e,n){var r=n("XKFU");r(r.P,"Function",{bind:n("8MEG")})},"2atp":function(t,e,n){var r=n("XKFU"),o=Math.atanh;r(r.S+r.F*!(o&&1/o(-0)<0),"Math",{atanh:function(t){return 0==(t=+t)?t:Math.log((1+t)/(1-t))/2}})},"3Lyj":function(t,e,n){var r=n("KroJ");t.exports=function(t,e,n){for(var o in e)r(t,o,e[o],n);return t}},"4A4+":function(t,e,n){n("2Spj"),n("f3/d"),n("IXt9"),t.exports=n("g3g5").Function},"4LiD":function(t,e,n){"use strict";var r=n("dyZX"),o=n("XKFU"),i=n("KroJ"),a=n("3Lyj"),u=n("Z6vF"),c=n("SlkY"),s=n("9gX7"),f=n("0/R4"),l=n("eeVq"),p=n("XMVh"),h=n("fyDq"),v=n("Xbzi");t.exports=function(t,e,n,g,d,y){var m=r[t],b=m,k=d?"set":"add",_=b&&b.prototype,S={},T=function(t){var e=_[t];i(_,t,"delete"==t?function(t){return!(y&&!f(t))&&e.call(this,0===t?0:t)}:"has"==t?function(t){return!(y&&!f(t))&&e.call(this,0===t?0:t)}:"get"==t?function(t){return y&&!f(t)?void 0:e.call(this,0===t?0:t)}:"add"==t?function(t){return e.call(this,0===t?0:t),this}:function(t,n){return e.call(this,0===t?0:t,n),this})};if("function"==typeof b&&(y||_.forEach&&!l(function(){(new b).entries().next()}))){var w=new b,E=w[k](y?{}:-0,1)!=w,x=l(function(){w.has(1)}),F=p(function(t){new b(t)}),O=!y&&l(function(){for(var t=new b,e=5;e--;)t[k](e,e);return!t.has(-0)});F||((b=e(function(e,n){s(e,b,t);var r=v(new m,e,b);return void 0!=n&&c(n,d,r[k],r),r})).prototype=_,_.constructor=b),(x||O)&&(T("delete"),T("has"),d&&T("get")),(O||E)&&T(k),y&&_.clear&&delete _.clear}else b=g.getConstructor(e,t,d,k),a(b.prototype,n),u.NEED=!0;return h(b,t),S[t]=b,o(o.G+o.W+o.F*(b!=m),S),y||g.setStrong(b,t,d),b}},"4R4u":function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},"5Pf0":function(t,e,n){var r=n("S/j/"),o=n("OP3Y");n("Xtr8")("getPrototypeOf",function(){return function(t){return o(r(t))}})},"6AQ9":function(t,e,n){"use strict";var r=n("XKFU"),o=n("8a7r");r(r.S+r.F*n("eeVq")(function(){function t(){}return!(Array.of.call(t)instanceof t)}),"Array",{of:function(){for(var t=0,e=arguments.length,n=new("function"==typeof this?this:Array)(e);e>t;)o(n,t,arguments[t++]);return n.length=e,n}})},"6FMO":function(t,e,n){var r=n("0/R4"),o=n("EWmC"),i=n("K0xU")("species");t.exports=function(t){var e;return o(t)&&("function"!=typeof(e=t.constructor)||e!==Array&&!o(e.prototype)||(e=void 0),r(e)&&null===(e=e[i])&&(e=void 0)),void 0===e?Array:e}},"7h0T":function(t,e,n){var r=n("XKFU");r(r.S,"Number",{isNaN:function(t){return t!=t}})},"8+KV":function(t,e,n){"use strict";var r=n("XKFU"),o=n("CkkT")(0),i=n("LyE8")([].forEach,!0);r(r.P+r.F*!i,"Array",{forEach:function(t){return o(this,t,arguments[1])}})},"84bF":function(t,e,n){"use strict";n("OGtf")("small",function(t){return function(){return t(this,"small","","")}})},"8MEG":function(t,e,n){"use strict";var r=n("2OiF"),o=n("0/R4"),i=n("MfQN"),a=[].slice,u={};t.exports=Function.bind||function(t){var e=r(this),n=a.call(arguments,1),c=function(){var r=n.concat(a.call(arguments));return this instanceof c?function(t,e,n){if(!(e in u)){for(var r=[],o=0;o<e;o++)r[o]="a["+o+"]";u[e]=Function("F,a","return new F("+r.join(",")+")")}return u[e](t,n)}(e,r.length,r):i(e,r,t)};return o(e.prototype)&&(c.prototype=e.prototype),c}},"8a7r":function(t,e,n){"use strict";var r=n("hswa"),o=n("RjD/");t.exports=function(t,e,n){e in t?r.f(t,e,o(0,n)):t[e]=n}},"91GP":function(t,e,n){var r=n("XKFU");r(r.S+r.F,"Object",{assign:n("czNK")})},"99sg":function(t,e,n){n("ioFf"),n("hHhE"),n("HAE/"),n("WLL4"),n("mYba"),n("5Pf0"),n("RW0V"),n("JduL"),n("DW2E"),n("z2o2"),n("mura"),n("Zshi"),n("V/DX"),n("FlsD"),n("91GP"),n("25dN"),n("/SS/"),n("Btvt"),t.exports=n("g3g5").Object},"9AAn":function(t,e,n){"use strict";var r=n("wmvG"),o=n("s5qY");t.exports=n("4LiD")("Map",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{get:function(t){var e=r.getEntry(o(this,"Map"),t);return e&&e.v},set:function(t,e){return r.def(o(this,"Map"),0===t?0:t,e)}},r,!0)},"9P93":function(t,e,n){var r=n("XKFU"),o=Math.imul;r(r.S+r.F*n("eeVq")(function(){return-5!=o(4294967295,5)||2!=o.length}),"Math",{imul:function(t,e){var n=+t,r=+e,o=65535&n,i=65535&r;return 0|o*i+((65535&n>>>16)*i+o*(65535&r>>>16)<<16>>>0)}})},"9VmF":function(t,e,n){"use strict";var r=n("XKFU"),o=n("ne8i"),i=n("0sh+"),a="".startsWith;r(r.P+r.F*n("UUeW")("startsWith"),"String",{startsWith:function(t){var e=i(this,t,"startsWith"),n=o(Math.min(arguments.length>1?arguments[1]:void 0,e.length)),r=String(t);return a?a.call(e,r,n):e.slice(n,n+r.length)===r}})},"9gX7":function(t,e){t.exports=function(t,e,n,r){if(!(t instanceof e)||void 0!==r&&r in t)throw TypeError(n+": incorrect invocation!");return t}},A2zW:function(t,e,n){"use strict";var r=n("XKFU"),o=n("RYi7"),i=n("vvmO"),a=n("l0Rn"),u=1..toFixed,c=Math.floor,s=[0,0,0,0,0,0],f="Number.toFixed: incorrect invocation!",l=function(t,e){for(var n=-1,r=e;++n<6;)s[n]=(r+=t*s[n])%1e7,r=c(r/1e7)},p=function(t){for(var e=6,n=0;--e>=0;)s[e]=c((n+=s[e])/t),n=n%t*1e7},h=function(){for(var t=6,e="";--t>=0;)if(""!==e||0===t||0!==s[t]){var n=String(s[t]);e=""===e?n:e+a.call("0",7-n.length)+n}return e},v=function(t,e,n){return 0===e?n:e%2==1?v(t,e-1,n*t):v(t*t,e/2,n)};r(r.P+r.F*(!!u&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!n("eeVq")(function(){u.call({})})),"Number",{toFixed:function(t){var e,n,r,u,c=i(this,f),s=o(t),g="",d="0";if(s<0||s>20)throw RangeError(f);if(c!=c)return"NaN";if(c<=-1e21||c>=1e21)return String(c);if(c<0&&(g="-",c=-c),c>1e-21)if(n=(e=function(t){for(var e=0,n=t;n>=4096;)e+=12,n/=4096;for(;n>=2;)e+=1,n/=2;return e}(c*v(2,69,1))-69)<0?c*v(2,-e,1):c/v(2,e,1),n*=4503599627370496,(e=52-e)>0){for(l(0,n),r=s;r>=7;)l(1e7,0),r-=7;for(l(v(10,r,1),0),r=e-1;r>=23;)p(1<<23),r-=23;p(1<<r),l(1,1),p(2),d=h()}else l(0,n),l(1<<-e,0),d=h()+a.call("0",s);return s>0?g+((u=d.length)<=s?"0."+a.call("0",s-u)+d:d.slice(0,u-s)+"."+d.slice(u-s)):g+d}})},Afnz:function(t,e,n){"use strict";var r=n("LQAc"),o=n("XKFU"),i=n("KroJ"),a=n("Mukb"),u=n("hPIQ"),c=n("QaDb"),s=n("fyDq"),f=n("OP3Y"),l=n("K0xU")("iterator"),p=!([].keys&&"next"in[].keys()),h=function(){return this};t.exports=function(t,e,n,v,g,d,y){c(n,e,v);var m,b,k,_=function(t){if(!p&&t in E)return E[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}},S=e+" Iterator",T="values"==g,w=!1,E=t.prototype,x=E[l]||E["@@iterator"]||g&&E[g],F=x||_(g),O=g?T?_("entries"):F:void 0,P="Array"==e&&E.entries||x;if(P&&(k=f(P.call(new t)))!==Object.prototype&&k.next&&(s(k,S,!0),r||"function"==typeof k[l]||a(k,l,h)),T&&x&&"values"!==x.name&&(w=!0,F=function(){return x.call(this)}),r&&!y||!p&&!w&&E[l]||a(E,l,F),u[e]=F,u[S]=h,g)if(m={values:T?F:_("values"),keys:d?F:_("keys"),entries:O},y)for(b in m)b in E||i(E,b,m[b]);else o(o.P+o.F*(p||w),e,m);return m}},AphP:function(t,e,n){"use strict";var r=n("XKFU"),o=n("S/j/"),i=n("apmT");r(r.P+r.F*n("eeVq")(function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}),"Date",{toJSON:function(t){var e=o(this),n=i(e);return"number"!=typeof n||isFinite(n)?e.toISOString():null}})},AvRE:function(t,e,n){var r=n("RYi7"),o=n("vhPU");t.exports=function(t){return function(e,n){var i,a,u=String(o(e)),c=r(n),s=u.length;return c<0||c>=s?t?"":void 0:(i=u.charCodeAt(c))<55296||i>56319||c+1===s||(a=u.charCodeAt(c+1))<56320||a>57343?t?u.charAt(c):i:t?u.slice(c,c+2):a-56320+(i-55296<<10)+65536}}},BC7C:function(t,e,n){var r=n("XKFU");r(r.S,"Math",{fround:n("kcoS")})},"BJ/l":function(t,e,n){var r=n("XKFU");r(r.S,"Math",{log1p:n("1sa7")})},BP8U:function(t,e,n){var r=n("XKFU"),o=n("PKUr");r(r.S+r.F*(Number.parseInt!=o),"Number",{parseInt:o})},Btvt:function(t,e,n){"use strict";var r=n("I8a+"),o={};o[n("K0xU")("toStringTag")]="z",o+""!="[object z]"&&n("KroJ")(Object.prototype,"toString",function(){return"[object "+r(this)+"]"},!0)},"C/va":function(t,e,n){"use strict";var r=n("y3w9");t.exports=function(){var t=r(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},CkkT:function(t,e,n){var r=n("m0Pp"),o=n("Ymqv"),i=n("S/j/"),a=n("ne8i"),u=n("zRwo");t.exports=function(t,e){var n=1==t,c=2==t,s=3==t,f=4==t,l=6==t,p=5==t||l,h=e||u;return function(e,u,v){for(var g,d,y=i(e),m=o(y),b=r(u,v,3),k=a(m.length),_=0,S=n?h(e,k):c?h(e,0):void 0;k>_;_++)if((p||_ in m)&&(d=b(g=m[_],_,y),t))if(n)S[_]=d;else if(d)switch(t){case 3:return!0;case 5:return g;case 6:return _;case 2:S.push(g)}else if(f)return!1;return l?-1:s||f?f:S}}},CuTL:function(t,e,n){n("fyVe"),n("U2t9"),n("2atp"),n("+auO"),n("MtdB"),n("Jcmo"),n("nzyx"),n("BC7C"),n("x8ZO"),n("9P93"),n("eHKK"),n("BJ/l"),n("pp/T"),n("CyHz"),n("bBoP"),n("x8Yj"),n("hLT2"),t.exports=n("g3g5").Math},CyHz:function(t,e,n){var r=n("XKFU");r(r.S,"Math",{sign:n("lvtm")})},DNiP:function(t,e,n){"use strict";var r=n("XKFU"),o=n("eyMr");r(r.P+r.F*!n("LyE8")([].reduce,!0),"Array",{reduce:function(t){return o(this,t,arguments.length,arguments[1],!1)}})},DVgA:function(t,e,n){var r=n("zhAb"),o=n("4R4u");t.exports=Object.keys||function(t){return r(t,o)}},DW2E:function(t,e,n){var r=n("0/R4"),o=n("Z6vF").onFreeze;n("Xtr8")("freeze",function(t){return function(e){return t&&r(e)?t(o(e)):e}})},EK0E:function(t,e,n){"use strict";var r,o=n("CkkT")(0),i=n("KroJ"),a=n("Z6vF"),u=n("czNK"),c=n("ZD67"),s=n("0/R4"),f=n("eeVq"),l=n("s5qY"),p=a.getWeak,h=Object.isExtensible,v=c.ufstore,g={},d=function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},y={get:function(t){if(s(t)){var e=p(t);return!0===e?v(l(this,"WeakMap")).get(t):e?e[this._i]:void 0}},set:function(t,e){return c.def(l(this,"WeakMap"),t,e)}},m=t.exports=n("4LiD")("WeakMap",d,y,c,!0,!0);f(function(){return 7!=(new m).set((Object.freeze||Object)(g),7).get(g)})&&(u((r=c.getConstructor(d,"WeakMap")).prototype,y),a.NEED=!0,o(["delete","has","get","set"],function(t){var e=m.prototype,n=e[t];i(e,t,function(e,o){if(s(e)&&!h(e)){this._f||(this._f=new r);var i=this._f[t](e,o);return"set"==t?this:i}return n.call(this,e,o)})}))},EWmC:function(t,e,n){var r=n("LZWt");t.exports=Array.isArray||function(t){return"Array"==r(t)}},EemH:function(t,e,n){var r=n("UqcF"),o=n("RjD/"),i=n("aCFj"),a=n("apmT"),u=n("aagx"),c=n("xpql"),s=Object.getOwnPropertyDescriptor;e.f=n("nh4g")?s:function(t,e){if(t=i(t),e=a(e,!0),c)try{return s(t,e)}catch(t){}if(u(t,e))return o(!r.f.call(t,e),t[e])}},FEjr:function(t,e,n){"use strict";n("OGtf")("strike",function(t){return function(){return t(this,"strike","","")}})},FJW5:function(t,e,n){var r=n("hswa"),o=n("y3w9"),i=n("DVgA");t.exports=n("nh4g")?Object.defineProperties:function(t,e){o(t);for(var n,a=i(e),u=a.length,c=0;u>c;)r.f(t,n=a[c++],e[n]);return t}},FLlr:function(t,e,n){var r=n("XKFU");r(r.P,"String",{repeat:n("l0Rn")})},FlsD:function(t,e,n){var r=n("0/R4");n("Xtr8")("isExtensible",function(t){return function(e){return!!r(e)&&(!t||t(e))}})},GNAe:function(t,e,n){var r=n("XKFU"),o=n("PKUr");r(r.G+r.F*(parseInt!=o),{parseInt:o})},H6hf:function(t,e,n){var r=n("y3w9");t.exports=function(t,e,n,o){try{return o?e(r(n)[0],n[1]):e(n)}catch(e){var i=t.return;throw void 0!==i&&r(i.call(t)),e}}},"HAE/":function(t,e,n){var r=n("XKFU");r(r.S+r.F*!n("nh4g"),"Object",{defineProperty:n("hswa").f})},HEwt:function(t,e,n){"use strict";var r=n("m0Pp"),o=n("XKFU"),i=n("S/j/"),a=n("H6hf"),u=n("M6Qj"),c=n("ne8i"),s=n("8a7r"),f=n("J+6e");o(o.S+o.F*!n("XMVh")(function(t){Array.from(t)}),"Array",{from:function(t){var e,n,o,l,p=i(t),h="function"==typeof this?this:Array,v=arguments.length,g=v>1?arguments[1]:void 0,d=void 0!==g,y=0,m=f(p);if(d&&(g=r(g,v>2?arguments[2]:void 0,2)),void 0==m||h==Array&&u(m))for(n=new h(e=c(p.length));e>y;y++)s(n,y,d?g(p[y],y):p[y]);else for(l=m.call(p),n=new h;!(o=l.next()).done;y++)s(n,y,d?a(l,g,[o.value,y],!0):o.value);return n.length=y,n}})},I78e:function(t,e,n){"use strict";var r=n("XKFU"),o=n("+rLv"),i=n("LZWt"),a=n("d/Gc"),u=n("ne8i"),c=[].slice;r(r.P+r.F*n("eeVq")(function(){o&&c.call(o)}),"Array",{slice:function(t,e){var n=u(this.length),r=i(this);if(e=void 0===e?n:e,"Array"==r)return c.call(this,t,e);for(var o=a(t,n),s=a(e,n),f=u(s-o),l=new Array(f),p=0;p<f;p++)l[p]="String"==r?this.charAt(o+p):this[o+p];return l}})},"I8a+":function(t,e,n){var r=n("LZWt"),o=n("K0xU")("toStringTag"),i="Arguments"==r(function(){return arguments}());t.exports=function(t){var e,n,a;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),o))?n:i?r(e):"Object"==(a=r(e))&&"function"==typeof e.callee?"Arguments":a}},INYr:function(t,e,n){"use strict";var r=n("XKFU"),o=n("CkkT")(6),i="findIndex",a=!0;i in[]&&Array(1)[i](function(){a=!1}),r(r.P+r.F*a,"Array",{findIndex:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),n("nGyu")(i)},"IU+Z":function(t,e,n){"use strict";var r=n("Mukb"),o=n("KroJ"),i=n("eeVq"),a=n("vhPU"),u=n("K0xU");t.exports=function(t,e,n){var c=u(t),s=n(a,c,""[t]),f=s[0],l=s[1];i(function(){var e={};return e[c]=function(){return 7},7!=""[t](e)})&&(o(String.prototype,t,f),r(RegExp.prototype,c,2==e?function(t,e){return l.call(t,this,e)}:function(t){return l.call(t,this)}))}},IXt9:function(t,e,n){"use strict";var r=n("0/R4"),o=n("OP3Y"),i=n("K0xU")("hasInstance"),a=Function.prototype;i in a||n("hswa").f(a,i,{value:function(t){if("function"!=typeof this||!r(t))return!1;if(!r(this.prototype))return t instanceof this;for(;t=o(t);)if(this.prototype===t)return!0;return!1}})},Iw71:function(t,e,n){var r=n("0/R4"),o=n("dyZX").document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},"J+6e":function(t,e,n){var r=n("I8a+"),o=n("K0xU")("iterator"),i=n("hPIQ");t.exports=n("g3g5").getIteratorMethod=function(t){if(void 0!=t)return t[o]||t["@@iterator"]||i[r(t)]}},JCqj:function(t,e,n){"use strict";n("OGtf")("sup",function(t){return function(){return t(this,"sup","","")}})},Jcmo:function(t,e,n){var r=n("XKFU"),o=Math.exp;r(r.S,"Math",{cosh:function(t){return(o(t=+t)+o(-t))/2}})},JduL:function(t,e,n){n("Xtr8")("getOwnPropertyNames",function(){return n("e7yV").f})},JiEa:function(t,e){e.f=Object.getOwnPropertySymbols},K0xU:function(t,e,n){var r=n("VTer")("wks"),o=n("ylqs"),i=n("dyZX").Symbol,a="function"==typeof i;(t.exports=function(t){return r[t]||(r[t]=a&&i[t]||(a?i:o)("Symbol."+t))}).store=r},KKXr:function(t,e,n){n("IU+Z")("split",2,function(t,e,r){"use strict";var o=n("quPj"),i=r,a=[].push;if("c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length){var u=void 0===/()??/.exec("")[1];r=function(t,e){var n=String(this);if(void 0===t&&0===e)return[];if(!o(t))return i.call(n,t,e);var r,c,s,f,l,p=[],h=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),v=0,g=void 0===e?4294967295:e>>>0,d=new RegExp(t.source,h+"g");for(u||(r=new RegExp("^"+d.source+"$(?!\\s)",h));(c=d.exec(n))&&!((s=c.index+c[0].length)>v&&(p.push(n.slice(v,c.index)),!u&&c.length>1&&c[0].replace(r,function(){for(l=1;l<arguments.length-2;l++)void 0===arguments[l]&&(c[l]=void 0)}),c.length>1&&c.index<n.length&&a.apply(p,c.slice(1)),f=c[0].length,v=s,p.length>=g));)d.lastIndex===c.index&&d.lastIndex++;return v===n.length?!f&&d.test("")||p.push(""):p.push(n.slice(v)),p.length>g?p.slice(0,g):p}}else"0".split(void 0,0).length&&(r=function(t,e){return void 0===t&&0===e?[]:i.call(this,t,e)});return[function(n,o){var i=t(this),a=void 0==n?void 0:n[e];return void 0!==a?a.call(n,i,o):r.call(String(i),n,o)},r]})},KroJ:function(t,e,n){var r=n("dyZX"),o=n("Mukb"),i=n("aagx"),a=n("ylqs")("src"),u=Function.toString,c=(""+u).split("toString");n("g3g5").inspectSource=function(t){return u.call(t)},(t.exports=function(t,e,n,u){var s="function"==typeof n;s&&(i(n,"name")||o(n,"name",e)),t[e]!==n&&(s&&(i(n,a)||o(n,a,t[e]?""+t[e]:c.join(String(e)))),t===r?t[e]=n:u?t[e]?t[e]=n:o(t,e,n):(delete t[e],o(t,e,n)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[a]||u.call(this)})},Kuth:function(t,e,n){var r=n("y3w9"),o=n("FJW5"),i=n("4R4u"),a=n("YTvA")("IE_PROTO"),u=function(){},c=function(){var t,e=n("Iw71")("iframe"),r=i.length;for(e.style.display="none",n("+rLv").appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),c=t.F;r--;)delete c.prototype[i[r]];return c()};t.exports=Object.create||function(t,e){var n;return null!==t?(u.prototype=r(t),n=new u,u.prototype=null,n[a]=t):n=c(),void 0===e?n:o(n,e)}},L9s1:function(t,e,n){"use strict";var r=n("XKFU"),o=n("0sh+");r(r.P+r.F*n("UUeW")("includes"),"String",{includes:function(t){return!!~o(this,t,"includes").indexOf(t,arguments.length>1?arguments[1]:void 0)}})},LK8F:function(t,e,n){var r=n("XKFU");r(r.S,"Array",{isArray:n("EWmC")})},LQAc:function(t,e){t.exports=!1},LVwc:function(t,e){var n=Math.expm1;t.exports=!n||n(10)>22025.465794806718||n(10)<22025.465794806718||-2e-17!=n(-2e-17)?function(t){return 0==(t=+t)?t:t>-1e-6&&t<1e-6?t+t*t/2:Math.exp(t)-1}:n},LZWt:function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},Ljet:function(t,e,n){var r=n("XKFU");r(r.S,"Number",{EPSILON:Math.pow(2,-52)})},Lmuc:function(t,e,n){n("xfY5"),n("A2zW"),n("VKir"),n("Ljet"),n("/KAi"),n("fN96"),n("7h0T"),n("sbF8"),n("h/M4"),n("knhD"),n("XfKG"),n("BP8U"),t.exports=n("g3g5").Number},LyE8:function(t,e,n){"use strict";var r=n("eeVq");t.exports=function(t,e){return!!t&&r(function(){e?t.call(null,function(){},1):t.call(null)})}},M6Qj:function(t,e,n){var r=n("hPIQ"),o=n("K0xU")("iterator"),i=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||i[o]===t)}},MfQN:function(t,e){t.exports=function(t,e,n){var r=void 0===n;switch(e.length){case 0:return r?t():t.call(n);case 1:return r?t(e[0]):t.call(n,e[0]);case 2:return r?t(e[0],e[1]):t.call(n,e[0],e[1]);case 3:return r?t(e[0],e[1],e[2]):t.call(n,e[0],e[1],e[2]);case 4:return r?t(e[0],e[1],e[2],e[3]):t.call(n,e[0],e[1],e[2],e[3])}return t.apply(n,e)}},MtdB:function(t,e,n){var r=n("XKFU");r(r.S,"Math",{clz32:function(t){return(t>>>=0)?31-Math.floor(Math.log(t+.5)*Math.LOG2E):32}})},Mukb:function(t,e,n){var r=n("hswa"),o=n("RjD/");t.exports=n("nh4g")?function(t,e,n){return r.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},N8g3:function(t,e,n){e.f=n("K0xU")},Nr18:function(t,e,n){"use strict";var r=n("S/j/"),o=n("d/Gc"),i=n("ne8i");t.exports=function(t){for(var e=r(this),n=i(e.length),a=arguments.length,u=o(a>1?arguments[1]:void 0,n),c=a>2?arguments[2]:void 0,s=void 0===c?n:o(c,n);s>u;)e[u++]=t;return e}},Nz9U:function(t,e,n){"use strict";var r=n("XKFU"),o=n("aCFj"),i=[].join;r(r.P+r.F*(n("Ymqv")!=Object||!n("LyE8")(i)),"Array",{join:function(t){return i.call(o(this),void 0===t?",":t)}})},OEbY:function(t,e,n){n("nh4g")&&"g"!=/./g.flags&&n("hswa").f(RegExp.prototype,"flags",{configurable:!0,get:n("C/va")})},OG14:function(t,e,n){n("IU+Z")("search",1,function(t,e,n){return[function(n){"use strict";var r=t(this),o=void 0==n?void 0:n[e];return void 0!==o?o.call(n,r):new RegExp(n)[e](String(r))},n]})},OGtf:function(t,e,n){var r=n("XKFU"),o=n("eeVq"),i=n("vhPU"),a=/"/g,u=function(t,e,n,r){var o=String(i(t)),u="<"+e;return""!==n&&(u+=" "+n+'="'+String(r).replace(a,""")+'"'),u+">"+o+"</"+e+">"};t.exports=function(t,e){var n={};n[t]=e(u),r(r.P+r.F*o(function(){var e=""[t]('"');return e!==e.toLowerCase()||e.split('"').length>3}),"String",n)}},OP3Y:function(t,e,n){var r=n("aagx"),o=n("S/j/"),i=n("YTvA")("IE_PROTO"),a=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=o(t),r(t,i)?t[i]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?a:null}},OnI7:function(t,e,n){var r=n("dyZX"),o=n("g3g5"),i=n("LQAc"),a=n("N8g3"),u=n("hswa").f;t.exports=function(t){var e=o.Symbol||(o.Symbol=i?{}:r.Symbol||{});"_"==t.charAt(0)||t in e||u(e,t,{value:a.f(t)})}},Oyvg:function(t,e,n){var r=n("dyZX"),o=n("Xbzi"),i=n("hswa").f,a=n("kJMx").f,u=n("quPj"),c=n("C/va"),s=r.RegExp,f=s,l=s.prototype,p=/a/g,h=/a/g,v=new s(p)!==p;if(n("nh4g")&&(!v||n("eeVq")(function(){return h[n("K0xU")("match")]=!1,s(p)!=p||s(h)==h||"/a/i"!=s(p,"i")}))){s=function(t,e){var n=this instanceof s,r=u(t),i=void 0===e;return!n&&r&&t.constructor===s&&i?t:o(v?new f(r&&!i?t.source:t,e):f((r=t instanceof s)?t.source:t,r&&i?c.call(t):e),n?this:l,s)};for(var g=function(t){t in s||i(s,t,{configurable:!0,get:function(){return f[t]},set:function(e){f[t]=e}})},d=a(f),y=0;d.length>y;)g(d[y++]);l.constructor=s,s.prototype=l,n("KroJ")(r,"RegExp",s)}n("elZq")("RegExp")},PKUr:function(t,e,n){var r=n("dyZX").parseInt,o=n("qncB").trim,i=n("/e88"),a=/^[-+]?0[xX]/;t.exports=8!==r(i+"08")||22!==r(i+"0x16")?function(t,e){var n=o(String(t),3);return r(n,e>>>0||(a.test(n)?16:10))}:r},QaDb:function(t,e,n){"use strict";var r=n("Kuth"),o=n("RjD/"),i=n("fyDq"),a={};n("Mukb")(a,n("K0xU")("iterator"),function(){return this}),t.exports=function(t,e,n){t.prototype=r(a,{next:o(1,n)}),i(t,e+" Iterator")}},RW0V:function(t,e,n){var r=n("S/j/"),o=n("DVgA");n("Xtr8")("keys",function(){return function(t){return o(r(t))}})},RYi7:function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},"RjD/":function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},"S/j/":function(t,e,n){var r=n("vhPU");t.exports=function(t){return Object(r(t))}},SMB2:function(t,e,n){"use strict";n("OGtf")("bold",function(t){return function(){return t(this,"b","","")}})},SPin:function(t,e,n){"use strict";var r=n("XKFU"),o=n("eyMr");r(r.P+r.F*!n("LyE8")([].reduceRight,!0),"Array",{reduceRight:function(t){return o(this,t,arguments.length,arguments[1],!0)}})},SRfc:function(t,e,n){n("IU+Z")("match",1,function(t,e,n){return[function(n){"use strict";var r=t(this),o=void 0==n?void 0:n[e];return void 0!==o?o.call(n,r):new RegExp(n)[e](String(r))},n]})},SlkY:function(t,e,n){var r=n("m0Pp"),o=n("H6hf"),i=n("M6Qj"),a=n("y3w9"),u=n("ne8i"),c=n("J+6e"),s={},f={};(e=t.exports=function(t,e,n,l,p){var h,v,g,d,y=p?function(){return t}:c(t),m=r(n,l,e?2:1),b=0;if("function"!=typeof y)throw TypeError(t+" is not iterable!");if(i(y)){for(h=u(t.length);h>b;b++)if((d=e?m(a(v=t[b])[0],v[1]):m(t[b]))===s||d===f)return d}else for(g=y.call(t);!(v=g.next()).done;)if((d=o(g,m,v.value,e))===s||d===f)return d}).BREAK=s,e.RETURN=f},T39b:function(t,e,n){"use strict";var r=n("wmvG"),o=n("s5qY");t.exports=n("4LiD")("Set",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{add:function(t){return r.def(o(this,"Set"),t=0===t?0:t,t)}},r)},Tze0:function(t,e,n){"use strict";n("qncB")("trim",function(t){return function(){return t(this,3)}})},U2t9:function(t,e,n){var r=n("XKFU"),o=Math.asinh;r(r.S+r.F*!(o&&1/o(0)>0),"Math",{asinh:function t(e){return isFinite(e=+e)&&0!=e?e<0?-t(-e):Math.log(e+Math.sqrt(e*e+1)):e}})},UUeW:function(t,e,n){var r=n("K0xU")("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[r]=!1,!"/./"[t](e)}catch(t){}}return!0}},UqcF:function(t,e){e.f={}.propertyIsEnumerable},"V+eJ":function(t,e,n){"use strict";var r=n("XKFU"),o=n("w2a5")(!1),i=[].indexOf,a=!!i&&1/[1].indexOf(1,-0)<0;r(r.P+r.F*(a||!n("LyE8")(i)),"Array",{indexOf:function(t){return a?i.apply(this,arguments)||0:o(this,t,arguments[1])}})},"V/DX":function(t,e,n){var r=n("0/R4");n("Xtr8")("isSealed",function(t){return function(e){return!r(e)||!!t&&t(e)}})},"V5/Y":function(t,e,n){n("VpUO"),n("eI33"),n("Tze0"),n("XfO3"),n("oDIu"),n("rvZc"),n("L9s1"),n("FLlr"),n("9VmF"),n("hEkN"),n("nIY7"),n("+oPb"),n("SMB2"),n("0mN4"),n("bDcW"),n("nsiH"),n("0LDn"),n("tUrg"),n("84bF"),n("FEjr"),n("Zz4T"),n("JCqj"),n("SRfc"),n("pIFo"),n("OG14"),n("KKXr"),t.exports=n("g3g5").String},VKir:function(t,e,n){"use strict";var r=n("XKFU"),o=n("eeVq"),i=n("vvmO"),a=1..toPrecision;r(r.P+r.F*(o(function(){return"1"!==a.call(1,void 0)})||!o(function(){a.call({})})),"Number",{toPrecision:function(t){var e=i(this,"Number#toPrecision: incorrect invocation!");return void 0===t?a.call(e):a.call(e,t)}})},VTer:function(t,e,n){var r=n("g3g5"),o=n("dyZX"),i=o["__core-js_shared__"]||(o["__core-js_shared__"]={});(t.exports=function(t,e){return i[t]||(i[t]=void 0!==e?e:{})})("versions",[]).push({version:r.version,mode:n("LQAc")?"pure":"global",copyright:"\xa9 2018 Denis Pushkarev (zloirock.ru)"})},VXxg:function(t,e,n){n("Btvt"),n("XfO3"),n("rGqo"),n("T39b"),t.exports=n("g3g5").Set},Vd3H:function(t,e,n){"use strict";var r=n("XKFU"),o=n("2OiF"),i=n("S/j/"),a=n("eeVq"),u=[].sort,c=[1,2,3];r(r.P+r.F*(a(function(){c.sort(void 0)})||!a(function(){c.sort(null)})||!n("LyE8")(u)),"Array",{sort:function(t){return void 0===t?u.call(i(this)):u.call(i(this),o(t))}})},VpUO:function(t,e,n){var r=n("XKFU"),o=n("d/Gc"),i=String.fromCharCode,a=String.fromCodePoint;r(r.S+r.F*(!!a&&1!=a.length),"String",{fromCodePoint:function(t){for(var e,n=[],r=arguments.length,a=0;r>a;){if(e=+arguments[a++],o(e,1114111)!==e)throw RangeError(e+" is not a valid code point");n.push(e<65536?i(e):i(55296+((e-=65536)>>10),e%1024+56320))}return n.join("")}})},WLL4:function(t,e,n){var r=n("XKFU");r(r.S+r.F*!n("nh4g"),"Object",{defineProperties:n("FJW5")})},XKFU:function(t,e,n){var r=n("dyZX"),o=n("g3g5"),i=n("Mukb"),a=n("KroJ"),u=n("m0Pp"),c=function(t,e,n){var s,f,l,p,h=t&c.F,v=t&c.G,g=t&c.P,d=t&c.B,y=v?r:t&c.S?r[e]||(r[e]={}):(r[e]||{}).prototype,m=v?o:o[e]||(o[e]={}),b=m.prototype||(m.prototype={});for(s in v&&(n=e),n)l=((f=!h&&y&&void 0!==y[s])?y:n)[s],p=d&&f?u(l,r):g&&"function"==typeof l?u(Function.call,l):l,y&&a(y,s,l,t&c.U),m[s]!=l&&i(m,s,p),g&&b[s]!=l&&(b[s]=l)};r.core=o,c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,t.exports=c},XMVh:function(t,e,n){var r=n("K0xU")("iterator"),o=!1;try{var i=[7][r]();i.return=function(){o=!0},Array.from(i,function(){throw 2})}catch(t){}t.exports=function(t,e){if(!e&&!o)return!1;var n=!1;try{var i=[7],a=i[r]();a.next=function(){return{done:n=!0}},i[r]=function(){return a},t(i)}catch(t){}return n}},Xbzi:function(t,e,n){var r=n("0/R4"),o=n("i5dc").set;t.exports=function(t,e,n){var i,a=e.constructor;return a!==n&&"function"==typeof a&&(i=a.prototype)!==n.prototype&&r(i)&&o&&o(t,i),t}},XfKG:function(t,e,n){var r=n("XKFU"),o=n("11IZ");r(r.S+r.F*(Number.parseFloat!=o),"Number",{parseFloat:o})},XfO3:function(t,e,n){"use strict";var r=n("AvRE")(!0);n("Afnz")(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=r(e,n),this._i+=t.length,{value:t,done:!1})})},Xtr8:function(t,e,n){var r=n("XKFU"),o=n("g3g5"),i=n("eeVq");t.exports=function(t,e){var n=(o.Object||{})[t]||Object[t],a={};a[t]=e(n),r(r.S+r.F*i(function(){n(1)}),"Object",a)}},YJVH:function(t,e,n){"use strict";var r=n("XKFU"),o=n("CkkT")(4);r(r.P+r.F*!n("LyE8")([].every,!0),"Array",{every:function(t){return o(this,t,arguments[1])}})},YTvA:function(t,e,n){var r=n("VTer")("keys"),o=n("ylqs");t.exports=function(t){return r[t]||(r[t]=o(t))}},Ymqv:function(t,e,n){var r=n("LZWt");t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},Z6vF:function(t,e,n){var r=n("ylqs")("meta"),o=n("0/R4"),i=n("aagx"),a=n("hswa").f,u=0,c=Object.isExtensible||function(){return!0},s=!n("eeVq")(function(){return c(Object.preventExtensions({}))}),f=function(t){a(t,r,{value:{i:"O"+ ++u,w:{}}})},l=t.exports={KEY:r,NEED:!1,fastKey:function(t,e){if(!o(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!i(t,r)){if(!c(t))return"F";if(!e)return"E";f(t)}return t[r].i},getWeak:function(t,e){if(!i(t,r)){if(!c(t))return!0;if(!e)return!1;f(t)}return t[r].w},onFreeze:function(t){return s&&l.NEED&&c(t)&&!i(t,r)&&f(t),t}}},ZD67:function(t,e,n){"use strict";var r=n("3Lyj"),o=n("Z6vF").getWeak,i=n("y3w9"),a=n("0/R4"),u=n("9gX7"),c=n("SlkY"),s=n("CkkT"),f=n("aagx"),l=n("s5qY"),p=s(5),h=s(6),v=0,g=function(t){return t._l||(t._l=new d)},d=function(){this.a=[]},y=function(t,e){return p(t.a,function(t){return t[0]===e})};d.prototype={get:function(t){var e=y(this,t);if(e)return e[1]},has:function(t){return!!y(this,t)},set:function(t,e){var n=y(this,t);n?n[1]=e:this.a.push([t,e])},delete:function(t){var e=h(this.a,function(e){return e[0]===t});return~e&&this.a.splice(e,1),!!~e}},t.exports={getConstructor:function(t,e,n,i){var s=t(function(t,r){u(t,s,e,"_i"),t._t=e,t._i=v++,t._l=void 0,void 0!=r&&c(r,n,t[i],t)});return r(s.prototype,{delete:function(t){if(!a(t))return!1;var n=o(t);return!0===n?g(l(this,e)).delete(t):n&&f(n,this._i)&&delete n[this._i]},has:function(t){if(!a(t))return!1;var n=o(t);return!0===n?g(l(this,e)).has(t):n&&f(n,this._i)}}),s},def:function(t,e,n){var r=o(i(e),!0);return!0===r?g(t).set(e,n):r[t._i]=n,t},ufstore:g}},Zshi:function(t,e,n){var r=n("0/R4");n("Xtr8")("isFrozen",function(t){return function(e){return!r(e)||!!t&&t(e)}})},Zz4T:function(t,e,n){"use strict";n("OGtf")("sub",function(t){return function(){return t(this,"sub","","")}})},a1Th:function(t,e,n){"use strict";n("OEbY");var r=n("y3w9"),o=n("C/va"),i=n("nh4g"),a=/./.toString,u=function(t){n("KroJ")(RegExp.prototype,"toString",t,!0)};n("eeVq")(function(){return"/a/b"!=a.call({source:"a",flags:"b"})})?u(function(){var t=r(this);return"/".concat(t.source,"/","flags"in t?t.flags:!i&&t instanceof RegExp?o.call(t):void 0)}):"toString"!=a.name&&u(function(){return a.call(this)})},aCFj:function(t,e,n){var r=n("Ymqv"),o=n("vhPU");t.exports=function(t){return r(o(t))}},aagx:function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},apmT:function(t,e,n){var r=n("0/R4");t.exports=function(t,e){if(!r(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!r(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},bBoP:function(t,e,n){var r=n("XKFU"),o=n("LVwc"),i=Math.exp;r(r.S+r.F*n("eeVq")(function(){return-2e-17!=!Math.sinh(-2e-17)}),"Math",{sinh:function(t){return Math.abs(t=+t)<1?(o(t)-o(-t))/2:(i(t-1)-i(-t-1))*(Math.E/2)}})},bDcW:function(t,e,n){"use strict";n("OGtf")("fontcolor",function(t){return function(e){return t(this,"font","color",e)}})},bHtr:function(t,e,n){var r=n("XKFU");r(r.P,"Array",{fill:n("Nr18")}),n("nGyu")("fill")},bWfx:function(t,e,n){"use strict";var r=n("XKFU"),o=n("CkkT")(1);r(r.P+r.F*!n("LyE8")([].map,!0),"Array",{map:function(t){return o(this,t,arguments[1])}})},czNK:function(t,e,n){"use strict";var r=n("DVgA"),o=n("JiEa"),i=n("UqcF"),a=n("S/j/"),u=n("Ymqv"),c=Object.assign;t.exports=!c||n("eeVq")(function(){var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach(function(t){e[t]=t}),7!=c({},t)[n]||Object.keys(c({},e)).join("")!=r})?function(t,e){for(var n=a(t),c=arguments.length,s=1,f=o.f,l=i.f;c>s;)for(var p,h=u(arguments[s++]),v=f?r(h).concat(f(h)):r(h),g=v.length,d=0;g>d;)l.call(h,p=v[d++])&&(n[p]=h[p]);return n}:c},"d/Gc":function(t,e,n){var r=n("RYi7"),o=Math.max,i=Math.min;t.exports=function(t,e){return(t=r(t))<0?o(t+e,0):i(t,e)}},"dE+T":function(t,e,n){var r=n("XKFU");r(r.P,"Array",{copyWithin:n("upKx")}),n("nGyu")("copyWithin")},dQfE:function(t,e,n){n("XfO3"),n("LK8F"),n("HEwt"),n("6AQ9"),n("Nz9U"),n("I78e"),n("Vd3H"),n("8+KV"),n("bWfx"),n("0l/t"),n("dZ+Y"),n("YJVH"),n("DNiP"),n("SPin"),n("V+eJ"),n("mGWK"),n("dE+T"),n("bHtr"),n("dRSK"),n("INYr"),n("0E+W"),n("yt8O"),t.exports=n("g3g5").Array},dRSK:function(t,e,n){"use strict";var r=n("XKFU"),o=n("CkkT")(5),i=!0;"find"in[]&&Array(1).find(function(){i=!1}),r(r.P+r.F*i,"Array",{find:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),n("nGyu")("find")},"dZ+Y":function(t,e,n){"use strict";var r=n("XKFU"),o=n("CkkT")(3);r(r.P+r.F*!n("LyE8")([].some,!0),"Array",{some:function(t){return o(this,t,arguments[1])}})},dyZX:function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},e7yV:function(t,e,n){var r=n("aCFj"),o=n("kJMx").f,i={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return a&&"[object Window]"==i.call(t)?function(t){try{return o(t)}catch(t){return a.slice()}}(t):o(r(t))}},eHKK:function(t,e,n){var r=n("XKFU");r(r.S,"Math",{log10:function(t){return Math.log(t)*Math.LOG10E}})},eI33:function(t,e,n){var r=n("XKFU"),o=n("aCFj"),i=n("ne8i");r(r.S,"String",{raw:function(t){for(var e=o(t.raw),n=i(e.length),r=arguments.length,a=[],u=0;n>u;)a.push(String(e[u++])),u<r&&a.push(String(arguments[u]));return a.join("")}})},eM6i:function(t,e,n){var r=n("XKFU");r(r.S,"Date",{now:function(){return(new Date).getTime()}})},eeVq:function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},elZq:function(t,e,n){"use strict";var r=n("dyZX"),o=n("hswa"),i=n("nh4g"),a=n("K0xU")("species");t.exports=function(t){var e=r[t];i&&e&&!e[a]&&o.f(e,a,{configurable:!0,get:function(){return this}})}},eyMr:function(t,e,n){var r=n("2OiF"),o=n("S/j/"),i=n("Ymqv"),a=n("ne8i");t.exports=function(t,e,n,u,c){r(e);var s=o(t),f=i(s),l=a(s.length),p=c?l-1:0,h=c?-1:1;if(n<2)for(;;){if(p in f){u=f[p],p+=h;break}if(p+=h,c?p<0:l<=p)throw TypeError("Reduce of empty array with no initial value")}for(;c?p>=0:l>p;p+=h)p in f&&(u=e(u,f[p],p,s));return u}},"f3/d":function(t,e,n){var r=n("hswa").f,o=Function.prototype,i=/^\s*function ([^ (]*)/;"name"in o||n("nh4g")&&r(o,"name",{configurable:!0,get:function(){try{return(""+this).match(i)[1]}catch(t){return""}}})},fN96:function(t,e,n){var r=n("XKFU");r(r.S,"Number",{isInteger:n("nBIS")})},fyDq:function(t,e,n){var r=n("hswa").f,o=n("aagx"),i=n("K0xU")("toStringTag");t.exports=function(t,e,n){t&&!o(t=n?t:t.prototype,i)&&r(t,i,{configurable:!0,value:e})}},fyVe:function(t,e,n){var r=n("XKFU"),o=n("1sa7"),i=Math.sqrt,a=Math.acosh;r(r.S+r.F*!(a&&710==Math.floor(a(Number.MAX_VALUE))&&a(1/0)==1/0),"Math",{acosh:function(t){return(t=+t)<1?NaN:t>94906265.62425156?Math.log(t)+Math.LN2:o(t-1+i(t-1)*i(t+1))}})},g3g5:function(t,e){var n=t.exports={version:"2.5.7"};"number"==typeof __e&&(__e=n)},g4EE:function(t,e,n){"use strict";var r=n("y3w9"),o=n("apmT");t.exports=function(t){if("string"!==t&&"number"!==t&&"default"!==t)throw TypeError("Incorrect hint");return o(r(this),"number"!=t)}},g6HL:function(t,e){t.exports=Object.is||function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}},"h/M4":function(t,e,n){var r=n("XKFU");r(r.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},h7Nl:function(t,e,n){var r=Date.prototype,o=r.toString,i=r.getTime;new Date(NaN)+""!="Invalid Date"&&n("KroJ")(r,"toString",function(){var t=i.call(this);return t==t?o.call(this):"Invalid Date"})},hEkN:function(t,e,n){"use strict";n("OGtf")("anchor",function(t){return function(e){return t(this,"a","name",e)}})},hHhE:function(t,e,n){var r=n("XKFU");r(r.S,"Object",{create:n("Kuth")})},hLT2:function(t,e,n){var r=n("XKFU");r(r.S,"Math",{trunc:function(t){return(t>0?Math.floor:Math.ceil)(t)}})},"hN/g":function(t,e,n){"use strict";n.r(e),n("vqGA"),n("99sg"),n("4A4+"),n("oka+"),n("ifmr"),n("Lmuc"),n("CuTL"),n("V5/Y"),n("nx1v"),n("dQfE"),n("rfyP"),n("qKs0"),n("hYbK"),n("VXxg"),n("0TWp")},hPIQ:function(t,e){t.exports={}},hYbK:function(t,e,n){n("Btvt"),n("yt8O"),n("EK0E"),t.exports=n("g3g5").WeakMap},hswa:function(t,e,n){var r=n("y3w9"),o=n("xpql"),i=n("apmT"),a=Object.defineProperty;e.f=n("nh4g")?Object.defineProperty:function(t,e,n){if(r(t),e=i(e,!0),r(n),o)try{return a(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},i5dc:function(t,e,n){var r=n("0/R4"),o=n("y3w9"),i=function(t,e){if(o(t),!r(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,r){try{(r=n("m0Pp")(Function.call,n("EemH").f(Object.prototype,"__proto__").set,2))(t,[]),e=!(t instanceof Array)}catch(t){e=!0}return function(t,n){return i(t,n),e?t.__proto__=n:r(t,n),t}}({},!1):void 0),check:i}},ifmr:function(t,e,n){n("tyy+"),t.exports=n("g3g5").parseFloat},ioFf:function(t,e,n){"use strict";var r=n("dyZX"),o=n("aagx"),i=n("nh4g"),a=n("XKFU"),u=n("KroJ"),c=n("Z6vF").KEY,s=n("eeVq"),f=n("VTer"),l=n("fyDq"),p=n("ylqs"),h=n("K0xU"),v=n("N8g3"),g=n("OnI7"),d=n("1MBn"),y=n("EWmC"),m=n("y3w9"),b=n("0/R4"),k=n("aCFj"),_=n("apmT"),S=n("RjD/"),T=n("Kuth"),w=n("e7yV"),E=n("EemH"),x=n("hswa"),F=n("DVgA"),O=E.f,P=x.f,M=w.f,j=r.Symbol,D=r.JSON,I=D&&D.stringify,K=h("_hidden"),U=h("toPrimitive"),Z={}.propertyIsEnumerable,L=f("symbol-registry"),A=f("symbols"),X=f("op-symbols"),C=Object.prototype,R="function"==typeof j,z=r.QObject,N=!z||!z.prototype||!z.prototype.findChild,q=i&&s(function(){return 7!=T(P({},"a",{get:function(){return P(this,"a",{value:7}).a}})).a})?function(t,e,n){var r=O(C,e);r&&delete C[e],P(t,e,n),r&&t!==C&&P(C,e,r)}:P,V=function(t){var e=A[t]=T(j.prototype);return e._k=t,e},H=R&&"symbol"==typeof j.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof j},W=function(t,e,n){return t===C&&W(X,e,n),m(t),e=_(e,!0),m(n),o(A,e)?(n.enumerable?(o(t,K)&&t[K][e]&&(t[K][e]=!1),n=T(n,{enumerable:S(0,!1)})):(o(t,K)||P(t,K,S(1,{})),t[K][e]=!0),q(t,e,n)):P(t,e,n)},G=function(t,e){m(t);for(var n,r=d(e=k(e)),o=0,i=r.length;i>o;)W(t,n=r[o++],e[n]);return t},B=function(t){var e=Z.call(this,t=_(t,!0));return!(this===C&&o(A,t)&&!o(X,t))&&(!(e||!o(this,t)||!o(A,t)||o(this,K)&&this[K][t])||e)},Y=function(t,e){if(t=k(t),e=_(e,!0),t!==C||!o(A,e)||o(X,e)){var n=O(t,e);return!n||!o(A,e)||o(t,K)&&t[K][e]||(n.enumerable=!0),n}},J=function(t){for(var e,n=M(k(t)),r=[],i=0;n.length>i;)o(A,e=n[i++])||e==K||e==c||r.push(e);return r},Q=function(t){for(var e,n=t===C,r=M(n?X:k(t)),i=[],a=0;r.length>a;)!o(A,e=r[a++])||n&&!o(C,e)||i.push(A[e]);return i};R||(u((j=function(){if(this instanceof j)throw TypeError("Symbol is not a constructor!");var t=p(arguments.length>0?arguments[0]:void 0),e=function(n){this===C&&e.call(X,n),o(this,K)&&o(this[K],t)&&(this[K][t]=!1),q(this,t,S(1,n))};return i&&N&&q(C,t,{configurable:!0,set:e}),V(t)}).prototype,"toString",function(){return this._k}),E.f=Y,x.f=W,n("kJMx").f=w.f=J,n("UqcF").f=B,n("JiEa").f=Q,i&&!n("LQAc")&&u(C,"propertyIsEnumerable",B,!0),v.f=function(t){return V(h(t))}),a(a.G+a.W+a.F*!R,{Symbol:j});for(var $="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),tt=0;$.length>tt;)h($[tt++]);for(var et=F(h.store),nt=0;et.length>nt;)g(et[nt++]);a(a.S+a.F*!R,"Symbol",{for:function(t){return o(L,t+="")?L[t]:L[t]=j(t)},keyFor:function(t){if(!H(t))throw TypeError(t+" is not a symbol!");for(var e in L)if(L[e]===t)return e},useSetter:function(){N=!0},useSimple:function(){N=!1}}),a(a.S+a.F*!R,"Object",{create:function(t,e){return void 0===e?T(t):G(T(t),e)},defineProperty:W,defineProperties:G,getOwnPropertyDescriptor:Y,getOwnPropertyNames:J,getOwnPropertySymbols:Q}),D&&a(a.S+a.F*(!R||s(function(){var t=j();return"[null]"!=I([t])||"{}"!=I({a:t})||"{}"!=I(Object(t))})),"JSON",{stringify:function(t){for(var e,n,r=[t],o=1;arguments.length>o;)r.push(arguments[o++]);if(n=e=r[1],(b(e)||void 0!==t)&&!H(t))return y(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!H(e))return e}),r[1]=e,I.apply(D,r)}}),j.prototype[U]||n("Mukb")(j.prototype,U,j.prototype.valueOf),l(j,"Symbol"),l(Math,"Math",!0),l(r.JSON,"JSON",!0)},jqX0:function(t,e,n){var r=n("XKFU"),o=n("jtBr");r(r.P+r.F*(Date.prototype.toISOString!==o),"Date",{toISOString:o})},jtBr:function(t,e,n){"use strict";var r=n("eeVq"),o=Date.prototype.getTime,i=Date.prototype.toISOString,a=function(t){return t>9?t:"0"+t};t.exports=r(function(){return"0385-07-25T07:06:39.999Z"!=i.call(new Date(-5e13-1))})||!r(function(){i.call(new Date(NaN))})?function(){if(!isFinite(o.call(this)))throw RangeError("Invalid time value");var t=this,e=t.getUTCFullYear(),n=t.getUTCMilliseconds(),r=e<0?"-":e>9999?"+":"";return r+("00000"+Math.abs(e)).slice(r?-6:-4)+"-"+a(t.getUTCMonth()+1)+"-"+a(t.getUTCDate())+"T"+a(t.getUTCHours())+":"+a(t.getUTCMinutes())+":"+a(t.getUTCSeconds())+"."+(n>99?n:"0"+a(n))+"Z"}:i},kJMx:function(t,e,n){var r=n("zhAb"),o=n("4R4u").concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},kcoS:function(t,e,n){var r=n("lvtm"),o=Math.pow,i=o(2,-52),a=o(2,-23),u=o(2,127)*(2-a),c=o(2,-126);t.exports=Math.fround||function(t){var e,n,o=Math.abs(t),s=r(t);return o<c?s*(o/c/a+1/i-1/i)*c*a:(n=(e=(1+a/i)*o)-(e-o))>u||n!=n?s*(1/0):s*n}},knhD:function(t,e,n){var r=n("XKFU");r(r.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},l0Rn:function(t,e,n){"use strict";var r=n("RYi7"),o=n("vhPU");t.exports=function(t){var e=String(o(this)),n="",i=r(t);if(i<0||i==1/0)throw RangeError("Count can't be negative");for(;i>0;(i>>>=1)&&(e+=e))1&i&&(n+=e);return n}},lvtm:function(t,e){t.exports=Math.sign||function(t){return 0==(t=+t)||t!=t?t:t<0?-1:1}},m0Pp:function(t,e,n){var r=n("2OiF");t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}}},mGWK:function(t,e,n){"use strict";var r=n("XKFU"),o=n("aCFj"),i=n("RYi7"),a=n("ne8i"),u=[].lastIndexOf,c=!!u&&1/[1].lastIndexOf(1,-0)<0;r(r.P+r.F*(c||!n("LyE8")(u)),"Array",{lastIndexOf:function(t){if(c)return u.apply(this,arguments)||0;var e=o(this),n=a(e.length),r=n-1;for(arguments.length>1&&(r=Math.min(r,i(arguments[1]))),r<0&&(r=n+r);r>=0;r--)if(r in e&&e[r]===t)return r||0;return-1}})},mYba:function(t,e,n){var r=n("aCFj"),o=n("EemH").f;n("Xtr8")("getOwnPropertyDescriptor",function(){return function(t,e){return o(r(t),e)}})},mura:function(t,e,n){var r=n("0/R4"),o=n("Z6vF").onFreeze;n("Xtr8")("preventExtensions",function(t){return function(e){return t&&r(e)?t(o(e)):e}})},nBIS:function(t,e,n){var r=n("0/R4"),o=Math.floor;t.exports=function(t){return!r(t)&&isFinite(t)&&o(t)===t}},nGyu:function(t,e,n){var r=n("K0xU")("unscopables"),o=Array.prototype;void 0==o[r]&&n("Mukb")(o,r,{}),t.exports=function(t){o[r][t]=!0}},nIY7:function(t,e,n){"use strict";n("OGtf")("big",function(t){return function(){return t(this,"big","","")}})},ne8i:function(t,e,n){var r=n("RYi7"),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},nh4g:function(t,e,n){t.exports=!n("eeVq")(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},nsiH:function(t,e,n){"use strict";n("OGtf")("fontsize",function(t){return function(e){return t(this,"font","size",e)}})},nx1v:function(t,e,n){n("eM6i"),n("AphP"),n("jqX0"),n("h7Nl"),n("yM4b"),t.exports=Date},nzyx:function(t,e,n){var r=n("XKFU"),o=n("LVwc");r(r.S+r.F*(o!=Math.expm1),"Math",{expm1:o})},oDIu:function(t,e,n){"use strict";var r=n("XKFU"),o=n("AvRE")(!1);r(r.P,"String",{codePointAt:function(t){return o(this,t)}})},"oka+":function(t,e,n){n("GNAe"),t.exports=n("g3g5").parseInt},pIFo:function(t,e,n){n("IU+Z")("replace",2,function(t,e,n){return[function(r,o){"use strict";var i=t(this),a=void 0==r?void 0:r[e];return void 0!==a?a.call(r,i,o):n.call(String(i),r,o)},n]})},"pp/T":function(t,e,n){var r=n("XKFU");r(r.S,"Math",{log2:function(t){return Math.log(t)/Math.LN2}})},qKs0:function(t,e,n){n("Btvt"),n("XfO3"),n("rGqo"),n("9AAn"),t.exports=n("g3g5").Map},qncB:function(t,e,n){var r=n("XKFU"),o=n("vhPU"),i=n("eeVq"),a=n("/e88"),u="["+a+"]",c=RegExp("^"+u+u+"*"),s=RegExp(u+u+"*$"),f=function(t,e,n){var o={},u=i(function(){return!!a[t]()||"\u200b\x85"!="\u200b\x85"[t]()}),c=o[t]=u?e(l):a[t];n&&(o[n]=c),r(r.P+r.F*u,"String",o)},l=f.trim=function(t,e){return t=String(o(t)),1&e&&(t=t.replace(c,"")),2&e&&(t=t.replace(s,"")),t};t.exports=f},quPj:function(t,e,n){var r=n("0/R4"),o=n("LZWt"),i=n("K0xU")("match");t.exports=function(t){var e;return r(t)&&(void 0!==(e=t[i])?!!e:"RegExp"==o(t))}},rGqo:function(t,e,n){for(var r=n("yt8O"),o=n("DVgA"),i=n("KroJ"),a=n("dyZX"),u=n("Mukb"),c=n("hPIQ"),s=n("K0xU"),f=s("iterator"),l=s("toStringTag"),p=c.Array,h={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},v=o(h),g=0;g<v.length;g++){var d,y=v[g],m=h[y],b=a[y],k=b&&b.prototype;if(k&&(k[f]||u(k,f,p),k[l]||u(k,l,y),c[y]=p,m))for(d in r)k[d]||i(k,d,r[d],!0)}},rfyP:function(t,e,n){n("Oyvg"),n("a1Th"),n("OEbY"),n("SRfc"),n("pIFo"),n("OG14"),n("KKXr"),t.exports=n("g3g5").RegExp},rvZc:function(t,e,n){"use strict";var r=n("XKFU"),o=n("ne8i"),i=n("0sh+"),a="".endsWith;r(r.P+r.F*n("UUeW")("endsWith"),"String",{endsWith:function(t){var e=i(this,t,"endsWith"),n=arguments.length>1?arguments[1]:void 0,r=o(e.length),u=void 0===n?r:Math.min(o(n),r),c=String(t);return a?a.call(e,c,u):e.slice(u-c.length,u)===c}})},s5qY:function(t,e,n){var r=n("0/R4");t.exports=function(t,e){if(!r(t)||t._t!==e)throw TypeError("Incompatible receiver, "+e+" required!");return t}},sbF8:function(t,e,n){var r=n("XKFU"),o=n("nBIS"),i=Math.abs;r(r.S,"Number",{isSafeInteger:function(t){return o(t)&&i(t)<=9007199254740991}})},tUrg:function(t,e,n){"use strict";n("OGtf")("link",function(t){return function(e){return t(this,"a","href",e)}})},"tyy+":function(t,e,n){var r=n("XKFU"),o=n("11IZ");r(r.G+r.F*(parseFloat!=o),{parseFloat:o})},upKx:function(t,e,n){"use strict";var r=n("S/j/"),o=n("d/Gc"),i=n("ne8i");t.exports=[].copyWithin||function(t,e){var n=r(this),a=i(n.length),u=o(t,a),c=o(e,a),s=arguments.length>2?arguments[2]:void 0,f=Math.min((void 0===s?a:o(s,a))-c,a-u),l=1;for(c<u&&u<c+f&&(l=-1,c+=f-1,u+=f-1);f-- >0;)c in n?n[u]=n[c]:delete n[u],u+=l,c+=l;return n}},vhPU:function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},vqGA:function(t,e,n){n("ioFf"),n("Btvt"),t.exports=n("g3g5").Symbol},vvmO:function(t,e,n){var r=n("LZWt");t.exports=function(t,e){if("number"!=typeof t&&"Number"!=r(t))throw TypeError(e);return+t}},w2a5:function(t,e,n){var r=n("aCFj"),o=n("ne8i"),i=n("d/Gc");t.exports=function(t){return function(e,n,a){var u,c=r(e),s=o(c.length),f=i(a,s);if(t&&n!=n){for(;s>f;)if((u=c[f++])!=u)return!0}else for(;s>f;f++)if((t||f in c)&&c[f]===n)return t||f||0;return!t&&-1}}},wmvG:function(t,e,n){"use strict";var r=n("hswa").f,o=n("Kuth"),i=n("3Lyj"),a=n("m0Pp"),u=n("9gX7"),c=n("SlkY"),s=n("Afnz"),f=n("1TsA"),l=n("elZq"),p=n("nh4g"),h=n("Z6vF").fastKey,v=n("s5qY"),g=p?"_s":"size",d=function(t,e){var n,r=h(e);if("F"!==r)return t._i[r];for(n=t._f;n;n=n.n)if(n.k==e)return n};t.exports={getConstructor:function(t,e,n,s){var f=t(function(t,r){u(t,f,e,"_i"),t._t=e,t._i=o(null),t._f=void 0,t._l=void 0,t[g]=0,void 0!=r&&c(r,n,t[s],t)});return i(f.prototype,{clear:function(){for(var t=v(this,e),n=t._i,r=t._f;r;r=r.n)r.r=!0,r.p&&(r.p=r.p.n=void 0),delete n[r.i];t._f=t._l=void 0,t[g]=0},delete:function(t){var n=v(this,e),r=d(n,t);if(r){var o=r.n,i=r.p;delete n._i[r.i],r.r=!0,i&&(i.n=o),o&&(o.p=i),n._f==r&&(n._f=o),n._l==r&&(n._l=i),n[g]--}return!!r},forEach:function(t){v(this,e);for(var n,r=a(t,arguments.length>1?arguments[1]:void 0,3);n=n?n.n:this._f;)for(r(n.v,n.k,this);n&&n.r;)n=n.p},has:function(t){return!!d(v(this,e),t)}}),p&&r(f.prototype,"size",{get:function(){return v(this,e)[g]}}),f},def:function(t,e,n){var r,o,i=d(t,e);return i?i.v=n:(t._l=i={i:o=h(e,!0),k:e,v:n,p:r=t._l,n:void 0,r:!1},t._f||(t._f=i),r&&(r.n=i),t[g]++,"F"!==o&&(t._i[o]=i)),t},getEntry:d,setStrong:function(t,e,n){s(t,e,function(t,n){this._t=v(t,e),this._k=n,this._l=void 0},function(){for(var t=this._k,e=this._l;e&&e.r;)e=e.p;return this._t&&(this._l=e=e?e.n:this._t._f)?f(0,"keys"==t?e.k:"values"==t?e.v:[e.k,e.v]):(this._t=void 0,f(1))},n?"entries":"values",!n,!0),l(e)}}},x8Yj:function(t,e,n){var r=n("XKFU"),o=n("LVwc"),i=Math.exp;r(r.S,"Math",{tanh:function(t){var e=o(t=+t),n=o(-t);return e==1/0?1:n==1/0?-1:(e-n)/(i(t)+i(-t))}})},x8ZO:function(t,e,n){var r=n("XKFU"),o=Math.abs;r(r.S,"Math",{hypot:function(t,e){for(var n,r,i=0,a=0,u=arguments.length,c=0;a<u;)c<(n=o(arguments[a++]))?(i=i*(r=c/n)*r+1,c=n):i+=n>0?(r=n/c)*r:n;return c===1/0?1/0:c*Math.sqrt(i)}})},xfY5:function(t,e,n){"use strict";var r=n("dyZX"),o=n("aagx"),i=n("LZWt"),a=n("Xbzi"),u=n("apmT"),c=n("eeVq"),s=n("kJMx").f,f=n("EemH").f,l=n("hswa").f,p=n("qncB").trim,h=r.Number,v=h,g=h.prototype,d="Number"==i(n("Kuth")(g)),y="trim"in String.prototype,m=function(t){var e=u(t,!1);if("string"==typeof e&&e.length>2){var n,r,o,i=(e=y?e.trim():p(e,3)).charCodeAt(0);if(43===i||45===i){if(88===(n=e.charCodeAt(2))||120===n)return NaN}else if(48===i){switch(e.charCodeAt(1)){case 66:case 98:r=2,o=49;break;case 79:case 111:r=8,o=55;break;default:return+e}for(var a,c=e.slice(2),s=0,f=c.length;s<f;s++)if((a=c.charCodeAt(s))<48||a>o)return NaN;return parseInt(c,r)}}return+e};if(!h(" 0o1")||!h("0b1")||h("+0x1")){h=function(t){var e=arguments.length<1?0:t,n=this;return n instanceof h&&(d?c(function(){g.valueOf.call(n)}):"Number"!=i(n))?a(new v(m(e)),n,h):m(e)};for(var b,k=n("nh4g")?s(v):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),_=0;k.length>_;_++)o(v,b=k[_])&&!o(h,b)&&l(h,b,f(v,b));h.prototype=g,g.constructor=h,n("KroJ")(r,"Number",h)}},xpql:function(t,e,n){t.exports=!n("nh4g")&&!n("eeVq")(function(){return 7!=Object.defineProperty(n("Iw71")("div"),"a",{get:function(){return 7}}).a})},y3w9:function(t,e,n){var r=n("0/R4");t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},yM4b:function(t,e,n){var r=n("K0xU")("toPrimitive"),o=Date.prototype;r in o||n("Mukb")(o,r,n("g4EE"))},ylqs:function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},yt8O:function(t,e,n){"use strict";var r=n("nGyu"),o=n("1TsA"),i=n("hPIQ"),a=n("aCFj");t.exports=n("Afnz")(Array,"Array",function(t,e){this._t=a(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,o(1)):o(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])},"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},z2o2:function(t,e,n){var r=n("0/R4"),o=n("Z6vF").onFreeze;n("Xtr8")("seal",function(t){return function(e){return t&&r(e)?t(o(e)):e}})},zRwo:function(t,e,n){var r=n("6FMO");t.exports=function(t,e){return new(r(t))(e)}},zhAb:function(t,e,n){var r=n("aagx"),o=n("aCFj"),i=n("w2a5")(!1),a=n("YTvA")("IE_PROTO");t.exports=function(t,e){var n,u=o(t),c=0,s=[];for(n in u)n!=a&&r(u,n)&&s.push(n);for(;e.length>c;)r(u,n=e[c++])&&(~i(s,n)||s.push(n));return s}}},[[2,0]]]); //# sourceMappingURL=polyfills.cb8cb810df4951b006b1.js.map (window.webpackJsonp=window.webpackJsonp||[]).push([[3],{"2yAJ":function(t,e){function n(t,e){var n=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(n>>16)<<16|65535&n}function i(t,e,i,r,o,s){return n((a=n(n(e,t),n(r,s)))<<(l=o)|a>>>32-l,i);var a,l}function r(t,e,n,r,o,s,a){return i(e&n|~e&r,t,e,o,s,a)}function o(t,e,n,r,o,s,a){return i(e&r|n&~r,t,e,o,s,a)}function s(t,e,n,r,o,s,a){return i(e^n^r,t,e,o,s,a)}function a(t,e,n,r,o,s,a){return i(n^(e|~r),t,e,o,s,a)}function l(t,e){var i,l,u,c,h;t[e>>5]|=128<<e%32,t[14+(e+64>>>9<<4)]=e;var p=1732584193,d=-271733879,f=-1732584194,g=271733878;for(i=0;i<t.length;i+=16)l=p,u=d,c=f,h=g,d=a(d=a(d=a(d=a(d=s(d=s(d=s(d=s(d=o(d=o(d=o(d=o(d=r(d=r(d=r(d=r(d,f=r(f,g=r(g,p=r(p,d,f,g,t[i],7,-680876936),d,f,t[i+1],12,-389564586),p,d,t[i+2],17,606105819),g,p,t[i+3],22,-1044525330),f=r(f,g=r(g,p=r(p,d,f,g,t[i+4],7,-176418897),d,f,t[i+5],12,1200080426),p,d,t[i+6],17,-1473231341),g,p,t[i+7],22,-45705983),f=r(f,g=r(g,p=r(p,d,f,g,t[i+8],7,1770035416),d,f,t[i+9],12,-1958414417),p,d,t[i+10],17,-42063),g,p,t[i+11],22,-1990404162),f=r(f,g=r(g,p=r(p,d,f,g,t[i+12],7,1804603682),d,f,t[i+13],12,-40341101),p,d,t[i+14],17,-1502002290),g,p,t[i+15],22,1236535329),f=o(f,g=o(g,p=o(p,d,f,g,t[i+1],5,-165796510),d,f,t[i+6],9,-1069501632),p,d,t[i+11],14,643717713),g,p,t[i],20,-373897302),f=o(f,g=o(g,p=o(p,d,f,g,t[i+5],5,-701558691),d,f,t[i+10],9,38016083),p,d,t[i+15],14,-660478335),g,p,t[i+4],20,-405537848),f=o(f,g=o(g,p=o(p,d,f,g,t[i+9],5,568446438),d,f,t[i+14],9,-1019803690),p,d,t[i+3],14,-187363961),g,p,t[i+8],20,1163531501),f=o(f,g=o(g,p=o(p,d,f,g,t[i+13],5,-1444681467),d,f,t[i+2],9,-51403784),p,d,t[i+7],14,1735328473),g,p,t[i+12],20,-1926607734),f=s(f,g=s(g,p=s(p,d,f,g,t[i+5],4,-378558),d,f,t[i+8],11,-2022574463),p,d,t[i+11],16,1839030562),g,p,t[i+14],23,-35309556),f=s(f,g=s(g,p=s(p,d,f,g,t[i+1],4,-1530992060),d,f,t[i+4],11,1272893353),p,d,t[i+7],16,-155497632),g,p,t[i+10],23,-1094730640),f=s(f,g=s(g,p=s(p,d,f,g,t[i+13],4,681279174),d,f,t[i],11,-358537222),p,d,t[i+3],16,-722521979),g,p,t[i+6],23,76029189),f=s(f,g=s(g,p=s(p,d,f,g,t[i+9],4,-640364487),d,f,t[i+12],11,-421815835),p,d,t[i+15],16,530742520),g,p,t[i+2],23,-995338651),f=a(f,g=a(g,p=a(p,d,f,g,t[i],6,-198630844),d,f,t[i+7],10,1126891415),p,d,t[i+14],15,-1416354905),g,p,t[i+5],21,-57434055),f=a(f,g=a(g,p=a(p,d,f,g,t[i+12],6,1700485571),d,f,t[i+3],10,-1894986606),p,d,t[i+10],15,-1051523),g,p,t[i+1],21,-2054922799),f=a(f,g=a(g,p=a(p,d,f,g,t[i+8],6,1873313359),d,f,t[i+15],10,-30611744),p,d,t[i+6],15,-1560198380),g,p,t[i+13],21,1309151649),f=a(f,g=a(g,p=a(p,d,f,g,t[i+4],6,-145523070),d,f,t[i+11],10,-1120210379),p,d,t[i+2],15,718787259),g,p,t[i+9],21,-343485551),p=n(p,l),d=n(d,u),f=n(f,c),g=n(g,h);return[p,d,f,g]}function u(t){var e,n="",i=32*t.length;for(e=0;e<i;e+=8)n+=String.fromCharCode(t[e>>5]>>>e%32&255);return n}function c(t){var e,n=[];for(n[(t.length>>2)-1]=void 0,e=0;e<n.length;e+=1)n[e]=0;var i=8*t.length;for(e=0;e<i;e+=8)n[e>>5]|=(255&t.charCodeAt(e/8))<<e%32;return n}function h(t){var e,n,i="";for(n=0;n<t.length;n+=1)e=t.charCodeAt(n),i+="0123456789abcdef".charAt(e>>>4&15)+"0123456789abcdef".charAt(15&e);return i}function p(t){return unescape(encodeURIComponent(t))}function d(t){return function(t){return u(l(c(t),8*t.length))}(p(t))}function f(t,e){return function(t,e){var n,i,r=c(t),o=[],s=[];for(o[15]=s[15]=void 0,r.length>16&&(r=l(r,8*t.length)),n=0;n<16;n+=1)o[n]=909522486^r[n],s[n]=1549556828^r[n];return i=l(o.concat(c(e)),512+8*e.length),u(l(s.concat(i),640))}(p(t),p(e))}t.exports=function(t,e,n){return e?n?f(e,t):h(f(e,t)):n?d(t):h(d(t))}},3:function(t,e){},4:function(t,e){},"4af/":function(t,e,n){var i=n("vYjF"),r={collectWindowErrors:!0,debug:!1},o="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},s=[].slice,a="?",l=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/;function u(){return"undefined"==typeof document||null==document.location?"":document.location.href}r.report=function(){var t,e,n=[],c=null,h=null,p=null;function d(t,e){var i=null;if(!e||r.collectWindowErrors){for(var o in n)if(n.hasOwnProperty(o))try{n[o].apply(null,[t].concat(s.call(arguments,2)))}catch(t){i=t}if(i)throw i}}function f(e,n,o,s,c){var h=i.isErrorEvent(c)?c.error:c,f=i.isErrorEvent(e)?e.message:e;if(p)r.computeStackTrace.augmentStackTraceWithInitialElement(p,n,o,f),g();else if(h&&i.isError(h))d(r.computeStackTrace(h),!0);else{var m,v={url:n,line:o,column:s},y=void 0;"[object String]"==={}.toString.call(f)&&(m=f.match(l))&&(y=m[1],f=m[2]),v.func=a,d({name:y,message:f,url:u(),stack:[v]},!0)}return!!t&&t.apply(this,arguments)}function g(){var t=p,e=c;c=null,p=null,h=null,d.apply(null,[t,!1].concat(e))}function m(t,e){var n=s.call(arguments,1);if(p){if(h===t)return;g()}var i=r.computeStackTrace(t);if(p=i,h=t,c=n,setTimeout(function(){h===t&&g()},i.incomplete?2e3:0),!1!==e)throw t}return m.subscribe=function(i){e||(t=o.onerror,o.onerror=f,e=!0),n.push(i)},m.unsubscribe=function(t){for(var e=n.length-1;e>=0;--e)n[e]===t&&n.splice(e,1)},m.uninstall=function(){e&&(o.onerror=t,e=!1,t=void 0),n=[]},m}(),r.computeStackTrace=function(){function t(t){if(void 0!==t.stack&&t.stack){for(var e,n,i,r=/^\s*at (?:(.*?) ?\()?((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|[a-z]:|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,o=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx(?:-web)|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,s=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|moz-extension).*?:\/.*?|\[native code\]|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,l=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,c=/\((\S*)(?::(\d+))(?::(\d+))\)/,h=t.stack.split("\n"),p=[],d=(/^(.*) is undefined$/.exec(t.message),0),f=h.length;d<f;++d){if(n=r.exec(h[d])){var g=n[2]&&0===n[2].indexOf("native");n[2]&&0===n[2].indexOf("eval")&&(e=c.exec(n[2]))&&(n[2]=e[1],n[3]=e[2],n[4]=e[3]),i={url:g?null:n[2],func:n[1]||a,args:g?[n[2]]:[],line:n[3]?+n[3]:null,column:n[4]?+n[4]:null}}else if(n=o.exec(h[d]))i={url:n[2],func:n[1]||a,args:[],line:+n[3],column:n[4]?+n[4]:null};else{if(!(n=s.exec(h[d])))continue;n[3]&&n[3].indexOf(" > eval")>-1&&(e=l.exec(n[3]))?(n[3]=e[1],n[4]=e[2],n[5]=null):0!==d||n[5]||void 0===t.columnNumber||(p[0].column=t.columnNumber+1),i={url:n[3],func:n[1]||a,args:n[2]?n[2].split(","):[],line:n[4]?+n[4]:null,column:n[5]?+n[5]:null}}if(!i.func&&i.line&&(i.func=a),i.url&&"blob:"===i.url.substr(0,5)){var m=new XMLHttpRequest;if(m.open("GET",i.url,!1),m.send(null),200===m.status){var v=m.responseText||"",y=(v=v.slice(-300)).match(/\/\/# sourceMappingURL=(.*)$/);if(y){var b=y[1];"~"===b.charAt(0)&&(b=("undefined"==typeof document||null==document.location?"":document.location.origin?document.location.origin:document.location.protocol+"//"+document.location.hostname+(document.location.port?":"+document.location.port:""))+b.slice(1)),i.url=b.slice(0,-4)}}}p.push(i)}return p.length?{name:t.name,message:t.message,url:u(),stack:p}:null}}function e(t,e,n,i){var r={url:e,line:n};if(r.url&&r.line){if(t.incomplete=!1,r.func||(r.func=a),t.stack.length>0&&t.stack[0].url===r.url){if(t.stack[0].line===r.line)return!1;if(!t.stack[0].line&&t.stack[0].func===r.func)return t.stack[0].line=r.line,!1}return t.stack.unshift(r),t.partial=!0,!0}return t.incomplete=!0,!1}function n(t,o){for(var s,l,c=/function\s+([_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*)?\s*\(/i,h=[],p={},d=!1,f=n.caller;f&&!d;f=f.caller)if(f!==i&&f!==r.report){if(l={url:null,func:a,line:null,column:null},f.name?l.func=f.name:(s=c.exec(f.toString()))&&(l.func=s[1]),void 0===l.func)try{l.func=s.input.substring(0,s.input.indexOf("{"))}catch(t){}p[""+f]?d=!0:p[""+f]=!0,h.push(l)}o&&h.splice(0,o);var g={name:t.name,message:t.message,url:u(),stack:h};return e(g,t.sourceURL||t.fileName,t.line||t.lineNumber),g}function i(e,i){var o=null;i=null==i?0:+i;try{if(o=t(e))return o}catch(t){if(r.debug)throw t}try{if(o=n(e,i+1))return o}catch(t){if(r.debug)throw t}return{name:e.name,message:e.message,url:u()}}return i.augmentStackTraceWithInitialElement=e,i.computeStackTraceFromStackProp=t,i}(),t.exports=r},5:function(t,e){},6:function(t,e){},7:function(t,e,n){t.exports=n("zUnb")},AKyF:function(t,e,n){var i=n("vYjF");t.exports={wrapMethod:function(t,e,n){var r=t[e],o=t;if(e in t){var s="warn"===e?"warning":e;t[e]=function(){var t=[].slice.call(arguments),a=i.safeJoin(t," "),l={level:s,logger:"console",extra:{arguments:t}};"assert"===e?!1===t[0]&&(a="Assertion failed: "+(i.safeJoin(t.slice(1)," ")||"console.assert"),l.extra.arguments=t.slice(1),n&&n(a,l)):n&&n(a,l),r&&Function.prototype.apply.call(r,o,t)}}}}},B9Yq:function(t,e){t.exports=function(){throw new Error("define cannot be used indirect")}},BjAV:function(t,e){function n(t,e){for(var n=0;n<t.length;++n)if(t[n]===e)return n;return-1}function i(t,e){var i=[],r=[];return null==e&&(e=function(t,e){return i[0]===e?"[Circular ~]":"[Circular ~."+r.slice(0,n(i,e)).join(".")+"]"}),function(o,s){if(i.length>0){var a=n(i,this);~a?i.splice(a+1):i.push(this),~a?r.splice(a,1/0,o):r.push(o),~n(i,s)&&(s=e.call(this,o,s))}else i.push(s);return null==t?s instanceof Error?function(t){var e={stack:t.stack,message:t.message,name:t.name};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}(s):s:t.call(this,o,s)}}(t.exports=function(t,e,n,r){return JSON.stringify(t,i(e,r),n)}).getSerialize=i},J9Y1:function(t,e,n){var i;!function(){function r(t,e,n){return t.call.apply(t.bind,arguments)}function o(t,e,n){if(!t)throw Error();if(2<arguments.length){var i=Array.prototype.slice.call(arguments,2);return function(){var n=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(n,i),t.apply(e,n)}}return function(){return t.apply(e,arguments)}}function s(t,e,n){return(s=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?r:o).apply(null,arguments)}var a=Date.now||function(){return+new Date},l=!!window.FontFace;function u(t,e,n,i){if(e=t.c.createElement(e),n)for(var r in n)n.hasOwnProperty(r)&&("style"==r?e.style.cssText=n[r]:e.setAttribute(r,n[r]));return i&&e.appendChild(t.c.createTextNode(i)),e}function c(t,e,n){(t=t.c.getElementsByTagName(e)[0])||(t=document.documentElement),t.insertBefore(n,t.lastChild)}function h(t){t.parentNode&&t.parentNode.removeChild(t)}function p(t,e,n){e=e||[],n=n||[];for(var i=t.className.split(/\s+/),r=0;r<e.length;r+=1){for(var o=!1,s=0;s<i.length;s+=1)if(e[r]===i[s]){o=!0;break}o||i.push(e[r])}for(e=[],r=0;r<i.length;r+=1){for(o=!1,s=0;s<n.length;s+=1)if(i[r]===n[s]){o=!0;break}o||e.push(i[r])}t.className=e.join(" ").replace(/\s+/g," ").replace(/^\s+|\s+$/,"")}function d(t,e){for(var n=t.className.split(/\s+/),i=0,r=n.length;i<r;i++)if(n[i]==e)return!0;return!1}function f(t,e,n){function i(){a&&r&&o&&(a(s),a=null)}e=u(t,"link",{rel:"stylesheet",href:e,media:"all"});var r=!1,o=!0,s=null,a=n||null;l?(e.onload=function(){r=!0,i()},e.onerror=function(){r=!0,s=Error("Stylesheet failed to load"),i()}):setTimeout(function(){r=!0,i()},0),c(t,"head",e)}function g(t,e,n,i){var r=t.c.getElementsByTagName("head")[0];if(r){var o=u(t,"script",{src:e}),s=!1;return o.onload=o.onreadystatechange=function(){s||this.readyState&&"loaded"!=this.readyState&&"complete"!=this.readyState||(s=!0,n&&n(null),o.onload=o.onreadystatechange=null,"HEAD"==o.parentNode.tagName&&r.removeChild(o))},r.appendChild(o),setTimeout(function(){s||(s=!0,n&&n(Error("Script load timeout")))},i||5e3),o}return null}function m(){this.a=0,this.c=null}function v(t){return t.a++,function(){t.a--,b(t)}}function y(t,e){t.c=e,b(t)}function b(t){0==t.a&&t.c&&(t.c(),t.c=null)}function _(t){this.a=t||"-"}function w(t,e){this.c=t,this.f=4,this.a="n";var n=(e||"n4").match(/^([nio])([1-9])$/i);n&&(this.a=n[1],this.f=parseInt(n[2],10))}function x(t){var e=[];t=t.split(/,\s*/);for(var n=0;n<t.length;n++){var i=t[n].replace(/['"]/g,"");-1!=i.indexOf(" ")||/^\d/.test(i)?e.push("'"+i+"'"):e.push(i)}return e.join(",")}function C(t){return t.a+t.f}function S(t){var e="normal";return"o"===t.a?e="oblique":"i"===t.a&&(e="italic"),e}function k(t){var e=4,n="n",i=null;return t&&((i=t.match(/(normal|oblique|italic)/i))&&i[1]&&(n=i[1].substr(0,1).toLowerCase()),(i=t.match(/([1-9]00|normal|bold)/i))&&i[1]&&(/bold/i.test(i[1])?e=7:/[1-9]00/.test(i[1])&&(e=parseInt(i[1].substr(0,1),10)))),n+e}function E(t){if(t.g){var e=d(t.f,t.a.c("wf","active")),n=[],i=[t.a.c("wf","loading")];e||n.push(t.a.c("wf","inactive")),p(t.f,n,i)}T(t,"inactive")}function T(t,e,n){t.j&&t.h[e]&&(n?t.h[e](n.c,C(n)):t.h[e]())}function O(t,e){this.c=t,this.f=e,this.a=u(this.c,"span",{"aria-hidden":"true"},this.f)}function I(t){c(t.c,"body",t.a)}function A(t){return"display:block;position:absolute;top:-9999px;left:-9999px;font-size:300px;width:auto;height:auto;line-height:normal;margin:0;padding:0;font-variant:normal;white-space:nowrap;font-family:"+x(t.c)+";font-style:"+S(t)+";font-weight:"+t.f+"00;"}function P(t,e,n,i,r,o){this.g=t,this.j=e,this.a=i,this.c=n,this.f=r||3e3,this.h=o||void 0}function D(t,e,n,i,r,o,s){this.v=t,this.B=e,this.c=n,this.a=i,this.s=s||"BESbswy",this.f={},this.w=r||3e3,this.u=o||null,this.m=this.j=this.h=this.g=null,this.g=new O(this.c,this.s),this.h=new O(this.c,this.s),this.j=new O(this.c,this.s),this.m=new O(this.c,this.s),t=A(t=new w(this.a.c+",serif",C(this.a))),this.g.a.style.cssText=t,t=A(t=new w(this.a.c+",sans-serif",C(this.a))),this.h.a.style.cssText=t,t=A(t=new w("serif",C(this.a))),this.j.a.style.cssText=t,t=A(t=new w("sans-serif",C(this.a))),this.m.a.style.cssText=t,I(this.g),I(this.h),I(this.j),I(this.m)}_.prototype.c=function(t){for(var e=[],n=0;n<arguments.length;n++)e.push(arguments[n].replace(/[\W_]+/g,"").toLowerCase());return e.join(this.a)},P.prototype.start=function(){var t=this.c.o.document,e=this,n=a(),i=new Promise(function(i,r){!function o(){a()-n>=e.f?r():t.fonts.load(function(t){return S(t)+" "+t.f+"00 300px "+x(t.c)}(e.a),e.h).then(function(t){1<=t.length?i():setTimeout(o,25)},function(){r()})}()}),r=null,o=new Promise(function(t,n){r=setTimeout(n,e.f)});Promise.race([o,i]).then(function(){r&&(clearTimeout(r),r=null),e.g(e.a)},function(){e.j(e.a)})};var j={D:"serif",C:"sans-serif"},M=null;function R(){if(null===M){var t=/AppleWebKit\/([0-9]+)(?:\.([0-9]+))/.exec(window.navigator.userAgent);M=!!t&&(536>parseInt(t[1],10)||536===parseInt(t[1],10)&&11>=parseInt(t[2],10))}return M}function F(t,e,n){for(var i in j)if(j.hasOwnProperty(i)&&e===t.f[j[i]]&&n===t.f[j[i]])return!0;return!1}function N(t,e){setTimeout(s(function(){h(this.g.a),h(this.h.a),h(this.j.a),h(this.m.a),e(this.a)},t),0)}function L(t,e,n){this.c=t,this.a=e,this.f=0,this.m=this.j=!1,this.s=n}D.prototype.start=function(){this.f.serif=this.j.a.offsetWidth,this.f["sans-serif"]=this.m.a.offsetWidth,this.A=a(),function t(e){var n,i=e.g.a.offsetWidth,r=e.h.a.offsetWidth;(n=i===e.f.serif&&r===e.f["sans-serif"])||(n=R()&&F(e,i,r)),n?a()-e.A>=e.w?R()&&F(e,i,r)&&(null===e.u||e.u.hasOwnProperty(e.a.c))?N(e,e.v):N(e,e.B):function(e){setTimeout(s(function(){t(this)},e),50)}(e):N(e,e.v)}(this)};var B=null;function V(t){0==--t.f&&t.j&&(t.m?((t=t.a).g&&p(t.f,[t.a.c("wf","active")],[t.a.c("wf","loading"),t.a.c("wf","inactive")]),T(t,"active")):E(t.a))}function z(t){this.j=t,this.a=new function(){this.c={}},this.h=0,this.f=this.g=!0}function H(t,e,n,i,r){var o=0==--t.h;(t.f||t.g)&&setTimeout(function(){var t=r||null,a=i||{};if(0===n.length&&o)E(e.a);else{e.f+=n.length,o&&(e.j=o);var l,u=[];for(l=0;l<n.length;l++){var c=n[l],h=a[c.c],d=e.a,f=c;if(d.g&&p(d.f,[d.a.c("wf",f.c,C(f).toString(),"loading")]),T(d,"fontloading",f),d=null,null===B)if(window.FontFace){f=/Gecko.*Firefox\/(\d+)/.exec(window.navigator.userAgent);var g=/OS X.*Version\/10\..*Safari/.exec(window.navigator.userAgent)&&/Apple/.exec(window.navigator.vendor);B=f?42<parseInt(f[1],10):!g}else B=!1;d=B?new P(s(e.g,e),s(e.h,e),e.c,c,e.s,h):new D(s(e.g,e),s(e.h,e),e.c,c,e.s,t,h),u.push(d)}for(l=0;l<u.length;l++)u[l].start()}},0)}function W(t,e){this.c=t,this.a=e}function U(t,e){this.c=t,this.a=e}L.prototype.g=function(t){var e=this.a;e.g&&p(e.f,[e.a.c("wf",t.c,C(t).toString(),"active")],[e.a.c("wf",t.c,C(t).toString(),"loading"),e.a.c("wf",t.c,C(t).toString(),"inactive")]),T(e,"fontactive",t),this.m=!0,V(this)},L.prototype.h=function(t){var e=this.a;if(e.g){var n=d(e.f,e.a.c("wf",t.c,C(t).toString(),"active")),i=[],r=[e.a.c("wf",t.c,C(t).toString(),"loading")];n||i.push(e.a.c("wf",t.c,C(t).toString(),"inactive")),p(e.f,i,r)}T(e,"fontinactive",t),V(this)},z.prototype.load=function(t){this.c=new function(t,e){this.a=t,this.o=e||t,this.c=this.o.document}(this.j,t.context||this.j),this.g=!1!==t.events,this.f=!1!==t.classes,function(t,e,n){var i=[],r=n.timeout;!function(t){t.g&&p(t.f,[t.a.c("wf","loading")]),T(t,"loading")}(e),i=function(t,e,n){var i,r=[];for(i in e)if(e.hasOwnProperty(i)){var o=t.c[i];o&&r.push(o(e[i],n))}return r}(t.a,n,t.c);var o=new L(t.c,e,r);for(t.h=i.length,e=0,n=i.length;e<n;e++)i[e].load(function(e,n,i){H(t,o,e,n,i)})}(this,new function(t,e){this.c=t,this.f=t.o.document.documentElement,this.h=e,this.a=new _("-"),this.j=!1!==e.events,this.g=!1!==e.classes}(this.c,t),t)},W.prototype.load=function(t){var e=this,n=e.a.projectId,i=e.a.version;if(n){var r=e.c.o;g(this.c,(e.a.api||"https://fast.fonts.net/jsapi")+"/"+n+".js"+(i?"?v="+i:""),function(i){i?t([]):(r["__MonotypeConfiguration__"+n]=function(){return e.a},function e(){if(r["__mti_fntLst"+n]){var i=r["__mti_fntLst"+n](),o=[];if(i)for(var s=0;s<i.length;s++){var a=i[s].fontfamily;o.push(void 0!=i[s].fontStyle&&void 0!=i[s].fontWeight?new w(a,i[s].fontStyle+i[s].fontWeight):new w(a))}t(o)}else setTimeout(function(){e()},50)}())}).id="__MonotypeAPIScript__"+n}else t([])},U.prototype.load=function(t){var e,n,i=this.a.urls||[],r=this.a.families||[],o=this.a.testStrings||{},s=new m;for(e=0,n=i.length;e<n;e++)f(this.c,i[e],v(s));var a=[];for(e=0,n=r.length;e<n;e++)if((i=r[e].split(":"))[1])for(var l=i[1].split(","),u=0;u<l.length;u+=1)a.push(new w(i[0],l[u]));else a.push(new w(i[0]));y(s,function(){t(a,o)})};var X={latin:"BESbswy","latin-ext":"\xe7\xf6\xfc\u011f\u015f",cyrillic:"\u0439\u044f\u0416",greek:"\u03b1\u03b2\u03a3",khmer:"\u1780\u1781\u1782",Hanuman:"\u1780\u1781\u1782"},Y={thin:"1",extralight:"2","extra-light":"2",ultralight:"2","ultra-light":"2",light:"3",regular:"4",book:"4",medium:"5","semi-bold":"6",semibold:"6","demi-bold":"6",demibold:"6",bold:"7","extra-bold":"8",extrabold:"8","ultra-bold":"8",ultrabold:"8",black:"9",heavy:"9",l:"3",r:"4",b:"7"},q={i:"i",italic:"i",n:"n",normal:"n"},G=/^(thin|(?:(?:extra|ultra)-?)?light|regular|book|medium|(?:(?:semi|demi|extra|ultra)-?)?bold|black|heavy|l|r|b|[1-9]00)?(n|i|normal|italic)?$/;function K(t,e){this.c=t,this.a=e}var Z={Arimo:!0,Cousine:!0,Tinos:!0};function Q(t,e){this.c=t,this.a=e}function J(t,e){this.c=t,this.f=e,this.a=[]}K.prototype.load=function(t){var e=new m,n=this.c,i=new function(t,e){this.c=t||"https://fonts.googleapis.com/css",this.a=[],this.f=[],this.g=e||""}(this.a.api,this.a.text),r=this.a.families;!function(t,e){for(var n=e.length,i=0;i<n;i++){var r=e[i].split(":");3==r.length&&t.f.push(r.pop());var o="";2==r.length&&""!=r[1]&&(o=":"),t.a.push(r.join(o))}}(i,r);var o=new function(t){this.f=r,this.a=[],this.c={}}(0);!function(t){for(var e=t.f.length,n=0;n<e;n++){var i=t.f[n].split(":"),r=i[0].replace(/\+/g," "),o=["n4"];if(2<=i.length){var s;if(s=[],a=i[1])for(var a,l=(a=a.split(",")).length,u=0;u<l;u++){var c;if((c=a[u]).match(/^[\w-]+$/))if(null==(h=G.exec(c.toLowerCase())))c="";else{if(c=null==(c=h[2])||""==c?"n":q[c],null==(h=h[1])||""==h)h="4";else var h=Y[h]||(isNaN(h)?"4":h.substr(0,1));c=[c,h].join("")}else c="";c&&s.push(c)}0<s.length&&(o=s),3==i.length&&(s=[],0<(i=(i=i[2])?i.split(","):s).length&&(i=X[i[0]])&&(t.c[r]=i))}for(t.c[r]||(i=X[r])&&(t.c[r]=i),i=0;i<o.length;i+=1)t.a.push(new w(r,o[i]))}}(o),f(n,function(t){if(0==t.a.length)throw Error("No fonts to load!");if(-1!=t.c.indexOf("kit="))return t.c;for(var e=t.a.length,n=[],i=0;i<e;i++)n.push(t.a[i].replace(/ /g,"+"));return e=t.c+"?family="+n.join("%7C"),0<t.f.length&&(e+="&subset="+t.f.join(",")),0<t.g.length&&(e+="&text="+encodeURIComponent(t.g)),e}(i),v(e)),y(e,function(){t(o.a,o.c,Z)})},Q.prototype.load=function(t){var e=this.a.id,n=this.c.o;e?g(this.c,(this.a.api||"https://use.typekit.net")+"/"+e+".js",function(e){if(e)t([]);else if(n.Typekit&&n.Typekit.config&&n.Typekit.config.fn){e=n.Typekit.config.fn;for(var i=[],r=0;r<e.length;r+=2)for(var o=e[r],s=e[r+1],a=0;a<s.length;a++)i.push(new w(o,s[a]));try{n.Typekit.load({events:!1,classes:!1,async:!0})}catch(t){}t(i)}},2e3):t([])},J.prototype.load=function(t){var e=this.f.id,n=this.c.o,i=this;e?(n.__webfontfontdeckmodule__||(n.__webfontfontdeckmodule__={}),n.__webfontfontdeckmodule__[e]=function(e,n){for(var r=0,o=n.fonts.length;r<o;++r){var s=n.fonts[r];i.a.push(new w(s.name,k("font-weight:"+s.weight+";font-style:"+s.style)))}t(i.a)},g(this.c,(this.f.api||"https://f.fontdeck.com/s/css/js/")+function(t){return t.o.location.hostname||t.a.location.hostname}(this.c)+"/"+e+".js",function(e){e&&t([])})):t([])};var $=new z(window);$.a.c.custom=function(t,e){return new U(e,t)},$.a.c.fontdeck=function(t,e){return new J(e,t)},$.a.c.monotype=function(t,e){return new W(e,t)},$.a.c.typekit=function(t,e){return new Q(e,t)},$.a.c.google=function(t,e){return new K(e,t)};var tt={load:s($.load,$)};void 0===(i=(function(){return tt}).call(e,n,e,t))||(t.exports=i)}()},JEAp:function(t,e,n){var i,r=r||function(t){"use strict";if(!(void 0===t||"undefined"!=typeof navigator&&/MSIE [1-9]\./.test(navigator.userAgent))){var e=function(){return t.URL||t.webkitURL||t},n=t.document.createElementNS("http://www.w3.org/1999/xhtml","a"),i="download"in n,r=/constructor/i.test(t.HTMLElement)||t.safari,o=/CriOS\/[\d]+/.test(navigator.userAgent),s=function(e){(t.setImmediate||t.setTimeout)(function(){throw e},0)},a=function(t){setTimeout(function(){"string"==typeof t?e().revokeObjectURL(t):t.remove()},4e4)},l=function(t){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(t.type)?new Blob([String.fromCharCode(65279),t],{type:t.type}):t},u=function(u,c,h){h||(u=l(u));var p,d=this,f="application/octet-stream"===u.type,g=function(){!function(t,e,n){for(var i=(e=[].concat(e)).length;i--;){var r=t["on"+e[i]];if("function"==typeof r)try{r.call(t,t)}catch(t){s(t)}}}(d,"writestart progress write writeend".split(" "))};if(d.readyState=d.INIT,i)return p=e().createObjectURL(u),void setTimeout(function(){var t,e;n.href=p,n.download=c,t=n,e=new MouseEvent("click"),t.dispatchEvent(e),g(),a(p),d.readyState=d.DONE});!function(){if((o||f&&r)&&t.FileReader){var n=new FileReader;return n.onloadend=function(){var e=o?n.result:n.result.replace(/^data:[^;]*;/,"data:attachment/file;");t.open(e,"_blank")||(t.location.href=e),e=void 0,d.readyState=d.DONE,g()},n.readAsDataURL(u),void(d.readyState=d.INIT)}p||(p=e().createObjectURL(u)),f?t.location.href=p:t.open(p,"_blank")||(t.location.href=p),d.readyState=d.DONE,g(),a(p)}()},c=u.prototype;return"undefined"!=typeof navigator&&navigator.msSaveOrOpenBlob?function(t,e,n){return e=e||t.name||"download",n||(t=l(t)),navigator.msSaveOrOpenBlob(t,e)}:(c.abort=function(){},c.readyState=c.INIT=0,c.WRITING=1,c.DONE=2,c.error=c.onwritestart=c.onprogress=c.onwrite=c.onabort=c.onerror=c.onwriteend=null,function(t,e,n){return new u(t,e||t.name||"download",n)})}}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this.content);void 0!==t&&t.exports?t.exports.saveAs=r:null!==n("B9Yq")&&null!==n("PDX0")&&(void 0===(i=(function(){return r}).call(e,n,e,t))||(t.exports=i))},NlKi:function(t,e,n){var i=n("jT1Q"),r="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},o=r.Raven,s=new i;s.noConflict=function(){return r.Raven=o,s},s.afterLoad(),t.exports=s,t.exports.Client=i},PDX0:function(t,e){(function(e){t.exports=e}).call(this,{})},RdDz:function(t,e,n){var i,r;void 0===(r="function"==typeof(i=function(){"use strict";return function(t,e,n){e=e||"",n=n||512;for(var i=atob(t),r=[],o=0;o<i.length;o+=n){for(var s=i.slice(o,o+n),a=new Array(s.length),l=0;l<s.length;l++)a[l]=s.charCodeAt(l);var u=new Uint8Array(a);r.push(u)}return new Blob(r,{type:e})}})?i.apply(e,[]):i)||(t.exports=r)},"U/5H":function(t,e,n){var i,r;!function(o){"use strict";void 0===(r="function"==typeof(i=function(){if("undefined"==typeof window||!window.document)return function(){throw new Error("Sortable.js requires a window with a document")};var t,e,n,i,r,o,s,a,l,u,c,h,p,d,f,g,m,v,y,b,_,w={},x=/\s+/g,C=/left|right|inline/,S="Sortable"+(new Date).getTime(),k=window,E=k.document,T=k.parseInt,O=k.setTimeout,I=k.jQuery||k.Zepto,A=k.Polymer,P=!1,D="draggable"in E.createElement("div"),j=!navigator.userAgent.match(/(?:Trident.*rv[ :]?11\.|msie)/i)&&((_=E.createElement("x")).style.cssText="pointer-events:auto","auto"===_.style.pointerEvents),M=!1,R=Math.abs,F=Math.min,N=[],L=[],B=it(function(t,e,n){if(n&&e.scroll){var i,r,o,s,c,h,p=n[S],d=e.scrollSensitivity,f=e.scrollSpeed,g=t.clientX,m=t.clientY,v=window.innerWidth,y=window.innerHeight;if(l!==n&&(l=n,u=e.scrollFn,!0===(a=e.scroll))){a=n;do{if(a.offsetWidth<a.scrollWidth||a.offsetHeight<a.scrollHeight)break}while(a=a.parentNode)}a&&(i=a,r=a.getBoundingClientRect(),o=(R(r.right-g)<=d)-(R(r.left-g)<=d),s=(R(r.bottom-m)<=d)-(R(r.top-m)<=d)),o||s||(s=(y-m<=d)-(m<=d),((o=(v-g<=d)-(g<=d))||s)&&(i=k)),w.vx===o&&w.vy===s&&w.el===i||(w.el=i,w.vx=o,w.vy=s,clearInterval(w.pid),i&&(w.pid=setInterval(function(){if(h=s?s*f:0,c=o?o*f:0,"function"==typeof u)return u.call(p,c,h,t);i===k?k.scrollTo(k.pageXOffset+c,k.pageYOffset+h):(i.scrollTop+=h,i.scrollLeft+=c)},24)))}},30),V=function(t){function e(t,e){return void 0!==t&&!0!==t||(t=n.name),"function"==typeof t?t:function(n,i){var r=i.options.group.name;return e?t:t&&(t.join?t.indexOf(r)>-1:r==t)}}var n={},i=t.group;i&&"object"==typeof i||(i={name:i}),n.name=i.name,n.checkPull=e(i.pull,!0),n.checkPut=e(i.put),n.revertClone=i.revertClone,t.group=n};try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){P={capture:!1,passive:!1}}}))}catch(t){}function z(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be HTMLElement, and not "+{}.toString.call(t);this.el=t,this.options=e=rt({},e),t[S]=this;var n={group:Math.random(),sort:!0,disabled:!1,store:null,handle:null,scroll:!0,scrollSensitivity:30,scrollSpeed:10,draggable:/[uo]l/i.test(t.nodeName)?"li":">*",ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,setData:function(t,e){t.setData("Text",e.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==z.supportPointer};for(var i in n)!(i in e)&&(e[i]=n[i]);for(var r in V(e),this)"_"===r.charAt(0)&&"function"==typeof this[r]&&(this[r]=this[r].bind(this));this.nativeDraggable=!e.forceFallback&&D,X(t,"mousedown",this._onTapStart),X(t,"touchstart",this._onTapStart),e.supportPointer&&X(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(X(t,"dragover",this),X(t,"dragenter",this)),L.push(this._onDragOver),e.store&&this.sort(e.store.get(this))}function H(e,n){"clone"!==e.lastPullMode&&(n=!0),i&&i.state!==n&&(G(i,"display",n?"none":""),n||i.state&&(e.options.group.revertClone?(r.insertBefore(i,o),e._animate(t,i)):r.insertBefore(i,t)),i.state=n)}function W(t,e,n){if(t){n=n||E;do{if(">*"===e&&t.parentNode===n||nt(t,e))return t}while(t=U(t))}return null}function U(t){var e=t.host;return e&&e.nodeType?e:t.parentNode}function X(t,e,n){t.addEventListener(e,n,P)}function Y(t,e,n){t.removeEventListener(e,n,P)}function q(t,e,n){if(t)if(t.classList)t.classList[n?"add":"remove"](e);else{var i=(" "+t.className+" ").replace(x," ").replace(" "+e+" "," ");t.className=(i+(n?" "+e:"")).replace(x," ")}}function G(t,e,n){var i=t&&t.style;if(i){if(void 0===n)return E.defaultView&&E.defaultView.getComputedStyle?n=E.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),void 0===e?n:n[e];e in i||(e="-webkit-"+e),i[e]=n+("string"==typeof n?"":"px")}}function K(t,e,n){if(t){var i=t.getElementsByTagName(e),r=0,o=i.length;if(n)for(;r<o;r++)n(i[r],r);return i}return[]}function Z(t,e,n,r,o,s,a,l){t=t||e[S];var u=E.createEvent("Event"),c=t.options,h="on"+n.charAt(0).toUpperCase()+n.substr(1);u.initEvent(n,!0,!0),u.to=o||e,u.from=s||e,u.item=r||e,u.clone=i,u.oldIndex=a,u.newIndex=l,e.dispatchEvent(u),c[h]&&c[h].call(t,u)}function Q(t,e,n,i,r,o,s,a){var l,u,c=t[S],h=c.options.onMove;return(l=E.createEvent("Event")).initEvent("move",!0,!0),l.to=e,l.from=t,l.dragged=n,l.draggedRect=i,l.related=r||e,l.relatedRect=o||e.getBoundingClientRect(),l.willInsertAfter=a,t.dispatchEvent(l),h&&(u=h.call(c,l,s)),u}function J(t){t.draggable=!1}function $(){M=!1}function tt(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,n=e.length,i=0;n--;)i+=e.charCodeAt(n);return i.toString(36)}function et(t,e){var n=0;if(!t||!t.parentNode)return-1;for(;t&&(t=t.previousElementSibling);)"TEMPLATE"===t.nodeName.toUpperCase()||">*"!==e&&!nt(t,e)||n++;return n}function nt(t,e){if(t){var n=(e=e.split(".")).shift().toUpperCase(),i=new RegExp("\\s("+e.join("|")+")(?=\\s)","g");return!(""!==n&&t.nodeName.toUpperCase()!=n||e.length&&((" "+t.className+" ").match(i)||[]).length!=e.length)}return!1}function it(t,e){var n,i;return function(){void 0===n&&(n=arguments,i=this,O(function(){1===n.length?t.call(i,n[0]):t.apply(i,n),n=void 0},e))}}function rt(t,e){if(t&&e)for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function ot(t){return A&&A.dom?A.dom(t).cloneNode(!0):I?I(t).clone(!0)[0]:t.cloneNode(!0)}function st(t){return O(t,0)}function at(t){return clearTimeout(t)}return z.prototype={constructor:z,_onTapStart:function(e){var n,i=this,r=this.el,o=this.options,a=o.preventOnFilter,l=e.type,u=e.touches&&e.touches[0],c=(u||e).target,h=e.target.shadowRoot&&e.path&&e.path[0]||c,p=o.filter;if(function(t){for(var e=t.getElementsByTagName("input"),n=e.length;n--;){var i=e[n];i.checked&&N.push(i)}}(r),!t&&!(/mousedown|pointerdown/.test(l)&&0!==e.button||o.disabled)&&!h.isContentEditable&&(c=W(c,o.draggable,r))&&s!==c){if(n=et(c,o.draggable),"function"==typeof p){if(p.call(this,e,c,this))return Z(i,h,"filter",c,r,r,n),void(a&&e.preventDefault())}else if(p&&(p=p.split(",").some(function(t){if(t=W(h,t.trim(),r))return Z(i,t,"filter",c,r,r,n),!0})))return void(a&&e.preventDefault());o.handle&&!W(h,o.handle,r)||this._prepareDragStart(e,u,c,n)}},_prepareDragStart:function(n,i,a,l){var u,c=this,h=c.el,p=c.options,f=h.ownerDocument;a&&!t&&a.parentNode===h&&(v=n,r=h,e=(t=a).parentNode,o=t.nextSibling,s=a,g=p.group,d=l,this._lastX=(i||n).clientX,this._lastY=(i||n).clientY,t.style["will-change"]="all",u=function(){c._disableDelayedDrag(),t.draggable=c.nativeDraggable,q(t,p.chosenClass,!0),c._triggerDragStart(n,i),Z(c,r,"choose",t,r,r,d)},p.ignore.split(",").forEach(function(e){K(t,e.trim(),J)}),X(f,"mouseup",c._onDrop),X(f,"touchend",c._onDrop),X(f,"touchcancel",c._onDrop),X(f,"selectstart",c),p.supportPointer&&X(f,"pointercancel",c._onDrop),p.delay?(X(f,"mouseup",c._disableDelayedDrag),X(f,"touchend",c._disableDelayedDrag),X(f,"touchcancel",c._disableDelayedDrag),X(f,"mousemove",c._disableDelayedDrag),X(f,"touchmove",c._disableDelayedDrag),p.supportPointer&&X(f,"pointermove",c._disableDelayedDrag),c._dragStartTimer=O(u,p.delay)):u())},_disableDelayedDrag:function(){var t=this.el.ownerDocument;clearTimeout(this._dragStartTimer),Y(t,"mouseup",this._disableDelayedDrag),Y(t,"touchend",this._disableDelayedDrag),Y(t,"touchcancel",this._disableDelayedDrag),Y(t,"mousemove",this._disableDelayedDrag),Y(t,"touchmove",this._disableDelayedDrag),Y(t,"pointermove",this._disableDelayedDrag)},_triggerDragStart:function(e,n){(n=n||("touch"==e.pointerType?e:null))?this._onDragStart(v={target:t,clientX:n.clientX,clientY:n.clientY},"touch"):this.nativeDraggable?(X(t,"dragend",this),X(r,"dragstart",this._onDragStart)):this._onDragStart(v,!0);try{E.selection?st(function(){E.selection.empty()}):window.getSelection().removeAllRanges()}catch(t){}},_dragStarted:function(){if(r&&t){var e=this.options;q(t,e.ghostClass,!0),q(t,e.dragClass,!1),z.active=this,Z(this,r,"start",t,r,r,d)}else this._nulling()},_emulateDragOver:function(){if(y){if(this._lastX===y.clientX&&this._lastY===y.clientY)return;this._lastX=y.clientX,this._lastY=y.clientY,j||G(n,"display","none");var t=E.elementFromPoint(y.clientX,y.clientY),e=t,i=L.length;if(t&&t.shadowRoot&&(e=t=t.shadowRoot.elementFromPoint(y.clientX,y.clientY)),e)do{if(e[S]){for(;i--;)L[i]({clientX:y.clientX,clientY:y.clientY,target:t,rootEl:e});break}t=e}while(e=e.parentNode);j||G(n,"display","")}},_onTouchMove:function(t){if(v){var e=this.options,i=e.fallbackTolerance,r=e.fallbackOffset,o=t.touches?t.touches[0]:t,s=o.clientX-v.clientX+r.x,a=o.clientY-v.clientY+r.y,l=t.touches?"translate3d("+s+"px,"+a+"px,0)":"translate("+s+"px,"+a+"px)";if(!z.active){if(i&&F(R(o.clientX-this._lastX),R(o.clientY-this._lastY))<i)return;this._dragStarted()}this._appendGhost(),b=!0,y=o,G(n,"webkitTransform",l),G(n,"mozTransform",l),G(n,"msTransform",l),G(n,"transform",l),t.preventDefault()}},_appendGhost:function(){if(!n){var e,i=t.getBoundingClientRect(),o=G(t),s=this.options;q(n=t.cloneNode(!0),s.ghostClass,!1),q(n,s.fallbackClass,!0),q(n,s.dragClass,!0),G(n,"top",i.top-T(o.marginTop,10)),G(n,"left",i.left-T(o.marginLeft,10)),G(n,"width",i.width),G(n,"height",i.height),G(n,"opacity","0.8"),G(n,"position","fixed"),G(n,"zIndex","100000"),G(n,"pointerEvents","none"),s.fallbackOnBody&&E.body.appendChild(n)||r.appendChild(n),e=n.getBoundingClientRect(),G(n,"width",2*i.width-e.width),G(n,"height",2*i.height-e.height)}},_onDragStart:function(e,n){var o=this,s=e.dataTransfer,a=o.options;o._offUpEvents(),g.checkPull(o,o,t,e)&&((i=ot(t)).draggable=!1,i.style["will-change"]="",G(i,"display","none"),q(i,o.options.chosenClass,!1),o._cloneId=st(function(){r.insertBefore(i,t),Z(o,r,"clone",t)})),q(t,a.dragClass,!0),n?("touch"===n?(X(E,"touchmove",o._onTouchMove),X(E,"touchend",o._onDrop),X(E,"touchcancel",o._onDrop),a.supportPointer&&(X(E,"pointermove",o._onTouchMove),X(E,"pointerup",o._onDrop))):(X(E,"mousemove",o._onTouchMove),X(E,"mouseup",o._onDrop)),o._loopId=setInterval(o._emulateDragOver,50)):(s&&(s.effectAllowed="move",a.setData&&a.setData.call(o,s,t)),X(E,"drop",o),o._dragStartId=st(o._dragStarted))},_onDragOver:function(s){var a,l,u,d,f=this.el,v=this.options,y=v.group,_=z.active,w=g===y,x=!1,k=v.sort;if(void 0!==s.preventDefault&&(s.preventDefault(),!v.dragoverBubble&&s.stopPropagation()),!t.animated&&(b=!0,_&&!v.disabled&&(w?k||(d=!r.contains(t)):m===this||(_.lastPullMode=g.checkPull(this,_,t,s))&&y.checkPut(this,_,t,s))&&(void 0===s.rootEl||s.rootEl===this.el))){if(B(s,v,this.el),M)return;if(a=W(s.target,v.draggable,f),l=t.getBoundingClientRect(),m!==this&&(m=this,x=!0),d)return H(_,!0),e=r,void(i||o?r.insertBefore(t,i||o):k||r.appendChild(t));if(0===f.children.length||f.children[0]===n||f===s.target&&function(t,e){var n=t.lastElementChild.getBoundingClientRect();return e.clientY-(n.top+n.height)>5||e.clientX-(n.left+n.width)>5}(f,s)){if(0!==f.children.length&&f.children[0]!==n&&f===s.target&&(a=f.lastElementChild),a){if(a.animated)return;u=a.getBoundingClientRect()}H(_,w),!1!==Q(r,f,t,l,a,u,s)&&(t.contains(f)||(f.appendChild(t),e=f),this._animate(l,t),a&&this._animate(u,a))}else if(a&&!a.animated&&a!==t&&void 0!==a.parentNode[S]){c!==a&&(c=a,h=G(a),p=G(a.parentNode));var E=(u=a.getBoundingClientRect()).right-u.left,T=u.bottom-u.top,I=C.test(h.cssFloat+h.display)||"flex"==p.display&&0===p["flex-direction"].indexOf("row"),A=a.offsetWidth>t.offsetWidth,P=a.offsetHeight>t.offsetHeight,D=(I?(s.clientX-u.left)/E:(s.clientY-u.top)/T)>.5,j=a.nextElementSibling,R=!1;if(I){var F=t.offsetTop,N=a.offsetTop;R=F===N?a.previousElementSibling===t&&!A||D&&A:a.previousElementSibling===t||t.previousElementSibling===a?(s.clientY-u.top)/T>.5:N>F}else x||(R=j!==t&&!P||D&&P);var L=Q(r,f,t,l,a,u,s,R);!1!==L&&(1!==L&&-1!==L||(R=1===L),M=!0,O($,30),H(_,w),t.contains(f)||(R&&!j?f.appendChild(t):a.parentNode.insertBefore(t,R?j:a)),e=t.parentNode,this._animate(l,t),this._animate(u,a))}}},_animate:function(t,e){var n=this.options.animation;if(n){var i=e.getBoundingClientRect();1===t.nodeType&&(t=t.getBoundingClientRect()),G(e,"transition","none"),G(e,"transform","translate3d("+(t.left-i.left)+"px,"+(t.top-i.top)+"px,0)"),G(e,"transition","all "+n+"ms"),G(e,"transform","translate3d(0,0,0)"),clearTimeout(e.animated),e.animated=O(function(){G(e,"transition",""),G(e,"transform",""),e.animated=!1},n)}},_offUpEvents:function(){var t=this.el.ownerDocument;Y(E,"touchmove",this._onTouchMove),Y(E,"pointermove",this._onTouchMove),Y(t,"mouseup",this._onDrop),Y(t,"touchend",this._onDrop),Y(t,"pointerup",this._onDrop),Y(t,"touchcancel",this._onDrop),Y(t,"pointercancel",this._onDrop),Y(t,"selectstart",this)},_onDrop:function(s){var a=this.el,l=this.options;clearInterval(this._loopId),clearInterval(w.pid),clearTimeout(this._dragStartTimer),at(this._cloneId),at(this._dragStartId),Y(E,"mouseover",this),Y(E,"mousemove",this._onTouchMove),this.nativeDraggable&&(Y(E,"drop",this),Y(a,"dragstart",this._onDragStart)),this._offUpEvents(),s&&(b&&(s.preventDefault(),!l.dropBubble&&s.stopPropagation()),n&&n.parentNode&&n.parentNode.removeChild(n),r!==e&&"clone"===z.active.lastPullMode||i&&i.parentNode&&i.parentNode.removeChild(i),t&&(this.nativeDraggable&&Y(t,"dragend",this),J(t),t.style["will-change"]="",q(t,this.options.ghostClass,!1),q(t,this.options.chosenClass,!1),Z(this,r,"unchoose",t,e,r,d),r!==e?(f=et(t,l.draggable))>=0&&(Z(null,e,"add",t,e,r,d,f),Z(this,r,"remove",t,e,r,d,f),Z(null,e,"sort",t,e,r,d,f),Z(this,r,"sort",t,e,r,d,f)):t.nextSibling!==o&&(f=et(t,l.draggable))>=0&&(Z(this,r,"update",t,e,r,d,f),Z(this,r,"sort",t,e,r,d,f)),z.active&&(null!=f&&-1!==f||(f=d),Z(this,r,"end",t,e,r,d,f),this.save()))),this._nulling()},_nulling:function(){r=t=e=n=o=i=s=a=l=v=y=b=f=c=h=m=g=z.active=null,N.forEach(function(t){t.checked=!0}),N.length=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragover":case"dragenter":t&&(this._onDragOver(e),function(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move"),t.preventDefault()}(e));break;case"mouseover":this._onDrop(e);break;case"selectstart":e.preventDefault()}},toArray:function(){for(var t,e=[],n=this.el.children,i=0,r=n.length,o=this.options;i<r;i++)W(t=n[i],o.draggable,this.el)&&e.push(t.getAttribute(o.dataIdAttr)||tt(t));return e},sort:function(t){var e={},n=this.el;this.toArray().forEach(function(t,i){var r=n.children[i];W(r,this.options.draggable,n)&&(e[t]=r)},this),t.forEach(function(t){e[t]&&(n.removeChild(e[t]),n.appendChild(e[t]))})},save:function(){var t=this.options.store;t&&t.set(this)},closest:function(t,e){return W(t,e||this.options.draggable,this.el)},option:function(t,e){var n=this.options;if(void 0===e)return n[t];n[t]=e,"group"===t&&V(n)},destroy:function(){var t=this.el;t[S]=null,Y(t,"mousedown",this._onTapStart),Y(t,"touchstart",this._onTapStart),Y(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(Y(t,"dragover",this),Y(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),function(t){t.removeAttribute("draggable")}),L.splice(L.indexOf(this._onDragOver),1),this._onDrop(),this.el=t=null}},X(E,"touchmove",function(t){z.active&&t.preventDefault()}),z.utils={on:X,off:Y,css:G,find:K,is:function(t,e){return!!W(t,e,t)},extend:rt,throttle:it,closest:W,toggleClass:q,clone:ot,index:et,nextTick:st,cancelNextTick:at},z.create=function(t,e){return new z(t,e)},z.version="1.7.0",z})?i.call(e,n,e,t):i)||(t.exports=r)}()},crnd:function(t,e){function n(t){return Promise.resolve().then(function(){var e=new Error('Cannot find module "'+t+'".');throw e.code="MODULE_NOT_FOUND",e})}n.keys=function(){return[]},n.resolve=n,t.exports=n,n.id="crnd"},epSk:function(t,e,n){var i,r,o,s,a,l,u,c,h,p,d,f,g,m,v,y,b,_,w,x,C,S=S||{version:"2.4.0"};function k(t,e){var n=t.canvas,i=e.targetCanvas,r=i.getContext("2d");r.translate(0,i.height),r.scale(1,-1),r.drawImage(n,0,n.height-i.height,i.width,i.height,0,0,i.width,i.height)}function E(t,e){var n=e.targetCanvas.getContext("2d"),i=e.destinationWidth,r=e.destinationHeight,o=i*r*4,s=new Uint8Array(this.imageBuffer,0,o),a=new Uint8ClampedArray(this.imageBuffer,0,o);t.readPixels(0,0,i,r,t.RGBA,t.UNSIGNED_BYTE,s);var l=new ImageData(a,i,r);n.putImageData(l,0,0)}e.fabric=S,"undefined"!=typeof document&&"undefined"!=typeof window?(S.document=document,S.window=window):(S.document=n(6).jsdom(decodeURIComponent("%3C!DOCTYPE%20html%3E%3Chtml%3E%3Chead%3E%3C%2Fhead%3E%3Cbody%3E%3C%2Fbody%3E%3C%2Fhtml%3E"),{features:{FetchExternalResources:["img"]}}),S.jsdomImplForWrapper=n(5).implForWrapper,S.nodeCanvas=n(4).Canvas,S.window=S.document.defaultView,DOMParser=n(3).DOMParser),S.isTouchSupported="ontouchstart"in S.window,S.isLikelyNode="undefined"!=typeof Buffer&&"undefined"==typeof window,S.SHARED_ATTRIBUTES=["display","transform","fill","fill-opacity","fill-rule","opacity","stroke","stroke-dasharray","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","id","paint-order","instantiated_by_use","clip-path"],S.DPI=96,S.reNum="(?:[-+]?(?:\\d+|\\d*\\.\\d+)(?:e[-+]?\\d+)?)",S.fontPaths={},S.iMatrix=[1,0,0,1,0,0],S.canvasModule="canvas",S.perfLimitSizeTotal=2097152,S.maxCacheSideLimit=4096,S.minCacheSideLimit=256,S.charWidthsCache={},S.textureSize=2048,S.enableGLFiltering=!0,S.devicePixelRatio=S.window.devicePixelRatio||S.window.webkitDevicePixelRatio||S.window.mozDevicePixelRatio||1,S.browserShadowBlurConstant=1,S.arcToSegmentsCache={},S.boundsOfCurveCache={},S.cachesBoundsOfCurve=!0,S.initFilterBackend=function(){return S.enableGLFiltering&&S.isWebglSupported&&S.isWebglSupported(S.textureSize)?(console.log("max texture size: "+S.maxTextureSize),new S.WebglFilterBackend({tileSize:S.textureSize})):S.Canvas2dFilterBackend?new S.Canvas2dFilterBackend:void 0},"undefined"!=typeof document&&"undefined"!=typeof window&&(window.fabric=S),function(){function t(t,e){if(this.__eventListeners[t]){var n=this.__eventListeners[t];e?n[n.indexOf(e)]=!1:S.util.array.fill(n,!1)}}function e(t,e){if(this.__eventListeners||(this.__eventListeners={}),1===arguments.length)for(var n in t)this.on(n,t[n]);else this.__eventListeners[t]||(this.__eventListeners[t]=[]),this.__eventListeners[t].push(e);return this}function n(e,n){if(this.__eventListeners){if(0===arguments.length)for(e in this.__eventListeners)t.call(this,e);else if(1===arguments.length&&"object"==typeof arguments[0])for(var i in e)t.call(this,i,e[i]);else t.call(this,e,n);return this}}function i(t,e){if(this.__eventListeners){var n=this.__eventListeners[t];if(n){for(var i=0,r=n.length;i<r;i++)n[i]&&n[i].call(this,e||{});return this.__eventListeners[t]=n.filter(function(t){return!1!==t}),this}}}S.Observable={observe:e,stopObserving:n,fire:i,on:e,off:n,trigger:i}}(),S.Collection={_objects:[],add:function(){if(this._objects.push.apply(this._objects,arguments),this._onObjectAdded)for(var t=0,e=arguments.length;t<e;t++)this._onObjectAdded(arguments[t]);return this.renderOnAddRemove&&this.requestRenderAll(),this},insertAt:function(t,e,n){var i=this._objects;return n?i[e]=t:i.splice(e,0,t),this._onObjectAdded&&this._onObjectAdded(t),this.renderOnAddRemove&&this.requestRenderAll(),this},remove:function(){for(var t,e=this._objects,n=!1,i=0,r=arguments.length;i<r;i++)-1!==(t=e.indexOf(arguments[i]))&&(n=!0,e.splice(t,1),this._onObjectRemoved&&this._onObjectRemoved(arguments[i]));return this.renderOnAddRemove&&n&&this.requestRenderAll(),this},forEachObject:function(t,e){for(var n=this.getObjects(),i=0,r=n.length;i<r;i++)t.call(e,n[i],i,n);return this},getObjects:function(t){return void 0===t?this._objects.concat():this._objects.filter(function(e){return e.type===t})},item:function(t){return this._objects[t]},isEmpty:function(){return 0===this._objects.length},size:function(){return this._objects.length},contains:function(t){return this._objects.indexOf(t)>-1},complexity:function(){return this._objects.reduce(function(t,e){return t+(e.complexity?e.complexity():0)},0)}},S.CommonMethods={_setOptions:function(t){for(var e in t)this.set(e,t[e])},_initGradient:function(t,e){!t||!t.colorStops||t instanceof S.Gradient||this.set(e,new S.Gradient(t))},_initPattern:function(t,e,n){!t||!t.source||t instanceof S.Pattern?n&&n():this.set(e,new S.Pattern(t,n))},_initClipping:function(t){if(t.clipTo&&"string"==typeof t.clipTo){var e=S.util.getFunctionBody(t.clipTo);void 0!==e&&(this.clipTo=new Function("ctx",e))}},_setObject:function(t){for(var e in t)this._set(e,t[e])},set:function(t,e){return"object"==typeof t?this._setObject(t):this._set(t,"function"==typeof e&&"clipTo"!==t?e(this.get(t)):e),this},_set:function(t,e){this[t]=e},toggle:function(t){var e=this.get(t);return"boolean"==typeof e&&this.set(t,!e),this},get:function(t){return this[t]}},i=e,r=Math.sqrt,o=Math.atan2,s=Math.pow,a=Math.abs,l=Math.PI/180,u=Math.PI/2,S.util={cos:function(t){if(0===t)return 1;switch(t<0&&(t=-t),t/u){case 1:case 3:return 0;case 2:return-1}return Math.cos(t)},sin:function(t){if(0===t)return 0;var e=1;switch(t<0&&(e=-1),t/u){case 1:return e;case 2:return 0;case 3:return-e}return Math.sin(t)},removeFromArray:function(t,e){var n=t.indexOf(e);return-1!==n&&t.splice(n,1),t},getRandomInt:function(t,e){return Math.floor(Math.random()*(e-t+1))+t},degreesToRadians:function(t){return t*l},radiansToDegrees:function(t){return t/l},rotatePoint:function(t,e,n){t.subtractEquals(e);var i=S.util.rotateVector(t,n);return new S.Point(i.x,i.y).addEquals(e)},rotateVector:function(t,e){var n=S.util.sin(e),i=S.util.cos(e);return{x:t.x*i-t.y*n,y:t.x*n+t.y*i}},transformPoint:function(t,e,n){return n?new S.Point(e[0]*t.x+e[2]*t.y,e[1]*t.x+e[3]*t.y):new S.Point(e[0]*t.x+e[2]*t.y+e[4],e[1]*t.x+e[3]*t.y+e[5])},makeBoundingBoxFromPoints:function(t){var e=[t[0].x,t[1].x,t[2].x,t[3].x],n=S.util.array.min(e),i=S.util.array.max(e)-n,r=[t[0].y,t[1].y,t[2].y,t[3].y],o=S.util.array.min(r);return{left:n,top:o,width:i,height:S.util.array.max(r)-o}},invertTransform:function(t){var e=1/(t[0]*t[3]-t[1]*t[2]),n=[e*t[3],-e*t[1],-e*t[2],e*t[0]],i=S.util.transformPoint({x:t[4],y:t[5]},n,!0);return n[4]=-i.x,n[5]=-i.y,n},toFixed:function(t,e){return parseFloat(Number(t).toFixed(e))},parseUnit:function(t,e){var n=/\D{0,2}$/.exec(t),i=parseFloat(t);switch(e||(e=S.Text.DEFAULT_SVG_FONT_SIZE),n[0]){case"mm":return i*S.DPI/25.4;case"cm":return i*S.DPI/2.54;case"in":return i*S.DPI;case"pt":return i*S.DPI/72;case"pc":return i*S.DPI/72*12;case"em":return i*e;default:return i}},falseFunction:function(){return!1},getKlass:function(t,e){return t=S.util.string.camelize(t.charAt(0).toUpperCase()+t.slice(1)),S.util.resolveNamespace(e)[t]},getSvgAttributes:function(t){var e=["instantiated_by_use","style","id","class"];switch(t){case"linearGradient":e=e.concat(["x1","y1","x2","y2","gradientUnits","gradientTransform"]);break;case"radialGradient":e=e.concat(["gradientUnits","gradientTransform","cx","cy","r","fx","fy","fr"]);break;case"stop":e=e.concat(["offset","stop-color","stop-opacity"])}return e},resolveNamespace:function(t){if(!t)return S;var e,n=t.split("."),r=n.length,o=i||S.window;for(e=0;e<r;++e)o=o[n[e]];return o},loadImage:function(t,e,n,i){if(t){var r=S.util.createImage(),o=function(){e&&e.call(n,r),r=r.onload=r.onerror=null};r.onload=o,r.onerror=function(){S.log("Error loading "+r.src),e&&e.call(n,null,!0),r=r.onload=r.onerror=null},0!==t.indexOf("data")&&i&&(r.crossOrigin=i),"data:image/svg"===t.substring(0,14)&&(r.onload=null,S.util.loadImageInDom(r,o)),r.src=t}else e&&e.call(n,t)},loadImageInDom:function(t,e){var n=S.document.createElement("div");n.style.width=n.style.height="1px",n.style.left=n.style.top="-100%",n.style.position="absolute",n.appendChild(t),S.document.querySelector("body").appendChild(n),t.onload=function(){e(),n.parentNode.removeChild(n),n=null}},enlivenObjects:function(t,e,n,i){function r(){++s===a&&e&&e(o)}var o=[],s=0,a=(t=t||[]).length;a?t.forEach(function(t,e){t&&t.type?S.util.getKlass(t.type,n).fromObject(t,function(n,s){s||(o[e]=n),i&&i(t,n,s),r()}):r()}):e&&e(o)},enlivenPatterns:function(t,e){function n(){++r===o&&e&&e(i)}var i=[],r=0,o=(t=t||[]).length;o?t.forEach(function(t,e){t&&t.source?new S.Pattern(t,function(t){i[e]=t,n()}):(i[e]=t,n())}):e&&e(i)},groupSVGElements:function(t,e,n){var i;return 1===t.length?t[0]:(e&&(e.width&&e.height?e.centerPoint={x:e.width/2,y:e.height/2}:(delete e.width,delete e.height)),i=new S.Group(t,e),void 0!==n&&(i.sourcePath=n),i)},populateWithProperties:function(t,e,n){if(n&&"[object Array]"===Object.prototype.toString.call(n))for(var i=0,r=n.length;i<r;i++)n[i]in t&&(e[n[i]]=t[n[i]])},drawDashedLine:function(t,e,n,i,s,a){var l=i-e,u=s-n,c=r(l*l+u*u),h=o(u,l),p=a.length,d=0,f=!0;for(t.save(),t.translate(e,n),t.moveTo(0,0),t.rotate(h),e=0;c>e;)(e+=a[d++%p])>c&&(e=c),t[f?"lineTo":"moveTo"](e,0),f=!f;t.restore()},createCanvasElement:function(){return S.document.createElement("canvas")},copyCanvasElement:function(t){var e=S.document.createElement("canvas");return e.width=t.width,e.height=t.height,e.getContext("2d").drawImage(t,0,0),e},createImage:function(){return S.document.createElement("img")},clipContext:function(t,e){e.save(),e.beginPath(),t.clipTo(e),e.clip()},multiplyTransformMatrices:function(t,e,n){return[t[0]*e[0]+t[2]*e[1],t[1]*e[0]+t[3]*e[1],t[0]*e[2]+t[2]*e[3],t[1]*e[2]+t[3]*e[3],n?0:t[0]*e[4]+t[2]*e[5]+t[4],n?0:t[1]*e[4]+t[3]*e[5]+t[5]]},qrDecompose:function(t){var e=o(t[1],t[0]),n=s(t[0],2)+s(t[1],2),i=r(n),a=(t[0]*t[3]-t[2]*t[1])/i,u=o(t[0]*t[2]+t[1]*t[3],n);return{angle:e/l,scaleX:i,scaleY:a,skewX:u/l,skewY:0,translateX:t[4],translateY:t[5]}},customTransformMatrix:function(t,e,n){var i=[1,0,a(Math.tan(n*l)),1],r=[a(t),0,0,a(e)];return S.util.multiplyTransformMatrices(r,i,!0)},resetObjectTransform:function(t){t.scaleX=1,t.scaleY=1,t.skewX=0,t.skewY=0,t.flipX=!1,t.flipY=!1,t.rotate(0)},saveObjectTransform:function(t){return{scaleX:t.scaleX,scaleY:t.scaleY,skewX:t.skewX,skewY:t.skewY,angle:t.angle,left:t.left,flipX:t.flipX,flipY:t.flipY,top:t.top}},getFunctionBody:function(t){return(String(t).match(/function[^{]*\{([\s\S]*)\}/)||{})[1]},isTransparent:function(t,e,n,i){i>0&&(e>i?e-=i:e=0,n>i?n-=i:n=0);var r,o=!0,s=t.getImageData(e,n,2*i||1,2*i||1),a=s.data.length;for(r=3;r<a&&0!=(o=s.data[r]<=0);r+=4);return s=null,o},parsePreserveAspectRatioAttribute:function(t){var e,n="meet",i=t.split(" ");return i&&i.length&&("meet"!==(n=i.pop())&&"slice"!==n?(e=n,n="meet"):i.length&&(e=i.pop())),{meetOrSlice:n,alignX:"none"!==e?e.slice(1,4):"none",alignY:"none"!==e?e.slice(5,8):"none"}},clearFabricFontCache:function(t){(t=(t||"").toLowerCase())?S.charWidthsCache[t]&&delete S.charWidthsCache[t]:S.charWidthsCache={}},limitDimsByArea:function(t,e){var n=Math.sqrt(e*t),i=Math.floor(e/n);return{x:Math.floor(n),y:i}},capValue:function(t,e,n){return Math.max(t,Math.min(e,n))},findScaleToFit:function(t,e){return Math.min(e.width/t.width,e.height/t.height)},findScaleToCover:function(t,e){return Math.max(e.width/t.width,e.height/t.height)}},function(){var t=Array.prototype.join;function e(e,r,o,s,a,l,u){var c=t.call(arguments);if(S.arcToSegmentsCache[c])return S.arcToSegmentsCache[c];var h=Math.PI,p=u*h/180,d=S.util.sin(p),f=S.util.cos(p),g=0,m=0,v=-f*e*.5-d*r*.5,y=-f*r*.5+d*e*.5,b=(o=Math.abs(o))*o,_=(s=Math.abs(s))*s,w=y*y,x=v*v,C=b*_-b*w-_*x,k=0;if(C<0){var E=Math.sqrt(1-C/(b*_));o*=E,s*=E}else k=(a===l?-1:1)*Math.sqrt(C/(b*w+_*x));var T=k*o*y/s,O=-k*s*v/o,I=f*T-d*O+.5*e,A=d*T+f*O+.5*r,P=i(1,0,(v-T)/o,(y-O)/s),D=i((v-T)/o,(y-O)/s,(-v-T)/o,(-y-O)/s);0===l&&D>0?D-=2*h:1===l&&D<0&&(D+=2*h);for(var j=Math.ceil(Math.abs(D/h*2)),M=[],R=D/j,F=8/3*Math.sin(R/4)*Math.sin(R/4)/Math.sin(R/2),N=P+R,L=0;L<j;L++)M[L]=n(P,N,f,d,o,s,I,A,F,g,m),g=M[L][4],m=M[L][5],P=N,N+=R;return S.arcToSegmentsCache[c]=M,M}function n(t,e,n,i,r,o,s,a,l,u,c){var h=S.util.cos(t),p=S.util.sin(t),d=S.util.cos(e),f=S.util.sin(e),g=n*r*d-i*o*f+s,m=i*r*d+n*o*f+a;return[u+l*(-n*r*p-i*o*h),c+l*(-i*r*p+n*o*h),g+l*(n*r*f+i*o*d),m+l*(i*r*f-n*o*d),g,m]}function i(t,e,n,i){var r=Math.atan2(e,t),o=Math.atan2(i,n);return o>=r?o-r:2*Math.PI-(r-o)}function r(e,n,i,r,o,s,a,l){var u;if(S.cachesBoundsOfCurve&&(u=t.call(arguments),S.boundsOfCurveCache[u]))return S.boundsOfCurveCache[u];var c,h,p,d,f,g,m,v,y=Math.sqrt,b=Math.min,_=Math.max,w=Math.abs,x=[],C=[[],[]];h=6*e-12*i+6*o,c=-3*e+9*i-9*o+3*a,p=3*i-3*e;for(var k=0;k<2;++k)if(k>0&&(h=6*n-12*r+6*s,c=-3*n+9*r-9*s+3*l,p=3*r-3*n),w(c)<1e-12){if(w(h)<1e-12)continue;0<(d=-p/h)&&d<1&&x.push(d)}else(m=h*h-4*p*c)<0||(0<(f=(-h+(v=y(m)))/(2*c))&&f<1&&x.push(f),0<(g=(-h-v)/(2*c))&&g<1&&x.push(g));for(var E,T=x.length,O=T;T--;)C[0][T]=(E=1-(d=x[T]))*E*E*e+3*E*E*d*i+3*E*d*d*o+d*d*d*a,C[1][T]=E*E*E*n+3*E*E*d*r+3*E*d*d*s+d*d*d*l;C[0][O]=e,C[1][O]=n,C[0][O+1]=a,C[1][O+1]=l;var I=[{x:b.apply(null,C[0]),y:b.apply(null,C[1])},{x:_.apply(null,C[0]),y:_.apply(null,C[1])}];return S.cachesBoundsOfCurve&&(S.boundsOfCurveCache[u]=I),I}S.util.drawArc=function(t,n,i,r){for(var o=[[],[],[],[]],s=e(r[5]-n,r[6]-i,r[0],r[1],r[3],r[4],r[2]),a=0,l=s.length;a<l;a++)o[a][0]=s[a][0]+n,o[a][1]=s[a][1]+i,o[a][2]=s[a][2]+n,o[a][3]=s[a][3]+i,o[a][4]=s[a][4]+n,o[a][5]=s[a][5]+i,t.bezierCurveTo.apply(t,o[a])},S.util.getBoundsOfArc=function(t,n,i,o,s,a,l,u,c){for(var h,p=0,d=0,f=[],g=e(u-t,c-n,i,o,a,l,s),m=0,v=g.length;m<v;m++)h=r(p,d,g[m][0],g[m][1],g[m][2],g[m][3],g[m][4],g[m][5]),f.push({x:h[0].x+t,y:h[0].y+n}),f.push({x:h[1].x+t,y:h[1].y+n}),p=g[m][4],d=g[m][5];return f},S.util.getBoundsOfCurve=r}(),function(){var t=Array.prototype.slice;function e(t,e,n){if(t&&0!==t.length){var i=t.length-1,r=e?t[i][e]:t[i];if(e)for(;i--;)n(t[i][e],r)&&(r=t[i][e]);else for(;i--;)n(t[i],r)&&(r=t[i]);return r}}S.util.array={fill:function(t,e){for(var n=t.length;n--;)t[n]=e;return t},invoke:function(e,n){for(var i=t.call(arguments,2),r=[],o=0,s=e.length;o<s;o++)r[o]=i.length?e[o][n].apply(e[o],i):e[o][n].call(e[o]);return r},min:function(t,n){return e(t,n,function(t,e){return t<e})},max:function(t,n){return e(t,n,function(t,e){return t>=e})}}}(),function(){function t(e,n,i){if(i)if(!S.isLikelyNode&&n instanceof Element)e=n;else if(n instanceof Array){e=[];for(var r=0,o=n.length;r<o;r++)e[r]=t({},n[r],i)}else if(n&&"object"==typeof n)for(var s in n)n.hasOwnProperty(s)&&(e[s]=t({},n[s],i));else e=n;else for(var s in n)e[s]=n[s];return e}S.util.object={extend:t,clone:function(e,n){return t({},e,n)}},S.util.object.extend(S.util,S.Observable)}(),function(){function t(t,e){var n=t.charCodeAt(e);if(isNaN(n))return"";if(n<55296||n>57343)return t.charAt(e);if(55296<=n&&n<=56319){if(t.length<=e+1)throw"High surrogate without following low surrogate";var i=t.charCodeAt(e+1);if(56320>i||i>57343)throw"High surrogate without following low surrogate";return t.charAt(e)+t.charAt(e+1)}if(0===e)throw"Low surrogate without preceding high surrogate";var r=t.charCodeAt(e-1);if(55296>r||r>56319)throw"Low surrogate without preceding high surrogate";return!1}S.util.string={camelize:function(t){return t.replace(/-+(.)?/g,function(t,e){return e?e.toUpperCase():""})},capitalize:function(t,e){return t.charAt(0).toUpperCase()+(e?t.slice(1):t.slice(1).toLowerCase())},escapeXml:function(t){return t.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")},graphemeSplit:function(e){var n,i=0,r=[];for(i=0;i<e.length;i++)!1!==(n=t(e,i))&&r.push(n);return r}}}(),function(){var t=Array.prototype.slice,e=function(){},n=function(){for(var t in{toString:1})if("toString"===t)return!1;return!0}(),i=function(t,e,i){for(var r in e)t.prototype[r]=r in t.prototype&&"function"==typeof t.prototype[r]&&(e[r]+"").indexOf("callSuper")>-1?function(t){return function(){var n=this.constructor.superclass;this.constructor.superclass=i;var r=e[t].apply(this,arguments);if(this.constructor.superclass=n,"initialize"!==t)return r}}(r):e[r],n&&(e.toString!==Object.prototype.toString&&(t.prototype.toString=e.toString),e.valueOf!==Object.prototype.valueOf&&(t.prototype.valueOf=e.valueOf))};function r(){}function o(e){for(var n=null,i=this;i.constructor.superclass;){var r=i.constructor.superclass.prototype[e];if(i[e]!==r){n=r;break}i=i.constructor.superclass.prototype}return n?arguments.length>1?n.apply(this,t.call(arguments,1)):n.call(this):console.log("tried to callSuper "+e+", method not found in prototype chain",this)}S.util.createClass=function(){var n=null,s=t.call(arguments,0);function a(){this.initialize.apply(this,arguments)}"function"==typeof s[0]&&(n=s.shift()),a.superclass=n,a.subclasses=[],n&&(r.prototype=n.prototype,a.prototype=new r,n.subclasses.push(a));for(var l=0,u=s.length;l<u;l++)i(a,s[l],n);return a.prototype.initialize||(a.prototype.initialize=e),a.prototype.constructor=a,a.prototype.callSuper=o,a}}(),function(){function t(t){var e,n=Array.prototype.slice.call(arguments,1),i=n.length;for(e=0;e<i;e++)if(!/^(?:function|object|unknown)$/.test(typeof t[n[e]]))return!1;return!0}var e,n,i,r,o=(i=0,function(t){return t.__uniqueID||(t.__uniqueID="uniqueID__"+i++)});r={},e=function(t){return r[t]},n=function(t,e){r[t]=e};var s,a,l=t(S.document.documentElement,"addEventListener","removeEventListener")&&t(S.window,"addEventListener","removeEventListener"),u=t(S.document.documentElement,"attachEvent","detachEvent")&&t(S.window,"attachEvent","detachEvent"),c={},h={};l?(s=function(t,e,n,i){t&&t.addEventListener(e,n,!u&&i)},a=function(t,e,n,i){t&&t.removeEventListener(e,n,!u&&i)}):u?(s=function(t,i,r){if(t){var s=o(t);n(s,t),c[s]||(c[s]={}),c[s][i]||(c[s][i]=[]);var a=function(t,n){return{handler:n,wrappedHandler:function(t,n){return function(i){n.call(e(t),i||S.window.event)}}(t,n)}}(s,r);c[s][i].push(a),t.attachEvent("on"+i,a.wrappedHandler)}},a=function(t,e,n){if(t){var i,r=o(t);if(c[r]&&c[r][e])for(var s=0,a=c[r][e].length;s<a;s++)(i=c[r][e][s])&&i.handler===n&&(t.detachEvent("on"+e,i.wrappedHandler),c[r][e][s]=null)}}):(s=function(t,e,n){if(t){var i=o(t);if(h[i]||(h[i]={}),!h[i][e]){h[i][e]=[];var r=t["on"+e];r&&h[i][e].push(r),t["on"+e]=function(t,e){return function(n){if(h[t]&&h[t][e])for(var i=h[t][e],r=0,o=i.length;r<o;r++)i[r].call(this,n||S.window.event)}}(i,e)}h[i][e].push(n)}},a=function(t,e,n){if(t){var i=o(t);if(h[i]&&h[i][e])for(var r=h[i][e],s=0,a=r.length;s<a;s++)r[s]===n&&r.splice(s,1)}}),S.util.addListener=s,S.util.removeListener=a;var p=function(t){return t.clientX},d=function(t){return t.clientY};function f(t,e,n){var i,r=t["touchend"===t.type?"changedTouches":"touches"];return r&&r[0]&&(i=r[0][n]),void 0===i&&(i=t[n]),i}S.isTouchSupported&&(p=function(t){return f(t,0,"clientX")},d=function(t){return f(t,0,"clientY")}),S.util.getPointer=function(t){t||(t=S.window.event);var e=S.util.getScrollLeftTop(t.target||("unknown"!=typeof t.srcElement?t.srcElement:null));return{x:p(t)+e.left,y:d(t)+e.top}}}(),w=S.document.createElement("div"),x=/alpha\s*\(\s*opacity\s*=\s*([^\)]+)\)/,C=function(t){return t},"string"==typeof w.style.opacity?C=function(t,e){return t.style.opacity=e,t}:"string"==typeof w.style.filter&&(C=function(t,e){var n=t.style;return t.currentStyle&&!t.currentStyle.hasLayout&&(n.zoom=1),x.test(n.filter)?n.filter=n.filter.replace(x,e=e>=.9999?"":"alpha(opacity="+100*e+")"):n.filter+=" alpha(opacity="+100*e+")",t}),S.util.setStyle=function(t,e){var n=t.style;if(!n)return t;if("string"==typeof e)return t.style.cssText+=";"+e,e.indexOf("opacity")>-1?C(t,e.match(/opacity:\s*(\d?\.?\d*)/)[1]):t;for(var i in e)"opacity"===i?C(t,e[i]):n["float"===i||"cssFloat"===i?void 0===n.styleFloat?"cssFloat":"styleFloat":i]=e[i];return t},function(){var t,e,n,i,r=Array.prototype.slice,o=function(t){return r.call(t,0)};try{t=o(S.document.childNodes)instanceof Array}catch(t){}function s(t,e){var n=S.document.createElement(t);for(var i in e)"class"===i?n.className=e[i]:"for"===i?n.htmlFor=e[i]:n.setAttribute(i,e[i]);return n}function a(t){for(var e=0,n=0,i=S.document.documentElement,r=S.document.body||{scrollLeft:0,scrollTop:0};t&&(t.parentNode||t.host)&&((t=t.parentNode||t.host)===S.document?(e=r.scrollLeft||i.scrollLeft||0,n=r.scrollTop||i.scrollTop||0):(e+=t.scrollLeft||0,n+=t.scrollTop||0),1!==t.nodeType||"fixed"!==t.style.position););return{left:e,top:n}}t||(o=function(t){for(var e=new Array(t.length),n=t.length;n--;)e[n]=t[n];return e}),e=S.document.defaultView&&S.document.defaultView.getComputedStyle?function(t,e){var n=S.document.defaultView.getComputedStyle(t,null);return n?n[e]:void 0}:function(t,e){var n=t.style[e];return!n&&t.currentStyle&&(n=t.currentStyle[e]),n},i="userSelect"in(n=S.document.documentElement.style)?"userSelect":"MozUserSelect"in n?"MozUserSelect":"WebkitUserSelect"in n?"WebkitUserSelect":"KhtmlUserSelect"in n?"KhtmlUserSelect":"",S.util.makeElementUnselectable=function(t){return void 0!==t.onselectstart&&(t.onselectstart=S.util.falseFunction),i?t.style[i]="none":"string"==typeof t.unselectable&&(t.unselectable="on"),t},S.util.makeElementSelectable=function(t){return void 0!==t.onselectstart&&(t.onselectstart=null),i?t.style[i]="":"string"==typeof t.unselectable&&(t.unselectable=""),t},S.util.getScript=function(t,e){var n=S.document.getElementsByTagName("head")[0],i=S.document.createElement("script"),r=!0;i.onload=i.onreadystatechange=function(t){if(r){if("string"==typeof this.readyState&&"loaded"!==this.readyState&&"complete"!==this.readyState)return;r=!1,e(t||S.window.event),i=i.onload=i.onreadystatechange=null}},i.src=t,n.appendChild(i)},S.util.getById=function(t){return"string"==typeof t?S.document.getElementById(t):t},S.util.toArray=o,S.util.makeElement=s,S.util.addClass=function(t,e){t&&-1===(" "+t.className+" ").indexOf(" "+e+" ")&&(t.className+=(t.className?" ":"")+e)},S.util.wrapElement=function(t,e,n){return"string"==typeof e&&(e=s(e,n)),t.parentNode&&t.parentNode.replaceChild(e,t),e.appendChild(t),e},S.util.getScrollLeftTop=a,S.util.getElementOffset=function(t){var n,i,r=t&&t.ownerDocument,o={left:0,top:0},s={left:0,top:0},l={borderLeftWidth:"left",borderTopWidth:"top",paddingLeft:"left",paddingTop:"top"};if(!r)return s;for(var u in l)s[l[u]]+=parseInt(e(t,u),10)||0;return n=r.documentElement,void 0!==t.getBoundingClientRect&&(o=t.getBoundingClientRect()),i=a(t),{left:o.left+i.left-(n.clientLeft||0)+s.left,top:o.top+i.top-(n.clientTop||0)+s.top}},S.util.getElementStyle=e,S.util.getNodeCanvas=function(t){var e=S.jsdomImplForWrapper(t);return e._canvas||e._image},S.util.cleanUpJsdomNode=function(t){if(S.isLikelyNode){var e=S.jsdomImplForWrapper(t);e&&(e._image=null,e._canvas=null,e._currentSrc=null,e._attributes=null,e._classList=null)}}}(),function(){var t=function(){for(var t=[function(){return new S.window.XMLHttpRequest},function(){return new ActiveXObject("Microsoft.XMLHTTP")},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Msxml2.XMLHTTP.3.0")}],e=t.length;e--;)try{if(t[e]())return t[e]}catch(t){}}();function e(){}S.util.request=function(n,i){i||(i={});var r=i.method?i.method.toUpperCase():"GET",o=i.onComplete||function(){},s=t(),a=i.body||i.parameters;return s.onreadystatechange=function(){4===s.readyState&&(o(s),s.onreadystatechange=e)},"GET"===r&&(a=null,"string"==typeof i.parameters&&(n=function(t,e){return t+(/\?/.test(t)?"&":"?")+e}(n,i.parameters))),s.open(r,n,!0),"POST"!==r&&"PUT"!==r||s.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),s.send(a),s}}(),S.log=function(){},S.warn=function(){},"undefined"!=typeof console&&["log","warn"].forEach(function(t){void 0!==console[t]&&"function"==typeof console[t].apply&&(S[t]=function(){return console[t].apply(console,arguments)})}),function(){function t(){return!1}var e=S.window.requestAnimationFrame||S.window.webkitRequestAnimationFrame||S.window.mozRequestAnimationFrame||S.window.oRequestAnimationFrame||S.window.msRequestAnimationFrame||function(t){return S.window.setTimeout(t,1e3/60)},n=S.window.cancelAnimationFrame||S.window.clearTimeout;function i(){return e.apply(S.window,arguments)}S.util.animate=function(e){i(function(n){e||(e={});var r,o=n||+new Date,s=e.duration||500,a=o+s,l=e.onChange||t,u=e.abort||t,c=e.onComplete||t,h=e.easing||function(t,e,n,i){return-n*Math.cos(t/i*(Math.PI/2))+n+e},p="startValue"in e?e.startValue:0,d="endValue"in e?e.endValue:100,f=e.byValue||d-p;e.onStart&&e.onStart(),function t(n){if(u())c(d,1,1);else{var g=(r=n||+new Date)>a?s:r-o,m=g/s,v=h(g,p,f,s),y=Math.abs((v-p)/f);l(v,y,m),r>a?e.onComplete&&e.onComplete():i(t)}}(o)})},S.util.requestAnimFrame=i,S.util.cancelAnimFrame=function(){return n.apply(S.window,arguments)}}(),S.util.animateColor=function(t,e,n,i){var r=new S.Color(t).getSource(),o=new S.Color(e).getSource();S.util.animate(S.util.object.extend(i=i||{},{duration:n||500,startValue:r,endValue:o,byValue:o,easing:function(t,e,n,r){var o,s,a,l;return o=e,s=n,a=i.colorEasing?i.colorEasing(t,r):1-Math.cos(t/r*(Math.PI/2)),l="rgba("+parseInt(o[0]+a*(s[0]-o[0]),10)+","+parseInt(o[1]+a*(s[1]-o[1]),10)+","+parseInt(o[2]+a*(s[2]-o[2]),10),(l+=","+(o&&s?parseFloat(o[3]+a*(s[3]-o[3])):1))+")"}}))},function(){function t(t,e,n,i){return t<Math.abs(e)?(t=e,i=n/4):i=0===e&&0===t?n/(2*Math.PI)*Math.asin(1):n/(2*Math.PI)*Math.asin(e/t),{a:t,c:e,p:n,s:i}}function e(t,e,n){return t.a*Math.pow(2,10*(e-=1))*Math.sin((e*n-t.s)*(2*Math.PI)/t.p)}function n(t,e,n,r){return n-i(r-t,0,n,r)+e}function i(t,e,n,i){return(t/=i)<1/2.75?n*(7.5625*t*t)+e:t<2/2.75?n*(7.5625*(t-=1.5/2.75)*t+.75)+e:t<2.5/2.75?n*(7.5625*(t-=2.25/2.75)*t+.9375)+e:n*(7.5625*(t-=2.625/2.75)*t+.984375)+e}S.util.ease={easeInQuad:function(t,e,n,i){return n*(t/=i)*t+e},easeOutQuad:function(t,e,n,i){return-n*(t/=i)*(t-2)+e},easeInOutQuad:function(t,e,n,i){return(t/=i/2)<1?n/2*t*t+e:-n/2*(--t*(t-2)-1)+e},easeInCubic:function(t,e,n,i){return n*(t/=i)*t*t+e},easeOutCubic:function(t,e,n,i){return n*((t=t/i-1)*t*t+1)+e},easeInOutCubic:function(t,e,n,i){return(t/=i/2)<1?n/2*t*t*t+e:n/2*((t-=2)*t*t+2)+e},easeInQuart:function(t,e,n,i){return n*(t/=i)*t*t*t+e},easeOutQuart:function(t,e,n,i){return-n*((t=t/i-1)*t*t*t-1)+e},easeInOutQuart:function(t,e,n,i){return(t/=i/2)<1?n/2*t*t*t*t+e:-n/2*((t-=2)*t*t*t-2)+e},easeInQuint:function(t,e,n,i){return n*(t/=i)*t*t*t*t+e},easeOutQuint:function(t,e,n,i){return n*((t=t/i-1)*t*t*t*t+1)+e},easeInOutQuint:function(t,e,n,i){return(t/=i/2)<1?n/2*t*t*t*t*t+e:n/2*((t-=2)*t*t*t*t+2)+e},easeInSine:function(t,e,n,i){return-n*Math.cos(t/i*(Math.PI/2))+n+e},easeOutSine:function(t,e,n,i){return n*Math.sin(t/i*(Math.PI/2))+e},easeInOutSine:function(t,e,n,i){return-n/2*(Math.cos(Math.PI*t/i)-1)+e},easeInExpo:function(t,e,n,i){return 0===t?e:n*Math.pow(2,10*(t/i-1))+e},easeOutExpo:function(t,e,n,i){return t===i?e+n:n*(1-Math.pow(2,-10*t/i))+e},easeInOutExpo:function(t,e,n,i){return 0===t?e:t===i?e+n:(t/=i/2)<1?n/2*Math.pow(2,10*(t-1))+e:n/2*(2-Math.pow(2,-10*--t))+e},easeInCirc:function(t,e,n,i){return-n*(Math.sqrt(1-(t/=i)*t)-1)+e},easeOutCirc:function(t,e,n,i){return n*Math.sqrt(1-(t=t/i-1)*t)+e},easeInOutCirc:function(t,e,n,i){return(t/=i/2)<1?-n/2*(Math.sqrt(1-t*t)-1)+e:n/2*(Math.sqrt(1-(t-=2)*t)+1)+e},easeInElastic:function(n,i,r,o){var s=0;return 0===n?i:1==(n/=o)?i+r:(s||(s=.3*o),-e(t(r,r,s,1.70158),n,o)+i)},easeOutElastic:function(e,n,i,r){var o=0,s=i;if(0===e)return n;if(1==(e/=r))return n+i;o||(o=.3*r);var a=t(s,i,o,1.70158);return a.a*Math.pow(2,-10*e)*Math.sin((e*r-a.s)*(2*Math.PI)/a.p)+a.c+n},easeInOutElastic:function(n,i,r,o){var s=0,a=r;if(0===n)return i;if(2==(n/=o/2))return i+r;s||(s=o*(.3*1.5));var l=t(a,r,s,1.70158);return n<1?-.5*e(l,n,o)+i:l.a*Math.pow(2,-10*(n-=1))*Math.sin((n*o-l.s)*(2*Math.PI)/l.p)*.5+l.c+i},easeInBack:function(t,e,n,i,r){return void 0===r&&(r=1.70158),n*(t/=i)*t*((r+1)*t-r)+e},easeOutBack:function(t,e,n,i,r){return void 0===r&&(r=1.70158),n*((t=t/i-1)*t*((r+1)*t+r)+1)+e},easeInOutBack:function(t,e,n,i,r){return void 0===r&&(r=1.70158),(t/=i/2)<1?n/2*(t*t*((1+(r*=1.525))*t-r))+e:n/2*((t-=2)*t*((1+(r*=1.525))*t+r)+2)+e},easeInBounce:n,easeOutBounce:i,easeInOutBounce:function(t,e,r,o){return t<o/2?.5*n(2*t,0,r,o)+e:.5*i(2*t-o,0,r,o)+.5*r+e}}}(),function(t){"use strict";var n=e.fabric||(e.fabric={}),i=n.util.object.extend,r=n.util.object.clone,o=n.util.toFixed,s=n.util.parseUnit,a=n.util.multiplyTransformMatrices,l={cx:"left",x:"left",r:"radius",cy:"top",y:"top",display:"visible",visibility:"visible",transform:"transformMatrix","fill-opacity":"fillOpacity","fill-rule":"fillRule","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","letter-spacing":"charSpacing","paint-order":"paintFirst","stroke-dasharray":"strokeDashArray","stroke-linecap":"strokeLineCap","stroke-linejoin":"strokeLineJoin","stroke-miterlimit":"strokeMiterLimit","stroke-opacity":"strokeOpacity","stroke-width":"strokeWidth","text-decoration":"textDecoration","text-anchor":"textAnchor",opacity:"opacity","clip-path":"clipPath","clip-rule":"clipRule"},u={stroke:"strokeOpacity",fill:"fillOpacity"};function c(t){return t in l?l[t]:t}function h(t,e,i,r){var o,l="[object Array]"===Object.prototype.toString.call(e);if("fill"!==t&&"stroke"!==t||"none"!==e)if("strokeDashArray"===t)e="none"===e?null:e.replace(/,/g," ").split(/\s+/).map(function(t){return parseFloat(t)});else if("transformMatrix"===t)e=i&&i.transformMatrix?a(i.transformMatrix,n.parseTransformAttribute(e)):n.parseTransformAttribute(e);else if("visible"===t)e="none"!==e&&"hidden"!==e,i&&!1===i.visible&&(e=!1);else if("opacity"===t)e=parseFloat(e),i&&void 0!==i.opacity&&(e*=i.opacity);else if("textAnchor"===t)e="start"===e?"left":"end"===e?"right":"center";else if("charSpacing"===t)o=s(e,r)/r*1e3;else if("paintFirst"===t){var u=e.indexOf("fill"),c=e.indexOf("stroke");e="fill",u>-1&&c>-1&&c<u?e="stroke":-1===u&&c>-1&&(e="stroke")}else o=l?e.map(s):s(e,r);else e="";return!l&&isNaN(o)?e:o}function p(t){return new RegExp("^("+t.join("|")+")\\b","i")}function d(t,e){var n,i,r,o=[];for(i=0,r=e.length;i<r;i++)n=t.getElementsByTagName(e[i]),o=o.concat(Array.prototype.slice.call(n));return o}function f(t,e){var n,i=!0;return(n=g(t,e.pop()))&&e.length&&(i=function(t,e){for(var n,i=!0;t.parentNode&&1===t.parentNode.nodeType&&e.length;)i&&(n=e.pop()),i=g(t=t.parentNode,n);return 0===e.length}(t,e)),n&&i&&0===e.length}function g(t,e){var n,i,r=t.nodeName,o=t.getAttribute("class"),s=t.getAttribute("id");if(n=new RegExp("^"+r,"i"),e=e.replace(n,""),s&&e.length&&(n=new RegExp("#"+s+"(?![a-zA-Z\\-]+)","i"),e=e.replace(n,"")),o&&e.length)for(i=(o=o.split(" ")).length;i--;)n=new RegExp("\\."+o[i]+"(?![a-zA-Z\\-]+)","i"),e=e.replace(n,"");return 0===e.length}function m(t,e){var n;if(t.getElementById&&(n=t.getElementById(e)),n)return n;var i,r,o,s=t.getElementsByTagName("*");for(r=0,o=s.length;r<o;r++)if(e===(i=s[r]).getAttribute("id"))return i}n.svgValidTagNamesRegEx=p(["path","circle","polygon","polyline","ellipse","rect","line","image","text"]),n.svgViewBoxElementsRegEx=p(["symbol","image","marker","pattern","view","svg"]),n.svgInvalidAncestorsRegEx=p(["pattern","defs","symbol","metadata","clipPath","mask","desc"]),n.svgValidParentsRegEx=p(["symbol","g","a","svg","clipPath","defs"]),n.cssRules={},n.gradientDefs={},n.clipPaths={},n.parseTransformAttribute=function(){function t(t,e,i){t[i]=Math.tan(n.util.degreesToRadians(e[0]))}var e=[1,0,0,1,0,0],i=n.reNum,r="(?:\\s+,?\\s*|,\\s*)",o="(?:(?:(matrix)\\s*\\(\\s*("+i+")"+r+"("+i+")"+r+"("+i+")"+r+"("+i+")"+r+"("+i+")"+r+"("+i+")\\s*\\))|(?:(translate)\\s*\\(\\s*("+i+")(?:"+r+"("+i+"))?\\s*\\))|(?:(scale)\\s*\\(\\s*("+i+")(?:"+r+"("+i+"))?\\s*\\))|(?:(rotate)\\s*\\(\\s*("+i+")(?:"+r+"("+i+")"+r+"("+i+"))?\\s*\\))|(?:(skewX)\\s*\\(\\s*("+i+")\\s*\\))|(?:(skewY)\\s*\\(\\s*("+i+")\\s*\\)))",s=new RegExp("^\\s*(?:(?:"+o+"(?:"+r+"*"+o+")*)?)\\s*$"),a=new RegExp(o,"g");return function(i){var r=e.concat(),l=[];if(!i||i&&!s.test(i))return r;i.replace(a,function(i){var s=new RegExp(o).exec(i).filter(function(t){return!!t}),a=s[1],u=s.slice(2).map(parseFloat);switch(a){case"translate":!function(t,e){t[4]=e[0],2===e.length&&(t[5]=e[1])}(r,u);break;case"rotate":u[0]=n.util.degreesToRadians(u[0]),function(t,e){var i=n.util.cos(e[0]),r=n.util.sin(e[0]),o=0,s=0;3===e.length&&(o=e[1],s=e[2]),t[0]=i,t[1]=r,t[2]=-r,t[3]=i,t[4]=o-(i*o-r*s),t[5]=s-(r*o+i*s)}(r,u);break;case"scale":!function(t,e){var n=2===e.length?e[1]:e[0];t[0]=e[0],t[3]=n}(r,u);break;case"skewX":t(r,u,2);break;case"skewY":t(r,u,1);break;case"matrix":r=u}l.push(r.concat()),r=e.concat()});for(var u=l[0];l.length>1;)l.shift(),u=n.util.multiplyTransformMatrices(u,l[0]);return u}}();var v=new RegExp("^\\s*("+n.reNum+"+)\\s*,?\\s*("+n.reNum+"+)\\s*,?\\s*("+n.reNum+"+)\\s*,?\\s*("+n.reNum+"+)\\s*$");function y(t){var e,i,r,o,a,l,u=t.getAttribute("viewBox"),c=1,h=1,p=t.getAttribute("width"),d=t.getAttribute("height"),f=t.getAttribute("x")||0,g=t.getAttribute("y")||0,m=t.getAttribute("preserveAspectRatio")||"",y=!u||!n.svgViewBoxElementsRegEx.test(t.nodeName)||!(u=u.match(v)),b=!p||!d||"100%"===p||"100%"===d,_=y&&b,w={},x="",C=0,S=0;if(w.width=0,w.height=0,w.toBeParsed=_,_)return w;if(y)return w.width=s(p),w.height=s(d),w;if(e=-parseFloat(u[1]),i=-parseFloat(u[2]),r=parseFloat(u[3]),o=parseFloat(u[4]),b?(w.width=r,w.height=o):(w.width=s(p),w.height=s(d),c=w.width/r,h=w.height/o),"none"!==(m=n.util.parsePreserveAspectRatioAttribute(m)).alignX&&("meet"===m.meetOrSlice&&(h=c=c>h?h:c),"slice"===m.meetOrSlice&&(h=c=c>h?c:h),C=w.width-r*c,S=w.height-o*c,"Mid"===m.alignX&&(C/=2),"Mid"===m.alignY&&(S/=2),"Min"===m.alignX&&(C=0),"Min"===m.alignY&&(S=0)),1===c&&1===h&&0===e&&0===i&&0===f&&0===g)return w;if((f||g)&&(x=" translate("+s(f)+" "+s(g)+") "),w.viewboxTransform=n.parseTransformAttribute(a=x+" matrix("+c+" 0 0 "+h+" "+(e*c+C)+" "+(i*h+S)+") "),"svg"===t.nodeName){for(l=t.ownerDocument.createElement("g");t.firstChild;)l.appendChild(t.firstChild);t.appendChild(l)}else a=(l=t).getAttribute("transform")+a;return l.setAttribute("transform",a),w}n.parseSVGDocument=function(t,e,i,o){if(t){!function(t){for(var e=d(t,["use","svg:use"]),n=0;e.length&&n<e.length;){var i,r,o,s,a=e[n],l=(a.getAttribute("xlink:href")||a.getAttribute("href")).substr(1),u=a.getAttribute("x")||0,c=a.getAttribute("y")||0,h=m(t,l).cloneNode(!0),p=(h.getAttribute("transform")||"")+" translate("+u+", "+c+")",f=e.length;if(y(h),/^svg$/i.test(h.nodeName)){var g=h.ownerDocument.createElement("g");for(r=0,s=(o=h.attributes).length;r<s;r++)i=o.item(r),g.setAttribute(i.nodeName,i.nodeValue);for(;h.firstChild;)g.appendChild(h.firstChild);h=g}for(r=0,s=(o=a.attributes).length;r<s;r++)"x"!==(i=o.item(r)).nodeName&&"y"!==i.nodeName&&"xlink:href"!==i.nodeName&&"href"!==i.nodeName&&("transform"===i.nodeName?p=i.nodeValue+" "+p:h.setAttribute(i.nodeName,i.nodeValue));h.setAttribute("transform",p),h.setAttribute("instantiated_by_use","1"),h.removeAttribute("id"),a.parentNode.replaceChild(h,a),e.length===f&&n++}}(t);var s,a,l=n.Object.__uid++,u=y(t),c=n.util.toArray(t.getElementsByTagName("*"));if(u.crossOrigin=o&&o.crossOrigin,u.svgUid=l,0===c.length&&n.isLikelyNode){var h=[];for(s=0,a=(c=t.selectNodes('//*[name(.)!="svg"]')).length;s<a;s++)h[s]=c[s];c=h}var p=c.filter(function(t){return y(t),n.svgValidTagNamesRegEx.test(t.nodeName.replace("svg:",""))&&!function(t,e){for(;t&&(t=t.parentNode);)if(t.nodeName&&e.test(t.nodeName.replace("svg:",""))&&!t.getAttribute("instantiated_by_use"))return!0;return!1}(t,n.svgInvalidAncestorsRegEx)});if(!p||p&&!p.length)e&&e([],{});else{var f={};c.filter(function(t){return"clipPath"===t.nodeName.replace("svg:","")}).forEach(function(t){f[t.id]=n.util.toArray(t.getElementsByTagName("*")).filter(function(t){return n.svgValidTagNamesRegEx.test(t.nodeName.replace("svg:",""))})}),n.gradientDefs[l]=n.getGradientDefs(t),n.cssRules[l]=n.getCSSRules(t),n.clipPaths[l]=f,n.parseElements(p,function(t,i){e&&(e(t,u,i,c),delete n.gradientDefs[l],delete n.cssRules[l],delete n.clipPaths[l])},r(u),i,o)}}};var b=new RegExp("(normal|italic)?\\s*(normal|small-caps)?\\s*(normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900)?\\s*("+n.reNum+"(?:px|cm|mm|em|pt|pc|in)*)(?:\\/(normal|"+n.reNum+"))?\\s+(.*)");i(n,{parseFontDeclaration:function(t,e){var n=t.match(b);if(n){var i=n[1],r=n[3],o=n[4],a=n[5],l=n[6];i&&(e.fontStyle=i),r&&(e.fontWeight=isNaN(parseFloat(r))?r:parseFloat(r)),o&&(e.fontSize=s(o)),l&&(e.fontFamily=l),a&&(e.lineHeight="normal"===a?1:a)}},getGradientDefs:function(t){var e,n,i,r=d(t,["linearGradient","radialGradient","svg:linearGradient","svg:radialGradient"]),o=0,s={},a={};for(o=r.length;o--;)i=(e=r[o]).getAttribute("xlink:href"),n=e.getAttribute("id"),i&&(a[n]=i.substr(1)),s[n]=e;for(n in a){var l=s[a[n]].cloneNode(!0);for(e=s[n];l.firstChild;)e.appendChild(l.firstChild)}return s},parseAttributes:function(t,e,r){if(t){var s,a,l={};void 0===r&&(r=t.getAttribute("svgUid")),t.parentNode&&n.svgValidParentsRegEx.test(t.parentNode.nodeName)&&(l=n.parseAttributes(t.parentNode,e,r)),a=l&&l.fontSize||t.getAttribute("font-size")||n.Text.DEFAULT_SVG_FONT_SIZE;var p=e.reduce(function(e,n){return(s=t.getAttribute(n))&&(e[n]=s),e},{});p=i(p,i(function(t,e){var i={};for(var r in n.cssRules[e])if(f(t,r.split(" ")))for(var o in n.cssRules[e][r])i[o]=n.cssRules[e][r][o];return i}(t,r),n.parseStyleAttribute(t)));var d,g,m={};for(var v in p)g=h(d=c(v),p[v],l,a),m[d]=g;m&&m.font&&n.parseFontDeclaration(m.font,m);var y=i(l,m);return n.svgValidParentsRegEx.test(t.nodeName)?y:function(t){for(var e in u)if(void 0!==t[u[e]]&&""!==t[e]){if(void 0===t[e]){if(!n.Object.prototype[e])continue;t[e]=n.Object.prototype[e]}if(0!==t[e].indexOf("url(")){var i=new n.Color(t[e]);t[e]=i.setAlpha(o(i.getAlpha()*t[u[e]],2)).toRgba()}}return t}(y)}},parseElements:function(t,e,i,r,o){new n.ElementsParser(t,e,i,r,o).parse()},parseStyleAttribute:function(t){var e={},n=t.getAttribute("style");return n?("string"==typeof n?function(t,e){var n,i;t.replace(/;\s*$/,"").split(";").forEach(function(t){var r=t.split(":");n=r[0].trim().toLowerCase(),i=r[1].trim(),e[n]=i})}(n,e):function(t,e){for(var n in t)void 0!==t[n]&&(e[n.toLowerCase()]=t[n])}(n,e),e):e},parsePointsAttribute:function(t){if(!t)return null;var e,n,i=[];for(e=0,n=(t=(t=t.replace(/,/g," ").trim()).split(/\s+/)).length;e<n;e+=2)i.push({x:parseFloat(t[e]),y:parseFloat(t[e+1])});return i},getCSSRules:function(t){var e,i,r=t.getElementsByTagName("style"),o={};for(e=0,i=r.length;e<i;e++){var s=r[e].textContent||r[e].text;""!==(s=s.replace(/\/\*[\s\S]*?\*\//g,"")).trim()&&s.match(/[^{]*\{[\s\S]*?\}/g).map(function(t){return t.trim()}).forEach(function(t){var r=t.match(/([\s\S]*?)\s*\{([^}]*)\}/),s={},a=r[2].trim().replace(/;$/,"").split(/\s*;\s*/);for(e=0,i=a.length;e<i;e++){var l=a[e].split(/\s*:\s*/);s[l[0]]=l[1]}(t=r[1]).split(",").forEach(function(t){""!==(t=t.replace(/^svg/i,"").trim())&&(o[t]?n.util.object.extend(o[t],s):o[t]=n.util.object.clone(s))})})}return o},loadSVGFromURL:function(t,e,i,r){t=t.replace(/^\n\s*/,"").trim(),new n.util.request(t,{method:"get",onComplete:function(t){var o=t.responseXML;o&&!o.documentElement&&n.window.ActiveXObject&&t.responseText&&((o=new ActiveXObject("Microsoft.XMLDOM")).async="false",o.loadXML(t.responseText.replace(/<!DOCTYPE[\s\S]*?(\[[\s\S]*\])*?>/i,""))),o&&o.documentElement||e&&e(null),n.parseSVGDocument(o.documentElement,function(t,n,i,r){e&&e(t,n,i,r)},i,r)}})},loadSVGFromString:function(t,e,i,r){var o;if(t=t.trim(),"undefined"!=typeof DOMParser){var s=new DOMParser;s&&s.parseFromString&&(o=s.parseFromString(t,"text/xml"))}else n.window.ActiveXObject&&((o=new ActiveXObject("Microsoft.XMLDOM")).async="false",o.loadXML(t.replace(/<!DOCTYPE[\s\S]*?(\[[\s\S]*\])*?>/i,"")));n.parseSVGDocument(o.documentElement,function(t,n,i,r){e(t,n,i,r)},i,r)}})}(),S.ElementsParser=function(t,e,n,i,r){this.elements=t,this.callback=e,this.options=n,this.reviver=i,this.svgUid=n&&n.svgUid||0,this.parsingOptions=r,this.regexUrl=/^url\(['"]?#([^'"]+)['"]?\)/g},(c=S.ElementsParser.prototype).parse=function(){this.instances=new Array(this.elements.length),this.numElements=this.elements.length,this.createObjects()},c.createObjects=function(){var t=this;this.elements.forEach(function(e,n){e.setAttribute("svgUid",t.svgUid),t.createObject(e,n)})},c.findTag=function(t){return S[S.util.string.capitalize(t.tagName.replace("svg:",""))]},c.createObject=function(t,e){var n=this.findTag(t);if(n&&n.fromElement)try{n.fromElement(t,this.createCallback(e,t),this.options)}catch(t){S.log(t)}else this.checkIfDone()},c.createCallback=function(t,e){var n=this;return function(i){var r;n.resolveGradient(i,"fill"),n.resolveGradient(i,"stroke"),i instanceof S.Image&&(r=i.parsePreserveAspectRatioAttribute(e)),i._removeTransformMatrix(r),n.resolveClipPath(i),n.reviver&&n.reviver(e,i),n.instances[t]=i,n.checkIfDone()}},c.extractPropertyDefinition=function(t,e,n){var i=t[e];if(/^url\(/.test(i)){var r=this.regexUrl.exec(i)[1];return this.regexUrl.lastIndex=0,S[n][this.svgUid][r]}},c.resolveGradient=function(t,e){var n=this.extractPropertyDefinition(t,e,"gradientDefs");n&&t.set(e,S.Gradient.fromElement(n,t))},c.createClipPathCallback=function(t,e){return function(t){t._removeTransformMatrix(),t.fillRule=t.clipRule,e.push(t)}},c.resolveClipPath=function(t){var e,n,i,r,o=this.extractPropertyDefinition(t,"clipPath","clipPaths");if(o){i=[],n=S.util.invertTransform(t.calcTransformMatrix());for(var s=0;s<o.length;s++)this.findTag(e=o[s]).fromElement(e,this.createClipPathCallback(t,i),this.options);o=1===i.length?i[0]:new S.Group(i),r=S.util.multiplyTransformMatrices(n,o.calcTransformMatrix());var a=S.util.qrDecompose(r);o.flipX=!1,o.flipY=!1,o.set("scaleX",a.scaleX),o.set("scaleY",a.scaleY),o.angle=a.angle,o.skewX=a.skewX,o.skewY=0,o.setPositionByOrigin({x:a.translateX,y:a.translateY},"center","center"),t.clipPath=o}},c.checkIfDone=function(){0==--this.numElements&&(this.instances=this.instances.filter(function(t){return null!=t}),this.callback(this.instances,this.elements))},function(t){"use strict";var n=e.fabric||(e.fabric={});function i(t,e){this.x=t,this.y=e}n.Point?n.warn("fabric.Point is already defined"):(n.Point=i,i.prototype={type:"point",constructor:i,add:function(t){return new i(this.x+t.x,this.y+t.y)},addEquals:function(t){return this.x+=t.x,this.y+=t.y,this},scalarAdd:function(t){return new i(this.x+t,this.y+t)},scalarAddEquals:function(t){return this.x+=t,this.y+=t,this},subtract:function(t){return new i(this.x-t.x,this.y-t.y)},subtractEquals:function(t){return this.x-=t.x,this.y-=t.y,this},scalarSubtract:function(t){return new i(this.x-t,this.y-t)},scalarSubtractEquals:function(t){return this.x-=t,this.y-=t,this},multiply:function(t){return new i(this.x*t,this.y*t)},multiplyEquals:function(t){return this.x*=t,this.y*=t,this},divide:function(t){return new i(this.x/t,this.y/t)},divideEquals:function(t){return this.x/=t,this.y/=t,this},eq:function(t){return this.x===t.x&&this.y===t.y},lt:function(t){return this.x<t.x&&this.y<t.y},lte:function(t){return this.x<=t.x&&this.y<=t.y},gt:function(t){return this.x>t.x&&this.y>t.y},gte:function(t){return this.x>=t.x&&this.y>=t.y},lerp:function(t,e){return void 0===e&&(e=.5),e=Math.max(Math.min(1,e),0),new i(this.x+(t.x-this.x)*e,this.y+(t.y-this.y)*e)},distanceFrom:function(t){var e=this.x-t.x,n=this.y-t.y;return Math.sqrt(e*e+n*n)},midPointFrom:function(t){return this.lerp(t)},min:function(t){return new i(Math.min(this.x,t.x),Math.min(this.y,t.y))},max:function(t){return new i(Math.max(this.x,t.x),Math.max(this.y,t.y))},toString:function(){return this.x+","+this.y},setXY:function(t,e){return this.x=t,this.y=e,this},setX:function(t){return this.x=t,this},setY:function(t){return this.y=t,this},setFromPoint:function(t){return this.x=t.x,this.y=t.y,this},swap:function(t){var e=this.x,n=this.y;this.x=t.x,this.y=t.y,t.x=e,t.y=n},clone:function(){return new i(this.x,this.y)}})}(),function(t){"use strict";var n=e.fabric||(e.fabric={});function i(t){this.status=t,this.points=[]}n.Intersection?n.warn("fabric.Intersection is already defined"):(n.Intersection=i,n.Intersection.prototype={constructor:i,appendPoint:function(t){return this.points.push(t),this},appendPoints:function(t){return this.points=this.points.concat(t),this}},n.Intersection.intersectLineLine=function(t,e,r,o){var s,a=(o.x-r.x)*(t.y-r.y)-(o.y-r.y)*(t.x-r.x),l=(e.x-t.x)*(t.y-r.y)-(e.y-t.y)*(t.x-r.x),u=(o.y-r.y)*(e.x-t.x)-(o.x-r.x)*(e.y-t.y);if(0!==u){var c=a/u,h=l/u;0<=c&&c<=1&&0<=h&&h<=1?(s=new i("Intersection")).appendPoint(new n.Point(t.x+c*(e.x-t.x),t.y+c*(e.y-t.y))):s=new i}else s=new i(0===a||0===l?"Coincident":"Parallel");return s},n.Intersection.intersectLinePolygon=function(t,e,n){var r,o,s=new i,a=n.length;for(o=0;o<a;o++)r=i.intersectLineLine(t,e,n[o],n[(o+1)%a]),s.appendPoints(r.points);return s.points.length>0&&(s.status="Intersection"),s},n.Intersection.intersectPolygonPolygon=function(t,e){var n,r=new i,o=t.length;for(n=0;n<o;n++){var s=i.intersectLinePolygon(t[n],t[(n+1)%o],e);r.appendPoints(s.points)}return r.points.length>0&&(r.status="Intersection"),r},n.Intersection.intersectPolygonRectangle=function(t,e,r){var o=e.min(r),s=e.max(r),a=new n.Point(s.x,o.y),l=new n.Point(o.x,s.y),u=i.intersectLinePolygon(o,a,t),c=i.intersectLinePolygon(a,s,t),h=i.intersectLinePolygon(s,l,t),p=i.intersectLinePolygon(l,o,t),d=new i;return d.appendPoints(u.points),d.appendPoints(c.points),d.appendPoints(h.points),d.appendPoints(p.points),d.points.length>0&&(d.status="Intersection"),d})}(),function(t){"use strict";var n=e.fabric||(e.fabric={});function i(t){t?this._tryParsingColor(t):this.setSource([0,0,0,1])}function r(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}n.Color?n.warn("fabric.Color is already defined."):(n.Color=i,n.Color.prototype={_tryParsingColor:function(t){var e;t in i.colorNameMap&&(t=i.colorNameMap[t]),"transparent"===t&&(e=[255,255,255,0]),e||(e=i.sourceFromHex(t)),e||(e=i.sourceFromRgb(t)),e||(e=i.sourceFromHsl(t)),e||(e=[0,0,0,1]),e&&this.setSource(e)},_rgbToHsl:function(t,e,i){var r,o,s,a=n.util.array.max([t/=255,e/=255,i/=255]),l=n.util.array.min([t,e,i]);if(s=(a+l)/2,a===l)r=o=0;else{var u=a-l;switch(o=s>.5?u/(2-a-l):u/(a+l),a){case t:r=(e-i)/u+(e<i?6:0);break;case e:r=(i-t)/u+2;break;case i:r=(t-e)/u+4}r/=6}return[Math.round(360*r),Math.round(100*o),Math.round(100*s)]},getSource:function(){return this._source},setSource:function(t){this._source=t},toRgb:function(){var t=this.getSource();return"rgb("+t[0]+","+t[1]+","+t[2]+")"},toRgba:function(){var t=this.getSource();return"rgba("+t[0]+","+t[1]+","+t[2]+","+t[3]+")"},toHsl:function(){var t=this.getSource(),e=this._rgbToHsl(t[0],t[1],t[2]);return"hsl("+e[0]+","+e[1]+"%,"+e[2]+"%)"},toHsla:function(){var t=this.getSource(),e=this._rgbToHsl(t[0],t[1],t[2]);return"hsla("+e[0]+","+e[1]+"%,"+e[2]+"%,"+t[3]+")"},toHex:function(){var t,e,n,i=this.getSource();return t=1===(t=i[0].toString(16)).length?"0"+t:t,e=1===(e=i[1].toString(16)).length?"0"+e:e,n=1===(n=i[2].toString(16)).length?"0"+n:n,t.toUpperCase()+e.toUpperCase()+n.toUpperCase()},toHexa:function(){var t,e=this.getSource();return t=1===(t=(t=Math.round(255*e[3])).toString(16)).length?"0"+t:t,this.toHex()+t.toUpperCase()},getAlpha:function(){return this.getSource()[3]},setAlpha:function(t){var e=this.getSource();return e[3]=t,this.setSource(e),this},toGrayscale:function(){var t=this.getSource(),e=parseInt((.3*t[0]+.59*t[1]+.11*t[2]).toFixed(0),10);return this.setSource([e,e,e,t[3]]),this},toBlackWhite:function(t){var e=this.getSource(),n=(.3*e[0]+.59*e[1]+.11*e[2]).toFixed(0),i=e[3];return t=t||127,n=Number(n)<Number(t)?0:255,this.setSource([n,n,n,i]),this},overlayWith:function(t){t instanceof i||(t=new i(t));var e,n=[],r=this.getAlpha(),o=this.getSource(),s=t.getSource();for(e=0;e<3;e++)n.push(Math.round(.5*o[e]+.5*s[e]));return n[3]=r,this.setSource(n),this}},n.Color.reRGBa=/^rgba?\(\s*(\d{1,3}(?:\.\d+)?\%?)\s*,\s*(\d{1,3}(?:\.\d+)?\%?)\s*,\s*(\d{1,3}(?:\.\d+)?\%?)\s*(?:\s*,\s*((?:\d*\.?\d+)?)\s*)?\)$/i,n.Color.reHSLa=/^hsla?\(\s*(\d{1,3})\s*,\s*(\d{1,3}\%)\s*,\s*(\d{1,3}\%)\s*(?:\s*,\s*(\d+(?:\.\d+)?)\s*)?\)$/i,n.Color.reHex=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,n.Color.colorNameMap={aliceblue:"#F0F8FF",antiquewhite:"#FAEBD7",aqua:"#00FFFF",aquamarine:"#7FFFD4",azure:"#F0FFFF",beige:"#F5F5DC",bisque:"#FFE4C4",black:"#000000",blanchedalmond:"#FFEBCD",blue:"#0000FF",blueviolet:"#8A2BE2",brown:"#A52A2A",burlywood:"#DEB887",cadetblue:"#5F9EA0",chartreuse:"#7FFF00",chocolate:"#D2691E",coral:"#FF7F50",cornflowerblue:"#6495ED",cornsilk:"#FFF8DC",crimson:"#DC143C",cyan:"#00FFFF",darkblue:"#00008B",darkcyan:"#008B8B",darkgoldenrod:"#B8860B",darkgray:"#A9A9A9",darkgrey:"#A9A9A9",darkgreen:"#006400",darkkhaki:"#BDB76B",darkmagenta:"#8B008B",darkolivegreen:"#556B2F",darkorange:"#FF8C00",darkorchid:"#9932CC",darkred:"#8B0000",darksalmon:"#E9967A",darkseagreen:"#8FBC8F",darkslateblue:"#483D8B",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",darkturquoise:"#00CED1",darkviolet:"#9400D3",deeppink:"#FF1493",deepskyblue:"#00BFFF",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1E90FF",firebrick:"#B22222",floralwhite:"#FFFAF0",forestgreen:"#228B22",fuchsia:"#FF00FF",gainsboro:"#DCDCDC",ghostwhite:"#F8F8FF",gold:"#FFD700",goldenrod:"#DAA520",gray:"#808080",grey:"#808080",green:"#008000",greenyellow:"#ADFF2F",honeydew:"#F0FFF0",hotpink:"#FF69B4",indianred:"#CD5C5C",indigo:"#4B0082",ivory:"#FFFFF0",khaki:"#F0E68C",lavender:"#E6E6FA",lavenderblush:"#FFF0F5",lawngreen:"#7CFC00",lemonchiffon:"#FFFACD",lightblue:"#ADD8E6",lightcoral:"#F08080",lightcyan:"#E0FFFF",lightgoldenrodyellow:"#FAFAD2",lightgray:"#D3D3D3",lightgrey:"#D3D3D3",lightgreen:"#90EE90",lightpink:"#FFB6C1",lightsalmon:"#FFA07A",lightseagreen:"#20B2AA",lightskyblue:"#87CEFA",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#B0C4DE",lightyellow:"#FFFFE0",lime:"#00FF00",limegreen:"#32CD32",linen:"#FAF0E6",magenta:"#FF00FF",maroon:"#800000",mediumaquamarine:"#66CDAA",mediumblue:"#0000CD",mediumorchid:"#BA55D3",mediumpurple:"#9370DB",mediumseagreen:"#3CB371",mediumslateblue:"#7B68EE",mediumspringgreen:"#00FA9A",mediumturquoise:"#48D1CC",mediumvioletred:"#C71585",midnightblue:"#191970",mintcream:"#F5FFFA",mistyrose:"#FFE4E1",moccasin:"#FFE4B5",navajowhite:"#FFDEAD",navy:"#000080",oldlace:"#FDF5E6",olive:"#808000",olivedrab:"#6B8E23",orange:"#FFA500",orangered:"#FF4500",orchid:"#DA70D6",palegoldenrod:"#EEE8AA",palegreen:"#98FB98",paleturquoise:"#AFEEEE",palevioletred:"#DB7093",papayawhip:"#FFEFD5",peachpuff:"#FFDAB9",peru:"#CD853F",pink:"#FFC0CB",plum:"#DDA0DD",powderblue:"#B0E0E6",purple:"#800080",rebeccapurple:"#663399",red:"#FF0000",rosybrown:"#BC8F8F",royalblue:"#4169E1",saddlebrown:"#8B4513",salmon:"#FA8072",sandybrown:"#F4A460",seagreen:"#2E8B57",seashell:"#FFF5EE",sienna:"#A0522D",silver:"#C0C0C0",skyblue:"#87CEEB",slateblue:"#6A5ACD",slategray:"#708090",slategrey:"#708090",snow:"#FFFAFA",springgreen:"#00FF7F",steelblue:"#4682B4",tan:"#D2B48C",teal:"#008080",thistle:"#D8BFD8",tomato:"#FF6347",turquoise:"#40E0D0",violet:"#EE82EE",wheat:"#F5DEB3",white:"#FFFFFF",whitesmoke:"#F5F5F5",yellow:"#FFFF00",yellowgreen:"#9ACD32"},n.Color.fromRgb=function(t){return i.fromSource(i.sourceFromRgb(t))},n.Color.sourceFromRgb=function(t){var e=t.match(i.reRGBa);if(e){var n=parseInt(e[1],10)/(/%$/.test(e[1])?100:1)*(/%$/.test(e[1])?255:1),r=parseInt(e[2],10)/(/%$/.test(e[2])?100:1)*(/%$/.test(e[2])?255:1),o=parseInt(e[3],10)/(/%$/.test(e[3])?100:1)*(/%$/.test(e[3])?255:1);return[parseInt(n,10),parseInt(r,10),parseInt(o,10),e[4]?parseFloat(e[4]):1]}},n.Color.fromRgba=i.fromRgb,n.Color.fromHsl=function(t){return i.fromSource(i.sourceFromHsl(t))},n.Color.sourceFromHsl=function(t){var e=t.match(i.reHSLa);if(e){var n,o,s,a=(parseFloat(e[1])%360+360)%360/360,l=parseFloat(e[2])/(/%$/.test(e[2])?100:1),u=parseFloat(e[3])/(/%$/.test(e[3])?100:1);if(0===l)n=o=s=u;else{var c=u<=.5?u*(l+1):u+l-u*l,h=2*u-c;n=r(h,c,a+1/3),o=r(h,c,a),s=r(h,c,a-1/3)}return[Math.round(255*n),Math.round(255*o),Math.round(255*s),e[4]?parseFloat(e[4]):1]}},n.Color.fromHsla=i.fromHsl,n.Color.fromHex=function(t){return i.fromSource(i.sourceFromHex(t))},n.Color.sourceFromHex=function(t){if(t.match(i.reHex)){var e=t.slice(t.indexOf("#")+1),n=3===e.length||4===e.length,r=8===e.length||4===e.length,o=n?e.charAt(0)+e.charAt(0):e.substring(0,2),s=n?e.charAt(1)+e.charAt(1):e.substring(2,4),a=n?e.charAt(2)+e.charAt(2):e.substring(4,6),l=r?n?e.charAt(3)+e.charAt(3):e.substring(6,8):"FF";return[parseInt(o,16),parseInt(s,16),parseInt(a,16),parseFloat((parseInt(l,16)/255).toFixed(2))]}},n.Color.fromSource=function(t){var e=new i;return e.setSource(t),e})}(),function(){function t(t){var e,n,i,r,o=t.getAttribute("style"),s=t.getAttribute("offset")||0;if(s=(s=parseFloat(s)/(/%$/.test(s)?100:1))<0?0:s>1?1:s,o){var a=o.split(/\s*;\s*/);for(""===a[a.length-1]&&a.pop(),r=a.length;r--;){var l=a[r].split(/\s*:\s*/),u=l[0].trim(),c=l[1].trim();"stop-color"===u?e=c:"stop-opacity"===u&&(i=c)}}return e||(e=t.getAttribute("stop-color")||"rgb(0,0,0)"),i||(i=t.getAttribute("stop-opacity")),n=(e=new S.Color(e)).getAlpha(),i=isNaN(parseFloat(i))?1:parseFloat(i),i*=n,{offset:s,color:e.toRgb(),opacity:i}}var e=S.util.object.clone;function n(t,e,n){var i,r=0,o=1,s="";for(var a in e)"Infinity"===e[a]?e[a]=1:"-Infinity"===e[a]&&(e[a]=0),i=parseFloat(e[a],10),o="string"==typeof e[a]&&/^(\d+\.\d+)%|(\d+)%$/.test(e[a])?.01:1,"x1"===a||"x2"===a||"r2"===a?(o*="objectBoundingBox"===n?t.width:1,r="objectBoundingBox"===n&&t.left||0):"y1"!==a&&"y2"!==a||(o*="objectBoundingBox"===n?t.height:1,r="objectBoundingBox"===n&&t.top||0),e[a]=i*o+r;if("ellipse"===t.type&&null!==e.r2&&"objectBoundingBox"===n&&t.rx!==t.ry){var l=t.ry/t.rx;s=" scale(1, "+l+")",e.y1&&(e.y1/=l),e.y2&&(e.y2/=l)}return s}S.Gradient=S.util.createClass({offsetX:0,offsetY:0,initialize:function(t){t||(t={});var e={};this.id=S.Object.__uid++,this.type=t.type||"linear",e={x1:t.coords.x1||0,y1:t.coords.y1||0,x2:t.coords.x2||0,y2:t.coords.y2||0},"radial"===this.type&&(e.r1=t.coords.r1||0,e.r2=t.coords.r2||0),this.coords=e,this.colorStops=t.colorStops.slice(),t.gradientTransform&&(this.gradientTransform=t.gradientTransform),this.offsetX=t.offsetX||this.offsetX,this.offsetY=t.offsetY||this.offsetY},addColorStop:function(t){for(var e in t){var n=new S.Color(t[e]);this.colorStops.push({offset:parseFloat(e),color:n.toRgb(),opacity:n.getAlpha()})}return this},toObject:function(t){var e={type:this.type,coords:this.coords,colorStops:this.colorStops,offsetX:this.offsetX,offsetY:this.offsetY,gradientTransform:this.gradientTransform?this.gradientTransform.concat():this.gradientTransform};return S.util.populateWithProperties(this,e,t),e},toSVG:function(t){var n,i,r,o,s=e(this.coords,!0),a=e(this.colorStops,!0),l=s.r1>s.r2,u=t.width/2,c=t.height/2;for(var h in a.sort(function(t,e){return t.offset-e.offset}),"path"===t.type&&(u-=t.pathOffset.x,c-=t.pathOffset.y),s)"x1"===h||"x2"===h?s[h]+=this.offsetX-u:"y1"!==h&&"y2"!==h||(s[h]+=this.offsetY-c);if(o='id="SVGID_'+this.id+'" gradientUnits="userSpaceOnUse"',this.gradientTransform&&(o+=' gradientTransform="matrix('+this.gradientTransform.join(" ")+')" '),"linear"===this.type?r=["<linearGradient ",o,' x1="',s.x1,'" y1="',s.y1,'" x2="',s.x2,'" y2="',s.y2,'">\n']:"radial"===this.type&&(r=["<radialGradient ",o,' cx="',l?s.x1:s.x2,'" cy="',l?s.y1:s.y2,'" r="',l?s.r1:s.r2,'" fx="',l?s.x2:s.x1,'" fy="',l?s.y2:s.y1,'">\n']),"radial"===this.type){if(l)for((a=a.concat()).reverse(),n=0,i=a.length;n<i;n++)a[n].offset=1-a[n].offset;var p=Math.min(s.r1,s.r2);if(p>0){var d=p/Math.max(s.r1,s.r2);for(n=0,i=a.length;n<i;n++)a[n].offset+=d*(1-a[n].offset)}}for(n=0,i=a.length;n<i;n++){var f=a[n];r.push("<stop ",'offset="',100*f.offset+"%",'" style="stop-color:',f.color,void 0!==f.opacity?";stop-opacity: "+f.opacity:";",'"/>\n')}return r.push("linear"===this.type?"</linearGradient>\n":"</radialGradient>\n"),r.join("")},toLive:function(t){var e,n,i,r=S.util.object.clone(this.coords);if(this.type){for("linear"===this.type?e=t.createLinearGradient(r.x1,r.y1,r.x2,r.y2):"radial"===this.type&&(e=t.createRadialGradient(r.x1,r.y1,r.r1,r.x2,r.y2,r.r2)),n=0,i=this.colorStops.length;n<i;n++){var o=this.colorStops[n].color,s=this.colorStops[n].opacity,a=this.colorStops[n].offset;void 0!==s&&(o=new S.Color(o).setAlpha(s).toRgba()),e.addColorStop(a,o)}return e}}}),S.util.object.extend(S.Gradient,{fromElement:function(e,i){var r,o,s,a,l=e.getElementsByTagName("stop"),u=e.getAttribute("gradientUnits")||"objectBoundingBox",c=e.getAttribute("gradientTransform"),h=[];for("linear"==(r="linearGradient"===e.nodeName||"LINEARGRADIENT"===e.nodeName?"linear":"radial")?o=function(t){return{x1:t.getAttribute("x1")||0,y1:t.getAttribute("y1")||0,x2:t.getAttribute("x2")||"100%",y2:t.getAttribute("y2")||0}}(e):"radial"===r&&(o=function(t){return{x1:t.getAttribute("fx")||t.getAttribute("cx")||"50%",y1:t.getAttribute("fy")||t.getAttribute("cy")||"50%",r1:0,x2:t.getAttribute("cx")||"50%",y2:t.getAttribute("cy")||"50%",r2:t.getAttribute("r")||"50%"}}(e)),a=l.length;a--;)h.push(t(l[a]));s=n(i,o,u);var p=new S.Gradient({type:r,coords:o,colorStops:h,offsetX:-i.left,offsetY:-i.top});return(c||""!==s)&&(p.gradientTransform=S.parseTransformAttribute((c||"")+s)),p},forObject:function(t,e){return e||(e={}),n(t,e.coords,"userSpaceOnUse"),new S.Gradient(e)}})}(),function(){"use strict";var t=S.util.toFixed;S.Pattern=S.util.createClass({repeat:"repeat",offsetX:0,offsetY:0,crossOrigin:"",patternTransform:null,initialize:function(t,e){if(t||(t={}),this.id=S.Object.__uid++,this.setOptions(t),!t.source||t.source&&"string"!=typeof t.source)e&&e(this);else if(void 0!==S.util.getFunctionBody(t.source))this.source=new Function(S.util.getFunctionBody(t.source)),e&&e(this);else{var n=this;this.source=S.util.createImage(),S.util.loadImage(t.source,function(t){n.source=t,e&&e(n)},null,this.crossOrigin)}},toObject:function(e){var n,i,r=S.Object.NUM_FRACTION_DIGITS;return"function"==typeof this.source?n=String(this.source):"string"==typeof this.source.src?n=this.source.src:"object"==typeof this.source&&this.source.toDataURL&&(n=this.source.toDataURL()),i={type:"pattern",source:n,repeat:this.repeat,crossOrigin:this.crossOrigin,offsetX:t(this.offsetX,r),offsetY:t(this.offsetY,r),patternTransform:this.patternTransform?this.patternTransform.concat():null},S.util.populateWithProperties(this,i,e),i},toSVG:function(t){var e="function"==typeof this.source?this.source():this.source,n=e.width/t.width,i=e.height/t.height,r=this.offsetX/t.width,o=this.offsetY/t.height,s="";return"repeat-x"!==this.repeat&&"no-repeat"!==this.repeat||(i=1,o&&(i+=Math.abs(o))),"repeat-y"!==this.repeat&&"no-repeat"!==this.repeat||(n=1,r&&(n+=Math.abs(r))),e.src?s=e.src:e.toDataURL&&(s=e.toDataURL()),'<pattern id="SVGID_'+this.id+'" x="'+r+'" y="'+o+'" width="'+n+'" height="'+i+'">\n<image x="0" y="0" width="'+e.width+'" height="'+e.height+'" xlink:href="'+s+'"></image>\n</pattern>\n'},setOptions:function(t){for(var e in t)this[e]=t[e]},toLive:function(t){var e="function"==typeof this.source?this.source():this.source;if(!e)return"";if(void 0!==e.src){if(!e.complete)return"";if(0===e.naturalWidth||0===e.naturalHeight)return""}return t.createPattern(e,this.repeat)}})}(),function(t){"use strict";var n=e.fabric||(e.fabric={}),i=n.util.toFixed;n.Shadow?n.warn("fabric.Shadow is already defined."):(n.Shadow=n.util.createClass({color:"rgb(0,0,0)",blur:0,offsetX:0,offsetY:0,affectStroke:!1,includeDefaultValues:!0,initialize:function(t){for(var e in"string"==typeof t&&(t=this._parseShadow(t)),t)this[e]=t[e];this.id=n.Object.__uid++},_parseShadow:function(t){var e=t.trim(),i=n.Shadow.reOffsetsAndBlur.exec(e)||[];return{color:(e.replace(n.Shadow.reOffsetsAndBlur,"")||"rgb(0,0,0)").trim(),offsetX:parseInt(i[1],10)||0,offsetY:parseInt(i[2],10)||0,blur:parseInt(i[3],10)||0}},toString:function(){return[this.offsetX,this.offsetY,this.blur,this.color].join("px ")},toSVG:function(t){var e=40,r=40,o=n.Object.NUM_FRACTION_DIGITS,s=n.util.rotateVector({x:this.offsetX,y:this.offsetY},n.util.degreesToRadians(-t.angle)),a=new n.Color(this.color);return t.width&&t.height&&(e=100*i((Math.abs(s.x)+this.blur)/t.width,o)+20,r=100*i((Math.abs(s.y)+this.blur)/t.height,o)+20),t.flipX&&(s.x*=-1),t.flipY&&(s.y*=-1),'<filter id="SVGID_'+this.id+'" y="-'+r+'%" height="'+(100+2*r)+'%" x="-'+e+'%" width="'+(100+2*e)+'%" >\n\t<feGaussianBlur in="SourceAlpha" stdDeviation="'+i(this.blur?this.blur/2:0,o)+'"></feGaussianBlur>\n\t<feOffset dx="'+i(s.x,o)+'" dy="'+i(s.y,o)+'" result="oBlur" ></feOffset>\n\t<feFlood flood-color="'+a.toRgb()+'" flood-opacity="'+a.getAlpha()+'"/>\n\t<feComposite in2="oBlur" operator="in" />\n\t<feMerge>\n\t\t<feMergeNode></feMergeNode>\n\t\t<feMergeNode in="SourceGraphic"></feMergeNode>\n\t</feMerge>\n</filter>\n'},toObject:function(){if(this.includeDefaultValues)return{color:this.color,blur:this.blur,offsetX:this.offsetX,offsetY:this.offsetY,affectStroke:this.affectStroke};var t={},e=n.Shadow.prototype;return["color","blur","offsetX","offsetY","affectStroke"].forEach(function(n){this[n]!==e[n]&&(t[n]=this[n])},this),t}}),n.Shadow.reOffsetsAndBlur=/(?:\s|^)(-?\d+(?:px)?(?:\s?|$))?(-?\d+(?:px)?(?:\s?|$))?(\d+(?:px)?)?(?:\s?|$)(?:$|\s)/)}(),function(){"use strict";if(S.StaticCanvas)S.warn("fabric.StaticCanvas is already defined.");else{var t=S.util.object.extend,e=S.util.getElementOffset,n=S.util.removeFromArray,i=S.util.toFixed,r=S.util.transformPoint,o=S.util.invertTransform,s=new Error("Could not initialize `canvas` element");S.StaticCanvas=S.util.createClass(S.CommonMethods,{initialize:function(t,e){e||(e={}),this.renderAndResetBound=this.renderAndReset.bind(this),this.requestRenderAllBound=this.requestRenderAll.bind(this),this._initStatic(t,e)},backgroundColor:"",backgroundImage:null,overlayColor:"",overlayImage:null,includeDefaultValues:!0,stateful:!1,renderOnAddRemove:!0,clipTo:null,controlsAboveOverlay:!1,allowTouchScrolling:!1,imageSmoothingEnabled:!0,viewportTransform:S.iMatrix.concat(),backgroundVpt:!0,overlayVpt:!0,onBeforeScaleRotate:function(){},enableRetinaScaling:!0,vptCoords:{},skipOffscreen:!0,clipPath:void 0,_initStatic:function(t,e){var n=this.requestRenderAllBound;this._objects=[],this._createLowerCanvas(t),this._initOptions(e),this._setImageSmoothing(),this.interactive||this._initRetinaScaling(),e.overlayImage&&this.setOverlayImage(e.overlayImage,n),e.backgroundImage&&this.setBackgroundImage(e.backgroundImage,n),e.backgroundColor&&this.setBackgroundColor(e.backgroundColor,n),e.overlayColor&&this.setOverlayColor(e.overlayColor,n),this.calcOffset()},_isRetinaScaling:function(){return 1!==S.devicePixelRatio&&this.enableRetinaScaling},getRetinaScaling:function(){return this._isRetinaScaling()?S.devicePixelRatio:1},_initRetinaScaling:function(){this._isRetinaScaling()&&(this.lowerCanvasEl.setAttribute("width",this.width*S.devicePixelRatio),this.lowerCanvasEl.setAttribute("height",this.height*S.devicePixelRatio),this.contextContainer.scale(S.devicePixelRatio,S.devicePixelRatio))},calcOffset:function(){return this._offset=e(this.lowerCanvasEl),this},setOverlayImage:function(t,e,n){return this.__setBgOverlayImage("overlayImage",t,e,n)},setBackgroundImage:function(t,e,n){return this.__setBgOverlayImage("backgroundImage",t,e,n)},setOverlayColor:function(t,e){return this.__setBgOverlayColor("overlayColor",t,e)},setBackgroundColor:function(t,e){return this.__setBgOverlayColor("backgroundColor",t,e)},_setImageSmoothing:function(){var t=this.getContext();t.imageSmoothingEnabled=t.imageSmoothingEnabled||t.webkitImageSmoothingEnabled||t.mozImageSmoothingEnabled||t.msImageSmoothingEnabled||t.oImageSmoothingEnabled,t.imageSmoothingEnabled=this.imageSmoothingEnabled},__setBgOverlayImage:function(t,e,n,i){return"string"==typeof e?S.util.loadImage(e,function(e){e&&(this[t]=new S.Image(e,i)),n&&n(e)},this,i&&i.crossOrigin):(i&&e.setOptions(i),this[t]=e,n&&n(e)),this},__setBgOverlayColor:function(t,e,n){return this[t]=e,this._initGradient(e,t),this._initPattern(e,t,n),this},_createCanvasElement:function(){var t=S.util.createCanvasElement();if(!t)throw s;if(t.style||(t.style={}),void 0===t.getContext)throw s;return t},_initOptions:function(t){this._setOptions(t),this.width=this.width||parseInt(this.lowerCanvasEl.width,10)||0,this.height=this.height||parseInt(this.lowerCanvasEl.height,10)||0,this.lowerCanvasEl.style&&(this.lowerCanvasEl.width=this.width,this.lowerCanvasEl.height=this.height,this.lowerCanvasEl.style.width=this.width+"px",this.lowerCanvasEl.style.height=this.height+"px",this.viewportTransform=this.viewportTransform.slice())},_createLowerCanvas:function(t){this.lowerCanvasEl=t&&t.getContext?t:S.util.getById(t)||this._createCanvasElement(),S.util.addClass(this.lowerCanvasEl,"lower-canvas"),this.interactive&&this._applyCanvasStyle(this.lowerCanvasEl),this.contextContainer=this.lowerCanvasEl.getContext("2d")},getWidth:function(){return this.width},getHeight:function(){return this.height},setWidth:function(t,e){return this.setDimensions({width:t},e)},setHeight:function(t,e){return this.setDimensions({height:t},e)},setDimensions:function(t,e){var n;for(var i in e=e||{},t)n=t[i],e.cssOnly||(this._setBackstoreDimension(i,t[i]),n+="px",this.hasLostContext=!0),e.backstoreOnly||this._setCssDimension(i,n);return this._isCurrentlyDrawing&&this.freeDrawingBrush&&this.freeDrawingBrush._setBrushStyles(),this._initRetinaScaling(),this._setImageSmoothing(),this.calcOffset(),e.cssOnly||this.requestRenderAll(),this},_setBackstoreDimension:function(t,e){return this.lowerCanvasEl[t]=e,this.upperCanvasEl&&(this.upperCanvasEl[t]=e),this.cacheCanvasEl&&(this.cacheCanvasEl[t]=e),this[t]=e,this},_setCssDimension:function(t,e){return this.lowerCanvasEl.style[t]=e,this.upperCanvasEl&&(this.upperCanvasEl.style[t]=e),this.wrapperEl&&(this.wrapperEl.style[t]=e),this},getZoom:function(){return this.viewportTransform[0]},setViewportTransform:function(t){var e,n,i,r=this._activeObject;for(this.viewportTransform=t,n=0,i=this._objects.length;n<i;n++)(e=this._objects[n]).group||e.setCoords(!1,!0);return r&&"activeSelection"===r.type&&r.setCoords(!1,!0),this.calcViewportBoundaries(),this.renderOnAddRemove&&this.requestRenderAll(),this},zoomToPoint:function(t,e){var n=t,i=this.viewportTransform.slice(0);t=r(t,o(this.viewportTransform)),i[0]=e,i[3]=e;var s=r(t,i);return i[4]+=n.x-s.x,i[5]+=n.y-s.y,this.setViewportTransform(i)},setZoom:function(t){return this.zoomToPoint(new S.Point(0,0),t),this},absolutePan:function(t){var e=this.viewportTransform.slice(0);return e[4]=-t.x,e[5]=-t.y,this.setViewportTransform(e)},relativePan:function(t){return this.absolutePan(new S.Point(-t.x-this.viewportTransform[4],-t.y-this.viewportTransform[5]))},getElement:function(){return this.lowerCanvasEl},_onObjectAdded:function(t){this.stateful&&t.setupState(),t._set("canvas",this),t.setCoords(),this.fire("object:added",{target:t}),t.fire("added")},_onObjectRemoved:function(t){this.fire("object:removed",{target:t}),t.fire("removed"),delete t.canvas},clearContext:function(t){return t.clearRect(0,0,this.width,this.height),this},getContext:function(){return this.contextContainer},clear:function(){return this._objects.length=0,this.backgroundImage=null,this.overlayImage=null,this.backgroundColor="",this.overlayColor="",this._hasITextHandlers&&(this.off("mouse:up",this._mouseUpITextHandler),this._iTextInstances=null,this._hasITextHandlers=!1),this.clearContext(this.contextContainer),this.fire("canvas:cleared"),this.renderOnAddRemove&&this.requestRenderAll(),this},renderAll:function(){return this.renderCanvas(this.contextContainer,this._objects),this},renderAndReset:function(){this.isRendering=0,this.renderAll()},requestRenderAll:function(){return this.isRendering||(this.isRendering=S.util.requestAnimFrame(this.renderAndResetBound)),this},calcViewportBoundaries:function(){var t={},e=this.width,n=this.height,i=o(this.viewportTransform);return t.tl=r({x:0,y:0},i),t.br=r({x:e,y:n},i),t.tr=new S.Point(t.br.x,t.tl.y),t.bl=new S.Point(t.tl.x,t.br.y),this.vptCoords=t,t},cancelRequestedRender:function(){this.isRendering&&(S.util.cancelAnimFrame(this.isRendering),this.isRendering=0)},renderCanvas:function(t,e){var n=this.viewportTransform,i=this.clipPath;this.cancelRequestedRender(),this.calcViewportBoundaries(),this.clearContext(t),this.fire("before:render",{ctx:t}),this.clipTo&&S.util.clipContext(this,t),this._renderBackground(t),t.save(),t.transform(n[0],n[1],n[2],n[3],n[4],n[5]),this._renderObjects(t,e),t.restore(),!this.controlsAboveOverlay&&this.interactive&&this.drawControls(t),this.clipTo&&t.restore(),i&&(i.isCacheDirty()&&(i.shouldCache(),i.canvas=this,i._transformDone=!0,i.renderCache({forClipping:!0})),this.drawClipPathOnCanvas(t)),this._renderOverlay(t),this.controlsAboveOverlay&&this.interactive&&this.drawControls(t),this.fire("after:render",{ctx:t})},drawClipPathOnCanvas:function(t){var e=this.viewportTransform,n=this.clipPath;t.save(),t.transform(e[0],e[1],e[2],e[3],e[4],e[5]),t.globalCompositeOperation="destination-in",n.transform(t),t.scale(1/n.zoomX,1/n.zoomY),t.drawImage(n._cacheCanvas,-n.cacheTranslationX,-n.cacheTranslationY),t.restore()},_renderObjects:function(t,e){var n,i;for(n=0,i=e.length;n<i;++n)e[n]&&e[n].render(t)},_renderBackgroundOrOverlay:function(t,e){var n,i=this[e+"Color"];i&&(t.fillStyle=i.toLive?i.toLive(t,this):i,t.fillRect(i.offsetX||0,i.offsetY||0,this.width,this.height)),(i=this[e+"Image"])&&(this[e+"Vpt"]&&(n=this.viewportTransform,t.save(),t.transform(n[0],n[1],n[2],n[3],n[4],n[5])),i.render(t),this[e+"Vpt"]&&t.restore())},_renderBackground:function(t){this._renderBackgroundOrOverlay(t,"background")},_renderOverlay:function(t){this._renderBackgroundOrOverlay(t,"overlay")},getCenter:function(){return{top:this.height/2,left:this.width/2}},centerObjectH:function(t){return this._centerObject(t,new S.Point(this.getCenter().left,t.getCenterPoint().y))},centerObjectV:function(t){return this._centerObject(t,new S.Point(t.getCenterPoint().x,this.getCenter().top))},centerObject:function(t){var e=this.getCenter();return this._centerObject(t,new S.Point(e.left,e.top))},viewportCenterObject:function(t){var e=this.getVpCenter();return this._centerObject(t,e)},viewportCenterObjectH:function(t){var e=this.getVpCenter();return this._centerObject(t,new S.Point(e.x,t.getCenterPoint().y)),this},viewportCenterObjectV:function(t){var e=this.getVpCenter();return this._centerObject(t,new S.Point(t.getCenterPoint().x,e.y))},getVpCenter:function(){var t=this.getCenter(),e=o(this.viewportTransform);return r({x:t.left,y:t.top},e)},_centerObject:function(t,e){return t.setPositionByOrigin(e,"center","center"),t.setCoords(),this.renderOnAddRemove&&this.requestRenderAll(),this},toDatalessJSON:function(t){return this.toDatalessObject(t)},toObject:function(t){return this._toObjectMethod("toObject",t)},toDatalessObject:function(t){return this._toObjectMethod("toDatalessObject",t)},_toObjectMethod:function(e,n){var i=this.clipPath,r={version:S.version,objects:this._toObjects(e,n)};return i&&(i=i.toObject(n)),t(r,this.__serializeBgOverlay(e,n)),S.util.populateWithProperties(this,r,n),r},_toObjects:function(t,e){return this._objects.filter(function(t){return!t.excludeFromExport}).map(function(n){return this._toObject(n,t,e)},this)},_toObject:function(t,e,n){var i;this.includeDefaultValues||(i=t.includeDefaultValues,t.includeDefaultValues=!1);var r=t[e](n);return this.includeDefaultValues||(t.includeDefaultValues=i),r},__serializeBgOverlay:function(t,e){var n={},i=this.backgroundImage,r=this.overlayImage;return this.backgroundColor&&(n.background=this.backgroundColor.toObject?this.backgroundColor.toObject(e):this.backgroundColor),this.overlayColor&&(n.overlay=this.overlayColor.toObject?this.overlayColor.toObject(e):this.overlayColor),i&&!i.excludeFromExport&&(n.backgroundImage=this._toObject(i,t,e)),r&&!r.excludeFromExport&&(n.overlayImage=this._toObject(r,t,e)),n},svgViewportTransformation:!0,toSVG:function(t,e){t||(t={});var n=[];return this._setSVGPreamble(n,t),this._setSVGHeader(n,t),this._setSVGBgOverlayColor(n,"backgroundColor"),this._setSVGBgOverlayImage(n,"backgroundImage",e),this._setSVGObjects(n,e),this._setSVGBgOverlayColor(n,"overlayColor"),this._setSVGBgOverlayImage(n,"overlayImage",e),n.push("</svg>"),n.join("")},_setSVGPreamble:function(t,e){e.suppressPreamble||t.push('<?xml version="1.0" encoding="',e.encoding||"UTF-8",'" standalone="no" ?>\n','<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" ','"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')},_setSVGHeader:function(t,e){var n,r=e.width||this.width,o=e.height||this.height,s='viewBox="0 0 '+this.width+" "+this.height+'" ',a=S.Object.NUM_FRACTION_DIGITS;e.viewBox?s='viewBox="'+e.viewBox.x+" "+e.viewBox.y+" "+e.viewBox.width+" "+e.viewBox.height+'" ':this.svgViewportTransformation&&(s='viewBox="'+i(-(n=this.viewportTransform)[4]/n[0],a)+" "+i(-n[5]/n[3],a)+" "+i(this.width/n[0],a)+" "+i(this.height/n[3],a)+'" '),t.push("<svg ",'xmlns="http://www.w3.org/2000/svg" ','xmlns:xlink="http://www.w3.org/1999/xlink" ','version="1.1" ','width="',r,'" ','height="',o,'" ',s,'xml:space="preserve">\n',"<desc>Created with Fabric.js ",S.version,"</desc>\n","<defs>\n",this.createSVGFontFacesMarkup(),this.createSVGRefElementsMarkup(),"</defs>\n")},createSVGRefElementsMarkup:function(){var t=this;return["backgroundColor","overlayColor"].map(function(e){var n=t[e];if(n&&n.toLive)return n.toSVG(t,!1)}).join("")},createSVGFontFacesMarkup:function(){var t,e,n,i,r,o,s,a,l="",u={},c=S.fontPaths,h=this._objects;for(s=0,a=h.length;s<a;s++)if(e=(t=h[s]).fontFamily,-1!==t.type.indexOf("text")&&!u[e]&&c[e]&&(u[e]=!0,t.styles))for(r in n=t.styles)for(o in i=n[r])!u[e=i[o].fontFamily]&&c[e]&&(u[e]=!0);for(var p in u)l+=["\t\t@font-face {\n","\t\t\tfont-family: '",p,"';\n","\t\t\tsrc: url('",c[p],"');\n","\t\t}\n"].join("");return l&&(l=['\t<style type="text/css">',"<![CDATA[\n",l,"]]>","</style>\n"].join("")),l},_setSVGObjects:function(t,e){var n,i,r,o=this._objects;for(i=0,r=o.length;i<r;i++)(n=o[i]).excludeFromExport||this._setSVGObject(t,n,e)},_setSVGObject:function(t,e,n){t.push(e.toSVG(n))},_setSVGBgOverlayImage:function(t,e,n){this[e]&&!this[e].excludeFromExport&&this[e].toSVG&&t.push(this[e].toSVG(n))},_setSVGBgOverlayColor:function(t,e){var n=this[e],i=this.viewportTransform,r=this.width/i[0],o=this.height/i[3];if(n)if(n.toLive){var s=n.repeat;t.push('<rect transform="translate(',r/2,",",o/2,')"',' x="',n.offsetX-r/2,'" y="',n.offsetY-o/2,'" ','width="',"repeat-y"===s||"no-repeat"===s?n.source.width:r,'" height="',"repeat-x"===s||"no-repeat"===s?n.source.height:o,'" fill="url(#SVGID_'+n.id+')"',"></rect>\n")}else t.push('<rect x="0" y="0" width="100%" height="100%" ','fill="',this[e],'"',"></rect>\n")},sendToBack:function(t){if(!t)return this;var e,i,r,o=this._activeObject;if(t===o&&"activeSelection"===t.type)for(e=(r=o._objects).length;e--;)n(this._objects,i=r[e]),this._objects.unshift(i);else n(this._objects,t),this._objects.unshift(t);return this.renderOnAddRemove&&this.requestRenderAll(),this},bringToFront:function(t){if(!t)return this;var e,i,r,o=this._activeObject;if(t===o&&"activeSelection"===t.type)for(r=o._objects,e=0;e<r.length;e++)n(this._objects,i=r[e]),this._objects.push(i);else n(this._objects,t),this._objects.push(t);return this.renderOnAddRemove&&this.requestRenderAll(),this},sendBackwards:function(t,e){if(!t)return this;var i,r,o,s,a,l=this._activeObject,u=0;if(t===l&&"activeSelection"===t.type)for(a=l._objects,i=0;i<a.length;i++)(o=this._objects.indexOf(r=a[i]))>0+u&&(s=o-1,n(this._objects,r),this._objects.splice(s,0,r)),u++;else 0!==(o=this._objects.indexOf(t))&&(s=this._findNewLowerIndex(t,o,e),n(this._objects,t),this._objects.splice(s,0,t));return this.renderOnAddRemove&&this.requestRenderAll(),this},_findNewLowerIndex:function(t,e,n){var i,r;if(n){for(i=e,r=e-1;r>=0;--r)if(t.intersectsWithObject(this._objects[r])||t.isContainedWithinObject(this._objects[r])||this._objects[r].isContainedWithinObject(t)){i=r;break}}else i=e-1;return i},bringForward:function(t,e){if(!t)return this;var i,r,o,s,a,l=this._activeObject,u=0;if(t===l&&"activeSelection"===t.type)for(i=(a=l._objects).length;i--;)(o=this._objects.indexOf(r=a[i]))<this._objects.length-1-u&&(s=o+1,n(this._objects,r),this._objects.splice(s,0,r)),u++;else(o=this._objects.indexOf(t))!==this._objects.length-1&&(s=this._findNewUpperIndex(t,o,e),n(this._objects,t),this._objects.splice(s,0,t));return this.renderOnAddRemove&&this.requestRenderAll(),this},_findNewUpperIndex:function(t,e,n){var i,r,o;if(n){for(i=e,r=e+1,o=this._objects.length;r<o;++r)if(t.intersectsWithObject(this._objects[r])||t.isContainedWithinObject(this._objects[r])||this._objects[r].isContainedWithinObject(t)){i=r;break}}else i=e+1;return i},moveTo:function(t,e){return n(this._objects,t),this._objects.splice(e,0,t),this.renderOnAddRemove&&this.requestRenderAll()},dispose:function(){return this.isRendering&&(S.util.cancelAnimFrame(this.isRendering),this.isRendering=0),this.forEachObject(function(t){t.dispose&&t.dispose()}),this._objects=[],this.backgroundImage&&this.backgroundImage.dispose&&this.backgroundImage.dispose(),this.backgroundImage=null,this.overlayImage&&this.overlayImage.dispose&&this.overlayImage.dispose(),this.overlayImage=null,this._iTextInstances=null,this.contextContainer=null,S.util.cleanUpJsdomNode(this.lowerCanvasEl),this.lowerCanvasEl=void 0,this},toString:function(){return"#<fabric.Canvas ("+this.complexity()+"): { objects: "+this._objects.length+" }>"}}),t(S.StaticCanvas.prototype,S.Observable),t(S.StaticCanvas.prototype,S.Collection),t(S.StaticCanvas.prototype,S.DataURLExporter),t(S.StaticCanvas,{EMPTY_JSON:'{"objects": [], "background": "white"}',supports:function(t){var e=S.util.createCanvasElement();if(!e||!e.getContext)return null;var n=e.getContext("2d");if(!n)return null;switch(t){case"getImageData":return void 0!==n.getImageData;case"setLineDash":return void 0!==n.setLineDash;case"toDataURL":return void 0!==e.toDataURL;case"toDataURLWithQuality":try{return e.toDataURL("image/jpeg",0),!0}catch(t){}return!1;default:return null}}}),S.StaticCanvas.prototype.toJSON=S.StaticCanvas.prototype.toObject,S.isLikelyNode&&(S.StaticCanvas.prototype.createPNGStream=function(){var t=S.util.getNodeCanvas(this.lowerCanvasEl);return t&&t.createPNGStream()},S.StaticCanvas.prototype.createJPEGStream=function(t){var e=S.util.getNodeCanvas(this.lowerCanvasEl);return e&&e.createJPEGStream(t)})}}(),S.BaseBrush=S.util.createClass({color:"rgb(0, 0, 0)",width:1,shadow:null,strokeLineCap:"round",strokeLineJoin:"round",strokeMiterLimit:10,strokeDashArray:null,setShadow:function(t){return this.shadow=new S.Shadow(t),this},_setBrushStyles:function(){var t=this.canvas.contextTop;t.strokeStyle=this.color,t.lineWidth=this.width,t.lineCap=this.strokeLineCap,t.miterLimit=this.strokeMiterLimit,t.lineJoin=this.strokeLineJoin,S.StaticCanvas.supports("setLineDash")&&t.setLineDash(this.strokeDashArray||[])},_saveAndTransform:function(t){var e=this.canvas.viewportTransform;t.save(),t.transform(e[0],e[1],e[2],e[3],e[4],e[5])},_setShadow:function(){if(this.shadow){var t=this.canvas.contextTop,e=this.canvas.getZoom();t.shadowColor=this.shadow.color,t.shadowBlur=this.shadow.blur*e,t.shadowOffsetX=this.shadow.offsetX*e,t.shadowOffsetY=this.shadow.offsetY*e}},_resetShadow:function(){var t=this.canvas.contextTop;t.shadowColor="",t.shadowBlur=t.shadowOffsetX=t.shadowOffsetY=0}}),S.PencilBrush=S.util.createClass(S.BaseBrush,{initialize:function(t){this.canvas=t,this._points=[]},_drawSegment:function(t,e,n){var i=e.midPointFrom(n);return t.quadraticCurveTo(e.x,e.y,i.x,i.y),i},onMouseDown:function(t){this._prepareForDrawing(t),this._captureDrawingPath(t),this._render()},onMouseMove:function(t){if(this._captureDrawingPath(t)&&this._points.length>1)if(this.needsFullRender)this.canvas.clearContext(this.canvas.contextTop),this._render();else{var e=this._points,n=e.length,i=this.canvas.contextTop;this._saveAndTransform(i),this.oldEnd&&(i.beginPath(),i.moveTo(this.oldEnd.x,this.oldEnd.y)),this.oldEnd=this._drawSegment(i,e[n-2],e[n-1],!0),i.stroke(),i.restore()}},onMouseUp:function(){this.oldEnd=void 0,this._finalizeAndAddPath()},_prepareForDrawing:function(t){var e=new S.Point(t.x,t.y);this._reset(),this._addPoint(e),this.canvas.contextTop.moveTo(e.x,e.y)},_addPoint:function(t){return!(this._points.length>1&&t.eq(this._points[this._points.length-1])||(this._points.push(t),0))},_reset:function(){this._points.length=0,this._setBrushStyles();var t=new S.Color(this.color);this.needsFullRender=t.getAlpha()<1,this._setShadow()},_captureDrawingPath:function(t){var e=new S.Point(t.x,t.y);return this._addPoint(e)},_render:function(){var t,e,n=this.canvas.contextTop,i=this._points[0],r=this._points[1];if(this._saveAndTransform(n),n.beginPath(),2===this._points.length&&i.x===r.x&&i.y===r.y){var o=this.width/1e3;i=new S.Point(i.x,i.y),r=new S.Point(r.x,r.y),i.x-=o,r.x+=o}for(n.moveTo(i.x,i.y),t=1,e=this._points.length;t<e;t++)this._drawSegment(n,i,r),i=this._points[t],r=this._points[t+1];n.lineTo(i.x,i.y),n.stroke(),n.restore()},convertPointsToSVGPath:function(t){var e,n=[],i=this.width/1e3,r=new S.Point(t[0].x,t[0].y),o=new S.Point(t[1].x,t[1].y),s=t.length,a=1,l=1,u=s>2;for(u&&(a=t[2].x<o.x?-1:t[2].x===o.x?0:1,l=t[2].y<o.y?-1:t[2].y===o.y?0:1),n.push("M ",r.x-a*i," ",r.y-l*i," "),e=1;e<s;e++){if(!r.eq(o)){var c=r.midPointFrom(o);n.push("Q ",r.x," ",r.y," ",c.x," ",c.y," ")}r=t[e],e+1<t.length&&(o=t[e+1])}return u&&(a=r.x>t[e-2].x?1:r.x===t[e-2].x?0:-1,l=r.y>t[e-2].y?1:r.y===t[e-2].y?0:-1),n.push("L ",r.x+a*i," ",r.y+l*i),n},createPath:function(t){var e=new S.Path(t,{fill:null,stroke:this.color,strokeWidth:this.width,strokeLineCap:this.strokeLineCap,strokeMiterLimit:this.strokeMiterLimit,strokeLineJoin:this.strokeLineJoin,strokeDashArray:this.strokeDashArray}),n=new S.Point(e.left+e.width/2,e.top+e.height/2);return n=e.translateToGivenOrigin(n,"center","center",e.originX,e.originY),e.top=n.y,e.left=n.x,this.shadow&&(this.shadow.affectStroke=!0,e.setShadow(this.shadow)),e},_finalizeAndAddPath:function(){this.canvas.contextTop.closePath();var t=this.convertPointsToSVGPath(this._points).join("");if("M 0 0 Q 0 0 0 0 L 0 0"!==t){var e=this.createPath(t);this.canvas.clearContext(this.canvas.contextTop),this.canvas.add(e),this.canvas.renderAll(),e.setCoords(),this._resetShadow(),this.canvas.fire("path:created",{path:e})}else this.canvas.requestRenderAll()}}),S.CircleBrush=S.util.createClass(S.BaseBrush,{width:10,initialize:function(t){this.canvas=t,this.points=[]},drawDot:function(t){var e=this.addPoint(t),n=this.canvas.contextTop;this._saveAndTransform(n),n.fillStyle=e.fill,n.beginPath(),n.arc(e.x,e.y,e.radius,0,2*Math.PI,!1),n.closePath(),n.fill(),n.restore()},onMouseDown:function(t){this.points.length=0,this.canvas.clearContext(this.canvas.contextTop),this._setShadow(),this.drawDot(t)},_render:function(){var t,e,n,i=this.canvas.contextTop,r=this.points;for(this._saveAndTransform(i),t=0,e=r.length;t<e;t++)i.fillStyle=(n=r[t]).fill,i.beginPath(),i.arc(n.x,n.y,n.radius,0,2*Math.PI,!1),i.closePath(),i.fill();i.restore()},onMouseMove:function(t){this.drawDot(t)},onMouseUp:function(){var t,e,n=this.canvas.renderOnAddRemove;this.canvas.renderOnAddRemove=!1;var i=[];for(t=0,e=this.points.length;t<e;t++){var r=this.points[t],o=new S.Circle({radius:r.radius,left:r.x,top:r.y,originX:"center",originY:"center",fill:r.fill});this.shadow&&o.setShadow(this.shadow),i.push(o)}var s=new S.Group(i);s.canvas=this.canvas,this.canvas.add(s),this.canvas.fire("path:created",{path:s}),this.canvas.clearContext(this.canvas.contextTop),this._resetShadow(),this.canvas.renderOnAddRemove=n,this.canvas.requestRenderAll()},addPoint:function(t){var e=new S.Point(t.x,t.y),n=S.util.getRandomInt(Math.max(0,this.width-20),this.width+20)/2,i=new S.Color(this.color).setAlpha(S.util.getRandomInt(0,100)/100).toRgba();return e.radius=n,e.fill=i,this.points.push(e),e}}),S.SprayBrush=S.util.createClass(S.BaseBrush,{width:10,density:20,dotWidth:1,dotWidthVariance:1,randomOpacity:!1,optimizeOverlapping:!0,initialize:function(t){this.canvas=t,this.sprayChunks=[]},onMouseDown:function(t){this.sprayChunks.length=0,this.canvas.clearContext(this.canvas.contextTop),this._setShadow(),this.addSprayChunk(t),this.render(this.sprayChunkPoints)},onMouseMove:function(t){this.addSprayChunk(t),this.render(this.sprayChunkPoints)},onMouseUp:function(){var t=this.canvas.renderOnAddRemove;this.canvas.renderOnAddRemove=!1;for(var e=[],n=0,i=this.sprayChunks.length;n<i;n++)for(var r=this.sprayChunks[n],o=0,s=r.length;o<s;o++){var a=new S.Rect({width:r[o].width,height:r[o].width,left:r[o].x+1,top:r[o].y+1,originX:"center",originY:"center",fill:this.color});e.push(a)}this.optimizeOverlapping&&(e=this._getOptimizedRects(e));var l=new S.Group(e);this.shadow&&l.setShadow(this.shadow),this.canvas.add(l),this.canvas.fire("path:created",{path:l}),this.canvas.clearContext(this.canvas.contextTop),this._resetShadow(),this.canvas.renderOnAddRemove=t,this.canvas.requestRenderAll()},_getOptimizedRects:function(t){var e,n,i,r={};for(n=0,i=t.length;n<i;n++)r[e=t[n].left+""+t[n].top]||(r[e]=t[n]);var o=[];for(e in r)o.push(r[e]);return o},render:function(t){var e,n,i=this.canvas.contextTop;for(i.fillStyle=this.color,this._saveAndTransform(i),e=0,n=t.length;e<n;e++){var r=t[e];void 0!==r.opacity&&(i.globalAlpha=r.opacity),i.fillRect(r.x,r.y,r.width,r.width)}i.restore()},_render:function(){var t,e,n=this.canvas.contextTop;for(n.fillStyle=this.color,this._saveAndTransform(n),t=0,e=this.sprayChunks.length;t<e;t++)this.render(this.sprayChunks[t]);n.restore()},addSprayChunk:function(t){this.sprayChunkPoints=[];var e,n,i,r,o=this.width/2;for(r=0;r<this.density;r++){e=S.util.getRandomInt(t.x-o,t.x+o),n=S.util.getRandomInt(t.y-o,t.y+o),i=this.dotWidthVariance?S.util.getRandomInt(Math.max(1,this.dotWidth-this.dotWidthVariance),this.dotWidth+this.dotWidthVariance):this.dotWidth;var s=new S.Point(e,n);s.width=i,this.randomOpacity&&(s.opacity=S.util.getRandomInt(0,100)/100),this.sprayChunkPoints.push(s)}this.sprayChunks.push(this.sprayChunkPoints)}}),S.PatternBrush=S.util.createClass(S.PencilBrush,{getPatternSrc:function(){var t=S.util.createCanvasElement(),e=t.getContext("2d");return t.width=t.height=25,e.fillStyle=this.color,e.beginPath(),e.arc(10,10,10,0,2*Math.PI,!1),e.closePath(),e.fill(),t},getPatternSrcFunction:function(){return String(this.getPatternSrc).replace("this.color",'"'+this.color+'"')},getPattern:function(){return this.canvas.contextTop.createPattern(this.source||this.getPatternSrc(),"repeat")},_setBrushStyles:function(){this.callSuper("_setBrushStyles"),this.canvas.contextTop.strokeStyle=this.getPattern()},createPath:function(t){var e=this.callSuper("createPath",t),n=e._getLeftTopCoords().scalarAdd(e.strokeWidth/2);return e.stroke=new S.Pattern({source:this.source||this.getPatternSrcFunction(),offsetX:-n.x,offsetY:-n.y}),e}}),function(){var t=S.util.getPointer,e=S.util.degreesToRadians,n=S.util.radiansToDegrees,i=Math.atan2,r=Math.abs,o=S.StaticCanvas.supports("setLineDash");for(var s in S.Canvas=S.util.createClass(S.StaticCanvas,{initialize:function(t,e){e||(e={}),this.renderAndResetBound=this.renderAndReset.bind(this),this.requestRenderAllBound=this.requestRenderAll.bind(this),this._initStatic(t,e),this._initInteractive(),this._createCacheCanvas()},uniScaleTransform:!1,uniScaleKey:"shiftKey",centeredScaling:!1,centeredRotation:!1,centeredKey:"altKey",altActionKey:"shiftKey",interactive:!0,selection:!0,selectionKey:"shiftKey",altSelectionKey:null,selectionColor:"rgba(100, 100, 255, 0.3)",selectionDashArray:[],selectionBorderColor:"rgba(255, 255, 255, 0.3)",selectionLineWidth:1,selectionFullyContained:!1,hoverCursor:"move",moveCursor:"move",defaultCursor:"default",freeDrawingCursor:"crosshair",rotationCursor:"crosshair",notAllowedCursor:"not-allowed",containerClass:"canvas-container",perPixelTargetFind:!1,targetFindTolerance:0,skipTargetFind:!1,isDrawingMode:!1,preserveObjectStacking:!1,snapAngle:0,snapThreshold:null,stopContextMenu:!1,fireRightClick:!1,fireMiddleClick:!1,_initInteractive:function(){this._currentTransform=null,this._groupSelector=null,this._initWrapperElement(),this._createUpperCanvas(),this._initEventListeners(),this._initRetinaScaling(),this.freeDrawingBrush=S.PencilBrush&&new S.PencilBrush(this),this.calcOffset()},_chooseObjectsToRender:function(){var t,e,n,i=this.getActiveObjects();if(i.length>0&&!this.preserveObjectStacking){e=[],n=[];for(var r=0,o=this._objects.length;r<o;r++)-1===i.indexOf(t=this._objects[r])?e.push(t):n.push(t);i.length>1&&(this._activeObject._objects=n),e.push.apply(e,n)}else e=this._objects;return e},renderAll:function(){return!this.contextTopDirty||this._groupSelector||this.isDrawingMode||(this.clearContext(this.contextTop),this.contextTopDirty=!1),this.hasLostContext&&this.renderTopLayer(this.contextTop),this.renderCanvas(this.contextContainer,this._chooseObjectsToRender()),this},renderTopLayer:function(t){this.isDrawingMode&&this._isCurrentlyDrawing&&this.freeDrawingBrush&&this.freeDrawingBrush._render(),this.selection&&this._groupSelector&&this._drawSelection(t)},renderTop:function(){var t=this.contextTop;return this.clearContext(t),this.renderTopLayer(t),this.fire("after:render"),this.contextTopDirty=!0,this},_resetCurrentTransform:function(){var t=this._currentTransform;t.target.set({scaleX:t.original.scaleX,scaleY:t.original.scaleY,skewX:t.original.skewX,skewY:t.original.skewY,left:t.original.left,top:t.original.top}),this._shouldCenterTransform(t.target)?("center"!==t.originX&&(t.mouseXSign="right"===t.originX?-1:1),"center"!==t.originY&&(t.mouseYSign="bottom"===t.originY?-1:1),t.originX="center",t.originY="center"):(t.originX=t.original.originX,t.originY=t.original.originY)},containsPoint:function(t,e,n){var i,r=n||this.getPointer(t,!0);return i=e.group&&e.group===this._activeObject&&"activeSelection"===e.group.type?this._normalizePointer(e.group,r):{x:r.x,y:r.y},e.containsPoint(i)||e._findTargetCorner(r)},_normalizePointer:function(t,e){var n=t.calcTransformMatrix(),i=S.util.invertTransform(n),r=this.restorePointerVpt(e);return S.util.transformPoint(r,i)},isTargetTransparent:function(t,e,n){if(t.shouldCache()&&t._cacheCanvas){var i=this._normalizePointer(t,{x:e,y:n});return S.util.isTransparent(t._cacheContext,t.cacheTranslationX+i.x*t.zoomX,t.cacheTranslationY+i.y*t.zoomY,this.targetFindTolerance)}var r=this.contextCache,o=t.selectionBackgroundColor,s=this.viewportTransform;return t.selectionBackgroundColor="",this.clearContext(r),r.save(),r.transform(s[0],s[1],s[2],s[3],s[4],s[5]),t.render(r),r.restore(),t===this._activeObject&&t._renderControls(r,{hasBorders:!1,transparentCorners:!1},{hasBorders:!1}),t.selectionBackgroundColor=o,S.util.isTransparent(r,e,n,this.targetFindTolerance)},_isSelectionKeyPressed:function(t){return"[object Array]"===Object.prototype.toString.call(this.selectionKey)?!!this.selectionKey.find(function(e){return!0===t[e]}):t[this.selectionKey]},_shouldClearSelection:function(t,e){var n=this.getActiveObjects(),i=this._activeObject;return!e||e&&i&&n.length>1&&-1===n.indexOf(e)&&i!==e&&!this._isSelectionKeyPressed(t)||e&&!e.evented||e&&!e.selectable&&i&&i!==e},_shouldCenterTransform:function(t){if(t){var e,n=this._currentTransform;return"scale"===n.action||"scaleX"===n.action||"scaleY"===n.action?e=this.centeredScaling||t.centeredScaling:"rotate"===n.action&&(e=this.centeredRotation||t.centeredRotation),e?!n.altKey:n.altKey}},_getOriginFromCorner:function(t,e){var n={x:t.originX,y:t.originY};return"ml"===e||"tl"===e||"bl"===e?n.x="right":"mr"!==e&&"tr"!==e&&"br"!==e||(n.x="left"),"tl"===e||"mt"===e||"tr"===e?n.y="bottom":"bl"!==e&&"mb"!==e&&"br"!==e||(n.y="top"),n},_getActionFromCorner:function(t,e,n){if(!e)return"drag";switch(e){case"mtr":return"rotate";case"ml":case"mr":return n[this.altActionKey]?"skewY":"scaleX";case"mt":case"mb":return n[this.altActionKey]?"skewX":"scaleY";default:return"scale"}},_setupCurrentTransform:function(t,n){if(n){var i=this.getPointer(t),r=n._findTargetCorner(this.getPointer(t,!0)),o=this._getActionFromCorner(n,r,t),s=this._getOriginFromCorner(n,r);this._currentTransform={target:n,action:o,corner:r,scaleX:n.scaleX,scaleY:n.scaleY,skewX:n.skewX,skewY:n.skewY,offsetX:i.x-n.left,offsetY:i.y-n.top,originX:s.x,originY:s.y,ex:i.x,ey:i.y,lastX:i.x,lastY:i.y,theta:e(n.angle),width:n.width*n.scaleX,mouseXSign:1,mouseYSign:1,shiftKey:t.shiftKey,altKey:t[this.centeredKey],original:S.util.saveObjectTransform(n)},this._currentTransform.original.originX=s.x,this._currentTransform.original.originY=s.y,this._resetCurrentTransform(),this._beforeTransform(t)}},_translateObject:function(t,e){var n=this._currentTransform,i=n.target,r=t-n.offsetX,o=e-n.offsetY,s=!i.get("lockMovementX")&&i.left!==r,a=!i.get("lockMovementY")&&i.top!==o;return s&&i.set("left",r),a&&i.set("top",o),s||a},_changeSkewTransformOrigin:function(t,e,n){var i="originX",r={0:"center"},o=e.target.skewX,s="left",a="right",l="mt"===e.corner||"ml"===e.corner?1:-1,u=1;t=t>0?1:-1,"y"===n&&(o=e.target.skewY,s="top",a="bottom",i="originY"),r[-1]=s,r[1]=a,e.target.flipX&&(u*=-1),e.target.flipY&&(u*=-1),0===o?(e.skewSign=-l*t*u,e[i]=r[-t]):(e.skewSign=o=o>0?1:-1,e[i]=r[o*l*u])},_skewObject:function(t,e,n){var i,r=this._currentTransform,o=r.target,s=o.get("lockSkewingX"),a=o.get("lockSkewingY");if(s&&"x"===n||a&&"y"===n)return!1;var l,u,c=o.getCenterPoint(),h=o.toLocalPoint(new S.Point(t,e),"center","center")[n],p=o.toLocalPoint(new S.Point(r.lastX,r.lastY),"center","center")[n],d=o._getTransformedDimensions();return this._changeSkewTransformOrigin(h-p,r,n),l=o.toLocalPoint(new S.Point(t,e),r.originX,r.originY)[n],u=o.translateToOriginPoint(c,r.originX,r.originY),i=this._setObjectSkew(l,r,n,d),r.lastX=t,r.lastY=e,o.setPositionByOrigin(u,r.originX,r.originY),i},_setObjectSkew:function(t,e,n,i){var r,o,s,a,l,u,c,h,p,d,f=e.target,g=e.skewSign;return"x"===n?(l="y",u="Y",c="X",p=0,d=f.skewY):(l="x",u="X",c="Y",p=f.skewX,d=0),a=f._getTransformedDimensions(p,d),(h=2*Math.abs(t)-a[n])<=2?r=0:(r=g*Math.atan(h/f["scale"+c]/(a[l]/f["scale"+u])),r=S.util.radiansToDegrees(r)),o=f["skew"+c]!==r,f.set("skew"+c,r),0!==f["skew"+u]&&(s=f._getTransformedDimensions(),f.set("scale"+u,r=i[l]/s[l]*f["scale"+u])),o},_scaleObject:function(t,e,n){var i=this._currentTransform,r=i.target,o=r.lockScalingX,s=r.lockScalingY,a=r.lockScalingFlip;if(o&&s)return!1;var l,u=r.translateToOriginPoint(r.getCenterPoint(),i.originX,i.originY),c=r.toLocalPoint(new S.Point(t,e),i.originX,i.originY),h=r._getTransformedDimensions();return this._setLocalMouse(c,i),l=this._setObjectScale(c,i,o,s,n,a,h),r.setPositionByOrigin(u,i.originX,i.originY),l},_setObjectScale:function(t,e,n,i,r,o,s){var a,l,u,c,h=e.target,p=!1,d=!1,f=!1;return a=h.scaleX!==(u=t.x*h.scaleX/s.x),l=h.scaleY!==(c=t.y*h.scaleY/s.y),o&&u<=0&&u<h.scaleX&&(p=!0,t.x=0),o&&c<=0&&c<h.scaleY&&(d=!0,t.y=0),"equally"!==r||n||i?r?"x"!==r||h.get("lockUniScaling")?"y"!==r||h.get("lockUniScaling")||d||i||h.set("scaleY",c)&&(f=f||l):p||n||h.set("scaleX",u)&&(f=f||a):(p||n||h.set("scaleX",u)&&(f=f||a),d||i||h.set("scaleY",c)&&(f=f||l)):f=this._scaleObjectEqually(t,h,e,s),e.newScaleX=u,e.newScaleY=c,p||d||this._flipObject(e,r),f},_scaleObjectEqually:function(t,e,n,i){var r,o=t.y+t.x,s=i.y*n.original.scaleY/e.scaleY+i.x*n.original.scaleX/e.scaleX,a=t.y<0?-1:1;return n.newScaleX=(t.x<0?-1:1)*Math.abs(n.original.scaleX*o/s),n.newScaleY=a*Math.abs(n.original.scaleY*o/s),r=n.newScaleX!==e.scaleX||n.newScaleY!==e.scaleY,e.set("scaleX",n.newScaleX),e.set("scaleY",n.newScaleY),r},_flipObject:function(t,e){t.newScaleX<0&&"y"!==e&&("left"===t.originX?t.originX="right":"right"===t.originX&&(t.originX="left")),t.newScaleY<0&&"x"!==e&&("top"===t.originY?t.originY="bottom":"bottom"===t.originY&&(t.originY="top"))},_setLocalMouse:function(t,e){var n=e.target,i=this.getZoom(),o=n.padding/i;"right"===e.originX?t.x*=-1:"center"===e.originX&&(t.x*=2*e.mouseXSign,t.x<0&&(e.mouseXSign=-e.mouseXSign)),"bottom"===e.originY?t.y*=-1:"center"===e.originY&&(t.y*=2*e.mouseYSign,t.y<0&&(e.mouseYSign=-e.mouseYSign)),r(t.x)>o?t.x<0?t.x+=o:t.x-=o:t.x=0,r(t.y)>o?t.y<0?t.y+=o:t.y-=o:t.y=0},_rotateObject:function(t,e){var r=this._currentTransform,o=r.target,s=o.translateToOriginPoint(o.getCenterPoint(),r.originX,r.originY);if(o.lockRotation)return!1;var a=i(r.ey-s.y,r.ex-s.x),l=i(e-s.y,t-s.x),u=n(l-a+r.theta),c=!0;if(o.snapAngle>0){var h=o.snapAngle,p=o.snapThreshold||h,d=Math.ceil(u/h)*h,f=Math.floor(u/h)*h;Math.abs(u-f)<p?u=f:Math.abs(u-d)<p&&(u=d)}return u<0&&(u=360+u),o.angle===(u%=360)?c=!1:(o.angle=u,o.setPositionByOrigin(s,r.originX,r.originY)),c},setCursor:function(t){this.upperCanvasEl.style.cursor=t},_drawSelection:function(t){var e=this._groupSelector,n=e.left,i=e.top,s=r(n),a=r(i);if(this.selectionColor&&(t.fillStyle=this.selectionColor,t.fillRect(e.ex-(n>0?0:-n),e.ey-(i>0?0:-i),s,a)),this.selectionLineWidth&&this.selectionBorderColor)if(t.lineWidth=this.selectionLineWidth,t.strokeStyle=this.selectionBorderColor,this.selectionDashArray.length>1&&!o){var l=e.ex+.5-(n>0?0:s),u=e.ey+.5-(i>0?0:a);t.beginPath(),S.util.drawDashedLine(t,l,u,l+s,u,this.selectionDashArray),S.util.drawDashedLine(t,l,u+a-1,l+s,u+a-1,this.selectionDashArray),S.util.drawDashedLine(t,l,u,l,u+a,this.selectionDashArray),S.util.drawDashedLine(t,l+s-1,u,l+s-1,u+a,this.selectionDashArray),t.closePath(),t.stroke()}else S.Object.prototype._setLineDash.call(this,t,this.selectionDashArray),t.strokeRect(e.ex+.5-(n>0?0:s),e.ey+.5-(i>0?0:a),s,a)},findTarget:function(t,e){if(!this.skipTargetFind){var n,i,r=this.getPointer(t,!0),o=this._activeObject,s=this.getActiveObjects();if(this.targets=[],s.length>1&&!e&&o===this._searchPossibleTargets([o],r))return o;if(1===s.length&&o._findTargetCorner(r))return o;if(1===s.length&&o===this._searchPossibleTargets([o],r)){if(!this.preserveObjectStacking)return o;n=o,i=this.targets,this.targets=[]}var a=this._searchPossibleTargets(this._objects,r);return t[this.altSelectionKey]&&a&&n&&a!==n&&(a=n,this.targets=i),a}},_checkTarget:function(t,e){if(e&&e.visible&&e.evented&&this.containsPoint(null,e,t)){if(!this.perPixelTargetFind&&!e.perPixelTargetFind||e.isEditing)return!0;if(!this.isTargetTransparent(e,t.x,t.y))return!0}},_searchPossibleTargets:function(t,e){for(var n,i,r,o=t.length;o--;)if(this._checkTarget(e,t[o])){(n=t[o]).subTargetCheck&&n instanceof S.Group&&(i=this._normalizePointer(n,e),(r=this._searchPossibleTargets(n._objects,i))&&this.targets.push(r));break}return n},restorePointerVpt:function(t){return S.util.transformPoint(t,S.util.invertTransform(this.viewportTransform))},getPointer:function(e,n){if(this._absolutePointer&&!n)return this._absolutePointer;if(this._pointer&&n)return this._pointer;var i,r=t(e),o=this.upperCanvasEl,s=o.getBoundingClientRect(),a=s.width||0,l=s.height||0;return a&&l||("top"in s&&"bottom"in s&&(l=Math.abs(s.top-s.bottom)),"right"in s&&"left"in s&&(a=Math.abs(s.right-s.left))),this.calcOffset(),r.x=r.x-this._offset.left,r.y=r.y-this._offset.top,n||(r=this.restorePointerVpt(r)),{x:r.x*(i=0===a||0===l?{width:1,height:1}:{width:o.width/a,height:o.height/l}).width,y:r.y*i.height}},_createUpperCanvas:function(){var t=this.lowerCanvasEl.className.replace(/\s*lower-canvas\s*/,"");this.upperCanvasEl?this.upperCanvasEl.className="":this.upperCanvasEl=this._createCanvasElement(),S.util.addClass(this.upperCanvasEl,"upper-canvas "+t),this.wrapperEl.appendChild(this.upperCanvasEl),this._copyCanvasStyle(this.lowerCanvasEl,this.upperCanvasEl),this._applyCanvasStyle(this.upperCanvasEl),this.contextTop=this.upperCanvasEl.getContext("2d")},_createCacheCanvas:function(){this.cacheCanvasEl=this._createCanvasElement(),this.cacheCanvasEl.setAttribute("width",this.width),this.cacheCanvasEl.setAttribute("height",this.height),this.contextCache=this.cacheCanvasEl.getContext("2d")},_initWrapperElement:function(){this.wrapperEl=S.util.wrapElement(this.lowerCanvasEl,"div",{class:this.containerClass}),S.util.setStyle(this.wrapperEl,{width:this.width+"px",height:this.height+"px",position:"relative"}),S.util.makeElementUnselectable(this.wrapperEl)},_applyCanvasStyle:function(t){var e=this.width||t.width,n=this.height||t.height;S.util.setStyle(t,{position:"absolute",width:e+"px",height:n+"px",left:0,top:0,"touch-action":this.allowTouchScrolling?"manipulation":"none"}),t.width=e,t.height=n,S.util.makeElementUnselectable(t)},_copyCanvasStyle:function(t,e){e.style.cssText=t.style.cssText},getSelectionContext:function(){return this.contextTop},getSelectionElement:function(){return this.upperCanvasEl},getActiveObject:function(){return this._activeObject},getActiveObjects:function(){var t=this._activeObject;return t?"activeSelection"===t.type&&t._objects?t._objects.slice(0):[t]:[]},_onObjectRemoved:function(t){t===this._activeObject&&(this.fire("before:selection:cleared",{target:t}),this._discardActiveObject(),this.fire("selection:cleared",{target:t}),t.fire("deselected")),this._hoveredTarget===t&&(this._hoveredTarget=null),this.callSuper("_onObjectRemoved",t)},_fireSelectionEvents:function(t,e){var n=!1,i=this.getActiveObjects(),r=[],o=[],s={e:e};t.forEach(function(t){-1===i.indexOf(t)&&(n=!0,t.fire("deselected",s),o.push(t))}),i.forEach(function(e){-1===t.indexOf(e)&&(n=!0,e.fire("selected",s),r.push(e))}),t.length>0&&i.length>0?(s.selected=r,s.deselected=o,s.updated=r[0]||o[0],s.target=this._activeObject,n&&this.fire("selection:updated",s)):i.length>0?(1===i.length&&(s.target=r[0],this.fire("object:selected",s)),s.selected=r,s.target=this._activeObject,this.fire("selection:created",s)):t.length>0&&(s.deselected=o,this.fire("selection:cleared",s))},setActiveObject:function(t,e){var n=this.getActiveObjects();return this._setActiveObject(t,e),this._fireSelectionEvents(n,e),this},_setActiveObject:function(t,e){return this._activeObject!==t&&!!this._discardActiveObject(e,t)&&!t.onSelect({e:e})&&(this._activeObject=t,!0)},_discardActiveObject:function(t,e){var n=this._activeObject;if(n){if(n.onDeselect({e:t,object:e}))return!1;this._activeObject=null}return!0},discardActiveObject:function(t){var e=this.getActiveObjects();return e.length&&this.fire("before:selection:cleared",{target:e[0],e:t}),this._discardActiveObject(t),this._fireSelectionEvents(e,t),this},dispose:function(){var t=this.wrapperEl;return this.removeListeners(),t.removeChild(this.upperCanvasEl),t.removeChild(this.lowerCanvasEl),this.contextCache=null,this.contextTop=null,["upperCanvasEl","cacheCanvasEl"].forEach((function(t){S.util.cleanUpJsdomNode(this[t]),this[t]=void 0}).bind(this)),t.parentNode&&t.parentNode.replaceChild(this.lowerCanvasEl,this.wrapperEl),delete this.wrapperEl,S.StaticCanvas.prototype.dispose.call(this),this},clear:function(){return this.discardActiveObject(),this.clearContext(this.contextTop),this.callSuper("clear")},drawControls:function(t){var e=this._activeObject;e&&e._renderControls(t)},_toObject:function(t,e,n){var i=this._realizeGroupTransformOnObject(t),r=this.callSuper("_toObject",t,e,n);return this._unwindGroupTransformOnObject(t,i),r},_realizeGroupTransformOnObject:function(t){if(t.group&&"activeSelection"===t.group.type&&this._activeObject===t.group){var e={};return["angle","flipX","flipY","left","scaleX","scaleY","skewX","skewY","top"].forEach(function(n){e[n]=t[n]}),this._activeObject.realizeTransform(t),e}return null},_unwindGroupTransformOnObject:function(t,e){e&&t.set(e)},_setSVGObject:function(t,e,n){var i=this._realizeGroupTransformOnObject(e);this.callSuper("_setSVGObject",t,e,n),this._unwindGroupTransformOnObject(e,i)},setViewportTransform:function(t){this.renderOnAddRemove&&this._activeObject&&this._activeObject.isEditing&&this._activeObject.clearContextTop(),S.StaticCanvas.prototype.setViewportTransform.call(this,t)}}),S.StaticCanvas)"prototype"!==s&&(S.Canvas[s]=S.StaticCanvas[s]);S.isTouchSupported&&(S.Canvas.prototype._setCursorFromEvent=function(){})}(),function(){var t={mt:0,tr:1,mr:2,br:3,mb:4,bl:5,ml:6,tl:7},e=S.util.addListener,n=S.util.removeListener,i={passive:!1};function r(t,e){return"which"in t?t.which===e:t.button===e-1}S.util.object.extend(S.Canvas.prototype,{cursorMap:["n-resize","ne-resize","e-resize","se-resize","s-resize","sw-resize","w-resize","nw-resize"],_initEventListeners:function(){this.removeListeners(),this._bindEvents(),this.addOrRemove(e,"add")},addOrRemove:function(t,e){t(S.window,"resize",this._onResize),t(this.upperCanvasEl,"mousedown",this._onMouseDown),t(this.upperCanvasEl,"mousemove",this._onMouseMove,i),t(this.upperCanvasEl,"mouseout",this._onMouseOut),t(this.upperCanvasEl,"mouseenter",this._onMouseEnter),t(this.upperCanvasEl,"wheel",this._onMouseWheel),t(this.upperCanvasEl,"contextmenu",this._onContextMenu),t(this.upperCanvasEl,"dblclick",this._onDoubleClick),t(this.upperCanvasEl,"touchstart",this._onMouseDown,i),t(this.upperCanvasEl,"touchmove",this._onMouseMove,i),t(this.upperCanvasEl,"dragover",this._onDragOver),t(this.upperCanvasEl,"dragenter",this._onDragEnter),t(this.upperCanvasEl,"dragleave",this._onDragLeave),t(this.upperCanvasEl,"drop",this._onDrop),"undefined"!=typeof eventjs&&e in eventjs&&(eventjs[e](this.upperCanvasEl,"gesture",this._onGesture),eventjs[e](this.upperCanvasEl,"drag",this._onDrag),eventjs[e](this.upperCanvasEl,"orientation",this._onOrientationChange),eventjs[e](this.upperCanvasEl,"shake",this._onShake),eventjs[e](this.upperCanvasEl,"longpress",this._onLongPress))},removeListeners:function(){this.addOrRemove(n,"remove"),n(S.document,"mouseup",this._onMouseUp),n(S.document,"touchend",this._onMouseUp,i),n(S.document,"mousemove",this._onMouseMove,i),n(S.document,"touchmove",this._onMouseMove,i)},_bindEvents:function(){this.eventsBound||(this._onMouseDown=this._onMouseDown.bind(this),this._onMouseMove=this._onMouseMove.bind(this),this._onMouseUp=this._onMouseUp.bind(this),this._onResize=this._onResize.bind(this),this._onGesture=this._onGesture.bind(this),this._onDrag=this._onDrag.bind(this),this._onShake=this._onShake.bind(this),this._onLongPress=this._onLongPress.bind(this),this._onOrientationChange=this._onOrientationChange.bind(this),this._onMouseWheel=this._onMouseWheel.bind(this),this._onMouseOut=this._onMouseOut.bind(this),this._onMouseEnter=this._onMouseEnter.bind(this),this._onContextMenu=this._onContextMenu.bind(this),this._onDoubleClick=this._onDoubleClick.bind(this),this._onDragOver=this._onDragOver.bind(this),this._onDragEnter=this._simpleEventHandler.bind(this,"dragenter"),this._onDragLeave=this._simpleEventHandler.bind(this,"dragleave"),this._onDrop=this._simpleEventHandler.bind(this,"drop"),this.eventsBound=!0)},_onGesture:function(t,e){this.__onTransformGesture&&this.__onTransformGesture(t,e)},_onDrag:function(t,e){this.__onDrag&&this.__onDrag(t,e)},_onMouseWheel:function(t){this.__onMouseWheel(t)},_onMouseOut:function(t){var e=this._hoveredTarget;this.fire("mouse:out",{target:e,e:t}),this._hoveredTarget=null,e&&e.fire("mouseout",{e:t}),this._iTextInstances&&this._iTextInstances.forEach(function(t){t.isEditing&&t.hiddenTextarea.focus()})},_onMouseEnter:function(t){this.findTarget(t)||(this.fire("mouse:over",{target:null,e:t}),this._hoveredTarget=null)},_onOrientationChange:function(t,e){this.__onOrientationChange&&this.__onOrientationChange(t,e)},_onShake:function(t,e){this.__onShake&&this.__onShake(t,e)},_onLongPress:function(t,e){this.__onLongPress&&this.__onLongPress(t,e)},_onDragOver:function(t){t.preventDefault();var e=this._simpleEventHandler("dragover",t);this._fireEnterLeaveEvents(e,t)},_onContextMenu:function(t){return this.stopContextMenu&&(t.stopPropagation(),t.preventDefault()),!1},_onDoubleClick:function(t){this._cacheTransformEventData(t),this._handleEvent(t,"dblclick"),this._resetTransformEventData(t)},_onMouseDown:function(t){this.__onMouseDown(t),this._resetTransformEventData(),e(S.document,"touchend",this._onMouseUp,i),e(S.document,"touchmove",this._onMouseMove,i),n(this.upperCanvasEl,"mousemove",this._onMouseMove,i),n(this.upperCanvasEl,"touchmove",this._onMouseMove,i),"touchstart"===t.type?n(this.upperCanvasEl,"mousedown",this._onMouseDown):(e(S.document,"mouseup",this._onMouseUp),e(S.document,"mousemove",this._onMouseMove,i))},_onMouseUp:function(t){if(this.__onMouseUp(t),this._resetTransformEventData(),n(S.document,"mouseup",this._onMouseUp),n(S.document,"touchend",this._onMouseUp,i),n(S.document,"mousemove",this._onMouseMove,i),n(S.document,"touchmove",this._onMouseMove,i),e(this.upperCanvasEl,"mousemove",this._onMouseMove,i),e(this.upperCanvasEl,"touchmove",this._onMouseMove,i),"touchend"===t.type){var r=this;setTimeout(function(){e(r.upperCanvasEl,"mousedown",r._onMouseDown)},400)}},_onMouseMove:function(t){!this.allowTouchScrolling&&t.preventDefault&&t.preventDefault(),this.__onMouseMove(t)},_onResize:function(){this.calcOffset()},_shouldRender:function(t,e){var n=this._activeObject;return!(n&&n.isEditing&&t===n||!(t&&(t.isMoving||t!==n)||!t&&n||!t&&!n&&!this._groupSelector||e&&this._previousPointer&&this.selection&&(e.x!==this._previousPointer.x||e.y!==this._previousPointer.y)))},__onMouseUp:function(t){var e,n=this._currentTransform,i=this._groupSelector,o=!i||0===i.left&&0===i.top;if(this._cacheTransformEventData(t),e=this._target,this._handleEvent(t,"up:before"),r(t,3))this.fireRightClick&&this._handleEvent(t,"up",3,o);else{if(r(t,2))return this.fireMiddleClick&&this._handleEvent(t,"up",2,o),void this._resetTransformEventData();if(this.isDrawingMode&&this._isCurrentlyDrawing)this._onMouseUpInDrawingMode(t);else{n&&this._finalizeCurrentTransform(t);var s=this._shouldRender(e,this._absolutePointer);!e&&o||this._maybeGroupObjects(t),e&&(e.isMoving=!1),this._setCursorFromEvent(t,e),this._handleEvent(t,"up",1,o),this._groupSelector=null,this._currentTransform=null,e&&(e.__corner=0),s&&this.requestRenderAll()}}},_simpleEventHandler:function(t,e){var n=this.findTarget(e),i=this.targets,r={e:e,target:n,subTargets:i};if(this.fire(t,r),n&&n.fire(t,r),!i)return n;for(var o=0;o<i.length;o++)i[o].fire(t,r);return n},_handleEvent:function(t,e,n,i){var r=this._target,o=this.targets||[],s={e:t,target:r,subTargets:o,button:n||1,isClick:i||!1,pointer:this._pointer,absolutePointer:this._absolutePointer,transform:this._currentTransform};this.fire("mouse:"+e,s),r&&r.fire("mouse"+e,s);for(var a=0;a<o.length;a++)o[a].fire("mouse"+e,s)},_finalizeCurrentTransform:function(t){var e,n=this._currentTransform,i=n.target,r={e:t,target:i,transform:n};i._scaling&&(i._scaling=!1),i.setCoords(),(n.actionPerformed||this.stateful&&i.hasStateChanged())&&(n.actionPerformed&&(e=this._addEventOptions(r,n),this._fire(e,r)),this._fire("modified",r))},_addEventOptions:function(t,e){var n,i;switch(e.action){case"scaleX":n="scaled",i="x";break;case"scaleY":n="scaled",i="y";break;case"skewX":n="skewed",i="x";break;case"skewY":n="skewed",i="y";break;case"scale":n="scaled",i="equally";break;case"rotate":n="rotated";break;case"drag":n="moved"}return t.by=i,n},_onMouseDownInDrawingMode:function(t){this._isCurrentlyDrawing=!0,this.getActiveObject()&&this.discardActiveObject(t).requestRenderAll(),this.clipTo&&S.util.clipContext(this,this.contextTop);var e=this.getPointer(t);this.freeDrawingBrush.onMouseDown(e),this._handleEvent(t,"down")},_onMouseMoveInDrawingMode:function(t){if(this._isCurrentlyDrawing){var e=this.getPointer(t);this.freeDrawingBrush.onMouseMove(e)}this.setCursor(this.freeDrawingCursor),this._handleEvent(t,"move")},_onMouseUpInDrawingMode:function(t){this._isCurrentlyDrawing=!1,this.clipTo&&this.contextTop.restore(),this.freeDrawingBrush.onMouseUp(),this._handleEvent(t,"up")},__onMouseDown:function(t){this._cacheTransformEventData(t),this._handleEvent(t,"down:before");var e=this._target;if(r(t,3))this.fireRightClick&&this._handleEvent(t,"down",3);else if(r(t,2))this.fireMiddleClick&&this._handleEvent(t,"down",2);else if(this.isDrawingMode)this._onMouseDownInDrawingMode(t);else if(!this._currentTransform){var n=this._pointer;this._previousPointer=n;var i=this._shouldRender(e,n),o=this._shouldGroup(t,e);this._shouldClearSelection(t,e)?this.discardActiveObject(t):o&&(this._handleGrouping(t,e),e=this._activeObject),!this.selection||e&&(e.selectable||e.isEditing||e===this._activeObject)||(this._groupSelector={ex:n.x,ey:n.y,top:0,left:0}),e&&(e.selectable&&this.setActiveObject(e,t),e!==this._activeObject||!e.__corner&&o||this._setupCurrentTransform(t,e)),this._handleEvent(t,"down"),i&&this.requestRenderAll()}},_resetTransformEventData:function(){this._target=null,this._pointer=null,this._absolutePointer=null},_cacheTransformEventData:function(t){this._resetTransformEventData(),this._pointer=this.getPointer(t,!0),this._absolutePointer=this.restorePointerVpt(this._pointer),this._target=this._currentTransform?this._currentTransform.target:this.findTarget(t)||null},_beforeTransform:function(t){var e=this._currentTransform;this.stateful&&e.target.saveState(),this.fire("before:transform",{e:t,transform:e}),e.corner&&this.onBeforeScaleRotate(e.target)},__onMouseMove:function(t){var e,n;if(this._handleEvent(t,"move:before"),this._cacheTransformEventData(t),this.isDrawingMode)this._onMouseMoveInDrawingMode(t);else if(!(void 0!==t.touches&&t.touches.length>1)){var i=this._groupSelector;i?(i.left=(n=this._pointer).x-i.ex,i.top=n.y-i.ey,this.renderTop()):this._currentTransform?this._transformObject(t):(e=this.findTarget(t)||null,this._setCursorFromEvent(t,e),this._fireOverOutEvents(e,t)),this._handleEvent(t,"move"),this._resetTransformEventData()}},_fireOverOutEvents:function(t,e){this.fireSynteticInOutEvents(t,e,{targetName:"_hoveredTarget",canvasEvtOut:"mouse:out",evtOut:"mouseout",canvasEvtIn:"mouse:over",evtIn:"mouseover"})},_fireEnterLeaveEvents:function(t,e){this.fireSynteticInOutEvents(t,e,{targetName:"_draggedoverTarget",evtOut:"dragleave",evtIn:"dragenter"})},fireSynteticInOutEvents:function(t,e,n){var i,r,o,s=this[n.targetName],a=s!==t,l=n.canvasEvtIn,u=n.canvasEvtOut;a&&(i={e:e,target:t,previousTarget:s},r={e:e,target:s,nextTarget:t},this[n.targetName]=t),o=t&&a,s&&a&&(u&&this.fire(u,r),s.fire(n.evtOut,r)),o&&(l&&this.fire(l,i),t.fire(n.evtIn,i))},__onMouseWheel:function(t){this._cacheTransformEventData(t),this._handleEvent(t,"wheel"),this._resetTransformEventData()},_transformObject:function(t){var e=this.getPointer(t),n=this._currentTransform;n.reset=!1,n.target.isMoving=!0,n.shiftKey=t.shiftKey,n.altKey=t[this.centeredKey],this._beforeScaleTransform(t,n),this._performTransformAction(t,n,e),n.actionPerformed&&this.requestRenderAll()},_performTransformAction:function(t,e,n){var i=n.x,r=n.y,o=e.action,s=!1,a={target:e.target,e:t,transform:e,pointer:n};"rotate"===o?(s=this._rotateObject(i,r))&&this._fire("rotating",a):"scale"===o?(s=this._onScale(t,e,i,r))&&this._fire("scaling",a):"scaleX"===o?(s=this._scaleObject(i,r,"x"))&&this._fire("scaling",a):"scaleY"===o?(s=this._scaleObject(i,r,"y"))&&this._fire("scaling",a):"skewX"===o?(s=this._skewObject(i,r,"x"))&&this._fire("skewing",a):"skewY"===o?(s=this._skewObject(i,r,"y"))&&this._fire("skewing",a):(s=this._translateObject(i,r))&&(this._fire("moving",a),this.setCursor(a.target.moveCursor||this.moveCursor)),e.actionPerformed=e.actionPerformed||s},_fire:function(t,e){this.fire("object:"+t,e),e.target.fire(t,e)},_beforeScaleTransform:function(t,e){if("scale"===e.action||"scaleX"===e.action||"scaleY"===e.action){var n=this._shouldCenterTransform(e.target);(n&&("center"!==e.originX||"center"!==e.originY)||!n&&"center"===e.originX&&"center"===e.originY)&&(this._resetCurrentTransform(),e.reset=!0)}},_onScale:function(t,e,n,i){return this._isUniscalePossible(t,e.target)?(e.currentAction="scale",this._scaleObject(n,i)):(e.reset||"scale"!==e.currentAction||this._resetCurrentTransform(),e.currentAction="scaleEqually",this._scaleObject(n,i,"equally"))},_isUniscalePossible:function(t,e){return(t[this.uniScaleKey]||this.uniScaleTransform)&&!e.get("lockUniScaling")},_setCursorFromEvent:function(t,e){if(!e)return this.setCursor(this.defaultCursor),!1;var n=e.hoverCursor||this.hoverCursor,i=this._activeObject&&"activeSelection"===this._activeObject.type?this._activeObject:null,r=(!i||!i.contains(e))&&e._findTargetCorner(this.getPointer(t,!0));this.setCursor(r?this.getCornerCursor(r,e,t):n)},getCornerCursor:function(e,n,i){return this.actionIsDisabled(e,n,i)?this.notAllowedCursor:e in t?this._getRotatedCornerCursor(e,n,i):"mtr"===e&&n.hasRotatingPoint?this.rotationCursor:this.defaultCursor},actionIsDisabled:function(t,e,n){return"mt"===t||"mb"===t?n[this.altActionKey]?e.lockSkewingX:e.lockScalingY:"ml"===t||"mr"===t?n[this.altActionKey]?e.lockSkewingY:e.lockScalingX:"mtr"===t?e.lockRotation:this._isUniscalePossible(n,e)?e.lockScalingX&&e.lockScalingY:e.lockScalingX||e.lockScalingY},_getRotatedCornerCursor:function(e,n,i){var r=Math.round(n.angle%360/45);return r<0&&(r+=8),r+=t[e],i[this.altActionKey]&&t[e]%2==0&&(r+=2),this.cursorMap[r%=8]}})}(),h=Math.min,p=Math.max,S.util.object.extend(S.Canvas.prototype,{_shouldGroup:function(t,e){var n=this._activeObject;return n&&this._isSelectionKeyPressed(t)&&e&&e.selectable&&this.selection&&(n!==e||"activeSelection"===n.type)},_handleGrouping:function(t,e){var n=this._activeObject;n.__corner||(e!==n||(e=this.findTarget(t,!0)))&&(n&&"activeSelection"===n.type?this._updateActiveSelection(e,t):this._createActiveSelection(e,t))},_updateActiveSelection:function(t,e){var n=this._activeObject,i=n._objects.slice(0);n.contains(t)?(n.removeWithUpdate(t),this._hoveredTarget=t,1===n.size()&&this._setActiveObject(n.item(0),e)):(n.addWithUpdate(t),this._hoveredTarget=n),this._fireSelectionEvents(i,e)},_createActiveSelection:function(t,e){var n=this.getActiveObjects(),i=this._createGroup(t);this._hoveredTarget=i,this._setActiveObject(i,e),this._fireSelectionEvents(n,e)},_createGroup:function(t){var e=this._objects,n=e.indexOf(this._activeObject)<e.indexOf(t)?[this._activeObject,t]:[t,this._activeObject];return this._activeObject.isEditing&&this._activeObject.exitEditing(),new S.ActiveSelection(n,{canvas:this})},_groupSelectedObjects:function(t){var e,n=this._collectObjects();1===n.length?this.setActiveObject(n[0],t):n.length>1&&(e=new S.ActiveSelection(n.reverse(),{canvas:this}),this.setActiveObject(e,t))},_collectObjects:function(){for(var t,e=[],n=this._groupSelector.ex,i=this._groupSelector.ey,r=n+this._groupSelector.left,o=i+this._groupSelector.top,s=new S.Point(h(n,r),h(i,o)),a=new S.Point(p(n,r),p(i,o)),l=!this.selectionFullyContained,u=n===r&&i===o,c=this._objects.length;c--&&!((t=this._objects[c])&&t.selectable&&t.visible&&(l&&t.intersectsWithRect(s,a)||t.isContainedWithinRect(s,a)||l&&t.containsPoint(s)||l&&t.containsPoint(a))&&(e.push(t),u)););return e},_maybeGroupObjects:function(t){this.selection&&this._groupSelector&&this._groupSelectedObjects(t),this.setCursor(this.defaultCursor),this._groupSelector=null}}),d=S.StaticCanvas.supports("toDataURLWithQuality"),S.util.object.extend(S.StaticCanvas.prototype,{toDataURL:function(t){t||(t={});var e=t.format||"png",n=t.quality||1,i=(t.multiplier||1)*(t.enableRetinaScaling?1:1/this.getRetinaScaling());return this.__toDataURLWithMultiplier(e,n,{left:t.left||0,top:t.top||0,width:t.width||0,height:t.height||0},i)},__toDataURLWithMultiplier:function(t,e,n,i){var r=this.width,o=this.height,s=(n.width||this.width)*i,a=(n.height||this.height)*i,l=this.getZoom()*i,u=this.viewportTransform,c=this.interactive,h=this.skipOffscreen,p=r!==s||o!==a;this.viewportTransform=[l,0,0,l,(u[4]-n.left)*i,(u[5]-n.top)*i],this.skipOffscreen=!1,this.interactive=!1,p&&this.setDimensions({width:s,height:a},{backstoreOnly:!0}),this.renderAll();var d=this.__toDataURL(t,e,n);return this.interactive=c,this.skipOffscreen=h,this.viewportTransform=u,p&&this.setDimensions({width:r,height:o},{backstoreOnly:!0}),this.renderAll(),d},__toDataURL:function(t,e){var n=this.contextContainer.canvas;return"jpg"===t&&(t="jpeg"),d?n.toDataURL("image/"+t,e):n.toDataURL("image/"+t)}}),S.util.object.extend(S.StaticCanvas.prototype,{loadFromDatalessJSON:function(t,e,n){return this.loadFromJSON(t,e,n)},loadFromJSON:function(t,e,n){if(t){var i="string"==typeof t?JSON.parse(t):S.util.object.clone(t),r=this,o=this.renderOnAddRemove;return this.renderOnAddRemove=!1,this._enlivenObjects(i.objects,function(t){r.clear(),r._setBgOverlay(i,function(){t.forEach(function(t,e){r.insertAt(t,e)}),r.renderOnAddRemove=o,delete i.objects,delete i.backgroundImage,delete i.overlayImage,delete i.background,delete i.overlay,r._setOptions(i),r.renderAll(),e&&e()})},n),this}},_setBgOverlay:function(t,e){var n={backgroundColor:!1,overlayColor:!1,backgroundImage:!1,overlayImage:!1};if(t.backgroundImage||t.overlayImage||t.background||t.overlay){var i=function(){n.backgroundImage&&n.overlayImage&&n.backgroundColor&&n.overlayColor&&e&&e()};this.__setBgOverlay("backgroundImage",t.backgroundImage,n,i),this.__setBgOverlay("overlayImage",t.overlayImage,n,i),this.__setBgOverlay("backgroundColor",t.background,n,i),this.__setBgOverlay("overlayColor",t.overlay,n,i)}else e&&e()},__setBgOverlay:function(t,e,n,i){var r=this;if(!e)return n[t]=!0,void(i&&i());"backgroundImage"===t||"overlayImage"===t?S.util.enlivenObjects([e],function(e){r[t]=e[0],n[t]=!0,i&&i()}):this["set"+S.util.string.capitalize(t,!0)](e,function(){n[t]=!0,i&&i()})},_enlivenObjects:function(t,e,n){t&&0!==t.length?S.util.enlivenObjects(t,function(t){e&&e(t)},null,n):e&&e([])},_toDataURL:function(t,e){this.clone(function(n){e(n.toDataURL(t))})},_toDataURLWithMultiplier:function(t,e,n){this.clone(function(i){n(i.toDataURLWithMultiplier(t,e))})},clone:function(t,e){var n=JSON.stringify(this.toJSON(e));this.cloneWithoutData(function(e){e.loadFromJSON(n,function(){t&&t(e)})})},cloneWithoutData:function(t){var e=S.util.createCanvasElement();e.width=this.width,e.height=this.height;var n=new S.Canvas(e);n.clipTo=this.clipTo,this.backgroundImage?(n.setBackgroundImage(this.backgroundImage.src,function(){n.renderAll(),t&&t(n)}),n.backgroundImageOpacity=this.backgroundImageOpacity,n.backgroundImageStretch=this.backgroundImageStretch):t&&t(n)}}),function(t){"use strict";var n=e.fabric||(e.fabric={}),i=n.util.object.extend,r=n.util.object.clone,o=n.util.toFixed,s=n.util.string.capitalize,a=n.util.degreesToRadians,l=n.StaticCanvas.supports("setLineDash");n.Object||(n.Object=n.util.createClass(n.CommonMethods,{type:"object",originX:"left",originY:"top",top:0,left:0,width:0,height:0,scaleX:1,scaleY:1,flipX:!1,flipY:!1,opacity:1,angle:0,skewX:0,skewY:0,cornerSize:13,transparentCorners:!0,hoverCursor:null,moveCursor:null,padding:0,borderColor:"rgba(102,153,255,0.75)",borderDashArray:null,cornerColor:"rgba(102,153,255,0.5)",cornerStrokeColor:null,cornerStyle:"rect",cornerDashArray:null,centeredScaling:!1,centeredRotation:!0,fill:"rgb(0,0,0)",fillRule:"nonzero",globalCompositeOperation:"source-over",backgroundColor:"",selectionBackgroundColor:"",stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeLineJoin:"miter",strokeMiterLimit:4,shadow:null,borderOpacityWhenMoving:.4,borderScaleFactor:1,transformMatrix:null,minScaleLimit:0,selectable:!0,evented:!0,visible:!0,hasControls:!0,hasBorders:!0,hasRotatingPoint:!0,rotatingPointOffset:40,perPixelTargetFind:!1,includeDefaultValues:!0,clipTo:null,lockMovementX:!1,lockMovementY:!1,lockRotation:!1,lockScalingX:!1,lockScalingY:!1,lockUniScaling:!1,lockSkewingX:!1,lockSkewingY:!1,lockScalingFlip:!1,excludeFromExport:!1,objectCaching:!n.isLikelyNode,statefullCache:!1,noScaleCache:!0,dirty:!0,__corner:0,paintFirst:"fill",stateProperties:"top left width height scaleX scaleY flipX flipY originX originY transformMatrix stroke strokeWidth strokeDashArray strokeLineCap strokeLineJoin strokeMiterLimit angle opacity fill globalCompositeOperation shadow clipTo visible backgroundColor skewX skewY fillRule paintFirst".split(" "),cacheProperties:"fill stroke strokeWidth strokeDashArray width height paintFirst strokeLineCap strokeLineJoin strokeMiterLimit backgroundColor".split(" "),clipPath:void 0,inverted:!1,absolutePositioned:!1,initialize:function(t){t&&this.setOptions(t)},_createCacheCanvas:function(){this._cacheProperties={},this._cacheCanvas=n.util.createCanvasElement(),this._cacheContext=this._cacheCanvas.getContext("2d"),this._updateCacheCanvas(),this.dirty=!0},_limitCacheSize:function(t){var e=n.perfLimitSizeTotal,i=t.width,r=t.height,o=n.maxCacheSideLimit,s=n.minCacheSideLimit;if(i<=o&&r<=o&&i*r<=e)return i<s&&(t.width=s),r<s&&(t.height=s),t;var a=n.util.limitDimsByArea(i/r,e),l=n.util.capValue,u=l(s,a.x,o),c=l(s,a.y,o);return i>u&&(t.zoomX/=i/u,t.width=u,t.capped=!0),r>c&&(t.zoomY/=r/c,t.height=c,t.capped=!0),t},_getCacheCanvasDimensions:function(){var t=this.getTotalObjectScaling(),e=this._getNonTransformedDimensions(),n=t.scaleX,i=t.scaleY;return{width:e.x*n+2,height:e.y*i+2,zoomX:n,zoomY:i,x:e.x,y:e.y}},_updateCacheCanvas:function(){var t=this.canvas;if(this.noScaleCache&&t&&t._currentTransform){var e=t._currentTransform.action;if(this===t._currentTransform.target&&e.slice&&"scale"===e.slice(0,5))return!1}var i,r,o=this._cacheCanvas,s=this._limitCacheSize(this._getCacheCanvasDimensions()),a=n.minCacheSideLimit,l=s.width,u=s.height,c=s.zoomX,h=s.zoomY,p=l!==this.cacheWidth||u!==this.cacheHeight,d=0,f=0,g=!1;if(p){var m=this._cacheCanvas.width,v=this._cacheCanvas.height,y=l>m||u>v;g=y||(l<.9*m||u<.9*v)&&m>a&&v>a,y&&!s.capped&&(l>a||u>a)&&(d=.1*l,f=.1*u)}return!(!p&&this.zoomX===c&&this.zoomY===h||(g?(o.width=Math.ceil(l+d),o.height=Math.ceil(u+f)):(this._cacheContext.setTransform(1,0,0,1,0,0),this._cacheContext.clearRect(0,0,o.width,o.height)),i=s.x*c/2,r=s.y*h/2,this.cacheTranslationX=Math.round(o.width/2-i)+i,this.cacheTranslationY=Math.round(o.height/2-r)+r,this.cacheWidth=l,this.cacheHeight=u,this._cacheContext.translate(this.cacheTranslationX,this.cacheTranslationY),this._cacheContext.scale(c,h),this.zoomX=c,this.zoomY=h,0))},setOptions:function(t){this._setOptions(t),this._initGradient(t.fill,"fill"),this._initGradient(t.stroke,"stroke"),this._initClipping(t),this._initPattern(t.fill,"fill"),this._initPattern(t.stroke,"stroke")},transform:function(t){var e;e=this.group&&!this.group._transformDone?this.calcTransformMatrix():this.calcOwnMatrix(),t.transform(e[0],e[1],e[2],e[3],e[4],e[5])},toObject:function(t){var e=n.Object.NUM_FRACTION_DIGITS,i={type:this.type,version:n.version,originX:this.originX,originY:this.originY,left:o(this.left,e),top:o(this.top,e),width:o(this.width,e),height:o(this.height,e),fill:this.fill&&this.fill.toObject?this.fill.toObject():this.fill,stroke:this.stroke&&this.stroke.toObject?this.stroke.toObject():this.stroke,strokeWidth:o(this.strokeWidth,e),strokeDashArray:this.strokeDashArray?this.strokeDashArray.concat():this.strokeDashArray,strokeLineCap:this.strokeLineCap,strokeLineJoin:this.strokeLineJoin,strokeMiterLimit:o(this.strokeMiterLimit,e),scaleX:o(this.scaleX,e),scaleY:o(this.scaleY,e),angle:o(this.angle,e),flipX:this.flipX,flipY:this.flipY,opacity:o(this.opacity,e),shadow:this.shadow&&this.shadow.toObject?this.shadow.toObject():this.shadow,visible:this.visible,clipTo:this.clipTo&&String(this.clipTo),backgroundColor:this.backgroundColor,fillRule:this.fillRule,paintFirst:this.paintFirst,globalCompositeOperation:this.globalCompositeOperation,transformMatrix:this.transformMatrix?this.transformMatrix.concat():null,skewX:o(this.skewX,e),skewY:o(this.skewY,e)};return this.clipPath&&(i.clipPath=this.clipPath.toObject(t),i.clipPath.inverted=this.clipPath.inverted,i.clipPath.absolutePositioned=this.clipPath.absolutePositioned),n.util.populateWithProperties(this,i,t),this.includeDefaultValues||(i=this._removeDefaultValues(i)),i},toDatalessObject:function(t){return this.toObject(t)},_removeDefaultValues:function(t){var e=n.util.getKlass(t.type).prototype;return e.stateProperties.forEach(function(n){t[n]===e[n]&&delete t[n],"[object Array]"===Object.prototype.toString.call(t[n])&&"[object Array]"===Object.prototype.toString.call(e[n])&&0===t[n].length&&0===e[n].length&&delete t[n]}),t},toString:function(){return"#<fabric."+s(this.type)+">"},getObjectScaling:function(){var t=this.scaleX,e=this.scaleY;if(this.group){var n=this.group.getObjectScaling();t*=n.scaleX,e*=n.scaleY}return{scaleX:t,scaleY:e}},getTotalObjectScaling:function(){var t=this.getObjectScaling(),e=t.scaleX,n=t.scaleY;if(this.canvas){var i=this.canvas.getZoom(),r=this.canvas.getRetinaScaling();e*=i*r,n*=i*r}return{scaleX:e,scaleY:n}},getObjectOpacity:function(){var t=this.opacity;return this.group&&(t*=this.group.getObjectOpacity()),t},_set:function(t,e){var i=this[t]!==e,r=!1;return("scaleX"===t||"scaleY"===t)&&(e=this._constrainScale(e)),"scaleX"===t&&e<0?(this.flipX=!this.flipX,e*=-1):"scaleY"===t&&e<0?(this.flipY=!this.flipY,e*=-1):"shadow"!==t||!e||e instanceof n.Shadow?"dirty"===t&&this.group&&this.group.set("dirty",e):e=new n.Shadow(e),this[t]=e,i&&(r=this.group&&this.group.isOnACache(),this.cacheProperties.indexOf(t)>-1?(this.dirty=!0,r&&this.group.set("dirty",!0)):r&&this.stateProperties.indexOf(t)>-1&&this.group.set("dirty",!0)),this},setOnGroup:function(){},getViewportTransform:function(){return this.canvas&&this.canvas.viewportTransform?this.canvas.viewportTransform:n.iMatrix.concat()},isNotVisible:function(){return 0===this.opacity||0===this.width&&0===this.height||!this.visible},render:function(t){this.isNotVisible()||this.canvas&&this.canvas.skipOffscreen&&!this.group&&!this.isOnScreen()||(t.save(),this._setupCompositeOperation(t),this.drawSelectionBackground(t),this.transform(t),this._setOpacity(t),this._setShadow(t,this),this.transformMatrix&&t.transform.apply(t,this.transformMatrix),this.clipTo&&n.util.clipContext(this,t),this.shouldCache()?(this.renderCache(),this.drawCacheOnCanvas(t)):(this._removeCacheCanvas(),this.dirty=!1,this.drawObject(t),this.objectCaching&&this.statefullCache&&this.saveState({propertySet:"cacheProperties"})),this.clipTo&&t.restore(),t.restore())},renderCache:function(t){t=t||{},this._cacheCanvas||this._createCacheCanvas(),this.isCacheDirty(!1)&&(this.statefullCache&&this.saveState({propertySet:"cacheProperties"}),this.drawObject(this._cacheContext,t.forClipping),this.dirty=!1)},_removeCacheCanvas:function(){this._cacheCanvas=null,this.cacheWidth=0,this.cacheHeight=0},needsItsOwnCache:function(){return"stroke"===this.paintFirst&&"object"==typeof this.shadow||!!this.clipPath},shouldCache:function(){return this.ownCaching=this.objectCaching&&(!this.group||this.needsItsOwnCache()||!this.group.isOnACache()),this.ownCaching},willDrawShadow:function(){return!!this.shadow&&(0!==this.shadow.offsetX||0!==this.shadow.offsetY)},drawClipPathOnCache:function(t){var e=this.clipPath;if(t.save(),t.globalCompositeOperation=e.inverted?"destination-out":"destination-in",e.absolutePositioned){var i=n.util.invertTransform(this.calcTransformMatrix());t.transform(i[0],i[1],i[2],i[3],i[4],i[5])}e.transform(t),t.scale(1/e.zoomX,1/e.zoomY),t.drawImage(e._cacheCanvas,-e.cacheTranslationX,-e.cacheTranslationY),t.restore()},drawObject:function(t,e){e?this._setClippingProperties(t):(this._renderBackground(t),this._setStrokeStyles(t,this),this._setFillStyles(t,this)),this._render(t),this._drawClipPath(t)},_drawClipPath:function(t){var e=this.clipPath;e&&(e.canvas=this.canvas,e.shouldCache(),e._transformDone=!0,e.renderCache({forClipping:!0}),this.drawClipPathOnCache(t))},drawCacheOnCanvas:function(t){t.scale(1/this.zoomX,1/this.zoomY),t.drawImage(this._cacheCanvas,-this.cacheTranslationX,-this.cacheTranslationY)},isCacheDirty:function(t){if(this.isNotVisible())return!1;if(this._cacheCanvas&&!t&&this._updateCacheCanvas())return!0;if(this.dirty||this.clipPath&&this.clipPath.absolutePositioned||this.statefullCache&&this.hasStateChanged("cacheProperties")){if(this._cacheCanvas&&!t){var e=this.cacheWidth/this.zoomX,n=this.cacheHeight/this.zoomY;this._cacheContext.clearRect(-e/2,-n/2,e,n)}return!0}return!1},_renderBackground:function(t){if(this.backgroundColor){var e=this._getNonTransformedDimensions();t.fillStyle=this.backgroundColor,t.fillRect(-e.x/2,-e.y/2,e.x,e.y),this._removeShadow(t)}},_setOpacity:function(t){this.group&&!this.group._transformDone?t.globalAlpha=this.getObjectOpacity():t.globalAlpha*=this.opacity},_setStrokeStyles:function(t,e){e.stroke&&(t.lineWidth=e.strokeWidth,t.lineCap=e.strokeLineCap,t.lineJoin=e.strokeLineJoin,t.miterLimit=e.strokeMiterLimit,t.strokeStyle=e.stroke.toLive?e.stroke.toLive(t,this):e.stroke)},_setFillStyles:function(t,e){e.fill&&(t.fillStyle=e.fill.toLive?e.fill.toLive(t,this):e.fill)},_setClippingProperties:function(t){t.globalAlpha=1,t.strokeStyle="transparent",t.fillStyle="#000000"},_setLineDash:function(t,e,n){e&&(1&e.length&&e.push.apply(e,e),l?t.setLineDash(e):n&&n(t))},_renderControls:function(t,e){var i,r,o,s=this.getViewportTransform(),l=this.calcTransformMatrix();r=void 0!==(e=e||{}).hasBorders?e.hasBorders:this.hasBorders,o=void 0!==e.hasControls?e.hasControls:this.hasControls,l=n.util.multiplyTransformMatrices(s,l),i=n.util.qrDecompose(l),t.save(),t.translate(i.translateX,i.translateY),t.lineWidth=1*this.borderScaleFactor,this.group||(t.globalAlpha=this.isMoving?this.borderOpacityWhenMoving:1),e.forActiveSelection?(t.rotate(a(i.angle)),r&&this.drawBordersInGroup(t,i,e)):(t.rotate(a(this.angle)),r&&this.drawBorders(t,e)),o&&this.drawControls(t,e),t.restore()},_setShadow:function(t){if(this.shadow){var e=this.canvas&&this.canvas.viewportTransform[0]||1,i=this.canvas&&this.canvas.viewportTransform[3]||1,r=this.getObjectScaling();this.canvas&&this.canvas._isRetinaScaling()&&(e*=n.devicePixelRatio,i*=n.devicePixelRatio),t.shadowColor=this.shadow.color,t.shadowBlur=this.shadow.blur*n.browserShadowBlurConstant*(e+i)*(r.scaleX+r.scaleY)/4,t.shadowOffsetX=this.shadow.offsetX*e*r.scaleX,t.shadowOffsetY=this.shadow.offsetY*i*r.scaleY}},_removeShadow:function(t){this.shadow&&(t.shadowColor="",t.shadowBlur=t.shadowOffsetX=t.shadowOffsetY=0)},_applyPatternGradientTransform:function(t,e){if(!e||!e.toLive)return{offsetX:0,offsetY:0};var n=e.gradientTransform||e.patternTransform,i=-this.width/2+e.offsetX||0,r=-this.height/2+e.offsetY||0;return t.translate(i,r),n&&t.transform(n[0],n[1],n[2],n[3],n[4],n[5]),{offsetX:i,offsetY:r}},_renderPaintInOrder:function(t){"stroke"===this.paintFirst?(this._renderStroke(t),this._renderFill(t)):(this._renderFill(t),this._renderStroke(t))},_renderFill:function(t){this.fill&&(t.save(),this._applyPatternGradientTransform(t,this.fill),"evenodd"===this.fillRule?t.fill("evenodd"):t.fill(),t.restore())},_renderStroke:function(t){this.stroke&&0!==this.strokeWidth&&(this.shadow&&!this.shadow.affectStroke&&this._removeShadow(t),t.save(),this._setLineDash(t,this.strokeDashArray,this._renderDashedStroke),this._applyPatternGradientTransform(t,this.stroke),t.stroke(),t.restore())},_findCenterFromElement:function(){return{x:this.left+this.width/2,y:this.top+this.height/2}},_assignTransformMatrixProps:function(){if(this.transformMatrix){var t=n.util.qrDecompose(this.transformMatrix);this.flipX=!1,this.flipY=!1,this.set("scaleX",t.scaleX),this.set("scaleY",t.scaleY),this.angle=t.angle,this.skewX=t.skewX,this.skewY=0}},_removeTransformMatrix:function(t){var e=this._findCenterFromElement();this.transformMatrix&&(this._assignTransformMatrixProps(),e=n.util.transformPoint(e,this.transformMatrix)),this.transformMatrix=null,t&&(this.scaleX*=t.scaleX,this.scaleY*=t.scaleY,this.cropX=t.cropX,this.cropY=t.cropY,e.x+=t.offsetLeft,e.y+=t.offsetTop,this.width=t.width,this.height=t.height),this.setPositionByOrigin(e,"center","center")},clone:function(t,e){var i=this.toObject(e);this.constructor.fromObject?this.constructor.fromObject(i,t):n.Object._fromObject("Object",i,t)},cloneAsImage:function(t,e){var i=this.toDataURL(e);return n.util.loadImage(i,function(e){t&&t(new n.Image(e))}),this},toDataURL:function(t){t||(t={});var e=n.util.saveObjectTransform(this);t.withoutTransform&&n.util.resetObjectTransform(this);var i=n.util.createCanvasElement(),r=this.getBoundingRect(!0,!0);i.width=r.width,i.height=r.height;var o=new n.StaticCanvas(i,{enableRetinaScaling:t.enableRetinaScaling,renderOnAddRemove:!1,skipOffscreen:!1});"jpg"===t.format&&(t.format="jpeg"),"jpeg"===t.format&&(o.backgroundColor="#fff"),this.setPositionByOrigin(new n.Point(o.width/2,o.height/2),"center","center");var s=this.canvas;o.add(this);var a=o.toDataURL(t);return this.set(e).setCoords(),this.canvas=s,o._objects=[],o.dispose(),o=null,a},isType:function(t){return this.type===t},complexity:function(){return 1},toJSON:function(t){return this.toObject(t)},setGradient:function(t,e){e||(e={});var i={colorStops:[]};return i.type=e.type||(e.r1||e.r2?"radial":"linear"),i.coords={x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},(e.r1||e.r2)&&(i.coords.r1=e.r1,i.coords.r2=e.r2),i.gradientTransform=e.gradientTransform,n.Gradient.prototype.addColorStop.call(i,e.colorStops),this.set(t,n.Gradient.forObject(this,i))},setPatternFill:function(t,e){return this.set("fill",new n.Pattern(t,e))},setShadow:function(t){return this.set("shadow",t?new n.Shadow(t):null)},setColor:function(t){return this.set("fill",t),this},rotate:function(t){var e=("center"!==this.originX||"center"!==this.originY)&&this.centeredRotation;return e&&this._setOriginToCenter(),this.set("angle",t),e&&this._resetOrigin(),this},centerH:function(){return this.canvas&&this.canvas.centerObjectH(this),this},viewportCenterH:function(){return this.canvas&&this.canvas.viewportCenterObjectH(this),this},centerV:function(){return this.canvas&&this.canvas.centerObjectV(this),this},viewportCenterV:function(){return this.canvas&&this.canvas.viewportCenterObjectV(this),this},center:function(){return this.canvas&&this.canvas.centerObject(this),this},viewportCenter:function(){return this.canvas&&this.canvas.viewportCenterObject(this),this},getLocalPointer:function(t,e){e=e||this.canvas.getPointer(t);var i=new n.Point(e.x,e.y),r=this._getLeftTopCoords();return this.angle&&(i=n.util.rotatePoint(i,r,a(-this.angle))),{x:i.x-r.x,y:i.y-r.y}},_setupCompositeOperation:function(t){this.globalCompositeOperation&&(t.globalCompositeOperation=this.globalCompositeOperation)}}),n.util.createAccessors&&n.util.createAccessors(n.Object),i(n.Object.prototype,n.Observable),n.Object.NUM_FRACTION_DIGITS=2,n.Object._fromObject=function(t,e,i,o){var s=n[t];e=r(e,!0),n.util.enlivenPatterns([e.fill,e.stroke],function(t){void 0!==t[0]&&(e.fill=t[0]),void 0!==t[1]&&(e.stroke=t[1]),n.util.enlivenObjects([e.clipPath],function(t){e.clipPath=t[0];var n=o?new s(e[o],e):new s(e);i&&i(n)})})},n.Object.__uid=0)}(),f=S.util.degreesToRadians,g={left:-.5,center:0,right:.5},m={top:-.5,center:0,bottom:.5},S.util.object.extend(S.Object.prototype,{translateToGivenOrigin:function(t,e,n,i,r){var o,s,a,l=t.x,u=t.y;return"string"==typeof e?e=g[e]:e-=.5,"string"==typeof i?i=g[i]:i-=.5,o=i-e,"string"==typeof n?n=m[n]:n-=.5,"string"==typeof r?r=m[r]:r-=.5,s=r-n,(o||s)&&(a=this._getTransformedDimensions(),l=t.x+o*a.x,u=t.y+s*a.y),new S.Point(l,u)},translateToCenterPoint:function(t,e,n){var i=this.translateToGivenOrigin(t,e,n,"center","center");return this.angle?S.util.rotatePoint(i,t,f(this.angle)):i},translateToOriginPoint:function(t,e,n){var i=this.translateToGivenOrigin(t,"center","center",e,n);return this.angle?S.util.rotatePoint(i,t,f(this.angle)):i},getCenterPoint:function(){var t=new S.Point(this.left,this.top);return this.translateToCenterPoint(t,this.originX,this.originY)},getPointByOrigin:function(t,e){var n=this.getCenterPoint();return this.translateToOriginPoint(n,t,e)},toLocalPoint:function(t,e,n){var i,r,o=this.getCenterPoint();return i=void 0!==e&&void 0!==n?this.translateToGivenOrigin(o,"center","center",e,n):new S.Point(this.left,this.top),r=new S.Point(t.x,t.y),this.angle&&(r=S.util.rotatePoint(r,o,-f(this.angle))),r.subtractEquals(i)},setPositionByOrigin:function(t,e,n){var i=this.translateToCenterPoint(t,e,n),r=this.translateToOriginPoint(i,this.originX,this.originY);this.set("left",r.x),this.set("top",r.y)},adjustPosition:function(t){var e,n,i=f(this.angle),r=this.getScaledWidth(),o=S.util.cos(i)*r,s=S.util.sin(i)*r;e="string"==typeof this.originX?g[this.originX]:this.originX-.5,this.left+=o*((n="string"==typeof t?g[t]:t-.5)-e),this.top+=s*(n-e),this.setCoords(),this.originX=t},_setOriginToCenter:function(){this._originalOriginX=this.originX,this._originalOriginY=this.originY;var t=this.getCenterPoint();this.originX="center",this.originY="center",this.left=t.x,this.top=t.y},_resetOrigin:function(){var t=this.translateToOriginPoint(this.getCenterPoint(),this._originalOriginX,this._originalOriginY);this.originX=this._originalOriginX,this.originY=this._originalOriginY,this.left=t.x,this.top=t.y,this._originalOriginX=null,this._originalOriginY=null},_getLeftTopCoords:function(){return this.translateToOriginPoint(this.getCenterPoint(),"left","top")}}),function(){var t=S.util.degreesToRadians,e=S.util.multiplyTransformMatrices,n=S.util.transformPoint;S.util.object.extend(S.Object.prototype,{oCoords:null,aCoords:null,ownMatrixCache:null,matrixCache:null,getCoords:function(t,e){this.oCoords||this.setCoords();var n=t?this.aCoords:this.oCoords;return function(t){return[new S.Point(t.tl.x,t.tl.y),new S.Point(t.tr.x,t.tr.y),new S.Point(t.br.x,t.br.y),new S.Point(t.bl.x,t.bl.y)]}(e?this.calcCoords(t):n)},intersectsWithRect:function(t,e,n,i){var r=this.getCoords(n,i);return"Intersection"===S.Intersection.intersectPolygonRectangle(r,t,e).status},intersectsWithObject:function(t,e,n){return"Intersection"===S.Intersection.intersectPolygonPolygon(this.getCoords(e,n),t.getCoords(e,n)).status||t.isContainedWithinObject(this,e,n)||this.isContainedWithinObject(t,e,n)},isContainedWithinObject:function(t,e,n){for(var i=this.getCoords(e,n),r=0,o=t._getImageLines(n?t.calcCoords(e):e?t.aCoords:t.oCoords);r<4;r++)if(!t.containsPoint(i[r],o))return!1;return!0},isContainedWithinRect:function(t,e,n,i){var r=this.getBoundingRect(n,i);return r.left>=t.x&&r.left+r.width<=e.x&&r.top>=t.y&&r.top+r.height<=e.y},containsPoint:function(t,e,n,i){e=e||this._getImageLines(i?this.calcCoords(n):n?this.aCoords:this.oCoords);var r=this._findCrossPoints(t,e);return 0!==r&&r%2==1},isOnScreen:function(t){if(!this.canvas)return!1;for(var e,n=this.canvas.vptCoords.tl,i=this.canvas.vptCoords.br,r=this.getCoords(!0,t),o=0;o<4;o++)if((e=r[o]).x<=i.x&&e.x>=n.x&&e.y<=i.y&&e.y>=n.y)return!0;return!!this.intersectsWithRect(n,i,!0,t)||this._containsCenterOfCanvas(n,i,t)},_containsCenterOfCanvas:function(t,e,n){return!!this.containsPoint({x:(t.x+e.x)/2,y:(t.y+e.y)/2},null,!0,n)},isPartiallyOnScreen:function(t){if(!this.canvas)return!1;var e=this.canvas.vptCoords.tl,n=this.canvas.vptCoords.br;return!!this.intersectsWithRect(e,n,!0,t)||this._containsCenterOfCanvas(e,n,t)},_getImageLines:function(t){return{topline:{o:t.tl,d:t.tr},rightline:{o:t.tr,d:t.br},bottomline:{o:t.br,d:t.bl},leftline:{o:t.bl,d:t.tl}}},_findCrossPoints:function(t,e){var n,i,r,o=0;for(var s in e)if(!((r=e[s]).o.y<t.y&&r.d.y<t.y||r.o.y>=t.y&&r.d.y>=t.y||((r.o.x===r.d.x&&r.o.x>=t.x?r.o.x:-(t.y-(n=0)*t.x-(r.o.y-(i=(r.d.y-r.o.y)/(r.d.x-r.o.x))*r.o.x))/(n-i))>=t.x&&(o+=1),2!==o)))break;return o},getBoundingRect:function(t,e){var n=this.getCoords(t,e);return S.util.makeBoundingBoxFromPoints(n)},getScaledWidth:function(){return this._getTransformedDimensions().x},getScaledHeight:function(){return this._getTransformedDimensions().y},_constrainScale:function(t){return Math.abs(t)<this.minScaleLimit?t<0?-this.minScaleLimit:this.minScaleLimit:0===t?1e-4:t},scale:function(t){return this._set("scaleX",t),this._set("scaleY",t),this.setCoords()},scaleToWidth:function(t,e){var n=this.getBoundingRect(e).width/this.getScaledWidth();return this.scale(t/this.width/n)},scaleToHeight:function(t,e){var n=this.getBoundingRect(e).height/this.getScaledHeight();return this.scale(t/this.height/n)},calcCoords:function(i){var r=this._calcRotateMatrix(),o=this._calcTranslateMatrix(),s=e(o,r),a=this.getViewportTransform(),l=i?s:e(a,s),u=this._getTransformedDimensions(),c=u.x/2,h=u.y/2,p=n({x:-c,y:-h},l),d=n({x:c,y:-h},l),f=n({x:-c,y:h},l),g=n({x:c,y:h},l);if(!i){var m=this.padding,v=t(this.angle),y=S.util.cos(v),b=S.util.sin(v),_=y*m,w=b*m,x=_+w,C=_-w;m&&(p.x-=C,p.y-=x,d.x+=x,d.y-=C,f.x-=x,f.y+=C,g.x+=C,g.y+=x);var k=new S.Point((p.x+f.x)/2,(p.y+f.y)/2),E=new S.Point((d.x+p.x)/2,(d.y+p.y)/2),T=new S.Point((g.x+d.x)/2,(g.y+d.y)/2),O=new S.Point((g.x+f.x)/2,(g.y+f.y)/2),I=new S.Point(E.x+b*this.rotatingPointOffset,E.y-y*this.rotatingPointOffset)}var A={tl:p,tr:d,br:g,bl:f};return i||(A.ml=k,A.mt=E,A.mr=T,A.mb=O,A.mtr=I),A},setCoords:function(t,e){return this.oCoords=this.calcCoords(t),e||(this.aCoords=this.calcCoords(!0)),t||this._setCornerCoords&&this._setCornerCoords(),this},_calcRotateMatrix:function(){if(this.angle){var e=t(this.angle),n=S.util.cos(e),i=S.util.sin(e);return[n,i,-i,n,0,0]}return S.iMatrix.concat()},_calcTranslateMatrix:function(){var t=this.getCenterPoint();return[1,0,0,1,t.x,t.y]},transformMatrixKey:function(t){var e="";return!t&&this.group&&(e=this.group.transformMatrixKey(t)+"_"),e+this.top+"_"+this.left+"_"+this.scaleX+"_"+this.scaleY+"_"+this.skewX+"_"+this.skewY+"_"+this.angle+"_"+this.originX+"_"+this.originY+"_"+this.width+"_"+this.height+"_"+this.strokeWidth+this.flipX+this.flipY},calcTransformMatrix:function(t){if(t)return this.calcOwnMatrix();var n=this.transformMatrixKey(),i=this.matrixCache||(this.matrixCache={});if(i.key===n)return i.value;var r=this.calcOwnMatrix();return this.group&&(r=e(this.group.calcTransformMatrix(),r)),i.key=n,i.value=r,r},calcOwnMatrix:function(){var t=this.transformMatrixKey(!0),n=this.ownMatrixCache||(this.ownMatrixCache={});if(n.key===t)return n.value;var i,r=this._calcTranslateMatrix(),o=this._calcDimensionsTransformMatrix(this.skewX,this.skewY,!0);return this.angle&&(i=this._calcRotateMatrix(),r=e(r,i)),r=e(r,o),n.key=t,n.value=r,r},_calcDimensionsTransformMatrix:function(n,i,r){var o,s=[this.scaleX*(r&&this.flipX?-1:1),0,0,this.scaleY*(r&&this.flipY?-1:1),0,0];return n&&(o=[1,0,Math.tan(t(n)),1],s=e(s,o,!0)),i&&(o=[1,Math.tan(t(i)),0,1],s=e(s,o,!0)),s},_getNonTransformedDimensions:function(){var t=this.strokeWidth;return{x:this.width+t,y:this.height+t}},_getTransformedDimensions:function(t,e){void 0===t&&(t=this.skewX),void 0===e&&(e=this.skewY);var n=this._getNonTransformedDimensions();if(0===t&&0===e)return{x:n.x*this.scaleX,y:n.y*this.scaleY};var i,r,o=n.x/2,s=n.y/2,a=[{x:-o,y:-s},{x:o,y:-s},{x:-o,y:s},{x:o,y:s}],l=this._calcDimensionsTransformMatrix(t,e,!1);for(i=0;i<a.length;i++)a[i]=S.util.transformPoint(a[i],l);return{x:(r=S.util.makeBoundingBoxFromPoints(a)).width,y:r.height}},_calculateCurrentDimensions:function(){var t=this.getViewportTransform(),e=this._getTransformedDimensions();return S.util.transformPoint(e,t,!0).scalarAdd(2*this.padding)}})}(),S.util.object.extend(S.Object.prototype,{sendToBack:function(){return this.group?S.StaticCanvas.prototype.sendToBack.call(this.group,this):this.canvas.sendToBack(this),this},bringToFront:function(){return this.group?S.StaticCanvas.prototype.bringToFront.call(this.group,this):this.canvas.bringToFront(this),this},sendBackwards:function(t){return this.group?S.StaticCanvas.prototype.sendBackwards.call(this.group,this,t):this.canvas.sendBackwards(this,t),this},bringForward:function(t){return this.group?S.StaticCanvas.prototype.bringForward.call(this.group,this,t):this.canvas.bringForward(this,t),this},moveTo:function(t){return this.group&&"activeSelection"!==this.group.type?S.StaticCanvas.prototype.moveTo.call(this.group,this,t):this.canvas.moveTo(this,t),this}}),function(){function t(t,e){if(e){if(e.toLive)return t+": url(#SVGID_"+e.id+"); ";var n=new S.Color(e),i=t+": "+n.toRgb()+"; ",r=n.getAlpha();return 1!==r&&(i+=t+"-opacity: "+r.toString()+"; "),i}return t+": none; "}var e=S.util.toFixed;S.util.object.extend(S.Object.prototype,{getSvgStyles:function(e){var n=this.fillRule,i=this.strokeWidth?this.strokeWidth:"0",r=this.strokeDashArray?this.strokeDashArray.join(" "):"none",o=this.strokeLineCap?this.strokeLineCap:"butt",s=this.strokeLineJoin?this.strokeLineJoin:"miter",a=this.strokeMiterLimit?this.strokeMiterLimit:"4",l=void 0!==this.opacity?this.opacity:"1",u=this.visible?"":" visibility: hidden;",c=e?"":this.getSvgFilter(),h=t("fill",this.fill);return[t("stroke",this.stroke),"stroke-width: ",i,"; ","stroke-dasharray: ",r,"; ","stroke-linecap: ",o,"; ","stroke-linejoin: ",s,"; ","stroke-miterlimit: ",a,"; ",h,"fill-rule: ",n,"; ","opacity: ",l,";",c,u].join("")},getSvgSpanStyles:function(e,n){var i=e.fontFamily?"font-family: "+(-1===e.fontFamily.indexOf("'")&&-1===e.fontFamily.indexOf('"')?"'"+e.fontFamily+"'":e.fontFamily)+"; ":"",r=e.strokeWidth?"stroke-width: "+e.strokeWidth+"; ":"",o=(i=i,e.fontSize?"font-size: "+e.fontSize+"px; ":""),s=e.fontStyle?"font-style: "+e.fontStyle+"; ":"",a=e.fontWeight?"font-weight: "+e.fontWeight+"; ":"",l=e.fill?t("fill",e.fill):"",u=e.stroke?t("stroke",e.stroke):"",c=this.getSvgTextDecoration(e);return c&&(c="text-decoration: "+c+"; "),[u,r,i,o,s,a,c,l,e.deltaY?"baseline-shift: "+-e.deltaY+"; ":"",n?"white-space: pre; ":""].join("")},getSvgTextDecoration:function(t){return"overline"in t||"underline"in t||"linethrough"in t?(t.overline?"overline ":"")+(t.underline?"underline ":"")+(t.linethrough?"line-through ":""):""},getSvgFilter:function(){return this.shadow?"filter: url(#SVGID_"+this.shadow.id+");":""},getSvgCommons:function(){return[this.id?'id="'+this.id+'" ':"",this.clipPath?'clip-path="url(#'+this.clipPath.clipPathId+')" ':""].join("")},getSvgTransform:function(){var t=this.angle,n=this.skewX%360,i=this.skewY%360,r=this.getCenterPoint(),o=S.Object.NUM_FRACTION_DIGITS,s="translate("+e(r.x,o)+" "+e(r.y,o)+")",a=0!==t?" rotate("+e(t,o)+")":"",l=1===this.scaleX&&1===this.scaleY?"":" scale("+e(this.scaleX,o)+" "+e(this.scaleY,o)+")",u=0!==n?" skewX("+e(n,o)+")":"",c=0!==i?" skewY("+e(i,o)+")":"";return[s,a,l,this.flipX?" matrix(-1 0 0 1 0 0) ":"",this.flipY?" matrix(1 0 0 -1 0 0)":"",u,c].join("")},getSvgTransformMatrix:function(){return this.transformMatrix?" matrix("+this.transformMatrix.join(" ")+") ":""},_setSVGBg:function(t){if(this.backgroundColor){var n=S.Object.NUM_FRACTION_DIGITS;t.push("\t\t<rect ",this._getFillAttributes(this.backgroundColor),' x="',e(-this.width/2,n),'" y="',e(-this.height/2,n),'" width="',e(this.width,n),'" height="',e(this.height,n),'"></rect>\n')}},_createBaseSVGMarkup:function(){var t=[],e=this.clipPath;return this.fill&&this.fill.toLive&&t.push(this.fill.toSVG(this,!1)),this.stroke&&this.stroke.toLive&&t.push(this.stroke.toSVG(this,!1)),this.shadow&&t.push(this.shadow.toSVG(this)),e&&(e.clipPathId="CLIPPATH_"+S.Object.__uid++,t.push('<clipPath id="'+e.clipPathId+'" >\n\t',this.clipPath.toSVG(),"</clipPath>\n")),t},addPaintOrder:function(){return"fill"!==this.paintFirst?' paint-order="'+this.paintFirst+'" ':""}})}(),function(){var t=S.util.object.extend;function e(e,n,i){var r={};i.forEach(function(t){r[t]=e[t]}),t(e[n],r,!0)}S.util.object.extend(S.Object.prototype,{hasStateChanged:function(t){var e="_"+(t=t||"stateProperties");return Object.keys(this[e]).length<this[t].length||!function t(e,n,i){if(e===n)return!0;if(Array.isArray(e)){if(!Array.isArray(n)||e.length!==n.length)return!1;for(var r=0,o=e.length;r<o;r++)if(!t(e[r],n[r]))return!1;return!0}if(e&&"object"==typeof e){var s,a=Object.keys(e);if(!n||"object"!=typeof n||!i&&a.length!==Object.keys(n).length)return!1;for(r=0,o=a.length;r<o;r++)if(!t(e[s=a[r]],n[s]))return!1;return!0}}(this[e],this,!0)},saveState:function(t){var n=t&&t.propertySet||"stateProperties",i="_"+n;return this[i]?(e(this,i,this[n]),t&&t.stateProperties&&e(this,i,t.stateProperties),this):this.setupState(t)},setupState:function(t){var e=(t=t||{}).propertySet||"stateProperties";return t.propertySet=e,this["_"+e]={},this.saveState(t),this}})}(),function(){var t=S.util.degreesToRadians;S.util.object.extend(S.Object.prototype,{_controlsVisibility:null,_findTargetCorner:function(t){if(!this.hasControls||this.group||!this.canvas||this.canvas._activeObject!==this)return!1;var e,n,i=t.x,r=t.y;for(var o in this.__corner=0,this.oCoords)if(this.isControlVisible(o)&&("mtr"!==o||this.hasRotatingPoint)&&(!this.get("lockUniScaling")||"mt"!==o&&"mr"!==o&&"mb"!==o&&"ml"!==o)&&(n=this._getImageLines(this.oCoords[o].corner),0!==(e=this._findCrossPoints({x:i,y:r},n))&&e%2==1))return this.__corner=o,o;return!1},_setCornerCoords:function(){var e,n,i=this.oCoords,r=t(45-this.angle),o=.707106*this.cornerSize,s=o*S.util.cos(r),a=o*S.util.sin(r);for(var l in i)i[l].corner={tl:{x:(e=i[l].x)-a,y:(n=i[l].y)-s},tr:{x:e+s,y:n-a},bl:{x:e-s,y:n+a},br:{x:e+a,y:n+s}}},drawSelectionBackground:function(e){if(!this.selectionBackgroundColor||this.canvas&&!this.canvas.interactive||this.canvas&&this.canvas._activeObject!==this)return this;e.save();var n=this.getCenterPoint(),i=this._calculateCurrentDimensions(),r=this.canvas.viewportTransform;return e.translate(n.x,n.y),e.scale(1/r[0],1/r[3]),e.rotate(t(this.angle)),e.fillStyle=this.selectionBackgroundColor,e.fillRect(-i.x/2,-i.y/2,i.x,i.y),e.restore(),this},drawBorders:function(t,e){e=e||{};var n=this._calculateCurrentDimensions(),i=1/this.borderScaleFactor,r=n.x+i,o=n.y+i,s=void 0!==e.hasRotatingPoint?e.hasRotatingPoint:this.hasRotatingPoint,a=void 0!==e.hasControls?e.hasControls:this.hasControls,l=void 0!==e.rotatingPointOffset?e.rotatingPointOffset:this.rotatingPointOffset;if(t.save(),t.strokeStyle=e.borderColor||this.borderColor,this._setLineDash(t,e.borderDashArray||this.borderDashArray,null),t.strokeRect(-r/2,-o/2,r,o),s&&this.isControlVisible("mtr")&&a){var u=-o/2;t.beginPath(),t.moveTo(0,u),t.lineTo(0,u-l),t.stroke()}return t.restore(),this},drawBordersInGroup:function(t,e,n){n=n||{};var i=this._getNonTransformedDimensions(),r=S.util.customTransformMatrix(e.scaleX,e.scaleY,e.skewX),o=S.util.transformPoint(i,r),s=1/this.borderScaleFactor,a=o.x+s,l=o.y+s;return t.save(),this._setLineDash(t,n.borderDashArray||this.borderDashArray,null),t.strokeStyle=n.borderColor||this.borderColor,t.strokeRect(-a/2,-l/2,a,l),t.restore(),this},drawControls:function(t,e){e=e||{};var n=this._calculateCurrentDimensions(),i=n.x,r=n.y,o=e.cornerSize||this.cornerSize,s=-(i+o)/2,a=-(r+o)/2,l=void 0!==e.hasRotatingPoint?e.hasRotatingPoint:this.hasRotatingPoint,u=(void 0!==e.transparentCorners?e.transparentCorners:this.transparentCorners)?"stroke":"fill";return t.save(),t.strokeStyle=t.fillStyle=e.cornerColor||this.cornerColor,this.transparentCorners||(t.strokeStyle=e.cornerStrokeColor||this.cornerStrokeColor),this._setLineDash(t,e.cornerDashArray||this.cornerDashArray,null),this._drawControl("tl",t,u,s,a,e),this._drawControl("tr",t,u,s+i,a,e),this._drawControl("bl",t,u,s,a+r,e),this._drawControl("br",t,u,s+i,a+r,e),this.get("lockUniScaling")||(this._drawControl("mt",t,u,s+i/2,a,e),this._drawControl("mb",t,u,s+i/2,a+r,e),this._drawControl("mr",t,u,s+i,a+r/2,e),this._drawControl("ml",t,u,s,a+r/2,e)),l&&this._drawControl("mtr",t,u,s+i/2,a-this.rotatingPointOffset,e),t.restore(),this},_drawControl:function(t,e,n,i,r,o){if(o=o||{},this.isControlVisible(t)){var s=this.cornerSize,a=!this.transparentCorners&&this.cornerStrokeColor;switch(o.cornerStyle||this.cornerStyle){case"circle":e.beginPath(),e.arc(i+s/2,r+s/2,s/2,0,2*Math.PI,!1),e[n](),a&&e.stroke();break;default:this.transparentCorners||e.clearRect(i,r,s,s),e[n+"Rect"](i,r,s,s),a&&e.strokeRect(i,r,s,s)}}},isControlVisible:function(t){return this._getControlsVisibility()[t]},setControlVisible:function(t,e){return this._getControlsVisibility()[t]=e,this},setControlsVisibility:function(t){for(var e in t||(t={}),t)this.setControlVisible(e,t[e]);return this},_getControlsVisibility:function(){return this._controlsVisibility||(this._controlsVisibility={tl:!0,tr:!0,br:!0,bl:!0,ml:!0,mt:!0,mr:!0,mb:!0,mtr:!0}),this._controlsVisibility},onDeselect:function(){},onSelect:function(){}})}(),S.util.object.extend(S.StaticCanvas.prototype,{FX_DURATION:500,fxCenterObjectH:function(t,e){var n=function(){},i=(e=e||{}).onComplete||n,r=e.onChange||n,o=this;return S.util.animate({startValue:t.left,endValue:this.getCenter().left,duration:this.FX_DURATION,onChange:function(e){t.set("left",e),o.requestRenderAll(),r()},onComplete:function(){t.setCoords(),i()}}),this},fxCenterObjectV:function(t,e){var n=function(){},i=(e=e||{}).onComplete||n,r=e.onChange||n,o=this;return S.util.animate({startValue:t.top,endValue:this.getCenter().top,duration:this.FX_DURATION,onChange:function(e){t.set("top",e),o.requestRenderAll(),r()},onComplete:function(){t.setCoords(),i()}}),this},fxRemove:function(t,e){var n=function(){},i=(e=e||{}).onComplete||n,r=e.onChange||n,o=this;return S.util.animate({startValue:t.opacity,endValue:0,duration:this.FX_DURATION,onChange:function(e){t.set("opacity",e),o.requestRenderAll(),r()},onComplete:function(){o.remove(t),i()}}),this}}),S.util.object.extend(S.Object.prototype,{animate:function(){if(arguments[0]&&"object"==typeof arguments[0]){var t,e=[];for(t in arguments[0])e.push(t);for(var n=0,i=e.length;n<i;n++)this._animate(t=e[n],arguments[0][t],arguments[1],n!==i-1)}else this._animate.apply(this,arguments);return this},_animate:function(t,e,n,i){var r,o=this;e=e.toString(),n=n?S.util.object.clone(n):{},~t.indexOf(".")&&(r=t.split("."));var s=r?this.get(r[0])[r[1]]:this.get(t);"from"in n||(n.from=s),e=~e.indexOf("=")?s+parseFloat(e.replace("=","")):parseFloat(e),S.util.animate({startValue:n.from,endValue:e,byValue:n.by,easing:n.easing,duration:n.duration,abort:n.abort&&function(){return n.abort.call(o)},onChange:function(e,s,a){r?o[r[0]][r[1]]=e:o.set(t,e),i||n.onChange&&n.onChange(e,s,a)},onComplete:function(t,e,r){i||(o.setCoords(),n.onComplete&&n.onComplete(t,e,r))}})}}),function(t){"use strict";var n=e.fabric||(e.fabric={}),i=n.util.object.extend,r=n.util.object.clone,o={x1:1,x2:1,y1:1,y2:1},s=n.StaticCanvas.supports("setLineDash");function a(t,e){var n=t.origin,i=t.axis1,r=t.axis2,o=t.dimension,s=e.nearest,a=e.center,l=e.farthest;return function(){switch(this.get(n)){case s:return Math.min(this.get(i),this.get(r));case a:return Math.min(this.get(i),this.get(r))+.5*this.get(o);case l:return Math.max(this.get(i),this.get(r))}}}n.Line?n.warn("fabric.Line is already defined"):(n.Line=n.util.createClass(n.Object,{type:"line",x1:0,y1:0,x2:0,y2:0,cacheProperties:n.Object.prototype.cacheProperties.concat("x1","x2","y1","y2"),initialize:function(t,e){t||(t=[0,0,0,0]),this.callSuper("initialize",e),this.set("x1",t[0]),this.set("y1",t[1]),this.set("x2",t[2]),this.set("y2",t[3]),this._setWidthHeight(e)},_setWidthHeight:function(t){t||(t={}),this.width=Math.abs(this.x2-this.x1),this.height=Math.abs(this.y2-this.y1),this.left="left"in t?t.left:this._getLeftToOriginX(),this.top="top"in t?t.top:this._getTopToOriginY()},_set:function(t,e){return this.callSuper("_set",t,e),void 0!==o[t]&&this._setWidthHeight(),this},_getLeftToOriginX:a({origin:"originX",axis1:"x1",axis2:"x2",dimension:"width"},{nearest:"left",center:"center",farthest:"right"}),_getTopToOriginY:a({origin:"originY",axis1:"y1",axis2:"y2",dimension:"height"},{nearest:"top",center:"center",farthest:"bottom"}),_render:function(t){if(t.beginPath(),!this.strokeDashArray||this.strokeDashArray&&s){var e=this.calcLinePoints();t.moveTo(e.x1,e.y1),t.lineTo(e.x2,e.y2)}t.lineWidth=this.strokeWidth;var n=t.strokeStyle;t.strokeStyle=this.stroke||t.fillStyle,this.stroke&&this._renderStroke(t),t.strokeStyle=n},_renderDashedStroke:function(t){var e=this.calcLinePoints();t.beginPath(),n.util.drawDashedLine(t,e.x1,e.y1,e.x2,e.y2,this.strokeDashArray),t.closePath()},_findCenterFromElement:function(){return{x:(this.x1+this.x2)/2,y:(this.y1+this.y2)/2}},toObject:function(t){return i(this.callSuper("toObject",t),this.calcLinePoints())},_getNonTransformedDimensions:function(){var t=this.callSuper("_getNonTransformedDimensions");return"butt"===this.strokeLineCap&&(0===this.width&&(t.y-=this.strokeWidth),0===this.height&&(t.x-=this.strokeWidth)),t},calcLinePoints:function(){var t=this.x1<=this.x2?-1:1,e=this.y1<=this.y2?-1:1;return{x1:t*this.width*.5,x2:t*this.width*-.5,y1:e*this.height*.5,y2:e*this.height*-.5}},toSVG:function(t){var e=this._createBaseSVGMarkup(),n=this.calcLinePoints();return e.push("<line ",this.getSvgCommons(),'x1="',n.x1,'" y1="',n.y1,'" x2="',n.x2,'" y2="',n.y2,'" style="',this.getSvgStyles(),'" transform="',this.getSvgTransform(),this.getSvgTransformMatrix(),'"/>\n'),t?t(e.join("")):e.join("")}}),n.Line.ATTRIBUTE_NAMES=n.SHARED_ATTRIBUTES.concat("x1 y1 x2 y2".split(" ")),n.Line.fromElement=function(t,e,r){r=r||{};var o=n.parseAttributes(t,n.Line.ATTRIBUTE_NAMES);e(new n.Line([o.x1||0,o.y1||0,o.x2||0,o.y2||0],i(o,r)))},n.Line.fromObject=function(t,e){var i=r(t,!0);i.points=[t.x1,t.y1,t.x2,t.y2],n.Object._fromObject("Line",i,function(t){delete t.points,e&&e(t)},"points")})}(),function(t){"use strict";var n=e.fabric||(e.fabric={}),i=Math.PI;n.Circle?n.warn("fabric.Circle is already defined."):(n.Circle=n.util.createClass(n.Object,{type:"circle",radius:0,startAngle:0,endAngle:2*i,cacheProperties:n.Object.prototype.cacheProperties.concat("radius","startAngle","endAngle"),_set:function(t,e){return this.callSuper("_set",t,e),"radius"===t&&this.setRadius(e),this},toObject:function(t){return this.callSuper("toObject",["radius","startAngle","endAngle"].concat(t))},toSVG:function(t){var e=this._createBaseSVGMarkup(),r=(this.endAngle-this.startAngle)%(2*i);if(0===r)e.push("<circle ",this.getSvgCommons(),'cx="0" cy="0" ','r="',this.radius,'" style="',this.getSvgStyles(),'" transform="',this.getSvgTransform()," ",this.getSvgTransformMatrix(),'"',this.addPaintOrder(),"/>\n");else{var o=n.util.cos(this.startAngle)*this.radius,s=n.util.sin(this.startAngle)*this.radius,a=n.util.cos(this.endAngle)*this.radius,l=n.util.sin(this.endAngle)*this.radius;e.push('<path d="M '+o+" "+s," A "+this.radius+" "+this.radius," 0 ",+(r>i?"1":"0")+" 1"," "+a+" "+l,'" style="',this.getSvgStyles(),'" transform="',this.getSvgTransform()," ",this.getSvgTransformMatrix(),'"',this.addPaintOrder(),"/>\n")}return t?t(e.join("")):e.join("")},_render:function(t){t.beginPath(),t.arc(0,0,this.radius,this.startAngle,this.endAngle,!1),this._renderPaintInOrder(t)},getRadiusX:function(){return this.get("radius")*this.get("scaleX")},getRadiusY:function(){return this.get("radius")*this.get("scaleY")},setRadius:function(t){return this.radius=t,this.set("width",2*t).set("height",2*t)}}),n.Circle.ATTRIBUTE_NAMES=n.SHARED_ATTRIBUTES.concat("cx cy r".split(" ")),n.Circle.fromElement=function(t,e){var i,r=n.parseAttributes(t,n.Circle.ATTRIBUTE_NAMES);if(!("radius"in(i=r)&&i.radius>=0))throw new Error("value of `r` attribute is required and can not be negative");r.left=(r.left||0)-r.radius,r.top=(r.top||0)-r.radius,e(new n.Circle(r))},n.Circle.fromObject=function(t,e){return n.Object._fromObject("Circle",t,e)})}(),function(t){"use strict";var n=e.fabric||(e.fabric={});n.Triangle?n.warn("fabric.Triangle is already defined"):(n.Triangle=n.util.createClass(n.Object,{type:"triangle",width:100,height:100,_render:function(t){var e=this.width/2,n=this.height/2;t.beginPath(),t.moveTo(-e,n),t.lineTo(0,-n),t.lineTo(e,n),t.closePath(),this._renderPaintInOrder(t)},_renderDashedStroke:function(t){var e=this.width/2,i=this.height/2;t.beginPath(),n.util.drawDashedLine(t,-e,i,0,-i,this.strokeDashArray),n.util.drawDashedLine(t,0,-i,e,i,this.strokeDashArray),n.util.drawDashedLine(t,e,i,-e,i,this.strokeDashArray),t.closePath()},toSVG:function(t){var e=this._createBaseSVGMarkup(),n=this.width/2,i=this.height/2,r=[-n+" "+i,"0 "+-i,n+" "+i].join(",");return e.push("<polygon ",this.getSvgCommons(),'points="',r,'" style="',this.getSvgStyles(),'" transform="',this.getSvgTransform(),'"',this.addPaintOrder(),"/>"),t?t(e.join("")):e.join("")}}),n.Triangle.fromObject=function(t,e){return n.Object._fromObject("Triangle",t,e)})}(),function(t){"use strict";var n=e.fabric||(e.fabric={}),i=2*Math.PI;n.Ellipse?n.warn("fabric.Ellipse is already defined."):(n.Ellipse=n.util.createClass(n.Object,{type:"ellipse",rx:0,ry:0,cacheProperties:n.Object.prototype.cacheProperties.concat("rx","ry"),initialize:function(t){this.callSuper("initialize",t),this.set("rx",t&&t.rx||0),this.set("ry",t&&t.ry||0)},_set:function(t,e){switch(this.callSuper("_set",t,e),t){case"rx":this.rx=e,this.set("width",2*e);break;case"ry":this.ry=e,this.set("height",2*e)}return this},getRx:function(){return this.get("rx")*this.get("scaleX")},getRy:function(){return this.get("ry")*this.get("scaleY")},toObject:function(t){return this.callSuper("toObject",["rx","ry"].concat(t))},toSVG:function(t){var e=this._createBaseSVGMarkup();return e.push("<ellipse ",this.getSvgCommons(),'cx="0" cy="0" ','rx="',this.rx,'" ry="',this.ry,'" style="',this.getSvgStyles(),'" transform="',this.getSvgTransform(),this.getSvgTransformMatrix(),'"',this.addPaintOrder(),"/>\n"),t?t(e.join("")):e.join("")},_render:function(t){t.beginPath(),t.save(),t.transform(1,0,0,this.ry/this.rx,0,0),t.arc(0,0,this.rx,0,i,!1),t.restore(),this._renderPaintInOrder(t)}}),n.Ellipse.ATTRIBUTE_NAMES=n.SHARED_ATTRIBUTES.concat("cx cy rx ry".split(" ")),n.Ellipse.fromElement=function(t,e){var i=n.parseAttributes(t,n.Ellipse.ATTRIBUTE_NAMES);i.left=(i.left||0)-i.rx,i.top=(i.top||0)-i.ry,e(new n.Ellipse(i))},n.Ellipse.fromObject=function(t,e){return n.Object._fromObject("Ellipse",t,e)})}(),function(t){"use strict";var n=e.fabric||(e.fabric={}),i=n.util.object.extend;n.Rect?n.warn("fabric.Rect is already defined"):(n.Rect=n.util.createClass(n.Object,{stateProperties:n.Object.prototype.stateProperties.concat("rx","ry"),type:"rect",rx:0,ry:0,cacheProperties:n.Object.prototype.cacheProperties.concat("rx","ry"),initialize:function(t){this.callSuper("initialize",t),this._initRxRy()},_initRxRy:function(){this.rx&&!this.ry?this.ry=this.rx:this.ry&&!this.rx&&(this.rx=this.ry)},_render:function(t){if(1!==this.width||1!==this.height){var e=this.rx?Math.min(this.rx,this.width/2):0,n=this.ry?Math.min(this.ry,this.height/2):0,i=this.width,r=this.height,o=-this.width/2,s=-this.height/2,a=0!==e||0!==n,l=.4477152502;t.beginPath(),t.moveTo(o+e,s),t.lineTo(o+i-e,s),a&&t.bezierCurveTo(o+i-l*e,s,o+i,s+l*n,o+i,s+n),t.lineTo(o+i,s+r-n),a&&t.bezierCurveTo(o+i,s+r-l*n,o+i-l*e,s+r,o+i-e,s+r),t.lineTo(o+e,s+r),a&&t.bezierCurveTo(o+l*e,s+r,o,s+r-l*n,o,s+r-n),t.lineTo(o,s+n),a&&t.bezierCurveTo(o,s+l*n,o+l*e,s,o+e,s),t.closePath(),this._renderPaintInOrder(t)}else t.fillRect(-.5,-.5,1,1)},_renderDashedStroke:function(t){var e=-this.width/2,i=-this.height/2,r=this.width,o=this.height;t.beginPath(),n.util.drawDashedLine(t,e,i,e+r,i,this.strokeDashArray),n.util.drawDashedLine(t,e+r,i,e+r,i+o,this.strokeDashArray),n.util.drawDashedLine(t,e+r,i+o,e,i+o,this.strokeDashArray),n.util.drawDashedLine(t,e,i+o,e,i,this.strokeDashArray),t.closePath()},toObject:function(t){return this.callSuper("toObject",["rx","ry"].concat(t))},toSVG:function(t){var e=this._createBaseSVGMarkup(),n=-this.width/2,i=-this.height/2;return e.push("<rect ",this.getSvgCommons(),'x="',n,'" y="',i,'" rx="',this.get("rx"),'" ry="',this.get("ry"),'" width="',this.width,'" height="',this.height,'" style="',this.getSvgStyles(),'" transform="',this.getSvgTransform(),this.getSvgTransformMatrix(),'"',this.addPaintOrder(),"/>\n"),t?t(e.join("")):e.join("")}}),n.Rect.ATTRIBUTE_NAMES=n.SHARED_ATTRIBUTES.concat("x y rx ry width height".split(" ")),n.Rect.fromElement=function(t,e,r){if(!t)return e(null);r=r||{};var o=n.parseAttributes(t,n.Rect.ATTRIBUTE_NAMES);o.left=o.left||0,o.top=o.top||0;var s=new n.Rect(i(r?n.util.object.clone(r):{},o));s.visible=s.visible&&s.width>0&&s.height>0,e(s)},n.Rect.fromObject=function(t,e){return n.Object._fromObject("Rect",t,e)})}(),function(t){"use strict";var n=e.fabric||(e.fabric={}),i=n.util.object.extend,r=n.util.array.min,o=n.util.array.max,s=n.util.toFixed;n.Polyline?n.warn("fabric.Polyline is already defined"):(n.Polyline=n.util.createClass(n.Object,{type:"polyline",points:null,cacheProperties:n.Object.prototype.cacheProperties.concat("points"),initialize:function(t,e){e=e||{},this.points=t||[],this.callSuper("initialize",e);var n=this._calcDimensions();void 0===e.left&&(this.left=n.left),void 0===e.top&&(this.top=n.top),this.width=n.width,this.height=n.height,this.pathOffset={x:n.left+this.width/2,y:n.top+this.height/2}},_calcDimensions:function(){var t=this.points,e=r(t,"x")||0,n=r(t,"y")||0;return{left:e,top:n,width:(o(t,"x")||0)-e,height:(o(t,"y")||0)-n}},toObject:function(t){return i(this.callSuper("toObject",t),{points:this.points.concat()})},toSVG:function(t){for(var e=[],i=this.pathOffset.x,r=this.pathOffset.y,o=this._createBaseSVGMarkup(),a=n.Object.NUM_FRACTION_DIGITS,l=0,u=this.points.length;l<u;l++)e.push(s(this.points[l].x-i,a),",",s(this.points[l].y-r,a)," ");return o.push("<",this.type," ",this.getSvgCommons(),'points="',e.join(""),'" style="',this.getSvgStyles(),'" transform="',this.getSvgTransform()," ",this.getSvgTransformMatrix(),'"',this.addPaintOrder(),"/>\n"),t?t(o.join("")):o.join("")},commonRender:function(t){var e,n=this.points.length,i=this.pathOffset.x,r=this.pathOffset.y;if(!n||isNaN(this.points[n-1].y))return!1;t.beginPath(),t.moveTo(this.points[0].x-i,this.points[0].y-r);for(var o=0;o<n;o++)t.lineTo((e=this.points[o]).x-i,e.y-r);return!0},_render:function(t){this.commonRender(t)&&this._renderPaintInOrder(t)},_renderDashedStroke:function(t){var e,i;t.beginPath();for(var r=0,o=this.points.length;r<o;r++)n.util.drawDashedLine(t,(e=this.points[r]).x,e.y,(i=this.points[r+1]||e).x,i.y,this.strokeDashArray)},complexity:function(){return this.get("points").length}}),n.Polyline.ATTRIBUTE_NAMES=n.SHARED_ATTRIBUTES.concat(),n.Polyline.fromElement=function(t,e,i){if(!t)return e(null);i||(i={});var r=n.parsePointsAttribute(t.getAttribute("points")),o=n.parseAttributes(t,n.Polyline.ATTRIBUTE_NAMES);e(new n.Polyline(r,n.util.object.extend(o,i)))},n.Polyline.fromObject=function(t,e){return n.Object._fromObject("Polyline",t,e,"points")})}(),function(t){"use strict";var n=e.fabric||(e.fabric={}),i=n.util.object.extend;n.Polygon?n.warn("fabric.Polygon is already defined"):(n.Polygon=n.util.createClass(n.Polyline,{type:"polygon",_render:function(t){this.commonRender(t)&&(t.closePath(),this._renderPaintInOrder(t))},_renderDashedStroke:function(t){this.callSuper("_renderDashedStroke",t),t.closePath()}}),n.Polygon.ATTRIBUTE_NAMES=n.SHARED_ATTRIBUTES.concat(),n.Polygon.fromElement=function(t,e,r){if(!t)return e(null);r||(r={});var o=n.parsePointsAttribute(t.getAttribute("points")),s=n.parseAttributes(t,n.Polygon.ATTRIBUTE_NAMES);e(new n.Polygon(o,i(s,r)))},n.Polygon.fromObject=function(t,e){return n.Object._fromObject("Polygon",t,e,"points")})}(),function(t){"use strict";var n=e.fabric||(e.fabric={}),i=n.util.array.min,r=n.util.array.max,o=n.util.object.extend,s=Object.prototype.toString,a=n.util.drawArc,l={m:2,l:2,h:1,v:1,c:6,s:4,q:4,t:2,a:7},u={m:"l",M:"L"};n.Path?n.warn("fabric.Path is already defined"):(n.Path=n.util.createClass(n.Object,{type:"path",path:null,cacheProperties:n.Object.prototype.cacheProperties.concat("path","fillRule"),stateProperties:n.Object.prototype.stateProperties.concat("path"),initialize:function(t,e){this.callSuper("initialize",e=e||{}),t||(t=[]);var n="[object Array]"===s.call(t);this.path=n?t:t.match&&t.match(/[mzlhvcsqta][^mzlhvcsqta]*/gi),this.path&&(n||(this.path=this._parsePath()),this._setPositionDimensions(e))},_setPositionDimensions:function(t){var e=this._parseDimensions();this.width=e.width,this.height=e.height,void 0===t.left&&(this.left=e.left),void 0===t.top&&(this.top=e.top),this.pathOffset=this.pathOffset||{x:e.left+this.width/2,y:e.top+this.height/2}},_renderPathCommands:function(t){var e,n,i,r=null,o=0,s=0,l=0,u=0,c=0,h=0,p=-this.pathOffset.x,d=-this.pathOffset.y;t.beginPath();for(var f=0,g=this.path.length;f<g;++f){switch((e=this.path[f])[0]){case"l":t.lineTo((l+=e[1])+p,(u+=e[2])+d);break;case"L":t.lineTo((l=e[1])+p,(u=e[2])+d);break;case"h":t.lineTo((l+=e[1])+p,u+d);break;case"H":t.lineTo((l=e[1])+p,u+d);break;case"v":t.lineTo(l+p,(u+=e[1])+d);break;case"V":t.lineTo(l+p,(u=e[1])+d);break;case"m":o=l+=e[1],s=u+=e[2],t.moveTo(l+p,u+d);break;case"M":o=l=e[1],s=u=e[2],t.moveTo(l+p,u+d);break;case"c":t.bezierCurveTo(l+e[1]+p,u+e[2]+d,(c=l+e[3])+p,(h=u+e[4])+d,(n=l+e[5])+p,(i=u+e[6])+d),l=n,u=i;break;case"C":t.bezierCurveTo(e[1]+p,e[2]+d,(c=e[3])+p,(h=e[4])+d,(l=e[5])+p,(u=e[6])+d);break;case"s":n=l+e[3],i=u+e[4],null===r[0].match(/[CcSs]/)?(c=l,h=u):(c=2*l-c,h=2*u-h),t.bezierCurveTo(c+p,h+d,l+e[1]+p,u+e[2]+d,n+p,i+d),c=l+e[1],h=u+e[2],l=n,u=i;break;case"S":n=e[3],i=e[4],null===r[0].match(/[CcSs]/)?(c=l,h=u):(c=2*l-c,h=2*u-h),t.bezierCurveTo(c+p,h+d,e[1]+p,e[2]+d,n+p,i+d),l=n,u=i,c=e[1],h=e[2];break;case"q":t.quadraticCurveTo((c=l+e[1])+p,(h=u+e[2])+d,(n=l+e[3])+p,(i=u+e[4])+d),l=n,u=i;break;case"Q":t.quadraticCurveTo(e[1]+p,e[2]+d,(n=e[3])+p,(i=e[4])+d),l=n,u=i,c=e[1],h=e[2];break;case"t":n=l+e[1],i=u+e[2],null===r[0].match(/[QqTt]/)?(c=l,h=u):(c=2*l-c,h=2*u-h),t.quadraticCurveTo(c+p,h+d,n+p,i+d),l=n,u=i;break;case"T":n=e[1],i=e[2],null===r[0].match(/[QqTt]/)?(c=l,h=u):(c=2*l-c,h=2*u-h),t.quadraticCurveTo(c+p,h+d,n+p,i+d),l=n,u=i;break;case"a":a(t,l+p,u+d,[e[1],e[2],e[3],e[4],e[5],e[6]+l+p,e[7]+u+d]),l+=e[6],u+=e[7];break;case"A":a(t,l+p,u+d,[e[1],e[2],e[3],e[4],e[5],e[6]+p,e[7]+d]),l=e[6],u=e[7];break;case"z":case"Z":l=o,u=s,t.closePath()}r=e}},_render:function(t){this._renderPathCommands(t),this._renderPaintInOrder(t)},toString:function(){return"#<fabric.Path ("+this.complexity()+'): { "top": '+this.top+', "left": '+this.left+" }>"},toObject:function(t){return o(this.callSuper("toObject",t),{path:this.path.map(function(t){return t.slice()}),top:this.top,left:this.left})},toDatalessObject:function(t){var e=this.toObject(["sourcePath"].concat(t));return e.sourcePath&&delete e.path,e},toSVG:function(t){for(var e,n=[],i=this._createBaseSVGMarkup(),r=0,o=this.path.length;r<o;r++)n.push(this.path[r].join(" "));var s=n.join(" ");return e=" translate("+-this.pathOffset.x+", "+-this.pathOffset.y+") ",i.push("<path ",this.getSvgCommons(),'d="',s,'" style="',this.getSvgStyles(),'" transform="',this.getSvgTransform(),e,this.getSvgTransformMatrix(),'" stroke-linecap="round" ',this.addPaintOrder(),"/>\n"),t?t(i.join("")):i.join("")},complexity:function(){return this.path.length},_parsePath:function(){for(var t,e,n,i,r,o=[],s=[],a=/([-+]?((\d+\.\d+)|((\d+)|(\.\d+)))(?:e[-+]?\d+)?)/gi,c=0,h=this.path.length;c<h;c++){for(i=(t=this.path[c]).slice(1).trim(),s.length=0;n=a.exec(i);)s.push(n[0]);r=[t.charAt(0)];for(var p=0,d=s.length;p<d;p++)e=parseFloat(s[p]),isNaN(e)||r.push(e);var f=r[0],g=l[f.toLowerCase()],m=u[f]||f;if(r.length-1>g)for(var v=1,y=r.length;v<y;v+=g)o.push([f].concat(r.slice(v,v+g))),f=m;else o.push(r)}return o},_parseDimensions:function(){for(var t,e,o,s,a=[],l=[],u=null,c=0,h=0,p=0,d=0,f=0,g=0,m=0,v=this.path.length;m<v;++m){switch((t=this.path[m])[0]){case"l":p+=t[1],d+=t[2],s=[];break;case"L":p=t[1],d=t[2],s=[];break;case"h":p+=t[1],s=[];break;case"H":p=t[1],s=[];break;case"v":d+=t[1],s=[];break;case"V":d=t[1],s=[];break;case"m":c=p+=t[1],h=d+=t[2],s=[];break;case"M":c=p=t[1],h=d=t[2],s=[];break;case"c":s=n.util.getBoundsOfCurve(p,d,p+t[1],d+t[2],f=p+t[3],g=d+t[4],e=p+t[5],o=d+t[6]),p=e,d=o;break;case"C":s=n.util.getBoundsOfCurve(p,d,t[1],t[2],f=t[3],g=t[4],t[5],t[6]),p=t[5],d=t[6];break;case"s":e=p+t[3],o=d+t[4],null===u[0].match(/[CcSs]/)?(f=p,g=d):(f=2*p-f,g=2*d-g),s=n.util.getBoundsOfCurve(p,d,f,g,p+t[1],d+t[2],e,o),f=p+t[1],g=d+t[2],p=e,d=o;break;case"S":e=t[3],o=t[4],null===u[0].match(/[CcSs]/)?(f=p,g=d):(f=2*p-f,g=2*d-g),s=n.util.getBoundsOfCurve(p,d,f,g,t[1],t[2],e,o),p=e,d=o,f=t[1],g=t[2];break;case"q":s=n.util.getBoundsOfCurve(p,d,f=p+t[1],g=d+t[2],f,g,e=p+t[3],o=d+t[4]),p=e,d=o;break;case"Q":s=n.util.getBoundsOfCurve(p,d,f=t[1],g=t[2],f,g,t[3],t[4]),p=t[3],d=t[4];break;case"t":e=p+t[1],o=d+t[2],null===u[0].match(/[QqTt]/)?(f=p,g=d):(f=2*p-f,g=2*d-g),s=n.util.getBoundsOfCurve(p,d,f,g,f,g,e,o),p=e,d=o;break;case"T":e=t[1],o=t[2],null===u[0].match(/[QqTt]/)?(f=p,g=d):(f=2*p-f,g=2*d-g),s=n.util.getBoundsOfCurve(p,d,f,g,f,g,e,o),p=e,d=o;break;case"a":s=n.util.getBoundsOfArc(p,d,t[1],t[2],t[3],t[4],t[5],t[6]+p,t[7]+d),p+=t[6],d+=t[7];break;case"A":s=n.util.getBoundsOfArc(p,d,t[1],t[2],t[3],t[4],t[5],t[6],t[7]),p=t[6],d=t[7];break;case"z":case"Z":p=c,d=h}u=t,s.forEach(function(t){a.push(t.x),l.push(t.y)}),a.push(p),l.push(d)}var y=i(a)||0,b=i(l)||0;return{left:y,top:b,width:(r(a)||0)-y,height:(r(l)||0)-b}}}),n.Path.fromObject=function(t,e){"string"==typeof t.sourcePath?n.loadSVGFromURL(t.sourcePath,function(n){var i=n[0];i.setOptions(t),e&&e(i)}):n.Object._fromObject("Path",t,e,"path")},n.Path.ATTRIBUTE_NAMES=n.SHARED_ATTRIBUTES.concat(["d"]),n.Path.fromElement=function(t,e,i){var r=n.parseAttributes(t,n.Path.ATTRIBUTE_NAMES);e(new n.Path(r.d,o(r,i)))})}(),function(t){"use strict";var n=e.fabric||(e.fabric={}),i=n.util.array.min,r=n.util.array.max;n.Group||(n.Group=n.util.createClass(n.Object,n.Collection,{type:"group",strokeWidth:0,subTargetCheck:!1,cacheProperties:[],useSetOnGroup:!1,initialize:function(t,e,n){e=e||{},this._objects=[],n&&this.callSuper("initialize",e),this._objects=t||[];for(var i=this._objects.length;i--;)this._objects[i].group=this;if(n)this._updateObjectsACoords();else{var r=e&&e.centerPoint;void 0!==e.originX&&(this.originX=e.originX),void 0!==e.originY&&(this.originY=e.originY),r||this._calcBounds(),this._updateObjectsCoords(r),delete e.centerPoint,this.callSuper("initialize",e)}this.setCoords()},_updateObjectsACoords:function(){for(var t=this._objects.length;t--;)this._objects[t].setCoords(!0,!0)},_updateObjectsCoords:function(t){t=t||this.getCenterPoint();for(var e=this._objects.length;e--;)this._updateObjectCoords(this._objects[e],t)},_updateObjectCoords:function(t,e){t.set({left:t.left-e.x,top:t.top-e.y}),t.group=this,t.setCoords(!0,!0)},toString:function(){return"#<fabric.Group: ("+this.complexity()+")>"},addWithUpdate:function(t){return this._restoreObjectsState(),n.util.resetObjectTransform(this),t&&(this._objects.push(t),t.group=this,t._set("canvas",this.canvas)),this._calcBounds(),this._updateObjectsCoords(),this.setCoords(),this.dirty=!0,this},removeWithUpdate:function(t){return this._restoreObjectsState(),n.util.resetObjectTransform(this),this.remove(t),this._calcBounds(),this._updateObjectsCoords(),this.setCoords(),this.dirty=!0,this},_onObjectAdded:function(t){this.dirty=!0,t.group=this,t._set("canvas",this.canvas)},_onObjectRemoved:function(t){this.dirty=!0,delete t.group},_set:function(t,e){var i=this._objects.length;if(this.useSetOnGroup)for(;i--;)this._objects[i].setOnGroup(t,e);if("canvas"===t)for(;i--;)this._objects[i]._set(t,e);n.Object.prototype._set.call(this,t,e)},toObject:function(t){var e=this._objects.map(function(e){var n=e.includeDefaultValues;e.includeDefaultValues=e.group.includeDefaultValues;var i=e.toObject(t);return e.includeDefaultValues=n,i}),i=n.Object.prototype.toObject.call(this,t);return i.objects=e,i},toDatalessObject:function(t){var e;e=this.sourcePath||this._objects.map(function(e){var n=e.includeDefaultValues;e.includeDefaultValues=e.group.includeDefaultValues;var i=e.toDatalessObject(t);return e.includeDefaultValues=n,i});var i=n.Object.prototype.toDatalessObject.call(this,t);return i.objects=e,i},render:function(t){this._transformDone=!0,this.callSuper("render",t),this._transformDone=!1},shouldCache:function(){var t=this.objectCaching&&(!this.group||this.needsItsOwnCache()||!this.group.isOnACache());if(this.ownCaching=t,t)for(var e=0,n=this._objects.length;e<n;e++)if(this._objects[e].willDrawShadow())return this.ownCaching=!1,!1;return t},willDrawShadow:function(){if(this.shadow)return n.Object.prototype.willDrawShadow.call(this);for(var t=0,e=this._objects.length;t<e;t++)if(this._objects[t].willDrawShadow())return!0;return!1},isOnACache:function(){return this.ownCaching||this.group&&this.group.isOnACache()},drawObject:function(t){for(var e=0,n=this._objects.length;e<n;e++)this._objects[e].render(t);this._drawClipPath(t)},isCacheDirty:function(t){if(this.callSuper("isCacheDirty",t))return!0;if(!this.statefullCache)return!1;for(var e=0,n=this._objects.length;e<n;e++)if(this._objects[e].isCacheDirty(!0)){if(this._cacheCanvas){var i=this.cacheWidth/this.zoomX,r=this.cacheHeight/this.zoomY;this._cacheContext.clearRect(-i/2,-r/2,i,r)}return!0}return!1},_restoreObjectsState:function(){return this._objects.forEach(this._restoreObjectState,this),this},realizeTransform:function(t){var e=t.calcTransformMatrix(),i=n.util.qrDecompose(e),r=new n.Point(i.translateX,i.translateY);return t.flipX=!1,t.flipY=!1,t.set("scaleX",i.scaleX),t.set("scaleY",i.scaleY),t.skewX=i.skewX,t.skewY=i.skewY,t.angle=i.angle,t.setPositionByOrigin(r,"center","center"),t},_restoreObjectState:function(t){return this.realizeTransform(t),t.setCoords(),delete t.group,this},destroy:function(){return this._objects.forEach(function(t){t.set("dirty",!0)}),this._restoreObjectsState()},toActiveSelection:function(){if(this.canvas){var t=this._objects,e=this.canvas;this._objects=[];var i=this.toObject();delete i.objects;var r=new n.ActiveSelection([]);return r.set(i),r.type="activeSelection",e.remove(this),t.forEach(function(t){t.group=r,t.dirty=!0,e.add(t)}),r.canvas=e,r._objects=t,e._activeObject=r,r.setCoords(),r}},ungroupOnCanvas:function(){return this._restoreObjectsState()},setObjectsCoords:function(){return this.forEachObject(function(t){t.setCoords(!0,!0)}),this},_calcBounds:function(t){for(var e,n,i,r=[],o=[],s=["tr","br","bl","tl"],a=0,l=this._objects.length,u=s.length;a<l;++a)for((e=this._objects[a]).setCoords(!0),i=0;i<u;i++)r.push(e.oCoords[n=s[i]].x),o.push(e.oCoords[n].y);this._getBounds(r,o,t)},_getBounds:function(t,e,o){var s=new n.Point(i(t),i(e)),a=new n.Point(r(t),r(e)),l=s.y||0,u=s.x||0,c=a.y-s.y||0;this.width=a.x-s.x||0,this.height=c,o||this.setPositionByOrigin({x:u,y:l},"left","top")},toSVG:function(t){var e=this._createBaseSVGMarkup();e.push("<g ",this.getSvgCommons(),'transform="',this.getSvgTransform(),this.getSvgTransformMatrix(),'" style="',this.getSvgFilter(),'">\n');for(var n=0,i=this._objects.length;n<i;n++)e.push("\t",this._objects[n].toSVG(t));return e.push("</g>\n"),t?t(e.join("")):e.join("")}}),n.Group.fromObject=function(t,e){n.util.enlivenObjects(t.objects,function(i){var r=n.util.object.clone(t,!0);delete r.objects,e&&e(new n.Group(i,r,!0))})})}(),function(t){"use strict";var n=e.fabric||(e.fabric={});n.ActiveSelection||(n.ActiveSelection=n.util.createClass(n.Group,{type:"activeSelection",initialize:function(t,e){e=e||{},this._objects=t||[];for(var i=this._objects.length;i--;)this._objects[i].group=this;e.originX&&(this.originX=e.originX),e.originY&&(this.originY=e.originY),this._calcBounds(),this._updateObjectsCoords(),n.Object.prototype.initialize.call(this,e),this.setCoords()},toGroup:function(){var t=this._objects.concat();this._objects=[];var e=n.Object.prototype.toObject.call(this),i=new n.Group([]);if(delete e.type,i.set(e),t.forEach(function(t){t.canvas.remove(t),t.group=i}),i._objects=t,!this.canvas)return i;var r=this.canvas;return r.add(i),r._activeObject=i,i.setCoords(),i},onDeselect:function(){return this.destroy(),!1},toString:function(){return"#<fabric.ActiveSelection: ("+this.complexity()+")>"},shouldCache:function(){return!1},isOnACache:function(){return!1},_renderControls:function(t,e,n){t.save(),t.globalAlpha=this.isMoving?this.borderOpacityWhenMoving:1,this.callSuper("_renderControls",t,e),void 0===(n=n||{}).hasControls&&(n.hasControls=!1),void 0===n.hasRotatingPoint&&(n.hasRotatingPoint=!1),n.forActiveSelection=!0;for(var i=0,r=this._objects.length;i<r;i++)this._objects[i]._renderControls(t,n);t.restore()}}),n.ActiveSelection.fromObject=function(t,e){n.util.enlivenObjects(t.objects,function(i){delete t.objects,e&&e(new n.ActiveSelection(i,t,!0))})})}(),function(t){"use strict";var e=S.util.object.extend;t.fabric||(t.fabric={}),t.fabric.Image?S.warn("fabric.Image is already defined."):(S.Image=S.util.createClass(S.Object,{type:"image",crossOrigin:"",strokeWidth:0,_lastScaleX:1,_lastScaleY:1,_filterScalingX:1,_filterScalingY:1,minimumScaleTrigger:.5,stateProperties:S.Object.prototype.stateProperties.concat("cropX","cropY"),cacheKey:"",cropX:0,cropY:0,initialize:function(t,e){e||(e={}),this.filters=[],this.cacheKey="texture"+S.Object.__uid++,this.callSuper("initialize",e),this._initElement(t,e)},getElement:function(){return this._element||{}},setElement:function(t,e){return this.removeTexture(this.cacheKey),this.removeTexture(this.cacheKey+"_filtered"),this._element=t,this._originalElement=t,this._initConfig(e),this.resizeFilter&&this.applyResizeFilters(),0!==this.filters.length&&this.applyFilters(),this},removeTexture:function(t){var e=S.filterBackend;e&&e.evictCachesForKey&&e.evictCachesForKey(t)},dispose:function(){this.removeTexture(this.cacheKey),this.removeTexture(this.cacheKey+"_filtered"),this._cacheContext=void 0,["_originalElement","_element","_filteredEl","_cacheCanvas"].forEach((function(t){S.util.cleanUpJsdomNode(this[t]),this[t]=void 0}).bind(this))},setCrossOrigin:function(t){return this.crossOrigin=t,this._element.crossOrigin=t,this},getOriginalSize:function(){var t=this.getElement();return{width:t.naturalWidth||t.width,height:t.naturalHeight||t.height}},_stroke:function(t){if(this.stroke&&0!==this.strokeWidth){var e=this.width/2,n=this.height/2;t.beginPath(),t.moveTo(-e,-n),t.lineTo(e,-n),t.lineTo(e,n),t.lineTo(-e,n),t.lineTo(-e,-n),t.closePath()}},_renderDashedStroke:function(t){var e=-this.width/2,n=-this.height/2,i=this.width,r=this.height;t.save(),this._setStrokeStyles(t,this),t.beginPath(),S.util.drawDashedLine(t,e,n,e+i,n,this.strokeDashArray),S.util.drawDashedLine(t,e+i,n,e+i,n+r,this.strokeDashArray),S.util.drawDashedLine(t,e+i,n+r,e,n+r,this.strokeDashArray),S.util.drawDashedLine(t,e,n+r,e,n,this.strokeDashArray),t.closePath(),t.restore()},toObject:function(t){var n=[];this.filters.forEach(function(t){t&&n.push(t.toObject())});var i=e(this.callSuper("toObject",["crossOrigin","cropX","cropY"].concat(t)),{src:this.getSrc(),filters:n});return this.resizeFilter&&(i.resizeFilter=this.resizeFilter.toObject()),i},hasCrop:function(){return this.cropX||this.cropY||this.width<this._element.width||this.height<this._element.height},toSVG:function(t){var e=this._createBaseSVGMarkup(),n=-this.width/2,i=-this.height/2,r="";if(this.hasCrop()){var o=S.Object.__uid++;e.push('<clipPath id="imageCrop_'+o+'">\n','\t<rect x="'+n+'" y="'+i+'" width="'+this.width+'" height="'+this.height+'" />\n',"</clipPath>\n"),r=' clip-path="url(#imageCrop_'+o+')" '}e.push('<g transform="',this.getSvgTransform(),this.getSvgTransformMatrix(),'">\n');var s=["\t<image ",this.getSvgCommons(),'xlink:href="',this.getSvgSrc(!0),'" x="',n-this.cropX,'" y="',i-this.cropY,'" style="',this.getSvgStyles(),'" width="',this._element.width||this._element.naturalWidth,'" height="',this._element.height||this._element.height,'"',r,"></image>\n"];if("fill"===this.paintFirst&&Array.prototype.push.apply(e,s),this.stroke||this.strokeDashArray){var a=this.fill;this.fill=null,e.push("\t<rect ",'x="',n,'" y="',i,'" width="',this.width,'" height="',this.height,'" style="',this.getSvgStyles(),'"/>\n'),this.fill=a}return"fill"!==this.paintFirst&&Array.prototype.push.apply(e,s),e.push("</g>\n"),t?t(e.join("")):e.join("")},getSrc:function(t){var e=t?this._element:this._originalElement;return e?e.toDataURL?e.toDataURL():e.src:this.src||""},setSrc:function(t,e,n){return S.util.loadImage(t,function(t){this.setElement(t,n),this._setWidthHeight(),e(this)},this,n&&n.crossOrigin),this},toString:function(){return'#<fabric.Image: { src: "'+this.getSrc()+'" }>'},applyResizeFilters:function(){var t=this.resizeFilter,e=this.minimumScaleTrigger,n=this.getTotalObjectScaling(),i=n.scaleX,r=n.scaleY,o=this._filteredEl||this._originalElement;if(this.group&&this.set("dirty",!0),!t||i>e&&r>e)return this._element=o,this._filterScalingX=1,this._filterScalingY=1,this._lastScaleX=i,void(this._lastScaleY=r);S.filterBackend||(S.filterBackend=S.initFilterBackend());var s=S.util.createCanvasElement(),a=this._filteredEl?this.cacheKey+"_filtered":this.cacheKey,l=o.width,u=o.height;s.width=l,s.height=u,this._element=s,this._lastScaleX=t.scaleX=i,this._lastScaleY=t.scaleY=r,S.filterBackend.applyFilters([t],o,l,u,this._element,a),this._filterScalingX=s.width/this._originalElement.width,this._filterScalingY=s.height/this._originalElement.height},applyFilters:function(t){if(t=(t=t||this.filters||[]).filter(function(t){return t&&!t.isNeutralState()}),this.set("dirty",!0),this.removeTexture(this.cacheKey+"_filtered"),0===t.length)return this._element=this._originalElement,this._filteredEl=null,this._filterScalingX=1,this._filterScalingY=1,this;var e=this._originalElement,n=e.naturalWidth||e.width,i=e.naturalHeight||e.height;if(this._element===this._originalElement){var r=S.util.createCanvasElement();r.width=n,r.height=i,this._element=r,this._filteredEl=r}else this._element=this._filteredEl,this._filteredEl.getContext("2d").clearRect(0,0,n,i),this._lastScaleX=1,this._lastScaleY=1;return S.filterBackend||(S.filterBackend=S.initFilterBackend()),S.filterBackend.applyFilters(t,this._originalElement,n,i,this._element,this.cacheKey),this._originalElement.width===this._element.width&&this._originalElement.height===this._element.height||(this._filterScalingX=this._element.width/this._originalElement.width,this._filterScalingY=this._element.height/this._originalElement.height),this},_render:function(t){!0!==this.isMoving&&this.resizeFilter&&this._needsResize()&&this.applyResizeFilters(),this._stroke(t),this._renderPaintInOrder(t)},_renderFill:function(t){var e=this.width,n=this.height,i=this._element;i&&t.drawImage(i,this.cropX*this._filterScalingX,this.cropY*this._filterScalingY,e*this._filterScalingX,n*this._filterScalingY,-e/2,-n/2,e,n)},_needsResize:function(){var t=this.getTotalObjectScaling();return t.scaleX!==this._lastScaleX||t.scaleY!==this._lastScaleY},_resetWidthHeight:function(){this.set(this.getOriginalSize())},_initElement:function(t,e){this.setElement(S.util.getById(t),e),S.util.addClass(this.getElement(),S.Image.CSS_CANVAS)},_initConfig:function(t){t||(t={}),this.setOptions(t),this._setWidthHeight(t),this._element&&this.crossOrigin&&(this._element.crossOrigin=this.crossOrigin)},_initFilters:function(t,e){t&&t.length?S.util.enlivenObjects(t,function(t){e&&e(t)},"fabric.Image.filters"):e&&e()},_setWidthHeight:function(t){t||(t={});var e=this.getElement();this.width=t.width||e.naturalWidth||e.width||0,this.height=t.height||e.naturalHeight||e.height||0},parsePreserveAspectRatioAttribute:function(){var t,e=S.util.parsePreserveAspectRatioAttribute(this.preserveAspectRatio||""),n=this._element.width,i=this._element.height,r=1,o=1,s=0,a=0,l=0,u=0,c=this.width,h=this.height,p={width:c,height:h};return!e||"none"===e.alignX&&"none"===e.alignY?(r=c/n,o=h/i):("meet"===e.meetOrSlice&&(t=(c-n*(r=o=S.util.findScaleToFit(this._element,p)))/2,"Min"===e.alignX&&(s=-t),"Max"===e.alignX&&(s=t),t=(h-i*o)/2,"Min"===e.alignY&&(a=-t),"Max"===e.alignY&&(a=t)),"slice"===e.meetOrSlice&&(t=n-c/(r=o=S.util.findScaleToCover(this._element,p)),"Mid"===e.alignX&&(l=t/2),"Max"===e.alignX&&(l=t),t=i-h/o,"Mid"===e.alignY&&(u=t/2),"Max"===e.alignY&&(u=t),n=c/r,i=h/o)),{width:n,height:i,scaleX:r,scaleY:o,offsetLeft:s,offsetTop:a,cropX:l,cropY:u}}}),S.Image.CSS_CANVAS="canvas-img",S.Image.prototype.getSvgSrc=S.Image.prototype.getSrc,S.Image.fromObject=function(t,e){var n=S.util.object.clone(t);S.util.loadImage(n.src,function(t,i){i?e&&e(null,i):S.Image.prototype._initFilters.call(n,n.filters,function(i){n.filters=i||[],S.Image.prototype._initFilters.call(n,[n.resizeFilter],function(i){n.resizeFilter=i[0];var r=new S.Image(t,n);e(r)})})},null,n.crossOrigin)},S.Image.fromURL=function(t,e,n){S.util.loadImage(t,function(t){e&&e(new S.Image(t,n))},null,n&&n.crossOrigin)},S.Image.ATTRIBUTE_NAMES=S.SHARED_ATTRIBUTES.concat("x y width height preserveAspectRatio xlink:href crossOrigin".split(" ")),S.Image.fromElement=function(t,n,i){var r=S.parseAttributes(t,S.Image.ATTRIBUTE_NAMES);S.Image.fromURL(r["xlink:href"],n,e(i?S.util.object.clone(i):{},r))})}(e),S.util.object.extend(S.Object.prototype,{_getAngleValueForStraighten:function(){var t=this.angle%360;return t>0?90*Math.round((t-1)/90):90*Math.round(t/90)},straighten:function(){return this.rotate(this._getAngleValueForStraighten()),this},fxStraighten:function(t){var e=function(){},n=(t=t||{}).onComplete||e,i=t.onChange||e,r=this;return S.util.animate({startValue:this.get("angle"),endValue:this._getAngleValueForStraighten(),duration:this.FX_DURATION,onChange:function(t){r.rotate(t),i()},onComplete:function(){r.setCoords(),n()}}),this}}),S.util.object.extend(S.StaticCanvas.prototype,{straightenObject:function(t){return t.straighten(),this.requestRenderAll(),this},fxStraightenObject:function(t){return t.fxStraighten({onChange:this.requestRenderAllBound}),this}}),function(){"use strict";function t(t,e){var n="precision "+e+" float;\nvoid main(){}",i=t.createShader(t.FRAGMENT_SHADER);return t.shaderSource(i,n),t.compileShader(i),!!t.getShaderParameter(i,t.COMPILE_STATUS)}function e(t){t&&t.tileSize&&(this.tileSize=t.tileSize),this.setupGLContext(this.tileSize,this.tileSize),this.captureGPUInfo()}S.isWebglSupported=function(e){if(S.isLikelyNode)return!1;e=e||S.WebglFilterBackend.prototype.tileSize;var n=document.createElement("canvas"),i=n.getContext("webgl")||n.getContext("experimental-webgl"),r=!1;if(i){S.maxTextureSize=i.getParameter(i.MAX_TEXTURE_SIZE),r=S.maxTextureSize>=e;for(var o=["highp","mediump","lowp"],s=0;s<3;s++)if(t(i,o[s])){S.webGlPrecision=o[s];break}}return this.isSupported=r,r},S.WebglFilterBackend=e,e.prototype={tileSize:2048,resources:{},setupGLContext:function(t,e){this.dispose(),this.createWebGLCanvas(t,e),this.aPosition=new Float32Array([0,0,0,1,1,0,1,1]),this.chooseFastestCopyGLTo2DMethod(t,e)},chooseFastestCopyGLTo2DMethod:function(t,e){var n,i=void 0!==window.performance;try{new ImageData(1,1),n=!0}catch(t){n=!1}var r="undefined"!=typeof ArrayBuffer,o="undefined"!=typeof Uint8ClampedArray;if(i&&n&&r&&o){var s,a,l=S.util.createCanvasElement(),u=new ArrayBuffer(t*e*4),c={imageBuffer:u,destinationWidth:t,destinationHeight:e,targetCanvas:l};l.width=t,l.height=e,s=window.performance.now(),k.call(c,this.gl,c),a=window.performance.now()-s,s=window.performance.now(),E.call(c,this.gl,c),a>window.performance.now()-s?(this.imageBuffer=u,this.copyGLTo2D=E):this.copyGLTo2D=k}},createWebGLCanvas:function(t,e){var n=S.util.createCanvasElement();n.width=t,n.height=e;var i={alpha:!0,premultipliedAlpha:!1,depth:!1,stencil:!1,antialias:!1},r=n.getContext("webgl",i);r||(r=n.getContext("experimental-webgl",i)),r&&(r.clearColor(0,0,0,0),this.canvas=n,this.gl=r)},applyFilters:function(t,e,n,i,r,o){var s,a=this.gl;o&&(s=this.getCachedTexture(o,e));var l={originalWidth:e.width||e.originalWidth,originalHeight:e.height||e.originalHeight,sourceWidth:n,sourceHeight:i,destinationWidth:n,destinationHeight:i,context:a,sourceTexture:this.createTexture(a,n,i,!s&&e),targetTexture:this.createTexture(a,n,i),originalTexture:s||this.createTexture(a,n,i,!s&&e),passes:t.length,webgl:!0,aPosition:this.aPosition,programCache:this.programCache,pass:0,filterBackend:this,targetCanvas:r},u=a.createFramebuffer();return a.bindFramebuffer(a.FRAMEBUFFER,u),t.forEach(function(t){t&&t.applyTo(l)}),function(t){var e=t.targetCanvas,n=t.destinationWidth,i=t.destinationHeight;e.width===n&&e.height===i||(e.width=n,e.height=i)}(l),this.copyGLTo2D(a,l),a.bindTexture(a.TEXTURE_2D,null),a.deleteTexture(l.sourceTexture),a.deleteTexture(l.targetTexture),a.deleteFramebuffer(u),r.getContext("2d").setTransform(1,0,0,1,0,0),l},applyFiltersDebug:function(t,e,n,i,r,o){var s=this.gl,a=this.applyFilters(t,e,n,i,r,o),l=s.getError();if(l!==s.NO_ERROR){var u=this.glErrorToString(s,l),c=new Error("WebGL Error "+u);throw c.glErrorCode=l,c}return a},glErrorToString:function(t,e){if(!t)return"Context undefined for error code: "+e;if("number"!=typeof e)return"Error code is not a number";switch(e){case t.NO_ERROR:return"NO_ERROR";case t.INVALID_ENUM:return"INVALID_ENUM";case t.INVALID_VALUE:return"INVALID_VALUE";case t.INVALID_OPERATION:return"INVALID_OPERATION";case t.INVALID_FRAMEBUFFER_OPERATION:return"INVALID_FRAMEBUFFER_OPERATION";case t.OUT_OF_MEMORY:return"OUT_OF_MEMORY";case t.CONTEXT_LOST_WEBGL:return"CONTEXT_LOST_WEBGL";default:return"UNKNOWN_ERROR"}},dispose:function(){this.canvas&&(this.canvas=null,this.gl=null),this.clearWebGLCaches()},clearWebGLCaches:function(){this.programCache={},this.textureCache={}},createTexture:function(t,e,n,i){var r=t.createTexture();return t.bindTexture(t.TEXTURE_2D,r),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),i?t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,i):t.texImage2D(t.TEXTURE_2D,0,t.RGBA,e,n,0,t.RGBA,t.UNSIGNED_BYTE,null),r},getCachedTexture:function(t,e){if(this.textureCache[t])return this.textureCache[t];var n=this.createTexture(this.gl,e.width,e.height,e);return this.textureCache[t]=n,n},evictCachesForKey:function(t){this.textureCache[t]&&(this.gl.deleteTexture(this.textureCache[t]),delete this.textureCache[t])},copyGLTo2D:k,captureGPUInfo:function(){if(this.gpuInfo)return this.gpuInfo;var t=this.gl,e=t.getExtension("WEBGL_debug_renderer_info"),n={renderer:"",vendor:""};if(e){var i=t.getParameter(e.UNMASKED_RENDERER_WEBGL),r=t.getParameter(e.UNMASKED_VENDOR_WEBGL);i&&(n.renderer=i.toLowerCase()),r&&(n.vendor=r.toLowerCase())}return this.gpuInfo=n,n}}}(),function(){"use strict";var t=function(){};function e(){}S.Canvas2dFilterBackend=e,e.prototype={evictCachesForKey:t,dispose:t,clearWebGLCaches:t,resources:{},applyFilters:function(t,e,n,i,r){var o=r.getContext("2d");o.drawImage(e,0,0,n,i);var s={sourceWidth:n,sourceHeight:i,imageData:o.getImageData(0,0,n,i),originalEl:e,originalImageData:o.getImageData(0,0,n,i),canvasEl:r,ctx:o,filterBackend:this};return t.forEach(function(t){t.applyTo(s)}),s.imageData.width===n&&s.imageData.height===i||(r.width=s.imageData.width,r.height=s.imageData.height),o.putImageData(s.imageData,0,0),s}}}(),S.Image=S.Image||{},S.Image.filters=S.Image.filters||{},S.Image.filters.BaseFilter=S.util.createClass({type:"BaseFilter",vertexSource:"attribute vec2 aPosition;\nvarying vec2 vTexCoord;\nvoid main() {\nvTexCoord = aPosition;\ngl_Position = vec4(aPosition * 2.0 - 1.0, 0.0, 1.0);\n}",fragmentSource:"precision highp float;\nvarying vec2 vTexCoord;\nuniform sampler2D uTexture;\nvoid main() {\ngl_FragColor = texture2D(uTexture, vTexCoord);\n}",initialize:function(t){t&&this.setOptions(t)},setOptions:function(t){for(var e in t)this[e]=t[e]},createProgram:function(t,e,n){e=e||this.fragmentSource,n=n||this.vertexSource,"highp"!==S.webGlPrecision&&(e=e.replace(/precision highp float/g,"precision "+S.webGlPrecision+" float"));var i=t.createShader(t.VERTEX_SHADER);if(t.shaderSource(i,n),t.compileShader(i),!t.getShaderParameter(i,t.COMPILE_STATUS))throw new Error("Vertex shader compile error for "+this.type+": "+t.getShaderInfoLog(i));var r=t.createShader(t.FRAGMENT_SHADER);if(t.shaderSource(r,e),t.compileShader(r),!t.getShaderParameter(r,t.COMPILE_STATUS))throw new Error("Fragment shader compile error for "+this.type+": "+t.getShaderInfoLog(r));var o=t.createProgram();if(t.attachShader(o,i),t.attachShader(o,r),t.linkProgram(o),!t.getProgramParameter(o,t.LINK_STATUS))throw new Error('Shader link error for "${this.type}" '+t.getProgramInfoLog(o));var s=this.getAttributeLocations(t,o),a=this.getUniformLocations(t,o)||{};return a.uStepW=t.getUniformLocation(o,"uStepW"),a.uStepH=t.getUniformLocation(o,"uStepH"),{program:o,attributeLocations:s,uniformLocations:a}},getAttributeLocations:function(t,e){return{aPosition:t.getAttribLocation(e,"aPosition")}},getUniformLocations:function(){return{}},sendAttributeData:function(t,e,n){var i=e.aPosition,r=t.createBuffer();t.bindBuffer(t.ARRAY_BUFFER,r),t.enableVertexAttribArray(i),t.vertexAttribPointer(i,2,t.FLOAT,!1,0,0),t.bufferData(t.ARRAY_BUFFER,n,t.STATIC_DRAW)},_setupFrameBuffer:function(t){var e,n,i=t.context;t.passes>1?(n=t.destinationHeight,t.sourceWidth===(e=t.destinationWidth)&&t.sourceHeight===n||(i.deleteTexture(t.targetTexture),t.targetTexture=t.filterBackend.createTexture(i,e,n)),i.framebufferTexture2D(i.FRAMEBUFFER,i.COLOR_ATTACHMENT0,i.TEXTURE_2D,t.targetTexture,0)):(i.bindFramebuffer(i.FRAMEBUFFER,null),i.finish())},_swapTextures:function(t){t.passes--,t.pass++;var e=t.targetTexture;t.targetTexture=t.sourceTexture,t.sourceTexture=e},isNeutralState:function(){var t=this.mainParameter,e=S.Image.filters[this.type].prototype;if(t){if(Array.isArray(e[t])){for(var n=e[t].length;n--;)if(this[t][n]!==e[t][n])return!1;return!0}return e[t]===this[t]}return!1},applyTo:function(t){t.webgl?(this._setupFrameBuffer(t),this.applyToWebGL(t),this._swapTextures(t)):this.applyTo2d(t)},retrieveShader:function(t){return t.programCache.hasOwnProperty(this.type)||(t.programCache[this.type]=this.createProgram(t.context)),t.programCache[this.type]},applyToWebGL:function(t){var e=t.context,n=this.retrieveShader(t);e.bindTexture(e.TEXTURE_2D,0===t.pass&&t.originalTexture?t.originalTexture:t.sourceTexture),e.useProgram(n.program),this.sendAttributeData(e,n.attributeLocations,t.aPosition),e.uniform1f(n.uniformLocations.uStepW,1/t.sourceWidth),e.uniform1f(n.uniformLocations.uStepH,1/t.sourceHeight),this.sendUniformData(e,n.uniformLocations),e.viewport(0,0,t.destinationWidth,t.destinationHeight),e.drawArrays(e.TRIANGLE_STRIP,0,4)},bindAdditionalTexture:function(t,e,n){t.activeTexture(n),t.bindTexture(t.TEXTURE_2D,e),t.activeTexture(t.TEXTURE0)},unbindAdditionalTexture:function(t,e){t.activeTexture(e),t.bindTexture(t.TEXTURE_2D,null),t.activeTexture(t.TEXTURE0)},getMainParameter:function(){return this[this.mainParameter]},setMainParameter:function(t){this[this.mainParameter]=t},sendUniformData:function(){},createHelpLayer:function(t){if(!t.helpLayer){var e=document.createElement("canvas");e.width=t.sourceWidth,e.height=t.sourceHeight,t.helpLayer=e}},toObject:function(){var t={type:this.type},e=this.mainParameter;return e&&(t[e]=this[e]),t},toJSON:function(){return this.toObject()}}),S.Image.filters.BaseFilter.fromObject=function(t,e){var n=new S.Image.filters[t.type](t);return e&&e(n),n},function(t){"use strict";var n=e.fabric||(e.fabric={}),i=n.Image.filters;i.ColorMatrix=(0,n.util.createClass)(i.BaseFilter,{type:"ColorMatrix",fragmentSource:"precision highp float;\nuniform sampler2D uTexture;\nvarying vec2 vTexCoord;\nuniform mat4 uColorMatrix;\nuniform vec4 uConstants;\nvoid main() {\nvec4 color = texture2D(uTexture, vTexCoord);\ncolor *= uColorMatrix;\ncolor += uConstants;\ngl_FragColor = color;\n}",matrix:[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],mainParameter:"matrix",colorsOnly:!0,initialize:function(t){this.callSuper("initialize",t),this.matrix=this.matrix.slice(0)},applyTo2d:function(t){var e,n,i,r,o,s=t.imageData.data,a=s.length,l=this.matrix,u=this.colorsOnly;for(o=0;o<a;o+=4)e=s[o],n=s[o+1],i=s[o+2],u?(s[o]=e*l[0]+n*l[1]+i*l[2]+255*l[4],s[o+1]=e*l[5]+n*l[6]+i*l[7]+255*l[9],s[o+2]=e*l[10]+n*l[11]+i*l[12]+255*l[14]):(s[o]=e*l[0]+n*l[1]+i*l[2]+(r=s[o+3])*l[3]+255*l[4],s[o+1]=e*l[5]+n*l[6]+i*l[7]+r*l[8]+255*l[9],s[o+2]=e*l[10]+n*l[11]+i*l[12]+r*l[13]+255*l[14],s[o+3]=e*l[15]+n*l[16]+i*l[17]+r*l[18]+255*l[19])},getUniformLocations:function(t,e){return{uColorMatrix:t.getUniformLocation(e,"uColorMatrix"),uConstants:t.getUniformLocation(e,"uConstants")}},sendUniformData:function(t,e){var n=this.matrix,i=[n[4],n[9],n[14],n[19]];t.uniformMatrix4fv(e.uColorMatrix,!1,[n[0],n[1],n[2],n[3],n[5],n[6],n[7],n[8],n[10],n[11],n[12],n[13],n[15],n[16],n[17],n[18]]),t.uniform4fv(e.uConstants,i)}}),n.Image.filters.ColorMatrix.fromObject=n.Image.filters.BaseFilter.fromObject}(),function(t){"use strict";var n=e.fabric||(e.fabric={}),i=n.Image.filters;i.Brightness=(0,n.util.createClass)(i.BaseFilter,{type:"Brightness",fragmentSource:"precision highp float;\nuniform sampler2D uTexture;\nuniform float uBrightness;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = texture2D(uTexture, vTexCoord);\ncolor.rgb += uBrightness;\ngl_FragColor = color;\n}",brightness:0,mainParameter:"brightness",applyTo2d:function(t){if(0!==this.brightness){var e,n=t.imageData.data,i=n.length,r=Math.round(255*this.brightness);for(e=0;e<i;e+=4)n[e]=n[e]+r,n[e+1]=n[e+1]+r,n[e+2]=n[e+2]+r}},getUniformLocations:function(t,e){return{uBrightness:t.getUniformLocation(e,"uBrightness")}},sendUniformData:function(t,e){t.uniform1f(e.uBrightness,this.brightness)}}),n.Image.filters.Brightness.fromObject=n.Image.filters.BaseFilter.fromObject}(),function(t){"use strict";var n=e.fabric||(e.fabric={}),i=n.util.object.extend,r=n.Image.filters;r.Convolute=(0,n.util.createClass)(r.BaseFilter,{type:"Convolute",opaque:!1,matrix:[0,0,0,0,1,0,0,0,0],fragmentSource:{Convolute_3_1:"precision highp float;\nuniform sampler2D uTexture;\nuniform float uMatrix[9];\nuniform float uStepW;\nuniform float uStepH;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = vec4(0, 0, 0, 0);\nfor (float h = 0.0; h < 3.0; h+=1.0) {\nfor (float w = 0.0; w < 3.0; w+=1.0) {\nvec2 matrixPos = vec2(uStepW * (w - 1), uStepH * (h - 1));\ncolor += texture2D(uTexture, vTexCoord + matrixPos) * uMatrix[int(h * 3.0 + w)];\n}\n}\ngl_FragColor = color;\n}",Convolute_3_0:"precision highp float;\nuniform sampler2D uTexture;\nuniform float uMatrix[9];\nuniform float uStepW;\nuniform float uStepH;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = vec4(0, 0, 0, 1);\nfor (float h = 0.0; h < 3.0; h+=1.0) {\nfor (float w = 0.0; w < 3.0; w+=1.0) {\nvec2 matrixPos = vec2(uStepW * (w - 1.0), uStepH * (h - 1.0));\ncolor.rgb += texture2D(uTexture, vTexCoord + matrixPos).rgb * uMatrix[int(h * 3.0 + w)];\n}\n}\nfloat alpha = texture2D(uTexture, vTexCoord).a;\ngl_FragColor = color;\ngl_FragColor.a = alpha;\n}",Convolute_5_1:"precision highp float;\nuniform sampler2D uTexture;\nuniform float uMatrix[25];\nuniform float uStepW;\nuniform float uStepH;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = vec4(0, 0, 0, 0);\nfor (float h = 0.0; h < 5.0; h+=1.0) {\nfor (float w = 0.0; w < 5.0; w+=1.0) {\nvec2 matrixPos = vec2(uStepW * (w - 2.0), uStepH * (h - 2.0));\ncolor += texture2D(uTexture, vTexCoord + matrixPos) * uMatrix[int(h * 5.0 + w)];\n}\n}\ngl_FragColor = color;\n}",Convolute_5_0:"precision highp float;\nuniform sampler2D uTexture;\nuniform float uMatrix[25];\nuniform float uStepW;\nuniform float uStepH;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = vec4(0, 0, 0, 1);\nfor (float h = 0.0; h < 5.0; h+=1.0) {\nfor (float w = 0.0; w < 5.0; w+=1.0) {\nvec2 matrixPos = vec2(uStepW * (w - 2.0), uStepH * (h - 2.0));\ncolor.rgb += texture2D(uTexture, vTexCoord + matrixPos).rgb * uMatrix[int(h * 5.0 + w)];\n}\n}\nfloat alpha = texture2D(uTexture, vTexCoord).a;\ngl_FragColor = color;\ngl_FragColor.a = alpha;\n}",Convolute_7_1:"precision highp float;\nuniform sampler2D uTexture;\nuniform float uMatrix[49];\nuniform float uStepW;\nuniform float uStepH;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = vec4(0, 0, 0, 0);\nfor (float h = 0.0; h < 7.0; h+=1.0) {\nfor (float w = 0.0; w < 7.0; w+=1.0) {\nvec2 matrixPos = vec2(uStepW * (w - 3.0), uStepH * (h - 3.0));\ncolor += texture2D(uTexture, vTexCoord + matrixPos) * uMatrix[int(h * 7.0 + w)];\n}\n}\ngl_FragColor = color;\n}",Convolute_7_0:"precision highp float;\nuniform sampler2D uTexture;\nuniform float uMatrix[49];\nuniform float uStepW;\nuniform float uStepH;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = vec4(0, 0, 0, 1);\nfor (float h = 0.0; h < 7.0; h+=1.0) {\nfor (float w = 0.0; w < 7.0; w+=1.0) {\nvec2 matrixPos = vec2(uStepW * (w - 3.0), uStepH * (h - 3.0));\ncolor.rgb += texture2D(uTexture, vTexCoord + matrixPos).rgb * uMatrix[int(h * 7.0 + w)];\n}\n}\nfloat alpha = texture2D(uTexture, vTexCoord).a;\ngl_FragColor = color;\ngl_FragColor.a = alpha;\n}",Convolute_9_1:"precision highp float;\nuniform sampler2D uTexture;\nuniform float uMatrix[81];\nuniform float uStepW;\nuniform float uStepH;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = vec4(0, 0, 0, 0);\nfor (float h = 0.0; h < 9.0; h+=1.0) {\nfor (float w = 0.0; w < 9.0; w+=1.0) {\nvec2 matrixPos = vec2(uStepW * (w - 4.0), uStepH * (h - 4.0));\ncolor += texture2D(uTexture, vTexCoord + matrixPos) * uMatrix[int(h * 9.0 + w)];\n}\n}\ngl_FragColor = color;\n}",Convolute_9_0:"precision highp float;\nuniform sampler2D uTexture;\nuniform float uMatrix[81];\nuniform float uStepW;\nuniform float uStepH;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = vec4(0, 0, 0, 1);\nfor (float h = 0.0; h < 9.0; h+=1.0) {\nfor (float w = 0.0; w < 9.0; w+=1.0) {\nvec2 matrixPos = vec2(uStepW * (w - 4.0), uStepH * (h - 4.0));\ncolor.rgb += texture2D(uTexture, vTexCoord + matrixPos).rgb * uMatrix[int(h * 9.0 + w)];\n}\n}\nfloat alpha = texture2D(uTexture, vTexCoord).a;\ngl_FragColor = color;\ngl_FragColor.a = alpha;\n}"},retrieveShader:function(t){var e=Math.sqrt(this.matrix.length),n=this.type+"_"+e+"_"+(this.opaque?1:0),i=this.fragmentSource[n];return t.programCache.hasOwnProperty(n)||(t.programCache[n]=this.createProgram(t.context,i)),t.programCache[n]},applyTo2d:function(t){var e,n,i,r,o,s,a,l,u,c,h,p,d,f=t.imageData,g=f.data,m=this.matrix,v=Math.round(Math.sqrt(m.length)),y=Math.floor(v/2),b=f.width,_=f.height,w=t.ctx.createImageData(b,_),x=w.data,C=this.opaque?1:0;for(h=0;h<_;h++)for(c=0;c<b;c++){for(o=4*(h*b+c),e=0,n=0,i=0,r=0,d=0;d<v;d++)for(p=0;p<v;p++)s=c+p-y,(a=h+d-y)<0||a>_||s<0||s>b||(e+=g[l=4*(a*b+s)]*(u=m[d*v+p]),n+=g[l+1]*u,i+=g[l+2]*u,C||(r+=g[l+3]*u));x[o]=e,x[o+1]=n,x[o+2]=i,x[o+3]=C?g[o+3]:r}t.imageData=w},getUniformLocations:function(t,e){return{uMatrix:t.getUniformLocation(e,"uMatrix"),uOpaque:t.getUniformLocation(e,"uOpaque"),uHalfSize:t.getUniformLocation(e,"uHalfSize"),uSize:t.getUniformLocation(e,"uSize")}},sendUniformData:function(t,e){t.uniform1fv(e.uMatrix,this.matrix)},toObject:function(){return i(this.callSuper("toObject"),{opaque:this.opaque,matrix:this.matrix})}}),n.Image.filters.Convolute.fromObject=n.Image.filters.BaseFilter.fromObject}(),function(t){"use strict";var n=e.fabric||(e.fabric={}),i=n.Image.filters;i.Grayscale=(0,n.util.createClass)(i.BaseFilter,{type:"Grayscale",fragmentSource:{average:"precision highp float;\nuniform sampler2D uTexture;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = texture2D(uTexture, vTexCoord);\nfloat average = (color.r + color.b + color.g) / 3.0;\ngl_FragColor = vec4(average, average, average, color.a);\n}",lightness:"precision highp float;\nuniform sampler2D uTexture;\nuniform int uMode;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 col = texture2D(uTexture, vTexCoord);\nfloat average = (max(max(col.r, col.g),col.b) + min(min(col.r, col.g),col.b)) / 2.0;\ngl_FragColor = vec4(average, average, average, col.a);\n}",luminosity:"precision highp float;\nuniform sampler2D uTexture;\nuniform int uMode;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 col = texture2D(uTexture, vTexCoord);\nfloat average = 0.21 * col.r + 0.72 * col.g + 0.07 * col.b;\ngl_FragColor = vec4(average, average, average, col.a);\n}"},mode:"average",mainParameter:"mode",applyTo2d:function(t){var e,n,i=t.imageData.data,r=i.length,o=this.mode;for(e=0;e<r;e+=4)"average"===o?n=(i[e]+i[e+1]+i[e+2])/3:"lightness"===o?n=(Math.min(i[e],i[e+1],i[e+2])+Math.max(i[e],i[e+1],i[e+2]))/2:"luminosity"===o&&(n=.21*i[e]+.72*i[e+1]+.07*i[e+2]),i[e]=n,i[e+1]=n,i[e+2]=n},retrieveShader:function(t){var e=this.type+"_"+this.mode;return t.programCache.hasOwnProperty(e)||(t.programCache[e]=this.createProgram(t.context,this.fragmentSource[this.mode])),t.programCache[e]},getUniformLocations:function(t,e){return{uMode:t.getUniformLocation(e,"uMode")}},sendUniformData:function(t,e){t.uniform1i(e.uMode,1)},isNeutralState:function(){return!1}}),n.Image.filters.Grayscale.fromObject=n.Image.filters.BaseFilter.fromObject}(),function(t){"use strict";var n=e.fabric||(e.fabric={}),i=n.Image.filters;i.Invert=(0,n.util.createClass)(i.BaseFilter,{type:"Invert",fragmentSource:"precision highp float;\nuniform sampler2D uTexture;\nuniform int uInvert;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = texture2D(uTexture, vTexCoord);\nif (uInvert == 1) {\ngl_FragColor = vec4(1.0 - color.r,1.0 -color.g,1.0 -color.b,color.a);\n} else {\ngl_FragColor = color;\n}\n}",invert:!0,mainParameter:"invert",applyTo2d:function(t){var e,n=t.imageData.data,i=n.length;for(e=0;e<i;e+=4)n[e]=255-n[e],n[e+1]=255-n[e+1],n[e+2]=255-n[e+2]},isNeutralState:function(){return!this.invert},getUniformLocations:function(t,e){return{uInvert:t.getUniformLocation(e,"uInvert")}},sendUniformData:function(t,e){t.uniform1i(e.uInvert,this.invert)}}),n.Image.filters.Invert.fromObject=n.Image.filters.BaseFilter.fromObject}(),function(t){"use strict";var n=e.fabric||(e.fabric={}),i=n.util.object.extend,r=n.Image.filters;r.Noise=(0,n.util.createClass)(r.BaseFilter,{type:"Noise",fragmentSource:"precision highp float;\nuniform sampler2D uTexture;\nuniform float uStepH;\nuniform float uNoise;\nuniform float uSeed;\nvarying vec2 vTexCoord;\nfloat rand(vec2 co, float seed, float vScale) {\nreturn fract(sin(dot(co.xy * vScale ,vec2(12.9898 , 78.233))) * 43758.5453 * (seed + 0.01) / 2.0);\n}\nvoid main() {\nvec4 color = texture2D(uTexture, vTexCoord);\ncolor.rgb += (0.5 - rand(vTexCoord, uSeed, 0.1 / uStepH)) * uNoise;\ngl_FragColor = color;\n}",mainParameter:"noise",noise:0,applyTo2d:function(t){if(0!==this.noise){var e,n,i,r=t.imageData.data,o=this.noise;for(e=0,n=r.length;e<n;e+=4)i=(.5-Math.random())*o,r[e]+=i,r[e+1]+=i,r[e+2]+=i}},getUniformLocations:function(t,e){return{uNoise:t.getUniformLocation(e,"uNoise"),uSeed:t.getUniformLocation(e,"uSeed")}},sendUniformData:function(t,e){t.uniform1f(e.uNoise,this.noise/255),t.uniform1f(e.uSeed,Math.random())},toObject:function(){return i(this.callSuper("toObject"),{noise:this.noise})}}),n.Image.filters.Noise.fromObject=n.Image.filters.BaseFilter.fromObject}(),function(t){"use strict";var n=e.fabric||(e.fabric={}),i=n.Image.filters;i.Pixelate=(0,n.util.createClass)(i.BaseFilter,{type:"Pixelate",blocksize:4,mainParameter:"blocksize",fragmentSource:"precision highp float;\nuniform sampler2D uTexture;\nuniform float uBlocksize;\nuniform float uStepW;\nuniform float uStepH;\nvarying vec2 vTexCoord;\nvoid main() {\nfloat blockW = uBlocksize * uStepW;\nfloat blockH = uBlocksize * uStepW;\nint posX = int(vTexCoord.x / blockW);\nint posY = int(vTexCoord.y / blockH);\nfloat fposX = float(posX);\nfloat fposY = float(posY);\nvec2 squareCoords = vec2(fposX * blockW, fposY * blockH);\nvec4 color = texture2D(uTexture, squareCoords);\ngl_FragColor = color;\n}",applyTo2d:function(t){var e,n,i,r,o,s,a,l,u,c,h,p=t.imageData,d=p.data,f=p.height,g=p.width;for(n=0;n<f;n+=this.blocksize)for(i=0;i<g;i+=this.blocksize)for(r=d[e=4*n*g+4*i],o=d[e+1],s=d[e+2],a=d[e+3],c=Math.min(n+this.blocksize,f),h=Math.min(i+this.blocksize,g),l=n;l<c;l++)for(u=i;u<h;u++)d[e=4*l*g+4*u]=r,d[e+1]=o,d[e+2]=s,d[e+3]=a},isNeutralState:function(){return 1===this.blocksize},getUniformLocations:function(t,e){return{uBlocksize:t.getUniformLocation(e,"uBlocksize"),uStepW:t.getUniformLocation(e,"uStepW"),uStepH:t.getUniformLocation(e,"uStepH")}},sendUniformData:function(t,e){t.uniform1f(e.uBlocksize,this.blocksize)}}),n.Image.filters.Pixelate.fromObject=n.Image.filters.BaseFilter.fromObject}(),function(t){"use strict";var n=e.fabric||(e.fabric={}),i=n.util.object.extend,r=n.Image.filters;r.RemoveColor=(0,n.util.createClass)(r.BaseFilter,{type:"RemoveColor",color:"#FFFFFF",fragmentSource:"precision highp float;\nuniform sampler2D uTexture;\nuniform vec4 uLow;\nuniform vec4 uHigh;\nvarying vec2 vTexCoord;\nvoid main() {\ngl_FragColor = texture2D(uTexture, vTexCoord);\nif(all(greaterThan(gl_FragColor.rgb,uLow.rgb)) && all(greaterThan(uHigh.rgb,gl_FragColor.rgb))) {\ngl_FragColor.a = 0.0;\n}\n}",distance:.02,useAlpha:!1,applyTo2d:function(t){var e,i,r,o,s=t.imageData.data,a=255*this.distance,l=new n.Color(this.color).getSource(),u=[l[0]-a,l[1]-a,l[2]-a],c=[l[0]+a,l[1]+a,l[2]+a];for(e=0;e<s.length;e+=4)r=s[e+1],o=s[e+2],(i=s[e])>u[0]&&r>u[1]&&o>u[2]&&i<c[0]&&r<c[1]&&o<c[2]&&(s[e+3]=0)},getUniformLocations:function(t,e){return{uLow:t.getUniformLocation(e,"uLow"),uHigh:t.getUniformLocation(e,"uHigh")}},sendUniformData:function(t,e){var i=new n.Color(this.color).getSource(),r=parseFloat(this.distance),o=[i[0]/255+r,i[1]/255+r,i[2]/255+r,1];t.uniform4fv(e.uLow,[0+i[0]/255-r,0+i[1]/255-r,0+i[2]/255-r,1]),t.uniform4fv(e.uHigh,o)},toObject:function(){return i(this.callSuper("toObject"),{color:this.color,distance:this.distance})}}),n.Image.filters.RemoveColor.fromObject=n.Image.filters.BaseFilter.fromObject}(),function(t){"use strict";var n=e.fabric||(e.fabric={}),i=n.Image.filters,r=n.util.createClass,o={Brownie:[.5997,.34553,-.27082,0,.186,-.0377,.86095,.15059,0,-.1449,.24113,-.07441,.44972,0,-.02965,0,0,0,1,0],Vintage:[.62793,.32021,-.03965,0,.03784,.02578,.64411,.03259,0,.02926,.0466,-.08512,.52416,0,.02023,0,0,0,1,0],Kodachrome:[1.12855,-.39673,-.03992,0,.24991,-.16404,1.08352,-.05498,0,.09698,-.16786,-.56034,1.60148,0,.13972,0,0,0,1,0],Technicolor:[1.91252,-.85453,-.09155,0,.04624,-.30878,1.76589,-.10601,0,-.27589,-.2311,-.75018,1.84759,0,.12137,0,0,0,1,0],Polaroid:[1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0],Sepia:[.393,.769,.189,0,0,.349,.686,.168,0,0,.272,.534,.131,0,0,0,0,0,1,0],BlackWhite:[1.5,1.5,1.5,0,-1,1.5,1.5,1.5,0,-1,1.5,1.5,1.5,0,-1,0,0,0,1,0]};for(var s in o)i[s]=r(i.ColorMatrix,{type:s,matrix:o[s],mainParameter:!1,colorsOnly:!0}),n.Image.filters[s].fromObject=n.Image.filters.BaseFilter.fromObject}(),function(t){"use strict";var n=e.fabric,i=n.Image.filters;i.BlendColor=(0,n.util.createClass)(i.BaseFilter,{type:"BlendColor",color:"#F95C63",mode:"multiply",alpha:1,fragmentSource:{multiply:"gl_FragColor.rgb *= uColor.rgb;\n",screen:"gl_FragColor.rgb = 1.0 - (1.0 - gl_FragColor.rgb) * (1.0 - uColor.rgb);\n",add:"gl_FragColor.rgb += uColor.rgb;\n",diff:"gl_FragColor.rgb = abs(gl_FragColor.rgb - uColor.rgb);\n",subtract:"gl_FragColor.rgb -= uColor.rgb;\n",lighten:"gl_FragColor.rgb = max(gl_FragColor.rgb, uColor.rgb);\n",darken:"gl_FragColor.rgb = min(gl_FragColor.rgb, uColor.rgb);\n",exclusion:"gl_FragColor.rgb += uColor.rgb - 2.0 * (uColor.rgb * gl_FragColor.rgb);\n",overlay:"if (uColor.r < 0.5) {\ngl_FragColor.r *= 2.0 * uColor.r;\n} else {\ngl_FragColor.r = 1.0 - 2.0 * (1.0 - gl_FragColor.r) * (1.0 - uColor.r);\n}\nif (uColor.g < 0.5) {\ngl_FragColor.g *= 2.0 * uColor.g;\n} else {\ngl_FragColor.g = 1.0 - 2.0 * (1.0 - gl_FragColor.g) * (1.0 - uColor.g);\n}\nif (uColor.b < 0.5) {\ngl_FragColor.b *= 2.0 * uColor.b;\n} else {\ngl_FragColor.b = 1.0 - 2.0 * (1.0 - gl_FragColor.b) * (1.0 - uColor.b);\n}\n",tint:"gl_FragColor.rgb *= (1.0 - uColor.a);\ngl_FragColor.rgb += uColor.rgb;\n"},buildSource:function(t){return"precision highp float;\nuniform sampler2D uTexture;\nuniform vec4 uColor;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = texture2D(uTexture, vTexCoord);\ngl_FragColor = color;\nif (color.a > 0.0) {\n"+this.fragmentSource[t]+"}\n}"},retrieveShader:function(t){var e,n=this.type+"_"+this.mode;return t.programCache.hasOwnProperty(n)||(e=this.buildSource(this.mode),t.programCache[n]=this.createProgram(t.context,e)),t.programCache[n]},applyTo2d:function(t){var e,i,r,o,s,a,l,u=t.imageData.data,c=u.length,h=1-this.alpha;e=(l=new n.Color(this.color).getSource())[0]*this.alpha,i=l[1]*this.alpha,r=l[2]*this.alpha;for(var p=0;p<c;p+=4)switch(o=u[p],s=u[p+1],a=u[p+2],this.mode){case"multiply":u[p]=o*e/255,u[p+1]=s*i/255,u[p+2]=a*r/255;break;case"screen":u[p]=255-(255-o)*(255-e)/255,u[p+1]=255-(255-s)*(255-i)/255,u[p+2]=255-(255-a)*(255-r)/255;break;case"add":u[p]=o+e,u[p+1]=s+i,u[p+2]=a+r;break;case"diff":case"difference":u[p]=Math.abs(o-e),u[p+1]=Math.abs(s-i),u[p+2]=Math.abs(a-r);break;case"subtract":u[p]=o-e,u[p+1]=s-i,u[p+2]=a-r;break;case"darken":u[p]=Math.min(o,e),u[p+1]=Math.min(s,i),u[p+2]=Math.min(a,r);break;case"lighten":u[p]=Math.max(o,e),u[p+1]=Math.max(s,i),u[p+2]=Math.max(a,r);break;case"overlay":u[p]=e<128?2*o*e/255:255-2*(255-o)*(255-e)/255,u[p+1]=i<128?2*s*i/255:255-2*(255-s)*(255-i)/255,u[p+2]=r<128?2*a*r/255:255-2*(255-a)*(255-r)/255;break;case"exclusion":u[p]=e+o-2*e*o/255,u[p+1]=i+s-2*i*s/255,u[p+2]=r+a-2*r*a/255;break;case"tint":u[p]=e+o*h,u[p+1]=i+s*h,u[p+2]=r+a*h}},getUniformLocations:function(t,e){return{uColor:t.getUniformLocation(e,"uColor")}},sendUniformData:function(t,e){var i=new n.Color(this.color).getSource();i[0]=this.alpha*i[0]/255,i[1]=this.alpha*i[1]/255,i[2]=this.alpha*i[2]/255,i[3]=this.alpha,t.uniform4fv(e.uColor,i)},toObject:function(){return{type:this.type,color:this.color,mode:this.mode,alpha:this.alpha}}}),n.Image.filters.BlendColor.fromObject=n.Image.filters.BaseFilter.fromObject}(),function(t){"use strict";var n=e.fabric,i=n.Image.filters;i.BlendImage=(0,n.util.createClass)(i.BaseFilter,{type:"BlendImage",image:null,mode:"multiply",alpha:1,vertexSource:"attribute vec2 aPosition;\nvarying vec2 vTexCoord;\nvarying vec2 vTexCoord2;\nuniform mat3 uTransformMatrix;\nvoid main() {\nvTexCoord = aPosition;\nvTexCoord2 = (uTransformMatrix * vec3(aPosition, 1.0)).xy;\ngl_Position = vec4(aPosition * 2.0 - 1.0, 0.0, 1.0);\n}",fragmentSource:{multiply:"precision highp float;\nuniform sampler2D uTexture;\nuniform sampler2D uImage;\nuniform vec4 uColor;\nvarying vec2 vTexCoord;\nvarying vec2 vTexCoord2;\nvoid main() {\nvec4 color = texture2D(uTexture, vTexCoord);\nvec4 color2 = texture2D(uImage, vTexCoord2);\ncolor.rgba *= color2.rgba;\ngl_FragColor = color;\n}",mask:"precision highp float;\nuniform sampler2D uTexture;\nuniform sampler2D uImage;\nuniform vec4 uColor;\nvarying vec2 vTexCoord;\nvarying vec2 vTexCoord2;\nvoid main() {\nvec4 color = texture2D(uTexture, vTexCoord);\nvec4 color2 = texture2D(uImage, vTexCoord2);\ncolor.a = color2.a;\ngl_FragColor = color;\n}"},retrieveShader:function(t){var e=this.type+"_"+this.mode,n=this.fragmentSource[this.mode];return t.programCache.hasOwnProperty(e)||(t.programCache[e]=this.createProgram(t.context,n)),t.programCache[e]},applyToWebGL:function(t){var e=t.context,n=this.createTexture(t.filterBackend,this.image);this.bindAdditionalTexture(e,n,e.TEXTURE1),this.callSuper("applyToWebGL",t),this.unbindAdditionalTexture(e,e.TEXTURE1)},createTexture:function(t,e){return t.getCachedTexture(e.cacheKey,e._element)},calculateMatrix:function(){var t=this.image;return[1/t.scaleX,0,0,0,1/t.scaleY,0,-t.left/t._element.width,-t.top/t._element.height,1]},applyTo2d:function(t){var e,i,r,o,s,a,l,u,c,h,p,d=t.imageData,f=t.filterBackend.resources,g=d.data,m=g.length,v=d.width,y=d.height,b=this.image;f.blendImage||(f.blendImage=n.util.createCanvasElement()),h=(c=f.blendImage).getContext("2d"),c.width!==v||c.height!==y?(c.width=v,c.height=y):h.clearRect(0,0,v,y),h.setTransform(b.scaleX,0,0,b.scaleY,b.left,b.top),h.drawImage(b._element,0,0,v,y),p=h.getImageData(0,0,v,y).data;for(var _=0;_<m;_+=4)switch(s=g[_],a=g[_+1],l=g[_+2],u=g[_+3],e=p[_],i=p[_+1],r=p[_+2],o=p[_+3],this.mode){case"multiply":g[_]=s*e/255,g[_+1]=a*i/255,g[_+2]=l*r/255,g[_+3]=u*o/255;break;case"mask":g[_+3]=o}},getUniformLocations:function(t,e){return{uTransformMatrix:t.getUniformLocation(e,"uTransformMatrix"),uImage:t.getUniformLocation(e,"uImage")}},sendUniformData:function(t,e){var n=this.calculateMatrix();t.uniform1i(e.uImage,1),t.uniformMatrix3fv(e.uTransformMatrix,!1,n)},toObject:function(){return{type:this.type,image:this.image&&this.image.toObject(),mode:this.mode,alpha:this.alpha}}}),n.Image.filters.BlendImage.fromObject=function(t,e){n.Image.fromObject(t.image,function(i){var r=n.util.object.clone(t);r.image=i,e(new n.Image.filters.BlendImage(r))})}}(),function(t){"use strict";var n=e.fabric||(e.fabric={}),i=Math.pow,r=Math.floor,o=Math.sqrt,s=Math.abs,a=Math.round,l=Math.sin,u=Math.ceil,c=n.Image.filters;c.Resize=(0,n.util.createClass)(c.BaseFilter,{type:"Resize",resizeType:"hermite",scaleX:1,scaleY:1,lanczosLobes:3,getUniformLocations:function(t,e){return{uDelta:t.getUniformLocation(e,"uDelta"),uTaps:t.getUniformLocation(e,"uTaps")}},sendUniformData:function(t,e){t.uniform2fv(e.uDelta,this.horizontal?[1/this.width,0]:[0,1/this.height]),t.uniform1fv(e.uTaps,this.taps)},retrieveShader:function(t){var e=this.getFilterWindow(),n=this.type+"_"+e;if(!t.programCache.hasOwnProperty(n)){var i=this.generateShader(e);t.programCache[n]=this.createProgram(t.context,i)}return t.programCache[n]},getFilterWindow:function(){return Math.ceil(this.lanczosLobes/this.tempScale)},getTaps:function(){for(var t=this.lanczosCreate(this.lanczosLobes),e=this.tempScale,n=this.getFilterWindow(),i=new Array(n),r=1;r<=n;r++)i[r-1]=t(r*e);return i},generateShader:function(t){for(var e=new Array(t),n=this.fragmentSourceTOP,i=1;i<=t;i++)e[i-1]=i+".0 * uDelta";return n+="uniform float uTaps["+t+"];\n",n+="void main() {\n",n+=" vec4 color = texture2D(uTexture, vTexCoord);\n",n+=" float sum = 1.0;\n",e.forEach(function(t,e){n+=" color += texture2D(uTexture, vTexCoord + "+t+") * uTaps["+e+"];\n",n+=" color += texture2D(uTexture, vTexCoord - "+t+") * uTaps["+e+"];\n",n+=" sum += 2.0 * uTaps["+e+"];\n"}),n+=" gl_FragColor = color / sum;\n",n+="}"},fragmentSourceTOP:"precision highp float;\nuniform sampler2D uTexture;\nuniform vec2 uDelta;\nvarying vec2 vTexCoord;\n",applyTo:function(t){t.webgl?(t.passes++,this.width=t.sourceWidth,this.horizontal=!0,this.dW=Math.round(this.width*this.scaleX),this.dH=t.sourceHeight,this.tempScale=this.dW/this.width,this.taps=this.getTaps(),t.destinationWidth=this.dW,this._setupFrameBuffer(t),this.applyToWebGL(t),this._swapTextures(t),t.sourceWidth=t.destinationWidth,this.height=t.sourceHeight,this.horizontal=!1,this.dH=Math.round(this.height*this.scaleY),this.tempScale=this.dH/this.height,this.taps=this.getTaps(),t.destinationHeight=this.dH,this._setupFrameBuffer(t),this.applyToWebGL(t),this._swapTextures(t),t.sourceHeight=t.destinationHeight):this.applyTo2d(t)},isNeutralState:function(){return 1===this.scaleX&&1===this.scaleY},lanczosCreate:function(t){return function(e){if(e>=t||e<=-t)return 0;if(e<1.1920929e-7&&e>-1.1920929e-7)return 1;var n=(e*=Math.PI)/t;return l(e)/e*l(n)/n}},applyTo2d:function(t){var e=t.imageData,n=this.scaleX,i=this.scaleY;this.rcpScaleX=1/n,this.rcpScaleY=1/i;var r,o=e.width,s=e.height,l=a(o*n),u=a(s*i);"sliceHack"===this.resizeType?r=this.sliceByTwo(t,o,s,l,u):"hermite"===this.resizeType?r=this.hermiteFastResize(t,o,s,l,u):"bilinear"===this.resizeType?r=this.bilinearFiltering(t,o,s,l,u):"lanczos"===this.resizeType&&(r=this.lanczosResize(t,o,s,l,u)),t.imageData=r},sliceByTwo:function(t,e,i,o,s){var a,l,u=t.imageData,c=!1,h=!1,p=.5*e,d=.5*i,f=n.filterBackend.resources,g=0,m=0,v=e,y=0;for(f.sliceByTwo||(f.sliceByTwo=document.createElement("canvas")),((a=f.sliceByTwo).width<1.5*e||a.height<i)&&(a.width=1.5*e,a.height=i),(l=a.getContext("2d")).clearRect(0,0,1.5*e,i),l.putImageData(u,0,0),o=r(o),s=r(s);!c||!h;)e=p,i=d,o<r(.5*p)?p=r(.5*p):(p=o,c=!0),s<r(.5*d)?d=r(.5*d):(d=s,h=!0),l.drawImage(a,g,m,e,i,v,y,p,d),g=v,m=y,y+=d;return l.getImageData(g,m,o,s)},lanczosResize:function(t,e,n,a,l){var c=t.imageData.data,h=t.ctx.createImageData(a,l),p=h.data,d=this.lanczosCreate(this.lanczosLobes),f=this.rcpScaleX,g=this.rcpScaleY,m=2/this.rcpScaleX,v=2/this.rcpScaleY,y=u(f*this.lanczosLobes/2),b=u(g*this.lanczosLobes/2),_={},w={},x={};return function t(u){var C,S,k,E,T,O,I,A,P,D,j;for(w.x=(u+.5)*f,x.x=r(w.x),C=0;C<l;C++){for(w.y=(C+.5)*g,x.y=r(w.y),T=0,O=0,I=0,A=0,P=0,S=x.x-y;S<=x.x+y;S++)if(!(S<0||S>=e)){D=r(1e3*s(S-w.x)),_[D]||(_[D]={});for(var M=x.y-b;M<=x.y+b;M++)M<0||M>=n||(j=r(1e3*s(M-w.y)),_[D][j]||(_[D][j]=d(o(i(D*m,2)+i(j*v,2))/1e3)),(k=_[D][j])>0&&(T+=k,O+=k*c[E=4*(M*e+S)],I+=k*c[E+1],A+=k*c[E+2],P+=k*c[E+3]))}p[E=4*(C*a+u)]=O/T,p[E+1]=I/T,p[E+2]=A/T,p[E+3]=P/T}return++u<a?t(u):h}(0)},bilinearFiltering:function(t,e,n,i,o){var s,a,l,u,c,h,p,d,f=0,g=this.rcpScaleX,m=this.rcpScaleY,v=4*(e-1),y=t.imageData.data,b=t.ctx.createImageData(i,o),_=b.data;for(l=0;l<o;l++)for(u=0;u<i;u++)for(c=g*u-(s=r(g*u)),h=m*l-(a=r(m*l)),d=4*(a*e+s),p=0;p<4;p++)_[f++]=y[d+p]*(1-c)*(1-h)+y[d+4+p]*c*(1-h)+y[d+v+p]*h*(1-c)+y[d+v+4+p]*c*h;return b},hermiteFastResize:function(t,e,n,i,a){for(var l=this.rcpScaleX,c=this.rcpScaleY,h=u(l/2),p=u(c/2),d=t.imageData.data,f=t.ctx.createImageData(i,a),g=f.data,m=0;m<a;m++)for(var v=0;v<i;v++){for(var y=4*(v+m*i),b=0,_=0,w=0,x=0,C=0,S=0,k=0,E=(m+.5)*c,T=r(m*c);T<(m+1)*c;T++)for(var O=s(E-(T+.5))/p,I=(v+.5)*l,A=O*O,P=r(v*l);P<(v+1)*l;P++){var D=s(I-(P+.5))/h,j=o(A+D*D);j>1&&j<-1||(b=2*j*j*j-3*j*j+1)>0&&(k+=b*d[3+(D=4*(P+T*e))],w+=b,d[D+3]<255&&(b=b*d[D+3]/250),x+=b*d[D],C+=b*d[D+1],S+=b*d[D+2],_+=b)}g[y]=x/_,g[y+1]=C/_,g[y+2]=S/_,g[y+3]=k/w}return f},toObject:function(){return{type:this.type,scaleX:this.scaleX,scaleY:this.scaleY,resizeType:this.resizeType,lanczosLobes:this.lanczosLobes}}}),n.Image.filters.Resize.fromObject=n.Image.filters.BaseFilter.fromObject}(),function(t){"use strict";var n=e.fabric||(e.fabric={}),i=n.Image.filters;i.Contrast=(0,n.util.createClass)(i.BaseFilter,{type:"Contrast",fragmentSource:"precision highp float;\nuniform sampler2D uTexture;\nuniform float uContrast;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = texture2D(uTexture, vTexCoord);\nfloat contrastF = 1.015 * (uContrast + 1.0) / (1.0 * (1.015 - uContrast));\ncolor.rgb = contrastF * (color.rgb - 0.5) + 0.5;\ngl_FragColor = color;\n}",contrast:0,mainParameter:"contrast",applyTo2d:function(t){if(0!==this.contrast){var e,n=t.imageData.data,i=n.length,r=Math.floor(255*this.contrast),o=259*(r+255)/(255*(259-r));for(e=0;e<i;e+=4)n[e]=o*(n[e]-128)+128,n[e+1]=o*(n[e+1]-128)+128,n[e+2]=o*(n[e+2]-128)+128}},getUniformLocations:function(t,e){return{uContrast:t.getUniformLocation(e,"uContrast")}},sendUniformData:function(t,e){t.uniform1f(e.uContrast,this.contrast)}}),n.Image.filters.Contrast.fromObject=n.Image.filters.BaseFilter.fromObject}(),function(t){"use strict";var n=e.fabric||(e.fabric={}),i=n.Image.filters;i.Saturation=(0,n.util.createClass)(i.BaseFilter,{type:"Saturation",fragmentSource:"precision highp float;\nuniform sampler2D uTexture;\nuniform float uSaturation;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = texture2D(uTexture, vTexCoord);\nfloat rgMax = max(color.r, color.g);\nfloat rgbMax = max(rgMax, color.b);\ncolor.r += rgbMax != color.r ? (rgbMax - color.r) * uSaturation : 0.00;\ncolor.g += rgbMax != color.g ? (rgbMax - color.g) * uSaturation : 0.00;\ncolor.b += rgbMax != color.b ? (rgbMax - color.b) * uSaturation : 0.00;\ngl_FragColor = color;\n}",saturation:0,mainParameter:"saturation",applyTo2d:function(t){if(0!==this.saturation){var e,n,i=t.imageData.data,r=i.length,o=-this.saturation;for(e=0;e<r;e+=4)n=Math.max(i[e],i[e+1],i[e+2]),i[e]+=n!==i[e]?(n-i[e])*o:0,i[e+1]+=n!==i[e+1]?(n-i[e+1])*o:0,i[e+2]+=n!==i[e+2]?(n-i[e+2])*o:0}},getUniformLocations:function(t,e){return{uSaturation:t.getUniformLocation(e,"uSaturation")}},sendUniformData:function(t,e){t.uniform1f(e.uSaturation,-this.saturation)}}),n.Image.filters.Saturation.fromObject=n.Image.filters.BaseFilter.fromObject}(),function(t){"use strict";var n=e.fabric||(e.fabric={}),i=n.Image.filters;i.Blur=(0,n.util.createClass)(i.BaseFilter,{type:"Blur",fragmentSource:"precision highp float;\nuniform sampler2D uTexture;\nuniform vec2 uDelta;\nvarying vec2 vTexCoord;\nconst float nSamples = 15.0;\nvec3 v3offset = vec3(12.9898, 78.233, 151.7182);\nfloat random(vec3 scale) {\nreturn fract(sin(dot(gl_FragCoord.xyz, scale)) * 43758.5453);\n}\nvoid main() {\nvec4 color = vec4(0.0);\nfloat total = 0.0;\nfloat offset = random(v3offset);\nfor (float t = -nSamples; t <= nSamples; t++) {\nfloat percent = (t + offset - 0.5) / nSamples;\nfloat weight = 1.0 - abs(percent);\ncolor += texture2D(uTexture, vTexCoord + uDelta * percent) * weight;\ntotal += weight;\n}\ngl_FragColor = color / total;\n}",blur:0,mainParameter:"blur",applyTo:function(t){t.webgl?(this.aspectRatio=t.sourceWidth/t.sourceHeight,t.passes++,this._setupFrameBuffer(t),this.horizontal=!0,this.applyToWebGL(t),this._swapTextures(t),this._setupFrameBuffer(t),this.horizontal=!1,this.applyToWebGL(t),this._swapTextures(t)):this.applyTo2d(t)},applyTo2d:function(t){t.imageData=this.simpleBlur(t)},simpleBlur:function(t){var e,i,r=t.filterBackend.resources,o=t.imageData.width,s=t.imageData.height;r.blurLayer1||(r.blurLayer1=n.util.createCanvasElement(),r.blurLayer2=n.util.createCanvasElement()),i=r.blurLayer2,(e=r.blurLayer1).width===o&&e.height===s||(i.width=e.width=o,i.height=e.height=s);var a,l,u,c,h=e.getContext("2d"),p=i.getContext("2d"),d=.06*this.blur*.5;for(h.putImageData(t.imageData,0,0),p.clearRect(0,0,o,s),c=-15;c<=15;c++)a=(Math.random()-.5)/4,u=d*(l=c/15)*o+a,p.globalAlpha=1-Math.abs(l),p.drawImage(e,u,a),h.drawImage(i,0,0),p.globalAlpha=1,p.clearRect(0,0,i.width,i.height);for(c=-15;c<=15;c++)a=(Math.random()-.5)/4,u=d*(l=c/15)*s+a,p.globalAlpha=1-Math.abs(l),p.drawImage(e,a,u),h.drawImage(i,0,0),p.globalAlpha=1,p.clearRect(0,0,i.width,i.height);t.ctx.drawImage(e,0,0);var f=t.ctx.getImageData(0,0,e.width,e.height);return h.globalAlpha=1,h.clearRect(0,0,e.width,e.height),f},getUniformLocations:function(t,e){return{delta:t.getUniformLocation(e,"uDelta")}},sendUniformData:function(t,e){var n=this.chooseRightDelta();t.uniform2fv(e.delta,n)},chooseRightDelta:function(){var t,e=1,n=[0,0];return this.horizontal?this.aspectRatio>1&&(e=1/this.aspectRatio):this.aspectRatio<1&&(e=this.aspectRatio),t=e*this.blur*.12,this.horizontal?n[0]=t:n[1]=t,n}}),i.Blur.fromObject=n.Image.filters.BaseFilter.fromObject}(),function(t){"use strict";var n=e.fabric||(e.fabric={}),i=n.Image.filters;i.Gamma=(0,n.util.createClass)(i.BaseFilter,{type:"Gamma",fragmentSource:"precision highp float;\nuniform sampler2D uTexture;\nuniform vec3 uGamma;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = texture2D(uTexture, vTexCoord);\nvec3 correction = (1.0 / uGamma);\ncolor.r = pow(color.r, correction.r);\ncolor.g = pow(color.g, correction.g);\ncolor.b = pow(color.b, correction.b);\ngl_FragColor = color;\ngl_FragColor.rgb *= color.a;\n}",gamma:[1,1,1],mainParameter:"gamma",initialize:function(t){this.gamma=[1,1,1],i.BaseFilter.prototype.initialize.call(this,t)},applyTo2d:function(t){var e,n=t.imageData.data,i=this.gamma,r=n.length,o=1/i[0],s=1/i[1],a=1/i[2];for(this.rVals||(this.rVals=new Uint8Array(256),this.gVals=new Uint8Array(256),this.bVals=new Uint8Array(256)),e=0,r=256;e<r;e++)this.rVals[e]=255*Math.pow(e/255,o),this.gVals[e]=255*Math.pow(e/255,s),this.bVals[e]=255*Math.pow(e/255,a);for(e=0,r=n.length;e<r;e+=4)n[e]=this.rVals[n[e]],n[e+1]=this.gVals[n[e+1]],n[e+2]=this.bVals[n[e+2]]},getUniformLocations:function(t,e){return{uGamma:t.getUniformLocation(e,"uGamma")}},sendUniformData:function(t,e){t.uniform3fv(e.uGamma,this.gamma)}}),n.Image.filters.Gamma.fromObject=n.Image.filters.BaseFilter.fromObject}(),function(t){"use strict";var n=e.fabric||(e.fabric={}),i=n.Image.filters;i.Composed=(0,n.util.createClass)(i.BaseFilter,{type:"Composed",subFilters:[],initialize:function(t){this.callSuper("initialize",t),this.subFilters=this.subFilters.slice(0)},applyTo:function(t){t.passes+=this.subFilters.length-1,this.subFilters.forEach(function(e){e.applyTo(t)})},toObject:function(){return n.util.object.extend(this.callSuper("toObject"),{subFilters:this.subFilters.map(function(t){return t.toObject()})})},isNeutralState:function(){return!this.subFilters.some(function(t){return!t.isNeutralState()})}}),n.Image.filters.Composed.fromObject=function(t,e){var i=(t.subFilters||[]).map(function(t){return new n.Image.filters[t.type](t)}),r=new n.Image.filters.Composed({subFilters:i});return e&&e(r),r}}(),function(t){"use strict";var n=e.fabric||(e.fabric={}),i=n.Image.filters;i.HueRotation=(0,n.util.createClass)(i.ColorMatrix,{type:"HueRotation",rotation:0,mainParameter:"rotation",calculateMatrix:function(){var t=this.rotation*Math.PI,e=n.util.cos(t),i=n.util.sin(t),r=Math.sqrt(1/3)*i,o=1-e;this.matrix=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],this.matrix[0]=e+o/3,this.matrix[1]=1/3*o-r,this.matrix[2]=1/3*o+r,this.matrix[5]=1/3*o+r,this.matrix[6]=e+1/3*o,this.matrix[7]=1/3*o-r,this.matrix[10]=1/3*o-r,this.matrix[11]=1/3*o+r,this.matrix[12]=e+1/3*o},isNeutralState:function(t){return this.calculateMatrix(),i.BaseFilter.prototype.isNeutralState.call(this,t)},applyTo:function(t){this.calculateMatrix(),i.BaseFilter.prototype.applyTo.call(this,t)}}),n.Image.filters.HueRotation.fromObject=n.Image.filters.BaseFilter.fromObject}(),function(t){"use strict";var n=e.fabric||(e.fabric={}),i=n.util.object.clone;n.Text?n.warn("fabric.Text is already defined"):(n.Text=n.util.createClass(n.Object,{_dimensionAffectingProps:["fontSize","fontWeight","fontFamily","fontStyle","lineHeight","text","charSpacing","textAlign","styles"],_reNewline:/\r?\n/,_reSpacesAndTabs:/[ \t\r]/g,_reSpaceAndTab:/[ \t\r]/,_reWords:/\S+/g,type:"text",fontSize:40,fontWeight:"normal",fontFamily:"Times New Roman",underline:!1,overline:!1,linethrough:!1,textAlign:"left",fontStyle:"normal",lineHeight:1.16,superscript:{size:.6,baseline:-.35},subscript:{size:.6,baseline:.11},textBackgroundColor:"",stateProperties:n.Object.prototype.stateProperties.concat("fontFamily","fontWeight","fontSize","text","underline","overline","linethrough","textAlign","fontStyle","lineHeight","textBackgroundColor","charSpacing","styles"),cacheProperties:n.Object.prototype.cacheProperties.concat("fontFamily","fontWeight","fontSize","text","underline","overline","linethrough","textAlign","fontStyle","lineHeight","textBackgroundColor","charSpacing","styles"),stroke:null,shadow:null,_fontSizeFraction:.222,offsets:{underline:.1,linethrough:-.315,overline:-.88},_fontSizeMult:1.13,charSpacing:0,styles:null,_measuringContext:null,deltaY:0,_styleProperties:["stroke","strokeWidth","fill","fontFamily","fontSize","fontWeight","fontStyle","underline","overline","linethrough","deltaY","textBackgroundColor"],__charBounds:[],CACHE_FONT_SIZE:400,MIN_TEXT_WIDTH:2,initialize:function(t,e){this.styles=e&&e.styles||{},this.text=t,this.__skipDimension=!0,this.callSuper("initialize",e),this.__skipDimension=!1,this.initDimensions(),this.setCoords(),this.setupState({propertySet:"_dimensionAffectingProps"})},getMeasuringContext:function(){return n._measuringContext||(n._measuringContext=this.canvas&&this.canvas.contextCache||n.util.createCanvasElement().getContext("2d")),n._measuringContext},_splitText:function(){var t=this._splitTextIntoLines(this.text);return this.textLines=t.lines,this._textLines=t.graphemeLines,this._unwrappedTextLines=t._unwrappedLines,this._text=t.graphemeText,t},initDimensions:function(){this.__skipDimension||(this._splitText(),this._clearCache(),this.width=this.calcTextWidth()||this.cursorWidth||this.MIN_TEXT_WIDTH,-1!==this.textAlign.indexOf("justify")&&this.enlargeSpaces(),this.height=this.calcTextHeight(),this.saveState({propertySet:"_dimensionAffectingProps"}))},enlargeSpaces:function(){for(var t,e,n,i,r,o,s=0,a=this._textLines.length;s<a;s++)if(("justify"===this.textAlign||s!==a-1&&!this.isEndOfWrapping(s))&&(n=0,i=this._textLines[s],(e=this.getLineWidth(s))<this.width&&(o=this.textLines[s].match(this._reSpacesAndTabs)))){t=(this.width-e)/o.length;for(var l=0,u=i.length;l<=u;l++)r=this.__charBounds[s][l],this._reSpaceAndTab.test(i[l])?(r.width+=t,r.kernedWidth+=t,r.left+=n,n+=t):r.left+=n}},isEndOfWrapping:function(t){return t===this._textLines.length-1},toString:function(){return"#<fabric.Text ("+this.complexity()+'): { "text": "'+this.text+'", "fontFamily": "'+this.fontFamily+'" }>'},_getCacheCanvasDimensions:function(){var t=this.callSuper("_getCacheCanvasDimensions"),e=this.fontSize;return t.width+=e*t.zoomX,t.height+=e*t.zoomY,t},_render:function(t){this._setTextStyles(t),this._renderTextLinesBackground(t),this._renderTextDecoration(t,"underline"),this._renderText(t),this._renderTextDecoration(t,"overline"),this._renderTextDecoration(t,"linethrough")},_renderText:function(t){"stroke"===this.paintFirst?(this._renderTextStroke(t),this._renderTextFill(t)):(this._renderTextFill(t),this._renderTextStroke(t))},_setTextStyles:function(t,e,n){t.textBaseline="alphabetic",t.font=this._getFontDeclaration(e,n)},calcTextWidth:function(){for(var t=this.getLineWidth(0),e=1,n=this._textLines.length;e<n;e++){var i=this.getLineWidth(e);i>t&&(t=i)}return t},_renderTextLine:function(t,e,n,i,r,o){this._renderChars(t,e,n,i,r,o)},_renderTextLinesBackground:function(t){if(this.textBackgroundColor||this.styleHas("textBackgroundColor")){for(var e,n,i,r,o,s,a=0,l=t.fillStyle,u=this._getLeftOffset(),c=this._getTopOffset(),h=0,p=0,d=0,f=this._textLines.length;d<f;d++)if(e=this.getHeightOfLine(d),this.textBackgroundColor||this.styleHas("textBackgroundColor",d)){i=this._textLines[d],n=this._getLineLeftOffset(d),p=0,h=0,r=this.getValueOfPropertyAt(d,0,"textBackgroundColor");for(var g=0,m=i.length;g<m;g++)o=this.__charBounds[d][g],(s=this.getValueOfPropertyAt(d,g,"textBackgroundColor"))!==r?(t.fillStyle=r,r&&t.fillRect(u+n+h,c+a,p,e/this.lineHeight),h=o.left,p=o.width,r=s):p+=o.kernedWidth;s&&(t.fillStyle=s,t.fillRect(u+n+h,c+a,p,e/this.lineHeight)),a+=e}else a+=e;t.fillStyle=l,this._removeShadow(t)}},getFontCache:function(t){var e=t.fontFamily.toLowerCase();n.charWidthsCache[e]||(n.charWidthsCache[e]={});var i=n.charWidthsCache[e],r=t.fontStyle.toLowerCase()+"_"+(t.fontWeight+"").toLowerCase();return i[r]||(i[r]={}),i[r]},_applyCharStyles:function(t,e,n,i,r){this._setFillStyles(e,r),this._setStrokeStyles(e,r),e.font=this._getFontDeclaration(r)},_measureChar:function(t,e,n,i){var r,o,s,a,l=this.getFontCache(e),u=n+t,c=this._getFontDeclaration(e)===this._getFontDeclaration(i),h=e.fontSize/this.CACHE_FONT_SIZE;if(n&&void 0!==l[n]&&(s=l[n]),void 0!==l[t]&&(a=r=l[t]),c&&void 0!==l[u]&&(a=(o=l[u])-s),void 0===r||void 0===s||void 0===o){var p=this.getMeasuringContext();this._setTextStyles(p,e,!0)}return void 0===r&&(a=r=p.measureText(t).width,l[t]=r),void 0===s&&c&&n&&(s=p.measureText(n).width,l[n]=s),c&&void 0===o&&(o=p.measureText(u).width,l[u]=o,a=o-s),{width:r*h,kernedWidth:a*h}},getHeightOfChar:function(t,e){return this.getValueOfPropertyAt(t,e,"fontSize")},measureLine:function(t){var e=this._measureLine(t);return 0!==this.charSpacing&&(e.width-=this._getWidthOfCharSpacing()),e.width<0&&(e.width=0),e},_measureLine:function(t){var e,n,i,r,o=0,s=this._textLines[t],a=new Array(s.length);for(this.__charBounds[t]=a,e=0;e<s.length;e++)r=this._getGraphemeBox(n=s[e],t,e,i),a[e]=r,o+=r.kernedWidth,i=n;return a[e]={left:r?r.left+r.width:0,width:0,kernedWidth:0,height:this.fontSize},{width:o,numOfSpaces:0}},_getGraphemeBox:function(t,e,n,i,r){var o,s=this.getCompleteStyleDeclaration(e,n),a=i?this.getCompleteStyleDeclaration(e,n-1):{},l=this._measureChar(t,s,i,a),u=l.kernedWidth,c=l.width;0!==this.charSpacing&&(c+=o=this._getWidthOfCharSpacing(),u+=o);var h={width:c,left:0,height:s.fontSize,kernedWidth:u,deltaY:s.deltaY};if(n>0&&!r){var p=this.__charBounds[e][n-1];h.left=p.left+p.width+l.kernedWidth-l.width}return h},getHeightOfLine:function(t){if(this.__lineHeights[t])return this.__lineHeights[t];for(var e=this._textLines[t],n=this.getHeightOfChar(t,0),i=1,r=e.length;i<r;i++)n=Math.max(this.getHeightOfChar(t,i),n);return this.__lineHeights[t]=n*this.lineHeight*this._fontSizeMult},calcTextHeight:function(){for(var t,e=0,n=0,i=this._textLines.length;n<i;n++)t=this.getHeightOfLine(n),e+=n===i-1?t/this.lineHeight:t;return e},_getLeftOffset:function(){return-this.width/2},_getTopOffset:function(){return-this.height/2},_renderTextCommon:function(t,e){t.save();for(var n=0,i=this._getLeftOffset(),r=this._getTopOffset(),o=this._applyPatternGradientTransform(t,"fillText"===e?this.fill:this.stroke),s=0,a=this._textLines.length;s<a;s++){var l=this.getHeightOfLine(s),u=l/this.lineHeight,c=this._getLineLeftOffset(s);this._renderTextLine(e,t,this._textLines[s],i+c-o.offsetX,r+n+u-o.offsetY,s),n+=l}t.restore()},_renderTextFill:function(t){(this.fill||this.styleHas("fill"))&&this._renderTextCommon(t,"fillText")},_renderTextStroke:function(t){(this.stroke&&0!==this.strokeWidth||!this.isEmptyStyles())&&(this.shadow&&!this.shadow.affectStroke&&this._removeShadow(t),t.save(),this._setLineDash(t,this.strokeDashArray),t.beginPath(),this._renderTextCommon(t,"strokeText"),t.closePath(),t.restore())},_renderChars:function(t,e,n,i,r,o){var s,a,l,u,c=this.getHeightOfLine(o),h=-1!==this.textAlign.indexOf("justify"),p="",d=0,f=!h&&0===this.charSpacing&&this.isEmptyStyles(o);if(e.save(),r-=c*this._fontSizeFraction/this.lineHeight,f)return this._renderChar(t,e,o,0,this.textLines[o],i,r,c),void e.restore();for(var g=0,m=n.length-1;g<=m;g++)u=g===m||this.charSpacing,p+=n[g],l=this.__charBounds[o][g],0===d?(i+=l.kernedWidth-l.width,d+=l.width):d+=l.kernedWidth,h&&!u&&this._reSpaceAndTab.test(n[g])&&(u=!0),u||(s=s||this.getCompleteStyleDeclaration(o,g),a=this.getCompleteStyleDeclaration(o,g+1),u=this._hasStyleChanged(s,a)),u&&(this._renderChar(t,e,o,g,p,i,r,c),p="",s=a,i+=d,d=0);e.restore()},_renderChar:function(t,e,n,i,r,o,s){var a=this._getStyleDeclaration(n,i),l=this.getCompleteStyleDeclaration(n,i),u="fillText"===t&&l.fill,c="strokeText"===t&&l.stroke&&l.strokeWidth;(c||u)&&(a&&e.save(),this._applyCharStyles(t,e,n,i,l),a&&a.textBackgroundColor&&this._removeShadow(e),a&&a.deltaY&&(s+=a.deltaY),u&&e.fillText(r,o,s),c&&e.strokeText(r,o,s),a&&e.restore())},setSuperscript:function(t,e){return this._setScript(t,e,this.superscript)},setSubscript:function(t,e){return this._setScript(t,e,this.subscript)},_setScript:function(t,e,n){var i=this.get2DCursorLocation(t,!0),r=this.getValueOfPropertyAt(i.lineIndex,i.charIndex,"fontSize"),o=this.getValueOfPropertyAt(i.lineIndex,i.charIndex,"deltaY");return this.setSelectionStyles({fontSize:r*n.size,deltaY:o+r*n.baseline},t,e),this},_hasStyleChanged:function(t,e){return t.fill!==e.fill||t.stroke!==e.stroke||t.strokeWidth!==e.strokeWidth||t.fontSize!==e.fontSize||t.fontFamily!==e.fontFamily||t.fontWeight!==e.fontWeight||t.fontStyle!==e.fontStyle||t.deltaY!==e.deltaY},_hasStyleChangedForSvg:function(t,e){return this._hasStyleChanged(t,e)||t.overline!==e.overline||t.underline!==e.underline||t.linethrough!==e.linethrough},_getLineLeftOffset:function(t){var e=this.getLineWidth(t);return"center"===this.textAlign?(this.width-e)/2:"right"===this.textAlign?this.width-e:"justify-center"===this.textAlign&&this.isEndOfWrapping(t)?(this.width-e)/2:"justify-right"===this.textAlign&&this.isEndOfWrapping(t)?this.width-e:0},_clearCache:function(){this.__lineWidths=[],this.__lineHeights=[],this.__charBounds=[]},_shouldClearDimensionCache:function(){var t=this._forceClearCache;return t||(t=this.hasStateChanged("_dimensionAffectingProps")),t&&(this.dirty=!0,this._forceClearCache=!1),t},getLineWidth:function(t){return this.__lineWidths[t]?this.__lineWidths[t]:(e=""===this._textLines[t]?0:this.measureLine(t).width,this.__lineWidths[t]=e,e);var e},_getWidthOfCharSpacing:function(){return 0!==this.charSpacing?this.fontSize*this.charSpacing/1e3:0},getValueOfPropertyAt:function(t,e,n){var i=this._getStyleDeclaration(t,e);return i&&void 0!==i[n]?i[n]:this[n]},_renderTextDecoration:function(t,e){if(this[e]||this.styleHas(e)){for(var n,i,r,o,s,a,l,u,c,h,p,d,f,g,m,v,y=this._getLeftOffset(),b=this._getTopOffset(),_=this._getWidthOfCharSpacing(),w=0,x=this._textLines.length;w<x;w++)if(n=this.getHeightOfLine(w),this[e]||this.styleHas(e,w)){l=this._textLines[w],g=n/this.lineHeight,o=this._getLineLeftOffset(w),h=0,p=0,u=this.getValueOfPropertyAt(w,0,e),v=this.getValueOfPropertyAt(w,0,"fill"),c=b+g*(1-this._fontSizeFraction),i=this.getHeightOfChar(w,0),s=this.getValueOfPropertyAt(w,0,"deltaY");for(var C=0,S=l.length;C<S;C++)d=this.__charBounds[w][C],f=this.getValueOfPropertyAt(w,C,e),m=this.getValueOfPropertyAt(w,C,"fill"),r=this.getHeightOfChar(w,C),a=this.getValueOfPropertyAt(w,C,"deltaY"),(f!==u||m!==v||r!==i||a!==s)&&p>0?(t.fillStyle=v,u&&v&&t.fillRect(y+o+h,c+this.offsets[e]*i+s,p,this.fontSize/15),h=d.left,p=d.width,u=f,v=m,i=r,s=a):p+=d.kernedWidth;t.fillStyle=m,f&&m&&t.fillRect(y+o+h,c+this.offsets[e]*i+s,p-_,this.fontSize/15),b+=n}else b+=n;this._removeShadow(t)}},_getFontDeclaration:function(t,e){var i=t||this,r=this.fontFamily,o=n.Text.genericFonts.indexOf(r.toLowerCase())>-1,s=void 0===r||r.indexOf("'")>-1||r.indexOf('"')>-1||o?i.fontFamily:'"'+i.fontFamily+'"';return[n.isLikelyNode?i.fontWeight:i.fontStyle,n.isLikelyNode?i.fontStyle:i.fontWeight,e?this.CACHE_FONT_SIZE+"px":i.fontSize+"px",s].join(" ")},render:function(t){this.visible&&(this.canvas&&this.canvas.skipOffscreen&&!this.group&&!this.isOnScreen()||(this._shouldClearDimensionCache()&&this.initDimensions(),this.callSuper("render",t)))},_splitTextIntoLines:function(t){for(var e=t.split(this._reNewline),i=new Array(e.length),r=["\n"],o=[],s=0;s<e.length;s++)i[s]=n.util.string.graphemeSplit(e[s]),o=o.concat(i[s],r);return o.pop(),{_unwrappedLines:i,lines:e,graphemeText:o,graphemeLines:i}},toObject:function(t){var e=["text","fontSize","fontWeight","fontFamily","fontStyle","lineHeight","underline","overline","linethrough","textAlign","textBackgroundColor","charSpacing"].concat(t),n=this.callSuper("toObject",e);return n.styles=i(this.styles,!0),n},set:function(t,e){this.callSuper("set",t,e);var n=!1;if("object"==typeof t)for(var i in t)n=n||-1!==this._dimensionAffectingProps.indexOf(i);else n=-1!==this._dimensionAffectingProps.indexOf(t);return n&&(this.initDimensions(),this.setCoords()),this},complexity:function(){return 1}}),n.Text.ATTRIBUTE_NAMES=n.SHARED_ATTRIBUTES.concat("x y dx dy font-family font-style font-weight font-size letter-spacing text-decoration text-anchor".split(" ")),n.Text.DEFAULT_SVG_FONT_SIZE=16,n.Text.fromElement=function(t,e,r){if(!t)return e(null);var o=n.parseAttributes(t,n.Text.ATTRIBUTE_NAMES),s=o.textAnchor||"left";if((r=n.util.object.extend(r?i(r):{},o)).top=r.top||0,r.left=r.left||0,o.textDecoration){var a=o.textDecoration;-1!==a.indexOf("underline")&&(r.underline=!0),-1!==a.indexOf("overline")&&(r.overline=!0),-1!==a.indexOf("line-through")&&(r.linethrough=!0),delete r.textDecoration}"dx"in o&&(r.left+=o.dx),"dy"in o&&(r.top+=o.dy),"fontSize"in r||(r.fontSize=n.Text.DEFAULT_SVG_FONT_SIZE);var l="";"textContent"in t?l=t.textContent:"firstChild"in t&&null!==t.firstChild&&"data"in t.firstChild&&null!==t.firstChild.data&&(l=t.firstChild.data),l=l.replace(/^\s+|\s+$|\n+/g,"").replace(/\s+/g," ");var u=r.strokeWidth;r.strokeWidth=0;var c=new n.Text(l,r),h=c.getScaledHeight()/c.height,p=((c.height+c.strokeWidth)*c.lineHeight-c.height)*h,d=c.getScaledHeight()+p,f=0;"center"===s&&(f=c.getScaledWidth()/2),"right"===s&&(f=c.getScaledWidth()),c.set({left:c.left-f,top:c.top-(d-c.fontSize*(.07+c._fontSizeFraction))/c.lineHeight,strokeWidth:void 0!==u?u:1}),e(c)},n.Text.fromObject=function(t,e){return n.Object._fromObject("Text",t,e,"text")},n.Text.genericFonts=["sans-serif","serif","cursive","fantasy","monospace"],n.util.createAccessors&&n.util.createAccessors(n.Text))}(),S.util.object.extend(S.Text.prototype,{isEmptyStyles:function(t){if(!this.styles)return!0;if(void 0!==t&&!this.styles[t])return!0;var e=void 0===t?this.styles:{line:this.styles[t]};for(var n in e)for(var i in e[n])for(var r in e[n][i])return!1;return!0},styleHas:function(t,e){if(!this.styles||!t||""===t)return!1;if(void 0!==e&&!this.styles[e])return!1;var n=void 0===e?this.styles:{line:this.styles[e]};for(var i in n)for(var r in n[i])if(void 0!==n[i][r][t])return!0;return!1},cleanStyle:function(t){if(!this.styles||!t||""===t)return!1;var e,n,i=this.styles,r=0,o=!0,s=0;for(var a in i){for(var l in e=0,i[a]){var u;r++,(u=i[a][l]).hasOwnProperty(t)?(n?u[t]!==n&&(o=!1):n=u[t],u[t]===this[t]&&delete u[t]):o=!1,0!==Object.keys(u).length?e++:delete i[a][l]}0===e&&delete i[a]}for(var c=0;c<this._textLines.length;c++)s+=this._textLines[c].length;o&&r===s&&(this[t]=n,this.removeStyle(t))},removeStyle:function(t){if(this.styles&&t&&""!==t){var e,n,i,r=this.styles;for(n in r){for(i in e=r[n])delete e[i][t],0===Object.keys(e[i]).length&&delete e[i];0===Object.keys(e).length&&delete r[n]}}},_extendStyles:function(t,e){var n=this.get2DCursorLocation(t);this._getLineStyle(n.lineIndex)||this._setLineStyle(n.lineIndex,{}),this._getStyleDeclaration(n.lineIndex,n.charIndex)||this._setStyleDeclaration(n.lineIndex,n.charIndex,{}),S.util.object.extend(this._getStyleDeclaration(n.lineIndex,n.charIndex),e)},get2DCursorLocation:function(t,e){void 0===t&&(t=this.selectionStart);for(var n=e?this._unwrappedTextLines:this._textLines,i=n.length,r=0;r<i;r++){if(t<=n[r].length)return{lineIndex:r,charIndex:t};t-=n[r].length+1}return{lineIndex:r-1,charIndex:n[r-1].length<t?n[r-1].length:t}},getSelectionStyles:function(t,e,n){void 0===t&&(t=this.selectionStart||0),void 0===e&&(e=this.selectionEnd||t);for(var i=[],r=t;r<e;r++)i.push(this.getStyleAtPosition(r,n));return i},getStyleAtPosition:function(t,e){var n=this.get2DCursorLocation(t);return(e?this.getCompleteStyleDeclaration(n.lineIndex,n.charIndex):this._getStyleDeclaration(n.lineIndex,n.charIndex))||{}},setSelectionStyles:function(t,e,n){void 0===e&&(e=this.selectionStart||0),void 0===n&&(n=this.selectionEnd||e);for(var i=e;i<n;i++)this._extendStyles(i,t);return this._forceClearCache=!0,this},_getStyleDeclaration:function(t,e){var n=this.styles&&this.styles[t];return n?n[e]:null},getCompleteStyleDeclaration:function(t,e){for(var n,i=this._getStyleDeclaration(t,e)||{},r={},o=0;o<this._styleProperties.length;o++)r[n=this._styleProperties[o]]=void 0===i[n]?this[n]:i[n];return r},_setStyleDeclaration:function(t,e,n){this.styles[t][e]=n},_deleteStyleDeclaration:function(t,e){delete this.styles[t][e]},_getLineStyle:function(t){return this.styles[t]},_setLineStyle:function(t,e){this.styles[t]=e},_deleteLineStyle:function(t){delete this.styles[t]}}),function(){function t(t){t.textDecoration&&(t.textDecoration.indexOf("underline")>-1&&(t.underline=!0),t.textDecoration.indexOf("line-through")>-1&&(t.linethrough=!0),t.textDecoration.indexOf("overline")>-1&&(t.overline=!0),delete t.textDecoration)}S.IText=S.util.createClass(S.Text,S.Observable,{type:"i-text",selectionStart:0,selectionEnd:0,selectionColor:"rgba(17,119,255,0.3)",isEditing:!1,editable:!0,editingBorderColor:"rgba(102,153,255,0.25)",cursorWidth:2,cursorColor:"#333",cursorDelay:1e3,cursorDuration:600,caching:!0,_reSpace:/\s|\n/,_currentCursorOpacity:0,_selectionDirection:null,_abortCursorAnimation:!1,__widthOfSpace:[],inCompositionMode:!1,initialize:function(t,e){this.callSuper("initialize",t,e),this.initBehavior()},setSelectionStart:function(t){t=Math.max(t,0),this._updateAndFire("selectionStart",t)},setSelectionEnd:function(t){t=Math.min(t,this.text.length),this._updateAndFire("selectionEnd",t)},_updateAndFire:function(t,e){this[t]!==e&&(this._fireSelectionChanged(),this[t]=e),this._updateTextarea()},_fireSelectionChanged:function(){this.fire("selection:changed"),this.canvas&&this.canvas.fire("text:selection:changed",{target:this})},initDimensions:function(){this.isEditing&&this.initDelayedCursor(),this.clearContextTop(),this.callSuper("initDimensions")},render:function(t){this.clearContextTop(),this.callSuper("render",t),this.cursorOffsetCache={},this.renderCursorOrSelection()},_render:function(t){this.callSuper("_render",t)},clearContextTop:function(t){if(this.isEditing&&this.canvas&&this.canvas.contextTop){var e=this.canvas.contextTop,n=this.canvas.viewportTransform;e.save(),e.transform(n[0],n[1],n[2],n[3],n[4],n[5]),this.transform(e),this.transformMatrix&&e.transform.apply(e,this.transformMatrix),this._clearTextArea(e),t||e.restore()}},renderCursorOrSelection:function(){if(this.isEditing&&this.canvas){var t,e=this._getCursorBoundaries();this.canvas&&this.canvas.contextTop?(t=this.canvas.contextTop,this.clearContextTop(!0)):(t=this.canvas.contextContainer).save(),this.selectionStart===this.selectionEnd?this.renderCursor(e,t):this.renderSelection(e,t),t.restore()}},_clearTextArea:function(t){var e=this.width+4,n=this.height+4;t.clearRect(-e/2,-n/2,e,n)},_getCursorBoundaries:function(t){void 0===t&&(t=this.selectionStart);var e=this._getLeftOffset(),n=this._getTopOffset(),i=this._getCursorBoundariesOffsets(t);return{left:e,top:n,leftOffset:i.left,topOffset:i.top}},_getCursorBoundariesOffsets:function(t){if(this.cursorOffsetCache&&"top"in this.cursorOffsetCache)return this.cursorOffsetCache;var e,n,i,r=0,o=0,s=this.get2DCursorLocation(t);i=s.charIndex,n=s.lineIndex;for(var a=0;a<n;a++)r+=this.getHeightOfLine(a);e=this._getLineLeftOffset(n);var l=this.__charBounds[n][i];return l&&(o=l.left),0!==this.charSpacing&&i===this._textLines[n].length&&(o-=this._getWidthOfCharSpacing()),this.cursorOffsetCache={top:r,left:e+(o>0?o:0)},this.cursorOffsetCache},renderCursor:function(t,e){var n=this.get2DCursorLocation(),i=n.lineIndex,r=n.charIndex>0?n.charIndex-1:0,o=this.getValueOfPropertyAt(i,r,"fontSize"),s=this.scaleX*this.canvas.getZoom(),a=this.cursorWidth/s,l=t.topOffset,u=this.getValueOfPropertyAt(i,r,"deltaY");l+=(1-this._fontSizeFraction)*this.getHeightOfLine(i)/this.lineHeight-o*(1-this._fontSizeFraction),this.inCompositionMode&&this.renderSelection(t,e),e.fillStyle=this.getValueOfPropertyAt(i,r,"fill"),e.globalAlpha=this.__isMousedown?1:this._currentCursorOpacity,e.fillRect(t.left+t.leftOffset-a/2,l+t.top+u,a,o)},renderSelection:function(t,e){for(var n=this.inCompositionMode?this.hiddenTextarea.selectionStart:this.selectionStart,i=this.inCompositionMode?this.hiddenTextarea.selectionEnd:this.selectionEnd,r=-1!==this.textAlign.indexOf("justify"),o=this.get2DCursorLocation(n),s=this.get2DCursorLocation(i),a=o.lineIndex,l=s.lineIndex,u=o.charIndex<0?0:o.charIndex,c=s.charIndex<0?0:s.charIndex,h=a;h<=l;h++){var p,d=this._getLineLeftOffset(h)||0,f=this.getHeightOfLine(h),g=0,m=0;if(h===a&&(g=this.__charBounds[a][u].left),h>=a&&h<l)m=r&&!this.isEndOfWrapping(h)?this.width:this.getLineWidth(h)||5;else if(h===l)if(0===c)m=this.__charBounds[l][c].left;else{var v=this._getWidthOfCharSpacing();m=this.__charBounds[l][c-1].left+this.__charBounds[l][c-1].width-v}p=f,(this.lineHeight<1||h===l&&this.lineHeight>1)&&(f/=this.lineHeight),this.inCompositionMode?(e.fillStyle=this.compositionColor||"black",e.fillRect(t.left+d+g,t.top+t.topOffset+f,m-g,1)):(e.fillStyle=this.selectionColor,e.fillRect(t.left+d+g,t.top+t.topOffset,m-g,f)),t.topOffset+=p}},getCurrentCharFontSize:function(){var t=this._getCurrentCharIndex();return this.getValueOfPropertyAt(t.l,t.c,"fontSize")},getCurrentCharColor:function(){var t=this._getCurrentCharIndex();return this.getValueOfPropertyAt(t.l,t.c,"fill")},_getCurrentCharIndex:function(){var t=this.get2DCursorLocation(this.selectionStart,!0);return{l:t.lineIndex,c:t.charIndex>0?t.charIndex-1:0}}}),S.IText.fromObject=function(e,n){if(t(e),e.styles)for(var i in e.styles)for(var r in e.styles[i])t(e.styles[i][r]);S.Object._fromObject("IText",e,n,"text")}}(),v=S.util.object.clone,S.util.object.extend(S.IText.prototype,{initBehavior:function(){this.initAddedHandler(),this.initRemovedHandler(),this.initCursorSelectionHandlers(),this.initDoubleClickSimulation(),this.mouseMoveHandler=this.mouseMoveHandler.bind(this)},onDeselect:function(){this.isEditing&&this.exitEditing(),this.selected=!1},initAddedHandler:function(){var t=this;this.on("added",function(){var e=t.canvas;e&&(e._hasITextHandlers||(e._hasITextHandlers=!0,t._initCanvasHandlers(e)),e._iTextInstances=e._iTextInstances||[],e._iTextInstances.push(t))})},initRemovedHandler:function(){var t=this;this.on("removed",function(){var e=t.canvas;e&&(e._iTextInstances=e._iTextInstances||[],S.util.removeFromArray(e._iTextInstances,t),0===e._iTextInstances.length&&(e._hasITextHandlers=!1,t._removeCanvasHandlers(e)))})},_initCanvasHandlers:function(t){t._mouseUpITextHandler=function(){t._iTextInstances&&t._iTextInstances.forEach(function(t){t.__isMousedown=!1})},t.on("mouse:up",t._mouseUpITextHandler)},_removeCanvasHandlers:function(t){t.off("mouse:up",t._mouseUpITextHandler)},_tick:function(){this._currentTickState=this._animateCursor(this,1,this.cursorDuration,"_onTickComplete")},_animateCursor:function(t,e,n,i){var r;return r={isAborted:!1,abort:function(){this.isAborted=!0}},t.animate("_currentCursorOpacity",e,{duration:n,onComplete:function(){r.isAborted||t[i]()},onChange:function(){t.canvas&&t.selectionStart===t.selectionEnd&&t.renderCursorOrSelection()},abort:function(){return r.isAborted}}),r},_onTickComplete:function(){var t=this;this._cursorTimeout1&&clearTimeout(this._cursorTimeout1),this._cursorTimeout1=setTimeout(function(){t._currentTickCompleteState=t._animateCursor(t,0,this.cursorDuration/2,"_tick")},100)},initDelayedCursor:function(t){var e=this,n=t?0:this.cursorDelay;this.abortCursorAnimation(),this._currentCursorOpacity=1,this._cursorTimeout2=setTimeout(function(){e._tick()},n)},abortCursorAnimation:function(){var t=this._currentTickState||this._currentTickCompleteState,e=this.canvas;this._currentTickState&&this._currentTickState.abort(),this._currentTickCompleteState&&this._currentTickCompleteState.abort(),clearTimeout(this._cursorTimeout1),clearTimeout(this._cursorTimeout2),this._currentCursorOpacity=0,t&&e&&e.clearContext(e.contextTop||e.contextContainer)},selectAll:function(){return this.selectionStart=0,this.selectionEnd=this._text.length,this._fireSelectionChanged(),this._updateTextarea(),this},getSelectedText:function(){return this._text.slice(this.selectionStart,this.selectionEnd).join("")},findWordBoundaryLeft:function(t){var e=0,n=t-1;if(this._reSpace.test(this._text[n]))for(;this._reSpace.test(this._text[n]);)e++,n--;for(;/\S/.test(this._text[n])&&n>-1;)e++,n--;return t-e},findWordBoundaryRight:function(t){var e=0,n=t;if(this._reSpace.test(this._text[n]))for(;this._reSpace.test(this._text[n]);)e++,n++;for(;/\S/.test(this._text[n])&&n<this.text.length;)e++,n++;return t+e},findLineBoundaryLeft:function(t){for(var e=0,n=t-1;!/\n/.test(this._text[n])&&n>-1;)e++,n--;return t-e},findLineBoundaryRight:function(t){for(var e=0,n=t;!/\n/.test(this._text[n])&&n<this.text.length;)e++,n++;return t+e},searchWordBoundary:function(t,e){for(var n=this._reSpace.test(this.text.charAt(t))?t-1:t,i=this.text.charAt(n),r=/[ \n\.,;!\?\-]/;!r.test(i)&&n>0&&n<this.text.length;)i=this.text.charAt(n+=e);return r.test(i)&&"\n"!==i&&(n+=1===e?0:1),n},selectWord:function(t){var e=this.searchWordBoundary(t=t||this.selectionStart,-1),n=this.searchWordBoundary(t,1);this.selectionStart=e,this.selectionEnd=n,this._fireSelectionChanged(),this._updateTextarea(),this.renderCursorOrSelection()},selectLine:function(t){var e=this.findLineBoundaryLeft(t=t||this.selectionStart),n=this.findLineBoundaryRight(t);return this.selectionStart=e,this.selectionEnd=n,this._fireSelectionChanged(),this._updateTextarea(),this},enterEditing:function(t){if(!this.isEditing&&this.editable)return this.canvas&&(this.canvas.calcOffset(),this.exitEditingOnOthers(this.canvas)),this.isEditing=!0,this.initHiddenTextarea(t),this.hiddenTextarea.focus(),this.hiddenTextarea.value=this.text,this._updateTextarea(),this._saveEditingProps(),this._setEditingProps(),this._textBeforeEdit=this.text,this._tick(),this.fire("editing:entered"),this._fireSelectionChanged(),this.canvas?(this.canvas.fire("text:editing:entered",{target:this}),this.initMouseMoveHandler(),this.canvas.requestRenderAll(),this):this},exitEditingOnOthers:function(t){t._iTextInstances&&t._iTextInstances.forEach(function(t){t.selected=!1,t.isEditing&&t.exitEditing()})},initMouseMoveHandler:function(){this.canvas.on("mouse:move",this.mouseMoveHandler)},mouseMoveHandler:function(t){if(this.__isMousedown&&this.isEditing){var e=this.getSelectionStartFromPointer(t.e),n=this.selectionStart,i=this.selectionEnd;(e===this.__selectionStartOnMouseDown&&n!==i||n!==e&&i!==e)&&(e>this.__selectionStartOnMouseDown?(this.selectionStart=this.__selectionStartOnMouseDown,this.selectionEnd=e):(this.selectionStart=e,this.selectionEnd=this.__selectionStartOnMouseDown),this.selectionStart===n&&this.selectionEnd===i||(this.restartCursorIfNeeded(),this._fireSelectionChanged(),this._updateTextarea(),this.renderCursorOrSelection()))}},_setEditingProps:function(){this.hoverCursor="text",this.canvas&&(this.canvas.defaultCursor=this.canvas.moveCursor="text"),this.borderColor=this.editingBorderColor,this.hasControls=this.selectable=!1,this.lockMovementX=this.lockMovementY=!0},fromStringToGraphemeSelection:function(t,e,n){var i=n.slice(0,t),r=S.util.string.graphemeSplit(i).length;if(t===e)return{selectionStart:r,selectionEnd:r};var o=n.slice(t,e);return{selectionStart:r,selectionEnd:r+S.util.string.graphemeSplit(o).length}},fromGraphemeToStringSelection:function(t,e,n){var i=n.slice(0,t).join("").length;return t===e?{selectionStart:i,selectionEnd:i}:{selectionStart:i,selectionEnd:i+n.slice(t,e).join("").length}},_updateTextarea:function(){if(this.cursorOffsetCache={},this.hiddenTextarea){if(!this.inCompositionMode){var t=this.fromGraphemeToStringSelection(this.selectionStart,this.selectionEnd,this._text);this.hiddenTextarea.selectionStart=t.selectionStart,this.hiddenTextarea.selectionEnd=t.selectionEnd}this.updateTextareaPosition()}},updateFromTextArea:function(){if(this.hiddenTextarea){this.cursorOffsetCache={},this.text=this.hiddenTextarea.value,this._shouldClearDimensionCache()&&(this.initDimensions(),this.setCoords());var t=this.fromStringToGraphemeSelection(this.hiddenTextarea.selectionStart,this.hiddenTextarea.selectionEnd,this.hiddenTextarea.value);this.selectionEnd=this.selectionStart=t.selectionEnd,this.inCompositionMode||(this.selectionStart=t.selectionStart),this.updateTextareaPosition()}},updateTextareaPosition:function(){if(this.selectionStart===this.selectionEnd){var t=this._calcTextareaPosition();this.hiddenTextarea.style.left=t.left,this.hiddenTextarea.style.top=t.top}},_calcTextareaPosition:function(){if(!this.canvas)return{x:1,y:1};var t=this.inCompositionMode?this.compositionStart:this.selectionStart,e=this._getCursorBoundaries(t),n=this.get2DCursorLocation(t),i=this.getValueOfPropertyAt(n.lineIndex,n.charIndex,"fontSize")*this.lineHeight,r=e.leftOffset,o=this.calcTransformMatrix(),s={x:e.left+r,y:e.top+e.topOffset+i},a=this.canvas.upperCanvasEl,l=a.width,u=a.height,c=l-i,h=u-i,p=a.clientWidth/l,d=a.clientHeight/u;return s=S.util.transformPoint(s,o),(s=S.util.transformPoint(s,this.canvas.viewportTransform)).x*=p,s.y*=d,s.x<0&&(s.x=0),s.x>c&&(s.x=c),s.y<0&&(s.y=0),s.y>h&&(s.y=h),s.x+=this.canvas._offset.left,s.y+=this.canvas._offset.top,{left:s.x+"px",top:s.y+"px",fontSize:i+"px",charHeight:i}},_saveEditingProps:function(){this._savedProps={hasControls:this.hasControls,borderColor:this.borderColor,lockMovementX:this.lockMovementX,lockMovementY:this.lockMovementY,hoverCursor:this.hoverCursor,defaultCursor:this.canvas&&this.canvas.defaultCursor,moveCursor:this.canvas&&this.canvas.moveCursor}},_restoreEditingProps:function(){this._savedProps&&(this.hoverCursor=this._savedProps.hoverCursor,this.hasControls=this._savedProps.hasControls,this.borderColor=this._savedProps.borderColor,this.lockMovementX=this._savedProps.lockMovementX,this.lockMovementY=this._savedProps.lockMovementY,this.canvas&&(this.canvas.defaultCursor=this._savedProps.defaultCursor,this.canvas.moveCursor=this._savedProps.moveCursor))},exitEditing:function(){var t=this._textBeforeEdit!==this.text;return this.selected=!1,this.isEditing=!1,this.selectable=!0,this.selectionEnd=this.selectionStart,this.hiddenTextarea&&(this.hiddenTextarea.blur&&this.hiddenTextarea.blur(),this.canvas&&this.hiddenTextarea.parentNode.removeChild(this.hiddenTextarea),this.hiddenTextarea=null),this.abortCursorAnimation(),this._restoreEditingProps(),this._currentCursorOpacity=0,this._shouldClearDimensionCache()&&(this.initDimensions(),this.setCoords()),this.fire("editing:exited"),t&&this.fire("modified"),this.canvas&&(this.canvas.off("mouse:move",this.mouseMoveHandler),this.canvas.fire("text:editing:exited",{target:this}),t&&this.canvas.fire("object:modified",{target:this})),this},_removeExtraneousStyles:function(){for(var t in this.styles)this._textLines[t]||delete this.styles[t]},removeStyleFromTo:function(t,e){var n,i,r=this.get2DCursorLocation(t,!0),o=this.get2DCursorLocation(e,!0),s=r.lineIndex,a=r.charIndex,l=o.lineIndex,u=o.charIndex;if(s!==l){if(this.styles[s])for(n=a;n<this._unwrappedTextLines[s].length;n++)delete this.styles[s][n];if(this.styles[l])for(n=u;n<this._unwrappedTextLines[l].length;n++)(i=this.styles[l][n])&&(this.styles[s]||(this.styles[s]={}),this.styles[s][a+n-u]=i);for(n=s+1;n<=l;n++)delete this.styles[n];this.shiftLineStyles(l,s-l)}else if(this.styles[s]){i=this.styles[s];var c,h,p=u-a;for(n=a;n<u;n++)delete i[n];for(h in this.styles[s])(c=parseInt(h,10))>=u&&(i[c-p]=i[h],delete i[h])}},shiftLineStyles:function(t,e){var n=v(this.styles);for(var i in this.styles){var r=parseInt(i,10);r>t&&(this.styles[r+e]=n[r],n[r-e]||delete this.styles[r])}},restartCursorIfNeeded:function(){this._currentTickState&&!this._currentTickState.isAborted&&this._currentTickCompleteState&&!this._currentTickCompleteState.isAborted||this.initDelayedCursor()},insertNewlineStyleObject:function(t,e,n,i){var r,o={},s=!1;for(var a in n||(n=1),this.shiftLineStyles(t,n),this.styles[t]&&(r=this.styles[t][0===e?e:e-1]),this.styles[t]){var l=parseInt(a,10);l>=e&&(s=!0,o[l-e]=this.styles[t][a],delete this.styles[t][a])}for(s?this.styles[t+n]=o:delete this.styles[t+n];n>1;)n--,i&&i[n]?this.styles[t+n]={0:v(i[n])}:r?this.styles[t+n]={0:v(r)}:delete this.styles[t+n];this._forceClearCache=!0},insertCharStyleObject:function(t,e,n,i){this.styles||(this.styles={});var r=this.styles[t],o=r?v(r):{};for(var s in n||(n=1),o){var a=parseInt(s,10);a>=e&&(r[a+n]=o[a],o[a-n]||delete r[a])}if(this._forceClearCache=!0,i)for(;n--;)Object.keys(i[n]).length&&(this.styles[t]||(this.styles[t]={}),this.styles[t][e+n]=v(i[n]));else if(r)for(var l=r[e?e-1:1];l&&n--;)this.styles[t][e+n]=v(l)},insertNewStyleBlock:function(t,e,n){for(var i=this.get2DCursorLocation(e,!0),r=[0],o=0,s=0;s<t.length;s++)"\n"===t[s]?r[++o]=0:r[o]++;for(r[0]>0&&(this.insertCharStyleObject(i.lineIndex,i.charIndex,r[0],n),n=n&&n.slice(r[0]+1)),o&&this.insertNewlineStyleObject(i.lineIndex,i.charIndex+r[0],o),s=1;s<o;s++)r[s]>0?this.insertCharStyleObject(i.lineIndex+s,0,r[s],n):n&&(this.styles[i.lineIndex+s][0]=n[0]),n=n&&n.slice(r[s]+1);r[s]>0&&this.insertCharStyleObject(i.lineIndex+s,0,r[s],n)},setSelectionStartEndWithShift:function(t,e,n){n<=t?(e===t?this._selectionDirection="left":"right"===this._selectionDirection&&(this._selectionDirection="left",this.selectionEnd=t),this.selectionStart=n):n>t&&n<e?"right"===this._selectionDirection?this.selectionEnd=n:this.selectionStart=n:(e===t?this._selectionDirection="right":"left"===this._selectionDirection&&(this._selectionDirection="right",this.selectionStart=e),this.selectionEnd=n)},setSelectionInBoundaries:function(){var t=this.text.length;this.selectionStart>t?this.selectionStart=t:this.selectionStart<0&&(this.selectionStart=0),this.selectionEnd>t?this.selectionEnd=t:this.selectionEnd<0&&(this.selectionEnd=0)}}),S.util.object.extend(S.IText.prototype,{initDoubleClickSimulation:function(){this.__lastClickTime=+new Date,this.__lastLastClickTime=+new Date,this.__lastPointer={},this.on("mousedown",this.onMouseDown)},onMouseDown:function(t){if(this.canvas){this.__newClickTime=+new Date;var e=t.pointer;this.isTripleClick(e)&&(this.fire("tripleclick",t),this._stopEvent(t.e)),this.__lastLastClickTime=this.__lastClickTime,this.__lastClickTime=this.__newClickTime,this.__lastPointer=e,this.__lastIsEditing=this.isEditing,this.__lastSelected=this.selected}},isTripleClick:function(t){return this.__newClickTime-this.__lastClickTime<500&&this.__lastClickTime-this.__lastLastClickTime<500&&this.__lastPointer.x===t.x&&this.__lastPointer.y===t.y},_stopEvent:function(t){t.preventDefault&&t.preventDefault(),t.stopPropagation&&t.stopPropagation()},initCursorSelectionHandlers:function(){this.initMousedownHandler(),this.initMouseupHandler(),this.initClicks()},initClicks:function(){this.on("mousedblclick",function(t){this.selectWord(this.getSelectionStartFromPointer(t.e))}),this.on("tripleclick",function(t){this.selectLine(this.getSelectionStartFromPointer(t.e))})},_mouseDownHandler:function(t){!this.canvas||!this.editable||t.e.button&&1!==t.e.button||(this.__isMousedown=!0,this.selected&&this.setCursorByClick(t.e),this.isEditing&&(this.__selectionStartOnMouseDown=this.selectionStart,this.selectionStart===this.selectionEnd&&this.abortCursorAnimation(),this.renderCursorOrSelection()))},_mouseDownHandlerBefore:function(t){!this.canvas||!this.editable||t.e.button&&1!==t.e.button||this===this.canvas._activeObject&&(this.selected=!0)},initMousedownHandler:function(){this.on("mousedown",this._mouseDownHandler),this.on("mousedown:before",this._mouseDownHandlerBefore)},initMouseupHandler:function(){this.on("mouseup",this.mouseUpHandler)},mouseUpHandler:function(t){this.__isMousedown=!1,!this.editable||this.group||t.transform&&t.transform.actionPerformed||t.e.button&&1!==t.e.button||(this.__lastSelected&&!this.__corner?(this.selected=!1,this.__lastSelected=!1,this.enterEditing(t.e),this.selectionStart===this.selectionEnd?this.initDelayedCursor(!0):this.renderCursorOrSelection()):this.selected=!0)},setCursorByClick:function(t){var e=this.getSelectionStartFromPointer(t);t.shiftKey?this.setSelectionStartEndWithShift(this.selectionStart,this.selectionEnd,e):(this.selectionStart=e,this.selectionEnd=e),this.isEditing&&(this._fireSelectionChanged(),this._updateTextarea())},getSelectionStartFromPointer:function(t){for(var e=this.getLocalPointer(t),n=0,i=0,r=0,o=0,s=0,a=0,l=this._textLines.length;a<l&&r<=e.y;a++)r+=this.getHeightOfLine(a)*this.scaleY,s=a,a>0&&(o+=this._textLines[a-1].length+1);i=this._getLineLeftOffset(s)*this.scaleX;for(var u=0,c=this._textLines[s].length;u<c&&(n=i,(i+=this.__charBounds[s][u].kernedWidth*this.scaleX)<=e.x);u++)o++;return this._getNewSelectionStartFromOffset(e,n,i,o,c)},_getNewSelectionStartFromOffset:function(t,e,n,i,r){var o=n-t.x,s=i+(o>t.x-e||o<0?0:1);return this.flipX&&(s=r-s),s>this._text.length&&(s=this._text.length),s}}),S.util.object.extend(S.IText.prototype,{initHiddenTextarea:function(){this.hiddenTextarea=S.document.createElement("textarea"),this.hiddenTextarea.setAttribute("autocapitalize","off"),this.hiddenTextarea.setAttribute("autocorrect","off"),this.hiddenTextarea.setAttribute("autocomplete","off"),this.hiddenTextarea.setAttribute("spellcheck","false"),this.hiddenTextarea.setAttribute("data-fabric-hiddentextarea",""),this.hiddenTextarea.setAttribute("wrap","off");var t=this._calcTextareaPosition();this.hiddenTextarea.style.cssText="position: absolute; top: "+t.top+"; left: "+t.left+"; z-index: -999; opacity: 0; width: 1px; height: 1px; font-size: 1px; padding\uff70top: "+t.fontSize+";",S.document.body.appendChild(this.hiddenTextarea),S.util.addListener(this.hiddenTextarea,"keydown",this.onKeyDown.bind(this)),S.util.addListener(this.hiddenTextarea,"keyup",this.onKeyUp.bind(this)),S.util.addListener(this.hiddenTextarea,"input",this.onInput.bind(this)),S.util.addListener(this.hiddenTextarea,"copy",this.copy.bind(this)),S.util.addListener(this.hiddenTextarea,"cut",this.copy.bind(this)),S.util.addListener(this.hiddenTextarea,"paste",this.paste.bind(this)),S.util.addListener(this.hiddenTextarea,"compositionstart",this.onCompositionStart.bind(this)),S.util.addListener(this.hiddenTextarea,"compositionupdate",this.onCompositionUpdate.bind(this)),S.util.addListener(this.hiddenTextarea,"compositionend",this.onCompositionEnd.bind(this)),!this._clickHandlerInitialized&&this.canvas&&(S.util.addListener(this.canvas.upperCanvasEl,"click",this.onClick.bind(this)),this._clickHandlerInitialized=!0)},keysMap:{9:"exitEditing",27:"exitEditing",33:"moveCursorUp",34:"moveCursorDown",35:"moveCursorRight",36:"moveCursorLeft",37:"moveCursorLeft",38:"moveCursorUp",39:"moveCursorRight",40:"moveCursorDown"},ctrlKeysMapUp:{67:"copy",88:"cut"},ctrlKeysMapDown:{65:"selectAll"},onClick:function(){this.hiddenTextarea&&this.hiddenTextarea.focus()},onKeyDown:function(t){if(this.isEditing&&!this.inCompositionMode){if(t.keyCode in this.keysMap)this[this.keysMap[t.keyCode]](t);else{if(!(t.keyCode in this.ctrlKeysMapDown&&(t.ctrlKey||t.metaKey)))return;this[this.ctrlKeysMapDown[t.keyCode]](t)}t.stopImmediatePropagation(),t.preventDefault(),t.keyCode>=33&&t.keyCode<=40?(this.clearContextTop(),this.renderCursorOrSelection()):this.canvas&&this.canvas.requestRenderAll()}},onKeyUp:function(t){!this.isEditing||this._copyDone||this.inCompositionMode?this._copyDone=!1:t.keyCode in this.ctrlKeysMapUp&&(t.ctrlKey||t.metaKey)&&(this[this.ctrlKeysMapUp[t.keyCode]](t),t.stopImmediatePropagation(),t.preventDefault(),this.canvas&&this.canvas.requestRenderAll())},onInput:function(t){var e=this.fromPaste;if(this.fromPaste=!1,t&&t.stopPropagation(),this.isEditing){var n,i,r=this._splitTextIntoLines(this.hiddenTextarea.value).graphemeText,o=this._text.length,s=r.length,a=s-o;if(""===this.hiddenTextarea.value)return this.styles={},this.updateFromTextArea(),this.fire("changed"),void(this.canvas&&(this.canvas.fire("text:changed",{target:this}),this.canvas.requestRenderAll()));var l=this.fromStringToGraphemeSelection(this.hiddenTextarea.selectionStart,this.hiddenTextarea.selectionEnd,this.hiddenTextarea.value),u=this.selectionStart>l.selectionStart;this.selectionStart!==this.selectionEnd?(n=this._text.slice(this.selectionStart,this.selectionEnd),a+=this.selectionEnd-this.selectionStart):s<o&&(n=u?this._text.slice(this.selectionEnd+a,this.selectionEnd):this._text.slice(this.selectionStart,this.selectionStart-a)),i=r.slice(l.selectionEnd-a,l.selectionEnd),n&&n.length&&(this.selectionStart!==this.selectionEnd?this.removeStyleFromTo(this.selectionStart,this.selectionEnd):u?this.removeStyleFromTo(this.selectionEnd-n.length,this.selectionEnd):this.removeStyleFromTo(this.selectionEnd,this.selectionEnd+n.length)),i.length&&(e&&i.join("")===S.copiedText?this.insertNewStyleBlock(i,this.selectionStart,S.copiedTextStyle):this.insertNewStyleBlock(i,this.selectionStart)),this.updateFromTextArea(),this.fire("changed"),this.canvas&&(this.canvas.fire("text:changed",{target:this}),this.canvas.requestRenderAll())}},onCompositionStart:function(){this.inCompositionMode=!0},onCompositionEnd:function(){this.inCompositionMode=!1},onCompositionUpdate:function(t){this.compositionStart=t.target.selectionStart,this.compositionEnd=t.target.selectionEnd,this.updateTextareaPosition()},copy:function(){this.selectionStart!==this.selectionEnd&&(S.copiedText=this.getSelectedText(),S.copiedTextStyle=this.getSelectionStyles(this.selectionStart,this.selectionEnd,!0),this._copyDone=!0)},paste:function(){this.fromPaste=!0},_getClipboardData:function(t){return t&&t.clipboardData||S.window.clipboardData},_getWidthBeforeCursor:function(t,e){var n,i=this._getLineLeftOffset(t);return e>0&&(i+=(n=this.__charBounds[t][e-1]).left+n.width),i},getDownCursorOffset:function(t,e){var n=this._getSelectionForOffset(t,e),i=this.get2DCursorLocation(n),r=i.lineIndex;if(r===this._textLines.length-1||t.metaKey||34===t.keyCode)return this._text.length-n;var o=i.charIndex,s=this._getWidthBeforeCursor(r,o),a=this._getIndexOnLine(r+1,s);return this._textLines[r].slice(o).length+a+2},_getSelectionForOffset:function(t,e){return t.shiftKey&&this.selectionStart!==this.selectionEnd&&e?this.selectionEnd:this.selectionStart},getUpCursorOffset:function(t,e){var n=this._getSelectionForOffset(t,e),i=this.get2DCursorLocation(n),r=i.lineIndex;if(0===r||t.metaKey||33===t.keyCode)return-n;var o=i.charIndex,s=this._getWidthBeforeCursor(r,o),a=this._getIndexOnLine(r-1,s),l=this._textLines[r].slice(0,o);return-this._textLines[r-1].length+a-l.length},_getIndexOnLine:function(t,e){for(var n,i,r=this._textLines[t],o=this._getLineLeftOffset(t),s=0,a=0,l=r.length;a<l;a++)if((o+=n=this.__charBounds[t][a].width)>e){i=!0;var u=o,c=Math.abs(o-n-e);s=Math.abs(u-e)<c?a:a-1;break}return i||(s=r.length-1),s},moveCursorDown:function(t){this.selectionStart>=this._text.length&&this.selectionEnd>=this._text.length||this._moveCursorUpOrDown("Down",t)},moveCursorUp:function(t){0===this.selectionStart&&0===this.selectionEnd||this._moveCursorUpOrDown("Up",t)},_moveCursorUpOrDown:function(t,e){var n=this["get"+t+"CursorOffset"](e,"right"===this._selectionDirection);e.shiftKey?this.moveCursorWithShift(n):this.moveCursorWithoutShift(n),0!==n&&(this.setSelectionInBoundaries(),this.abortCursorAnimation(),this._currentCursorOpacity=1,this.initDelayedCursor(),this._fireSelectionChanged(),this._updateTextarea())},moveCursorWithShift:function(t){return this.setSelectionStartEndWithShift(this.selectionStart,this.selectionEnd,"left"===this._selectionDirection?this.selectionStart+t:this.selectionEnd+t),0!==t},moveCursorWithoutShift:function(t){return t<0?(this.selectionStart+=t,this.selectionEnd=this.selectionStart):(this.selectionEnd+=t,this.selectionStart=this.selectionEnd),0!==t},moveCursorLeft:function(t){0===this.selectionStart&&0===this.selectionEnd||this._moveCursorLeftOrRight("Left",t)},_move:function(t,e,n){var i;if(t.altKey)i=this["findWordBoundary"+n](this[e]);else{if(!t.metaKey&&35!==t.keyCode&&36!==t.keyCode)return this[e]+="Left"===n?-1:1,!0;i=this["findLineBoundary"+n](this[e])}if(void 0!==typeof i&&this[e]!==i)return this[e]=i,!0},_moveLeft:function(t,e){return this._move(t,e,"Left")},_moveRight:function(t,e){return this._move(t,e,"Right")},moveCursorLeftWithoutShift:function(t){var e=!0;return this._selectionDirection="left",this.selectionEnd===this.selectionStart&&0!==this.selectionStart&&(e=this._moveLeft(t,"selectionStart")),this.selectionEnd=this.selectionStart,e},moveCursorLeftWithShift:function(t){return"right"===this._selectionDirection&&this.selectionStart!==this.selectionEnd?this._moveLeft(t,"selectionEnd"):0!==this.selectionStart?(this._selectionDirection="left",this._moveLeft(t,"selectionStart")):void 0},moveCursorRight:function(t){this.selectionStart>=this._text.length&&this.selectionEnd>=this._text.length||this._moveCursorLeftOrRight("Right",t)},_moveCursorLeftOrRight:function(t,e){var n="moveCursor"+t+"With";this._currentCursorOpacity=1,this[n+=e.shiftKey?"Shift":"outShift"](e)&&(this.abortCursorAnimation(),this.initDelayedCursor(),this._fireSelectionChanged(),this._updateTextarea())},moveCursorRightWithShift:function(t){return"left"===this._selectionDirection&&this.selectionStart!==this.selectionEnd?this._moveRight(t,"selectionStart"):this.selectionEnd!==this._text.length?(this._selectionDirection="right",this._moveRight(t,"selectionEnd")):void 0},moveCursorRightWithoutShift:function(t){var e=!0;return this._selectionDirection="right",this.selectionStart===this.selectionEnd?(e=this._moveRight(t,"selectionStart"),this.selectionEnd=this.selectionStart):this.selectionStart=this.selectionEnd,e},removeChars:function(t,e){void 0===e&&(e=t+1),this.removeStyleFromTo(t,e),this._text.splice(t,e-t),this.text=this._text.join(""),this.set("dirty",!0),this._shouldClearDimensionCache()&&(this.initDimensions(),this.setCoords()),this._removeExtraneousStyles()},insertChars:function(t,e,n,i){void 0===i&&(i=n),i>n&&this.removeStyleFromTo(n,i);var r=S.util.string.graphemeSplit(t);this.insertNewStyleBlock(r,n,e),this._text=[].concat(this._text.slice(0,n),r,this._text.slice(i)),this.text=this._text.join(""),this.set("dirty",!0),this._shouldClearDimensionCache()&&(this.initDimensions(),this.setCoords()),this._removeExtraneousStyles()}}),y=S.util.toFixed,b=/ +/g,S.util.object.extend(S.Text.prototype,{toSVG:function(t){var e=this._createBaseSVGMarkup(),n=this._getSVGLeftTopOffsets(),i=this._getSVGTextAndBg(n.textTop,n.textLeft);return this._wrapSVGTextAndBg(e,i),t?t(e.join("")):e.join("")},_getSVGLeftTopOffsets:function(){return{textLeft:-this.width/2,textTop:-this.height/2,lineTop:this.getHeightOfLine(0)}},_wrapSVGTextAndBg:function(t,e){var n=this.getSvgFilter(),i=""===n?"":' style="'+n+'"',r=this.getSvgTextDecoration(this);t.push("\t<g ",this.getSvgCommons(),'transform="',this.getSvgTransform(),this.getSvgTransformMatrix(),'"',i,">\n",e.textBgRects.join(""),'\t\t<text xml:space="preserve" ',this.fontFamily?'font-family="'+this.fontFamily.replace(/"/g,"'")+'" ':"",this.fontSize?'font-size="'+this.fontSize+'" ':"",this.fontStyle?'font-style="'+this.fontStyle+'" ':"",this.fontWeight?'font-weight="'+this.fontWeight+'" ':"",r?'text-decoration="'+r+'" ':"",'style="',this.getSvgStyles(!0),'"',this.addPaintOrder()," >",e.textSpans.join(""),"</text>\n","\t</g>\n")},_getSVGTextAndBg:function(t,e){var n,i=[],r=[],o=t;this._setSVGBg(r);for(var s=0,a=this._textLines.length;s<a;s++)n=this._getLineLeftOffset(s),(this.textBackgroundColor||this.styleHas("textBackgroundColor",s))&&this._setSVGTextLineBg(r,s,e+n,o),this._setSVGTextLineText(i,s,e+n,o),o+=this.getHeightOfLine(s);return{textSpans:i,textBgRects:r}},_createTextCharSpan:function(t,e,n,i){var r=t!==t.trim()||t.match(b),o=this.getSvgSpanStyles(e,r),s=o?'style="'+o+'"':"",a=e.deltaY,l="",u=S.Object.NUM_FRACTION_DIGITS;return a&&(l=' dy="'+y(a,u)+'" '),['<tspan x="',y(n,u),'" y="',y(i,u),'" ',l,s,">",S.util.string.escapeXml(t),"</tspan>"].join("")},_setSVGTextLineText:function(t,e,n,i){var r,o,s,a,l,u=this.getHeightOfLine(e),c=-1!==this.textAlign.indexOf("justify"),h="",p=0,d=this._textLines[e];i+=u*(1-this._fontSizeFraction)/this.lineHeight;for(var f=0,g=d.length-1;f<=g;f++)l=f===g||this.charSpacing,h+=d[f],s=this.__charBounds[e][f],0===p?(n+=s.kernedWidth-s.width,p+=s.width):p+=s.kernedWidth,c&&!l&&this._reSpaceAndTab.test(d[f])&&(l=!0),l||(r=r||this.getCompleteStyleDeclaration(e,f),o=this.getCompleteStyleDeclaration(e,f+1),l=this._hasStyleChangedForSvg(r,o)),l&&(a=this._getStyleDeclaration(e,f)||{},t.push(this._createTextCharSpan(h,a,n,i)),h="",r=o,n+=p,p=0)},_pushTextBgRect:function(t,e,n,i,r,o){var s=S.Object.NUM_FRACTION_DIGITS;t.push("\t\t<rect ",this._getFillAttributes(e),' x="',y(n,s),'" y="',y(i,s),'" width="',y(r,s),'" height="',y(o,s),'"></rect>\n')},_setSVGTextLineBg:function(t,e,n,i){for(var r,o,s=this._textLines[e],a=this.getHeightOfLine(e)/this.lineHeight,l=0,u=0,c=this.getValueOfPropertyAt(e,0,"textBackgroundColor"),h=0,p=s.length;h<p;h++)r=this.__charBounds[e][h],(o=this.getValueOfPropertyAt(e,h,"textBackgroundColor"))!==c?(c&&this._pushTextBgRect(t,c,n+u,i,l,a),u=r.left,l=r.width,c=o):l+=r.kernedWidth;o&&this._pushTextBgRect(t,o,n+u,i,l,a)},_getFillAttributes:function(t){var e=t&&"string"==typeof t?new S.Color(t):"";return e&&e.getSource()&&1!==e.getAlpha()?'opacity="'+e.getAlpha()+'" fill="'+e.setAlpha(1).toRgb()+'"':'fill="'+t+'"'},_getSVGLineTopOffset:function(t){for(var e,n=0,i=0;i<t;i++)n+=this.getHeightOfLine(i);return e=this.getHeightOfLine(i),{lineTop:n,offset:(this._fontSizeMult-this._fontSizeFraction)*e/(this.lineHeight*this._fontSizeMult)}},getSvgStyles:function(t){return S.Object.prototype.getSvgStyles.call(this,t)+" white-space: pre;"}}),function(t){"use strict";var n=e.fabric||(e.fabric={});n.Textbox=n.util.createClass(n.IText,n.Observable,{type:"textbox",minWidth:20,dynamicMinWidth:2,__cachedLines:null,lockScalingFlip:!0,noScaleCache:!1,_dimensionAffectingProps:n.Text.prototype._dimensionAffectingProps.concat("width"),initDimensions:function(){this.__skipDimension||(this.isEditing&&this.initDelayedCursor(),this.clearContextTop(),this._clearCache(),this.dynamicMinWidth=0,this._styleMap=this._generateStyleMap(this._splitText()),this.dynamicMinWidth>this.width&&this._set("width",this.dynamicMinWidth),-1!==this.textAlign.indexOf("justify")&&this.enlargeSpaces(),this.height=this.calcTextHeight(),this.saveState({propertySet:"_dimensionAffectingProps"}))},_generateStyleMap:function(t){for(var e=0,n=0,i=0,r={},o=0;o<t.graphemeLines.length;o++)"\n"===t.graphemeText[i]&&o>0?(n=0,i++,e++):this._reSpaceAndTab.test(t.graphemeText[i])&&o>0&&(n++,i++),r[o]={line:e,offset:n},i+=t.graphemeLines[o].length,n+=t.graphemeLines[o].length;return r},styleHas:function(t,e){if(this._styleMap&&!this.isWrapping){var i=this._styleMap[e];i&&(e=i.line)}return n.Text.prototype.styleHas.call(this,t,e)},isEmptyStyles:function(t){var e,n,i=0,r=!1,o=this._styleMap[t],s=this._styleMap[t+1];for(var a in o&&(t=o.line,i=o.offset),s&&(r=s.line===t,e=s.offset),n=void 0===t?this.styles:{line:this.styles[t]})for(var l in n[a])if(l>=i&&(!r||l<e))for(var u in n[a][l])return!1;return!0},_getStyleDeclaration:function(t,e){if(this._styleMap&&!this.isWrapping){var n=this._styleMap[t];if(!n)return null;t=n.line,e=n.offset+e}return this.callSuper("_getStyleDeclaration",t,e)},_setStyleDeclaration:function(t,e,n){var i=this._styleMap[t];this.styles[t=i.line][e=i.offset+e]=n},_deleteStyleDeclaration:function(t,e){var n=this._styleMap[t];delete this.styles[t=n.line][e=n.offset+e]},_getLineStyle:function(t){return this.styles[this._styleMap[t].line]},_setLineStyle:function(t,e){this.styles[this._styleMap[t].line]=e},_deleteLineStyle:function(t){delete this.styles[this._styleMap[t].line]},_wrapText:function(t,e){var n,i=[];for(this.isWrapping=!0,n=0;n<t.length;n++)i=i.concat(this._wrapLine(t[n],n,e));return this.isWrapping=!1,i},_measureWord:function(t,e,n){var i,r=0;n=n||0;for(var o=0,s=t.length;o<s;o++)r+=this._getGraphemeBox(t[o],e,o+n,i,!0).kernedWidth,i=t[o];return r},_wrapLine:function(t,e,i,r){var o=0,s=[],a=[],l=t.split(this._reSpaceAndTab),u="",c=0,h=0,p=0,d=0,f=!0,g=this._getWidthOfCharSpacing();i-=r=r||0;for(var m=0;m<l.length;m++)u=n.util.string.graphemeSplit(l[m]),h=this._measureWord(u,e,c),c+=u.length,(o+=p+h-g)>=i&&!f?(s.push(a),a=[],o=h,f=!0):o+=g,f||a.push(" "),a=a.concat(u),p=this._measureWord([" "],e,c),c++,f=!1,h>d&&(d=h);return m&&s.push(a),d+r>this.dynamicMinWidth&&(this.dynamicMinWidth=d-g+r),s},isEndOfWrapping:function(t){return!this._styleMap[t+1]||this._styleMap[t+1].line!==this._styleMap[t].line},_splitTextIntoLines:function(t){for(var e=n.Text.prototype._splitTextIntoLines.call(this,t),i=this._wrapText(e.lines,this.width),r=new Array(i.length),o=0;o<i.length;o++)r[o]=i[o].join("");return e.lines=r,e.graphemeLines=i,e},getMinWidth:function(){return Math.max(this.minWidth,this.dynamicMinWidth)},toObject:function(t){return this.callSuper("toObject",["minWidth"].concat(t))}}),n.Textbox.fromObject=function(t,e){return n.Object._fromObject("Textbox",t,e,"text")}}(),_=S.Canvas.prototype._setObjectScale,S.Canvas.prototype._setObjectScale=function(t,e,n,i,r,o,s){var a=e.target;if(!("x"===r&&a instanceof S.Textbox))return _.call(S.Canvas.prototype,t,e,n,i,r,o,s);var l=a._getTransformedDimensions().x,u=a.width*(t.x/l);return u>=a.getMinWidth()?(a.set("width",u),!0):void 0},S.util.object.extend(S.Textbox.prototype,{_removeExtraneousStyles:function(){for(var t in this._styleMap)this._textLines[t]||delete this.styles[this._styleMap[t].line]}})},hLX6:function(t,e,n){"use strict";function i(t,e){var n,i;if("function"==typeof e)void 0!==(i=e(t))&&(t=i);else if(Array.isArray(e))for(n=0;n<e.length;n++)void 0!==(i=e[n](t))&&(t=i);return t}function r(t,e){return"-"===t[0]&&Array.isArray(e)&&/^-\d+$/.test(t)?e.length+parseInt(t,10):t}function o(t){return"[object Object]"===Object.prototype.toString.call(t)}function s(t){return Object(t)===t}function a(t){return 0===Object.keys(t).length}function l(t,e){return t.indexOf("[")>=0&&(t=t.replace(/\[/g,".").replace(/]/g,"")),t.split(e)}function u(t,e,n){if(!(this instanceof u))return new u(t,e,n);void 0===e&&(e=!1),void 0===n&&(n=!0),this.seperator=t||".",this.override=e,this.useArray=n,this.keepArray=!1,this.cleanup=[]}var c=new u(".",!1,!0);function h(t){return function(){return c[t].apply(c,arguments)}}u.prototype._fill=function(t,e,n,r){var o=t.shift();if(t.length>0){if(e[o]=e[o]||(this.useArray&&/^\d+/.test(t[0])?[]:{}),!s(e[o])){if(!this.override){if(!s(n)||!a(n))throw new Error("Trying to redefine `"+o+"` which is a "+typeof e[o]);return}e[o]={}}this._fill(t,e[o],n,r)}else{if(!this.override&&s(e[o])&&!a(e[o])){if(!s(n)||!a(n))throw new Error("Trying to redefine non-empty obj['"+o+"']");return}e[o]=i(n,r)}},u.prototype.object=function(t,e){var n=this;return Object.keys(t).forEach(function(r){var o=void 0===e?null:e[r],s=l(r,n.seperator).join(n.seperator);-1!==s.indexOf(n.seperator)?(n._fill(s.split(n.seperator),t,t[r],o),delete t[r]):n.override&&(t[r]=i(t[r],o))}),t},u.prototype.str=function(t,e,n,r){return-1!==t.indexOf(this.seperator)?this._fill(t.split(this.seperator),n,e,r):n.hasOwnProperty(t)&&!this.override||(n[t]=i(e,r)),n},u.prototype.pick=function(t,e,n){var i,o,s,a,u;for(o=l(t,this.seperator),i=0;i<o.length;i++){if(a=r(o[i],e),!(e&&"object"==typeof e&&a in e))return;if(i===o.length-1)return n?(s=e[a],delete e[a],Array.isArray(e)&&(u=o.slice(0,-1).join("."),-1===this.cleanup.indexOf(u)&&this.cleanup.push(u)),s):e[a];e=e[a]}return n&&Array.isArray(e)&&(e=e.filter(function(t){return void 0!==t})),e},u.prototype.remove=function(t,e){var n;if(this.cleanup=[],Array.isArray(t)){for(n=0;n<t.length;n++)this.pick(t[n],e,!0);return this._cleanup(e),e}return this.pick(t,e,!0)},u.prototype._cleanup=function(t){var e,n,i,r;if(this.cleanup.length){for(n=0;n<this.cleanup.length;n++)e=(e=(r=(i=this.cleanup[n].split(".")).splice(0,-1).join("."))?this.pick(r,t):t)[i[0]].filter(function(t){return void 0!==t}),this.set(this.cleanup[n],e,t);this.cleanup=[]}},u.prototype.del=u.prototype.remove,u.prototype.move=function(t,e,n,r,o){return"function"==typeof r||Array.isArray(r)?this.set(e,i(this.pick(t,n,!0),r),n,o):(o=r,this.set(e,this.pick(t,n,!0),n,o)),n},u.prototype.transfer=function(t,e,n,r,o,s){return"function"==typeof o||Array.isArray(o)?this.set(e,i(this.pick(t,n,!0),o),r,s):(s=o,this.set(e,this.pick(t,n,!0),r,s)),r},u.prototype.copy=function(t,e,n,r,o,s){return"function"==typeof o||Array.isArray(o)?this.set(e,i(JSON.parse(JSON.stringify(this.pick(t,n,!1))),o),r,s):(s=o,this.set(e,this.pick(t,n,!1),r,s)),r},u.prototype.set=function(t,e,n,i){var r,s,a,u;if(void 0===e)return n;for(a=l(t,this.seperator),r=0;r<a.length;r++){if(u=a[r],r===a.length-1)if(i&&o(e)&&o(n[u]))for(s in e)e.hasOwnProperty(s)&&(n[u][s]=e[s]);else if(i&&Array.isArray(n[u])&&Array.isArray(e))for(var c=0;c<e.length;c++)n[a[r]].push(e[c]);else n[u]=e;else n.hasOwnProperty(u)&&(o(n[u])||Array.isArray(n[u]))||(n[u]=/^\d+$/.test(a[r+1])?[]:{});n=n[u]}return n},u.prototype.transform=function(t,e,n){return e=e||{},n=n||{},Object.keys(t).forEach((function(i){this.set(t[i],this.pick(i,e),n)}).bind(this)),n},u.prototype.dot=function(t,e,n){return e=e||{},n=n||[],Object.keys(t).forEach((function(i){if(s(t[i])&&(o(t[i])&&!a(t[i])||Array.isArray(t[i])&&!this.keepArray&&0!==t[i].length))return this.dot(t[i],e,n.concat(i));e[n.concat(i).join(this.seperator)]=t[i]}).bind(this)),e},u.pick=h("pick"),u.move=h("move"),u.transfer=h("transfer"),u.transform=h("transform"),u.copy=h("copy"),u.object=h("object"),u.str=h("str"),u.set=h("set"),u.del=u.remove=h("remove"),u.dot=h("dot"),["override","overwrite"].forEach(function(t){Object.defineProperty(u,t,{get:function(){return c.override},set:function(t){c.override=!!t}})}),["useArray","keepArray"].forEach(function(t){Object.defineProperty(u,t,{get:function(){return c[t]},set:function(e){c[t]=e}})}),u._process=i,t.exports=u},jT1Q:function(t,e,n){var i=n("4af/"),r=n("BjAV"),o=n("2yAJ"),s=n("v9aN"),a=n("vYjF"),l=a.isErrorEvent,u=a.isDOMError,c=a.isDOMException,h=a.isError,p=a.isObject,d=a.isPlainObject,f=a.isUndefined,g=a.isFunction,m=a.isString,v=a.isArray,y=a.isEmptyObject,b=a.each,_=a.objectMerge,w=a.truncate,x=a.objectFrozen,C=a.hasKey,S=a.joinRegExp,k=a.urlencode,E=a.uuid4,T=a.htmlTreeAsString,O=a.isSameException,I=a.isSameStacktrace,A=a.parseUrl,P=a.fill,D=a.supportsFetch,j=a.supportsReferrerPolicy,M=a.serializeKeysForMessage,R=a.serializeException,F=a.sanitize,N=n("AKyF").wrapMethod,L="source protocol user pass host port path".split(" "),B=/^(?:(\w+):)?\/\/(?:(\w+)(:\w+)?@)?([\w\.-]+)(?::(\d+))?(\/.*)/;function V(){return+new Date}var z="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},H=z.document,W=z.navigator;function U(t,e){return g(e)?function(n){return e(n,t)}:e}function X(){for(var t in this._hasJSON=!("object"!=typeof JSON||!JSON.stringify),this._hasDocument=!f(H),this._hasNavigator=!f(W),this._lastCapturedException=null,this._lastData=null,this._lastEventId=null,this._globalServer=null,this._globalKey=null,this._globalProject=null,this._globalContext={},this._globalOptions={release:z.SENTRY_RELEASE&&z.SENTRY_RELEASE.id,logger:"javascript",ignoreErrors:[],ignoreUrls:[],whitelistUrls:[],includePaths:[],headers:null,collectWindowErrors:!0,captureUnhandledRejections:!0,maxMessageLength:0,maxUrlLength:250,stackTraceLimit:50,autoBreadcrumbs:!0,instrument:!0,sampleRate:1,sanitizeKeys:[]},this._fetchDefaults={method:"POST",referrerPolicy:j()?"origin":""},this._ignoreOnError=0,this._isRavenInstalled=!1,this._originalErrorStackTraceLimit=Error.stackTraceLimit,this._originalConsole=z.console||{},this._originalConsoleMethods={},this._plugins=[],this._startTime=V(),this._wrappedBuiltIns=[],this._breadcrumbs=[],this._lastCapturedEvent=null,this._location=z.location,this._lastHref=this._location&&this._location.href,this._resetBackoff(),this._originalConsole)this._originalConsoleMethods[t]=this._originalConsole[t]}(X.prototype={VERSION:"3.27.0",debug:!1,TraceKit:i,config:function(t,e){var n=this;if(n._globalServer)return this._logDebug("error","Error: Raven has already been configured"),n;if(!t)return n;var r=n._globalOptions;e&&b(e,function(t,e){"tags"===t||"extra"===t||"user"===t?n._globalContext[t]=e:r[t]=e}),n.setDSN(t),r.ignoreErrors.push(/^Script error\.?$/),r.ignoreErrors.push(/^Javascript error: Script error\.? on line 0$/),r.ignoreErrors=S(r.ignoreErrors),r.ignoreUrls=!!r.ignoreUrls.length&&S(r.ignoreUrls),r.whitelistUrls=!!r.whitelistUrls.length&&S(r.whitelistUrls),r.includePaths=S(r.includePaths),r.maxBreadcrumbs=Math.max(0,Math.min(r.maxBreadcrumbs||100,100));var o={xhr:!0,console:!0,dom:!0,location:!0,sentry:!0},s=r.autoBreadcrumbs;"[object Object]"==={}.toString.call(s)?s=_(o,s):!1!==s&&(s=o),r.autoBreadcrumbs=s;var a={tryCatch:!0},l=r.instrument;return"[object Object]"==={}.toString.call(l)?l=_(a,l):!1!==l&&(l=a),r.instrument=l,i.collectWindowErrors=!!r.collectWindowErrors,n},install:function(){var t=this;return t.isSetup()&&!t._isRavenInstalled&&(i.report.subscribe(function(){t._handleOnErrorStackInfo.apply(t,arguments)}),t._globalOptions.captureUnhandledRejections&&t._attachPromiseRejectionHandler(),t._patchFunctionToString(),t._globalOptions.instrument&&t._globalOptions.instrument.tryCatch&&t._instrumentTryCatch(),t._globalOptions.autoBreadcrumbs&&t._instrumentBreadcrumbs(),t._drainPlugins(),t._isRavenInstalled=!0),Error.stackTraceLimit=t._globalOptions.stackTraceLimit,this},setDSN:function(t){var e=this._parseDSN(t),n=e.path.lastIndexOf("/"),i=e.path.substr(1,n);this._dsn=t,this._globalKey=e.user,this._globalSecret=e.pass&&e.pass.substr(1),this._globalProject=e.path.substr(n+1),this._globalServer=this._getGlobalServer(e),this._globalEndpoint=this._globalServer+"/"+i+"api/"+this._globalProject+"/store/",this._resetBackoff()},context:function(t,e,n){return g(t)&&(n=e||[],e=t,t={}),this.wrap(t,e).apply(this,n)},wrap:function(t,e,n){var i=this;if(f(e)&&!g(t))return t;if(g(t)&&(e=t,t=void 0),!g(e))return e;try{if(e.__raven__)return e;if(e.__raven_wrapper__)return e.__raven_wrapper__}catch(t){return e}function r(){var r=[],o=arguments.length,s=!t||t&&!1!==t.deep;for(n&&g(n)&&n.apply(this,arguments);o--;)r[o]=s?i.wrap(t,arguments[o]):arguments[o];try{return e.apply(this,r)}catch(e){throw i._ignoreNextOnError(),i.captureException(e,t),e}}for(var o in e)C(e,o)&&(r[o]=e[o]);return r.prototype=e.prototype,e.__raven_wrapper__=r,r.__raven__=!0,r.__orig__=e,r},uninstall:function(){return i.report.uninstall(),this._detachPromiseRejectionHandler(),this._unpatchFunctionToString(),this._restoreBuiltIns(),this._restoreConsole(),Error.stackTraceLimit=this._originalErrorStackTraceLimit,this._isRavenInstalled=!1,this},_promiseRejectionHandler:function(t){this._logDebug("debug","Raven caught unhandled promise rejection:",t),this.captureException(t.reason,{mechanism:{type:"onunhandledrejection",handled:!1}})},_attachPromiseRejectionHandler:function(){return this._promiseRejectionHandler=this._promiseRejectionHandler.bind(this),z.addEventListener&&z.addEventListener("unhandledrejection",this._promiseRejectionHandler),this},_detachPromiseRejectionHandler:function(){return z.removeEventListener&&z.removeEventListener("unhandledrejection",this._promiseRejectionHandler),this},captureException:function(t,e){if(e=_({trimHeadFrames:0},e||{}),l(t)&&t.error)t=t.error;else{if(u(t)||c(t)){var n=t.name||(u(t)?"DOMError":"DOMException");return this.captureMessage(t.message?n+": "+t.message:n,_(e,{stacktrace:!0,trimHeadFrames:e.trimHeadFrames+1}))}if(h(t))t=t;else{if(!d(t))return this.captureMessage(t,_(e,{stacktrace:!0,trimHeadFrames:e.trimHeadFrames+1}));e=this._getCaptureExceptionOptionsFromPlainObject(e,t),t=new Error(e.message)}}this._lastCapturedException=t;try{var r=i.computeStackTrace(t);this._handleStackInfo(r,e)}catch(e){if(t!==e)throw e}return this},_getCaptureExceptionOptionsFromPlainObject:function(t,e){var n=Object.keys(e).sort(),i=_(t,{message:"Non-Error exception captured with keys: "+M(n),fingerprint:[o(n)],extra:t.extra||{}});return i.extra.__serialized__=R(e),i},captureMessage:function(t,e){if(!this._globalOptions.ignoreErrors.test||!this._globalOptions.ignoreErrors.test(t)){var n,r=_({message:t+=""},e=e||{});try{throw new Error(t)}catch(t){n=t}n.name=null;var o=i.computeStackTrace(n),s=v(o.stack)&&o.stack[1];s&&"Raven.captureException"===s.func&&(s=o.stack[2]);var a=s&&s.url||"";if((!this._globalOptions.ignoreUrls.test||!this._globalOptions.ignoreUrls.test(a))&&(!this._globalOptions.whitelistUrls.test||this._globalOptions.whitelistUrls.test(a))){if(this._globalOptions.stacktrace||e.stacktrace||""===r.message){r.fingerprint=null==r.fingerprint?t:r.fingerprint,(e=_({trimHeadFrames:0},e)).trimHeadFrames+=1;var l=this._prepareFrames(o,e);r.stacktrace={frames:l.reverse()}}return r.fingerprint&&(r.fingerprint=v(r.fingerprint)?r.fingerprint:[r.fingerprint]),this._send(r),this}}},captureBreadcrumb:function(t){var e=_({timestamp:V()/1e3},t);if(g(this._globalOptions.breadcrumbCallback)){var n=this._globalOptions.breadcrumbCallback(e);if(p(n)&&!y(n))e=n;else if(!1===n)return this}return this._breadcrumbs.push(e),this._breadcrumbs.length>this._globalOptions.maxBreadcrumbs&&this._breadcrumbs.shift(),this},addPlugin:function(t){var e=[].slice.call(arguments,1);return this._plugins.push([t,e]),this._isRavenInstalled&&this._drainPlugins(),this},setUserContext:function(t){return this._globalContext.user=t,this},setExtraContext:function(t){return this._mergeContext("extra",t),this},setTagsContext:function(t){return this._mergeContext("tags",t),this},clearContext:function(){return this._globalContext={},this},getContext:function(){return JSON.parse(r(this._globalContext))},setEnvironment:function(t){return this._globalOptions.environment=t,this},setRelease:function(t){return this._globalOptions.release=t,this},setDataCallback:function(t){return this._globalOptions.dataCallback=U(this._globalOptions.dataCallback,t),this},setBreadcrumbCallback:function(t){return this._globalOptions.breadcrumbCallback=U(this._globalOptions.breadcrumbCallback,t),this},setShouldSendCallback:function(t){return this._globalOptions.shouldSendCallback=U(this._globalOptions.shouldSendCallback,t),this},setTransport:function(t){return this._globalOptions.transport=t,this},lastException:function(){return this._lastCapturedException},lastEventId:function(){return this._lastEventId},isSetup:function(){return!(!this._hasJSON||!this._globalServer&&(this.ravenNotConfiguredError||(this.ravenNotConfiguredError=!0,this._logDebug("error","Error: Raven has not been configured.")),1))},afterLoad:function(){var t=z.RavenConfig;t&&this.config(t.dsn,t.config).install()},showReportDialog:function(t){if(H){if(!(t=_({eventId:this.lastEventId(),dsn:this._dsn,user:this._globalContext.user||{}},t)).eventId)throw new s("Missing eventId");if(!t.dsn)throw new s("Missing DSN");var e=encodeURIComponent,n=[];for(var i in t)if("user"===i){var r=t.user;r.name&&n.push("name="+e(r.name)),r.email&&n.push("email="+e(r.email))}else n.push(e(i)+"="+e(t[i]));var o=this._getGlobalServer(this._parseDSN(t.dsn)),a=H.createElement("script");a.async=!0,a.src=o+"/api/embed/error-page/?"+n.join("&"),(H.head||H.body).appendChild(a)}},_ignoreNextOnError:function(){var t=this;this._ignoreOnError+=1,setTimeout(function(){t._ignoreOnError-=1})},_triggerEvent:function(t,e){var n,i;if(this._hasDocument){for(i in e=e||{},t="raven"+t.substr(0,1).toUpperCase()+t.substr(1),H.createEvent?(n=H.createEvent("HTMLEvents")).initEvent(t,!0,!0):(n=H.createEventObject()).eventType=t,e)C(e,i)&&(n[i]=e[i]);if(H.createEvent)H.dispatchEvent(n);else try{H.fireEvent("on"+n.eventType.toLowerCase(),n)}catch(t){}}},_breadcrumbEventHandler:function(t){var e=this;return function(n){if(e._keypressTimeout=null,e._lastCapturedEvent!==n){var i;e._lastCapturedEvent=n;try{i=T(n.target)}catch(t){i="<unknown>"}e.captureBreadcrumb({category:"ui."+t,message:i})}}},_keypressEventHandler:function(){var t=this;return function(e){var n;try{n=e.target}catch(t){return}var i=n&&n.tagName;if(i&&("INPUT"===i||"TEXTAREA"===i||n.isContentEditable)){var r=t._keypressTimeout;r||t._breadcrumbEventHandler("input")(e),clearTimeout(r),t._keypressTimeout=setTimeout(function(){t._keypressTimeout=null},1e3)}}},_captureUrlChange:function(t,e){var n=A(this._location.href),i=A(e),r=A(t);this._lastHref=e,n.protocol===i.protocol&&n.host===i.host&&(e=i.relative),n.protocol===r.protocol&&n.host===r.host&&(t=r.relative),this.captureBreadcrumb({category:"navigation",data:{to:e,from:t}})},_patchFunctionToString:function(){var t=this;t._originalFunctionToString=Function.prototype.toString,Function.prototype.toString=function(){return t._originalFunctionToString.apply("function"==typeof this&&this.__raven__?this.__orig__:this,arguments)}},_unpatchFunctionToString:function(){this._originalFunctionToString&&(Function.prototype.toString=this._originalFunctionToString)},_instrumentTryCatch:function(){var t=this,e=t._wrappedBuiltIns;function n(e){return function(n,i){for(var r=new Array(arguments.length),o=0;o<r.length;++o)r[o]=arguments[o];var s=r[0];return g(s)&&(r[0]=t.wrap({mechanism:{type:"instrument",data:{function:e.name||"<anonymous>"}}},s)),e.apply?e.apply(this,r):e(r[0],r[1])}}var i=this._globalOptions.autoBreadcrumbs;function r(n){var r=z[n]&&z[n].prototype;r&&r.hasOwnProperty&&r.hasOwnProperty("addEventListener")&&(P(r,"addEventListener",function(e){return function(r,o,s,a){try{o&&o.handleEvent&&(o.handleEvent=t.wrap({mechanism:{type:"instrument",data:{target:n,function:"handleEvent",handler:o&&o.name||"<anonymous>"}}},o.handleEvent))}catch(t){}var l,u,c;return i&&i.dom&&("EventTarget"===n||"Node"===n)&&(u=t._breadcrumbEventHandler("click"),c=t._keypressEventHandler(),l=function(t){if(t){var e;try{e=t.type}catch(t){return}return"click"===e?u(t):"keypress"===e?c(t):void 0}}),e.call(this,r,t.wrap({mechanism:{type:"instrument",data:{target:n,function:"addEventListener",handler:o&&o.name||"<anonymous>"}}},o,l),s,a)}},e),P(r,"removeEventListener",function(t){return function(e,n,i,r){try{n=n&&(n.__raven_wrapper__?n.__raven_wrapper__:n)}catch(t){}return t.call(this,e,n,i,r)}},e))}P(z,"setTimeout",n,e),P(z,"setInterval",n,e),z.requestAnimationFrame&&P(z,"requestAnimationFrame",function(e){return function(n){return e(t.wrap({mechanism:{type:"instrument",data:{function:"requestAnimationFrame",handler:e&&e.name||"<anonymous>"}}},n))}},e);for(var o=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],s=0;s<o.length;s++)r(o[s])},_instrumentBreadcrumbs:function(){var t=this,e=this._globalOptions.autoBreadcrumbs,n=t._wrappedBuiltIns;function i(e,n){e in n&&g(n[e])&&P(n,e,function(n){return t.wrap({mechanism:{type:"instrument",data:{function:e,handler:n&&n.name||"<anonymous>"}}},n)})}if(e.xhr&&"XMLHttpRequest"in z){var r=z.XMLHttpRequest&&z.XMLHttpRequest.prototype;P(r,"open",function(e){return function(n,i){return m(i)&&-1===i.indexOf(t._globalKey)&&(this.__raven_xhr={method:n,url:i,status_code:null}),e.apply(this,arguments)}},n),P(r,"send",function(e){return function(){var n=this;function r(){if(n.__raven_xhr&&4===n.readyState){try{n.__raven_xhr.status_code=n.status}catch(t){}t.captureBreadcrumb({type:"http",category:"xhr",data:n.__raven_xhr})}}for(var o=["onload","onerror","onprogress"],s=0;s<o.length;s++)i(o[s],n);return"onreadystatechange"in n&&g(n.onreadystatechange)?P(n,"onreadystatechange",function(e){return t.wrap({mechanism:{type:"instrument",data:{function:"onreadystatechange",handler:e&&e.name||"<anonymous>"}}},e,r)}):n.onreadystatechange=r,e.apply(this,arguments)}},n)}e.xhr&&D()&&P(z,"fetch",function(e){return function(){for(var n=new Array(arguments.length),i=0;i<n.length;++i)n[i]=arguments[i];var r,o=n[0],s="GET";if("string"==typeof o?r=o:"Request"in z&&o instanceof z.Request?(r=o.url,o.method&&(s=o.method)):r=""+o,-1!==r.indexOf(t._globalKey))return e.apply(this,n);n[1]&&n[1].method&&(s=n[1].method);var a={method:s,url:r,status_code:null};return e.apply(this,n).then(function(e){return a.status_code=e.status,t.captureBreadcrumb({type:"http",category:"fetch",data:a}),e}).catch(function(e){throw t.captureBreadcrumb({type:"http",category:"fetch",data:a,level:"error"}),e})}},n),e.dom&&this._hasDocument&&(H.addEventListener?(H.addEventListener("click",t._breadcrumbEventHandler("click"),!1),H.addEventListener("keypress",t._keypressEventHandler(),!1)):H.attachEvent&&(H.attachEvent("onclick",t._breadcrumbEventHandler("click")),H.attachEvent("onkeypress",t._keypressEventHandler())));var o=z.chrome;if(e.location&&!(o&&o.app&&o.app.runtime)&&z.history&&z.history.pushState&&z.history.replaceState){var s=z.onpopstate;z.onpopstate=function(){if(t._captureUrlChange(t._lastHref,t._location.href),s)return s.apply(this,arguments)};var a=function(e){return function(){var n=arguments.length>2?arguments[2]:void 0;return n&&t._captureUrlChange(t._lastHref,n+""),e.apply(this,arguments)}};P(z.history,"pushState",a,n),P(z.history,"replaceState",a,n)}if(e.console&&"console"in z&&console.log){var l=function(e,n){t.captureBreadcrumb({message:e,level:n.level,category:"console"})};b(["debug","info","warn","error","log"],function(t,e){N(console,e,l)})}},_restoreBuiltIns:function(){for(var t;this._wrappedBuiltIns.length;)(t=this._wrappedBuiltIns.shift())[0][t[1]]=t[2]},_restoreConsole:function(){for(var t in this._originalConsoleMethods)this._originalConsole[t]=this._originalConsoleMethods[t]},_drainPlugins:function(){var t=this;b(this._plugins,function(e,n){n[0].apply(t,[t].concat(n[1]))})},_parseDSN:function(t){var e=B.exec(t),n={},i=7;try{for(;i--;)n[L[i]]=e[i]||""}catch(e){throw new s("Invalid DSN: "+t)}if(n.pass&&!this._globalOptions.allowSecretKey)throw new s("Do not specify your secret key in the DSN. See: http://bit.ly/raven-secret-key");return n},_getGlobalServer:function(t){var e="//"+t.host+(t.port?":"+t.port:"");return t.protocol&&(e=t.protocol+":"+e),e},_handleOnErrorStackInfo:function(t,e){(e=e||{}).mechanism=e.mechanism||{type:"onerror",handled:!1},this._ignoreOnError||this._handleStackInfo(t,e)},_handleStackInfo:function(t,e){var n=this._prepareFrames(t,e);this._triggerEvent("handle",{stackInfo:t,options:e}),this._processException(t.name,t.message,t.url,t.lineno,n,e)},_prepareFrames:function(t,e){var n=this,i=[];if(t.stack&&t.stack.length&&(b(t.stack,function(e,r){var o=n._normalizeFrame(r,t.url);o&&i.push(o)}),e&&e.trimHeadFrames))for(var r=0;r<e.trimHeadFrames&&r<i.length;r++)i[r].in_app=!1;return i=i.slice(0,this._globalOptions.stackTraceLimit)},_normalizeFrame:function(t,e){var n={filename:t.url,lineno:t.line,colno:t.column,function:t.func||"?"};return t.url||(n.filename=e),n.in_app=!(this._globalOptions.includePaths.test&&!this._globalOptions.includePaths.test(n.filename)||/(Raven|TraceKit)\./.test(n.function)||/raven\.(min\.)?js$/.test(n.filename)),n},_processException:function(t,e,n,i,r,o){var s,a=(t?t+": ":"")+(e||"");if((!this._globalOptions.ignoreErrors.test||!this._globalOptions.ignoreErrors.test(e)&&!this._globalOptions.ignoreErrors.test(a))&&(r&&r.length?(n=r[0].filename||n,r.reverse(),s={frames:r}):n&&(s={frames:[{filename:n,lineno:i,in_app:!0}]}),(!this._globalOptions.ignoreUrls.test||!this._globalOptions.ignoreUrls.test(n))&&(!this._globalOptions.whitelistUrls.test||this._globalOptions.whitelistUrls.test(n)))){var l=_({exception:{values:[{type:t,value:e,stacktrace:s}]},transaction:n},o),u=l.exception.values[0];null==u.type&&""===u.value&&(u.value="Unrecoverable error caught"),!l.exception.mechanism&&l.mechanism&&(l.exception.mechanism=l.mechanism,delete l.mechanism),l.exception.mechanism=_({type:"generic",handled:!0},l.exception.mechanism||{}),this._send(l)}},_trimPacket:function(t){var e=this._globalOptions.maxMessageLength;if(t.message&&(t.message=w(t.message,e)),t.exception){var n=t.exception.values[0];n.value=w(n.value,e)}var i=t.request;return i&&(i.url&&(i.url=w(i.url,this._globalOptions.maxUrlLength)),i.Referer&&(i.Referer=w(i.Referer,this._globalOptions.maxUrlLength))),t.breadcrumbs&&t.breadcrumbs.values&&this._trimBreadcrumbs(t.breadcrumbs),t},_trimBreadcrumbs:function(t){for(var e,n,i,r=["to","from","url"],o=0;o<t.values.length;++o)if((n=t.values[o]).hasOwnProperty("data")&&p(n.data)&&!x(n.data)){i=_({},n.data);for(var s=0;s<r.length;++s)i.hasOwnProperty(e=r[s])&&i[e]&&(i[e]=w(i[e],this._globalOptions.maxUrlLength));t.values[o].data=i}},_getHttpData:function(){if(this._hasNavigator||this._hasDocument){var t={};return this._hasNavigator&&W.userAgent&&(t.headers={"User-Agent":W.userAgent}),z.location&&z.location.href&&(t.url=z.location.href),this._hasDocument&&H.referrer&&(t.headers||(t.headers={}),t.headers.Referer=H.referrer),t}},_resetBackoff:function(){this._backoffDuration=0,this._backoffStart=null},_shouldBackoff:function(){return this._backoffDuration&&V()-this._backoffStart<this._backoffDuration},_isRepeatData:function(t){var e=this._lastData;return!(!e||t.message!==e.message||t.transaction!==e.transaction)&&(t.stacktrace||e.stacktrace?I(t.stacktrace,e.stacktrace):!t.exception&&!e.exception||O(t.exception,e.exception))},_setBackoffState:function(t){if(!this._shouldBackoff()){var e=t.status;if(400===e||401===e||429===e){var n;try{n=D()?t.headers.get("Retry-After"):t.getResponseHeader("Retry-After"),n=1e3*parseInt(n,10)}catch(t){}this._backoffDuration=n||2*this._backoffDuration||1e3,this._backoffStart=V()}}},_send:function(t){var e=this._globalOptions,n={project:this._globalProject,logger:e.logger,platform:"javascript"},i=this._getHttpData();i&&(n.request=i),t.trimHeadFrames&&delete t.trimHeadFrames,(t=_(n,t)).tags=_(_({},this._globalContext.tags),t.tags),t.extra=_(_({},this._globalContext.extra),t.extra),t.extra["session:duration"]=V()-this._startTime,this._breadcrumbs&&this._breadcrumbs.length>0&&(t.breadcrumbs={values:[].slice.call(this._breadcrumbs,0)}),this._globalContext.user&&(t.user=this._globalContext.user),e.environment&&(t.environment=e.environment),e.release&&(t.release=e.release),e.serverName&&(t.server_name=e.serverName),t=this._sanitizeData(t),Object.keys(t).forEach(function(e){(null==t[e]||""===t[e]||y(t[e]))&&delete t[e]}),g(e.dataCallback)&&(t=e.dataCallback(t)||t),t&&!y(t)&&(g(e.shouldSendCallback)&&!e.shouldSendCallback(t)||(this._shouldBackoff()?this._logDebug("warn","Raven dropped error due to backoff: ",t):"number"==typeof e.sampleRate?Math.random()<e.sampleRate&&this._sendProcessedPayload(t):this._sendProcessedPayload(t)))},_sanitizeData:function(t){return F(t,this._globalOptions.sanitizeKeys)},_getUuid:function(){return E()},_sendProcessedPayload:function(t,e){var n=this,i=this._globalOptions;if(this.isSetup())if(t=this._trimPacket(t),this._globalOptions.allowDuplicates||!this._isRepeatData(t)){this._lastEventId=t.event_id||(t.event_id=this._getUuid()),this._lastData=t,this._logDebug("debug","Raven about to send:",t);var r={sentry_version:"7",sentry_client:"raven-js/"+this.VERSION,sentry_key:this._globalKey};this._globalSecret&&(r.sentry_secret=this._globalSecret);var o=t.exception&&t.exception.values[0];this._globalOptions.autoBreadcrumbs&&this._globalOptions.autoBreadcrumbs.sentry&&this.captureBreadcrumb({category:"sentry",message:o?(o.type?o.type+": ":"")+o.value:t.message,event_id:t.event_id,level:t.level||"error"});var s=this._globalEndpoint;(i.transport||this._makeRequest).call(this,{url:s,auth:r,data:t,options:i,onSuccess:function(){n._resetBackoff(),n._triggerEvent("success",{data:t,src:s}),e&&e()},onError:function(i){n._logDebug("error","Raven transport failed to send: ",i),i.request&&n._setBackoffState(i.request),n._triggerEvent("failure",{data:t,src:s}),i=i||new Error("Raven send failed (no additional details provided)"),e&&e(i)}})}else this._logDebug("warn","Raven dropped repeat event: ",t)},_makeRequest:function(t){var e=t.url+"?"+k(t.auth),n=null,i={};if(t.options.headers&&(n=this._evaluateHash(t.options.headers)),t.options.fetchParameters&&(i=this._evaluateHash(t.options.fetchParameters)),D()){i.body=r(t.data);var o=_({},this._fetchDefaults),s=_(o,i);return n&&(s.headers=n),z.fetch(e,s).then(function(e){if(e.ok)t.onSuccess&&t.onSuccess();else{var n=new Error("Sentry error code: "+e.status);n.request=e,t.onError&&t.onError(n)}}).catch(function(){t.onError&&t.onError(new Error("Sentry error code: network unavailable"))})}var a=z.XMLHttpRequest&&new z.XMLHttpRequest;a&&("withCredentials"in a||"undefined"!=typeof XDomainRequest)&&("withCredentials"in a?a.onreadystatechange=function(){if(4===a.readyState)if(200===a.status)t.onSuccess&&t.onSuccess();else if(t.onError){var e=new Error("Sentry error code: "+a.status);e.request=a,t.onError(e)}}:(a=new XDomainRequest,e=e.replace(/^https?:/,""),t.onSuccess&&(a.onload=t.onSuccess),t.onError&&(a.onerror=function(){var e=new Error("Sentry error code: XDomainRequest");e.request=a,t.onError(e)})),a.open("POST",e),n&&b(n,function(t,e){a.setRequestHeader(t,e)}),a.send(r(t.data)))},_evaluateHash:function(t){var e={};for(var n in t)if(t.hasOwnProperty(n)){var i=t[n];e[n]="function"==typeof i?i():i}return e},_logDebug:function(t){this._originalConsoleMethods[t]&&(this.debug||this._globalOptions.debug)&&Function.prototype.apply.call(this._originalConsoleMethods[t],this._originalConsole,[].slice.call(arguments,1))},_mergeContext:function(t,e){f(e)?delete this._globalContext[t]:this._globalContext[t]=_(this._globalContext[t]||{},e)}}).setUser=X.prototype.setUserContext,X.prototype.setReleaseContext=X.prototype.setRelease,t.exports=X},v9aN:function(t,e){function n(t){this.name="RavenConfigError",this.message=t}(n.prototype=new Error).constructor=n,t.exports=n},vYjF:function(t,e,n){var i=n("BjAV"),r="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function o(t){return void 0===t}function s(t){return"[object Object]"===Object.prototype.toString.call(t)}function a(t){return"[object String]"===Object.prototype.toString.call(t)}function l(t){return"[object Array]"===Object.prototype.toString.call(t)}function u(){if(!("fetch"in r))return!1;try{return new Headers,new Request(""),new Response,!0}catch(t){return!1}}function c(t,e){var n,i;if(o(t.length))for(n in t)p(t,n)&&e.call(null,n,t[n]);else if(i=t.length)for(n=0;n<i;n++)e.call(null,n,t[n])}function h(t,e){if("number"!=typeof e)throw new Error("2nd argument to `truncate` function should be a number");return"string"!=typeof t||0===e?t:t.length<=e?t:t.substr(0,e)+"\u2026"}function p(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function d(t){for(var e,n=[],i=0,r=t.length;i<r;i++)a(e=t[i])?n.push(e.replace(/([.*+?^=!:${}()|\[\]\/\\])/g,"\\$1")):e&&e.source&&n.push(e.source);return new RegExp(n.join("|"),"i")}function f(t){var e,n,i,r,o,s=[];if(!t||!t.tagName)return"";if(s.push(t.tagName.toLowerCase()),t.id&&s.push("#"+t.id),(e=t.className)&&a(e))for(n=e.split(/\s+/),o=0;o<n.length;o++)s.push("."+n[o]);var l=["type","name","title","alt"];for(o=0;o<l.length;o++)(r=t.getAttribute(i=l[o]))&&s.push("["+i+'="'+r+'"]');return s.join("")}function g(t,e){return!!(!!t^!!e)}function m(t,e){if(g(t,e))return!1;var n,i,r=t.frames,o=e.frames;if(void 0===r||void 0===o)return!1;if(r.length!==o.length)return!1;for(var s=0;s<r.length;s++)if((n=r[s]).filename!==(i=o[s]).filename||n.lineno!==i.lineno||n.colno!==i.colno||n.function!==i.function)return!1;return!0}function v(t){if("string"==typeof t)return h(t,40);if("number"==typeof t||"boolean"==typeof t||void 0===t)return t;var e=Object.prototype.toString.call(t);return"[object Object]"===e?"[Object]":"[object Array]"===e?"[Array]":"[object Function]"===e?t.name?"[Function: "+t.name+"]":"[Function]":t}t.exports={isObject:function(t){return"object"==typeof t&&null!==t},isError:function(t){switch(Object.prototype.toString.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return t instanceof Error}},isErrorEvent:function(t){return"[object ErrorEvent]"===Object.prototype.toString.call(t)},isDOMError:function(t){return"[object DOMError]"===Object.prototype.toString.call(t)},isDOMException:function(t){return"[object DOMException]"===Object.prototype.toString.call(t)},isUndefined:o,isFunction:function(t){return"function"==typeof t},isPlainObject:s,isString:a,isArray:l,isEmptyObject:function(t){if(!s(t))return!1;for(var e in t)if(t.hasOwnProperty(e))return!1;return!0},supportsErrorEvent:function(){try{return new ErrorEvent(""),!0}catch(t){return!1}},supportsDOMError:function(){try{return new DOMError(""),!0}catch(t){return!1}},supportsDOMException:function(){try{return new DOMException(""),!0}catch(t){return!1}},supportsFetch:u,supportsReferrerPolicy:function(){if(!u())return!1;try{return new Request("pickleRick",{referrerPolicy:"origin"}),!0}catch(t){return!1}},supportsPromiseRejectionEvent:function(){return"function"==typeof PromiseRejectionEvent},wrappedCallback:function(t){return function(e,n){var i=t(e)||e;return n&&n(i)||i}},each:c,objectMerge:function(t,e){return e?(c(e,function(e,n){t[e]=n}),t):t},truncate:h,objectFrozen:function(t){return!!Object.isFrozen&&Object.isFrozen(t)},hasKey:p,joinRegExp:d,urlencode:function(t){var e=[];return c(t,function(t,n){e.push(encodeURIComponent(t)+"="+encodeURIComponent(n))}),e.join("&")},uuid4:function(){var t=r.crypto||r.msCrypto;if(!o(t)&&t.getRandomValues){var e=new Uint16Array(8);t.getRandomValues(e),e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;var n=function(t){for(var e=t.toString(16);e.length<4;)e="0"+e;return e};return n(e[0])+n(e[1])+n(e[2])+n(e[3])+n(e[4])+n(e[5])+n(e[6])+n(e[7])}return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)})},htmlTreeAsString:function(t){for(var e,n=[],i=0,r=0,o=" > ".length;t&&i++<5&&!("html"===(e=f(t))||i>1&&r+n.length*o+e.length>=80);)n.push(e),r+=e.length,t=t.parentNode;return n.reverse().join(" > ")},htmlElementAsString:f,isSameException:function(t,e){return!g(t,e)&&(t=t.values[0]).type===(e=e.values[0]).type&&t.value===e.value&&(n=e.stacktrace,(!o(t.stacktrace)||!o(n))&&m(t.stacktrace,e.stacktrace));var n},isSameStacktrace:m,parseUrl:function(t){if("string"!=typeof t)return{};var e=t.match(/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);return{protocol:e[2],host:e[4],path:e[5],relative:e[5]+(e[6]||"")+(e[8]||"")}},fill:function(t,e,n,i){if(null!=t){var r=t[e];t[e]=n(r),t[e].__raven__=!0,t[e].__orig__=r,i&&i.push([t,e,r])}},safeJoin:function(t,e){if(!l(t))return"";for(var n=[],i=0;i<t.length;i++)try{n.push(String(t[i]))}catch(t){n.push("[value cannot be serialized]")}return n.join(e)},serializeException:function t(e,n,r){if(!s(e))return e;r="number"!=typeof(n="number"!=typeof n?3:n)?51200:r;var o,a=function t(e,n){return 0===n?v(e):s(e)?Object.keys(e).reduce(function(i,r){return i[r]=t(e[r],n-1),i},{}):Array.isArray(e)?e.map(function(e){return t(e,n-1)}):v(e)}(e,n);return o=i(a),function(t){return~-encodeURI(t).split(/%..|./).length}(JSON.stringify(o))>r?t(e,n-1):a},serializeKeysForMessage:function(t,e){if("number"==typeof t||"string"==typeof t)return t.toString();if(!Array.isArray(t))return"";if(0===(t=t.filter(function(t){return"string"==typeof t})).length)return"[object has no keys]";if(t[0].length>=(e="number"!=typeof e?40:e))return t[0];for(var n=t.length;n>0;n--){var i=t.slice(0,n).join(", ");if(!(i.length>e))return n===t.length?i:i+"\u2026"}return""},sanitize:function(t,e){if(!l(e)||l(e)&&0===e.length)return t;var n,r=d(e);try{n=JSON.parse(i(t))}catch(e){return t}return function t(e){return l(e)?e.map(function(e){return t(e)}):s(e)?Object.keys(e).reduce(function(n,i){return n[i]=r.test(i)?"********":t(e[i]),n},{}):e}(n)}}},yLV6:function(t,e,n){var i;!function(r,o,s,a){"use strict";var l,u=["","webkit","Moz","MS","ms","o"],c=o.createElement("div"),h="function",p=Math.round,d=Math.abs,f=Date.now;function g(t,e,n){return setTimeout(x(t,n),e)}function m(t,e,n){return!!Array.isArray(t)&&(v(t,n[e],n),!0)}function v(t,e,n){var i;if(t)if(t.forEach)t.forEach(e,n);else if(t.length!==a)for(i=0;i<t.length;)e.call(n,t[i],i,t),i++;else for(i in t)t.hasOwnProperty(i)&&e.call(n,t[i],i,t)}function y(t,e,n){var i="DEPRECATED METHOD: "+e+"\n"+n+" AT \n";return function(){var e=new Error("get-stack-trace"),n=e&&e.stack?e.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=r.console&&(r.console.warn||r.console.log);return o&&o.call(r.console,i,n),t.apply(this,arguments)}}l="function"!=typeof Object.assign?function(t){if(t===a||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),n=1;n<arguments.length;n++){var i=arguments[n];if(i!==a&&null!==i)for(var r in i)i.hasOwnProperty(r)&&(e[r]=i[r])}return e}:Object.assign;var b=y(function(t,e,n){for(var i=Object.keys(e),r=0;r<i.length;)(!n||n&&t[i[r]]===a)&&(t[i[r]]=e[i[r]]),r++;return t},"extend","Use `assign`."),_=y(function(t,e){return b(t,e,!0)},"merge","Use `assign`.");function w(t,e,n){var i,r=e.prototype;(i=t.prototype=Object.create(r)).constructor=t,i._super=r,n&&l(i,n)}function x(t,e){return function(){return t.apply(e,arguments)}}function C(t,e){return typeof t==h?t.apply(e&&e[0]||a,e):t}function S(t,e){return t===a?e:t}function k(t,e,n){v(I(e),function(e){t.addEventListener(e,n,!1)})}function E(t,e,n){v(I(e),function(e){t.removeEventListener(e,n,!1)})}function T(t,e){for(;t;){if(t==e)return!0;t=t.parentNode}return!1}function O(t,e){return t.indexOf(e)>-1}function I(t){return t.trim().split(/\s+/g)}function A(t,e,n){if(t.indexOf&&!n)return t.indexOf(e);for(var i=0;i<t.length;){if(n&&t[i][n]==e||!n&&t[i]===e)return i;i++}return-1}function P(t){return Array.prototype.slice.call(t,0)}function D(t,e,n){for(var i=[],r=[],o=0;o<t.length;){var s=e?t[o][e]:t[o];A(r,s)<0&&i.push(t[o]),r[o]=s,o++}return n&&(i=e?i.sort(function(t,n){return t[e]>n[e]}):i.sort()),i}function j(t,e){for(var n,i,r=e[0].toUpperCase()+e.slice(1),o=0;o<u.length;){if((i=(n=u[o])?n+r:e)in t)return i;o++}return a}var M=1;function R(t){var e=t.ownerDocument||t;return e.defaultView||e.parentWindow||r}var F="ontouchstart"in r,N=j(r,"PointerEvent")!==a,L=F&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),B=25,V=1,z=4,H=8,W=1,U=2,X=4,Y=8,q=16,G=U|X,K=Y|q,Z=G|K,Q=["x","y"],J=["clientX","clientY"];function $(t,e){var n=this;this.manager=t,this.callback=e,this.element=t.element,this.target=t.options.inputTarget,this.domHandler=function(e){C(t.options.enable,[t])&&n.handler(e)},this.init()}function tt(t,e,n){var i=n.pointers.length,r=n.changedPointers.length,o=e&V&&i-r==0,s=e&(z|H)&&i-r==0;n.isFirst=!!o,n.isFinal=!!s,o&&(t.session={}),n.eventType=e,function(t,e){var n=t.session,i=e.pointers,r=i.length;n.firstInput||(n.firstInput=et(e)),r>1&&!n.firstMultiple?n.firstMultiple=et(e):1===r&&(n.firstMultiple=!1);var o=n.firstInput,s=n.firstMultiple,l=s?s.center:o.center,u=e.center=nt(i);e.timeStamp=f(),e.deltaTime=e.timeStamp-o.timeStamp,e.angle=st(l,u),e.distance=ot(l,u),function(t,e){var n=e.center,i=t.offsetDelta||{},r=t.prevDelta||{},o=t.prevInput||{};e.eventType!==V&&o.eventType!==z||(r=t.prevDelta={x:o.deltaX||0,y:o.deltaY||0},i=t.offsetDelta={x:n.x,y:n.y}),e.deltaX=r.x+(n.x-i.x),e.deltaY=r.y+(n.y-i.y)}(n,e),e.offsetDirection=rt(e.deltaX,e.deltaY);var c,h,p=it(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=p.x,e.overallVelocityY=p.y,e.overallVelocity=d(p.x)>d(p.y)?p.x:p.y,e.scale=s?(c=s.pointers,ot((h=i)[0],h[1],J)/ot(c[0],c[1],J)):1,e.rotation=s?function(t,e){return st(i[1],i[0],J)+st(t[1],t[0],J)}(s.pointers):0,e.maxPointers=n.prevInput?e.pointers.length>n.prevInput.maxPointers?e.pointers.length:n.prevInput.maxPointers:e.pointers.length,function(t,e){var n,i,r,o,s=t.lastInterval||e,l=e.timeStamp-s.timeStamp;if(e.eventType!=H&&(l>B||s.velocity===a)){var u=e.deltaX-s.deltaX,c=e.deltaY-s.deltaY,h=it(l,u,c);i=h.x,r=h.y,n=d(h.x)>d(h.y)?h.x:h.y,o=rt(u,c),t.lastInterval=e}else n=s.velocity,i=s.velocityX,r=s.velocityY,o=s.direction;e.velocity=n,e.velocityX=i,e.velocityY=r,e.direction=o}(n,e);var g=t.element;T(e.srcEvent.target,g)&&(g=e.srcEvent.target),e.target=g}(t,n),t.emit("hammer.input",n),t.recognize(n),t.session.prevInput=n}function et(t){for(var e=[],n=0;n<t.pointers.length;)e[n]={clientX:p(t.pointers[n].clientX),clientY:p(t.pointers[n].clientY)},n++;return{timeStamp:f(),pointers:e,center:nt(e),deltaX:t.deltaX,deltaY:t.deltaY}}function nt(t){var e=t.length;if(1===e)return{x:p(t[0].clientX),y:p(t[0].clientY)};for(var n=0,i=0,r=0;r<e;)n+=t[r].clientX,i+=t[r].clientY,r++;return{x:p(n/e),y:p(i/e)}}function it(t,e,n){return{x:e/t||0,y:n/t||0}}function rt(t,e){return t===e?W:d(t)>=d(e)?t<0?U:X:e<0?Y:q}function ot(t,e,n){n||(n=Q);var i=e[n[0]]-t[n[0]],r=e[n[1]]-t[n[1]];return Math.sqrt(i*i+r*r)}function st(t,e,n){return n||(n=Q),180*Math.atan2(e[n[1]]-t[n[1]],e[n[0]]-t[n[0]])/Math.PI}$.prototype={handler:function(){},init:function(){this.evEl&&k(this.element,this.evEl,this.domHandler),this.evTarget&&k(this.target,this.evTarget,this.domHandler),this.evWin&&k(R(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&E(this.element,this.evEl,this.domHandler),this.evTarget&&E(this.target,this.evTarget,this.domHandler),this.evWin&&E(R(this.element),this.evWin,this.domHandler)}};var at={mousedown:V,mousemove:2,mouseup:z},lt="mousedown",ut="mousemove mouseup";function ct(){this.evEl=lt,this.evWin=ut,this.pressed=!1,$.apply(this,arguments)}w(ct,$,{handler:function(t){var e=at[t.type];e&V&&0===t.button&&(this.pressed=!0),2&e&&1!==t.which&&(e=z),this.pressed&&(e&z&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:"mouse",srcEvent:t}))}});var ht={pointerdown:V,pointermove:2,pointerup:z,pointercancel:H,pointerout:H},pt={2:"touch",3:"pen",4:"mouse",5:"kinect"},dt="pointerdown",ft="pointermove pointerup pointercancel";function gt(){this.evEl=dt,this.evWin=ft,$.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}r.MSPointerEvent&&!r.PointerEvent&&(dt="MSPointerDown",ft="MSPointerMove MSPointerUp MSPointerCancel"),w(gt,$,{handler:function(t){var e=this.store,n=!1,i=t.type.toLowerCase().replace("ms",""),r=ht[i],o=pt[t.pointerType]||t.pointerType,s="touch"==o,a=A(e,t.pointerId,"pointerId");r&V&&(0===t.button||s)?a<0&&(e.push(t),a=e.length-1):r&(z|H)&&(n=!0),a<0||(e[a]=t,this.callback(this.manager,r,{pointers:e,changedPointers:[t],pointerType:o,srcEvent:t}),n&&e.splice(a,1))}});var mt={touchstart:V,touchmove:2,touchend:z,touchcancel:H},vt="touchstart",yt="touchstart touchmove touchend touchcancel";function bt(){this.evTarget=vt,this.evWin=yt,this.started=!1,$.apply(this,arguments)}w(bt,$,{handler:function(t){var e=mt[t.type];if(e===V&&(this.started=!0),this.started){var n=(function(t,e){var n=P(t.touches),i=P(t.changedTouches);return e&(z|H)&&(n=D(n.concat(i),"identifier",!0)),[n,i]}).call(this,t,e);e&(z|H)&&n[0].length-n[1].length==0&&(this.started=!1),this.callback(this.manager,e,{pointers:n[0],changedPointers:n[1],pointerType:"touch",srcEvent:t})}}});var _t={touchstart:V,touchmove:2,touchend:z,touchcancel:H},wt="touchstart touchmove touchend touchcancel";function xt(){this.evTarget=wt,this.targetIds={},$.apply(this,arguments)}w(xt,$,{handler:function(t){var e=_t[t.type],n=(function(t,e){var n=P(t.touches),i=this.targetIds;if(e&(2|V)&&1===n.length)return i[n[0].identifier]=!0,[n,n];var r,o,s=P(t.changedTouches),a=[],l=this.target;if(o=n.filter(function(t){return T(t.target,l)}),e===V)for(r=0;r<o.length;)i[o[r].identifier]=!0,r++;for(r=0;r<s.length;)i[s[r].identifier]&&a.push(s[r]),e&(z|H)&&delete i[s[r].identifier],r++;return a.length?[D(o.concat(a),"identifier",!0),a]:void 0}).call(this,t,e);n&&this.callback(this.manager,e,{pointers:n[0],changedPointers:n[1],pointerType:"touch",srcEvent:t})}});var Ct=2500;function St(){$.apply(this,arguments);var t=x(this.handler,this);this.touch=new xt(this.manager,t),this.mouse=new ct(this.manager,t),this.primaryTouch=null,this.lastTouches=[]}function kt(t){var e=t.changedPointers[0];if(e.identifier===this.primaryTouch){var n={x:e.clientX,y:e.clientY};this.lastTouches.push(n);var i=this.lastTouches;setTimeout(function(){var t=i.indexOf(n);t>-1&&i.splice(t,1)},Ct)}}w(St,$,{handler:function(t,e,n){var i="mouse"==n.pointerType;if(!(i&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if("touch"==n.pointerType)(function(t,e){t&V?(this.primaryTouch=e.changedPointers[0].identifier,kt.call(this,e)):t&(z|H)&&kt.call(this,e)}).call(this,e,n);else if(i&&(function(t){for(var e=t.srcEvent.clientX,n=t.srcEvent.clientY,i=0;i<this.lastTouches.length;i++){var r=this.lastTouches[i],o=Math.abs(e-r.x),s=Math.abs(n-r.y);if(o<=25&&s<=25)return!0}return!1}).call(this,n))return;this.callback(t,e,n)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var Et=j(c.style,"touchAction"),Tt=Et!==a,Ot=function(){if(!Tt)return!1;var t={},e=r.CSS&&r.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(n){t[n]=!e||r.CSS.supports("touch-action",n)}),t}();function It(t,e){this.manager=t,this.set(e)}It.prototype={set:function(t){"compute"==t&&(t=this.compute()),Tt&&this.manager.element.style&&Ot[t]&&(this.manager.element.style[Et]=t),this.actions=t.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var t=[];return v(this.manager.recognizers,function(e){C(e.options.enable,[e])&&(t=t.concat(e.getTouchAction()))}),function(t){if(O(t,"none"))return"none";var e=O(t,"pan-x"),n=O(t,"pan-y");return e&&n?"none":e||n?e?"pan-x":"pan-y":O(t,"manipulation")?"manipulation":"auto"}(t.join(" "))},preventDefaults:function(t){var e=t.srcEvent,n=t.offsetDirection;if(this.manager.session.prevented)e.preventDefault();else{var i=this.actions,r=O(i,"none")&&!Ot.none,o=O(i,"pan-y")&&!Ot["pan-y"],s=O(i,"pan-x")&&!Ot["pan-x"];if(r&&1===t.pointers.length&&t.distance<2&&t.deltaTime<250)return;if(!s||!o)return r||o&&n&G||s&&n&K?this.preventSrc(e):void 0}},preventSrc:function(t){this.manager.session.prevented=!0,t.preventDefault()}};var At=1,Pt=2,Dt=4,jt=8,Mt=jt,Rt=16;function Ft(t){this.options=l({},this.defaults,t||{}),this.id=M++,this.manager=null,this.options.enable=S(this.options.enable,!0),this.state=At,this.simultaneous={},this.requireFail=[]}function Nt(t){return t&Rt?"cancel":t&jt?"end":t&Dt?"move":t&Pt?"start":""}function Lt(t){return t==q?"down":t==Y?"up":t==U?"left":t==X?"right":""}function Bt(t,e){var n=e.manager;return n?n.get(t):t}function Vt(){Ft.apply(this,arguments)}function zt(){Vt.apply(this,arguments),this.pX=null,this.pY=null}function Ht(){Vt.apply(this,arguments)}function Wt(){Ft.apply(this,arguments),this._timer=null,this._input=null}function Ut(){Vt.apply(this,arguments)}function Xt(){Vt.apply(this,arguments)}function Yt(){Ft.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function qt(t,e){return(e=e||{}).recognizers=S(e.recognizers,qt.defaults.preset),new Gt(t,e)}function Gt(t,e){var n;this.options=l({},qt.defaults,e||{}),this.options.inputTarget=this.options.inputTarget||t,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=t,this.input=new((n=this).options.inputClass||(N?gt:L?xt:F?St:ct))(n,tt),this.touchAction=new It(this,this.options.touchAction),Kt(this,!0),v(this.options.recognizers,function(t){var e=this.add(new t[0](t[1]));t[2]&&e.recognizeWith(t[2]),t[3]&&e.requireFailure(t[3])},this)}function Kt(t,e){var n,i=t.element;i.style&&(v(t.options.cssProps,function(r,o){n=j(i.style,o),e?(t.oldCssProps[n]=i.style[n],i.style[n]=r):i.style[n]=t.oldCssProps[n]||""}),e||(t.oldCssProps={}))}Ft.prototype={defaults:{},set:function(t){return l(this.options,t),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(t){if(m(t,"recognizeWith",this))return this;var e=this.simultaneous;return e[(t=Bt(t,this)).id]||(e[t.id]=t,t.recognizeWith(this)),this},dropRecognizeWith:function(t){return m(t,"dropRecognizeWith",this)?this:(t=Bt(t,this),delete this.simultaneous[t.id],this)},requireFailure:function(t){if(m(t,"requireFailure",this))return this;var e=this.requireFail;return-1===A(e,t=Bt(t,this))&&(e.push(t),t.requireFailure(this)),this},dropRequireFailure:function(t){if(m(t,"dropRequireFailure",this))return this;t=Bt(t,this);var e=A(this.requireFail,t);return e>-1&&this.requireFail.splice(e,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(t){return!!this.simultaneous[t.id]},emit:function(t){var e=this,n=this.state;function i(n){e.manager.emit(n,t)}n<jt&&i(e.options.event+Nt(n)),i(e.options.event),t.additionalEvent&&i(t.additionalEvent),n>=jt&&i(e.options.event+Nt(n))},tryEmit:function(t){if(this.canEmit())return this.emit(t);this.state=32},canEmit:function(){for(var t=0;t<this.requireFail.length;){if(!(this.requireFail[t].state&(32|At)))return!1;t++}return!0},recognize:function(t){var e=l({},t);if(!C(this.options.enable,[this,e]))return this.reset(),void(this.state=32);this.state&(Mt|Rt|32)&&(this.state=At),this.state=this.process(e),this.state&(Pt|Dt|jt|Rt)&&this.tryEmit(e)},process:function(t){},getTouchAction:function(){},reset:function(){}},w(Vt,Ft,{defaults:{pointers:1},attrTest:function(t){var e=this.options.pointers;return 0===e||t.pointers.length===e},process:function(t){var e=this.state,n=t.eventType,i=e&(Pt|Dt),r=this.attrTest(t);return i&&(n&H||!r)?e|Rt:i||r?n&z?e|jt:e&Pt?e|Dt:Pt:32}}),w(zt,Vt,{defaults:{event:"pan",threshold:10,pointers:1,direction:Z},getTouchAction:function(){var t=this.options.direction,e=[];return t&G&&e.push("pan-y"),t&K&&e.push("pan-x"),e},directionTest:function(t){var e=this.options,n=!0,i=t.distance,r=t.direction,o=t.deltaX,s=t.deltaY;return r&e.direction||(e.direction&G?(r=0===o?W:o<0?U:X,n=o!=this.pX,i=Math.abs(t.deltaX)):(r=0===s?W:s<0?Y:q,n=s!=this.pY,i=Math.abs(t.deltaY))),t.direction=r,n&&i>e.threshold&&r&e.direction},attrTest:function(t){return Vt.prototype.attrTest.call(this,t)&&(this.state&Pt||!(this.state&Pt)&&this.directionTest(t))},emit:function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=Lt(t.direction);e&&(t.additionalEvent=this.options.event+e),this._super.emit.call(this,t)}}),w(Ht,Vt,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return["none"]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||this.state&Pt)},emit:function(t){1!==t.scale&&(t.additionalEvent=this.options.event+(t.scale<1?"in":"out")),this._super.emit.call(this,t)}}),w(Wt,Ft,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return["auto"]},process:function(t){var e=this.options,n=t.pointers.length===e.pointers,i=t.distance<e.threshold,r=t.deltaTime>e.time;if(this._input=t,!i||!n||t.eventType&(z|H)&&!r)this.reset();else if(t.eventType&V)this.reset(),this._timer=g(function(){this.state=Mt,this.tryEmit()},e.time,this);else if(t.eventType&z)return Mt;return 32},reset:function(){clearTimeout(this._timer)},emit:function(t){this.state===Mt&&(t&&t.eventType&z?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=f(),this.manager.emit(this.options.event,this._input)))}}),w(Ut,Vt,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return["none"]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||this.state&Pt)}}),w(Xt,Vt,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:G|K,pointers:1},getTouchAction:function(){return zt.prototype.getTouchAction.call(this)},attrTest:function(t){var e,n=this.options.direction;return n&(G|K)?e=t.overallVelocity:n&G?e=t.overallVelocityX:n&K&&(e=t.overallVelocityY),this._super.attrTest.call(this,t)&&n&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers==this.options.pointers&&d(e)>this.options.velocity&&t.eventType&z},emit:function(t){var e=Lt(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)}}),w(Yt,Ft,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return["manipulation"]},process:function(t){var e=this.options,n=t.pointers.length===e.pointers,i=t.distance<e.threshold,r=t.deltaTime<e.time;if(this.reset(),t.eventType&V&&0===this.count)return this.failTimeout();if(i&&r&&n){if(t.eventType!=z)return this.failTimeout();var o=!this.pTime||t.timeStamp-this.pTime<e.interval,s=!this.pCenter||ot(this.pCenter,t.center)<e.posThreshold;if(this.pTime=t.timeStamp,this.pCenter=t.center,s&&o?this.count+=1:this.count=1,this._input=t,0==this.count%e.taps)return this.hasRequireFailures()?(this._timer=g(function(){this.state=Mt,this.tryEmit()},e.interval,this),Pt):Mt}return 32},failTimeout:function(){return this._timer=g(function(){this.state=32},this.options.interval,this),32},reset:function(){clearTimeout(this._timer)},emit:function(){this.state==Mt&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}}),qt.VERSION="2.0.7",qt.defaults={domEvents:!1,touchAction:"compute",enable:!0,inputTarget:null,inputClass:null,preset:[[Ut,{enable:!1}],[Ht,{enable:!1},["rotate"]],[Xt,{direction:G}],[zt,{direction:G},["swipe"]],[Yt],[Yt,{event:"doubletap",taps:2},["tap"]],[Wt]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},Gt.prototype={set:function(t){return l(this.options,t),t.touchAction&&this.touchAction.update(),t.inputTarget&&(this.input.destroy(),this.input.target=t.inputTarget,this.input.init()),this},stop:function(t){this.session.stopped=t?2:1},recognize:function(t){var e=this.session;if(!e.stopped){var n;this.touchAction.preventDefaults(t);var i=this.recognizers,r=e.curRecognizer;(!r||r&&r.state&Mt)&&(r=e.curRecognizer=null);for(var o=0;o<i.length;)n=i[o],2===e.stopped||r&&n!=r&&!n.canRecognizeWith(r)?n.reset():n.recognize(t),!r&&n.state&(Pt|Dt|jt)&&(r=e.curRecognizer=n),o++}},get:function(t){if(t instanceof Ft)return t;for(var e=this.recognizers,n=0;n<e.length;n++)if(e[n].options.event==t)return e[n];return null},add:function(t){if(m(t,"add",this))return this;var e=this.get(t.options.event);return e&&this.remove(e),this.recognizers.push(t),t.manager=this,this.touchAction.update(),t},remove:function(t){if(m(t,"remove",this))return this;if(t=this.get(t)){var e=this.recognizers,n=A(e,t);-1!==n&&(e.splice(n,1),this.touchAction.update())}return this},on:function(t,e){if(t!==a&&e!==a){var n=this.handlers;return v(I(t),function(t){n[t]=n[t]||[],n[t].push(e)}),this}},off:function(t,e){if(t!==a){var n=this.handlers;return v(I(t),function(t){e?n[t]&&n[t].splice(A(n[t],e),1):delete n[t]}),this}},emit:function(t,e){this.options.domEvents&&function(t,e){var n=o.createEvent("Event");n.initEvent(t,!0,!0),n.gesture=e,e.target.dispatchEvent(n)}(t,e);var n=this.handlers[t]&&this.handlers[t].slice();if(n&&n.length){e.type=t,e.preventDefault=function(){e.srcEvent.preventDefault()};for(var i=0;i<n.length;)n[i](e),i++}},destroy:function(){this.element&&Kt(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},l(qt,{INPUT_START:V,INPUT_MOVE:2,INPUT_END:z,INPUT_CANCEL:H,STATE_POSSIBLE:At,STATE_BEGAN:Pt,STATE_CHANGED:Dt,STATE_ENDED:jt,STATE_RECOGNIZED:Mt,STATE_CANCELLED:Rt,STATE_FAILED:32,DIRECTION_NONE:W,DIRECTION_LEFT:U,DIRECTION_RIGHT:X,DIRECTION_UP:Y,DIRECTION_DOWN:q,DIRECTION_HORIZONTAL:G,DIRECTION_VERTICAL:K,DIRECTION_ALL:Z,Manager:Gt,Input:$,TouchAction:It,TouchInput:xt,MouseInput:ct,PointerEventInput:gt,TouchMouseInput:St,SingleTouchInput:bt,Recognizer:Ft,AttrRecognizer:Vt,Tap:Yt,Pan:zt,Swipe:Xt,Pinch:Ht,Rotate:Ut,Press:Wt,on:k,off:E,each:v,merge:_,extend:b,assign:l,inherit:w,bindFn:x,prefixed:j}),(void 0!==r?r:"undefined"!=typeof self?self:{}).Hammer=qt,(i=(function(){return qt}).call(e,n,e,t))===a||(t.exports=i)}(window,document)},zUnb:function(t,e,n){"use strict";n.r(e);var i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function r(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var o=function(){return(o=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function s(t,e,n,i){var r,o=arguments.length,s=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o<3?r(s):o>3?r(e,n,s):r(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s}function a(t,e){return function(n,i){e(n,i,t)}}function l(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function u(t){var e="function"==typeof Symbol&&t[Symbol.iterator],n=0;return e?e.call(t):{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}}function c(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var i,r,o=n.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(i=o.next()).done;)s.push(i.value)}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return s}function h(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(c(arguments[e]));return t}function p(t){return"function"==typeof t}var d=!1,f={Promise:void 0,set useDeprecatedSynchronousErrorHandling(t){d=t},get useDeprecatedSynchronousErrorHandling(){return d}};function g(t){setTimeout(function(){throw t})}var m={closed:!0,next:function(t){},error:function(t){if(f.useDeprecatedSynchronousErrorHandling)throw t;g(t)},complete:function(){}},v=Array.isArray||function(t){return t&&"number"==typeof t.length};function y(t){return null!=t&&"object"==typeof t}var b,_={e:{}};function w(){try{return b.apply(this,arguments)}catch(t){return _.e=t,_}}function x(t){return b=t,w}function C(t){return Error.call(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map(function(t,e){return e+1+") "+t.toString()}).join("\n "):"",this.name="UnsubscriptionError",this.errors=t,this}C.prototype=Object.create(Error.prototype);var S=C,k=function(){function t(t){this.closed=!1,this._parent=null,this._parents=null,this._subscriptions=null,t&&(this._unsubscribe=t)}var e;return t.prototype.unsubscribe=function(){var t,e=!1;if(!this.closed){var n=this._parent,i=this._parents,r=this._unsubscribe,o=this._subscriptions;this.closed=!0,this._parent=null,this._parents=null,this._subscriptions=null;for(var s=-1,a=i?i.length:0;n;)n.remove(this),n=++s<a&&i[s]||null;if(p(r)&&x(r).call(this)===_&&(e=!0,t=t||(_.e instanceof S?E(_.e.errors):[_.e])),v(o))for(s=-1,a=o.length;++s<a;){var l=o[s];if(y(l)&&x(l.unsubscribe).call(l)===_){e=!0,t=t||[];var u=_.e;u instanceof S?t=t.concat(E(u.errors)):t.push(u)}}if(e)throw new S(t)}},t.prototype.add=function(e){if(!e||e===t.EMPTY)return t.EMPTY;if(e===this)return this;var n=e;switch(typeof e){case"function":n=new t(e);case"object":if(n.closed||"function"!=typeof n.unsubscribe)return n;if(this.closed)return n.unsubscribe(),n;if("function"!=typeof n._addParent){var i=n;(n=new t)._subscriptions=[i]}break;default:throw new Error("unrecognized teardown "+e+" added to Subscription.")}return(this._subscriptions||(this._subscriptions=[])).push(n),n._addParent(this),n},t.prototype.remove=function(t){var e=this._subscriptions;if(e){var n=e.indexOf(t);-1!==n&&e.splice(n,1)}},t.prototype._addParent=function(t){var e=this._parent,n=this._parents;e&&e!==t?n?-1===n.indexOf(t)&&n.push(t):this._parents=[t]:this._parent=t},t.EMPTY=((e=new t).closed=!0,e),t}();function E(t){return t.reduce(function(t,e){return t.concat(e instanceof S?e.errors:e)},[])}var T="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random(),O=function(t){function e(n,i,r){var o=t.call(this)||this;switch(o.syncErrorValue=null,o.syncErrorThrown=!1,o.syncErrorThrowable=!1,o.isStopped=!1,o._parentSubscription=null,arguments.length){case 0:o.destination=m;break;case 1:if(!n){o.destination=m;break}if("object"==typeof n){n instanceof e?(o.syncErrorThrowable=n.syncErrorThrowable,o.destination=n,n.add(o)):(o.syncErrorThrowable=!0,o.destination=new I(o,n));break}default:o.syncErrorThrowable=!0,o.destination=new I(o,n,i,r)}return o}return r(e,t),e.prototype[T]=function(){return this},e.create=function(t,n,i){var r=new e(t,n,i);return r.syncErrorThrowable=!1,r},e.prototype.next=function(t){this.isStopped||this._next(t)},e.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this))},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){this.destination.error(t),this.unsubscribe()},e.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},e.prototype._unsubscribeAndRecycle=function(){var t=this._parent,e=this._parents;return this._parent=null,this._parents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parent=t,this._parents=e,this._parentSubscription=null,this},e}(k),I=function(t){function e(e,n,i,r){var o,s=t.call(this)||this;s._parentSubscriber=e;var a=s;return p(n)?o=n:n&&(o=n.next,i=n.error,r=n.complete,n!==m&&(p((a=Object.create(n)).unsubscribe)&&s.add(a.unsubscribe.bind(a)),a.unsubscribe=s.unsubscribe.bind(s))),s._context=a,s._next=o,s._error=i,s._complete=r,s}return r(e,t),e.prototype.next=function(t){if(!this.isStopped&&this._next){var e=this._parentSubscriber;f.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?this.__tryOrSetError(e,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t)}},e.prototype.error=function(t){if(!this.isStopped){var e=this._parentSubscriber,n=f.useDeprecatedSynchronousErrorHandling;if(this._error)n&&e.syncErrorThrowable?(this.__tryOrSetError(e,this._error,t),this.unsubscribe()):(this.__tryOrUnsub(this._error,t),this.unsubscribe());else if(e.syncErrorThrowable)n?(e.syncErrorValue=t,e.syncErrorThrown=!0):g(t),this.unsubscribe();else{if(this.unsubscribe(),n)throw t;g(t)}}},e.prototype.complete=function(){var t=this;if(!this.isStopped){var e=this._parentSubscriber;if(this._complete){var n=function(){return t._complete.call(t._context)};f.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?(this.__tryOrSetError(e,n),this.unsubscribe()):(this.__tryOrUnsub(n),this.unsubscribe())}else this.unsubscribe()}},e.prototype.__tryOrUnsub=function(t,e){try{t.call(this._context,e)}catch(t){if(this.unsubscribe(),f.useDeprecatedSynchronousErrorHandling)throw t;g(t)}},e.prototype.__tryOrSetError=function(t,e,n){if(!f.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{e.call(this._context,n)}catch(e){return f.useDeprecatedSynchronousErrorHandling?(t.syncErrorValue=e,t.syncErrorThrown=!0,!0):(g(e),!0)}return!1},e.prototype._unsubscribe=function(){var t=this._parentSubscriber;this._context=null,this._parentSubscriber=null,t.unsubscribe()},e}(O),A="function"==typeof Symbol&&Symbol.observable||"@@observable";function P(){}var D=function(){function t(t){this._isScalar=!1,t&&(this._subscribe=t)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(t,e,n){var i=this.operator,r=function(t,e,n){if(t){if(t instanceof O)return t;if(t[T])return t[T]()}return t||e||n?new O(t,e,n):new O(m)}(t,e,n);if(i?i.call(r,this.source):r.add(this.source||f.useDeprecatedSynchronousErrorHandling&&!r.syncErrorThrowable?this._subscribe(r):this._trySubscribe(r)),f.useDeprecatedSynchronousErrorHandling&&r.syncErrorThrowable&&(r.syncErrorThrowable=!1,r.syncErrorThrown))throw r.syncErrorValue;return r},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){f.useDeprecatedSynchronousErrorHandling&&(t.syncErrorThrown=!0,t.syncErrorValue=e),function(t){for(;t;){var e=t.destination;if(t.closed||t.isStopped)return!1;t=e&&e instanceof O?e:null}return!0}(t)?t.error(e):console.warn(e)}},t.prototype.forEach=function(t,e){var n=this;return new(e=j(e))(function(e,i){var r;r=n.subscribe(function(e){try{t(e)}catch(t){i(t),r&&r.unsubscribe()}},i,e)})},t.prototype._subscribe=function(t){var e=this.source;return e&&e.subscribe(t)},t.prototype[A]=function(){return this},t.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 0===t.length?this:((n=t)?1===n.length?n[0]:function(t){return n.reduce(function(t,e){return e(t)},t)}:P)(this);var n},t.prototype.toPromise=function(t){var e=this;return new(t=j(t))(function(t,n){var i;e.subscribe(function(t){return i=t},function(t){return n(t)},function(){return t(i)})})},t.create=function(e){return new t(e)},t}();function j(t){if(t||(t=f.Promise||Promise),!t)throw new Error("no Promise impl found");return t}function M(t){return t&&"function"==typeof t.schedule}var R=function(t){function e(e,n,i){var r=t.call(this)||this;return r.parent=e,r.outerValue=n,r.outerIndex=i,r.index=0,r}return r(e,t),e.prototype._next=function(t){this.parent.notifyNext(this.outerValue,t,this.outerIndex,this.index++,this)},e.prototype._error=function(t){this.parent.notifyError(t,this),this.unsubscribe()},e.prototype._complete=function(){this.parent.notifyComplete(this),this.unsubscribe()},e}(O),F=function(t){return function(e){for(var n=0,i=t.length;n<i&&!e.closed;n++)e.next(t[n]);e.closed||e.complete()}},N=function(t){return function(e){return t.then(function(t){e.closed||(e.next(t),e.complete())},function(t){return e.error(t)}).then(null,g),e}},L=function(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}(),B=function(t){return function(e){for(var n=t[L]();;){var i=n.next();if(i.done){e.complete();break}if(e.next(i.value),e.closed)break}return"function"==typeof n.return&&e.add(function(){n.return&&n.return()}),e}},V=function(t){return function(e){var n=t[A]();if("function"!=typeof n.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return n.subscribe(e)}},z=function(t){return t&&"number"==typeof t.length&&"function"!=typeof t};function H(t){return t&&"function"!=typeof t.subscribe&&"function"==typeof t.then}var W=function(t){if(t instanceof D)return function(e){return t._isScalar?(e.next(t.value),void e.complete()):t.subscribe(e)};if(t&&"function"==typeof t[A])return V(t);if(z(t))return F(t);if(H(t))return N(t);if(t&&"function"==typeof t[L])return B(t);var e=y(t)?"an invalid object":"'"+t+"'";throw new TypeError("You provided "+e+" where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.")};function U(t,e,n,i,r){if(void 0===r&&(r=new R(t,n,i)),!r.closed)return W(e)(r)}var X=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.notifyNext=function(t,e,n,i,r){this.destination.next(e)},e.prototype.notifyError=function(t,e){this.destination.error(t)},e.prototype.notifyComplete=function(t){this.destination.complete()},e}(O);function Y(t,e){return function(n){if("function"!=typeof t)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return n.lift(new q(t,e))}}var q=function(){function t(t,e){this.project=t,this.thisArg=e}return t.prototype.call=function(t,e){return e.subscribe(new G(t,this.project,this.thisArg))},t}(),G=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.project=n,r.count=0,r.thisArg=i||r,r}return r(e,t),e.prototype._next=function(t){var e;try{e=this.project.call(this.thisArg,t,this.count++)}catch(t){return void this.destination.error(t)}this.destination.next(e)},e}(O);function K(t,e){return new D(e?function(n){var i=new k,r=0;return i.add(e.schedule(function(){r!==t.length?(n.next(t[r++]),n.closed||i.add(this.schedule())):n.complete()})),i}:F(t))}function Z(t,e){if(!e)return t instanceof D?t:new D(W(t));if(null!=t){if(function(t){return t&&"function"==typeof t[A]}(t))return function(t,e){return new D(e?function(n){var i=new k;return i.add(e.schedule(function(){var r=t[A]();i.add(r.subscribe({next:function(t){i.add(e.schedule(function(){return n.next(t)}))},error:function(t){i.add(e.schedule(function(){return n.error(t)}))},complete:function(){i.add(e.schedule(function(){return n.complete()}))}}))})),i}:V(t))}(t,e);if(H(t))return function(t,e){return new D(e?function(n){var i=new k;return i.add(e.schedule(function(){return t.then(function(t){i.add(e.schedule(function(){n.next(t),i.add(e.schedule(function(){return n.complete()}))}))},function(t){i.add(e.schedule(function(){return n.error(t)}))})})),i}:N(t))}(t,e);if(z(t))return K(t,e);if(function(t){return t&&"function"==typeof t[L]}(t)||"string"==typeof t)return function(t,e){if(!t)throw new Error("Iterable cannot be null");return new D(e?function(n){var i,r=new k;return r.add(function(){i&&"function"==typeof i.return&&i.return()}),r.add(e.schedule(function(){i=t[L](),r.add(e.schedule(function(){if(!n.closed){var t,e;try{var r=i.next();t=r.value,e=r.done}catch(t){return void n.error(t)}e?n.complete():(n.next(t),this.schedule())}}))})),r}:B(t))}(t,e)}throw new TypeError((null!==t&&typeof t||t)+" is not observable")}function Q(t,e,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),"function"==typeof e?function(i){return i.pipe(Q(function(n,i){return Z(t(n,i)).pipe(Y(function(t,r){return e(n,t,i,r)}))},n))}:("number"==typeof e&&(n=e),function(e){return e.lift(new J(t,n))})}var J=function(){function t(t,e){void 0===e&&(e=Number.POSITIVE_INFINITY),this.project=t,this.concurrent=e}return t.prototype.call=function(t,e){return e.subscribe(new $(t,this.project,this.concurrent))},t}(),$=function(t){function e(e,n,i){void 0===i&&(i=Number.POSITIVE_INFINITY);var r=t.call(this,e)||this;return r.project=n,r.concurrent=i,r.hasCompleted=!1,r.buffer=[],r.active=0,r.index=0,r}return r(e,t),e.prototype._next=function(t){this.active<this.concurrent?this._tryNext(t):this.buffer.push(t)},e.prototype._tryNext=function(t){var e,n=this.index++;try{e=this.project(t,n)}catch(t){return void this.destination.error(t)}this.active++,this._innerSub(e,t,n)},e.prototype._innerSub=function(t,e,n){var i=new R(this,void 0,void 0);this.destination.add(i),U(this,t,e,n,i)},e.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&this.destination.complete(),this.unsubscribe()},e.prototype.notifyNext=function(t,e,n,i,r){this.destination.next(e)},e.prototype.notifyComplete=function(t){var e=this.buffer;this.remove(t),this.active--,e.length>0?this._next(e.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},e}(X);function tt(t){return t}function et(t){return void 0===t&&(t=Number.POSITIVE_INFINITY),Q(tt,t)}function nt(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Number.POSITIVE_INFINITY,i=null,r=t[t.length-1];return M(r)?(i=t.pop(),t.length>1&&"number"==typeof t[t.length-1]&&(n=t.pop())):"number"==typeof r&&(n=t.pop()),null===i&&1===t.length&&t[0]instanceof D?t[0]:et(n)(K(t,i))}function it(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}it.prototype=Object.create(Error.prototype);var rt=it,ot=function(t){function e(e,n){var i=t.call(this)||this;return i.subject=e,i.subscriber=n,i.closed=!1,i}return r(e,t),e.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var t=this.subject,e=t.observers;if(this.subject=null,e&&0!==e.length&&!t.isStopped&&!t.closed){var n=e.indexOf(this.subscriber);-1!==n&&e.splice(n,1)}}},e}(k),st=function(t){function e(e){var n=t.call(this,e)||this;return n.destination=e,n}return r(e,t),e}(O),at=function(t){function e(){var e=t.call(this)||this;return e.observers=[],e.closed=!1,e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return r(e,t),e.prototype[T]=function(){return new st(this)},e.prototype.lift=function(t){var e=new lt(this,this);return e.operator=t,e},e.prototype.next=function(t){if(this.closed)throw new rt;if(!this.isStopped)for(var e=this.observers,n=e.length,i=e.slice(),r=0;r<n;r++)i[r].next(t)},e.prototype.error=function(t){if(this.closed)throw new rt;this.hasError=!0,this.thrownError=t,this.isStopped=!0;for(var e=this.observers,n=e.length,i=e.slice(),r=0;r<n;r++)i[r].error(t);this.observers.length=0},e.prototype.complete=function(){if(this.closed)throw new rt;this.isStopped=!0;for(var t=this.observers,e=t.length,n=t.slice(),i=0;i<e;i++)n[i].complete();this.observers.length=0},e.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},e.prototype._trySubscribe=function(e){if(this.closed)throw new rt;return t.prototype._trySubscribe.call(this,e)},e.prototype._subscribe=function(t){if(this.closed)throw new rt;return this.hasError?(t.error(this.thrownError),k.EMPTY):this.isStopped?(t.complete(),k.EMPTY):(this.observers.push(t),new ot(this,t))},e.prototype.asObservable=function(){var t=new D;return t.source=this,t},e.create=function(t,e){return new lt(t,e)},e}(D),lt=function(t){function e(e,n){var i=t.call(this)||this;return i.destination=e,i.source=n,i}return r(e,t),e.prototype.next=function(t){var e=this.destination;e&&e.next&&e.next(t)},e.prototype.error=function(t){var e=this.destination;e&&e.error&&this.destination.error(t)},e.prototype.complete=function(){var t=this.destination;t&&t.complete&&this.destination.complete()},e.prototype._subscribe=function(t){return this.source?this.source.subscribe(t):k.EMPTY},e}(at);function ut(){return function(t){return t.lift(new ct(t))}}var ct=function(){function t(t){this.connectable=t}return t.prototype.call=function(t,e){var n=this.connectable;n._refCount++;var i=new ht(t,n),r=e.subscribe(i);return i.closed||(i.connection=n.connect()),r},t}(),ht=function(t){function e(e,n){var i=t.call(this,e)||this;return i.connectable=n,i}return r(e,t),e.prototype._unsubscribe=function(){var t=this.connectable;if(t){this.connectable=null;var e=t._refCount;if(e<=0)this.connection=null;else if(t._refCount=e-1,e>1)this.connection=null;else{var n=this.connection,i=t._connection;this.connection=null,!i||n&&i!==n||i.unsubscribe()}}else this.connection=null},e}(O),pt=function(t){function e(e,n){var i=t.call(this)||this;return i.source=e,i.subjectFactory=n,i._refCount=0,i._isComplete=!1,i}return r(e,t),e.prototype._subscribe=function(t){return this.getSubject().subscribe(t)},e.prototype.getSubject=function(){var t=this._subject;return t&&!t.isStopped||(this._subject=this.subjectFactory()),this._subject},e.prototype.connect=function(){var t=this._connection;return t||(this._isComplete=!1,(t=this._connection=new k).add(this.source.subscribe(new ft(this.getSubject(),this))),t.closed?(this._connection=null,t=k.EMPTY):this._connection=t),t},e.prototype.refCount=function(){return ut()(this)},e}(D).prototype,dt={operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:pt._subscribe},_isComplete:{value:pt._isComplete,writable:!0},getSubject:{value:pt.getSubject},connect:{value:pt.connect},refCount:{value:pt.refCount}},ft=function(t){function e(e,n){var i=t.call(this,e)||this;return i.connectable=n,i}return r(e,t),e.prototype._error=function(e){this._unsubscribe(),t.prototype._error.call(this,e)},e.prototype._complete=function(){this.connectable._isComplete=!0,this._unsubscribe(),t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){var t=this.connectable;if(t){this.connectable=null;var e=t._connection;t._refCount=0,t._subject=null,t._connection=null,e&&e.unsubscribe()}},e}(st);function gt(){return new at}function mt(){return function(t){return ut()((e=gt,function(t){var n;n="function"==typeof e?e:function(){return e};var i=Object.create(t,dt);return i.source=t,i.subjectFactory=n,i})(t));var e}}function vt(t){return{providedIn:t.providedIn||null,factory:t.factory,value:void 0}}var yt=function(){function t(t,e){this._desc=t,this.ngMetadataName="InjectionToken",this.ngInjectableDef=void 0!==e?vt({providedIn:e.providedIn||"root",factory:e.factory}):void 0}return t.prototype.toString=function(){return"InjectionToken "+this._desc},t}(),bt="__parameters__";function _t(t,e,n){var i=function(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(t){var i=t.apply(void 0,h(e));for(var r in i)this[r]=i[r]}}}(e);function r(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(this instanceof r)return i.apply(this,e),this;var o=new((t=r).bind.apply(t,h([void 0],e)));return s.annotation=o,s;function s(t,e,n){for(var i=t.hasOwnProperty(bt)?t[bt]:Object.defineProperty(t,bt,{value:[]})[bt];i.length<=n;)i.push(null);return(i[n]=i[n]||[]).push(o),t}}return n&&(r.prototype=Object.create(n.prototype)),r.prototype.ngMetadataName=t,r.annotationCls=r,r}var wt=Function;function xt(t){return"function"==typeof t}var Ct="undefined"!=typeof window&&window,St="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,kt="undefined"!=typeof global&&global||Ct||St,Et=Promise.resolve(0),Tt=null;function Ot(){if(!Tt){var t=kt.Symbol;if(t&&t.iterator)Tt=t.iterator;else for(var e=Object.getOwnPropertyNames(Map.prototype),n=0;n<e.length;++n){var i=e[n];"entries"!==i&&"size"!==i&&Map.prototype[i]===Map.prototype.entries&&(Tt=i)}}return Tt}function It(t){"undefined"==typeof Zone?Et.then(function(){t&&t.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",t)}function At(t,e){return t===e||"number"==typeof t&&"number"==typeof e&&isNaN(t)&&isNaN(e)}function Pt(t){if("string"==typeof t)return t;if(t instanceof Array)return"["+t.map(Pt).join(", ")+"]";if(null==t)return""+t;if(t.overriddenName)return""+t.overriddenName;if(t.name)return""+t.name;var e=t.toString();if(null==e)return""+e;var n=e.indexOf("\n");return-1===n?e:e.substring(0,n)}var Dt=/^function\s+\S+\(\)\s*{[\s\S]+\.apply\(this,\s*arguments\)/,jt=/^class\s+[A-Za-z\d$_]*\s*extends\s+[A-Za-z\d$_]+\s*{/,Mt=/^class\s+[A-Za-z\d$_]*\s*extends\s+[A-Za-z\d$_]+\s*{[\s\S]*constructor\s*\(/,Rt=function(){function t(t){this._reflect=t||kt.Reflect}return t.prototype.isReflectionEnabled=function(){return!0},t.prototype.factory=function(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return new(t.bind.apply(t,h([void 0],e)))}},t.prototype._zipTypesAndAnnotations=function(t,e){var n;n=void 0===t?new Array(e.length):new Array(t.length);for(var i=0;i<n.length;i++)n[i]=void 0===t?[]:t[i]!=Object?[t[i]]:[],e&&null!=e[i]&&(n[i]=n[i].concat(e[i]));return n},t.prototype._ownParameters=function(t,e){var n=t.toString();if(Dt.exec(n)||jt.exec(n)&&!Mt.exec(n))return null;if(t.parameters&&t.parameters!==e.parameters)return t.parameters;var i=t.ctorParameters;if(i&&i!==e.ctorParameters){var r="function"==typeof i?i():i,o=r.map(function(t){return t&&t.type}),s=r.map(function(t){return t&&Ft(t.decorators)});return this._zipTypesAndAnnotations(o,s)}var a=t.hasOwnProperty(bt)&&t[bt],l=this._reflect&&this._reflect.getOwnMetadata&&this._reflect.getOwnMetadata("design:paramtypes",t);return l||a?this._zipTypesAndAnnotations(l,a):new Array(t.length).fill(void 0)},t.prototype.parameters=function(t){if(!xt(t))return[];var e=Nt(t),n=this._ownParameters(t,e);return n||e===Object||(n=this.parameters(e)),n||[]},t.prototype._ownAnnotations=function(t,e){if(t.annotations&&t.annotations!==e.annotations){var n=t.annotations;return"function"==typeof n&&n.annotations&&(n=n.annotations),n}return t.decorators&&t.decorators!==e.decorators?Ft(t.decorators):t.hasOwnProperty("__annotations__")?t.__annotations__:null},t.prototype.annotations=function(t){if(!xt(t))return[];var e=Nt(t),n=this._ownAnnotations(t,e)||[];return(e!==Object?this.annotations(e):[]).concat(n)},t.prototype._ownPropMetadata=function(t,e){if(t.propMetadata&&t.propMetadata!==e.propMetadata){var n=t.propMetadata;return"function"==typeof n&&n.propMetadata&&(n=n.propMetadata),n}if(t.propDecorators&&t.propDecorators!==e.propDecorators){var i=t.propDecorators,r={};return Object.keys(i).forEach(function(t){r[t]=Ft(i[t])}),r}return t.hasOwnProperty("__prop__metadata__")?t.__prop__metadata__:null},t.prototype.propMetadata=function(t){if(!xt(t))return{};var e=Nt(t),n={};if(e!==Object){var i=this.propMetadata(e);Object.keys(i).forEach(function(t){n[t]=i[t]})}var r=this._ownPropMetadata(t,e);return r&&Object.keys(r).forEach(function(t){var e=[];n.hasOwnProperty(t)&&e.push.apply(e,h(n[t])),e.push.apply(e,h(r[t])),n[t]=e}),n},t.prototype.hasLifecycleHook=function(t,e){return t instanceof wt&&e in t.prototype},t.prototype.guards=function(t){return{}},t.prototype.getter=function(t){return new Function("o","return o."+t+";")},t.prototype.setter=function(t){return new Function("o","v","return o."+t+" = v;")},t.prototype.method=function(t){return new Function("o","args","if (!o."+t+") throw new Error('\""+t+"\" is undefined');\n return o."+t+".apply(o, args);")},t.prototype.importUri=function(t){return"object"==typeof t&&t.filePath?t.filePath:"./"+Pt(t)},t.prototype.resourceUri=function(t){return"./"+Pt(t)},t.prototype.resolveIdentifier=function(t,e,n,i){return i},t.prototype.resolveEnum=function(t,e){return t[e]},t}();function Ft(t){return t?t.map(function(t){var e=t.type.annotationCls;return new(e.bind.apply(e,h([void 0],t.args?t.args:[])))}):[]}function Nt(t){var e=t.prototype?Object.getPrototypeOf(t.prototype):null;return(e?e.constructor:null)||Object}function Lt(t){return t.__forward_ref__=Lt,t.toString=function(){return Pt(this())},t}function Bt(t){return"function"==typeof t&&t.hasOwnProperty("__forward_ref__")&&t.__forward_ref__===Lt?t():t}var Vt=_t("Inject",function(t){return{token:t}}),zt=_t("Optional"),Ht=_t("Self"),Wt=_t("SkipSelf"),Ut=_t("Host"),Xt="__source",Yt=new Object,qt=Yt,Gt=new yt("INJECTOR"),Kt=function(){function t(){}return t.prototype.get=function(t,e){if(void 0===e&&(e=Yt),e===Yt)throw new Error("NullInjectorError: No provider for "+Pt(t)+"!");return e},t}(),Zt=function(){function t(){}return t.create=function(t,e){return Array.isArray(t)?new se(t,e):new se(t.providers,t.parent,t.name||null)},t.THROW_IF_NOT_FOUND=Yt,t.NULL=new Kt,t.ngInjectableDef=vt({providedIn:"any",factory:function(){return pe(Gt)}}),t}(),Qt=function(t){return t},Jt=[],$t=Qt,te=function(){return Array.prototype.slice.call(arguments)},ee={},ne=function(t){for(var e in t)if(t[e]===ee)return e;throw Error("!prop")}({provide:String,useValue:ee}),ie=Zt.NULL,re=/\n/gm,oe="\u0275",se=function(){function t(t,e,n){void 0===e&&(e=ie),void 0===n&&(n=null),this.parent=e,this.source=n;var i=this._records=new Map;i.set(Zt,{token:Zt,fn:Qt,deps:Jt,value:this,useNew:!1}),i.set(Gt,{token:Gt,fn:Qt,deps:Jt,value:this,useNew:!1}),function t(e,n){if(n)if((n=Bt(n))instanceof Array)for(var i=0;i<n.length;i++)t(e,n[i]);else{if("function"==typeof n)throw ue("Function/Class not supported",n);if(!n||"object"!=typeof n||!n.provide)throw ue("Unexpected provider",n);var r=Bt(n.provide),o=function(t){var e=function(t){var e=Jt,n=t.deps;if(n&&n.length){e=[];for(var i=0;i<n.length;i++){var r=6;if((l=Bt(n[i]))instanceof Array)for(var o=0,s=l;o<s.length;o++){var a=s[o];a instanceof zt||a==zt?r|=1:a instanceof Wt||a==Wt?r&=-3:a instanceof Ht||a==Ht?r&=-5:l=a instanceof Vt?a.token:Bt(a)}e.push({token:l,options:r})}}else if(t.useExisting){var l;e=[{token:l=Bt(t.useExisting),options:6}]}else if(!(n||ne in t))throw ue("'deps' required",t);return e}(t),n=Qt,i=Jt,r=!1,o=Bt(t.provide);if(ne in t)i=t.useValue;else if(t.useFactory)n=t.useFactory;else if(t.useExisting);else if(t.useClass)r=!0,n=Bt(t.useClass);else{if("function"!=typeof o)throw ue("StaticProvider does not have [useValue|useFactory|useExisting|useClass] or [provide] is not newable",t);r=!0,n=o}return{deps:e,fn:n,useNew:r,value:i}}(n);if(!0===n.multi){var s=e.get(r);if(s){if(s.fn!==te)throw ae(r)}else e.set(r,s={token:n.provide,deps:[],useNew:!1,fn:te,value:Jt});s.deps.push({token:r=n,options:6})}var a=e.get(r);if(a&&a.fn==te)throw ae(r);e.set(r,o)}}(i,t)}return t.prototype.get=function(t,e,n){void 0===n&&(n=0);var i=this._records.get(t);try{return function t(e,n,i,r,o,s){try{return function(e,n,i,r,o,s){var a,l;if(!n||4&s)2&s||(l=r.get(e,o,0));else{if((l=n.value)==$t)throw Error(oe+"Circular dependency");if(l===Jt){n.value=$t;var u=n.useNew,c=n.fn,p=n.deps,d=Jt;if(p.length){d=[];for(var f=0;f<p.length;f++){var g=p[f],m=g.options,v=2&m?i.get(g.token):void 0;d.push(t(g.token,v,i,v||4&m?r:ie,1&m?null:Zt.THROW_IF_NOT_FOUND,0))}}n.value=l=u?new((a=c).bind.apply(a,h([void 0],d))):c.apply(void 0,d)}}return l}(e,n,i,r,o,s)}catch(t){throw t instanceof Error||(t=new Error(t)),(t.ngTempTokenPath=t.ngTempTokenPath||[]).unshift(e),n&&n.value==$t&&(n.value=Jt),t}}(t,i,this._records,this.parent,e,n)}catch(e){var r=e.ngTempTokenPath;throw t[Xt]&&r.unshift(t[Xt]),e.message=le("\n"+e.message,r,this.source),e.ngTokenPath=r,e.ngTempTokenPath=null,e}},t.prototype.toString=function(){var t=[];return this._records.forEach(function(e,n){return t.push(Pt(n))}),"StaticInjector["+t.join(", ")+"]"},t}();function ae(t){return ue("Cannot mix multi providers and regular providers",t)}function le(t,e,n){void 0===n&&(n=null),t=t&&"\n"===t.charAt(0)&&t.charAt(1)==oe?t.substr(2):t;var i=Pt(e);if(e instanceof Array)i=e.map(Pt).join(" -> ");else if("object"==typeof e){var r=[];for(var o in e)if(e.hasOwnProperty(o)){var s=e[o];r.push(o+":"+("string"==typeof s?JSON.stringify(s):Pt(s)))}i="{"+r.join(", ")+"}"}return"StaticInjectorError"+(n?"("+n+")":"")+"["+i+"]: "+t.replace(re,"\n ")}function ue(t,e){return new Error(le(t,e))}var ce=void 0;function he(t){var e=ce;return ce=t,e}function pe(t,e){if(void 0===e&&(e=0),void 0===ce)throw new Error("inject() must be called from an injection context");if(null===ce){var n=t.ngInjectableDef;if(n&&"root"==n.providedIn)return void 0===n.value?n.value=n.factory():n.value;if(8&e)return null;throw new Error("Injector: NOT_FOUND ["+Pt(t)+"]")}return ce.get(t,8&e?null:void 0,e)}function de(t){for(var e=[],n=0;n<t.length;n++){var i=t[n];if(Array.isArray(i)){if(0===i.length)throw new Error("Arguments array must have arguments.");for(var r=void 0,o=0,s=0;s<i.length;s++){var a=i[s];a instanceof zt||"Optional"===a.ngMetadataName?o|=8:a instanceof Wt||"SkipSelf"===a.ngMetadataName?o|=4:a instanceof Ht||"Self"===a.ngMetadataName?o|=2:r=a instanceof Vt?a.token:a}e.push(pe(r,o))}else e.push(pe(i))}return e}String;var fe=function(t){return t[t.Emulated=0]="Emulated",t[t.Native=1]="Native",t[t.None=2]="None",t[t.ShadowDom=3]="ShadowDom",t}({}),ge=new function(t){this.full="6.1.8",this.major="6.1.8".split(".")[0],this.minor="6.1.8".split(".")[1],this.patch="6.1.8".split(".").slice(2).join(".")}("6.1.8"),me="ngDebugContext",ve="ngOriginalError",ye="ngErrorLogger";function be(t){return t[me]}function _e(t){return t[ve]}function we(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];t.error.apply(t,h(e))}var xe=function(){function t(){this._console=console}return t.prototype.handleError=function(t){var e=this._findOriginalError(t),n=this._findContext(t),i=function(t){return t[ye]||we}(t);i(this._console,"ERROR",t),e&&i(this._console,"ORIGINAL ERROR",e),n&&i(this._console,"ERROR CONTEXT",n)},t.prototype._findContext=function(t){return t?be(t)?be(t):this._findContext(_e(t)):null},t.prototype._findOriginalError=function(t){for(var e=_e(t);e&&_e(e);)e=_e(e);return e},t}();function Ce(t){return t.length>1?" ("+function(t){for(var e=[],n=0;n<t.length;++n){if(e.indexOf(t[n])>-1)return e.push(t[n]),e;e.push(t[n])}return e}(t.slice().reverse()).map(function(t){return Pt(t.token)}).join(" -> ")+")":""}function Se(t,e,n,i){var r=[e],o=n(r),s=i?function(t,e){var n=o+" caused by: "+(e instanceof Error?e.message:e),i=Error(n);return i[ve]=e,i}(0,i):Error(o);return s.addKey=ke,s.keys=r,s.injectors=[t],s.constructResolvingMessage=n,s[ve]=i,s}function ke(t,e){this.injectors.push(t),this.keys.push(e),this.message=this.constructResolvingMessage(this.keys)}function Ee(t,e){for(var n=[],i=0,r=e.length;i<r;i++){var o=e[i];n.push(o&&0!=o.length?o.map(Pt).join(" "):"?")}return Error("Cannot resolve all parameters for '"+Pt(t)+"'("+n.join(", ")+"). Make sure that all the parameters are decorated with Inject or have valid type annotations and that '"+Pt(t)+"' is decorated with Injectable.")}var Te=function(){function t(t,e){if(this.token=t,this.id=e,!t)throw new Error("Token must be defined!");this.displayName=Pt(this.token)}return t.get=function(t){return Oe.get(Bt(t))},Object.defineProperty(t,"numberOfKeys",{get:function(){return Oe.numberOfKeys},enumerable:!0,configurable:!0}),t}(),Oe=new(function(){function t(){this._allKeys=new Map}return t.prototype.get=function(t){if(t instanceof Te)return t;if(this._allKeys.has(t))return this._allKeys.get(t);var e=new Te(t,Te.numberOfKeys);return this._allKeys.set(t,e),e},Object.defineProperty(t.prototype,"numberOfKeys",{get:function(){return this._allKeys.size},enumerable:!0,configurable:!0}),t}()),Ie=new(function(){function t(t){this.reflectionCapabilities=t}return t.prototype.updateCapabilities=function(t){this.reflectionCapabilities=t},t.prototype.factory=function(t){return this.reflectionCapabilities.factory(t)},t.prototype.parameters=function(t){return this.reflectionCapabilities.parameters(t)},t.prototype.annotations=function(t){return this.reflectionCapabilities.annotations(t)},t.prototype.propMetadata=function(t){return this.reflectionCapabilities.propMetadata(t)},t.prototype.hasLifecycleHook=function(t,e){return this.reflectionCapabilities.hasLifecycleHook(t,e)},t.prototype.getter=function(t){return this.reflectionCapabilities.getter(t)},t.prototype.setter=function(t){return this.reflectionCapabilities.setter(t)},t.prototype.method=function(t){return this.reflectionCapabilities.method(t)},t.prototype.importUri=function(t){return this.reflectionCapabilities.importUri(t)},t.prototype.resourceUri=function(t){return this.reflectionCapabilities.resourceUri(t)},t.prototype.resolveIdentifier=function(t,e,n,i){return this.reflectionCapabilities.resolveIdentifier(t,e,n,i)},t.prototype.resolveEnum=function(t,e){return this.reflectionCapabilities.resolveEnum(t,e)},t}())(new Rt),Ae=function(){function t(t,e,n){this.key=t,this.optional=e,this.visibility=n}return t.fromKey=function(e){return new t(e,!1,null)},t}(),Pe=[],De=function(t,e,n){this.key=t,this.resolvedFactories=e,this.multiProvider=n,this.resolvedFactory=this.resolvedFactories[0]},je=function(t,e){this.factory=t,this.dependencies=e};function Me(t){return new De(Te.get(t.provide),[function(t){var e,n;if(t.useClass){var i=Bt(t.useClass);e=Ie.factory(i),n=Re(i)}else t.useExisting?(e=function(t){return t},n=[Ae.fromKey(Te.get(t.useExisting))]):t.useFactory?(e=t.useFactory,n=function(t,e){if(e){var n=e.map(function(t){return[t]});return e.map(function(e){return Fe(t,e,n)})}return Re(t)}(t.useFactory,t.deps)):(e=function(){return t.useValue},n=Pe);return new je(e,n)}(t)],t.multi||!1)}function Re(t){var e=Ie.parameters(t);if(!e)return[];if(e.some(function(t){return null==t}))throw Ee(t,e);return e.map(function(n){return Fe(t,n,e)})}function Fe(t,e,n){var i=null,r=!1;if(!Array.isArray(e))return Ne(e instanceof Vt?e.token:e,r,null);for(var o=null,s=0;s<e.length;++s){var a=e[s];a instanceof wt?i=a:a instanceof Vt?i=a.token:a instanceof zt?r=!0:a instanceof Ht||a instanceof Wt?o=a:a instanceof yt&&(i=a)}if(null!=(i=Bt(i)))return Ne(i,r,o);throw Ee(t,n)}function Ne(t,e,n){return new Ae(Te.get(t),e,n)}var Le=new Object,Be=function(){function t(){}return t.resolve=function(t){return function(t){var e=function(t,e){for(var n=0;n<t.length;n++){var i=t[n],r=e.get(i.key.id);if(r){if(i.multiProvider!==r.multiProvider)throw Error("Cannot mix multi providers and regular providers, got: "+r+" "+i);if(i.multiProvider)for(var o=0;o<i.resolvedFactories.length;o++)r.resolvedFactories.push(i.resolvedFactories[o]);else e.set(i.key.id,i)}else{var s;s=i.multiProvider?new De(i.key,i.resolvedFactories.slice(),i.multiProvider):i,e.set(i.key.id,s)}}return e}(function t(e,n){return e.forEach(function(e){if(e instanceof wt)n.push({provide:e,useClass:e});else if(e&&"object"==typeof e&&void 0!==e.provide)n.push(e);else{if(!(e instanceof Array))throw Error("Invalid provider - only instances of Provider and Type are allowed, got: "+e);t(e,n)}}),n}(t,[]).map(Me),new Map);return Array.from(e.values())}(t)},t.resolveAndCreate=function(e,n){var i=t.resolve(e);return t.fromResolvedProviders(i,n)},t.fromResolvedProviders=function(t,e){return new Ve(t,e)},t}(),Ve=function(){function t(t,e){this._constructionCounter=0,this._providers=t,this.parent=e||null;var n=t.length;this.keyIds=new Array(n),this.objs=new Array(n);for(var i=0;i<n;i++)this.keyIds[i]=t[i].key.id,this.objs[i]=Le}return t.prototype.get=function(t,e){return void 0===e&&(e=qt),this._getByKey(Te.get(t),null,e)},t.prototype.resolveAndCreateChild=function(t){var e=Be.resolve(t);return this.createChildFromResolved(e)},t.prototype.createChildFromResolved=function(e){var n=new t(e);return n.parent=this,n},t.prototype.resolveAndInstantiate=function(t){return this.instantiateResolved(Be.resolve([t])[0])},t.prototype.instantiateResolved=function(t){return this._instantiateProvider(t)},t.prototype.getProviderAtIndex=function(t){if(t<0||t>=this._providers.length)throw function(t){return Error("Index "+t+" is out-of-bounds.")}(t);return this._providers[t]},t.prototype._new=function(t){if(this._constructionCounter++>this._getMaxNumberOfObjects())throw Se(this,t.key,function(t){return"Cannot instantiate cyclic dependency!"+Ce(t)});return this._instantiateProvider(t)},t.prototype._getMaxNumberOfObjects=function(){return this.objs.length},t.prototype._instantiateProvider=function(t){if(t.multiProvider){for(var e=new Array(t.resolvedFactories.length),n=0;n<t.resolvedFactories.length;++n)e[n]=this._instantiate(t,t.resolvedFactories[n]);return e}return this._instantiate(t,t.resolvedFactories[0])},t.prototype._instantiate=function(t,e){var n,i,r,o=this,s=e.factory;try{n=e.dependencies.map(function(t){return o._getByReflectiveDependency(t)})}catch(e){throw e.addKey&&e.addKey(this,t.key),e}try{i=s.apply(void 0,h(n))}catch(e){throw Se(this,t.key,function(t){var e=Pt(t[0].token);return r.message+": Error during instantiation of "+e+"!"+Ce(t)+"."},r=e)}return i},t.prototype._getByReflectiveDependency=function(t){return this._getByKey(t.key,t.visibility,t.optional?null:qt)},t.prototype._getByKey=function(e,n,i){return e===t.INJECTOR_KEY?this:n instanceof Ht?this._getByKeySelf(e,i):this._getByKeyDefault(e,i,n)},t.prototype._getObjByKeyId=function(t){for(var e=0;e<this.keyIds.length;e++)if(this.keyIds[e]===t)return this.objs[e]===Le&&(this.objs[e]=this._new(this._providers[e])),this.objs[e];return Le},t.prototype._throwOrNull=function(t,e){if(e!==qt)return e;throw function(t,e){return Se(t,e,function(t){return"No provider for "+Pt(t[0].token)+"!"+Ce(t)})}(this,t)},t.prototype._getByKeySelf=function(t,e){var n=this._getObjByKeyId(t.id);return n!==Le?n:this._throwOrNull(t,e)},t.prototype._getByKeyDefault=function(e,n,i){var r;for(r=i instanceof Wt?this.parent:this;r instanceof t;){var o=r,s=o._getObjByKeyId(e.id);if(s!==Le)return s;r=o.parent}return null!==r?r.get(e.token,n):this._throwOrNull(e,n)},Object.defineProperty(t.prototype,"displayName",{get:function(){return"ReflectiveInjector(providers: ["+function(t,e){for(var n=new Array(t._providers.length),i=0;i<t._providers.length;++i)n[i]=' "'+t.getProviderAtIndex(i).key.displayName+'" ';return n}(this).join(", ")+"])"},enumerable:!0,configurable:!0}),t.prototype.toString=function(){return this.displayName},t.INJECTOR_KEY=Te.get(Zt),t}(),ze=new yt("The presence of this token marks an injector as being the root injector."),He={},We={},Ue=[],Xe=void 0;function Ye(){return void 0===Xe&&(Xe=new Kt),Xe}var qe=function(){function t(t,e,n){var i=this;this.parent=n,this.records=new Map,this.injectorDefTypes=new Set,this.onDestroy=new Set,this.destroyed=!1,Ze([t],function(t){return i.processInjectorType(t,new Set)}),e&&Ze(e,function(t){return i.processProvider(t)}),this.records.set(Gt,Ke(void 0,this)),this.isRootInjector=this.records.has(ze),this.injectorDefTypes.forEach(function(t){return i.get(t)})}return t.prototype.destroy=function(){this.assertNotDestroyed(),this.destroyed=!0;try{this.onDestroy.forEach(function(t){return t.ngOnDestroy()})}finally{this.records.clear(),this.onDestroy.clear(),this.injectorDefTypes.clear()}},t.prototype.get=function(t,e,n){void 0===e&&(e=qt),void 0===n&&(n=0),this.assertNotDestroyed();var i,r=he(this);try{if(!(4&n)){var o=this.records.get(t);if(void 0===o){var s=("function"==typeof(i=t)||"object"==typeof i&&i instanceof yt)&&t.ngInjectableDef||void 0;void 0!==s&&this.injectableDefInScope(s)&&(o=Ge(t),this.records.set(t,o))}if(void 0!==o)return this.hydrate(t,o)}return 2&n&&Ye(),this.parent.get(t,e)}finally{he(r)}},t.prototype.assertNotDestroyed=function(){if(this.destroyed)throw new Error("Injector has already been destroyed.")},t.prototype.processInjectorType=function(t,e){var n=this,i=(t=Bt(t)).ngInjectorDef,r=null==i&&t.ngModule||void 0,o=void 0===r?t:r,s=void 0!==r&&t.providers||Ue;if(void 0!==r&&(i=r.ngInjectorDef),null!=i){if(e.has(o))throw new Error("Circular dependency: type "+Pt(o)+" ends up importing itself.");if(this.injectorDefTypes.add(o),this.records.set(o,Ke(i.factory)),null!=i.imports){e.add(o);try{Ze(i.imports,function(t){return n.processInjectorType(t,e)})}finally{e.delete(o)}}null!=i.providers&&Ze(i.providers,function(t){return n.processProvider(t)}),Ze(s,function(t){return n.processProvider(t)})}},t.prototype.processProvider=function(t){var e=Qe(t=Bt(t))?t:Bt(t.provide),n=function(t){var e=Bt(t),n=He,i=void 0;if(Qe(t))return Ge(t);if(e=Bt(t.provide),ne in t)n=t.useValue;else if(t.useExisting)i=function(){return pe(t.useExisting)};else if(t.useFactory)i=function(){return t.useFactory.apply(t,h(de(t.deps||[])))};else{var r=t.useClass||e;if(!t.deps)return Ge(r);i=function(){return new(r.bind.apply(r,h([void 0],de(t.deps))))}}return Ke(i,n)}(t);if(Qe(t)||!0!==t.multi){var i=this.records.get(e);if(i&&void 0!==i.multi)throw new Error("Mixed multi-provider for "+Pt(e))}else{var r=this.records.get(e);if(r){if(void 0===r.multi)throw new Error("Mixed multi-provider for "+e+".")}else(r=Ke(void 0,He,!0)).factory=function(){return de(r.multi)},this.records.set(e,r);e=t,r.multi.push(t)}this.records.set(e,n)},t.prototype.hydrate=function(t,e){if(e.value===We)throw new Error("Circular dep for "+Pt(t));var n;return e.value===He&&(e.value=We,e.value=e.factory()),"object"==typeof e.value&&e.value&&"object"==typeof(n=e.value)&&null!=n&&n.ngOnDestroy&&"function"==typeof n.ngOnDestroy&&this.onDestroy.add(e.value),e.value},t.prototype.injectableDefInScope=function(t){return!!t.providedIn&&("string"==typeof t.providedIn?"any"===t.providedIn||"root"===t.providedIn&&this.isRootInjector:this.injectorDefTypes.has(t.providedIn))},t}();function Ge(t){var e=t.ngInjectableDef;if(void 0===e){if(t instanceof yt)throw new Error("Token "+Pt(t)+" is missing an ngInjectableDef definition.");return Ke(function(){return new t})}return Ke(e.factory)}function Ke(t,e,n){return void 0===e&&(e=He),void 0===n&&(n=!1),{factory:t,value:e,multi:n?[]:void 0}}function Ze(t,e){t.forEach(function(t){return Array.isArray(t)?Ze(t,e):e(t)})}function Qe(t){return"function"==typeof t}function Je(t){return!!t&&"function"==typeof t.then}function $e(t){return!!t&&"function"==typeof t.subscribe}var tn=new yt("Application Initializer"),en=function(){function t(t){var e=this;this.appInits=t,this.initialized=!1,this.done=!1,this.donePromise=new Promise(function(t,n){e.resolve=t,e.reject=n})}return t.prototype.runInitializers=function(){var t=this;if(!this.initialized){var e=[],n=function(){t.done=!0,t.resolve()};if(this.appInits)for(var i=0;i<this.appInits.length;i++){var r=this.appInits[i]();Je(r)&&e.push(r)}Promise.all(e).then(function(){n()}).catch(function(e){t.reject(e)}),0===e.length&&n(),this.initialized=!0}},s([a(0,Vt(tn)),a(0,zt())],t)}(),nn=new yt("AppId");function rn(){return""+on()+on()+on()}function on(){return String.fromCharCode(97+Math.floor(25*Math.random()))}var sn=new yt("Platform Initializer"),an=new yt("Platform ID"),ln=new yt("appBootstrapListener"),un=function(){function t(){}return t.prototype.log=function(t){console.log(t)},t.prototype.warn=function(t){console.warn(t)},t}();function cn(){throw new Error("Runtime compiler is not loaded")}var hn=function(){function t(){}return t.prototype.compileModuleSync=function(t){throw cn()},t.prototype.compileModuleAsync=function(t){throw cn()},t.prototype.compileModuleAndAllComponentsSync=function(t){throw cn()},t.prototype.compileModuleAndAllComponentsAsync=function(t){throw cn()},t.prototype.clearCache=function(){},t.prototype.clearCacheFor=function(t){},t.prototype.getModuleId=function(t){},t}(),pn=function(){},dn=function(){},fn=function(){};function gn(t){var e=Error("No component factory found for "+Pt(t)+". Did you add it to @NgModule.entryComponents?");return e[yn]=t,e}var mn,vn,yn="ngComponent",bn=function(){function t(){}return t.prototype.resolveComponentFactory=function(t){throw gn(t)},t}(),_n=function(){function t(){}return t.NULL=new bn,t}(),wn=function(){function t(t,e,n){this._parent=e,this._ngModule=n,this._factories=new Map;for(var i=0;i<t.length;i++){var r=t[i];this._factories.set(r.componentType,r)}}return t.prototype.resolveComponentFactory=function(t){var e=this._factories.get(t);if(!e&&this._parent&&(e=this._parent.resolveComponentFactory(t)),!e)throw gn(t);return new xn(e,this._ngModule)},t}(),xn=function(t){function e(e,n){var i=t.call(this)||this;return i.factory=e,i.ngModule=n,i.selector=e.selector,i.componentType=e.componentType,i.ngContentSelectors=e.ngContentSelectors,i.inputs=e.inputs,i.outputs=e.outputs,i}return r(e,t),e.prototype.create=function(t,e,n,i){return this.factory.create(t,e,n,i||this.ngModule)},e}(fn),Cn=function(){},Sn=function(){},kn=function(){var t=kt.wtf;return!(!t||!(mn=t.trace)||(vn=mn.events,0))}();function En(t,e){return null}var Tn=kn?function(t,e){return void 0===e&&(e=null),vn.createScope(t,e)}:function(t,e){return En},On=kn?function(t,e){return mn.leaveScope(t,e),e}:function(t,e){return e},In=function(t){function e(e){void 0===e&&(e=!1);var n=t.call(this)||this;return n.__isAsync=e,n}return r(e,t),e.prototype.emit=function(e){t.prototype.next.call(this,e)},e.prototype.subscribe=function(e,n,i){var r,o=function(t){return null},s=function(){return null};e&&"object"==typeof e?(r=this.__isAsync?function(t){setTimeout(function(){return e.next(t)})}:function(t){e.next(t)},e.error&&(o=this.__isAsync?function(t){setTimeout(function(){return e.error(t)})}:function(t){e.error(t)}),e.complete&&(s=this.__isAsync?function(){setTimeout(function(){return e.complete()})}:function(){e.complete()})):(r=this.__isAsync?function(t){setTimeout(function(){return e(t)})}:function(t){e(t)},n&&(o=this.__isAsync?function(t){setTimeout(function(){return n(t)})}:function(t){n(t)}),i&&(s=this.__isAsync?function(){setTimeout(function(){return i()})}:function(){i()}));var a=t.prototype.subscribe.call(this,r,o,s);return e instanceof k&&e.add(a),a},e}(at),An=function(){function t(t){var e,n=t.enableLongStackTrace,i=void 0!==n&&n;if(this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new In(!1),this.onMicrotaskEmpty=new In(!1),this.onStable=new In(!1),this.onError=new In(!1),"undefined"==typeof Zone)throw new Error("In this configuration Angular requires Zone.js");Zone.assertZonePatched(),this._nesting=0,this._outer=this._inner=Zone.current,Zone.wtfZoneSpec&&(this._inner=this._inner.fork(Zone.wtfZoneSpec)),Zone.TaskTrackingZoneSpec&&(this._inner=this._inner.fork(new Zone.TaskTrackingZoneSpec)),i&&Zone.longStackTraceZoneSpec&&(this._inner=this._inner.fork(Zone.longStackTraceZoneSpec)),(e=this)._inner=e._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:function(t,n,i,r,o,s){try{return Mn(e),t.invokeTask(i,r,o,s)}finally{Rn(e)}},onInvoke:function(t,n,i,r,o,s,a){try{return Mn(e),t.invoke(i,r,o,s,a)}finally{Rn(e)}},onHasTask:function(t,n,i,r){t.hasTask(i,r),n===i&&("microTask"==r.change?(e.hasPendingMicrotasks=r.microTask,jn(e)):"macroTask"==r.change&&(e.hasPendingMacrotasks=r.macroTask))},onHandleError:function(t,n,i,r){return t.handleError(i,r),e.runOutsideAngular(function(){return e.onError.emit(r)}),!1}})}return t.isInAngularZone=function(){return!0===Zone.current.get("isAngularZone")},t.assertInAngularZone=function(){if(!t.isInAngularZone())throw new Error("Expected to be in Angular Zone, but it is not!")},t.assertNotInAngularZone=function(){if(t.isInAngularZone())throw new Error("Expected to not be in Angular Zone, but it is!")},t.prototype.run=function(t,e,n){return this._inner.run(t,e,n)},t.prototype.runTask=function(t,e,n,i){var r=this._inner,o=r.scheduleEventTask("NgZoneEvent: "+i,t,Dn,Pn,Pn);try{return r.runTask(o,e,n)}finally{r.cancelTask(o)}},t.prototype.runGuarded=function(t,e,n){return this._inner.runGuarded(t,e,n)},t.prototype.runOutsideAngular=function(t){return this._outer.run(t)},t}();function Pn(){}var Dn={};function jn(t){if(0==t._nesting&&!t.hasPendingMicrotasks&&!t.isStable)try{t._nesting++,t.onMicrotaskEmpty.emit(null)}finally{if(t._nesting--,!t.hasPendingMicrotasks)try{t.runOutsideAngular(function(){return t.onStable.emit(null)})}finally{t.isStable=!0}}}function Mn(t){t._nesting++,t.isStable&&(t.isStable=!1,t.onUnstable.emit(null))}function Rn(t){t._nesting--,jn(t)}var Fn,Nn=function(){function t(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new In,this.onMicrotaskEmpty=new In,this.onStable=new In,this.onError=new In}return t.prototype.run=function(t){return t()},t.prototype.runGuarded=function(t){return t()},t.prototype.runOutsideAngular=function(t){return t()},t.prototype.runTask=function(t){return t()},t}(),Ln=function(){function t(t){var e=this;this._ngZone=t,this._pendingCount=0,this._isZoneStable=!0,this._didWork=!1,this._callbacks=[],this._watchAngularEvents(),t.run(function(){e.taskTrackingZone=Zone.current.get("TaskTrackingZone")})}return t.prototype._watchAngularEvents=function(){var t=this;this._ngZone.onUnstable.subscribe({next:function(){t._didWork=!0,t._isZoneStable=!1}}),this._ngZone.runOutsideAngular(function(){t._ngZone.onStable.subscribe({next:function(){An.assertNotInAngularZone(),It(function(){t._isZoneStable=!0,t._runCallbacksIfReady()})}})})},t.prototype.increasePendingRequestCount=function(){return this._pendingCount+=1,this._didWork=!0,this._pendingCount},t.prototype.decreasePendingRequestCount=function(){if(this._pendingCount-=1,this._pendingCount<0)throw new Error("pending async requests below zero");return this._runCallbacksIfReady(),this._pendingCount},t.prototype.isStable=function(){return this._isZoneStable&&0===this._pendingCount&&!this._ngZone.hasPendingMacrotasks},t.prototype._runCallbacksIfReady=function(){var t=this;if(this.isStable())It(function(){for(;0!==t._callbacks.length;){var e=t._callbacks.pop();clearTimeout(e.timeoutId),e.doneCb(t._didWork)}t._didWork=!1});else{var e=this.getPendingTasks();this._callbacks=this._callbacks.filter(function(t){return!t.updateCb||!t.updateCb(e)||(clearTimeout(t.timeoutId),!1)}),this._didWork=!0}},t.prototype.getPendingTasks=function(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(function(t){return{source:t.source,isPeriodic:t.data.isPeriodic,delay:t.data.delay,creationLocation:t.creationLocation,xhr:t.data.target}}):[]},t.prototype.addCallback=function(t,e,n){var i=this,r=-1;e&&e>0&&(r=setTimeout(function(){i._callbacks=i._callbacks.filter(function(t){return t.timeoutId!==r}),t(i._didWork,i.getPendingTasks())},e)),this._callbacks.push({doneCb:t,timeoutId:r,updateCb:n})},t.prototype.whenStable=function(t,e,n){if(n&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/dist/task-tracking.js" loaded?');this.addCallback(t,e,n),this._runCallbacksIfReady()},t.prototype.getPendingRequestCount=function(){return this._pendingCount},t.prototype.findProviders=function(t,e,n){return[]},t}(),Bn=function(){function t(){this._applications=new Map,Vn.addToWindow(this)}return t.prototype.registerApplication=function(t,e){this._applications.set(t,e)},t.prototype.unregisterApplication=function(t){this._applications.delete(t)},t.prototype.unregisterAllApplications=function(){this._applications.clear()},t.prototype.getTestability=function(t){return this._applications.get(t)||null},t.prototype.getAllTestabilities=function(){return Array.from(this._applications.values())},t.prototype.getAllRootElements=function(){return Array.from(this._applications.keys())},t.prototype.findTestabilityInTree=function(t,e){return void 0===e&&(e=!0),Vn.findTestabilityInTree(this,t,e)},s([l("design:paramtypes",[])],t)}(),Vn=new(function(){function t(){}return t.prototype.addToWindow=function(t){},t.prototype.findTestabilityInTree=function(t,e,n){return null},t}()),zn=!0,Hn=!1,Wn=new yt("AllowMultipleToken");function Un(){return Hn=!0,zn}var Xn=function(t,e){this.name=t,this.token=e};function Yn(t,e,n){void 0===n&&(n=[]);var i="Platform: "+e,r=new yt(i);return function(e){void 0===e&&(e=[]);var o=qn();if(!o||o.injector.get(Wn,!1))if(t)t(n.concat(e).concat({provide:r,useValue:!0}));else{var s=n.concat(e).concat({provide:r,useValue:!0});!function(t){if(Fn&&!Fn.destroyed&&!Fn.injector.get(Wn,!1))throw new Error("There can be only one platform. Destroy the previous one to create a new one.");Fn=t.get(Gn);var e=t.get(sn,null);e&&e.forEach(function(t){return t()})}(Zt.create({providers:s,name:i}))}return function(t){var e=qn();if(!e)throw new Error("No platform exists!");if(!e.injector.get(t,null))throw new Error("A platform with a different configuration has been created. Please destroy it first.");return e}(r)}}function qn(){return Fn&&!Fn.destroyed?Fn:null}var Gn=function(){function t(t){this._injector=t,this._modules=[],this._destroyListeners=[],this._destroyed=!1}return t.prototype.bootstrapModuleFactory=function(t,e){var n,i=this,r="noop"===(n=e?e.ngZone:void 0)?new Nn:("zone.js"===n?void 0:n)||new An({enableLongStackTrace:Un()}),o=[{provide:An,useValue:r}];return r.run(function(){var e=Zt.create({providers:o,parent:i.injector,name:t.moduleType.name}),n=t.create(e),s=n.injector.get(xe,null);if(!s)throw new Error("No ErrorHandler. Is platform module (BrowserModule) included?");return n.onDestroy(function(){return Qn(i._modules,n)}),r.runOutsideAngular(function(){return r.onError.subscribe({next:function(t){s.handleError(t)}})}),function(t,e,r){try{var o=((s=n.injector.get(en)).runInitializers(),s.donePromise.then(function(){return i._moduleDoBootstrap(n),n}));return Je(o)?o.catch(function(n){throw e.runOutsideAngular(function(){return t.handleError(n)}),n}):o}catch(n){throw e.runOutsideAngular(function(){return t.handleError(n)}),n}var s}(s,r)})},t.prototype.bootstrapModule=function(t,e){var n=this;void 0===e&&(e=[]);var i=this.injector.get(pn),r=Kn({},e);return i.createCompiler([r]).compileModuleAsync(t).then(function(t){return n.bootstrapModuleFactory(t,r)})},t.prototype._moduleDoBootstrap=function(t){var e=t.injector.get(Zn);if(t._bootstrapComponents.length>0)t._bootstrapComponents.forEach(function(t){return e.bootstrap(t)});else{if(!t.instance.ngDoBootstrap)throw new Error("The module "+Pt(t.instance.constructor)+' was bootstrapped, but it does not declare "@NgModule.bootstrap" components nor a "ngDoBootstrap" method. Please define one of these.');t.instance.ngDoBootstrap(e)}this._modules.push(t)},t.prototype.onDestroy=function(t){this._destroyListeners.push(t)},Object.defineProperty(t.prototype,"injector",{get:function(){return this._injector},enumerable:!0,configurable:!0}),t.prototype.destroy=function(){if(this._destroyed)throw new Error("The platform has already been destroyed!");this._modules.slice().forEach(function(t){return t.destroy()}),this._destroyListeners.forEach(function(t){return t()}),this._destroyed=!0},Object.defineProperty(t.prototype,"destroyed",{get:function(){return this._destroyed},enumerable:!0,configurable:!0}),t}();function Kn(t,e){return Array.isArray(e)?e.reduce(Kn,t):o({},t,e)}var Zn=function(){function t(t,e,n,i,r,o){var s=this;this._zone=t,this._console=e,this._injector=n,this._exceptionHandler=i,this._componentFactoryResolver=r,this._initStatus=o,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._enforceNoNewChanges=!1,this._stable=!0,this.componentTypes=[],this.components=[],this._enforceNoNewChanges=Un(),this._zone.onMicrotaskEmpty.subscribe({next:function(){s._zone.run(function(){s.tick()})}});var a=new D(function(t){s._stable=s._zone.isStable&&!s._zone.hasPendingMacrotasks&&!s._zone.hasPendingMicrotasks,s._zone.runOutsideAngular(function(){t.next(s._stable),t.complete()})}),l=new D(function(t){var e;s._zone.runOutsideAngular(function(){e=s._zone.onStable.subscribe(function(){An.assertNotInAngularZone(),It(function(){s._stable||s._zone.hasPendingMacrotasks||s._zone.hasPendingMicrotasks||(s._stable=!0,t.next(!0))})})});var n=s._zone.onUnstable.subscribe(function(){An.assertInAngularZone(),s._stable&&(s._stable=!1,s._zone.runOutsideAngular(function(){t.next(!1)}))});return function(){e.unsubscribe(),n.unsubscribe()}});this.isStable=nt(a,l.pipe(mt()))}var e;return e=t,t.prototype.bootstrap=function(t,e){var n,i=this;if(!this._initStatus.done)throw new Error("Cannot bootstrap as there are still asynchronous initializers running. Bootstrap components in the `ngDoBootstrap` method of the root module.");n=t instanceof fn?t:this._componentFactoryResolver.resolveComponentFactory(t),this.componentTypes.push(n.componentType);var r=n instanceof xn?null:this._injector.get(Cn),o=n.create(Zt.NULL,[],e||n.selector,r);o.onDestroy(function(){i._unloadComponent(o)});var s=o.injector.get(Ln,null);return s&&o.injector.get(Bn).registerApplication(o.location.nativeElement,s),this._loadComponent(o),Un()&&this._console.log("Angular is running in the development mode. Call enableProdMode() to enable the production mode."),o},t.prototype.tick=function(){var t=this;if(this._runningTick)throw new Error("ApplicationRef.tick is called recursively");var n=e._tickScope();try{this._runningTick=!0,this._views.forEach(function(t){return t.detectChanges()}),this._enforceNoNewChanges&&this._views.forEach(function(t){return t.checkNoChanges()})}catch(e){this._zone.runOutsideAngular(function(){return t._exceptionHandler.handleError(e)})}finally{this._runningTick=!1,On(n)}},t.prototype.attachView=function(t){var e=t;this._views.push(e),e.attachToAppRef(this)},t.prototype.detachView=function(t){var e=t;Qn(this._views,e),e.detachFromAppRef()},t.prototype._loadComponent=function(t){this.attachView(t.hostView),this.tick(),this.components.push(t),this._injector.get(ln,[]).concat(this._bootstrapListeners).forEach(function(e){return e(t)})},t.prototype._unloadComponent=function(t){this.detachView(t.hostView),Qn(this.components,t)},t.prototype.ngOnDestroy=function(){this._views.slice().forEach(function(t){return t.destroy()})},Object.defineProperty(t.prototype,"viewCount",{get:function(){return this._views.length},enumerable:!0,configurable:!0}),t._tickScope=Tn("ApplicationRef#tick()"),t}();function Qn(t,e){var n=t.indexOf(e);n>-1&&t.splice(n,1)}var Jn=function(){},$n=function(t){return t[t.Important=1]="Important",t[t.DashCase=2]="DashCase",t}({}),ti=function(){},ei=function(t){this.nativeElement=t},ni=function(){function t(){this.dirty=!0,this._results=[],this.changes=new In,this.length=0}return t.prototype.map=function(t){return this._results.map(t)},t.prototype.filter=function(t){return this._results.filter(t)},t.prototype.find=function(t){return this._results.find(t)},t.prototype.reduce=function(t,e){return this._results.reduce(t,e)},t.prototype.forEach=function(t){this._results.forEach(t)},t.prototype.some=function(t){return this._results.some(t)},t.prototype.toArray=function(){return this._results.slice()},t.prototype[Ot()]=function(){return this._results[Ot()]()},t.prototype.toString=function(){return this._results.toString()},t.prototype.reset=function(t){this._results=function t(e){return e.reduce(function(e,n){var i=Array.isArray(n)?t(n):n;return e.concat(i)},[])}(t),this.dirty=!1,this.length=this._results.length,this.last=this._results[this.length-1],this.first=this._results[0]},t.prototype.notifyOnChanges=function(){this.changes.emit(this)},t.prototype.setDirty=function(){this.dirty=!0},t.prototype.destroy=function(){this.changes.complete(),this.changes.unsubscribe()},t}(),ii=function(){},ri=function(){},oi=function(){},si=function(){function t(t,e,n){this._debugContext=n,this.nativeNode=t,e&&e instanceof ai?e.addChild(this):this.parent=null,this.listeners=[]}return Object.defineProperty(t.prototype,"injector",{get:function(){return this._debugContext.injector},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"componentInstance",{get:function(){return this._debugContext.component},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"context",{get:function(){return this._debugContext.context},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"references",{get:function(){return this._debugContext.references},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"providerTokens",{get:function(){return this._debugContext.providerTokens},enumerable:!0,configurable:!0}),t}(),ai=function(t){function e(e,n,i){var r=t.call(this,e,n,i)||this;return r.properties={},r.attributes={},r.classes={},r.styles={},r.childNodes=[],r.nativeElement=e,r}return r(e,t),e.prototype.addChild=function(t){t&&(this.childNodes.push(t),t.parent=this)},e.prototype.removeChild=function(t){var e=this.childNodes.indexOf(t);-1!==e&&(t.parent=null,this.childNodes.splice(e,1))},e.prototype.insertChildrenAfter=function(t,e){var n,i=this,r=this.childNodes.indexOf(t);-1!==r&&((n=this.childNodes).splice.apply(n,h([r+1,0],e)),e.forEach(function(t){t.parent&&t.parent.removeChild(t),t.parent=i}))},e.prototype.insertBefore=function(t,e){var n=this.childNodes.indexOf(t);-1===n?this.addChild(e):(e.parent&&e.parent.removeChild(e),e.parent=this,this.childNodes.splice(n,0,e))},e.prototype.query=function(t){return this.queryAll(t)[0]||null},e.prototype.queryAll=function(t){var e=[];return function t(e,n,i){e.childNodes.forEach(function(e){e instanceof ai&&(n(e)&&i.push(e),t(e,n,i))})}(this,t,e),e},e.prototype.queryAllNodes=function(t){var e=[];return function t(e,n,i){e instanceof ai&&e.childNodes.forEach(function(e){n(e)&&i.push(e),e instanceof ai&&t(e,n,i)})}(this,t,e),e},Object.defineProperty(e.prototype,"children",{get:function(){return this.childNodes.filter(function(t){return t instanceof e})},enumerable:!0,configurable:!0}),e.prototype.triggerEventHandler=function(t,e){this.listeners.forEach(function(n){n.name==t&&n.callback(e)})},e}(si),li=new Map;function ui(t){return li.get(t)||null}function ci(t){li.set(t.nativeNode,t)}function hi(t,e){var n=fi(t),i=fi(e);return n&&i?function(t,e,n){for(var i=t[Ot()](),r=e[Ot()]();;){var o=i.next(),s=r.next();if(o.done&&s.done)return!0;if(o.done||s.done)return!1;if(!n(o.value,s.value))return!1}}(t,e,hi):!(n||!t||"object"!=typeof t&&"function"!=typeof t||i||!e||"object"!=typeof e&&"function"!=typeof e)||At(t,e)}var pi=function(){function t(t){this.wrapped=t}return t.wrap=function(e){return new t(e)},t.unwrap=function(e){return t.isWrapped(e)?e.wrapped:e},t.isWrapped=function(e){return e instanceof t},t}(),di=function(){function t(t,e,n){this.previousValue=t,this.currentValue=e,this.firstChange=n}return t.prototype.isFirstChange=function(){return this.firstChange},t}();function fi(t){return!!gi(t)&&(Array.isArray(t)||!(t instanceof Map)&&Ot()in t)}function gi(t){return null!==t&&("function"==typeof t||"object"==typeof t)}var mi=function(){function t(){}return t.prototype.supports=function(t){return fi(t)},t.prototype.create=function(t){return new yi(t)},t}(),vi=function(t,e){return e},yi=function(){function t(t){this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=t||vi}return t.prototype.forEachItem=function(t){var e;for(e=this._itHead;null!==e;e=e._next)t(e)},t.prototype.forEachOperation=function(t){for(var e=this._itHead,n=this._removalsHead,i=0,r=null;e||n;){var o=!n||e&&e.currentIndex<xi(n,i,r)?e:n,s=xi(o,i,r),a=o.currentIndex;if(o===n)i--,n=n._nextRemoved;else if(e=e._next,null==o.previousIndex)i++;else{r||(r=[]);var l=s-i,u=a-i;if(l!=u){for(var c=0;c<l;c++){var h=c<r.length?r[c]:r[c]=0,p=h+c;u<=p&&p<l&&(r[c]=h+1)}r[o.previousIndex]=u-l}}s!==a&&t(o,s,a)}},t.prototype.forEachPreviousItem=function(t){var e;for(e=this._previousItHead;null!==e;e=e._nextPrevious)t(e)},t.prototype.forEachAddedItem=function(t){var e;for(e=this._additionsHead;null!==e;e=e._nextAdded)t(e)},t.prototype.forEachMovedItem=function(t){var e;for(e=this._movesHead;null!==e;e=e._nextMoved)t(e)},t.prototype.forEachRemovedItem=function(t){var e;for(e=this._removalsHead;null!==e;e=e._nextRemoved)t(e)},t.prototype.forEachIdentityChange=function(t){var e;for(e=this._identityChangesHead;null!==e;e=e._nextIdentityChange)t(e)},t.prototype.diff=function(t){if(null==t&&(t=[]),!fi(t))throw new Error("Error trying to diff '"+Pt(t)+"'. Only arrays and iterables are allowed");return this.check(t)?this:null},t.prototype.onDestroy=function(){},t.prototype.check=function(t){var e=this;this._reset();var n,i,r,o=this._itHead,s=!1;if(Array.isArray(t)){this.length=t.length;for(var a=0;a<this.length;a++)r=this._trackByFn(a,i=t[a]),null!==o&&At(o.trackById,r)?(s&&(o=this._verifyReinsertion(o,i,r,a)),At(o.item,i)||this._addIdentityChange(o,i)):(o=this._mismatch(o,i,r,a),s=!0),o=o._next}else n=0,function(t,e){if(Array.isArray(t))for(var n=0;n<t.length;n++)e(t[n]);else for(var i=t[Ot()](),r=void 0;!(r=i.next()).done;)e(r.value)}(t,function(t){r=e._trackByFn(n,t),null!==o&&At(o.trackById,r)?(s&&(o=e._verifyReinsertion(o,t,r,n)),At(o.item,t)||e._addIdentityChange(o,t)):(o=e._mismatch(o,t,r,n),s=!0),o=o._next,n++}),this.length=n;return this._truncate(o),this.collection=t,this.isDirty},Object.defineProperty(t.prototype,"isDirty",{get:function(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead},enumerable:!0,configurable:!0}),t.prototype._reset=function(){if(this.isDirty){var t=void 0,e=void 0;for(t=this._previousItHead=this._itHead;null!==t;t=t._next)t._nextPrevious=t._next;for(t=this._additionsHead;null!==t;t=t._nextAdded)t.previousIndex=t.currentIndex;for(this._additionsHead=this._additionsTail=null,t=this._movesHead;null!==t;t=e)t.previousIndex=t.currentIndex,e=t._nextMoved;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}},t.prototype._mismatch=function(t,e,n,i){var r;return null===t?r=this._itTail:(r=t._prev,this._remove(t)),null!==(t=null===this._linkedRecords?null:this._linkedRecords.get(n,i))?(At(t.item,e)||this._addIdentityChange(t,e),this._moveAfter(t,r,i)):null!==(t=null===this._unlinkedRecords?null:this._unlinkedRecords.get(n,null))?(At(t.item,e)||this._addIdentityChange(t,e),this._reinsertAfter(t,r,i)):t=this._addAfter(new bi(e,n),r,i),t},t.prototype._verifyReinsertion=function(t,e,n,i){var r=null===this._unlinkedRecords?null:this._unlinkedRecords.get(n,null);return null!==r?t=this._reinsertAfter(r,t._prev,i):t.currentIndex!=i&&(t.currentIndex=i,this._addToMoves(t,i)),t},t.prototype._truncate=function(t){for(;null!==t;){var e=t._next;this._addToRemovals(this._unlink(t)),t=e}null!==this._unlinkedRecords&&this._unlinkedRecords.clear(),null!==this._additionsTail&&(this._additionsTail._nextAdded=null),null!==this._movesTail&&(this._movesTail._nextMoved=null),null!==this._itTail&&(this._itTail._next=null),null!==this._removalsTail&&(this._removalsTail._nextRemoved=null),null!==this._identityChangesTail&&(this._identityChangesTail._nextIdentityChange=null)},t.prototype._reinsertAfter=function(t,e,n){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(t);var i=t._prevRemoved,r=t._nextRemoved;return null===i?this._removalsHead=r:i._nextRemoved=r,null===r?this._removalsTail=i:r._prevRemoved=i,this._insertAfter(t,e,n),this._addToMoves(t,n),t},t.prototype._moveAfter=function(t,e,n){return this._unlink(t),this._insertAfter(t,e,n),this._addToMoves(t,n),t},t.prototype._addAfter=function(t,e,n){return this._insertAfter(t,e,n),this._additionsTail=null===this._additionsTail?this._additionsHead=t:this._additionsTail._nextAdded=t,t},t.prototype._insertAfter=function(t,e,n){var i=null===e?this._itHead:e._next;return t._next=i,t._prev=e,null===i?this._itTail=t:i._prev=t,null===e?this._itHead=t:e._next=t,null===this._linkedRecords&&(this._linkedRecords=new wi),this._linkedRecords.put(t),t.currentIndex=n,t},t.prototype._remove=function(t){return this._addToRemovals(this._unlink(t))},t.prototype._unlink=function(t){null!==this._linkedRecords&&this._linkedRecords.remove(t);var e=t._prev,n=t._next;return null===e?this._itHead=n:e._next=n,null===n?this._itTail=e:n._prev=e,t},t.prototype._addToMoves=function(t,e){return t.previousIndex===e?t:(this._movesTail=null===this._movesTail?this._movesHead=t:this._movesTail._nextMoved=t,t)},t.prototype._addToRemovals=function(t){return null===this._unlinkedRecords&&(this._unlinkedRecords=new wi),this._unlinkedRecords.put(t),t.currentIndex=null,t._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=t,t._prevRemoved=null):(t._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=t),t},t.prototype._addIdentityChange=function(t,e){return t.item=e,this._identityChangesTail=null===this._identityChangesTail?this._identityChangesHead=t:this._identityChangesTail._nextIdentityChange=t,t},t}(),bi=function(t,e){this.item=t,this.trackById=e,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null,this._nextIdentityChange=null},_i=function(){function t(){this._head=null,this._tail=null}return t.prototype.add=function(t){null===this._head?(this._head=this._tail=t,t._nextDup=null,t._prevDup=null):(this._tail._nextDup=t,t._prevDup=this._tail,t._nextDup=null,this._tail=t)},t.prototype.get=function(t,e){var n;for(n=this._head;null!==n;n=n._nextDup)if((null===e||e<=n.currentIndex)&&At(n.trackById,t))return n;return null},t.prototype.remove=function(t){var e=t._prevDup,n=t._nextDup;return null===e?this._head=n:e._nextDup=n,null===n?this._tail=e:n._prevDup=e,null===this._head},t}(),wi=function(){function t(){this.map=new Map}return t.prototype.put=function(t){var e=t.trackById,n=this.map.get(e);n||(n=new _i,this.map.set(e,n)),n.add(t)},t.prototype.get=function(t,e){var n=this.map.get(t);return n?n.get(t,e):null},t.prototype.remove=function(t){var e=t.trackById;return this.map.get(e).remove(t)&&this.map.delete(e),t},Object.defineProperty(t.prototype,"isEmpty",{get:function(){return 0===this.map.size},enumerable:!0,configurable:!0}),t.prototype.clear=function(){this.map.clear()},t}();function xi(t,e,n){var i=t.previousIndex;if(null===i)return i;var r=0;return n&&i<n.length&&(r=n[i]),i+e+r}var Ci=function(){function t(){}return t.prototype.supports=function(t){return t instanceof Map||gi(t)},t.prototype.create=function(){return new Si},t}(),Si=function(){function t(){this._records=new Map,this._mapHead=null,this._appendAfter=null,this._previousMapHead=null,this._changesHead=null,this._changesTail=null,this._additionsHead=null,this._additionsTail=null,this._removalsHead=null,this._removalsTail=null}return Object.defineProperty(t.prototype,"isDirty",{get:function(){return null!==this._additionsHead||null!==this._changesHead||null!==this._removalsHead},enumerable:!0,configurable:!0}),t.prototype.forEachItem=function(t){var e;for(e=this._mapHead;null!==e;e=e._next)t(e)},t.prototype.forEachPreviousItem=function(t){var e;for(e=this._previousMapHead;null!==e;e=e._nextPrevious)t(e)},t.prototype.forEachChangedItem=function(t){var e;for(e=this._changesHead;null!==e;e=e._nextChanged)t(e)},t.prototype.forEachAddedItem=function(t){var e;for(e=this._additionsHead;null!==e;e=e._nextAdded)t(e)},t.prototype.forEachRemovedItem=function(t){var e;for(e=this._removalsHead;null!==e;e=e._nextRemoved)t(e)},t.prototype.diff=function(t){if(t){if(!(t instanceof Map||gi(t)))throw new Error("Error trying to diff '"+Pt(t)+"'. Only maps and objects are allowed")}else t=new Map;return this.check(t)?this:null},t.prototype.onDestroy=function(){},t.prototype.check=function(t){var e=this;this._reset();var n=this._mapHead;if(this._appendAfter=null,this._forEach(t,function(t,i){if(n&&n.key===i)e._maybeAddToChanges(n,t),e._appendAfter=n,n=n._next;else{var r=e._getOrCreateRecordForKey(i,t);n=e._insertBeforeOrAppend(n,r)}}),n){n._prev&&(n._prev._next=null),this._removalsHead=n;for(var i=n;null!==i;i=i._nextRemoved)i===this._mapHead&&(this._mapHead=null),this._records.delete(i.key),i._nextRemoved=i._next,i.previousValue=i.currentValue,i.currentValue=null,i._prev=null,i._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty},t.prototype._insertBeforeOrAppend=function(t,e){if(t){var n=t._prev;return e._next=t,e._prev=n,t._prev=e,n&&(n._next=e),t===this._mapHead&&(this._mapHead=e),this._appendAfter=t,t}return this._appendAfter?(this._appendAfter._next=e,e._prev=this._appendAfter):this._mapHead=e,this._appendAfter=e,null},t.prototype._getOrCreateRecordForKey=function(t,e){if(this._records.has(t)){var n=this._records.get(t);this._maybeAddToChanges(n,e);var i=n._prev,r=n._next;return i&&(i._next=r),r&&(r._prev=i),n._next=null,n._prev=null,n}var o=new ki(t);return this._records.set(t,o),o.currentValue=e,this._addToAdditions(o),o},t.prototype._reset=function(){if(this.isDirty){var t=void 0;for(this._previousMapHead=this._mapHead,t=this._previousMapHead;null!==t;t=t._next)t._nextPrevious=t._next;for(t=this._changesHead;null!==t;t=t._nextChanged)t.previousValue=t.currentValue;for(t=this._additionsHead;null!=t;t=t._nextAdded)t.previousValue=t.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}},t.prototype._maybeAddToChanges=function(t,e){At(e,t.currentValue)||(t.previousValue=t.currentValue,t.currentValue=e,this._addToChanges(t))},t.prototype._addToAdditions=function(t){null===this._additionsHead?this._additionsHead=this._additionsTail=t:(this._additionsTail._nextAdded=t,this._additionsTail=t)},t.prototype._addToChanges=function(t){null===this._changesHead?this._changesHead=this._changesTail=t:(this._changesTail._nextChanged=t,this._changesTail=t)},t.prototype._forEach=function(t,e){t instanceof Map?t.forEach(e):Object.keys(t).forEach(function(n){return e(t[n],n)})},t}(),ki=function(t){this.key=t,this.previousValue=null,this.currentValue=null,this._nextPrevious=null,this._next=null,this._prev=null,this._nextAdded=null,this._nextRemoved=null,this._nextChanged=null},Ei=function(){function t(t){this.factories=t}return t.create=function(e,n){if(null!=n){var i=n.factories.slice();e=e.concat(i)}return new t(e)},t.extend=function(e){return{provide:t,useFactory:function(n){if(!n)throw new Error("Cannot extend IterableDiffers without a parent injector");return t.create(e,n)},deps:[[t,new Wt,new zt]]}},t.prototype.find=function(t){var e,n=this.factories.find(function(e){return e.supports(t)});if(null!=n)return n;throw new Error("Cannot find a differ supporting object '"+t+"' of type '"+((e=t).name||typeof e)+"'")},t.ngInjectableDef=vt({providedIn:"root",factory:function(){return new t([new mi])}}),t}(),Ti=function(){function t(t){this.factories=t}return t.create=function(e,n){if(n){var i=n.factories.slice();e=e.concat(i)}return new t(e)},t.extend=function(e){return{provide:t,useFactory:function(n){if(!n)throw new Error("Cannot extend KeyValueDiffers without a parent injector");return t.create(e,n)},deps:[[t,new Wt,new zt]]}},t.prototype.find=function(t){var e=this.factories.find(function(e){return e.supports(t)});if(e)return e;throw new Error("Cannot find a differ supporting object '"+t+"'")},t}(),Oi=[new Ci],Ii=new Ei([new mi]),Ai=new Ti(Oi),Pi=Yn(null,"core",[{provide:an,useValue:"unknown"},{provide:Gn,deps:[Zt]},{provide:Bn,deps:[]},{provide:un,deps:[]}]),Di=new yt("LocaleId");function ji(){return Ii}function Mi(){return Ai}function Ri(t){return t||"en-US"}var Fi=function(t){},Ni=function(){function t(t){if(this.defaultDoc=t,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert"),this.inertBodyElement=this.inertDocument.body,null==this.inertBodyElement){var e=this.inertDocument.createElement("html");this.inertDocument.appendChild(e),this.inertBodyElement=this.inertDocument.createElement("body"),e.appendChild(this.inertBodyElement)}this.inertBodyElement.innerHTML='<svg><g onload="this.parentNode.remove()"></g></svg>',!this.inertBodyElement.querySelector||this.inertBodyElement.querySelector("svg")?(this.inertBodyElement.innerHTML='<svg><p><style><img src="</style><img src=x onerror=alert(1)//">',this.getInertBodyElement=this.inertBodyElement.querySelector&&this.inertBodyElement.querySelector("svg img")&&function(){try{return!!window.DOMParser}catch(t){return!1}}()?this.getInertBodyElement_DOMParser:this.getInertBodyElement_InertDocument):this.getInertBodyElement=this.getInertBodyElement_XHR}return t.prototype.getInertBodyElement_XHR=function(t){t="<body><remove></remove>"+t+"</body>";try{t=encodeURI(t)}catch(t){return null}var e=new XMLHttpRequest;e.responseType="document",e.open("GET","data:text/html;charset=utf-8,"+t,!1),e.send(null);var n=e.response.body;return n.removeChild(n.firstChild),n},t.prototype.getInertBodyElement_DOMParser=function(t){t="<body><remove></remove>"+t+"</body>";try{var e=(new window.DOMParser).parseFromString(t,"text/html").body;return e.removeChild(e.firstChild),e}catch(t){return null}},t.prototype.getInertBodyElement_InertDocument=function(t){var e=this.inertDocument.createElement("template");return"content"in e?(e.innerHTML=t,e):(this.inertBodyElement.innerHTML=t,this.defaultDoc.documentMode&&this.stripCustomNsAttrs(this.inertBodyElement),this.inertBodyElement)},t.prototype.stripCustomNsAttrs=function(t){for(var e=t.attributes,n=e.length-1;0<n;n--){var i=e.item(n).name;"xmlns:ns1"!==i&&0!==i.indexOf("ns1:")||t.removeAttribute(i)}for(var r=t.firstChild;r;)r.nodeType===Node.ELEMENT_NODE&&this.stripCustomNsAttrs(r),r=r.nextSibling},t}(),Li=/^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi,Bi=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+\/]+=*$/i;function Vi(t){return(t=String(t)).match(Li)||t.match(Bi)?t:(Un()&&console.warn("WARNING: sanitizing unsafe URL value "+t+" (see http://g.co/ng/security#xss)"),"unsafe:"+t)}function zi(t){var e,n,i={};try{for(var r=u(t.split(",")),o=r.next();!o.done;o=r.next())i[o.value]=!0}catch(t){e={error:t}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}return i}function Hi(){for(var t,e,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];var r={};try{for(var o=u(n),s=o.next();!s.done;s=o.next()){var a=s.value;for(var l in a)a.hasOwnProperty(l)&&(r[l]=!0)}}catch(e){t={error:e}}finally{try{s&&!s.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}return r}var Wi,Ui=zi("area,br,col,hr,img,wbr"),Xi=zi("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),Yi=zi("rp,rt"),qi=Hi(Yi,Xi),Gi=Hi(Ui,Hi(Xi,zi("address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul")),Hi(Yi,zi("a,abbr,acronym,audio,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video")),qi),Ki=zi("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),Zi=zi("srcset"),Qi=Hi(Ki,Zi,zi("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width")),Ji=function(){function t(){this.sanitizedSomething=!1,this.buf=[]}return t.prototype.sanitizeChildren=function(t){for(var e=t.firstChild;e;)if(e.nodeType===Node.ELEMENT_NODE?this.startElement(e):e.nodeType===Node.TEXT_NODE?this.chars(e.nodeValue):this.sanitizedSomething=!0,e.firstChild)e=e.firstChild;else for(;e;){e.nodeType===Node.ELEMENT_NODE&&this.endElement(e);var n=this.checkClobberedElement(e,e.nextSibling);if(n){e=n;break}e=this.checkClobberedElement(e,e.parentNode)}return this.buf.join("")},t.prototype.startElement=function(t){var e=t.nodeName.toLowerCase();if(Gi.hasOwnProperty(e)){this.buf.push("<"),this.buf.push(e);for(var n,i=t.attributes,r=0;r<i.length;r++){var o=i.item(r),s=o.name,a=s.toLowerCase();if(Qi.hasOwnProperty(a)){var l=o.value;Ki[a]&&(l=Vi(l)),Zi[a]&&(n=l,l=(n=String(n)).split(",").map(function(t){return Vi(t.trim())}).join(", ")),this.buf.push(" ",s,'="',er(l),'"')}else this.sanitizedSomething=!0}this.buf.push(">")}else this.sanitizedSomething=!0},t.prototype.endElement=function(t){var e=t.nodeName.toLowerCase();Gi.hasOwnProperty(e)&&!Ui.hasOwnProperty(e)&&(this.buf.push("</"),this.buf.push(e),this.buf.push(">"))},t.prototype.chars=function(t){this.buf.push(er(t))},t.prototype.checkClobberedElement=function(t,e){if(e&&(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY)===Node.DOCUMENT_POSITION_CONTAINED_BY)throw new Error("Failed to sanitize html because the element is clobbered: "+t.outerHTML);return e},t}(),$i=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,tr=/([^\#-~ |!])/g;function er(t){return t.replace(/&/g,"&").replace($i,function(t){return"&#"+(1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320)+65536)+";"}).replace(tr,function(t){return"&#"+t.charCodeAt(0)+";"}).replace(/</g,"<").replace(/>/g,">")}function nr(t){return"content"in t&&function(t){return t.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===t.nodeName}(t)?t.content:null}var ir=new RegExp("^([-,.\"'%_!# a-zA-Z0-9]+|(?:(?:matrix|translate|scale|rotate|skew|perspective)(?:X|Y|3d)?|(?:rgb|hsl)a?|(?:repeating-)?(?:linear|radial)-gradient|(?:calc|attr))\\([-0-9.%, #a-zA-Z]+\\))$","g"),rr=/^url\(([^)]+)\)$/,or=function(t){return t[t.NONE=0]="NONE",t[t.HTML=1]="HTML",t[t.STYLE=2]="STYLE",t[t.SCRIPT=3]="SCRIPT",t[t.URL=4]="URL",t[t.RESOURCE_URL=5]="RESOURCE_URL",t}({}),sr=function(){};function ar(t,e,n){var i=t.state,r=1792&i;return r===e?(t.state=-1793&i|n,t.initIndex=-1,!0):r===n}function lr(t,e,n){return(1792&t.state)===e&&t.initIndex<=n&&(t.initIndex=n+1,!0)}function ur(t,e){return t.nodes[e]}function cr(t,e){return t.nodes[e]}function hr(t,e){return t.nodes[e]}function pr(t,e){return t.nodes[e]}function dr(t,e){return t.nodes[e]}var fr={setCurrentNode:void 0,createRootView:void 0,createEmbeddedView:void 0,createComponentView:void 0,createNgModuleRef:void 0,overrideProvider:void 0,overrideComponentView:void 0,clearOverrides:void 0,checkAndUpdateView:void 0,checkNoChangesView:void 0,destroyView:void 0,resolveDep:void 0,createDebugContext:void 0,handleEvent:void 0,updateDirectives:void 0,updateRenderer:void 0,dirtyParentQueries:void 0};function gr(t,e,n,i){var r="ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: '"+e+"'. Current value: '"+n+"'.";return i&&(r+=" It seems like the view has been created after its parent and its children have been dirty checked. Has it been created in a change detection hook ?"),function(t,e){var n=new Error(t);return mr(n,e),n}(r,t)}function mr(t,e){t[me]=e,t[ye]=e.logError.bind(e)}function vr(t){return new Error("ViewDestroyedError: Attempt to use a destroyed view: "+t)}var yr=function(){},br=new Map;function _r(t){var e=br.get(t);return e||(e=Pt(t)+"_"+br.size,br.set(t,e)),e}function wr(t,e,n,i){if(pi.isWrapped(i)){i=pi.unwrap(i);var r=t.def.nodes[e].bindingIndex+n,o=pi.unwrap(t.oldValues[r]);t.oldValues[r]=new pi(o)}return i}var xr="$$undefined",Cr="$$empty";function Sr(t){return{id:xr,styles:t.styles,encapsulation:t.encapsulation,data:t.data}}var kr=0;function Er(t,e,n,i){return!(!(2&t.state)&&At(t.oldValues[e.bindingIndex+n],i))}function Tr(t,e,n,i){return!!Er(t,e,n,i)&&(t.oldValues[e.bindingIndex+n]=i,!0)}function Or(t,e,n,i){var r=t.oldValues[e.bindingIndex+n];if(1&t.state||!hi(r,i)){var o=e.bindings[n].name;throw gr(fr.createDebugContext(t,e.nodeIndex),o+": "+r,o+": "+i,0!=(1&t.state))}}function Ir(t){for(var e=t;e;)2&e.def.flags&&(e.state|=8),e=e.viewContainerParent||e.parent}function Ar(t,e){for(var n=t;n&&n!==e;)n.state|=64,n=n.viewContainerParent||n.parent}function Pr(t,e,n,i){try{return Ir(33554432&t.def.nodes[e].flags?cr(t,e).componentView:t),fr.handleEvent(t,e,n,i)}catch(e){t.root.errorHandler.handleError(e)}}function Dr(t){return t.parent?cr(t.parent,t.parentNodeDef.nodeIndex):null}function jr(t){return t.parent?t.parentNodeDef.parent:null}function Mr(t,e){switch(201347067&e.flags){case 1:return cr(t,e.nodeIndex).renderElement;case 2:return ur(t,e.nodeIndex).renderText}}function Rr(t){return!!t.parent&&!!(32768&t.parentNodeDef.flags)}function Fr(t){return!(!t.parent||32768&t.parentNodeDef.flags)}function Nr(t){return 1<<t%32}function Lr(t){var e={},n=0,i={};return t&&t.forEach(function(t){var r=c(t,2),o=r[0],s=r[1];"number"==typeof o?(e[o]=s,n|=Nr(o)):i[o]=s}),{matchedQueries:e,references:i,matchedQueryIds:n}}function Br(t,e){return t.map(function(t){var n,i,r;return Array.isArray(t)?(r=(n=c(t,2))[0],i=n[1]):(r=0,i=t),i&&("function"==typeof i||"object"==typeof i)&&e&&Object.defineProperty(i,Xt,{value:e,configurable:!0}),{flags:r,token:i,tokenKey:_r(i)}})}function Vr(t,e,n){var i=n.renderParent;return i?0==(1&i.flags)||0==(33554432&i.flags)||i.element.componentRendererType&&i.element.componentRendererType.encapsulation===fe.Native?cr(t,n.renderParent.nodeIndex).renderElement:void 0:e}var zr=new WeakMap;function Hr(t){var e=zr.get(t);return e||((e=t(function(){return yr})).factory=t,zr.set(t,e)),e}function Wr(t,e,n,i,r){3===e&&(n=t.renderer.parentNode(Mr(t,t.def.lastRenderRootNode))),Ur(t,e,0,t.def.nodes.length-1,n,i,r)}function Ur(t,e,n,i,r,o,s){for(var a=n;a<=i;a++){var l=t.def.nodes[a];11&l.flags&&Yr(t,l,e,r,o,s),a+=l.childCount}}function Xr(t,e,n,i,r,o){for(var s=t;s&&!Rr(s);)s=s.parent;for(var a=s.parent,l=jr(s),u=l.nodeIndex+l.childCount,c=l.nodeIndex+1;c<=u;c++){var h=a.def.nodes[c];h.ngContentIndex===e&&Yr(a,h,n,i,r,o),c+=h.childCount}if(!a.parent){var p=t.root.projectableNodes[e];if(p)for(c=0;c<p.length;c++)qr(t,p[c],n,i,r,o)}}function Yr(t,e,n,i,r,o){if(8&e.flags)Xr(t,e.ngContent.index,n,i,r,o);else{var s=Mr(t,e);if(3===n&&33554432&e.flags&&48&e.bindingFlags?(16&e.bindingFlags&&qr(t,s,n,i,r,o),32&e.bindingFlags&&qr(cr(t,e.nodeIndex).componentView,s,n,i,r,o)):qr(t,s,n,i,r,o),16777216&e.flags)for(var a=cr(t,e.nodeIndex).viewContainer._embeddedViews,l=0;l<a.length;l++)Wr(a[l],n,i,r,o);1&e.flags&&!e.element.name&&Ur(t,n,e.nodeIndex+1,e.nodeIndex+e.childCount,i,r,o)}}function qr(t,e,n,i,r,o){var s=t.renderer;switch(n){case 1:s.appendChild(i,e);break;case 2:s.insertBefore(i,e,r);break;case 3:s.removeChild(i,e);break;case 0:o.push(e)}}var Gr=/^:([^:]+):(.+)$/;function Kr(t){if(":"===t[0]){var e=t.match(Gr);return[e[1],e[2]]}return["",t]}function Zr(t){for(var e=0,n=0;n<t.length;n++)e|=t[n].flags;return e}function Qr(t,e,n,i,r,o,s,a,l,u,c,h,p,d,f,g,m,v,y,b){switch(t){case 1:return e+Jr(n)+i;case 2:return e+Jr(n)+i+Jr(r)+o;case 3:return e+Jr(n)+i+Jr(r)+o+Jr(s)+a;case 4:return e+Jr(n)+i+Jr(r)+o+Jr(s)+a+Jr(l)+u;case 5:return e+Jr(n)+i+Jr(r)+o+Jr(s)+a+Jr(l)+u+Jr(c)+h;case 6:return e+Jr(n)+i+Jr(r)+o+Jr(s)+a+Jr(l)+u+Jr(c)+h+Jr(p)+d;case 7:return e+Jr(n)+i+Jr(r)+o+Jr(s)+a+Jr(l)+u+Jr(c)+h+Jr(p)+d+Jr(f)+g;case 8:return e+Jr(n)+i+Jr(r)+o+Jr(s)+a+Jr(l)+u+Jr(c)+h+Jr(p)+d+Jr(f)+g+Jr(m)+v;case 9:return e+Jr(n)+i+Jr(r)+o+Jr(s)+a+Jr(l)+u+Jr(c)+h+Jr(p)+d+Jr(f)+g+Jr(m)+v+Jr(y)+b;default:throw new Error("Does not support more than 9 expressions")}}function Jr(t){return null!=t?t.toString():""}function $r(t,e,n,i,r,o){t|=1;var s=Lr(e);return{nodeIndex:-1,parent:null,renderParent:null,bindingIndex:-1,outputIndex:-1,flags:t,checkIndex:-1,childFlags:0,directChildFlags:0,childMatchedQueries:0,matchedQueries:s.matchedQueries,matchedQueryIds:s.matchedQueryIds,references:s.references,ngContentIndex:n,childCount:i,bindings:[],bindingFlags:0,outputs:[],element:{ns:null,name:null,attrs:null,template:o?Hr(o):null,componentProvider:null,componentView:null,componentRendererType:null,publicProviders:null,allProviders:null,handleEvent:r||yr},provider:null,text:null,query:null,ngContent:null}}function to(t,e,n,i,r,o,s,a,l,u,h,p){var d;void 0===s&&(s=[]),u||(u=yr);var f=Lr(n),g=f.matchedQueries,m=f.references,v=f.matchedQueryIds,y=null,b=null;o&&(y=(d=c(Kr(o),2))[0],b=d[1]),a=a||[];for(var _=new Array(a.length),w=0;w<a.length;w++){var x=c(a[w],3),C=x[0],S=x[2],k=c(Kr(x[1]),2),E=k[0],T=k[1],O=void 0,I=void 0;switch(15&C){case 4:I=S;break;case 1:case 8:O=S}_[w]={flags:C,ns:E,name:T,nonMinifiedName:T,securityContext:O,suffix:I}}l=l||[];var A=new Array(l.length);for(w=0;w<l.length;w++){var P=c(l[w],2);A[w]={type:0,target:P[0],eventName:P[1],propName:null}}var D=(s=s||[]).map(function(t){var e=c(t,2),n=e[1],i=c(Kr(e[0]),2);return[i[0],i[1],n]});return p=function(t){if(t&&t.id===xr){var e=null!=t.encapsulation&&t.encapsulation!==fe.None||t.styles.length||Object.keys(t.data).length;t.id=e?"c"+kr++:Cr}return t&&t.id===Cr&&(t=null),t||null}(p),h&&(e|=33554432),{nodeIndex:-1,parent:null,renderParent:null,bindingIndex:-1,outputIndex:-1,checkIndex:t,flags:e|=1,childFlags:0,directChildFlags:0,childMatchedQueries:0,matchedQueries:g,matchedQueryIds:v,references:m,ngContentIndex:i,childCount:r,bindings:_,bindingFlags:Zr(_),outputs:A,element:{ns:y,name:b,attrs:D,template:null,componentProvider:null,componentView:h||null,componentRendererType:p,publicProviders:null,allProviders:null,handleEvent:u||yr},provider:null,text:null,query:null,ngContent:null}}function eo(t,e,n){var i,r=n.element,o=t.root.selectorOrNode,s=t.renderer;if(t.parent||!o){i=r.name?s.createElement(r.name,r.ns):s.createComment("");var a=Vr(t,e,n);a&&s.appendChild(a,i)}else i=s.selectRootElement(o);if(r.attrs)for(var l=0;l<r.attrs.length;l++){var u=c(r.attrs[l],3);s.setAttribute(i,u[1],u[2],u[0])}return i}function no(t,e,n,i){for(var r=0;r<n.outputs.length;r++){var o=n.outputs[r],s=io(t,n.nodeIndex,(h=o.eventName,(c=o.target)?c+":"+h:h)),a=o.target,l=t;"component"===o.target&&(a=null,l=e);var u=l.renderer.listen(a||i,o.eventName,s);t.disposables[n.outputIndex+r]=u}var c,h}function io(t,e,n){return function(i){return Pr(t,e,n,i)}}function ro(t,e,n,i){if(!Tr(t,e,n,i))return!1;var r=e.bindings[n],o=cr(t,e.nodeIndex),s=o.renderElement,a=r.name;switch(15&r.flags){case 1:!function(t,e,n,i,r,o){var s=e.securityContext,a=s?t.root.sanitizer.sanitize(s,o):o;a=null!=a?a.toString():null;var l=t.renderer;null!=o?l.setAttribute(n,r,a,i):l.removeAttribute(n,r,i)}(t,r,s,r.ns,a,i);break;case 2:!function(t,e,n,i){var r=t.renderer;i?r.addClass(e,n):r.removeClass(e,n)}(t,s,a,i);break;case 4:!function(t,e,n,i,r){var o=t.root.sanitizer.sanitize(or.STYLE,r);if(null!=o){o=o.toString();var s=e.suffix;null!=s&&(o+=s)}else o=null;var a=t.renderer;null!=o?a.setStyle(n,i,o):a.removeStyle(n,i)}(t,r,s,a,i);break;case 8:!function(t,e,n,i,r){var o=e.securityContext,s=o?t.root.sanitizer.sanitize(o,r):r;t.renderer.setProperty(n,i,s)}(33554432&e.flags&&32&r.flags?o.componentView:t,r,s,a,i)}return!0}var oo=new Object,so=_r(Zt),ao=_r(Gt),lo=_r(Cn);function uo(t,e,n,i){return n=Bt(n),{index:-1,deps:Br(i,Pt(e)),flags:t,token:e,value:n}}function co(t,e,n){void 0===n&&(n=Zt.THROW_IF_NOT_FOUND);var i,r,o=he(t);try{if(8&e.flags)return e.token;if(2&e.flags&&(n=null),1&e.flags)return t._parent.get(e.token,n);var s=e.tokenKey;switch(s){case so:case ao:case lo:return t}var a=t._def.providersByKey[s];if(a){var l=t._providers[a.index];return void 0===l&&(l=t._providers[a.index]=ho(t,a)),l===oo?void 0:l}if(e.token.ngInjectableDef&&(i=t,null!=(r=e.token.ngInjectableDef).providedIn&&(function(t,e){return t._def.modules.indexOf(r.providedIn)>-1}(i)||"root"===r.providedIn&&i._def.isRoot))){var u=t._providers.length;return t._def.providersByKey[e.tokenKey]={flags:5120,value:e.token.ngInjectableDef.factory,deps:[],index:u,token:e.token},t._providers[u]=oo,t._providers[u]=ho(t,t._def.providersByKey[e.tokenKey])}return 4&e.flags?n:t._parent.get(e.token,n)}finally{he(o)}}function ho(t,e){var n;switch(201347067&e.flags){case 512:n=function(t,e,n){var i=n.length;switch(i){case 0:return new e;case 1:return new e(co(t,n[0]));case 2:return new e(co(t,n[0]),co(t,n[1]));case 3:return new e(co(t,n[0]),co(t,n[1]),co(t,n[2]));default:for(var r=new Array(i),o=0;o<i;o++)r[o]=co(t,n[o]);return new(e.bind.apply(e,h([void 0],r)))}}(t,e.value,e.deps);break;case 1024:n=function(t,e,n){var i=n.length;switch(i){case 0:return e();case 1:return e(co(t,n[0]));case 2:return e(co(t,n[0]),co(t,n[1]));case 3:return e(co(t,n[0]),co(t,n[1]),co(t,n[2]));default:for(var r=Array(i),o=0;o<i;o++)r[o]=co(t,n[o]);return e.apply(void 0,h(r))}}(t,e.value,e.deps);break;case 2048:n=co(t,e.deps[0]);break;case 256:n=e.value}return n===oo||null==n||"object"!=typeof n||131072&e.flags||"function"!=typeof n.ngOnDestroy||(e.flags|=131072),void 0===n?oo:n}function po(t,e){var n=t.viewContainer._embeddedViews;if((null==e||e>=n.length)&&(e=n.length-1),e<0)return null;var i=n[e];return i.viewContainerParent=null,vo(n,e),fr.dirtyParentQueries(i),go(i),i}function fo(t,e,n){var i=e?Mr(e,e.def.lastRenderRootNode):t.renderElement;Wr(n,2,n.renderer.parentNode(i),n.renderer.nextSibling(i),void 0)}function go(t){Wr(t,3,null,null,void 0)}function mo(t,e,n){e>=t.length?t.push(n):t.splice(e,0,n)}function vo(t,e){e>=t.length-1?t.pop():t.splice(e,1)}var yo=new Object;function bo(t,e,n,i,r,o){return new _o(t,e,n,i,r,o)}var _o=function(t){function e(e,n,i,r,o,s){var a=t.call(this)||this;return a.selector=e,a.componentType=n,a._inputs=r,a._outputs=o,a.ngContentSelectors=s,a.viewDefFactory=i,a}return r(e,t),Object.defineProperty(e.prototype,"inputs",{get:function(){var t=[],e=this._inputs;for(var n in e)t.push({propName:n,templateName:e[n]});return t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"outputs",{get:function(){var t=[];for(var e in this._outputs)t.push({propName:e,templateName:this._outputs[e]});return t},enumerable:!0,configurable:!0}),e.prototype.create=function(t,e,n,i){if(!i)throw new Error("ngModule should be provided");var r=Hr(this.viewDefFactory),o=r.nodes[0].element.componentProvider.nodeIndex,s=fr.createRootView(t,e||[],n,r,i,yo),a=hr(s,o).instance;return n&&s.renderer.setAttribute(cr(s,0).renderElement,"ng-version",ge.full),new wo(s,new ko(s),a)},e}(fn),wo=function(t){function e(e,n,i){var r=t.call(this)||this;return r._view=e,r._viewRef=n,r._component=i,r._elDef=r._view.def.nodes[0],r.hostView=n,r.changeDetectorRef=n,r.instance=i,r}return r(e,t),Object.defineProperty(e.prototype,"location",{get:function(){return new ei(cr(this._view,this._elDef.nodeIndex).renderElement)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"injector",{get:function(){return new Io(this._view,this._elDef)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"componentType",{get:function(){return this._component.constructor},enumerable:!0,configurable:!0}),e.prototype.destroy=function(){this._viewRef.destroy()},e.prototype.onDestroy=function(t){this._viewRef.onDestroy(t)},e}(dn);function xo(t,e,n){return new Co(t,e,n)}var Co=function(){function t(t,e,n){this._view=t,this._elDef=e,this._data=n,this._embeddedViews=[]}return Object.defineProperty(t.prototype,"element",{get:function(){return new ei(this._data.renderElement)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"injector",{get:function(){return new Io(this._view,this._elDef)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parentInjector",{get:function(){for(var t=this._view,e=this._elDef.parent;!e&&t;)e=jr(t),t=t.parent;return t?new Io(t,e):new Io(this._view,null)},enumerable:!0,configurable:!0}),t.prototype.clear=function(){for(var t=this._embeddedViews.length-1;t>=0;t--){var e=po(this._data,t);fr.destroyView(e)}},t.prototype.get=function(t){var e=this._embeddedViews[t];if(e){var n=new ko(e);return n.attachToViewContainerRef(this),n}return null},Object.defineProperty(t.prototype,"length",{get:function(){return this._embeddedViews.length},enumerable:!0,configurable:!0}),t.prototype.createEmbeddedView=function(t,e,n){var i=t.createEmbeddedView(e||{});return this.insert(i,n),i},t.prototype.createComponent=function(t,e,n,i,r){var o=n||this.parentInjector;r||t instanceof xn||(r=o.get(Cn));var s=t.create(o,i,void 0,r);return this.insert(s.hostView,e),s},t.prototype.insert=function(t,e){if(t.destroyed)throw new Error("Cannot insert a destroyed View in a ViewContainer!");var n,i,r,o,s=t;return r=s._view,o=(n=this._data).viewContainer._embeddedViews,null!==(i=e)&&void 0!==i||(i=o.length),r.viewContainerParent=this._view,mo(o,i,r),function(t,e){var n=Dr(e);if(n&&n!==t&&!(16&e.state)){e.state|=16;var i=n.template._projectedViews;i||(i=n.template._projectedViews=[]),i.push(e),function(t,n){if(!(4&n.flags)){e.parent.def.nodeFlags|=4,n.flags|=4;for(var i=n.parent;i;)i.childFlags|=4,i=i.parent}}(0,e.parentNodeDef)}}(n,r),fr.dirtyParentQueries(r),fo(n,i>0?o[i-1]:null,r),s.attachToViewContainerRef(this),t},t.prototype.move=function(t,e){if(t.destroyed)throw new Error("Cannot move a destroyed View in a ViewContainer!");var n,i,r,o,s,a=this._embeddedViews.indexOf(t._view);return r=e,s=(o=(n=this._data).viewContainer._embeddedViews)[i=a],vo(o,i),null==r&&(r=o.length),mo(o,r,s),fr.dirtyParentQueries(s),go(s),fo(n,r>0?o[r-1]:null,s),t},t.prototype.indexOf=function(t){return this._embeddedViews.indexOf(t._view)},t.prototype.remove=function(t){var e=po(this._data,t);e&&fr.destroyView(e)},t.prototype.detach=function(t){var e=po(this._data,t);return e?new ko(e):null},t}();function So(t){return new ko(t)}var ko=function(){function t(t){this._view=t,this._viewContainerRef=null,this._appRef=null}return Object.defineProperty(t.prototype,"rootNodes",{get:function(){return Wr(this._view,0,void 0,void 0,t=[]),t;var t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"context",{get:function(){return this._view.context},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"destroyed",{get:function(){return 0!=(128&this._view.state)},enumerable:!0,configurable:!0}),t.prototype.markForCheck=function(){Ir(this._view)},t.prototype.detach=function(){this._view.state&=-5},t.prototype.detectChanges=function(){var t=this._view.root.rendererFactory;t.begin&&t.begin();try{fr.checkAndUpdateView(this._view)}finally{t.end&&t.end()}},t.prototype.checkNoChanges=function(){fr.checkNoChangesView(this._view)},t.prototype.reattach=function(){this._view.state|=4},t.prototype.onDestroy=function(t){this._view.disposables||(this._view.disposables=[]),this._view.disposables.push(t)},t.prototype.destroy=function(){this._appRef?this._appRef.detachView(this):this._viewContainerRef&&this._viewContainerRef.detach(this._viewContainerRef.indexOf(this)),fr.destroyView(this._view)},t.prototype.detachFromAppRef=function(){this._appRef=null,go(this._view),fr.dirtyParentQueries(this._view)},t.prototype.attachToAppRef=function(t){if(this._viewContainerRef)throw new Error("This view is already attached to a ViewContainer!");this._appRef=t},t.prototype.attachToViewContainerRef=function(t){if(this._appRef)throw new Error("This view is already attached directly to the ApplicationRef!");this._viewContainerRef=t},t}();function Eo(t,e){return new To(t,e)}var To=function(t){function e(e,n){var i=t.call(this)||this;return i._parentView=e,i._def=n,i}return r(e,t),e.prototype.createEmbeddedView=function(t){return new ko(fr.createEmbeddedView(this._parentView,this._def,this._def.element.template,t))},Object.defineProperty(e.prototype,"elementRef",{get:function(){return new ei(cr(this._parentView,this._def.nodeIndex).renderElement)},enumerable:!0,configurable:!0}),e}(ii);function Oo(t,e){return new Io(t,e)}var Io=function(){function t(t,e){this.view=t,this.elDef=e}return t.prototype.get=function(t,e){return void 0===e&&(e=Zt.THROW_IF_NOT_FOUND),fr.resolveDep(this.view,this.elDef,!!this.elDef&&0!=(33554432&this.elDef.flags),{flags:0,token:t,tokenKey:_r(t)},e)},t}();function Ao(t,e){var n=t.def.nodes[e];if(1&n.flags){var i=cr(t,n.nodeIndex);return n.element.template?i.template:i.renderElement}if(2&n.flags)return ur(t,n.nodeIndex).renderText;if(20240&n.flags)return hr(t,n.nodeIndex).instance;throw new Error("Illegal state: read nodeValue for node index "+e)}function Po(t){return new Do(t.renderer)}var Do=function(){function t(t){this.delegate=t}return t.prototype.selectRootElement=function(t){return this.delegate.selectRootElement(t)},t.prototype.createElement=function(t,e){var n=c(Kr(e),2),i=this.delegate.createElement(n[1],n[0]);return t&&this.delegate.appendChild(t,i),i},t.prototype.createViewRoot=function(t){return t},t.prototype.createTemplateAnchor=function(t){var e=this.delegate.createComment("");return t&&this.delegate.appendChild(t,e),e},t.prototype.createText=function(t,e){var n=this.delegate.createText(e);return t&&this.delegate.appendChild(t,n),n},t.prototype.projectNodes=function(t,e){for(var n=0;n<e.length;n++)this.delegate.appendChild(t,e[n])},t.prototype.attachViewAfter=function(t,e){for(var n=this.delegate.parentNode(t),i=this.delegate.nextSibling(t),r=0;r<e.length;r++)this.delegate.insertBefore(n,e[r],i)},t.prototype.detachView=function(t){for(var e=0;e<t.length;e++){var n=t[e],i=this.delegate.parentNode(n);this.delegate.removeChild(i,n)}},t.prototype.destroyView=function(t,e){for(var n=0;n<e.length;n++)this.delegate.destroyNode(e[n])},t.prototype.listen=function(t,e,n){return this.delegate.listen(t,e,n)},t.prototype.listenGlobal=function(t,e,n){return this.delegate.listen(t,e,n)},t.prototype.setElementProperty=function(t,e,n){this.delegate.setProperty(t,e,n)},t.prototype.setElementAttribute=function(t,e,n){var i=c(Kr(e),2),r=i[0],o=i[1];null!=n?this.delegate.setAttribute(t,o,n,r):this.delegate.removeAttribute(t,o,r)},t.prototype.setBindingDebugInfo=function(t,e,n){},t.prototype.setElementClass=function(t,e,n){n?this.delegate.addClass(t,e):this.delegate.removeClass(t,e)},t.prototype.setElementStyle=function(t,e,n){null!=n?this.delegate.setStyle(t,e,n):this.delegate.removeStyle(t,e)},t.prototype.invokeElementMethod=function(t,e,n){t[e].apply(t,n)},t.prototype.setText=function(t,e){this.delegate.setValue(t,e)},t.prototype.animate=function(){throw new Error("Renderer.animate is no longer supported!")},t}();function jo(t,e,n,i){return new Mo(t,e,n,i)}var Mo=function(){function t(t,e,n,i){this._moduleType=t,this._parent=e,this._bootstrapComponents=n,this._def=i,this._destroyListeners=[],this._destroyed=!1,this.injector=this,function(t){for(var e=t._def,n=t._providers=new Array(e.providers.length),i=0;i<e.providers.length;i++){var r=e.providers[i];4096&r.flags||void 0===n[i]&&(n[i]=ho(t,r))}}(this)}return t.prototype.get=function(t,e,n){void 0===e&&(e=Zt.THROW_IF_NOT_FOUND),void 0===n&&(n=0);var i=0;return 4&n?i|=1:2&n&&(i|=4),co(this,{token:t,tokenKey:_r(t),flags:i},e)},Object.defineProperty(t.prototype,"instance",{get:function(){return this.get(this._moduleType)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"componentFactoryResolver",{get:function(){return this.get(_n)},enumerable:!0,configurable:!0}),t.prototype.destroy=function(){if(this._destroyed)throw new Error("The ng module "+Pt(this.instance.constructor)+" has already been destroyed.");this._destroyed=!0,function(t,e){for(var n=t._def,i=new Set,r=0;r<n.providers.length;r++)if(131072&n.providers[r].flags){var o=t._providers[r];if(o&&o!==oo){var s=o.ngOnDestroy;"function"!=typeof s||i.has(o)||(s.apply(o),i.add(o))}}}(this),this._destroyListeners.forEach(function(t){return t()})},t.prototype.onDestroy=function(t){this._destroyListeners.push(t)},t}(),Ro=_r(function(){}),Fo=_r(ti),No=_r(ei),Lo=_r(ri),Bo=_r(ii),Vo=_r(oi),zo=_r(Zt),Ho=_r(Gt);function Wo(t,e,n,i,r,o,s,a){var l=[];if(s)for(var u in s){var h=c(s[u],2);l[h[0]]={flags:8,name:u,nonMinifiedName:h[1],ns:null,securityContext:null,suffix:null}}var p=[];if(a)for(var d in a)p.push({type:1,propName:d,target:null,eventName:a[d]});return Yo(t,e|=16384,n,i,r,r,o,l,p)}function Uo(t,e,n){return Yo(-1,t|=16,null,0,e,e,n)}function Xo(t,e,n,i,r){return Yo(-1,t,e,0,n,i,r)}function Yo(t,e,n,i,r,o,s,a,l){var u=Lr(n),c=u.matchedQueries,h=u.references,p=u.matchedQueryIds;l||(l=[]),a||(a=[]),o=Bt(o);var d=Br(s,Pt(r));return{nodeIndex:-1,parent:null,renderParent:null,bindingIndex:-1,outputIndex:-1,checkIndex:t,flags:e,childFlags:0,directChildFlags:0,childMatchedQueries:0,matchedQueries:c,matchedQueryIds:p,references:h,ngContentIndex:-1,childCount:i,bindings:a,bindingFlags:Zr(a),outputs:l,element:null,provider:{token:r,value:o,deps:d},text:null,query:null,ngContent:null}}function qo(t,e){return Qo(t,e)}function Go(t,e){for(var n=t;n.parent&&!Rr(n);)n=n.parent;return Jo(n.parent,jr(n),!0,e.provider.value,e.provider.deps)}function Ko(t,e){var n=Jo(t,e.parent,(32768&e.flags)>0,e.provider.value,e.provider.deps);if(e.outputs.length)for(var i=0;i<e.outputs.length;i++){var r=e.outputs[i],o=n[r.propName].subscribe(Zo(t,e.parent.nodeIndex,r.eventName));t.disposables[e.outputIndex+i]=o.unsubscribe.bind(o)}return n}function Zo(t,e,n){return function(i){return Pr(t,e,n,i)}}function Qo(t,e){var n=(8192&e.flags)>0,i=e.provider;switch(201347067&e.flags){case 512:return Jo(t,e.parent,n,i.value,i.deps);case 1024:return function(t,e,n,i,r){var o=r.length;switch(o){case 0:return i();case 1:return i(ts(t,e,n,r[0]));case 2:return i(ts(t,e,n,r[0]),ts(t,e,n,r[1]));case 3:return i(ts(t,e,n,r[0]),ts(t,e,n,r[1]),ts(t,e,n,r[2]));default:for(var s=Array(o),a=0;a<o;a++)s[a]=ts(t,e,n,r[a]);return i.apply(void 0,h(s))}}(t,e.parent,n,i.value,i.deps);case 2048:return ts(t,e.parent,n,i.deps[0]);case 256:return i.value}}function Jo(t,e,n,i,r){var o=r.length;switch(o){case 0:return new i;case 1:return new i(ts(t,e,n,r[0]));case 2:return new i(ts(t,e,n,r[0]),ts(t,e,n,r[1]));case 3:return new i(ts(t,e,n,r[0]),ts(t,e,n,r[1]),ts(t,e,n,r[2]));default:for(var s=new Array(o),a=0;a<o;a++)s[a]=ts(t,e,n,r[a]);return new(i.bind.apply(i,h([void 0],s)))}}var $o={};function ts(t,e,n,i,r){if(void 0===r&&(r=Zt.THROW_IF_NOT_FOUND),8&i.flags)return i.token;var o=t;2&i.flags&&(r=null);var s=i.tokenKey;s===Vo&&(n=!(!e||!e.element.componentView)),e&&1&i.flags&&(n=!1,e=e.parent);for(var a=t;a;){if(e)switch(s){case Ro:return Po(es(a,e,n));case Fo:return es(a,e,n).renderer;case No:return new ei(cr(a,e.nodeIndex).renderElement);case Lo:return cr(a,e.nodeIndex).viewContainer;case Bo:if(e.element.template)return cr(a,e.nodeIndex).template;break;case Vo:return So(es(a,e,n));case zo:case Ho:return Oo(a,e);default:var l=(n?e.element.allProviders:e.element.publicProviders)[s];if(l){var u=hr(a,l.nodeIndex);return u||(u={instance:Qo(a,l)},a.nodes[l.nodeIndex]=u),u.instance}}n=Rr(a),e=jr(a),a=a.parent,4&i.flags&&(a=null)}var c=o.root.injector.get(i.token,$o);return c!==$o||r===$o?c:o.root.ngModule.injector.get(i.token,r)}function es(t,e,n){var i;if(n)i=cr(t,e.nodeIndex).componentView;else for(i=t;i.parent&&!Rr(i);)i=i.parent;return i}function ns(t,e,n,i,r,o){if(32768&n.flags){var s=cr(t,n.parent.nodeIndex).componentView;2&s.def.flags&&(s.state|=8)}if(e.instance[n.bindings[i].name]=r,524288&n.flags){o=o||{};var a=pi.unwrap(t.oldValues[n.bindingIndex+i]);o[n.bindings[i].nonMinifiedName]=new di(a,r,0!=(2&t.state))}return t.oldValues[n.bindingIndex+i]=r,o}function is(t,e){if(t.def.nodeFlags&e)for(var n=t.def.nodes,i=0,r=0;r<n.length;r++){var o=n[r],s=o.parent;for(!s&&o.flags&e&&os(t,r,o.flags&e,i++),0==(o.childFlags&e)&&(r+=o.childCount);s&&1&s.flags&&r===s.nodeIndex+s.childCount;)s.directChildFlags&e&&(i=rs(t,s,e,i)),s=s.parent}}function rs(t,e,n,i){for(var r=e.nodeIndex+1;r<=e.nodeIndex+e.childCount;r++){var o=t.def.nodes[r];o.flags&n&&os(t,r,o.flags&n,i++),r+=o.childCount}return i}function os(t,e,n,i){var r=hr(t,e);if(r){var o=r.instance;o&&(fr.setCurrentNode(t,e),1048576&n&&lr(t,512,i)&&o.ngAfterContentInit(),2097152&n&&o.ngAfterContentChecked(),4194304&n&&lr(t,768,i)&&o.ngAfterViewInit(),8388608&n&&o.ngAfterViewChecked(),131072&n&&o.ngOnDestroy())}}function ss(t,e,n){var i=[];for(var r in n)i.push({propName:r,bindingType:n[r]});return{nodeIndex:-1,parent:null,renderParent:null,bindingIndex:-1,outputIndex:-1,checkIndex:-1,flags:t,childFlags:0,directChildFlags:0,childMatchedQueries:0,ngContentIndex:-1,matchedQueries:{},matchedQueryIds:0,references:{},childCount:0,bindings:[],bindingFlags:0,outputs:[],element:null,provider:null,text:null,query:{id:e,filterId:Nr(e),bindings:i},ngContent:null}}function as(t){for(var e=t.def.nodeMatchedQueries;t.parent&&Fr(t);){var n=t.parentNodeDef;t=t.parent;for(var i=n.nodeIndex+n.childCount,r=0;r<=i;r++)67108864&(o=t.def.nodes[r]).flags&&536870912&o.flags&&(o.query.filterId&e)===o.query.filterId&&dr(t,r).setDirty(),!(1&o.flags&&r+o.childCount<n.nodeIndex)&&67108864&o.childFlags&&536870912&o.childFlags||(r+=o.childCount)}if(134217728&t.def.nodeFlags)for(r=0;r<t.def.nodes.length;r++){var o;134217728&(o=t.def.nodes[r]).flags&&536870912&o.flags&&dr(t,r).setDirty(),r+=o.childCount}}function ls(t,e){var n=dr(t,e.nodeIndex);if(n.dirty){var i,r=void 0;if(67108864&e.flags){var o=e.parent.parent;r=us(t,o.nodeIndex,o.nodeIndex+o.childCount,e.query,[]),i=hr(t,e.parent.nodeIndex).instance}else 134217728&e.flags&&(r=us(t,0,t.def.nodes.length-1,e.query,[]),i=t.component);n.reset(r);for(var s=e.query.bindings,a=!1,l=0;l<s.length;l++){var u=s[l],c=void 0;switch(u.bindingType){case 0:c=n.first;break;case 1:c=n,a=!0}i[u.propName]=c}a&&n.notifyOnChanges()}}function us(t,e,n,i,r){for(var o=e;o<=n;o++){var s=t.def.nodes[o],a=s.matchedQueries[i.id];if(null!=a&&r.push(cs(t,s,a)),1&s.flags&&s.element.template&&(s.element.template.nodeMatchedQueries&i.filterId)===i.filterId){var l=cr(t,o);if((s.childMatchedQueries&i.filterId)===i.filterId&&(us(t,o+1,o+s.childCount,i,r),o+=s.childCount),16777216&s.flags)for(var u=l.viewContainer._embeddedViews,c=0;c<u.length;c++){var h=u[c],p=Dr(h);p&&p===l&&us(h,0,h.def.nodes.length-1,i,r)}var d=l.template._projectedViews;if(d)for(c=0;c<d.length;c++){var f=d[c];us(f,0,f.def.nodes.length-1,i,r)}}(s.childMatchedQueries&i.filterId)!==i.filterId&&(o+=s.childCount)}return r}function cs(t,e,n){if(null!=n)switch(n){case 1:return cr(t,e.nodeIndex).renderElement;case 0:return new ei(cr(t,e.nodeIndex).renderElement);case 2:return cr(t,e.nodeIndex).template;case 3:return cr(t,e.nodeIndex).viewContainer;case 4:return hr(t,e.nodeIndex).instance}}function hs(t,e){return{nodeIndex:-1,parent:null,renderParent:null,bindingIndex:-1,outputIndex:-1,checkIndex:-1,flags:8,childFlags:0,directChildFlags:0,childMatchedQueries:0,matchedQueries:{},matchedQueryIds:0,references:{},ngContentIndex:t,childCount:0,bindings:[],bindingFlags:0,outputs:[],element:null,provider:null,text:null,query:null,ngContent:{index:e}}}function ps(t,e,n){var i=Vr(t,e,n);i&&Xr(t,n.ngContent.index,1,i,null,void 0)}function ds(t,e){return gs(128,t,new Array(e+1))}function fs(t,e){for(var n=Object.keys(e),i=n.length,r=new Array(i),o=0;o<i;o++){var s=n[o];r[e[s]]=s}return gs(64,t,r)}function gs(t,e,n){for(var i=new Array(n.length),r=0;r<n.length;r++){var o=n[r];i[r]={flags:8,name:o,ns:null,nonMinifiedName:o,securityContext:null,suffix:null}}return{nodeIndex:-1,parent:null,renderParent:null,bindingIndex:-1,outputIndex:-1,checkIndex:e,flags:t,childFlags:0,directChildFlags:0,childMatchedQueries:0,matchedQueries:{},matchedQueryIds:0,references:{},ngContentIndex:-1,childCount:0,bindings:i,bindingFlags:Zr(i),outputs:[],element:null,provider:null,text:null,query:null,ngContent:null}}function ms(t,e,n){for(var i=new Array(n.length-1),r=1;r<n.length;r++)i[r-1]={flags:8,name:null,ns:null,nonMinifiedName:null,securityContext:null,suffix:n[r]};return{nodeIndex:-1,parent:null,renderParent:null,bindingIndex:-1,outputIndex:-1,checkIndex:t,flags:2,childFlags:0,directChildFlags:0,childMatchedQueries:0,matchedQueries:{},matchedQueryIds:0,references:{},ngContentIndex:e,childCount:0,bindings:i,bindingFlags:8,outputs:[],element:null,provider:null,text:{prefix:n[0]},query:null,ngContent:null}}function vs(t,e,n){var i,r=t.renderer;i=r.createText(n.text.prefix);var o=Vr(t,e,n);return o&&r.appendChild(o,i),{renderText:i}}function ys(t,e){return(null!=t?t.toString():"")+e.suffix}function bs(t,e,n,i){for(var r=0,o=0,s=0,a=0,l=0,u=null,c=null,h=!1,p=!1,d=null,f=0;f<e.length;f++){var g=e[f];if(g.nodeIndex=f,g.parent=u,g.bindingIndex=r,g.outputIndex=o,g.renderParent=c,s|=g.flags,l|=g.matchedQueryIds,g.element){var m=g.element;m.publicProviders=u?u.element.publicProviders:Object.create(null),m.allProviders=m.publicProviders,h=!1,p=!1,g.element.template&&(l|=g.element.template.nodeMatchedQueries)}if(ws(u,g,e.length),r+=g.bindings.length,o+=g.outputs.length,!c&&3&g.flags&&(d=g),20224&g.flags){h||(h=!0,u.element.publicProviders=Object.create(u.element.publicProviders),u.element.allProviders=u.element.publicProviders);var v=0!=(32768&g.flags);0==(8192&g.flags)||v?u.element.publicProviders[_r(g.provider.token)]=g:(p||(p=!0,u.element.allProviders=Object.create(u.element.publicProviders)),u.element.allProviders[_r(g.provider.token)]=g),v&&(u.element.componentProvider=g)}if(u?(u.childFlags|=g.flags,u.directChildFlags|=g.flags,u.childMatchedQueries|=g.matchedQueryIds,g.element&&g.element.template&&(u.childMatchedQueries|=g.element.template.nodeMatchedQueries)):a|=g.flags,g.childCount>0)u=g,_s(g)||(c=g);else for(;u&&f===u.nodeIndex+u.childCount;){var y=u.parent;y&&(y.childFlags|=u.childFlags,y.childMatchedQueries|=u.childMatchedQueries),c=(u=y)&&_s(u)?u.renderParent:u}}return{factory:null,nodeFlags:s,rootNodeFlags:a,nodeMatchedQueries:l,flags:t,nodes:e,updateDirectives:n||yr,updateRenderer:i||yr,handleEvent:function(t,n,i,r){return e[n].element.handleEvent(t,i,r)},bindingCount:r,outputCount:o,lastRenderRootNode:d}}function _s(t){return 0!=(1&t.flags)&&null===t.element.name}function ws(t,e,n){var i=e.element&&e.element.template;if(i){if(!i.lastRenderRootNode)throw new Error("Illegal State: Embedded templates without nodes are not allowed!");if(i.lastRenderRootNode&&16777216&i.lastRenderRootNode.flags)throw new Error("Illegal State: Last root node of a template can't have embedded views, at index "+e.nodeIndex+"!")}if(20224&e.flags&&0==(1&(t?t.flags:0)))throw new Error("Illegal State: StaticProvider/Directive nodes need to be children of elements or anchors, at index "+e.nodeIndex+"!");if(e.query){if(67108864&e.flags&&(!t||0==(16384&t.flags)))throw new Error("Illegal State: Content Query nodes need to be children of directives, at index "+e.nodeIndex+"!");if(134217728&e.flags&&t)throw new Error("Illegal State: View Query nodes have to be top level nodes, at index "+e.nodeIndex+"!")}if(e.childCount){var r=t?t.nodeIndex+t.childCount:n-1;if(e.nodeIndex<=r&&e.nodeIndex+e.childCount>r)throw new Error("Illegal State: childCount of node leads outside of parent, at index "+e.nodeIndex+"!")}}function xs(t,e,n,i){var r=ks(t.root,t.renderer,t,e,n);return Es(r,t.component,i),Ts(r),r}function Cs(t,e,n){var i=ks(t,t.renderer,null,null,e);return Es(i,n,n),Ts(i),i}function Ss(t,e,n,i){var r,o=e.element.componentRendererType;return r=o?t.root.rendererFactory.createRenderer(i,o):t.root.renderer,ks(t.root,r,t,e.element.componentProvider,n)}function ks(t,e,n,i,r){var o=new Array(r.nodes.length),s=r.outputCount?new Array(r.outputCount):null;return{def:r,parent:n,viewContainerParent:null,parentNodeDef:i,context:null,component:null,nodes:o,state:13,root:t,renderer:e,oldValues:new Array(r.bindingCount),disposables:s,initIndex:-1}}function Es(t,e,n){t.component=e,t.context=n}function Ts(t){var e;Rr(t)&&(e=cr(t.parent,t.parentNodeDef.parent.nodeIndex).renderElement);for(var n=t.def,i=t.nodes,r=0;r<n.nodes.length;r++){var o=n.nodes[r];fr.setCurrentNode(t,r);var s=void 0;switch(201347067&o.flags){case 1:var a=eo(t,e,o),l=void 0;if(33554432&o.flags){var u=Hr(o.element.componentView);l=fr.createComponentView(t,o,u,a)}no(t,l,o,a),s={renderElement:a,componentView:l,viewContainer:null,template:o.element.template?Eo(t,o):void 0},16777216&o.flags&&(s.viewContainer=xo(t,o,s));break;case 2:s=vs(t,e,o);break;case 512:case 1024:case 2048:case 256:(s=i[r])||4096&o.flags||(s={instance:qo(t,o)});break;case 16:s={instance:Go(t,o)};break;case 16384:(s=i[r])||(s={instance:Ko(t,o)}),32768&o.flags&&Es(cr(t,o.parent.nodeIndex).componentView,s.instance,s.instance);break;case 32:case 64:case 128:s={value:void 0};break;case 67108864:case 134217728:s=new ni;break;case 8:ps(t,e,o),s=void 0}i[r]=s}Fs(t,Rs.CreateViewNodes),Vs(t,201326592,268435456,0)}function Os(t){Ps(t),fr.updateDirectives(t,1),Ns(t,Rs.CheckNoChanges),fr.updateRenderer(t,1),Fs(t,Rs.CheckNoChanges),t.state&=-97}function Is(t){1&t.state?(t.state&=-2,t.state|=2):t.state&=-3,ar(t,0,256),Ps(t),fr.updateDirectives(t,0),Ns(t,Rs.CheckAndUpdate),Vs(t,67108864,536870912,0);var e=ar(t,256,512);is(t,2097152|(e?1048576:0)),fr.updateRenderer(t,0),Fs(t,Rs.CheckAndUpdate),Vs(t,134217728,536870912,0),is(t,8388608|((e=ar(t,512,768))?4194304:0)),2&t.def.flags&&(t.state&=-9),t.state&=-97,ar(t,768,1024)}function As(t,e,n,i,r,o,s,a,l,u,c,p,d){return 0===n?function(t,e,n,i,r,o,s,a,l,u,c,h){switch(201347067&e.flags){case 1:return function(t,e,n,i,r,o,s,a,l,u,c,h){var p=e.bindings.length,d=!1;return p>0&&ro(t,e,0,n)&&(d=!0),p>1&&ro(t,e,1,i)&&(d=!0),p>2&&ro(t,e,2,r)&&(d=!0),p>3&&ro(t,e,3,o)&&(d=!0),p>4&&ro(t,e,4,s)&&(d=!0),p>5&&ro(t,e,5,a)&&(d=!0),p>6&&ro(t,e,6,l)&&(d=!0),p>7&&ro(t,e,7,u)&&(d=!0),p>8&&ro(t,e,8,c)&&(d=!0),p>9&&ro(t,e,9,h)&&(d=!0),d}(t,e,n,i,r,o,s,a,l,u,c,h);case 2:return function(t,e,n,i,r,o,s,a,l,u,c,h){var p=!1,d=e.bindings,f=d.length;if(f>0&&Tr(t,e,0,n)&&(p=!0),f>1&&Tr(t,e,1,i)&&(p=!0),f>2&&Tr(t,e,2,r)&&(p=!0),f>3&&Tr(t,e,3,o)&&(p=!0),f>4&&Tr(t,e,4,s)&&(p=!0),f>5&&Tr(t,e,5,a)&&(p=!0),f>6&&Tr(t,e,6,l)&&(p=!0),f>7&&Tr(t,e,7,u)&&(p=!0),f>8&&Tr(t,e,8,c)&&(p=!0),f>9&&Tr(t,e,9,h)&&(p=!0),p){var g=e.text.prefix;f>0&&(g+=ys(n,d[0])),f>1&&(g+=ys(i,d[1])),f>2&&(g+=ys(r,d[2])),f>3&&(g+=ys(o,d[3])),f>4&&(g+=ys(s,d[4])),f>5&&(g+=ys(a,d[5])),f>6&&(g+=ys(l,d[6])),f>7&&(g+=ys(u,d[7])),f>8&&(g+=ys(c,d[8])),f>9&&(g+=ys(h,d[9]));var m=ur(t,e.nodeIndex).renderText;t.renderer.setValue(m,g)}return p}(t,e,n,i,r,o,s,a,l,u,c,h);case 16384:return function(t,e,n,i,r,o,s,a,l,u,c,h){var p=hr(t,e.nodeIndex),d=p.instance,f=!1,g=void 0,m=e.bindings.length;return m>0&&Er(t,e,0,n)&&(f=!0,g=ns(t,p,e,0,n,g)),m>1&&Er(t,e,1,i)&&(f=!0,g=ns(t,p,e,1,i,g)),m>2&&Er(t,e,2,r)&&(f=!0,g=ns(t,p,e,2,r,g)),m>3&&Er(t,e,3,o)&&(f=!0,g=ns(t,p,e,3,o,g)),m>4&&Er(t,e,4,s)&&(f=!0,g=ns(t,p,e,4,s,g)),m>5&&Er(t,e,5,a)&&(f=!0,g=ns(t,p,e,5,a,g)),m>6&&Er(t,e,6,l)&&(f=!0,g=ns(t,p,e,6,l,g)),m>7&&Er(t,e,7,u)&&(f=!0,g=ns(t,p,e,7,u,g)),m>8&&Er(t,e,8,c)&&(f=!0,g=ns(t,p,e,8,c,g)),m>9&&Er(t,e,9,h)&&(f=!0,g=ns(t,p,e,9,h,g)),g&&d.ngOnChanges(g),65536&e.flags&&lr(t,256,e.nodeIndex)&&d.ngOnInit(),262144&e.flags&&d.ngDoCheck(),f}(t,e,n,i,r,o,s,a,l,u,c,h);case 32:case 64:case 128:return function(t,e,n,i,r,o,s,a,l,u,c,h){var p=e.bindings,d=!1,f=p.length;if(f>0&&Tr(t,e,0,n)&&(d=!0),f>1&&Tr(t,e,1,i)&&(d=!0),f>2&&Tr(t,e,2,r)&&(d=!0),f>3&&Tr(t,e,3,o)&&(d=!0),f>4&&Tr(t,e,4,s)&&(d=!0),f>5&&Tr(t,e,5,a)&&(d=!0),f>6&&Tr(t,e,6,l)&&(d=!0),f>7&&Tr(t,e,7,u)&&(d=!0),f>8&&Tr(t,e,8,c)&&(d=!0),f>9&&Tr(t,e,9,h)&&(d=!0),d){var g=pr(t,e.nodeIndex),m=void 0;switch(201347067&e.flags){case 32:m=new Array(p.length),f>0&&(m[0]=n),f>1&&(m[1]=i),f>2&&(m[2]=r),f>3&&(m[3]=o),f>4&&(m[4]=s),f>5&&(m[5]=a),f>6&&(m[6]=l),f>7&&(m[7]=u),f>8&&(m[8]=c),f>9&&(m[9]=h);break;case 64:m={},f>0&&(m[p[0].name]=n),f>1&&(m[p[1].name]=i),f>2&&(m[p[2].name]=r),f>3&&(m[p[3].name]=o),f>4&&(m[p[4].name]=s),f>5&&(m[p[5].name]=a),f>6&&(m[p[6].name]=l),f>7&&(m[p[7].name]=u),f>8&&(m[p[8].name]=c),f>9&&(m[p[9].name]=h);break;case 128:var v=n;switch(f){case 1:m=v.transform(n);break;case 2:m=v.transform(i);break;case 3:m=v.transform(i,r);break;case 4:m=v.transform(i,r,o);break;case 5:m=v.transform(i,r,o,s);break;case 6:m=v.transform(i,r,o,s,a);break;case 7:m=v.transform(i,r,o,s,a,l);break;case 8:m=v.transform(i,r,o,s,a,l,u);break;case 9:m=v.transform(i,r,o,s,a,l,u,c);break;case 10:m=v.transform(i,r,o,s,a,l,u,c,h)}}g.value=m}return d}(t,e,n,i,r,o,s,a,l,u,c,h);default:throw"unreachable"}}(t,e,i,r,o,s,a,l,u,c,p,d):function(t,e,n){switch(201347067&e.flags){case 1:return function(t,e,n){for(var i=!1,r=0;r<n.length;r++)ro(t,e,r,n[r])&&(i=!0);return i}(t,e,n);case 2:return function(t,e,n){for(var i=e.bindings,r=!1,o=0;o<n.length;o++)Tr(t,e,o,n[o])&&(r=!0);if(r){var s="";for(o=0;o<n.length;o++)s+=ys(n[o],i[o]);s=e.text.prefix+s;var a=ur(t,e.nodeIndex).renderText;t.renderer.setValue(a,s)}return r}(t,e,n);case 16384:return function(t,e,n){for(var i=hr(t,e.nodeIndex),r=i.instance,o=!1,s=void 0,a=0;a<n.length;a++)Er(t,e,a,n[a])&&(o=!0,s=ns(t,i,e,a,n[a],s));return s&&r.ngOnChanges(s),65536&e.flags&&lr(t,256,e.nodeIndex)&&r.ngOnInit(),262144&e.flags&&r.ngDoCheck(),o}(t,e,n);case 32:case 64:case 128:return function(t,e,n){for(var i=e.bindings,r=!1,o=0;o<n.length;o++)Tr(t,e,o,n[o])&&(r=!0);if(r){var s=pr(t,e.nodeIndex),a=void 0;switch(201347067&e.flags){case 32:a=n;break;case 64:for(a={},o=0;o<n.length;o++)a[i[o].name]=n[o];break;case 128:var l=n[0],u=n.slice(1);a=l.transform.apply(l,h(u))}s.value=a}return r}(t,e,n);default:throw"unreachable"}}(t,e,i)}function Ps(t){var e=t.def;if(4&e.nodeFlags)for(var n=0;n<e.nodes.length;n++){var i=e.nodes[n];if(4&i.flags){var r=cr(t,n).template._projectedViews;if(r)for(var o=0;o<r.length;o++){var s=r[o];s.state|=32,Ar(s,t)}}else 0==(4&i.childFlags)&&(n+=i.childCount)}}function Ds(t,e,n,i,r,o,s,a,l,u,c,h,p){return 0===n?function(t,e,n,i,r,o,s,a,l,u,c,h){var p=e.bindings.length;p>0&&Or(t,e,0,n),p>1&&Or(t,e,1,i),p>2&&Or(t,e,2,r),p>3&&Or(t,e,3,o),p>4&&Or(t,e,4,s),p>5&&Or(t,e,5,a),p>6&&Or(t,e,6,l),p>7&&Or(t,e,7,u),p>8&&Or(t,e,8,c),p>9&&Or(t,e,9,h)}(t,e,i,r,o,s,a,l,u,c,h,p):function(t,e,n){for(var i=0;i<n.length;i++)Or(t,e,i,n[i])}(t,e,i),!1}function js(t,e){if(dr(t,e.nodeIndex).dirty)throw gr(fr.createDebugContext(t,e.nodeIndex),"Query "+e.query.id+" not dirty","Query "+e.query.id+" dirty",0!=(1&t.state))}function Ms(t){if(!(128&t.state)){if(Ns(t,Rs.Destroy),Fs(t,Rs.Destroy),is(t,131072),t.disposables)for(var e=0;e<t.disposables.length;e++)t.disposables[e]();!function(t){if(16&t.state){var e=Dr(t);if(e){var n=e.template._projectedViews;n&&(vo(n,n.indexOf(t)),fr.dirtyParentQueries(t))}}}(t),t.renderer.destroyNode&&function(t){for(var e=t.def.nodes.length,n=0;n<e;n++){var i=t.def.nodes[n];1&i.flags?t.renderer.destroyNode(cr(t,n).renderElement):2&i.flags?t.renderer.destroyNode(ur(t,n).renderText):(67108864&i.flags||134217728&i.flags)&&dr(t,n).destroy()}}(t),Rr(t)&&t.renderer.destroy(),t.state|=128}}var Rs=function(t){return t[t.CreateViewNodes=0]="CreateViewNodes",t[t.CheckNoChanges=1]="CheckNoChanges",t[t.CheckNoChangesProjectedViews=2]="CheckNoChangesProjectedViews",t[t.CheckAndUpdate=3]="CheckAndUpdate",t[t.CheckAndUpdateProjectedViews=4]="CheckAndUpdateProjectedViews",t[t.Destroy=5]="Destroy",t}({});function Fs(t,e){var n=t.def;if(33554432&n.nodeFlags)for(var i=0;i<n.nodes.length;i++){var r=n.nodes[i];33554432&r.flags?Ls(cr(t,i).componentView,e):0==(33554432&r.childFlags)&&(i+=r.childCount)}}function Ns(t,e){var n=t.def;if(16777216&n.nodeFlags)for(var i=0;i<n.nodes.length;i++){var r=n.nodes[i];if(16777216&r.flags)for(var o=cr(t,i).viewContainer._embeddedViews,s=0;s<o.length;s++)Ls(o[s],e);else 0==(16777216&r.childFlags)&&(i+=r.childCount)}}function Ls(t,e){var n=t.state;switch(e){case Rs.CheckNoChanges:0==(128&n)&&(12==(12&n)?Os(t):64&n&&Bs(t,Rs.CheckNoChangesProjectedViews));break;case Rs.CheckNoChangesProjectedViews:0==(128&n)&&(32&n?Os(t):64&n&&Bs(t,e));break;case Rs.CheckAndUpdate:0==(128&n)&&(12==(12&n)?Is(t):64&n&&Bs(t,Rs.CheckAndUpdateProjectedViews));break;case Rs.CheckAndUpdateProjectedViews:0==(128&n)&&(32&n?Is(t):64&n&&Bs(t,e));break;case Rs.Destroy:Ms(t);break;case Rs.CreateViewNodes:Ts(t)}}function Bs(t,e){Ns(t,e),Fs(t,e)}function Vs(t,e,n,i){if(t.def.nodeFlags&e&&t.def.nodeFlags&n)for(var r=t.def.nodes.length,o=0;o<r;o++){var s=t.def.nodes[o];if(s.flags&e&&s.flags&n)switch(fr.setCurrentNode(t,s.nodeIndex),i){case 0:ls(t,s);break;case 1:js(t,s)}s.childFlags&e&&s.childFlags&n||(o+=s.childCount)}}var zs=!1;function Hs(t,e,n,i,r,o){return Cs(Us(t,r,r.injector.get(Jn),e,n),i,o)}function Ws(t,e,n,i,r,o){var s=r.injector.get(Jn),a=Us(t,r,new Sa(s),e,n),l=ta(i);return xa(ua.create,Cs,null,[a,l,o])}function Us(t,e,n,i,r){var o=e.injector.get(sr),s=e.injector.get(xe);return{ngModule:e,injector:t,projectableNodes:i,selectorOrNode:r,sanitizer:o,rendererFactory:n,renderer:n.createRenderer(null,null),errorHandler:s}}function Xs(t,e,n,i){var r=ta(n);return xa(ua.create,xs,null,[t,e,r,i])}function Ys(t,e,n,i){return n=Zs.get(e.element.componentProvider.provider.token)||ta(n),xa(ua.create,Ss,null,[t,e,n,i])}function qs(t,e,n,i){return jo(t,e,n,function(t){var e=function(t){var e=!1,n=!1;return 0===Gs.size?{hasOverrides:e,hasDeprecatedOverrides:n}:(t.providers.forEach(function(t){var i=Gs.get(t.token);3840&t.flags&&i&&(e=!0,n=n||i.deprecatedBehavior)}),t.modules.forEach(function(t){Ks.forEach(function(i,r){r.ngInjectableDef.providedIn===t&&(e=!0,n=n||i.deprecatedBehavior)})}),{hasOverrides:e,hasDeprecatedOverrides:n})}(t),n=e.hasDeprecatedOverrides;return e.hasOverrides?(function(t){for(var e=0;e<t.providers.length;e++){var i=t.providers[e];n&&(i.flags|=4096);var r=Gs.get(i.token);r&&(i.flags=-3841&i.flags|r.flags,i.deps=Br(r.deps),i.value=r.value)}if(Ks.size>0){var o=new Set(t.modules);Ks.forEach(function(e,i){if(o.has(i.ngInjectableDef.providedIn)){var r={token:i,flags:e.flags|(n?4096:0),deps:Br(e.deps),value:e.value,index:t.providers.length};t.providers.push(r),t.providersByKey[_r(i)]=r}})}}(t=t.factory(function(){return yr})),t):t}(i))}var Gs=new Map,Ks=new Map,Zs=new Map;function Qs(t){Gs.set(t.token,t),"function"==typeof t.token&&t.token.ngInjectableDef&&"function"==typeof t.token.ngInjectableDef.providedIn&&Ks.set(t.token,t)}function Js(t,e){var n=Hr(Hr(e.viewDefFactory).nodes[0].element.componentView);Zs.set(t,n)}function $s(){Gs.clear(),Ks.clear(),Zs.clear()}function ta(t){if(0===Gs.size)return t;var e=function(t){for(var e=[],n=null,i=0;i<t.nodes.length;i++){var r=t.nodes[i];1&r.flags&&(n=r),n&&3840&r.flags&&Gs.has(r.provider.token)&&(e.push(n.nodeIndex),n=null)}return e}(t);if(0===e.length)return t;t=t.factory(function(){return yr});for(var n=0;n<e.length;n++)i(t,e[n]);return t;function i(t,e){for(var n=e+1;n<t.nodes.length;n++){var i=t.nodes[n];if(1&i.flags)return;if(3840&i.flags){var r=i.provider,o=Gs.get(r.token);o&&(i.flags=-3841&i.flags|o.flags,r.deps=Br(o.deps),r.value=o.value)}}}}function ea(t,e,n,i,r,o,s,a,l,u,c,h,p){var d=t.def.nodes[e];return As(t,d,n,i,r,o,s,a,l,u,c,h,p),224&d.flags?pr(t,e).value:void 0}function na(t,e,n,i,r,o,s,a,l,u,c,h,p){var d=t.def.nodes[e];return Ds(t,d,n,i,r,o,s,a,l,u,c,h,p),224&d.flags?pr(t,e).value:void 0}function ia(t){return xa(ua.detectChanges,Is,null,[t])}function ra(t){return xa(ua.checkNoChanges,Os,null,[t])}function oa(t){return xa(ua.destroy,Ms,null,[t])}var sa,aa,la,ua=function(t){return t[t.create=0]="create",t[t.detectChanges=1]="detectChanges",t[t.checkNoChanges=2]="checkNoChanges",t[t.destroy=3]="destroy",t[t.handleEvent=4]="handleEvent",t}({});function ca(t,e){aa=t,la=e}function ha(t,e,n,i){return ca(t,e),xa(ua.handleEvent,t.def.handleEvent,null,[t,e,n,i])}function pa(t,e){if(128&t.state)throw vr(ua[sa]);return ca(t,ya(t,0)),t.def.updateDirectives(function(t,n,i){for(var r=[],o=3;o<arguments.length;o++)r[o-3]=arguments[o];var s=t.def.nodes[n];return 0===e?fa(t,s,i,r):ga(t,s,i,r),16384&s.flags&&ca(t,ya(t,n)),224&s.flags?pr(t,s.nodeIndex).value:void 0},t)}function da(t,e){if(128&t.state)throw vr(ua[sa]);return ca(t,ba(t,0)),t.def.updateRenderer(function(t,n,i){for(var r=[],o=3;o<arguments.length;o++)r[o-3]=arguments[o];var s=t.def.nodes[n];return 0===e?fa(t,s,i,r):ga(t,s,i,r),3&s.flags&&ca(t,ba(t,n)),224&s.flags?pr(t,s.nodeIndex).value:void 0},t)}function fa(t,e,n,i){if(As.apply(void 0,h([t,e,n],i))){var r=1===n?i[0]:i;if(16384&e.flags){for(var o={},s=0;s<e.bindings.length;s++){var a=e.bindings[s],l=r[s];8&a.flags&&(o[(d=a.nonMinifiedName,"ng-reflect-"+(d=d.replace(/[$@]/g,"_").replace(ma,function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return"-"+t[1].toLowerCase()})))]=va(l))}var u=e.parent,c=cr(t,u.nodeIndex).renderElement;if(u.element.name)for(var p in o)null!=(l=o[p])?t.renderer.setAttribute(c,p,l):t.renderer.removeAttribute(c,p);else t.renderer.setValue(c,"bindings="+JSON.stringify(o,null,2))}}var d}function ga(t,e,n,i){Ds.apply(void 0,h([t,e,n],i))}var ma=/([A-Z])/g;function va(t){try{return null!=t?t.toString().slice(0,30):t}catch(t){return"[ERROR] Exception while trying to serialize the value"}}function ya(t,e){for(var n=e;n<t.def.nodes.length;n++){var i=t.def.nodes[n];if(16384&i.flags&&i.bindings&&i.bindings.length)return n}return null}function ba(t,e){for(var n=e;n<t.def.nodes.length;n++){var i=t.def.nodes[n];if(3&i.flags&&i.bindings&&i.bindings.length)return n}return null}var _a=function(){function t(t,e){this.view=t,this.nodeIndex=e,null==e&&(this.nodeIndex=e=0),this.nodeDef=t.def.nodes[e];for(var n=this.nodeDef,i=t;n&&0==(1&n.flags);)n=n.parent;if(!n)for(;!n&&i;)n=jr(i),i=i.parent;this.elDef=n,this.elView=i}return Object.defineProperty(t.prototype,"elOrCompView",{get:function(){return cr(this.elView,this.elDef.nodeIndex).componentView||this.view},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"injector",{get:function(){return Oo(this.elView,this.elDef)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"component",{get:function(){return this.elOrCompView.component},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"context",{get:function(){return this.elOrCompView.context},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"providerTokens",{get:function(){var t=[];if(this.elDef)for(var e=this.elDef.nodeIndex+1;e<=this.elDef.nodeIndex+this.elDef.childCount;e++){var n=this.elView.def.nodes[e];20224&n.flags&&t.push(n.provider.token),e+=n.childCount}return t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"references",{get:function(){var t={};if(this.elDef){wa(this.elView,this.elDef,t);for(var e=this.elDef.nodeIndex+1;e<=this.elDef.nodeIndex+this.elDef.childCount;e++){var n=this.elView.def.nodes[e];20224&n.flags&&wa(this.elView,n,t),e+=n.childCount}}return t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"componentRenderElement",{get:function(){var t=function(t){for(;t&&!Rr(t);)t=t.parent;return t.parent?cr(t.parent,jr(t).nodeIndex):null}(this.elOrCompView);return t?t.renderElement:void 0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"renderNode",{get:function(){return 2&this.nodeDef.flags?Mr(this.view,this.nodeDef):Mr(this.elView,this.elDef)},enumerable:!0,configurable:!0}),t.prototype.logError=function(t){for(var e,n,i=[],r=1;r<arguments.length;r++)i[r-1]=arguments[r];2&this.nodeDef.flags?(e=this.view.def,n=this.nodeDef.nodeIndex):(e=this.elView.def,n=this.elDef.nodeIndex);var o=function(t,e){for(var n=-1,i=0;i<=e;i++)3&t.nodes[i].flags&&n++;return n}(e,n),s=-1;e.factory(function(){var e;return++s===o?(e=t.error).bind.apply(e,h([t],i)):yr}),s<o&&(t.error("Illegal state: the ViewDefinitionFactory did not call the logger!"),t.error.apply(t,h(i)))},t}();function wa(t,e,n){for(var i in e.references)n[i]=cs(t,e,e.references[i])}function xa(t,e,n,i){var r=sa,o=aa,s=la;try{sa=t;var a=e.apply(n,i);return aa=o,la=s,sa=r,a}catch(t){if(be(t)||!aa)throw t;throw function(t,e){return t instanceof Error||(t=new Error(t.toString())),mr(t,e),t}(t,Ca())}}function Ca(){return aa?new _a(aa,la):null}var Sa=function(){function t(t){this.delegate=t}return t.prototype.createRenderer=function(t,e){return new ka(this.delegate.createRenderer(t,e))},t.prototype.begin=function(){this.delegate.begin&&this.delegate.begin()},t.prototype.end=function(){this.delegate.end&&this.delegate.end()},t.prototype.whenRenderingDone=function(){return this.delegate.whenRenderingDone?this.delegate.whenRenderingDone():Promise.resolve(null)},t}(),ka=function(){function t(t){this.delegate=t,this.data=this.delegate.data}return t.prototype.destroyNode=function(t){!function(t){li.delete(t.nativeNode)}(ui(t)),this.delegate.destroyNode&&this.delegate.destroyNode(t)},t.prototype.destroy=function(){this.delegate.destroy()},t.prototype.createElement=function(t,e){var n=this.delegate.createElement(t,e),i=Ca();if(i){var r=new ai(n,null,i);r.name=t,ci(r)}return n},t.prototype.createComment=function(t){var e=this.delegate.createComment(t),n=Ca();return n&&ci(new si(e,null,n)),e},t.prototype.createText=function(t){var e=this.delegate.createText(t),n=Ca();return n&&ci(new si(e,null,n)),e},t.prototype.appendChild=function(t,e){var n=ui(t),i=ui(e);n&&i&&n instanceof ai&&n.addChild(i),this.delegate.appendChild(t,e)},t.prototype.insertBefore=function(t,e,n){var i=ui(t),r=ui(e),o=ui(n);i&&r&&i instanceof ai&&i.insertBefore(o,r),this.delegate.insertBefore(t,e,n)},t.prototype.removeChild=function(t,e){var n=ui(t),i=ui(e);n&&i&&n instanceof ai&&n.removeChild(i),this.delegate.removeChild(t,e)},t.prototype.selectRootElement=function(t){var e=this.delegate.selectRootElement(t),n=Ca();return n&&ci(new ai(e,null,n)),e},t.prototype.setAttribute=function(t,e,n,i){var r=ui(t);r&&r instanceof ai&&(r.attributes[i?i+":"+e:e]=n),this.delegate.setAttribute(t,e,n,i)},t.prototype.removeAttribute=function(t,e,n){var i=ui(t);i&&i instanceof ai&&(i.attributes[n?n+":"+e:e]=null),this.delegate.removeAttribute(t,e,n)},t.prototype.addClass=function(t,e){var n=ui(t);n&&n instanceof ai&&(n.classes[e]=!0),this.delegate.addClass(t,e)},t.prototype.removeClass=function(t,e){var n=ui(t);n&&n instanceof ai&&(n.classes[e]=!1),this.delegate.removeClass(t,e)},t.prototype.setStyle=function(t,e,n,i){var r=ui(t);r&&r instanceof ai&&(r.styles[e]=n),this.delegate.setStyle(t,e,n,i)},t.prototype.removeStyle=function(t,e,n){var i=ui(t);i&&i instanceof ai&&(i.styles[e]=null),this.delegate.removeStyle(t,e,n)},t.prototype.setProperty=function(t,e,n){var i=ui(t);i&&i instanceof ai&&(i.properties[e]=n),this.delegate.setProperty(t,e,n)},t.prototype.listen=function(t,e,n){if("string"!=typeof t){var i=ui(t);i&&i.listeners.push(new function(t,e){this.name=t,this.callback=e}(e,n))}return this.delegate.listen(t,e,n)},t.prototype.parentNode=function(t){return this.delegate.parentNode(t)},t.prototype.nextSibling=function(t){return this.delegate.nextSibling(t)},t.prototype.setValue=function(t,e){return this.delegate.setValue(t,e)},t}(),Ea=function(t){function e(e,n,i){var r=t.call(this)||this;return r.moduleType=e,r._bootstrapComponents=n,r._ngModuleDefFactory=i,r}return r(e,t),e.prototype.create=function(t){!function(){if(!zs){zs=!0;var t=Un()?{setCurrentNode:ca,createRootView:Ws,createEmbeddedView:Xs,createComponentView:Ys,createNgModuleRef:qs,overrideProvider:Qs,overrideComponentView:Js,clearOverrides:$s,checkAndUpdateView:ia,checkNoChangesView:ra,destroyView:oa,createDebugContext:function(t,e){return new _a(t,e)},handleEvent:ha,updateDirectives:pa,updateRenderer:da}:{setCurrentNode:function(){},createRootView:Hs,createEmbeddedView:xs,createComponentView:Ss,createNgModuleRef:jo,overrideProvider:yr,overrideComponentView:yr,clearOverrides:yr,checkAndUpdateView:Is,checkNoChangesView:Os,destroyView:Ms,createDebugContext:function(t,e){return new _a(t,e)},handleEvent:function(t,e,n,i){return t.def.handleEvent(t,e,n,i)},updateDirectives:function(t,e){return t.def.updateDirectives(0===e?ea:na,t)},updateRenderer:function(t,e){return t.def.updateRenderer(0===e?ea:na,t)}};fr.setCurrentNode=t.setCurrentNode,fr.createRootView=t.createRootView,fr.createEmbeddedView=t.createEmbeddedView,fr.createComponentView=t.createComponentView,fr.createNgModuleRef=t.createNgModuleRef,fr.overrideProvider=t.overrideProvider,fr.overrideComponentView=t.overrideComponentView,fr.clearOverrides=t.clearOverrides,fr.checkAndUpdateView=t.checkAndUpdateView,fr.checkNoChangesView=t.checkNoChangesView,fr.destroyView=t.destroyView,fr.resolveDep=ts,fr.createDebugContext=t.createDebugContext,fr.handleEvent=t.handleEvent,fr.updateDirectives=t.updateDirectives,fr.updateRenderer=t.updateRenderer,fr.dirtyParentQueries=as}}();var e=function(t){var e=Array.from(t.providers),n=Array.from(t.modules),i={};for(var r in t.providersByKey)i[r]=t.providersByKey[r];return{factory:t.factory,isRoot:t.isRoot,providers:e,modules:n,providersByKey:i}}(Hr(this._ngModuleDefFactory));return fr.createNgModuleRef(this.moduleType,t||Zt.NULL,this._bootstrapComponents,e)},e}(Sn);function Ta(t,e,n){t!=e&&Ia(n)}function Oa(t,e){null==t&&Ia(e)}function Ia(t){throw new Error("ASSERTION ERROR: "+t)}var Aa=16,Pa=0,Da=1,ja=2,Ma=3,Ra=4,Fa=5,Na=6,La=7,Ba=8,Va=9,za=10,Ha=11,Wa=14;function Ua(t,e,n){t.afterContentInit&&(e.contentHooks||(e.contentHooks=[])).push(n,t.afterContentInit),t.afterContentChecked&&((e.contentHooks||(e.contentHooks=[])).push(n,t.afterContentChecked),(e.contentCheckHooks||(e.contentCheckHooks=[])).push(n,t.afterContentChecked))}function Xa(t,e,n){t.afterViewInit&&(e.viewHooks||(e.viewHooks=[])).push(n,t.afterViewInit),t.afterViewChecked&&((e.viewHooks||(e.viewHooks=[])).push(n,t.afterViewChecked),(e.viewCheckHooks||(e.viewCheckHooks=[])).push(n,t.afterViewChecked))}function Ya(t,e,n){null!=t.onDestroy&&(e.destroyHooks||(e.destroyHooks=[])).push(n,t.onDestroy)}function qa(t,e,n){16&t[Ra]&&(Ga(t[La],e.initHooks,e.checkHooks,n),t[Ra]&=-17)}function Ga(t,e,n,i){var r=i?e:n;r&&Ka(t,r)}function Ka(t,e){for(var n=0;n<e.length;n+=2)e[n+1].call(t[e[n]])}"undefined"==typeof ngDevMode||ngDevMode;var Za=0,Qa=4,Ja="ngProjectAs";function $a(t){return!!t.listen}var tl={createRenderer:function(t,e){return document}};function el(t,e){Oa(t,"should be called with a node"),Ta(t.tNode.type,e,"should be a "+function(t){return 1==t?"Projection":0==t?"Container":2==t?"View":3==t?"Element":"<unknown>"}(e))}function nl(t){return Array.isArray(t)?t[0]:t}function il(t){if(2===t.tNode.type){var e=t.data;return e[ja]?e[ja][Fa]:null}return t.tNode.next?t.view[t.tNode.next.index]:null}function rl(t){return t.tNode.child?nl((2===t.tNode.type?t.data:t.view)[t.tNode.child.index]):null}function ol(t){if(-1===t.tNode.index&&2===t.tNode.type){var e=t.data[Wa];return-1===e?null:t.view[e].dynamicLContainerNode}var n=t.tNode.parent;return nl(n?t.view[n.index]:t.view[Fa])}var sl=[];function al(t){for(var e=t[Fa];2===e.tNode.type;)ngDevMode&&Oa(t[Da],"lViewData.parent"),e=(t=t[Da])[Fa];return ngDevMode&&el(e,3),ngDevMode&&Oa(e.data,"node.data"),e}function ll(t,e,n,i,r){0===t?$a(e)?e.insertBefore(n,i,r):n.insertBefore(i,r,!0):1===t?$a(e)?e.removeChild(n,i):n.removeChild(i):2===t&&(ngDevMode&&ngDevMode.rendererDestroyNode++,e.destroyNode(i))}function ul(t){if(-1===t[Pa].childIndex)return null;var e=t[t[Pa].childIndex];return e.data?e.data:e.dynamicLContainerNode.data}function cl(t,e){var n;return(n=t[Fa])&&2===n.tNode.type?ol(n).data:t[Da]===e?null:t[Da]}function hl(t){if(t[Pa]){var e=t;!function(t){var e=t[Pa].cleanup;if(null!=e){for(var n=0;n<e.length-1;n+=2)"string"==typeof e[n]?(nl(t[e[n+1]]).native.removeEventListener(e[n],t[Ba][e[n+2]],e[n+3]),n+=2):"number"==typeof e[n]?(0,t[Ba][e[n]])():e[n].call(t[Ba][e[n+1]]);t[Ba]=null}}(e),function(t){var e,n=t[Pa];null!=n&&null!=(e=n.destroyHooks)&&Ka(t[La],e)}(e),(i=(n=e)[Pa]&&n[Pa].pipeDestroyHooks)&&Ka(n,i),-1===e[Pa].id&&$a(e[Ha])&&(ngDevMode&&ngDevMode.rendererDestroy++,e[Ha].destroy())}var n,i}var pl,dl,fl,gl,ml,vl,yl,bl,_l,wl="__ngHostLNode__",xl=Promise.resolve(null),Cl=[0,0],Sl=new Array(Aa).fill(null),kl=!1,El=!0;function Tl(t,e){var n=bl;return _l=t&&t[La],ml=t&&t[Pa],yl=t&&1==(1&t[Ra]),El=t&&ml.firstTemplatePass,pl=t&&t[Ha],null!=e&&(fl=e,gl=!0),bl=t,vl=t&&t[Ma],n}function Ol(t,e){e||(kl||Ga(_l,ml.viewHooks,ml.viewCheckHooks,yl),bl[Ra]&=-6),bl[Ra]|=16,bl[Na]=-1,Tl(t,null)}function Il(){kl||qa(bl,ml,yl),function(t){for(var e=ul(bl);null!==e;e=e[ja])if(e.length<Aa&&null===e[Za])for(var n=e,i=0;i<n[Qa].length;i++){var r=n[Qa][i],o=r.data;ngDevMode&&Oa(o[Pa],"TView must be allocated"),jl(r,o[Pa],o[Va],2)}}(),kl||Ga(_l,ml.contentHooks,ml.contentCheckHooks,yl),ml.firstTemplatePass=El=!1,Al(ml.hostBindings),function(t){if(null!=t.contentQueries)for(var e=0;e<t.contentQueries.length;e+=2){var n=t.contentQueries[e];t.directives[n].contentQueriesRefresh(n,t.contentQueries[e+1])}}(ml),function(t){if(null!=t)for(var e=0;e<t.length;e+=2)zl(t[e],t[e+1])}(ml.components)}function Al(t){if(null!=t)for(var e=ml.directives,n=0;n<t.length;n+=2){var i=t[n],r=e[i];r.hostBindings&&r.hostBindings(i,t[n+1])}}function Pl(t,e,n,i,r){return[e,bl,null,null,25|i,null,-1,null,null,n,bl&&bl[za],t,r||null,null,-1,null]}function Dl(t,e,n,i,r,o){var s=gl?fl:fl&&ol(fl),a=s&&s.view===bl?s.tNode:null,l=(gl?vl:fl&&fl.queries)||s&&s.queries&&s.queries.child(),u=null!=o,c=function(t,e,n,i,r,o){return{native:i,view:bl,nodeInjector:n?n.nodeInjector:null,data:r,queries:o,tNode:null,dynamicLContainerNode:null}}(0,0,s,n,u?o:null,l);if(-1===t||2===e)c.tNode=(o?o[Pa].node:null)||Vl(e,t,null,null,a,null);else{var h=t+Aa;ngDevMode&&Gl(h);var p=ml.data;if(bl[h]=c,h>=p.length){var d=p[h]=Vl(e,h,i,r,a,null);if(!gl&&fl){var f=fl.tNode;f.next=d,f.dynamicContainerNode&&(f.dynamicContainerNode.next=d)}}c.tNode=p[h],gl&&(vl=null,(null==fl.tNode.child&&fl.view===bl||2===fl.tNode.type)&&(fl.tNode.child=c.tNode))}if(2==(2&e)&&u){var g=o;ngDevMode&&null!=g[Fa]&&Ia("lViewData[HOST_NODE] should not have been initialized"),g[Fa]=c,El&&(g[Pa].node=c.tNode)}return fl=c,gl=!0,c}function jl(t,e,n,i){var r,o=gl,s=fl;if(null==t.data[Da]&&t.data[Va]&&!e.template)Wl(t.data[Va]);else try{gl=!0,fl=null,r=Tl(t.data,t),Nl(),e.template(i,n),2&i?Il():t.data[Pa].firstTemplatePass=El=!1}finally{Ol(r,1==(1&i)),gl=o,fl=s}return t}function Ml(t,e,n,i){var r=Tl(e,t);try{dl.begin&&dl.begin(),i?(Nl(),i(Rl(e),n),Il()):(kl||(qa(bl,ml,yl),Ga(_l,ml.contentHooks,ml.contentCheckHooks,yl)),Al(Cl),zl(0,Aa))}finally{dl.end&&dl.end(),Ol(r)}}function Rl(t){return 1&t[Ra]?3:2}var Fl=null;function Nl(){Fl=null}function Ll(t,e,n,i,r){return ngDevMode&&ngDevMode.tView++,{id:t,template:e,viewQuery:r,node:null,data:Sl.slice(),childIndex:-1,bindingStartIndex:-1,directives:null,firstTemplatePass:!0,initHooks:null,checkHooks:null,contentHooks:null,contentCheckHooks:null,viewHooks:null,viewCheckHooks:null,destroyHooks:null,pipeDestroyHooks:null,cleanup:null,hostBindings:null,contentQueries:null,components:null,directiveRegistry:"function"==typeof n?n():n,pipeRegistry:"function"==typeof i?i():i,currentMatches:null}}function Bl(t,e){ngDevMode&&ql(-1),dl=t;var n,i=t.createRenderer(null,null),r="string"==typeof e?$a(i)?i.selectRootElement(e):i.querySelector(e):e;if(ngDevMode&&!r)throw new Error("Renderer: "+("string"==typeof e?"Host node with selector not found:":"Host node is required:")+" ["+("function"==typeof(n=e)?n.name||n:"string"==typeof n?n:null==n?"":""+n)+"]");return r}function Vl(t,e,n,i,r,o){return ngDevMode&&ngDevMode.tNode++,{type:t,index:e,flags:0,tagName:n,attrs:i,localNames:null,initialInputs:void 0,inputs:void 0,outputs:void 0,tViews:o,next:null,child:null,parent:r,dynamicContainerNode:null,detached:null,stylingTemplate:null,projection:null}}function zl(t,e){ngDevMode&&ql(e);var n=bl[e];ngDevMode&&el(n,3),ngDevMode&&Oa(n.data,"Component's host node should have an LViewData attached.");var i=n.data;Hl(i)&&6&i[Ra]&&(ngDevMode&&ql(t,_l),Yl(i,n,_l[t]))}function Hl(t){return 8==(8&t[Ra])}function Wl(t){for(var e=0;e<t.components.length;e++){var n=t.components[e],i=Kl(n);ngDevMode&&Oa(i.data,"Component host node should be attached to an LView"),Ml(i,Ul(n),n)}}function Ul(t){ngDevMode&&Oa(t,"component");for(var e=Kl(t).view;e[Da];)e=e[Da];return e}function Xl(t){var e=Kl(t);ngDevMode&&Oa(e.data,"Component host node should be attached to an LViewData instance."),Yl(e.data,e,t)}function Yl(t,e,n){var i=Tl(t,e),r=t[Pa],o=r.template,s=r.viewQuery;try{Nl(),function(e,n,i){e&&1&t[Ra]&&e(1,i)}(s,0,n),o(Rl(t),n),Il(),function(t,e){t&&t(2,e)}(s,n)}finally{Ol(i)}}function ql(t,e){null==e&&(e=bl),function(t,e){t>=(e?e.length:0)&&Ia("index expected to be a valid data index")}(t,e||bl)}function Gl(t,e){null==e&&(e=bl),Ta(e.length,t,"index "+t+" expected to be at the end of arr (length "+e.length+")")}function Kl(t){ngDevMode&&Oa(t,"expecting component got null");var e=t[wl];return ngDevMode&&Oa(t,"object is not a component"),e}var Zl=xl;function Ql(t){return{components:[],scheduler:t,clean:Zl}}var Jl=function(){function t(t,e){this._view=t,this._appRef=null,this._viewContainerRef=null,this._lViewNode=null,this.context=e}return t.prototype._setComponentContext=function(t,e){this._view=t,this.context=e},Object.defineProperty(t.prototype,"destroyed",{get:function(){return 32==(32&this._view[Ra])},enumerable:!0,configurable:!0}),t.prototype.destroy=function(){var t,e;this._viewContainerRef&&Hl(this._view)&&(this._viewContainerRef.detach(this._viewContainerRef.indexOf(this)),this._viewContainerRef=null),$a(e=(t=this._view)[Ha])&&e.destroyNode&&function(e,n,i,r,o,s){for(var a=t[Fa],l=-1;a;){var u=null,c=a.tNode.type;if(3===c)ll(2,r,null,a.native,s),a.dynamicLContainerNode&&ll(2,r,null,a.dynamicLContainerNode.native,s);else if(0===c){ll(2,r,null,a.native,s);var h=a,p=h.dynamicLContainerNode?h.dynamicLContainerNode.data:h.data;(u=p[Qa].length?rl(p[Qa][0]):null)&&(s=h.dynamicLContainerNode?h.dynamicLContainerNode.native:h.native)}else if(1===c){var d=al(a.view),f=d.tNode.projection[a.tNode.projection];sl[++l]=a,u=f?d.data[Da][f.index]:null}else u=rl(a);if(null===u)for(null===(u=il(a))&&8192&a.tNode.flags&&(u=il(sl[l--]));a&&!u;){if(null===(a=ol(a))||a===n)return null;a.tNode.next||0!==c||(s=a.native),u=il(a)}a=u}}(0,t[Fa],0,e),function(t){if(-1===t[Pa].childIndex)return hl(t);for(var e=ul(t);e;){var n=null;if(e.length>=Aa?e[Pa].childIndex>-1&&(n=ul(e)):e[Qa].length&&(n=e[Qa][0].data),null==n){for(;e&&!e[ja]&&e!==t;)hl(e),e=cl(e,t);hl(e||t),n=e&&e[ja]}e=n}}(t),t[Ra]|=32},t.prototype.onDestroy=function(t){var e,n;n=t,function(t){return t[Ba]||(t[Ba]=[])}(e=this._view).push(n),e[Pa].firstTemplatePass&&function(t){return t[Pa].cleanup||(t[Pa].cleanup=[])}(e).push(e[Ba].length-1,null)},t.prototype.markForCheck=function(){!function(t){for(var e=t;null!=e[Da];)e[Ra]|=4,e=e[Da];var n,i;e[Ra]|=4,ngDevMode&&Oa(e[Va],"rootContext"),(n=e[Va]).clean==xl&&(n.clean=new Promise(function(t){return i=t}),n.scheduler(function(){Wl(n),i(null),n.clean=xl}))}(this._view)},t.prototype.detach=function(){this._view[Ra]&=-9},t.prototype.reattach=function(){this._view[Ra]|=8},t.prototype.detectChanges=function(){Xl(this.context)},t.prototype.checkNoChanges=function(){!function(t){kl=!0;try{Xl(t)}finally{kl=!1}}(this.context)},t.prototype.attachToViewContainerRef=function(t){this._viewContainerRef=t},t.prototype.detachFromAppRef=function(){this._appRef=null},t.prototype.attachToAppRef=function(t){this._appRef=t},t}(),$l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.resolveComponentFactory=function(t){return ngDevMode&&(void 0===e&&(e="Type passed in is not ComponentType, it does not have 'ngComponentDef' property."),t.ngComponentDef||Ia(e)),new iu(t.ngComponentDef);var e},e}(_n);function tu(t){var e=[];for(var n in t)t.hasOwnProperty(n)&&e.push({propName:t[n],templateName:n});return e}var eu=new yt("ROOT_CONTEXT_TOKEN",{providedIn:"root",factory:function(){return Ql(pe(nu))}}),nu=new yt("SCHEDULER_TOKEN",{providedIn:"root",factory:function(){return requestAnimationFrame.bind(window)}}),iu=function(t){function e(e){var n=t.call(this)||this;return n.componentDef=e,n.componentType=e.type,n.selector=e.selectors[0][0],n.ngContentSelectors=[],n}return r(e,t),Object.defineProperty(e.prototype,"inputs",{get:function(){return tu(this.componentDef.inputs)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"outputs",{get:function(){return tu(this.componentDef.outputs)},enumerable:!0,configurable:!0}),e.prototype.create=function(t,e,n,i){var r,o,s=void 0===n,a=i?i.injector.get(Jn):tl,l=s?(r=this.selector,$a(o=a.createRenderer(null,this.componentDef.rendererType)||pl)?o.createElement(r,Fl):null===Fl?o.createElement(r):o.createElementNS(Fl,r)):Bl(a,n),u=i&&!s?i.injector.get(eu):Ql(requestAnimationFrame.bind(window)),c=Pl(a.createRenderer(l,this.componentDef.rendererType),Ll(-1,null,null,null,null),u,this.componentDef.onPush?4:2);c[za]=i&&i.injector||null;var h,p,d=Tl(c,null);try{if(a.begin&&a.begin(),p=function(t,e,n,i){gl=!1,fl=null;var r,o=Dl(0,3,e,null,null,Pl(pl,(r=n.template).ngPrivateData||(r.ngPrivateData=Ll(-1,r,n.directiveDefs,n.pipeDefs,n.viewQuery)),null,n.onPush?4:2,i));return El&&(o.tNode.flags=4096,n.diPublic&&n.diPublic(n),ml.directives=[n]),o}(0,l,this.componentDef),u.components.push(h=function(t,e,n){if(ngDevMode&&Ta(bl[Na],-1,"directives should be created before any bindings"),ngDevMode&&Ta(gl,!0,"previousOrParentNode should be a parent"),Object.defineProperty(e,wl,{enumerable:!1,value:fl}),null==_l&&(bl[La]=_l=[]),ngDevMode&&Gl(t,_l),_l[t]=e,El){var i=fl.tNode.flags;0==(4095&i)?fl.tNode.flags=t<<14|4096&i|1:(ngDevMode&&4095==(4095&i)&&Ia("Reached the max number of directives"),fl.tNode.flags++)}else{var r=n.diPublic;r&&r(n)}return null!=n.attributes&&3==fl.tNode.type&&function(t,e){for(var n=$a(pl),i=0;i<e.length;){var r=e[i];if(1===r)break;if(r===Ja)i+=2;else if(ngDevMode&&ngDevMode.rendererSetAttribute++,0===r){var o=e[i+1],s=e[i+2],a=e[i+3];n?pl.setAttribute(t,s,a,o):t.setAttributeNS(o,s,a),i+=4}else a=e[i+1],n?pl.setAttribute(t,r,a):t.setAttribute(r,a),i+=2}}(fl.native,n.attributes),e}(0,this.componentDef.factory(),this.componentDef)),function(t,e,n){t&&null!=t.changeDetectorRef&&t.changeDetectorRef._setComponentContext(p.data,h)}(p.nodeInjector),function(t,e){var n=Kl(t),i=n.view[Pa];(function(t,e,n,i){ngDevMode&&Ta(i.firstTemplatePass,!0,"Should only be called on first template pass"),e&&(i.initHooks||(i.initHooks=[])).push(0,e),n&&((i.initHooks||(i.initHooks=[])).push(0,n),(i.checkHooks||(i.checkHooks=[])).push(0,n))})(0,e.onInit,e.doCheck,i),function(t,e){if(e.firstTemplatePass)for(var n=t>>14,i=n+(4095&t),r=n;r<i;r++){var o=e.directives[r];Ua(o,e,r),Xa(o,e,r),Ya(o,e,r)}}(n.tNode.flags,i)}(h,this.componentDef),e)for(var f=0,g=p.tNode.projection=[],m=0;m<e.length;m++){for(var v=e[m],y=null,b=null,_=0;_<v.length;_++){var w=Dl(++f,3,v[_],null,null);b?b.next=w.tNode:y=w.tNode,b=w.tNode}g.push(y)}jl(p,p.data[Pa],h,1),p.data[Ra]&=-2}finally{Tl(d,null),a.end&&a.end()}var x=new ru(this.componentType,h,c,t,l);return s&&(x.hostView._lViewNode.tNode.child=p.tNode),x},e}(fn),ru=function(t){function e(e,n,i,r,o){var s=t.call(this)||this;return s.destroyCbs=[],s.instance=n,s.hostView=s.changeDetectorRef=new Jl(i,n),s.hostView._lViewNode=Dl(-1,2,null,null,null,i),s.injector=r,s.location=new ei(o),s.componentType=e,s}return r(e,t),e.prototype.destroy=function(){ngDevMode&&Oa(this.destroyCbs,"NgModule already destroyed"),this.destroyCbs.forEach(function(t){return t()}),this.destroyCbs=null},e.prototype.onDestroy=function(t){ngDevMode&&Oa(this.destroyCbs,"NgModule already destroyed"),this.destroyCbs.push(t)},e}(dn),ou={provide:_n,useFactory:function(){return new $l},deps:[]},su=function(t){function e(e,n){var i=t.call(this)||this;i._bootstrapComponents=[],i.destroyCbs=[];var r=e.ngModuleDef;return ngDevMode&&Oa(r,"NgModule '"+Pt(e)+"' is not a subtype of 'NgModuleType'."),i._bootstrapComponents=r.bootstrap,i.injector=function(t,e,n){return void 0===e&&(e=null),void 0===n&&(n=null),e=e||Ye(),new qe(t,n,e)}(e,n,[ou,{provide:Cn,useValue:i}]),i.instance=i.injector.get(e),i.componentFactoryResolver=new $l,i}return r(e,t),e.prototype.destroy=function(){ngDevMode&&Oa(this.destroyCbs,"NgModule already destroyed"),this.destroyCbs.forEach(function(t){return t()}),this.destroyCbs=null},e.prototype.onDestroy=function(t){ngDevMode&&Oa(this.destroyCbs,"NgModule already destroyed"),this.destroyCbs.push(t)},e}(Cn);!function(t){function e(e){var n=t.call(this)||this;return n.moduleType=e,n}r(e,t),e.prototype.create=function(t){return new su(this.moduleType,t)}}(Sn);var au=[1,8,15,20,25],lu=new yt("MERGED_CONFIG"),uu="2.0.8",cu={selector:"pixie-editor",textureSize:4096,ui:{mode:"inline",theme:"light",allowEditorClose:!0,allowZoom:!0,toolbar:{hideOpenButton:!1,hideCloseButton:!0},nav:{position:"top",replaceDefault:!1,items:[{name:"filter",icon:"filter-custom",action:"filter"},{type:"separator"},{name:"resize",icon:"resize-custom",action:"resize"},{name:"crop",icon:"crop-custom",action:"crop"},{name:"transform",icon:"transform-custom",action:"rotate"},{type:"separator"},{name:"draw",icon:"pencil-custom",action:"draw"},{name:"text",icon:"text-box-custom",action:"text"},{name:"shapes",icon:"polygon-custom",action:"shapes"},{name:"stickers",icon:"sticker-custom",action:"stickers"},{name:"frame",icon:"frame-custom",action:"frame"},{type:"separator"},{name:"corners",icon:"rounded-corner-custom",action:"round"},{name:"background",icon:"background-custom",action:"background"},{name:"merge",icon:"merge-custom",action:"merge"}]},openImageDialog:{show:!0,sampleImages:[{url:"assets/images/samples/sample1.jpg",thumbnail:"assets/images/samples/sample1_thumbnail.jpg"},{url:"assets/images/samples/sample2.jpg",thumbnail:"assets/images/samples/sample2_thumbnail.jpg"},{url:"assets/images/samples/sample3.jpg",thumbnail:"assets/images/samples/sample3_thumbnail.jpg"}]},colorPresets:{replaceDefault:!1,items:["#000","#fff","rgb(242, 38, 19)","rgb(249, 105, 14)","rgb(253, 227, 167)","rgb(4, 147, 114)","rgb(30, 139, 195)","rgb(142, 68, 173)"]}},languages:{active:"default"},googleFontsApiKey:"AIzaSyDOrI6VJiMbR6XLvlp3CdCPZj1T2PzVkKs",objectDefaults:{transparentCorners:!1,borderOpacityWhenMoving:1,cornerStyle:"circle",cornerColor:"#ccc",cornerStrokeColor:"#fff",cornerSize:16,strokeWidth:.05,lockUniScaling:!0},tools:{crop:{replaceDefault:!1,hideCustomControls:!1,items:["3:2","5:3","4:3","5:4","6:4","7:5","10:8","16:9"]},text:{defaultCategory:"handwriting"},draw:{replaceDefault:!1,brushSizes:au,brushTypes:["PencilBrush","VLineBrush","HLineBrush","CircleBrush","SquareBrush","SprayBrush"]},shapes:{replaceDefault:!1,items:[{name:"circle",type:"Circle"},{name:"rectangle",type:"Rect",options:{lockUniScaling:!1}},{name:"triangle",type:"Triangle"},{name:"ellipse",type:"Ellipse",options:{lockUniScaling:!1}},{name:"Arrow #1",type:"Path",options:{path:"M 294.9 16.4 l 15.7 42.2 c -171.4 70.3 -294 242.3 -289.1 437.4 l 14.7 -1 c 9.1 -0.6 18.1 -1.2 27.1 -1.9 l 14.7 -1 c -4.3 -170.1 102.5 -320 252 -381.3 l 15.7 42.2 c 34.7 -40.5 83.1 -76.6 144.8 -99.8 c -58.1 -26.2 -124.9 -39.6 -195.6 -36.8 z"}},{name:"Arrow #2",type:"Path",options:{path:"M 16 248.4 v 14.9 h 447.5 l -93.2 82.5 l 11.9 10.5 l 113.8 -100.2 l -113.6 -100.4 l -11.8 10.5 l 92.9 82.2 z"}},{name:"Arrow #3",type:"Path",options:{path:"M 496 256 l -118.6 -66 v 40.8 h -361.4 v 50.4 h 361.4 v 40.8 l 118.6 -66 z"}},{name:"Line",type:"Path",options:{path:"M 16 256 h 480",strokeWidth:10,stroke:"#000"}},{name:"Star",type:"Path",options:{path:"M 256 406.3 l 148.3 78 l -28.3 -165.2 l 120 -117 l -165.8 -24.1 l -74.2 -150.3 l -74.2 150.3 l -165.8 24.1 l 120 117 l -28.3 165.2 z"}},{name:"Polygon",type:"Path",options:{path:"M 256 19.6 l 156.6 57.1 l 83.4 144.3 l -28.9 164.2 l -127.7 107.2 h -166.8 l -127.7 -107.2 l -28.9 -164.2 l 83.4 -144.3 z"}},{name:"Badge",type:"Path",options:{path:"M 257.3 16.2 s -148 58.2 -204.4 81.4 c 0 75.7 -16.8 303.5 204.4 398.2 c 218.7 -94.6 201.9 -322.4 201.9 -398.2 c -62.1 -23.6 -201.9 -81.4 -201.9 -81.4 z"}}].slice()},stickers:{replaceDefault:!1,items:[{name:"emoticons",list:["afro-1","afro","agent","alien-1","alien","angel","angry-1","angry-2","angry-3","angry-4","angry-5","angry","arguing","arrogant","asian-1","asian","avatar","baby-1","baby-2","baby","bully","burglar","businessman","cheeky-1","cheeky","clown","confused-1","confused-2","confused-3","confused","creepy","crying-1","crying-2","crying-3","crying","dazed-1","dazed-2","dazed-3","dazed","dead-1","dead-2","dead-3","dead-4","dead-5","dead-6","dead","desperate-1","desperate","detective","dissapointment","doctor","drunk","dumb","emo-1","emo-2","emo","emoticon","evil","faint-1","faint","flirt-1","flirt-2","flirt","flirty","gangster","geek-1","geek","gentleman-1","gentleman-2","gentleman-3","gentleman-4","gentleman","ginger","girl-1","girl","goofy-1","goofy-2","goofy-3","goofy-4","goofy","grubby-1","grubby","happy-1","happy-10","happy-11","happy-12","happy-13","happy-14","happy-15","happy-16","happy-2","happy-3","happy-4","happy-5","happy-6","happy-7","happy-8","happy-9","happy","harry-potter","heisenberg","hipster-1","hipster-2","hipster","in-love-1","in-love-2","in-love-3","in-love-4","in-love-5","in-love-6","in-love","japan","jew","joyful-1","joyful-2","joyful","kiss-1","kiss-2","kiss-3","kiss-4","kiss","laughing-1","laughing-2","laughing-3","laughing","listening","love","manly","miserly-1","miserly","nerd-1","nerd-2","nerd-3","nerd-4","nerd","ninja","pirate-1","pirate-2","pirate","punk-1","punk-2","punk","rapper","relieved","rich-1","rich-2","rich","rockstar","sad-1","sad-2","sad-3","sad-4","sad-5","sad-6","sad","scared-1","scared-2","scared-3","scared","sceptic-1","sceptic-2","sceptic-3","sceptic-4","sceptic-5","sceptic-6","sceptic-7","sceptic","secret","shocked-1","shocked-2","shocked-3","shocked","sick-1","sick-2","sick-3","sick-4","sick","silent","skeleton","smile","smiling-1","smiling","smoked","smug-1","smug-2","smug-3","smug-4","smug-5","smug-6","smug","sporty","stunned","superhero-1","superhero-2","superhero-3","superhero-4","superhero","surprised-1","surprised","thinking","tired-1","tired-2","tired-3","tired","tough-1","tough","trendy","vampire-1","vampire","wink-1","wink-2","wink","winking-1","winking","yawning-1","yawning-2","yawning-3","yawning","yelling","zombie"],type:"svg",thumbnailUrl:"images/ui/emoticon.svg"},{name:"doodles",items:100,type:"svg",thumbnailUrl:"images/ui/doodles.svg"},{name:"landmarks",items:100,type:"svg",thumbnailUrl:"images/ui/landmark.svg"},{name:"stars",items:6,type:"png",darkBg:!0,thumbnailUrl:"images/ui/star.svg"},{name:"clouds",items:15,type:"png",darkBg:!0,thumbnailUrl:"images/ui/clouds.svg"},{name:"bubbles",items:104,type:"png",thumbnailUrl:"images/ui/speech-bubble.svg"},{name:"transportation",items:22,type:"svg",thumbnailUrl:"images/ui/transportation.svg"},{name:"beach",items:22,type:"svg",thumbnailUrl:"images/ui/beach.svg"}]},import:{validExtensions:["png","jpg","jpeg","svg","json","gif"]},export:{defaultFormat:"png",defaultQuality:.8,defaultName:"image"},frame:{replaceDefault:!1,items:[{name:"basic",mode:"basic",size:{min:1,max:35,default:10}},{name:"pine",mode:"stretch",size:{min:1,max:35,default:15}},{name:"oak",mode:"stretch",size:{min:1,max:35,default:15}},{name:"rainbow",mode:"stretch",size:{min:1,max:35,default:15}},{name:"grunge1",display_name:"grunge #1",mode:"stretch",size:{min:1,max:35,default:15}},{name:"grunge2",display_name:"grunge #2",mode:"stretch",size:{min:1,max:35,default:20}},{name:"ebony",mode:"stretch",size:{min:1,max:35,default:15}},{name:"art1",display_name:"Art #1",mode:"repeat",size:{min:10,max:70,default:55}},{name:"art2",display_name:"Art #2",mode:"repeat",size:{min:10,max:70,default:55}}]}}},hu=function(t){return function(t){return!!t&&"object"==typeof t}(t)&&!function(t){var e=Object.prototype.toString.call(t);return"[object RegExp]"===e||"[object Date]"===e||function(t){return t.$$typeof===pu}(t)}(t)},pu="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function du(t,e){return!1!==e.clone&&e.isMergeableObject(t)?gu(Array.isArray(t)?[]:{},t,e):t}function fu(t,e,n){return t.concat(e).map(function(t){return du(t,n)})}function gu(t,e,n){(n=n||{}).arrayMerge=n.arrayMerge||fu,n.isMergeableObject=n.isMergeableObject||hu;var i=Array.isArray(e);return i===Array.isArray(t)?i?n.arrayMerge(t,e,n):function(t,e,n){var i={};return n.isMergeableObject(t)&&Object.keys(t).forEach(function(e){i[e]=du(t[e],n)}),Object.keys(e).forEach(function(r){i[r]=n.isMergeableObject(e[r])&&t[r]?gu(t[r],e[r],n):du(e[r],n)}),i}(t,e,n):du(e,n)}gu.all=function(t,e){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(t,n){return gu(t,n,e)},{})};var mu=gu,vu=n("hLX6"),yu=n("epSk"),bu={selectable:!1,evented:!1,lockMovementX:!0,lockMovementY:!0,lockRotation:!0,lockScalingX:!0,lockScalingY:!0,lockUniScaling:!0,hasControls:!1,hasBorders:!1,hasRotatingPoint:!1,strokeWidth:0},_u=function(){function t(t,e,n,i,r){this.pan=t,this.zoom=e,this.state=n,this.activeObject=i,this.config=r,this.minWidth=50,this.minHeight=50}return t.prototype.render=function(){this.state.fabric.requestRenderAll()},t.prototype.fabric=function(){return this.state.fabric},t.prototype.getObjectById=function(t){return this.state.fabric.getObjects().find(function(e){return e.data&&e.data.id===t})},t.prototype.init=function(){var t=this,e=document.querySelector("#pixie-canvas");this.state.fabric=new yu.fabric.Canvas(e),this.state.fabric.selection=!1,this.state.fabric.renderOnAddRemove=!1;var n=this.config.get("pixie.textureSize");n&&(yu.fabric.textureSize=n);var i=this.config.get("pixie.objectDefaults");for(var r in i)yu.fabric.Object.prototype[r]=i[r];return this.state.fabric.on("object:added",function(t){t.target.data&&t.target.data.id||(t.target.data||(t.target.data={}),t.target.data.id=function(t){void 0===t&&(t=36);for(var e="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",i=0;i<t;i++)e+=n.charAt(Math.floor(Math.random()*n.length));return e}(10))}),this.pan.init(),this.zoom.init(),this.activeObject.init(),this.initContent().then(function(){return t.state.loaded.next(null)}),this.state.loaded},t.prototype.initContent=function(){var t=this.config.get("pixie.image");t instanceof HTMLImageElement&&(t=t.src);var e=this.config.get("pixie.blankCanvasSize");return t?this.loadMainImage(t):e?this.openNew(e.width,e.height):new Promise(function(t){return t()})},t.prototype.resize=function(t,e){this.state.fabric.setWidth(t*this.zoom.get()),this.state.fabric.setHeight(e*this.zoom.get()),this.state.original.width=t,this.state.original.height=e},t.prototype.loadMainImage=function(t){var e=this;return new Promise(function(n){e.loadImage(t).then(function(t){e.fabric().clear(),t.set(bu),t.name="mainImage",e.state.fabric.add(t),e.resize(t.width,t.height),e.zoom.fitToScreen(),n(t)})})},t.prototype.changeMainImage=function(t){var e=this,n=this.getMainImage();return new Promise(function(i){n||i(null),n.setSrc(t,function(){n.setCoords(),e.resize(n.width,n.height),e.render(),i(n)})})},t.prototype.loadImage=function(t){var e=this;return new Promise(function(n){yu.fabric.util.loadImage(t,function(t){return n(new yu.fabric.Image(t))},null,e.config.get("pixie.crossOrigin"))})},t.prototype.openNew=function(t,e){var n=this;return t=t<this.minWidth?this.minWidth:t,e=e<this.minHeight?this.minHeight:e,this.state.fabric.clear(),this.resize(t,e),new Promise(function(t){setTimeout(function(){n.zoom.fitToScreen(),t()})})},t.prototype.openImage=function(t){var e=this;return new Promise(function(n){yu.fabric.util.loadImage(t,function(t){if(t){var i=new yu.fabric.Image(t);i.name="image";var r=e.state.original.width,o=e.state.original.height;if(i.width>=r||i.height>=o){var s=r-.1*r,a=1/Math.min((o-.1*o)/i.getScaledHeight(),s/i.getScaledWidth());i.scaleX=i.scaleX*(1/a),i.scaleY=i.scaleY*(1/a)}e.state.fabric.add(i),i.viewportCenter(),i.setCoords(),e.render(),e.zoom.fitToScreen(),n(i)}})})},t.prototype.getMainImage=function(){return this.state.fabric.getObjects().find(function(t){return"mainImage"===t.name})},t}(),wu=function(){function t(){this.all={},this.onChange=new In}return t.prototype.setMultiple=function(t){for(var e in t){var n=t[e];"0"!==n&&"1"!==n||(n=parseInt(n)),this.set(e,n)}},t.prototype.merge=function(t){this.all=mu(this.all,t)},t.prototype.set=function(t,e,n){void 0===n&&(n=!1),vu.set(t,e,this.all),n&&this.onChange.emit(t)},t.prototype.get=function(t,e){void 0===e&&(e=null);var n=vu.pick(t,this.all);return null==n?e:n},t.prototype.getAll=function(){return this.all},t.prototype.has=function(t){return!!vu.pick(t,this.all)},t.prototype.getJson=function(t,e){void 0===e&&(e=null);var n=this.get(t,e);return"string"!=typeof n?n:JSON.parse(n)},t.prototype.getBaseUrl=function(t){if(void 0===t&&(t=!1),this.has("base_url")&&("production"===this.get("vebto.environment")||t))return this.get("base_url")+"/";if(document.querySelector("base"))return document.querySelector("base").href;var e=window.location;return(e.protocol+"//"+(e.host+"/"+e.pathname).replace("//","/")).replace(/\/[a-z]+\.html/,"/")},t.prototype.getAssetUrl=function(t){var e=this.get("vebto.assetsUrl")||this.getBaseUrl(),n=this.get("vebto.assetsPrefix");return"production"===this.get("vebto.environment")&&n&&(e+=n+"/"),e+="assets/",t&&(e+=t),e},t.prototype.save=function(t){this.setMultiple(t.client);var e=btoa(encodeURIComponent(JSON.stringify(t)));return this.http.post("settings",{settings:e})},t.prototype.anySocialLoginEnabled=function(){var t=this;return["facebook","google","twitter"].filter(function(e){return t.get("social."+e+".enable")}).length>-1},t.prototype.setHttpClient=function(t){this.http=t},t.ngInjectableDef=vt({factory:function(){return new t},token:t,providedIn:"root"}),t}(),xu=function(){function t(t,e,n,i,r,o,s,a,l,u,c,h,p,d,f,g,m,v,y,b){this.filterTool=t,this.resizeTool=e,this.cropTool=n,this.transformTool=i,this.drawTool=r,this.textTool=o,this.shapesTool=s,this.frameTool=a,this.cornerTool=l,this.exportTool=u,this.importTool=c,this.canvas=h,this.watermark=p,this.history=d,this.activeObject=f,this.objects=g,this.controls=m,this.cropZone=v,this.mergeTool=y,this.fonts=b}return t.prototype.get=function(t){return"canvas"===t?this.canvas:this[t]||this[t+"Tool"]},t}(),Cu=new D(function(t){return t.complete()});function Su(t){return t?function(t){return new D(function(e){return t.schedule(function(){return e.complete()})})}(t):Cu}function ku(t){var e=new D(function(e){e.next(t),e.complete()});return e._isScalar=!0,e.value=t,e}function Eu(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t[t.length-1];switch(M(n)?t.pop():n=void 0,t.length){case 0:return Su(n);case 1:return n?K(t,n):ku(t[0]);default:return K(t,n)}}function Tu(t,e){return function(n){return n.lift(new Ou(t,e))}}var Ou=function(){function t(t,e){this.predicate=t,this.thisArg=e}return t.prototype.call=function(t,e){return e.subscribe(new Iu(t,this.predicate,this.thisArg))},t}(),Iu=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.predicate=n,r.thisArg=i,r.count=0,r}return r(e,t),e.prototype._next=function(t){var e;try{e=this.predicate.call(this.thisArg,t,this.count++)}catch(t){return void this.destination.error(t)}e&&this.destination.next(t)},e}(O),Au=function(){},Pu=void 0,Du=["en",[["a","p"],["AM","PM"],Pu],[["AM","PM"],Pu,Pu],[["S","M","T","W","T","F","S"],["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],["Su","Mo","Tu","We","Th","Fr","Sa"]],Pu,[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],["January","February","March","April","May","June","July","August","September","October","November","December"]],Pu,[["B","A"],["BC","AD"],["Before Christ","Anno Domini"]],0,[6,0],["M/d/yy","MMM d, y","MMMM d, y","EEEE, MMMM d, y"],["h:mm a","h:mm:ss a","h:mm:ss a z","h:mm:ss a zzzz"],["{1}, {0}",Pu,"{1} 'at' {0}",Pu],[".",",",";","%","+","-","E","\xd7","\u2030","\u221e","NaN",":"],["#,##0.###","#,##0%","\xa4#,##0.00","#E0"],"$","US Dollar",{},function(t){var e=Math.floor(Math.abs(t)),n=t.toString().replace(/^[^.]*\.?/,"").length;return 1===e&&0===n?1:5}],ju={},Mu=function(t){return t[t.Zero=0]="Zero",t[t.One=1]="One",t[t.Two=2]="Two",t[t.Few=3]="Few",t[t.Many=4]="Many",t[t.Other=5]="Other",t}({}),Ru=new yt("UseV4Plurals"),Fu=function(){},Nu=function(t){function e(e,n){var i=t.call(this)||this;return i.locale=e,i.deprecatedPluralFn=n,i}return r(e,t),e.prototype.getPluralCategory=function(t,e){switch(this.deprecatedPluralFn?this.deprecatedPluralFn(e||this.locale,t):function(t){return function(t){var e=t.toLowerCase().replace(/_/g,"-"),n=ju[e];if(n)return n;var i=e.split("-")[0];if(n=ju[i])return n;if("en"===i)return Du;throw new Error('Missing locale data for the locale "'+t+'".')}(t)[18]}(e||this.locale)(t)){case Mu.Zero:return"zero";case Mu.One:return"one";case Mu.Two:return"two";case Mu.Few:return"few";case Mu.Many:return"many";default:return"other"}},s([a(0,Vt(Di)),a(1,zt()),a(1,Vt(Ru))],e)}(Fu);function Lu(t,e){var n,i;e=encodeURIComponent(e);try{for(var r=u(t.split(";")),o=r.next();!o.done;o=r.next()){var s=o.value,a=s.indexOf("="),l=c(-1==a?[s,""]:[s.slice(0,a),s.slice(a+1)],2),h=l[1];if(l[0].trim()===e)return decodeURIComponent(h)}}catch(t){n={error:t}}finally{try{o&&!o.done&&(i=r.return)&&i.call(r)}finally{if(n)throw n.error}}return null}var Bu=function(){function t(t,e,n,i){this._iterableDiffers=t,this._keyValueDiffers=e,this._ngEl=n,this._renderer=i,this._initialClasses=[]}return Object.defineProperty(t.prototype,"klass",{set:function(t){this._removeClasses(this._initialClasses),this._initialClasses="string"==typeof t?t.split(/\s+/):[],this._applyClasses(this._initialClasses),this._applyClasses(this._rawClass)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ngClass",{set:function(t){this._removeClasses(this._rawClass),this._applyClasses(this._initialClasses),this._iterableDiffer=null,this._keyValueDiffer=null,this._rawClass="string"==typeof t?t.split(/\s+/):t,this._rawClass&&(fi(this._rawClass)?this._iterableDiffer=this._iterableDiffers.find(this._rawClass).create():this._keyValueDiffer=this._keyValueDiffers.find(this._rawClass).create())},enumerable:!0,configurable:!0}),t.prototype.ngDoCheck=function(){if(this._iterableDiffer){var t=this._iterableDiffer.diff(this._rawClass);t&&this._applyIterableChanges(t)}else if(this._keyValueDiffer){var e=this._keyValueDiffer.diff(this._rawClass);e&&this._applyKeyValueChanges(e)}},t.prototype._applyKeyValueChanges=function(t){var e=this;t.forEachAddedItem(function(t){return e._toggleClass(t.key,t.currentValue)}),t.forEachChangedItem(function(t){return e._toggleClass(t.key,t.currentValue)}),t.forEachRemovedItem(function(t){t.previousValue&&e._toggleClass(t.key,!1)})},t.prototype._applyIterableChanges=function(t){var e=this;t.forEachAddedItem(function(t){if("string"!=typeof t.item)throw new Error("NgClass can only toggle CSS classes expressed as strings, got "+Pt(t.item));e._toggleClass(t.item,!0)}),t.forEachRemovedItem(function(t){return e._toggleClass(t.item,!1)})},t.prototype._applyClasses=function(t){var e=this;t&&(Array.isArray(t)||t instanceof Set?t.forEach(function(t){return e._toggleClass(t,!0)}):Object.keys(t).forEach(function(n){return e._toggleClass(n,!!t[n])}))},t.prototype._removeClasses=function(t){var e=this;t&&(Array.isArray(t)||t instanceof Set?t.forEach(function(t){return e._toggleClass(t,!1)}):Object.keys(t).forEach(function(t){return e._toggleClass(t,!1)}))},t.prototype._toggleClass=function(t,e){var n=this;(t=t.trim())&&t.split(/\s+/g).forEach(function(t){e?n._renderer.addClass(n._ngEl.nativeElement,t):n._renderer.removeClass(n._ngEl.nativeElement,t)})},t}(),Vu=function(){function t(t,e,n,i){this.$implicit=t,this.ngForOf=e,this.index=n,this.count=i}return Object.defineProperty(t.prototype,"first",{get:function(){return 0===this.index},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"last",{get:function(){return this.index===this.count-1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"even",{get:function(){return this.index%2==0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"odd",{get:function(){return!this.even},enumerable:!0,configurable:!0}),t}(),zu=function(){function t(t,e,n){this._viewContainer=t,this._template=e,this._differs=n,this._ngForOfDirty=!0,this._differ=null}return Object.defineProperty(t.prototype,"ngForOf",{set:function(t){this._ngForOf=t,this._ngForOfDirty=!0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ngForTrackBy",{get:function(){return this._trackByFn},set:function(t){Un()&&null!=t&&"function"!=typeof t&&console&&console.warn&&console.warn("trackBy must be a function, but received "+JSON.stringify(t)+". See https://angular.io/docs/ts/latest/api/common/index/NgFor-directive.html#!#change-propagation for more information."),this._trackByFn=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ngForTemplate",{set:function(t){t&&(this._template=t)},enumerable:!0,configurable:!0}),t.prototype.ngDoCheck=function(){if(this._ngForOfDirty){this._ngForOfDirty=!1;var t=this._ngForOf;if(!this._differ&&t)try{this._differ=this._differs.find(t).create(this.ngForTrackBy)}catch(n){throw new Error("Cannot find a differ supporting object '"+t+"' of type '"+((e=t).name||typeof e)+"'. NgFor only supports binding to Iterables such as Arrays.")}}var e;if(this._differ){var n=this._differ.diff(this._ngForOf);n&&this._applyChanges(n)}},t.prototype._applyChanges=function(t){var e=this,n=[];t.forEachOperation(function(t,i,r){if(null==t.previousIndex){var o=e._viewContainer.createEmbeddedView(e._template,new Vu(null,e._ngForOf,-1,-1),r),s=new Hu(t,o);n.push(s)}else null==r?e._viewContainer.remove(i):(o=e._viewContainer.get(i),e._viewContainer.move(o,r),s=new Hu(t,o),n.push(s))});for(var i=0;i<n.length;i++)this._perViewChange(n[i].view,n[i].record);i=0;for(var r=this._viewContainer.length;i<r;i++){var o=this._viewContainer.get(i);o.context.index=i,o.context.count=r,o.context.ngForOf=this._ngForOf}t.forEachIdentityChange(function(t){e._viewContainer.get(t.currentIndex).context.$implicit=t.item})},t.prototype._perViewChange=function(t,e){t.context.$implicit=e.item},t}(),Hu=function(t,e){this.record=t,this.view=e},Wu=function(){function t(t,e){this._viewContainer=t,this._context=new Uu,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=e}return Object.defineProperty(t.prototype,"ngIf",{set:function(t){this._context.$implicit=this._context.ngIf=t,this._updateView()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ngIfThen",{set:function(t){Xu("ngIfThen",t),this._thenTemplateRef=t,this._thenViewRef=null,this._updateView()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ngIfElse",{set:function(t){Xu("ngIfElse",t),this._elseTemplateRef=t,this._elseViewRef=null,this._updateView()},enumerable:!0,configurable:!0}),t.prototype._updateView=function(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))},t}(),Uu=function(){this.$implicit=null,this.ngIf=null};function Xu(t,e){if(e&&!e.createEmbeddedView)throw new Error(t+" must be a TemplateRef, but received '"+Pt(e)+"'.")}var Yu=function(){function t(t,e,n){this._differs=t,this._ngEl=e,this._renderer=n}return Object.defineProperty(t.prototype,"ngStyle",{set:function(t){this._ngStyle=t,!this._differ&&t&&(this._differ=this._differs.find(t).create())},enumerable:!0,configurable:!0}),t.prototype.ngDoCheck=function(){if(this._differ){var t=this._differ.diff(this._ngStyle);t&&this._applyChanges(t)}},t.prototype._applyChanges=function(t){var e=this;t.forEachRemovedItem(function(t){return e._setStyle(t.key,null)}),t.forEachAddedItem(function(t){return e._setStyle(t.key,t.currentValue)}),t.forEachChangedItem(function(t){return e._setStyle(t.key,t.currentValue)})},t.prototype._setStyle=function(t,e){var n=c(t.split("."),2),i=n[0],r=n[1];null!=(e=null!=e&&r?""+e+r:e)?this._renderer.setStyle(this._ngEl.nativeElement,i,e):this._renderer.removeStyle(this._ngEl.nativeElement,i)},t}(),qu=function(){function t(){}return t.prototype.createSubscription=function(t,e){return t.subscribe({next:e,error:function(t){throw t}})},t.prototype.dispose=function(t){t.unsubscribe()},t.prototype.onDestroy=function(t){t.unsubscribe()},t}(),Gu=new(function(){function t(){}return t.prototype.createSubscription=function(t,e){return t.then(e,function(t){throw t})},t.prototype.dispose=function(t){},t.prototype.onDestroy=function(t){},t}()),Ku=new qu,Zu=function(){function t(t){this._ref=t,this._latestValue=null,this._latestReturnedValue=null,this._subscription=null,this._obj=null,this._strategy=null}var e;return e=t,t.prototype.ngOnDestroy=function(){this._subscription&&this._dispose()},t.prototype.transform=function(t){return this._obj?t!==this._obj?(this._dispose(),this.transform(t)):this._latestValue===this._latestReturnedValue?this._latestReturnedValue:(this._latestReturnedValue=this._latestValue,pi.wrap(this._latestValue)):(t&&this._subscribe(t),this._latestReturnedValue=this._latestValue,this._latestValue)},t.prototype._subscribe=function(t){var e=this;this._obj=t,this._strategy=this._selectStrategy(t),this._subscription=this._strategy.createSubscription(t,function(n){return e._updateLatestValue(t,n)})},t.prototype._selectStrategy=function(t){if(Je(t))return Gu;if($e(t))return Ku;throw Error("InvalidPipeArgument: '"+t+"' for pipe '"+Pt(e)+"'")},t.prototype._dispose=function(){this._strategy.dispose(this._subscription),this._latestValue=null,this._latestReturnedValue=null,this._subscription=null,this._obj=null},t.prototype._updateLatestValue=function(t,e){t===this._obj&&(this._latestValue=e,this._ref.markForCheck())},t}(),Qu=function(){function t(t){this.differs=t}return t.prototype.transform=function(t,e){var n=this;if(void 0===e&&(e=Ju),!t||!(t instanceof Map)&&"object"!=typeof t)return null;this.differ||(this.differ=this.differs.find(t).create());var i=this.differ.diff(t);return i&&(this.keyValues=[],i.forEachItem(function(t){n.keyValues.push({key:t.key,value:t.currentValue})}),this.keyValues.sort(e)),this.keyValues},t}();function Ju(t,e){var n=t.key,i=e.key;if(n===i)return 0;if(void 0===n)return 1;if(void 0===i)return-1;if(null===n)return 1;if(null===i)return-1;if("string"==typeof n&&"string"==typeof i)return n<i?-1:1;if("number"==typeof n&&"number"==typeof i)return n-i;if("boolean"==typeof n&&"boolean"==typeof i)return n<i?-1:1;var r=String(n),o=String(i);return r==o?0:r<o?-1:1}var $u=function(){},tc=new yt("DocumentToken"),ec="browser",nc="server",ic=function(){},rc=function(){},oc=function(){function t(t){var e=this;this.normalizedNames=new Map,this.lazyUpdate=null,t?this.lazyInit="string"==typeof t?function(){e.headers=new Map,t.split("\n").forEach(function(t){var n=t.indexOf(":");if(n>0){var i=t.slice(0,n),r=i.toLowerCase(),o=t.slice(n+1).trim();e.maybeSetNormalizedName(i,r),e.headers.has(r)?e.headers.get(r).push(o):e.headers.set(r,[o])}})}:function(){e.headers=new Map,Object.keys(t).forEach(function(n){var i=t[n],r=n.toLowerCase();"string"==typeof i&&(i=[i]),i.length>0&&(e.headers.set(r,i),e.maybeSetNormalizedName(n,r))})}:this.headers=new Map}return t.prototype.has=function(t){return this.init(),this.headers.has(t.toLowerCase())},t.prototype.get=function(t){this.init();var e=this.headers.get(t.toLowerCase());return e&&e.length>0?e[0]:null},t.prototype.keys=function(){return this.init(),Array.from(this.normalizedNames.values())},t.prototype.getAll=function(t){return this.init(),this.headers.get(t.toLowerCase())||null},t.prototype.append=function(t,e){return this.clone({name:t,value:e,op:"a"})},t.prototype.set=function(t,e){return this.clone({name:t,value:e,op:"s"})},t.prototype.delete=function(t,e){return this.clone({name:t,value:e,op:"d"})},t.prototype.maybeSetNormalizedName=function(t,e){this.normalizedNames.has(e)||this.normalizedNames.set(e,t)},t.prototype.init=function(){var e=this;this.lazyInit&&(this.lazyInit instanceof t?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(function(t){return e.applyUpdate(t)}),this.lazyUpdate=null))},t.prototype.copyFrom=function(t){var e=this;t.init(),Array.from(t.headers.keys()).forEach(function(n){e.headers.set(n,t.headers.get(n)),e.normalizedNames.set(n,t.normalizedNames.get(n))})},t.prototype.clone=function(e){var n=new t;return n.lazyInit=this.lazyInit&&this.lazyInit instanceof t?this.lazyInit:this,n.lazyUpdate=(this.lazyUpdate||[]).concat([e]),n},t.prototype.applyUpdate=function(t){var e=t.name.toLowerCase();switch(t.op){case"a":case"s":var n=t.value;if("string"==typeof n&&(n=[n]),0===n.length)return;this.maybeSetNormalizedName(t.name,e);var i=("a"===t.op?this.headers.get(e):void 0)||[];i.push.apply(i,h(n)),this.headers.set(e,i);break;case"d":var r=t.value;if(r){var o=this.headers.get(e);if(!o)return;0===(o=o.filter(function(t){return-1===r.indexOf(t)})).length?(this.headers.delete(e),this.normalizedNames.delete(e)):this.headers.set(e,o)}else this.headers.delete(e),this.normalizedNames.delete(e)}},t.prototype.forEach=function(t){var e=this;this.init(),Array.from(this.normalizedNames.keys()).forEach(function(n){return t(e.normalizedNames.get(n),e.headers.get(n))})},t}(),sc=function(){function t(){}return t.prototype.encodeKey=function(t){return ac(t)},t.prototype.encodeValue=function(t){return ac(t)},t.prototype.decodeKey=function(t){return decodeURIComponent(t)},t.prototype.decodeValue=function(t){return decodeURIComponent(t)},t}();function ac(t){return encodeURIComponent(t).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/gi,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%2B/gi,"+").replace(/%3D/gi,"=").replace(/%3F/gi,"?").replace(/%2F/gi,"/")}var lc=function(){function t(t){void 0===t&&(t={});var e,n,i,r=this;if(this.updates=null,this.cloneFrom=null,this.encoder=t.encoder||new sc,t.fromString){if(t.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=(e=t.fromString,n=this.encoder,i=new Map,e.length>0&&e.split("&").forEach(function(t){var e=t.indexOf("="),r=c(-1==e?[n.decodeKey(t),""]:[n.decodeKey(t.slice(0,e)),n.decodeValue(t.slice(e+1))],2),o=r[0],s=r[1],a=i.get(o)||[];a.push(s),i.set(o,a)}),i)}else t.fromObject?(this.map=new Map,Object.keys(t.fromObject).forEach(function(e){var n=t.fromObject[e];r.map.set(e,Array.isArray(n)?n:[n])})):this.map=null}return t.prototype.has=function(t){return this.init(),this.map.has(t)},t.prototype.get=function(t){this.init();var e=this.map.get(t);return e?e[0]:null},t.prototype.getAll=function(t){return this.init(),this.map.get(t)||null},t.prototype.keys=function(){return this.init(),Array.from(this.map.keys())},t.prototype.append=function(t,e){return this.clone({param:t,value:e,op:"a"})},t.prototype.set=function(t,e){return this.clone({param:t,value:e,op:"s"})},t.prototype.delete=function(t,e){return this.clone({param:t,value:e,op:"d"})},t.prototype.toString=function(){var t=this;return this.init(),this.keys().map(function(e){var n=t.encoder.encodeKey(e);return t.map.get(e).map(function(e){return n+"="+t.encoder.encodeValue(e)}).join("&")}).join("&")},t.prototype.clone=function(e){var n=new t({encoder:this.encoder});return n.cloneFrom=this.cloneFrom||this,n.updates=(this.updates||[]).concat([e]),n},t.prototype.init=function(){var t=this;null===this.map&&(this.map=new Map),null!==this.cloneFrom&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(function(e){return t.map.set(e,t.cloneFrom.map.get(e))}),this.updates.forEach(function(e){switch(e.op){case"a":case"s":var n=("a"===e.op?t.map.get(e.param):void 0)||[];n.push(e.value),t.map.set(e.param,n);break;case"d":if(void 0===e.value){t.map.delete(e.param);break}var i=t.map.get(e.param)||[],r=i.indexOf(e.value);-1!==r&&i.splice(r,1),i.length>0?t.map.set(e.param,i):t.map.delete(e.param)}}),this.cloneFrom=null)},t}();function uc(t){return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer}function cc(t){return"undefined"!=typeof Blob&&t instanceof Blob}function hc(t){return"undefined"!=typeof FormData&&t instanceof FormData}var pc=function(){function t(t,e,n,i){var r;if(this.url=e,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=t.toUpperCase(),function(t){switch(t){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}(this.method)||i?(this.body=void 0!==n?n:null,r=i):r=n,r&&(this.reportProgress=!!r.reportProgress,this.withCredentials=!!r.withCredentials,r.responseType&&(this.responseType=r.responseType),r.headers&&(this.headers=r.headers),r.params&&(this.params=r.params)),this.headers||(this.headers=new oc),this.params){var o=this.params.toString();if(0===o.length)this.urlWithParams=e;else{var s=e.indexOf("?");this.urlWithParams=e+(-1===s?"?":s<e.length-1?"&":"")+o}}else this.params=new lc,this.urlWithParams=e}return t.prototype.serializeBody=function(){return null===this.body?null:uc(this.body)||cc(this.body)||hc(this.body)||"string"==typeof this.body?this.body:this.body instanceof lc?this.body.toString():"object"==typeof this.body||"boolean"==typeof this.body||Array.isArray(this.body)?JSON.stringify(this.body):this.body.toString()},t.prototype.detectContentTypeHeader=function(){return null===this.body?null:hc(this.body)?null:cc(this.body)?this.body.type||null:uc(this.body)?null:"string"==typeof this.body?"text/plain":this.body instanceof lc?"application/x-www-form-urlencoded;charset=UTF-8":"object"==typeof this.body||"number"==typeof this.body||Array.isArray(this.body)?"application/json":null},t.prototype.clone=function(e){void 0===e&&(e={});var n=e.method||this.method,i=e.url||this.url,r=e.responseType||this.responseType,o=void 0!==e.body?e.body:this.body,s=void 0!==e.withCredentials?e.withCredentials:this.withCredentials,a=void 0!==e.reportProgress?e.reportProgress:this.reportProgress,l=e.headers||this.headers,u=e.params||this.params;return void 0!==e.setHeaders&&(l=Object.keys(e.setHeaders).reduce(function(t,n){return t.set(n,e.setHeaders[n])},l)),e.setParams&&(u=Object.keys(e.setParams).reduce(function(t,n){return t.set(n,e.setParams[n])},u)),new t(n,i,o,{params:u,headers:l,reportProgress:a,responseType:r,withCredentials:s})},t}(),dc=function(t){return t[t.Sent=0]="Sent",t[t.UploadProgress=1]="UploadProgress",t[t.ResponseHeader=2]="ResponseHeader",t[t.DownloadProgress=3]="DownloadProgress",t[t.Response=4]="Response",t[t.User=5]="User",t}({}),fc=function(){return function(t,e,n){void 0===e&&(e=200),void 0===n&&(n="OK"),this.headers=t.headers||new oc,this.status=void 0!==t.status?t.status:e,this.statusText=t.statusText||n,this.url=t.url||null,this.ok=this.status>=200&&this.status<300}}(),gc=function(t){function e(e){void 0===e&&(e={});var n=t.call(this,e)||this;return n.type=dc.ResponseHeader,n}return r(e,t),e.prototype.clone=function(t){return void 0===t&&(t={}),new e({headers:t.headers||this.headers,status:void 0!==t.status?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})},e}(fc),mc=function(t){function e(e){void 0===e&&(e={});var n=t.call(this,e)||this;return n.type=dc.Response,n.body=void 0!==e.body?e.body:null,n}return r(e,t),e.prototype.clone=function(t){return void 0===t&&(t={}),new e({body:void 0!==t.body?t.body:this.body,headers:t.headers||this.headers,status:void 0!==t.status?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})},e}(fc),vc=function(t){function e(e){var n=t.call(this,e,0,"Unknown Error")||this;return n.name="HttpErrorResponse",n.ok=!1,n.message=n.status>=200&&n.status<300?"Http failure during parsing for "+(e.url||"(unknown url)"):"Http failure response for "+(e.url||"(unknown url)")+": "+e.status+" "+e.statusText,n.error=e.error||null,n}return r(e,t),e}(fc);function yc(t,e){return{body:e,headers:t.headers,observe:t.observe,params:t.params,reportProgress:t.reportProgress,responseType:t.responseType,withCredentials:t.withCredentials}}var bc=function(){function t(t){this.handler=t}return t.prototype.request=function(t,e,n){var i,r=this;if(void 0===n&&(n={}),t instanceof pc)i=t;else{var o;o=n.headers instanceof oc?n.headers:new oc(n.headers);var s=void 0;n.params&&(s=n.params instanceof lc?n.params:new lc({fromObject:n.params})),i=new pc(t,e,void 0!==n.body?n.body:null,{headers:o,params:s,reportProgress:n.reportProgress,responseType:n.responseType||"json",withCredentials:n.withCredentials})}var a=Eu(i).pipe(Q(function(t){return r.handler.handle(t)},void 0,1));if(t instanceof pc||"events"===n.observe)return a;var l=a.pipe(Tu(function(t){return t instanceof mc}));switch(n.observe||"body"){case"body":switch(i.responseType){case"arraybuffer":return l.pipe(Y(function(t){if(null!==t.body&&!(t.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return t.body}));case"blob":return l.pipe(Y(function(t){if(null!==t.body&&!(t.body instanceof Blob))throw new Error("Response is not a Blob.");return t.body}));case"text":return l.pipe(Y(function(t){if(null!==t.body&&"string"!=typeof t.body)throw new Error("Response is not a string.");return t.body}));case"json":default:return l.pipe(Y(function(t){return t.body}))}case"response":return l;default:throw new Error("Unreachable: unhandled observe type "+n.observe+"}")}},t.prototype.delete=function(t,e){return void 0===e&&(e={}),this.request("DELETE",t,e)},t.prototype.get=function(t,e){return void 0===e&&(e={}),this.request("GET",t,e)},t.prototype.head=function(t,e){return void 0===e&&(e={}),this.request("HEAD",t,e)},t.prototype.jsonp=function(t,e){return this.request("JSONP",t,{params:(new lc).append(e,"JSONP_CALLBACK"),observe:"body",responseType:"json"})},t.prototype.options=function(t,e){return void 0===e&&(e={}),this.request("OPTIONS",t,e)},t.prototype.patch=function(t,e,n){return void 0===n&&(n={}),this.request("PATCH",t,yc(n,e))},t.prototype.post=function(t,e,n){return void 0===n&&(n={}),this.request("POST",t,yc(n,e))},t.prototype.put=function(t,e,n){return void 0===n&&(n={}),this.request("PUT",t,yc(n,e))},t}(),_c=function(){function t(t,e){this.next=t,this.interceptor=e}return t.prototype.handle=function(t){return this.interceptor.intercept(t,this.next)},t}(),wc=new yt("HTTP_INTERCEPTORS"),xc=function(){function t(){}return t.prototype.intercept=function(t,e){return e.handle(t)},t}(),Cc=/^\)\]\}',?\n/,Sc=function(){},kc=function(){function t(){}return t.prototype.build=function(){return new XMLHttpRequest},t}(),Ec=function(){function t(t){this.xhrFactory=t}return t.prototype.handle=function(t){var e=this;if("JSONP"===t.method)throw new Error("Attempted to construct Jsonp request without JsonpClientModule installed.");return new D(function(n){var i=e.xhrFactory.build();if(i.open(t.method,t.urlWithParams),t.withCredentials&&(i.withCredentials=!0),t.headers.forEach(function(t,e){return i.setRequestHeader(t,e.join(","))}),t.headers.has("Accept")||i.setRequestHeader("Accept","application/json, text/plain, */*"),!t.headers.has("Content-Type")){var r=t.detectContentTypeHeader();null!==r&&i.setRequestHeader("Content-Type",r)}if(t.responseType){var o=t.responseType.toLowerCase();i.responseType="json"!==o?o:"text"}var s=t.serializeBody(),a=null,l=function(){if(null!==a)return a;var e=1223===i.status?204:i.status,n=i.statusText||"OK",r=new oc(i.getAllResponseHeaders()),o=function(t){return"responseURL"in t&&t.responseURL?t.responseURL:/^X-Request-URL:/m.test(t.getAllResponseHeaders())?t.getResponseHeader("X-Request-URL"):null}(i)||t.url;return a=new gc({headers:r,status:e,statusText:n,url:o})},u=function(){var e=l(),r=e.headers,o=e.status,s=e.statusText,a=e.url,u=null;204!==o&&(u=void 0===i.response?i.responseText:i.response),0===o&&(o=u?200:0);var c=o>=200&&o<300;if("json"===t.responseType&&"string"==typeof u){var h=u;u=u.replace(Cc,"");try{u=""!==u?JSON.parse(u):null}catch(t){u=h,c&&(c=!1,u={error:t,text:u})}}c?(n.next(new mc({body:u,headers:r,status:o,statusText:s,url:a||void 0})),n.complete()):n.error(new vc({error:u,headers:r,status:o,statusText:s,url:a||void 0}))},c=function(t){var e=new vc({error:t,status:i.status||0,statusText:i.statusText||"Unknown Error"});n.error(e)},h=!1,p=function(e){h||(n.next(l()),h=!0);var r={type:dc.DownloadProgress,loaded:e.loaded};e.lengthComputable&&(r.total=e.total),"text"===t.responseType&&i.responseText&&(r.partialText=i.responseText),n.next(r)},d=function(t){var e={type:dc.UploadProgress,loaded:t.loaded};t.lengthComputable&&(e.total=t.total),n.next(e)};return i.addEventListener("load",u),i.addEventListener("error",c),t.reportProgress&&(i.addEventListener("progress",p),null!==s&&i.upload&&i.upload.addEventListener("progress",d)),i.send(s),n.next({type:dc.Sent}),function(){i.removeEventListener("error",c),i.removeEventListener("load",u),t.reportProgress&&(i.removeEventListener("progress",p),null!==s&&i.upload&&i.upload.removeEventListener("progress",d)),i.abort()}})},t}(),Tc=new yt("XSRF_COOKIE_NAME"),Oc=new yt("XSRF_HEADER_NAME"),Ic=function(){},Ac=function(){function t(t,e,n){this.doc=t,this.platform=e,this.cookieName=n,this.lastCookieString="",this.lastToken=null,this.parseCount=0}return t.prototype.getToken=function(){if("server"===this.platform)return null;var t=this.doc.cookie||"";return t!==this.lastCookieString&&(this.parseCount++,this.lastToken=Lu(t,this.cookieName),this.lastCookieString=t),this.lastToken},s([a(0,Vt(tc)),a(1,Vt(an)),a(2,Vt(Tc))],t)}(),Pc=function(){function t(t,e){this.tokenService=t,this.headerName=e}return t.prototype.intercept=function(t,e){var n=t.url.toLowerCase();if("GET"===t.method||"HEAD"===t.method||n.startsWith("http://")||n.startsWith("https://"))return e.handle(t);var i=this.tokenService.getToken();return null===i||t.headers.has(this.headerName)||(t=t.clone({headers:t.headers.set(this.headerName,i)})),e.handle(t)},s([a(1,Vt(Oc))],t)}(),Dc=function(){function t(t,e){this.backend=t,this.injector=e,this.chain=null}return t.prototype.handle=function(t){if(null===this.chain){var e=this.injector.get(wc,[]);this.chain=e.reduceRight(function(t,e){return new _c(t,e)},this.backend)}return this.chain.handle(t)},t}(),jc=function(){function t(){}var e;return e=t,t.disable=function(){return{ngModule:e,providers:[{provide:Pc,useClass:xc}]}},t.withOptions=function(t){return void 0===t&&(t={}),{ngModule:e,providers:[t.cookieName?{provide:Tc,useValue:t.cookieName}:[],t.headerName?{provide:Oc,useValue:t.headerName}:[]]}},t}(),Mc=function(){},Rc=function(t){for(var e in void 0===t&&(t={}),t)this[e]=t[e]},Fc=function(){function t(t,e,n){this.config=t,this.breakpoints=e,this.i18n=n,this.visible=!0}return t.prototype.close=function(t){void 0===t&&(t=!0),this.config.get("pixie.ui.allowEditorClose")&&(this.visible=!1),t&&this.executeCallback("onClose")},t.prototype.open=function(){return this.visible=!0,this.executeCallback("onOpen"),new Promise(function(t){return setTimeout(function(){return t()})})},t.prototype.isOverlayMode=function(){return"overlay"===this.config.get("pixie.ui.mode")},t.prototype.isVisible=function(){return this.visible},t.prototype.getMode=function(){return this.config.get("pixie.ui.mode")},t.prototype.getTheme=function(){return this.config.get("pixie.ui.theme")},t.prototype.getControlsPosition=function(){return this.breakpoints.isMobile?"bottom":this.config.get("pixie.ui.nav.position","top")},t.prototype.init=function(t){this.rootEl=t.root,"overlay"===this.config.get("pixie.ui.mode")&&(this.visible=!1),this.bindToOverlayClick(t.overlay),this.setLocalization()},t.prototype.getWidth=function(){return this.config.get("pixie.ui.width")},t.prototype.getHeight=function(){return this.config.get("pixie.ui.height")},t.prototype.getNavItems=function(){return this.config.get("pixie.ui.nav.items")},t.prototype.shouldHideToolbar=function(){return this.config.get("pixie.ui.toolbar.hide")},t.prototype.isCompact=function(){return this.config.get("pixie.ui.compact")},t.prototype.bindToOverlayClick=function(t){var e=this;t.nativeElement.addEventListener("click",function(){e.close()})},t.prototype.executeCallback=function(t){var e=this.config.get("pixie."+t);e&&e()},t.prototype.setLocalization=function(){var t=this.config.get("pixie.languages.active","default");if("default"!==t){this.config.set("i18n.enable",!0);var e=this.config.get("pixie.languages.custom."+t);this.i18n.setLocalization({model:new Rc({name:t}),lines:e})}},t}();function Nc(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return"function"==typeof e[e.length-1]&&(t=e.pop()),1===e.length&&v(e[0])&&(e=e[0]),0===e.length?Cu:t?Nc(e).pipe(Y(function(e){return t.apply(void 0,e)})):new D(function(t){return new Lc(t,e)})}var Lc=function(t){function e(e,n){var i=t.call(this,e)||this;i.sources=n,i.completed=0,i.haveValues=0;var r=n.length;i.values=new Array(r);for(var o=0;o<r;o++){var s=U(i,n[o],null,o);s&&i.add(s)}return i}return r(e,t),e.prototype.notifyNext=function(t,e,n,i,r){this.values[n]=e,r._hasValue||(r._hasValue=!0,this.haveValues++)},e.prototype.notifyComplete=function(t){var e=this.destination,n=this.haveValues,i=this.values,r=i.length;t._hasValue?(this.completed++,this.completed===r&&(n===r&&e.next(i),e.complete())):e.complete()},e}(X),Bc=null;function Vc(){return Bc}var zc,Hc={class:"className",innerHtml:"innerHTML",readonly:"readOnly",tabindex:"tabIndex"},Wc={"\b":"Backspace","\t":"Tab","\x7f":"Delete","\x1b":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},Uc={A:"1",B:"2",C:"3",D:"4",E:"5",F:"6",G:"7",H:"8",I:"9",J:"*",K:"+",M:"-",N:".",O:"/","`":"0","\x90":"NumLock"};kt.Node&&(zc=kt.Node.prototype.contains||function(t){return!!(16&this.compareDocumentPosition(t))});var Xc,Yc=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.parse=function(t){throw new Error("parse not implemented")},e.makeCurrent=function(){var t;t=new e,Bc||(Bc=t)},e.prototype.hasProperty=function(t,e){return e in t},e.prototype.setProperty=function(t,e,n){t[e]=n},e.prototype.getProperty=function(t,e){return t[e]},e.prototype.invoke=function(t,e,n){var i;(i=t)[e].apply(i,h(n))},e.prototype.logError=function(t){window.console&&(console.error?console.error(t):console.log(t))},e.prototype.log=function(t){window.console&&window.console.log&&window.console.log(t)},e.prototype.logGroup=function(t){window.console&&window.console.group&&window.console.group(t)},e.prototype.logGroupEnd=function(){window.console&&window.console.groupEnd&&window.console.groupEnd()},Object.defineProperty(e.prototype,"attrToPropMap",{get:function(){return Hc},enumerable:!0,configurable:!0}),e.prototype.contains=function(t,e){return zc.call(t,e)},e.prototype.querySelector=function(t,e){return t.querySelector(e)},e.prototype.querySelectorAll=function(t,e){return t.querySelectorAll(e)},e.prototype.on=function(t,e,n){t.addEventListener(e,n,!1)},e.prototype.onAndCancel=function(t,e,n){return t.addEventListener(e,n,!1),function(){t.removeEventListener(e,n,!1)}},e.prototype.dispatchEvent=function(t,e){t.dispatchEvent(e)},e.prototype.createMouseEvent=function(t){var e=this.getDefaultDocument().createEvent("MouseEvent");return e.initEvent(t,!0,!0),e},e.prototype.createEvent=function(t){var e=this.getDefaultDocument().createEvent("Event");return e.initEvent(t,!0,!0),e},e.prototype.preventDefault=function(t){t.preventDefault(),t.returnValue=!1},e.prototype.isPrevented=function(t){return t.defaultPrevented||null!=t.returnValue&&!t.returnValue},e.prototype.getInnerHTML=function(t){return t.innerHTML},e.prototype.getTemplateContent=function(t){return"content"in t&&this.isTemplateElement(t)?t.content:null},e.prototype.getOuterHTML=function(t){return t.outerHTML},e.prototype.nodeName=function(t){return t.nodeName},e.prototype.nodeValue=function(t){return t.nodeValue},e.prototype.type=function(t){return t.type},e.prototype.content=function(t){return this.hasProperty(t,"content")?t.content:t},e.prototype.firstChild=function(t){return t.firstChild},e.prototype.nextSibling=function(t){return t.nextSibling},e.prototype.parentElement=function(t){return t.parentNode},e.prototype.childNodes=function(t){return t.childNodes},e.prototype.childNodesAsList=function(t){for(var e=t.childNodes,n=new Array(e.length),i=0;i<e.length;i++)n[i]=e[i];return n},e.prototype.clearNodes=function(t){for(;t.firstChild;)t.removeChild(t.firstChild)},e.prototype.appendChild=function(t,e){t.appendChild(e)},e.prototype.removeChild=function(t,e){t.removeChild(e)},e.prototype.replaceChild=function(t,e,n){t.replaceChild(e,n)},e.prototype.remove=function(t){return t.parentNode&&t.parentNode.removeChild(t),t},e.prototype.insertBefore=function(t,e,n){t.insertBefore(n,e)},e.prototype.insertAllBefore=function(t,e,n){n.forEach(function(n){return t.insertBefore(n,e)})},e.prototype.insertAfter=function(t,e,n){t.insertBefore(n,e.nextSibling)},e.prototype.setInnerHTML=function(t,e){t.innerHTML=e},e.prototype.getText=function(t){return t.textContent},e.prototype.setText=function(t,e){t.textContent=e},e.prototype.getValue=function(t){return t.value},e.prototype.setValue=function(t,e){t.value=e},e.prototype.getChecked=function(t){return t.checked},e.prototype.setChecked=function(t,e){t.checked=e},e.prototype.createComment=function(t){return this.getDefaultDocument().createComment(t)},e.prototype.createTemplate=function(t){var e=this.getDefaultDocument().createElement("template");return e.innerHTML=t,e},e.prototype.createElement=function(t,e){return(e=e||this.getDefaultDocument()).createElement(t)},e.prototype.createElementNS=function(t,e,n){return(n=n||this.getDefaultDocument()).createElementNS(t,e)},e.prototype.createTextNode=function(t,e){return(e=e||this.getDefaultDocument()).createTextNode(t)},e.prototype.createScriptTag=function(t,e,n){var i=(n=n||this.getDefaultDocument()).createElement("SCRIPT");return i.setAttribute(t,e),i},e.prototype.createStyleElement=function(t,e){var n=(e=e||this.getDefaultDocument()).createElement("style");return this.appendChild(n,this.createTextNode(t,e)),n},e.prototype.createShadowRoot=function(t){return t.createShadowRoot()},e.prototype.getShadowRoot=function(t){return t.shadowRoot},e.prototype.getHost=function(t){return t.host},e.prototype.clone=function(t){return t.cloneNode(!0)},e.prototype.getElementsByClassName=function(t,e){return t.getElementsByClassName(e)},e.prototype.getElementsByTagName=function(t,e){return t.getElementsByTagName(e)},e.prototype.classList=function(t){return Array.prototype.slice.call(t.classList,0)},e.prototype.addClass=function(t,e){t.classList.add(e)},e.prototype.removeClass=function(t,e){t.classList.remove(e)},e.prototype.hasClass=function(t,e){return t.classList.contains(e)},e.prototype.setStyle=function(t,e,n){t.style[e]=n},e.prototype.removeStyle=function(t,e){t.style[e]=""},e.prototype.getStyle=function(t,e){return t.style[e]},e.prototype.hasStyle=function(t,e,n){var i=this.getStyle(t,e)||"";return n?i==n:i.length>0},e.prototype.tagName=function(t){return t.tagName},e.prototype.attributeMap=function(t){for(var e=new Map,n=t.attributes,i=0;i<n.length;i++){var r=n.item(i);e.set(r.name,r.value)}return e},e.prototype.hasAttribute=function(t,e){return t.hasAttribute(e)},e.prototype.hasAttributeNS=function(t,e,n){return t.hasAttributeNS(e,n)},e.prototype.getAttribute=function(t,e){return t.getAttribute(e)},e.prototype.getAttributeNS=function(t,e,n){return t.getAttributeNS(e,n)},e.prototype.setAttribute=function(t,e,n){t.setAttribute(e,n)},e.prototype.setAttributeNS=function(t,e,n,i){t.setAttributeNS(e,n,i)},e.prototype.removeAttribute=function(t,e){t.removeAttribute(e)},e.prototype.removeAttributeNS=function(t,e,n){t.removeAttributeNS(e,n)},e.prototype.templateAwareRoot=function(t){return this.isTemplateElement(t)?this.content(t):t},e.prototype.createHtmlDocument=function(){return document.implementation.createHTMLDocument("fakeTitle")},e.prototype.getDefaultDocument=function(){return document},e.prototype.getBoundingClientRect=function(t){try{return t.getBoundingClientRect()}catch(t){return{top:0,bottom:0,left:0,right:0,width:0,height:0}}},e.prototype.getTitle=function(t){return t.title},e.prototype.setTitle=function(t,e){t.title=e||""},e.prototype.elementMatches=function(t,e){return!!this.isElementNode(t)&&(t.matches&&t.matches(e)||t.msMatchesSelector&&t.msMatchesSelector(e)||t.webkitMatchesSelector&&t.webkitMatchesSelector(e))},e.prototype.isTemplateElement=function(t){return this.isElementNode(t)&&"TEMPLATE"===t.nodeName},e.prototype.isTextNode=function(t){return t.nodeType===Node.TEXT_NODE},e.prototype.isCommentNode=function(t){return t.nodeType===Node.COMMENT_NODE},e.prototype.isElementNode=function(t){return t.nodeType===Node.ELEMENT_NODE},e.prototype.hasShadowRoot=function(t){return null!=t.shadowRoot&&t instanceof HTMLElement},e.prototype.isShadowRoot=function(t){return t instanceof DocumentFragment},e.prototype.importIntoDoc=function(t){return document.importNode(this.templateAwareRoot(t),!0)},e.prototype.adoptNode=function(t){return document.adoptNode(t)},e.prototype.getHref=function(t){return t.getAttribute("href")},e.prototype.getEventKey=function(t){var e=t.key;if(null==e){if(null==(e=t.keyIdentifier))return"Unidentified";e.startsWith("U+")&&(e=String.fromCharCode(parseInt(e.substring(2),16)),3===t.location&&Uc.hasOwnProperty(e)&&(e=Uc[e]))}return Wc[e]||e},e.prototype.getGlobalEventTarget=function(t,e){return"window"===e?window:"document"===e?t:"body"===e?t.body:null},e.prototype.getHistory=function(){return window.history},e.prototype.getLocation=function(){return window.location},e.prototype.getBaseHref=function(t){var e,n=qc||(qc=document.querySelector("base"))?qc.getAttribute("href"):null;return null==n?null:(e=n,Xc||(Xc=document.createElement("a")),Xc.setAttribute("href",e),"/"===Xc.pathname.charAt(0)?Xc.pathname:"/"+Xc.pathname)},e.prototype.resetBaseElement=function(){qc=null},e.prototype.getUserAgent=function(){return window.navigator.userAgent},e.prototype.setData=function(t,e,n){this.setAttribute(t,"data-"+e,n)},e.prototype.getData=function(t,e){return this.getAttribute(t,"data-"+e)},e.prototype.getComputedStyle=function(t){return getComputedStyle(t)},e.prototype.supportsWebAnimation=function(){return"function"==typeof Element.prototype.animate},e.prototype.performanceNow=function(){return window.performance&&window.performance.now?window.performance.now():(new Date).getTime()},e.prototype.supportsCookies=function(){return!0},e.prototype.getCookie=function(t){return Lu(document.cookie,t)},e.prototype.setCookie=function(t,e){document.cookie=encodeURIComponent(t)+"="+encodeURIComponent(e)},e}(function(t){function e(){var e=t.call(this)||this;e._animationPrefix=null,e._transitionEnd=null;try{var n=e.createElement("div",document);if(null!=e.getStyle(n,"animationName"))e._animationPrefix="";else for(var i=["Webkit","Moz","O","ms"],r=0;r<i.length;r++)if(null!=e.getStyle(n,i[r]+"AnimationName")){e._animationPrefix="-"+i[r].toLowerCase()+"-";break}var o={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};Object.keys(o).forEach(function(t){null!=e.getStyle(n,t)&&(e._transitionEnd=o[t])})}catch(t){e._animationPrefix=null,e._transitionEnd=null}return e}return r(e,t),e.prototype.getDistributedNodes=function(t){return t.getDistributedNodes()},e.prototype.resolveAndSetHref=function(t,e,n){t.href=null==n?e:e+"/../"+n},e.prototype.supportsDOMEvents=function(){return!0},e.prototype.supportsNativeShadowDOM=function(){return"function"==typeof document.body.createShadowRoot},e.prototype.getAnimationPrefix=function(){return this._animationPrefix?this._animationPrefix:""},e.prototype.getTransitionEnd=function(){return this._transitionEnd?this._transitionEnd:""},e.prototype.supportsAnimation=function(){return null!=this._animationPrefix&&null!=this._transitionEnd},e}(function(){function t(){this.resourceLoaderType=null}return Object.defineProperty(t.prototype,"attrToPropMap",{get:function(){return this._attrToPropMap},set:function(t){this._attrToPropMap=t},enumerable:!0,configurable:!0}),t}())),qc=null,Gc=tc;function Kc(){return!!window.history.pushState}var Zc=function(t){function e(e){var n=t.call(this)||this;return n._doc=e,n._init(),n}return r(e,t),e.prototype._init=function(){this.location=Vc().getLocation(),this._history=Vc().getHistory()},e.prototype.getBaseHrefFromDOM=function(){return Vc().getBaseHref(this._doc)},e.prototype.onPopState=function(t){Vc().getGlobalEventTarget(this._doc,"window").addEventListener("popstate",t,!1)},e.prototype.onHashChange=function(t){Vc().getGlobalEventTarget(this._doc,"window").addEventListener("hashchange",t,!1)},Object.defineProperty(e.prototype,"pathname",{get:function(){return this.location.pathname},set:function(t){this.location.pathname=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"search",{get:function(){return this.location.search},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hash",{get:function(){return this.location.hash},enumerable:!0,configurable:!0}),e.prototype.pushState=function(t,e,n){Kc()?this._history.pushState(t,e,n):this.location.hash=n},e.prototype.replaceState=function(t,e,n){Kc()?this._history.replaceState(t,e,n):this.location.hash=n},e.prototype.forward=function(){this._history.forward()},e.prototype.back=function(){this._history.back()},s([a(0,Vt(Gc)),l("design:paramtypes",[Object])],e)}(Au),Qc=new yt("TRANSITION_ID"),Jc=[{provide:tn,useFactory:function(t,e,n){return function(){n.get(en).donePromise.then(function(){var n=Vc();Array.prototype.slice.apply(n.querySelectorAll(e,"style[ng-transition]")).filter(function(e){return n.getAttribute(e,"ng-transition")===t}).forEach(function(t){return n.remove(t)})})}},deps:[Qc,Gc,Zt],multi:!0}],$c=function(){function t(){}return t.init=function(){var e;e=new t,Vn=e},t.prototype.addToWindow=function(t){kt.getAngularTestability=function(e,n){void 0===n&&(n=!0);var i=t.findTestabilityInTree(e,n);if(null==i)throw new Error("Could not find testability for element.");return i},kt.getAllAngularTestabilities=function(){return t.getAllTestabilities()},kt.getAllAngularRootElements=function(){return t.getAllRootElements()},kt.frameworkStabilizers||(kt.frameworkStabilizers=[]),kt.frameworkStabilizers.push(function(t){var e=kt.getAllAngularTestabilities(),n=e.length,i=!1,r=function(e){i=i||e,0==--n&&t(i)};e.forEach(function(t){t.whenStable(r)})})},t.prototype.findTestabilityInTree=function(t,e,n){if(null==e)return null;var i=t.getTestability(e);return null!=i?i:n?Vc().isShadowRoot(e)?this.findTestabilityInTree(t,Vc().getHost(e),!0):this.findTestabilityInTree(t,Vc().parentElement(e),!0):null},t}();function th(t,e){"undefined"!=typeof COMPILED&&COMPILED||((kt.ng=kt.ng||{})[t]=e)}var eh={ApplicationRef:Zn,NgZone:An};function nh(t){return ui(t)}var ih=new yt("EventManagerPlugins"),rh=function(){function t(t,e){var n=this;this._zone=e,this._eventNameToPlugin=new Map,t.forEach(function(t){return t.manager=n}),this._plugins=t.slice().reverse()}return t.prototype.addEventListener=function(t,e,n){return this._findPluginFor(e).addEventListener(t,e,n)},t.prototype.addGlobalEventListener=function(t,e,n){return this._findPluginFor(e).addGlobalEventListener(t,e,n)},t.prototype.getZone=function(){return this._zone},t.prototype._findPluginFor=function(t){var e=this._eventNameToPlugin.get(t);if(e)return e;for(var n=this._plugins,i=0;i<n.length;i++){var r=n[i];if(r.supports(t))return this._eventNameToPlugin.set(t,r),r}throw new Error("No event manager plugin found for event "+t)},s([a(0,Vt(ih))],t)}(),oh=function(){function t(t){this._doc=t}return t.prototype.addGlobalEventListener=function(t,e,n){var i=Vc().getGlobalEventTarget(this._doc,t);if(!i)throw new Error("Unsupported event target "+i+" for event "+e);return this.addEventListener(i,e,n)},t}(),sh=function(){function t(){this._stylesSet=new Set}return t.prototype.addStyles=function(t){var e=this,n=new Set;t.forEach(function(t){e._stylesSet.has(t)||(e._stylesSet.add(t),n.add(t))}),this.onStylesAdded(n)},t.prototype.onStylesAdded=function(t){},t.prototype.getAllStyles=function(){return Array.from(this._stylesSet)},t}(),ah=function(t){function e(e){var n=t.call(this)||this;return n._doc=e,n._hostNodes=new Set,n._styleNodes=new Set,n._hostNodes.add(e.head),n}return r(e,t),e.prototype._addStylesToHost=function(t,e){var n=this;t.forEach(function(t){var i=n._doc.createElement("style");i.textContent=t,n._styleNodes.add(e.appendChild(i))})},e.prototype.addHost=function(t){this._addStylesToHost(this._stylesSet,t),this._hostNodes.add(t)},e.prototype.removeHost=function(t){this._hostNodes.delete(t)},e.prototype.onStylesAdded=function(t){var e=this;this._hostNodes.forEach(function(n){return e._addStylesToHost(t,n)})},e.prototype.ngOnDestroy=function(){this._styleNodes.forEach(function(t){return Vc().remove(t)})},s([a(0,Vt(Gc))],e)}(sh),lh={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},uh=/%COMP%/g,ch="_nghost-%COMP%",hh="_ngcontent-%COMP%";function ph(t,e,n){for(var i=0;i<e.length;i++){var r=e[i];Array.isArray(r)?ph(t,r,n):(r=r.replace(uh,t),n.push(r))}return n}function dh(t){return function(e){!1===t(e)&&(e.preventDefault(),e.returnValue=!1)}}var fh=function(){function t(t,e){this.eventManager=t,this.sharedStylesHost=e,this.rendererByCompId=new Map,this.defaultRenderer=new gh(t)}return t.prototype.createRenderer=function(t,e){if(!t||!e)return this.defaultRenderer;switch(e.encapsulation){case fe.Emulated:var n=this.rendererByCompId.get(e.id);return n||(n=new bh(this.eventManager,this.sharedStylesHost,e),this.rendererByCompId.set(e.id,n)),n.applyToHost(t),n;case fe.Native:case fe.ShadowDom:return new _h(this.eventManager,this.sharedStylesHost,t,e);default:if(!this.rendererByCompId.has(e.id)){var i=ph(e.id,e.styles,[]);this.sharedStylesHost.addStyles(i),this.rendererByCompId.set(e.id,this.defaultRenderer)}return this.defaultRenderer}},t.prototype.begin=function(){},t.prototype.end=function(){},t}(),gh=function(){function t(t){this.eventManager=t,this.data=Object.create(null)}return t.prototype.destroy=function(){},t.prototype.createElement=function(t,e){return e?document.createElementNS(lh[e],t):document.createElement(t)},t.prototype.createComment=function(t){return document.createComment(t)},t.prototype.createText=function(t){return document.createTextNode(t)},t.prototype.appendChild=function(t,e){t.appendChild(e)},t.prototype.insertBefore=function(t,e,n){t&&t.insertBefore(e,n)},t.prototype.removeChild=function(t,e){t&&t.removeChild(e)},t.prototype.selectRootElement=function(t){var e="string"==typeof t?document.querySelector(t):t;if(!e)throw new Error('The selector "'+t+'" did not match any elements');return e.textContent="",e},t.prototype.parentNode=function(t){return t.parentNode},t.prototype.nextSibling=function(t){return t.nextSibling},t.prototype.setAttribute=function(t,e,n,i){if(i){e=i+":"+e;var r=lh[i];r?t.setAttributeNS(r,e,n):t.setAttribute(e,n)}else t.setAttribute(e,n)},t.prototype.removeAttribute=function(t,e,n){if(n){var i=lh[n];i?t.removeAttributeNS(i,e):t.removeAttribute(n+":"+e)}else t.removeAttribute(e)},t.prototype.addClass=function(t,e){t.classList.add(e)},t.prototype.removeClass=function(t,e){t.classList.remove(e)},t.prototype.setStyle=function(t,e,n,i){i&$n.DashCase?t.style.setProperty(e,n,i&$n.Important?"important":""):t.style[e]=n},t.prototype.removeStyle=function(t,e,n){n&$n.DashCase?t.style.removeProperty(e):t.style[e]=""},t.prototype.setProperty=function(t,e,n){vh(e,"property"),t[e]=n},t.prototype.setValue=function(t,e){t.nodeValue=e},t.prototype.listen=function(t,e,n){return vh(e,"listener"),"string"==typeof t?this.eventManager.addGlobalEventListener(t,e,dh(n)):this.eventManager.addEventListener(t,e,dh(n))},t}(),mh="@".charCodeAt(0);function vh(t,e){if(t.charCodeAt(0)===mh)throw new Error("Found the synthetic "+e+" "+t+'. Please include either "BrowserAnimationsModule" or "NoopAnimationsModule" in your application.')}var yh,bh=function(t){function e(e,n,i){var r=t.call(this,e)||this;r.component=i;var o=ph(i.id,i.styles,[]);return n.addStyles(o),r.contentAttr=hh.replace(uh,i.id),r.hostAttr=ch.replace(uh,i.id),r}return r(e,t),e.prototype.applyToHost=function(e){t.prototype.setAttribute.call(this,e,this.hostAttr,"")},e.prototype.createElement=function(e,n){var i=t.prototype.createElement.call(this,e,n);return t.prototype.setAttribute.call(this,i,this.contentAttr,""),i},e}(gh),_h=function(t){function e(e,n,i,r){var o=t.call(this,e)||this;o.sharedStylesHost=n,o.hostEl=i,o.component=r,o.shadowRoot=r.encapsulation===fe.ShadowDom?i.attachShadow({mode:"open"}):i.createShadowRoot(),o.sharedStylesHost.addHost(o.shadowRoot);for(var s=ph(r.id,r.styles,[]),a=0;a<s.length;a++){var l=document.createElement("style");l.textContent=s[a],o.shadowRoot.appendChild(l)}return o}return r(e,t),e.prototype.nodeOrShadowRoot=function(t){return t===this.hostEl?this.shadowRoot:t},e.prototype.destroy=function(){this.sharedStylesHost.removeHost(this.shadowRoot)},e.prototype.appendChild=function(e,n){return t.prototype.appendChild.call(this,this.nodeOrShadowRoot(e),n)},e.prototype.insertBefore=function(e,n,i){return t.prototype.insertBefore.call(this,this.nodeOrShadowRoot(e),n,i)},e.prototype.removeChild=function(e,n){return t.prototype.removeChild.call(this,this.nodeOrShadowRoot(e),n)},e.prototype.parentNode=function(e){return this.nodeOrShadowRoot(t.prototype.parentNode.call(this,this.nodeOrShadowRoot(e)))},e}(gh),wh="undefined"!=typeof Zone&&Zone.__symbol__||function(t){return"__zone_symbol__"+t},xh=wh("addEventListener"),Ch=wh("removeEventListener"),Sh={},kh="__zone_symbol__propagationStopped";"undefined"!=typeof Zone&&Zone[wh("BLACK_LISTED_EVENTS")]&&(yh={});var Eh=function(t){return!!yh&&yh.hasOwnProperty(t)},Th=function(t){var e=Sh[t.type];if(e){var n=this[e];if(n){var i=[t];if(1===n.length)return(s=n[0]).zone!==Zone.current?s.zone.run(s.handler,this,i):s.handler.apply(this,i);for(var r=n.slice(),o=0;o<r.length&&!0!==t[kh];o++){var s;(s=r[o]).zone!==Zone.current?s.zone.run(s.handler,this,i):s.handler.apply(this,i)}}}},Oh=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.ngZone=n,i&&function(t){return t===nc}(i)||r.patchEvent(),r}return r(e,t),e.prototype.patchEvent=function(){if("undefined"!=typeof Event&&Event&&Event.prototype&&!Event.prototype.__zone_symbol__stopImmediatePropagation){var t=Event.prototype.__zone_symbol__stopImmediatePropagation=Event.prototype.stopImmediatePropagation;Event.prototype.stopImmediatePropagation=function(){this&&(this[kh]=!0),t&&t.apply(this,arguments)}}},e.prototype.supports=function(t){return!0},e.prototype.addEventListener=function(t,e,n){var i=this,r=n;if(!t[xh]||An.isInAngularZone()&&!Eh(e))t.addEventListener(e,r,!1);else{var o=Sh[e];o||(o=Sh[e]=wh("ANGULAR"+e+"FALSE"));var s=t[o],a=s&&s.length>0;s||(s=t[o]=[]);var l=Eh(e)?Zone.root:Zone.current;if(0===s.length)s.push({zone:l,handler:r});else{for(var u=!1,c=0;c<s.length;c++)if(s[c].handler===r){u=!0;break}u||s.push({zone:l,handler:r})}a||t[xh](e,Th,!1)}return function(){return i.removeEventListener(t,e,r)}},e.prototype.removeEventListener=function(t,e,n){var i=t[Ch];if(!i)return t.removeEventListener.apply(t,[e,n,!1]);var r=Sh[e],o=r&&t[r];if(!o)return t.removeEventListener.apply(t,[e,n,!1]);for(var s=!1,a=0;a<o.length;a++)if(o[a].handler===n){s=!0,o.splice(a,1);break}s?0===o.length&&i.apply(t,[e,Th,!1]):t.removeEventListener.apply(t,[e,n,!1])},s([a(0,Vt(Gc)),a(2,zt()),a(2,Vt(an))],e)}(oh),Ih={pan:!0,panstart:!0,panmove:!0,panend:!0,pancancel:!0,panleft:!0,panright:!0,panup:!0,pandown:!0,pinch:!0,pinchstart:!0,pinchmove:!0,pinchend:!0,pinchcancel:!0,pinchin:!0,pinchout:!0,press:!0,pressup:!0,rotate:!0,rotatestart:!0,rotatemove:!0,rotateend:!0,rotatecancel:!0,swipe:!0,swipeleft:!0,swiperight:!0,swipeup:!0,swipedown:!0,tap:!0},Ah=new yt("HammerGestureConfig"),Ph=new yt("HammerLoader"),Dh=function(){function t(){this.events=[],this.overrides={}}return t.prototype.buildHammer=function(t){var e=new Hammer(t,this.options);for(var n in e.get("pinch").set({enable:!0}),e.get("rotate").set({enable:!0}),this.overrides)e.get(n).set(this.overrides[n]);return e},t}(),jh=function(t){function e(e,n,i,r){var o=t.call(this,e)||this;return o._config=n,o.console=i,o.loader=r,o}return r(e,t),e.prototype.supports=function(t){return!(!Ih.hasOwnProperty(t.toLowerCase())&&!this.isCustomEvent(t)||!window.Hammer&&!this.loader&&(this.console.warn('The "'+t+'" event cannot be bound because Hammer.JS is not loaded and no custom loader has been specified.'),1))},e.prototype.addEventListener=function(t,e,n){var i=this,r=this.manager.getZone();if(e=e.toLowerCase(),!window.Hammer&&this.loader){var o=!1,s=function(){o=!0};return this.loader().then(function(){if(!window.Hammer)return i.console.warn("The custom HAMMER_LOADER completed, but Hammer.JS is not present."),void(s=function(){});o||(s=i.addEventListener(t,e,n))}).catch(function(){i.console.warn('The "'+e+'" event cannot be bound because the custom Hammer.JS loader failed.'),s=function(){}}),function(){s()}}return r.runOutsideAngular(function(){var o=i._config.buildHammer(t),s=function(t){r.runGuarded(function(){n(t)})};return o.on(e,s),function(){return o.off(e,s)}})},e.prototype.isCustomEvent=function(t){return this._config.events.indexOf(t)>-1},s([a(0,Vt(Gc)),a(1,Vt(Ah)),a(3,zt()),a(3,Vt(Ph))],e)}(oh),Mh=["alt","control","meta","shift"],Rh={alt:function(t){return t.altKey},control:function(t){return t.ctrlKey},meta:function(t){return t.metaKey},shift:function(t){return t.shiftKey}},Fh=function(t){function e(e){return t.call(this,e)||this}var n;return r(e,t),n=e,e.prototype.supports=function(t){return null!=n.parseEventName(t)},e.prototype.addEventListener=function(t,e,i){var r=n.parseEventName(e),o=n.eventCallback(r.fullKey,i,this.manager.getZone());return this.manager.getZone().runOutsideAngular(function(){return Vc().onAndCancel(t,r.domEventName,o)})},e.parseEventName=function(t){var e=t.toLowerCase().split("."),i=e.shift();if(0===e.length||"keydown"!==i&&"keyup"!==i)return null;var r=n._normalizeKey(e.pop()),o="";if(Mh.forEach(function(t){var n=e.indexOf(t);n>-1&&(e.splice(n,1),o+=t+".")}),o+=r,0!=e.length||0===r.length)return null;var s={};return s.domEventName=i,s.fullKey=o,s},e.getEventFullKey=function(t){var e="",n=Vc().getEventKey(t);return" "===(n=n.toLowerCase())?n="space":"."===n&&(n="dot"),Mh.forEach(function(i){i!=n&&(0,Rh[i])(t)&&(e+=i+".")}),e+=n},e.eventCallback=function(t,e,i){return function(r){n.getEventFullKey(r)===t&&i.runGuarded(function(){return e(r)})}},e._normalizeKey=function(t){switch(t){case"esc":return"escape";default:return t}},n=s([a(0,Vt(Gc))],e)}(oh),Nh=function(){},Lh=function(t){function e(e){var n=t.call(this)||this;return n._doc=e,n}return r(e,t),e.prototype.sanitize=function(t,e){if(null==e)return null;switch(t){case or.NONE:return e;case or.HTML:return e instanceof Vh?e.changingThisBreaksApplicationSecurity:(this.checkNotSafeValue(e,"HTML"),function(t,e){var n=null;try{Wi=Wi||new Ni(t);var i=e?String(e):"";n=Wi.getInertBodyElement(i);var r=5,o=i;do{if(0===r)throw new Error("Failed to sanitize html because the input is unstable");r--,i=o,o=n.innerHTML,n=Wi.getInertBodyElement(i)}while(i!==o);var s=new Ji,a=s.sanitizeChildren(nr(n)||n);return Un()&&s.sanitizedSomething&&console.warn("WARNING: sanitizing HTML stripped some content (see http://g.co/ng/security#xss)."),a}finally{if(n)for(var l=nr(n)||n;l.firstChild;)l.removeChild(l.firstChild)}}(this._doc,String(e)));case or.STYLE:return e instanceof zh?e.changingThisBreaksApplicationSecurity:(this.checkNotSafeValue(e,"Style"),function(t){if(!(t=String(t).trim()))return"";var e=t.match(rr);return e&&Vi(e[1])===e[1]||t.match(ir)&&function(t){for(var e=!0,n=!0,i=0;i<t.length;i++){var r=t.charAt(i);"'"===r&&n?e=!e:'"'===r&&e&&(n=!n)}return e&&n}(t)?t:(Un()&&console.warn("WARNING: sanitizing unsafe style value "+t+" (see http://g.co/ng/security#xss)."),"unsafe")}(e));case or.SCRIPT:if(e instanceof Hh)return e.changingThisBreaksApplicationSecurity;throw this.checkNotSafeValue(e,"Script"),new Error("unsafe value used in a script context");case or.URL:return e instanceof Uh||e instanceof Wh?e.changingThisBreaksApplicationSecurity:(this.checkNotSafeValue(e,"URL"),Vi(String(e)));case or.RESOURCE_URL:if(e instanceof Uh)return e.changingThisBreaksApplicationSecurity;throw this.checkNotSafeValue(e,"ResourceURL"),new Error("unsafe value used in a resource URL context (see http://g.co/ng/security#xss)");default:throw new Error("Unexpected SecurityContext "+t+" (see http://g.co/ng/security#xss)")}},e.prototype.checkNotSafeValue=function(t,e){if(t instanceof Bh)throw new Error("Required a safe "+e+", got a "+t.getTypeName()+" (see http://g.co/ng/security#xss)")},e.prototype.bypassSecurityTrustHtml=function(t){return new Vh(t)},e.prototype.bypassSecurityTrustStyle=function(t){return new zh(t)},e.prototype.bypassSecurityTrustScript=function(t){return new Hh(t)},e.prototype.bypassSecurityTrustUrl=function(t){return new Wh(t)},e.prototype.bypassSecurityTrustResourceUrl=function(t){return new Uh(t)},s([a(0,Vt(Gc))],e)}(Nh),Bh=function(){function t(t){this.changingThisBreaksApplicationSecurity=t}return t.prototype.toString=function(){return"SafeValue must use [property]=binding: "+this.changingThisBreaksApplicationSecurity+" (see http://g.co/ng/security#xss)"},t}(),Vh=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.getTypeName=function(){return"HTML"},e}(Bh),zh=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.getTypeName=function(){return"Style"},e}(Bh),Hh=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.getTypeName=function(){return"Script"},e}(Bh),Wh=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.getTypeName=function(){return"URL"},e}(Bh),Uh=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.getTypeName=function(){return"ResourceURL"},e}(Bh),Xh=Yn(Pi,"browser",[{provide:an,useValue:ec},{provide:sn,useValue:function(){Yc.makeCurrent(),$c.init()},multi:!0},{provide:Au,useClass:Zc,deps:[Gc]},{provide:Gc,useFactory:function(){return document},deps:[]}]),Yh=function(){function t(t){if(t)throw new Error("BrowserModule has already been loaded. If you need access to common directives such as NgIf and NgFor from a lazy loaded module, import CommonModule instead.")}var e;return e=t,t.withServerTransition=function(t){return{ngModule:e,providers:[{provide:nn,useValue:t.appId},{provide:Qc,useExisting:nn},Jc]}},e=s([a(0,zt()),a(0,Wt()),a(0,Vt(e))],t)}();"undefined"!=typeof window&&window;var qh=function(){function t(){}return Object.defineProperty(t.prototype,"value",{get:function(){return this.control?this.control.value:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"valid",{get:function(){return this.control?this.control.valid:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"invalid",{get:function(){return this.control?this.control.invalid:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"pending",{get:function(){return this.control?this.control.pending:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"disabled",{get:function(){return this.control?this.control.disabled:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"enabled",{get:function(){return this.control?this.control.enabled:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"errors",{get:function(){return this.control?this.control.errors:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"pristine",{get:function(){return this.control?this.control.pristine:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dirty",{get:function(){return this.control?this.control.dirty:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"touched",{get:function(){return this.control?this.control.touched:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"status",{get:function(){return this.control?this.control.status:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"untouched",{get:function(){return this.control?this.control.untouched:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"statusChanges",{get:function(){return this.control?this.control.statusChanges:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"valueChanges",{get:function(){return this.control?this.control.valueChanges:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"path",{get:function(){return null},enumerable:!0,configurable:!0}),t.prototype.reset=function(t){void 0===t&&(t=void 0),this.control&&this.control.reset(t)},t.prototype.hasError=function(t,e){return!!this.control&&this.control.hasError(t,e)},t.prototype.getError=function(t,e){return this.control?this.control.getError(t,e):null},t}(),Gh=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),Object.defineProperty(e.prototype,"formDirective",{get:function(){return null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"path",{get:function(){return null},enumerable:!0,configurable:!0}),e}(qh);function Kh(t){return null==t||0===t.length}var Zh=new yt("NgValidators"),Qh=new yt("NgAsyncValidators"),Jh=/^(?=.{1,254}$)(?=.{1,64}@)[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+(\.[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+)*@[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?(\.[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?)*$/,$h=function(){function t(){}return t.min=function(t){return function(e){if(Kh(e.value)||Kh(t))return null;var n=parseFloat(e.value);return!isNaN(n)&&n<t?{min:{min:t,actual:e.value}}:null}},t.max=function(t){return function(e){if(Kh(e.value)||Kh(t))return null;var n=parseFloat(e.value);return!isNaN(n)&&n>t?{max:{max:t,actual:e.value}}:null}},t.required=function(t){return Kh(t.value)?{required:!0}:null},t.requiredTrue=function(t){return!0===t.value?null:{required:!0}},t.email=function(t){return Kh(t.value)?null:Jh.test(t.value)?null:{email:!0}},t.minLength=function(t){return function(e){if(Kh(e.value))return null;var n=e.value?e.value.length:0;return n<t?{minlength:{requiredLength:t,actualLength:n}}:null}},t.maxLength=function(t){return function(e){var n=e.value?e.value.length:0;return n>t?{maxlength:{requiredLength:t,actualLength:n}}:null}},t.pattern=function(e){return e?("string"==typeof e?(i="","^"!==e.charAt(0)&&(i+="^"),i+=e,"$"!==e.charAt(e.length-1)&&(i+="$"),n=new RegExp(i)):(i=e.toString(),n=e),function(t){if(Kh(t.value))return null;var e=t.value;return n.test(e)?null:{pattern:{requiredPattern:i,actualValue:e}}}):t.nullValidator;var n,i},t.nullValidator=function(t){return null},t.compose=function(t){if(!t)return null;var e=t.filter(tp);return 0==e.length?null:function(t){return np(function(t,n){return e.map(function(e){return e(t)})}(t))}},t.composeAsync=function(t){if(!t)return null;var e=t.filter(tp);return 0==e.length?null:function(t){return Nc(function(t,n){return e.map(function(e){return e(t)})}(t).map(ep)).pipe(Y(np))}},t}();function tp(t){return null!=t}function ep(t){var e=Je(t)?Z(t):t;if(!$e(e))throw new Error("Expected validator to return Promise or Observable.");return e}function np(t){var e=t.reduce(function(t,e){return null!=e?o({},t,e):t},{});return 0===Object.keys(e).length?null:e}var ip=new yt("NgValueAccessor"),rp=function(){function t(t,e){this._renderer=t,this._elementRef=e,this.onChange=function(t){},this.onTouched=function(){}}return t.prototype.writeValue=function(t){this._renderer.setProperty(this._elementRef.nativeElement,"checked",t)},t.prototype.registerOnChange=function(t){this.onChange=t},t.prototype.registerOnTouched=function(t){this.onTouched=t},t.prototype.setDisabledState=function(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)},t}(),op=new yt("CompositionEventMode"),sp=function(){function t(t,e,n){var i;this._renderer=t,this._elementRef=e,this._compositionMode=n,this.onChange=function(t){},this.onTouched=function(){},this._composing=!1,null==this._compositionMode&&(this._compositionMode=(i=Vc()?Vc().getUserAgent():"",!/android (\d+)/.test(i.toLowerCase())))}return t.prototype.writeValue=function(t){this._renderer.setProperty(this._elementRef.nativeElement,"value",null==t?"":t)},t.prototype.registerOnChange=function(t){this.onChange=t},t.prototype.registerOnTouched=function(t){this.onTouched=t},t.prototype.setDisabledState=function(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)},t.prototype._handleInput=function(t){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(t)},t.prototype._compositionStart=function(){this._composing=!0},t.prototype._compositionEnd=function(t){this._composing=!1,this._compositionMode&&this.onChange(t)},s([a(2,zt()),a(2,Vt(op))],t)}();function ap(t){return t.validate?function(e){return t.validate(e)}:t}function lp(t){return t.validate?function(e){return t.validate(e)}:t}var up=function(){function t(t,e){this._renderer=t,this._elementRef=e,this.onChange=function(t){},this.onTouched=function(){}}return t.prototype.writeValue=function(t){this._renderer.setProperty(this._elementRef.nativeElement,"value",null==t?"":t)},t.prototype.registerOnChange=function(t){this.onChange=function(e){t(""==e?null:parseFloat(e))}},t.prototype.registerOnTouched=function(t){this.onTouched=t},t.prototype.setDisabledState=function(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)},t}();function cp(){throw new Error("unimplemented")}var hp=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._parent=null,e.name=null,e.valueAccessor=null,e._rawValidators=[],e._rawAsyncValidators=[],e}return r(e,t),Object.defineProperty(e.prototype,"validator",{get:function(){return cp()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"asyncValidator",{get:function(){return cp()},enumerable:!0,configurable:!0}),e}(qh),pp=function(){function t(){this._accessors=[]}return t.prototype.add=function(t,e){this._accessors.push([t,e])},t.prototype.remove=function(t){for(var e=this._accessors.length-1;e>=0;--e)if(this._accessors[e][1]===t)return void this._accessors.splice(e,1)},t.prototype.select=function(t){var e=this;this._accessors.forEach(function(n){e._isSameGroup(n,t)&&n[1]!==t&&n[1].fireUncheck(t.value)})},t.prototype._isSameGroup=function(t,e){return!!t[0].control&&t[0]._parent===e._control._parent&&t[1].name===e.name},t}(),dp=function(){function t(t,e,n,i){this._renderer=t,this._elementRef=e,this._registry=n,this._injector=i,this.onChange=function(){},this.onTouched=function(){}}return t.prototype.ngOnInit=function(){this._control=this._injector.get(hp),this._checkName(),this._registry.add(this._control,this)},t.prototype.ngOnDestroy=function(){this._registry.remove(this)},t.prototype.writeValue=function(t){this._state=t===this.value,this._renderer.setProperty(this._elementRef.nativeElement,"checked",this._state)},t.prototype.registerOnChange=function(t){var e=this;this._fn=t,this.onChange=function(){t(e.value),e._registry.select(e)}},t.prototype.fireUncheck=function(t){this.writeValue(t)},t.prototype.registerOnTouched=function(t){this.onTouched=t},t.prototype.setDisabledState=function(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)},t.prototype._checkName=function(){this.name&&this.formControlName&&this.name!==this.formControlName&&this._throwNameError(),!this.name&&this.formControlName&&(this.name=this.formControlName)},t.prototype._throwNameError=function(){throw new Error('\n If you define both a name and a formControlName attribute on your radio button, their values\n must match. Ex: <input type="radio" formControlName="food" name="food">\n ')},t}(),fp=function(){function t(t,e){this._renderer=t,this._elementRef=e,this.onChange=function(t){},this.onTouched=function(){}}return t.prototype.writeValue=function(t){this._renderer.setProperty(this._elementRef.nativeElement,"value",parseFloat(t))},t.prototype.registerOnChange=function(t){this.onChange=function(e){t(""==e?null:parseFloat(e))}},t.prototype.registerOnTouched=function(t){this.onTouched=t},t.prototype.setDisabledState=function(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)},t}(),gp='\n <div [formGroup]="myGroup">\n <input formControlName="firstName">\n </div>\n\n In your class:\n\n this.myGroup = new FormGroup({\n firstName: new FormControl()\n });',mp='\n <div [formGroup]="myGroup">\n <div formGroupName="person">\n <input formControlName="firstName">\n </div>\n </div>\n\n In your class:\n\n this.myGroup = new FormGroup({\n person: new FormGroup({ firstName: new FormControl() })\n });',vp='\n <form>\n <div ngModelGroup="person">\n <input [(ngModel)]="person.name" name="firstName">\n </div>\n </form>',yp=function(){function t(){}return t.controlParentException=function(){throw new Error("formControlName must be used with a parent formGroup directive. You'll want to add a formGroup\n directive and pass it an existing FormGroup instance (you can create one in your class).\n\n Example:\n\n "+gp)},t.ngModelGroupException=function(){throw new Error('formControlName cannot be used with an ngModelGroup parent. It is only compatible with parents\n that also have a "form" prefix: formGroupName, formArrayName, or formGroup.\n\n Option 1: Update the parent to be formGroupName (reactive form strategy)\n\n '+mp+"\n\n Option 2: Use ngModel instead of formControlName (template-driven strategy)\n\n "+vp)},t.missingFormException=function(){throw new Error("formGroup expects a FormGroup instance. Please pass one in.\n\n Example:\n\n "+gp)},t.groupParentException=function(){throw new Error("formGroupName must be used with a parent formGroup directive. You'll want to add a formGroup\n directive and pass it an existing FormGroup instance (you can create one in your class).\n\n Example:\n\n "+mp)},t.arrayParentException=function(){throw new Error('formArrayName must be used with a parent formGroup directive. You\'ll want to add a formGroup\n directive and pass it an existing FormGroup instance (you can create one in your class).\n\n Example:\n\n \n <div [formGroup]="myGroup">\n <div formArrayName="cities">\n <div *ngFor="let city of cityArray.controls; index as i">\n <input [formControlName]="i">\n </div>\n </div>\n </div>\n\n In your class:\n\n this.cityArray = new FormArray([new FormControl(\'SF\')]);\n this.myGroup = new FormGroup({\n cities: this.cityArray\n });')},t.disabledAttrWarning=function(){console.warn("\n It looks like you're using the disabled attribute with a reactive form directive. If you set disabled to true\n when you set up this control in your component class, the disabled attribute will actually be set in the DOM for\n you. We recommend using this approach to avoid 'changed after checked' errors.\n \n Example: \n form = new FormGroup({\n first: new FormControl({value: 'Nancy', disabled: true}, Validators.required),\n last: new FormControl('Drew', Validators.required)\n });\n ")},t.ngModelWarning=function(t){console.warn("\n It looks like you're using ngModel on the same form field as "+t+". \n Support for using the ngModel input property and ngModelChange event with \n reactive form directives has been deprecated in Angular v6 and will be removed \n in Angular v7.\n \n For more information on this, see our API docs here:\n https://angular.io/api/forms/"+("formControl"===t?"FormControlDirective":"FormControlName")+"#use-with-ngmodel\n ")},t}();function bp(t,e){return null==t?""+e:(e&&"object"==typeof e&&(e="Object"),(t+": "+e).slice(0,50))}var _p=function(){function t(t,e){this._renderer=t,this._elementRef=e,this._optionMap=new Map,this._idCounter=0,this.onChange=function(t){},this.onTouched=function(){},this._compareWith=At}return Object.defineProperty(t.prototype,"compareWith",{set:function(t){if("function"!=typeof t)throw new Error("compareWith must be a function, but received "+JSON.stringify(t));this._compareWith=t},enumerable:!0,configurable:!0}),t.prototype.writeValue=function(t){this.value=t;var e=this._getOptionId(t);null==e&&this._renderer.setProperty(this._elementRef.nativeElement,"selectedIndex",-1);var n=bp(e,t);this._renderer.setProperty(this._elementRef.nativeElement,"value",n)},t.prototype.registerOnChange=function(t){var e=this;this.onChange=function(n){e.value=e._getOptionValue(n),t(e.value)}},t.prototype.registerOnTouched=function(t){this.onTouched=t},t.prototype.setDisabledState=function(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)},t.prototype._registerOption=function(){return(this._idCounter++).toString()},t.prototype._getOptionId=function(t){var e,n;try{for(var i=u(Array.from(this._optionMap.keys())),r=i.next();!r.done;r=i.next()){var o=r.value;if(this._compareWith(this._optionMap.get(o),t))return o}}catch(t){e={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return null},t.prototype._getOptionValue=function(t){var e=function(t){return t.split(":")[0]}(t);return this._optionMap.has(e)?this._optionMap.get(e):t},t}(),wp=function(){function t(t,e,n){this._element=t,this._renderer=e,this._select=n,this._select&&(this.id=this._select._registerOption())}return Object.defineProperty(t.prototype,"ngValue",{set:function(t){null!=this._select&&(this._select._optionMap.set(this.id,t),this._setElementValue(bp(this.id,t)),this._select.writeValue(this._select.value))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{set:function(t){this._setElementValue(t),this._select&&this._select.writeValue(this._select.value)},enumerable:!0,configurable:!0}),t.prototype._setElementValue=function(t){this._renderer.setProperty(this._element.nativeElement,"value",t)},t.prototype.ngOnDestroy=function(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))},s([a(2,zt()),a(2,Ut())],t)}();function xp(t,e){return null==t?""+e:("string"==typeof e&&(e="'"+e+"'"),e&&"object"==typeof e&&(e="Object"),(t+": "+e).slice(0,50))}var Cp=function(){function t(t,e){this._renderer=t,this._elementRef=e,this._optionMap=new Map,this._idCounter=0,this.onChange=function(t){},this.onTouched=function(){},this._compareWith=At}return Object.defineProperty(t.prototype,"compareWith",{set:function(t){if("function"!=typeof t)throw new Error("compareWith must be a function, but received "+JSON.stringify(t));this._compareWith=t},enumerable:!0,configurable:!0}),t.prototype.writeValue=function(t){var e,n=this;if(this.value=t,Array.isArray(t)){var i=t.map(function(t){return n._getOptionId(t)});e=function(t,e){t._setSelected(i.indexOf(e.toString())>-1)}}else e=function(t,e){t._setSelected(!1)};this._optionMap.forEach(e)},t.prototype.registerOnChange=function(t){var e=this;this.onChange=function(n){var i=[];if(n.hasOwnProperty("selectedOptions"))for(var r=n.selectedOptions,o=0;o<r.length;o++){var s=r.item(o),a=e._getOptionValue(s.value);i.push(a)}else for(r=n.options,o=0;o<r.length;o++)(s=r.item(o)).selected&&(a=e._getOptionValue(s.value),i.push(a));e.value=i,t(i)}},t.prototype.registerOnTouched=function(t){this.onTouched=t},t.prototype.setDisabledState=function(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)},t.prototype._registerOption=function(t){var e=(this._idCounter++).toString();return this._optionMap.set(e,t),e},t.prototype._getOptionId=function(t){var e,n;try{for(var i=u(Array.from(this._optionMap.keys())),r=i.next();!r.done;r=i.next()){var o=r.value;if(this._compareWith(this._optionMap.get(o)._value,t))return o}}catch(t){e={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return null},t.prototype._getOptionValue=function(t){var e=function(t){return t.split(":")[0]}(t);return this._optionMap.has(e)?this._optionMap.get(e)._value:t},t}(),Sp=function(){function t(t,e,n){this._element=t,this._renderer=e,this._select=n,this._select&&(this.id=this._select._registerOption(this))}return Object.defineProperty(t.prototype,"ngValue",{set:function(t){null!=this._select&&(this._value=t,this._setElementValue(xp(this.id,t)),this._select.writeValue(this._select.value))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{set:function(t){this._select?(this._value=t,this._setElementValue(xp(this.id,t)),this._select.writeValue(this._select.value)):this._setElementValue(t)},enumerable:!0,configurable:!0}),t.prototype._setElementValue=function(t){this._renderer.setProperty(this._element.nativeElement,"value",t)},t.prototype._setSelected=function(t){this._renderer.setProperty(this._element.nativeElement,"selected",t)},t.prototype.ngOnDestroy=function(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))},s([a(2,zt()),a(2,Ut())],t)}();function kp(t,e){return h(e.path,[t])}function Ep(t,e){t||Ap(e,"Cannot find control with"),e.valueAccessor||Ap(e,"No value accessor for form control with"),t.validator=$h.compose([t.validator,e.validator]),t.asyncValidator=$h.composeAsync([t.asyncValidator,e.asyncValidator]),e.valueAccessor.writeValue(t.value),function(t,e){e.valueAccessor.registerOnChange(function(n){t._pendingValue=n,t._pendingChange=!0,t._pendingDirty=!0,"change"===t.updateOn&&Tp(t,e)})}(t,e),function(t,e){t.registerOnChange(function(t,n){e.valueAccessor.writeValue(t),n&&e.viewToModelUpdate(t)})}(t,e),function(t,e){e.valueAccessor.registerOnTouched(function(){t._pendingTouched=!0,"blur"===t.updateOn&&t._pendingChange&&Tp(t,e),"submit"!==t.updateOn&&t.markAsTouched()})}(t,e),e.valueAccessor.setDisabledState&&t.registerOnDisabledChange(function(t){e.valueAccessor.setDisabledState(t)}),e._rawValidators.forEach(function(e){e.registerOnValidatorChange&&e.registerOnValidatorChange(function(){return t.updateValueAndValidity()})}),e._rawAsyncValidators.forEach(function(e){e.registerOnValidatorChange&&e.registerOnValidatorChange(function(){return t.updateValueAndValidity()})})}function Tp(t,e){t._pendingDirty&&t.markAsDirty(),t.setValue(t._pendingValue,{emitModelToViewChange:!1}),e.viewToModelUpdate(t._pendingValue),t._pendingChange=!1}function Op(t,e){null==t&&Ap(e,"Cannot find control with"),t.validator=$h.compose([t.validator,e.validator]),t.asyncValidator=$h.composeAsync([t.asyncValidator,e.asyncValidator])}function Ip(t){return Ap(t,"There is no FormControl instance attached to form control element with")}function Ap(t,e){var n;throw n=t.path.length>1?"path: '"+t.path.join(" -> ")+"'":t.path[0]?"name: '"+t.path+"'":"unspecified name attribute",new Error(e+" "+n)}function Pp(t){return null!=t?$h.compose(t.map(ap)):null}function Dp(t){return null!=t?$h.composeAsync(t.map(lp)):null}function jp(t,e){if(!t.hasOwnProperty("model"))return!1;var n=t.model;return!!n.isFirstChange()||!At(e,n.currentValue)}var Mp=[rp,fp,up,_p,Cp,dp];function Rp(t,e){t._syncPendingControls(),e.forEach(function(t){var e=t.control;"submit"===e.updateOn&&e._pendingChange&&(t.viewToModelUpdate(e._pendingValue),e._pendingChange=!1)})}function Fp(t,e){if(!e)return null;Array.isArray(e)||Ap(t,"Value accessor was not provided as an array for form control with");var n=void 0,i=void 0,r=void 0;return e.forEach(function(e){var o;e.constructor===sp?n=e:(o=e,Mp.some(function(t){return o.constructor===t})?(i&&Ap(t,"More than one built-in value accessor matches form control with"),i=e):(r&&Ap(t,"More than one custom value accessor matches form control with"),r=e))}),r||i||n||(Ap(t,"No valid value accessor for form control with"),null)}function Np(t,e){var n=t.indexOf(e);n>-1&&t.splice(n,1)}function Lp(t,e,n,i){Un()&&"never"!==i&&((null!==i&&"once"!==i||e._ngModelWarningSentOnce)&&("always"!==i||n._ngModelWarningSent)||(yp.ngModelWarning(t),e._ngModelWarningSentOnce=!0,n._ngModelWarningSent=!0))}var Bp=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.ngOnInit=function(){this._checkParentType(),this.formDirective.addFormGroup(this)},e.prototype.ngOnDestroy=function(){this.formDirective&&this.formDirective.removeFormGroup(this)},Object.defineProperty(e.prototype,"control",{get:function(){return this.formDirective.getFormGroup(this)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"path",{get:function(){return kp(this.name,this._parent)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"formDirective",{get:function(){return this._parent?this._parent.formDirective:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"validator",{get:function(){return Pp(this._validators)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"asyncValidator",{get:function(){return Dp(this._asyncValidators)},enumerable:!0,configurable:!0}),e.prototype._checkParentType=function(){},e}(Gh),Vp=function(){function t(t){this._cd=t}return Object.defineProperty(t.prototype,"ngClassUntouched",{get:function(){return!!this._cd.control&&this._cd.control.untouched},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ngClassTouched",{get:function(){return!!this._cd.control&&this._cd.control.touched},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ngClassPristine",{get:function(){return!!this._cd.control&&this._cd.control.pristine},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ngClassDirty",{get:function(){return!!this._cd.control&&this._cd.control.dirty},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ngClassValid",{get:function(){return!!this._cd.control&&this._cd.control.valid},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ngClassInvalid",{get:function(){return!!this._cd.control&&this._cd.control.invalid},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ngClassPending",{get:function(){return!!this._cd.control&&this._cd.control.pending},enumerable:!0,configurable:!0}),t}(),zp=function(t){function e(e){return t.call(this,e)||this}return r(e,t),s([a(0,Ht())],e)}(Vp),Hp=function(t){function e(e){return t.call(this,e)||this}return r(e,t),s([a(0,Ht())],e)}(Vp);function Wp(t){var e=Xp(t)?t.validators:t;return Array.isArray(e)?Pp(e):e||null}function Up(t,e){var n=Xp(e)?e.asyncValidators:t;return Array.isArray(n)?Dp(n):n||null}function Xp(t){return null!=t&&!Array.isArray(t)&&"object"==typeof t}var Yp=function(){function t(t,e){this.validator=t,this.asyncValidator=e,this._onCollectionChange=function(){},this.pristine=!0,this.touched=!1,this._onDisabledChange=[]}return Object.defineProperty(t.prototype,"parent",{get:function(){return this._parent},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"valid",{get:function(){return"VALID"===this.status},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"invalid",{get:function(){return"INVALID"===this.status},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"pending",{get:function(){return"PENDING"==this.status},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"disabled",{get:function(){return"DISABLED"===this.status},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"enabled",{get:function(){return"DISABLED"!==this.status},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dirty",{get:function(){return!this.pristine},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"untouched",{get:function(){return!this.touched},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"updateOn",{get:function(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"},enumerable:!0,configurable:!0}),t.prototype.setValidators=function(t){this.validator=Wp(t)},t.prototype.setAsyncValidators=function(t){this.asyncValidator=Up(t)},t.prototype.clearValidators=function(){this.validator=null},t.prototype.clearAsyncValidators=function(){this.asyncValidator=null},t.prototype.markAsTouched=function(t){void 0===t&&(t={}),this.touched=!0,this._parent&&!t.onlySelf&&this._parent.markAsTouched(t)},t.prototype.markAsUntouched=function(t){void 0===t&&(t={}),this.touched=!1,this._pendingTouched=!1,this._forEachChild(function(t){t.markAsUntouched({onlySelf:!0})}),this._parent&&!t.onlySelf&&this._parent._updateTouched(t)},t.prototype.markAsDirty=function(t){void 0===t&&(t={}),this.pristine=!1,this._parent&&!t.onlySelf&&this._parent.markAsDirty(t)},t.prototype.markAsPristine=function(t){void 0===t&&(t={}),this.pristine=!0,this._pendingDirty=!1,this._forEachChild(function(t){t.markAsPristine({onlySelf:!0})}),this._parent&&!t.onlySelf&&this._parent._updatePristine(t)},t.prototype.markAsPending=function(t){void 0===t&&(t={}),this.status="PENDING",!1!==t.emitEvent&&this.statusChanges.emit(this.status),this._parent&&!t.onlySelf&&this._parent.markAsPending(t)},t.prototype.disable=function(t){void 0===t&&(t={}),this.status="DISABLED",this.errors=null,this._forEachChild(function(e){e.disable(o({},t,{onlySelf:!0}))}),this._updateValue(),!1!==t.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(t),this._onDisabledChange.forEach(function(t){return t(!0)})},t.prototype.enable=function(t){void 0===t&&(t={}),this.status="VALID",this._forEachChild(function(e){e.enable(o({},t,{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent}),this._updateAncestors(t),this._onDisabledChange.forEach(function(t){return t(!1)})},t.prototype._updateAncestors=function(t){this._parent&&!t.onlySelf&&(this._parent.updateValueAndValidity(t),this._parent._updatePristine(),this._parent._updateTouched())},t.prototype.setParent=function(t){this._parent=t},t.prototype.updateValueAndValidity=function(t){void 0===t&&(t={}),this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),"VALID"!==this.status&&"PENDING"!==this.status||this._runAsyncValidator(t.emitEvent)),!1!==t.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.updateValueAndValidity(t)},t.prototype._updateTreeValidity=function(t){void 0===t&&(t={emitEvent:!0}),this._forEachChild(function(e){return e._updateTreeValidity(t)}),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent})},t.prototype._setInitialStatus=function(){this.status=this._allControlsDisabled()?"DISABLED":"VALID"},t.prototype._runValidator=function(){return this.validator?this.validator(this):null},t.prototype._runAsyncValidator=function(t){var e=this;if(this.asyncValidator){this.status="PENDING";var n=ep(this.asyncValidator(this));this._asyncValidationSubscription=n.subscribe(function(n){return e.setErrors(n,{emitEvent:t})})}},t.prototype._cancelExistingSubscription=function(){this._asyncValidationSubscription&&this._asyncValidationSubscription.unsubscribe()},t.prototype.setErrors=function(t,e){void 0===e&&(e={}),this.errors=t,this._updateControlsErrors(!1!==e.emitEvent)},t.prototype.get=function(t){return function(t,e,n){return null==e?null:(e instanceof Array||(e=e.split(".")),e instanceof Array&&0===e.length?null:e.reduce(function(t,e){return t instanceof Gp?t.controls.hasOwnProperty(e)?t.controls[e]:null:t instanceof Kp&&t.at(e)||null},t))}(this,t)},t.prototype.getError=function(t,e){var n=e?this.get(e):this;return n&&n.errors?n.errors[t]:null},t.prototype.hasError=function(t,e){return!!this.getError(t,e)},Object.defineProperty(t.prototype,"root",{get:function(){for(var t=this;t._parent;)t=t._parent;return t},enumerable:!0,configurable:!0}),t.prototype._updateControlsErrors=function(t){this.status=this._calculateStatus(),t&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(t)},t.prototype._initObservables=function(){this.valueChanges=new In,this.statusChanges=new In},t.prototype._calculateStatus=function(){return this._allControlsDisabled()?"DISABLED":this.errors?"INVALID":this._anyControlsHaveStatus("PENDING")?"PENDING":this._anyControlsHaveStatus("INVALID")?"INVALID":"VALID"},t.prototype._anyControlsHaveStatus=function(t){return this._anyControls(function(e){return e.status===t})},t.prototype._anyControlsDirty=function(){return this._anyControls(function(t){return t.dirty})},t.prototype._anyControlsTouched=function(){return this._anyControls(function(t){return t.touched})},t.prototype._updatePristine=function(t){void 0===t&&(t={}),this.pristine=!this._anyControlsDirty(),this._parent&&!t.onlySelf&&this._parent._updatePristine(t)},t.prototype._updateTouched=function(t){void 0===t&&(t={}),this.touched=this._anyControlsTouched(),this._parent&&!t.onlySelf&&this._parent._updateTouched(t)},t.prototype._isBoxedValue=function(t){return"object"==typeof t&&null!==t&&2===Object.keys(t).length&&"value"in t&&"disabled"in t},t.prototype._registerOnCollectionChange=function(t){this._onCollectionChange=t},t.prototype._setUpdateStrategy=function(t){Xp(t)&&null!=t.updateOn&&(this._updateOn=t.updateOn)},t}(),qp=function(t){function e(e,n,i){void 0===e&&(e=null);var r=t.call(this,Wp(n),Up(i,n))||this;return r._onChange=[],r._applyFormState(e),r._setUpdateStrategy(n),r.updateValueAndValidity({onlySelf:!0,emitEvent:!1}),r._initObservables(),r}return r(e,t),e.prototype.setValue=function(t,e){var n=this;void 0===e&&(e={}),this.value=this._pendingValue=t,this._onChange.length&&!1!==e.emitModelToViewChange&&this._onChange.forEach(function(t){return t(n.value,!1!==e.emitViewToModelChange)}),this.updateValueAndValidity(e)},e.prototype.patchValue=function(t,e){void 0===e&&(e={}),this.setValue(t,e)},e.prototype.reset=function(t,e){void 0===t&&(t=null),void 0===e&&(e={}),this._applyFormState(t),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),this._pendingChange=!1},e.prototype._updateValue=function(){},e.prototype._anyControls=function(t){return!1},e.prototype._allControlsDisabled=function(){return this.disabled},e.prototype.registerOnChange=function(t){this._onChange.push(t)},e.prototype._clearChangeFns=function(){this._onChange=[],this._onDisabledChange=[],this._onCollectionChange=function(){}},e.prototype.registerOnDisabledChange=function(t){this._onDisabledChange.push(t)},e.prototype._forEachChild=function(t){},e.prototype._syncPendingControls=function(){return!("submit"!==this.updateOn||(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),!this._pendingChange)||(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),0))},e.prototype._applyFormState=function(t){this._isBoxedValue(t)?(this.value=this._pendingValue=t.value,t.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=t},e}(Yp),Gp=function(t){function e(e,n,i){var r=t.call(this,Wp(n),Up(i,n))||this;return r.controls=e,r._initObservables(),r._setUpdateStrategy(n),r._setUpControls(),r.updateValueAndValidity({onlySelf:!0,emitEvent:!1}),r}return r(e,t),e.prototype.registerControl=function(t,e){return this.controls[t]?this.controls[t]:(this.controls[t]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)},e.prototype.addControl=function(t,e){this.registerControl(t,e),this.updateValueAndValidity(),this._onCollectionChange()},e.prototype.removeControl=function(t){this.controls[t]&&this.controls[t]._registerOnCollectionChange(function(){}),delete this.controls[t],this.updateValueAndValidity(),this._onCollectionChange()},e.prototype.setControl=function(t,e){this.controls[t]&&this.controls[t]._registerOnCollectionChange(function(){}),delete this.controls[t],e&&this.registerControl(t,e),this.updateValueAndValidity(),this._onCollectionChange()},e.prototype.contains=function(t){return this.controls.hasOwnProperty(t)&&this.controls[t].enabled},e.prototype.setValue=function(t,e){var n=this;void 0===e&&(e={}),this._checkAllValuesPresent(t),Object.keys(t).forEach(function(i){n._throwIfControlMissing(i),n.controls[i].setValue(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)},e.prototype.patchValue=function(t,e){var n=this;void 0===e&&(e={}),Object.keys(t).forEach(function(i){n.controls[i]&&n.controls[i].patchValue(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)},e.prototype.reset=function(t,e){void 0===t&&(t={}),void 0===e&&(e={}),this._forEachChild(function(n,i){n.reset(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e),this._updatePristine(e),this._updateTouched(e)},e.prototype.getRawValue=function(){return this._reduceChildren({},function(t,e,n){return t[n]=e instanceof qp?e.value:e.getRawValue(),t})},e.prototype._syncPendingControls=function(){var t=this._reduceChildren(!1,function(t,e){return!!e._syncPendingControls()||t});return t&&this.updateValueAndValidity({onlySelf:!0}),t},e.prototype._throwIfControlMissing=function(t){if(!Object.keys(this.controls).length)throw new Error("\n There are no form controls registered with this group yet. If you're using ngModel,\n you may want to check next tick (e.g. use setTimeout).\n ");if(!this.controls[t])throw new Error("Cannot find form control with name: "+t+".")},e.prototype._forEachChild=function(t){var e=this;Object.keys(this.controls).forEach(function(n){return t(e.controls[n],n)})},e.prototype._setUpControls=function(){var t=this;this._forEachChild(function(e){e.setParent(t),e._registerOnCollectionChange(t._onCollectionChange)})},e.prototype._updateValue=function(){this.value=this._reduceValue()},e.prototype._anyControls=function(t){var e=this,n=!1;return this._forEachChild(function(i,r){n=n||e.contains(r)&&t(i)}),n},e.prototype._reduceValue=function(){var t=this;return this._reduceChildren({},function(e,n,i){return(n.enabled||t.disabled)&&(e[i]=n.value),e})},e.prototype._reduceChildren=function(t,e){var n=t;return this._forEachChild(function(t,i){n=e(n,t,i)}),n},e.prototype._allControlsDisabled=function(){var t,e;try{for(var n=u(Object.keys(this.controls)),i=n.next();!i.done;i=n.next())if(this.controls[i.value].enabled)return!1}catch(e){t={error:e}}finally{try{i&&!i.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}return Object.keys(this.controls).length>0||this.disabled},e.prototype._checkAllValuesPresent=function(t){this._forEachChild(function(e,n){if(void 0===t[n])throw new Error("Must supply a value for form control with name: '"+n+"'.")})},e}(Yp),Kp=function(t){function e(e,n,i){var r=t.call(this,Wp(n),Up(i,n))||this;return r.controls=e,r._initObservables(),r._setUpdateStrategy(n),r._setUpControls(),r.updateValueAndValidity({onlySelf:!0,emitEvent:!1}),r}return r(e,t),e.prototype.at=function(t){return this.controls[t]},e.prototype.push=function(t){this.controls.push(t),this._registerControl(t),this.updateValueAndValidity(),this._onCollectionChange()},e.prototype.insert=function(t,e){this.controls.splice(t,0,e),this._registerControl(e),this.updateValueAndValidity()},e.prototype.removeAt=function(t){this.controls[t]&&this.controls[t]._registerOnCollectionChange(function(){}),this.controls.splice(t,1),this.updateValueAndValidity()},e.prototype.setControl=function(t,e){this.controls[t]&&this.controls[t]._registerOnCollectionChange(function(){}),this.controls.splice(t,1),e&&(this.controls.splice(t,0,e),this._registerControl(e)),this.updateValueAndValidity(),this._onCollectionChange()},Object.defineProperty(e.prototype,"length",{get:function(){return this.controls.length},enumerable:!0,configurable:!0}),e.prototype.setValue=function(t,e){var n=this;void 0===e&&(e={}),this._checkAllValuesPresent(t),t.forEach(function(t,i){n._throwIfControlMissing(i),n.at(i).setValue(t,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)},e.prototype.patchValue=function(t,e){var n=this;void 0===e&&(e={}),t.forEach(function(t,i){n.at(i)&&n.at(i).patchValue(t,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)},e.prototype.reset=function(t,e){void 0===t&&(t=[]),void 0===e&&(e={}),this._forEachChild(function(n,i){n.reset(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e),this._updatePristine(e),this._updateTouched(e)},e.prototype.getRawValue=function(){return this.controls.map(function(t){return t instanceof qp?t.value:t.getRawValue()})},e.prototype._syncPendingControls=function(){var t=this.controls.reduce(function(t,e){return!!e._syncPendingControls()||t},!1);return t&&this.updateValueAndValidity({onlySelf:!0}),t},e.prototype._throwIfControlMissing=function(t){if(!this.controls.length)throw new Error("\n There are no form controls registered with this array yet. If you're using ngModel,\n you may want to check next tick (e.g. use setTimeout).\n ");if(!this.at(t))throw new Error("Cannot find form control at index "+t)},e.prototype._forEachChild=function(t){this.controls.forEach(function(e,n){t(e,n)})},e.prototype._updateValue=function(){var t=this;this.value=this.controls.filter(function(e){return e.enabled||t.disabled}).map(function(t){return t.value})},e.prototype._anyControls=function(t){return this.controls.some(function(e){return e.enabled&&t(e)})},e.prototype._setUpControls=function(){var t=this;this._forEachChild(function(e){return t._registerControl(e)})},e.prototype._checkAllValuesPresent=function(t){this._forEachChild(function(e,n){if(void 0===t[n])throw new Error("Must supply a value for form control at index: "+n+".")})},e.prototype._allControlsDisabled=function(){var t,e;try{for(var n=u(this.controls),i=n.next();!i.done;i=n.next())if(i.value.enabled)return!1}catch(e){t={error:e}}finally{try{i&&!i.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}return this.controls.length>0||this.disabled},e.prototype._registerControl=function(t){t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)},e}(Yp),Zp=Promise.resolve(null),Qp=function(t){function e(e,n){var i=t.call(this)||this;return i.submitted=!1,i._directives=[],i.ngSubmit=new In,i.form=new Gp({},Pp(e),Dp(n)),i}return r(e,t),e.prototype.ngAfterViewInit=function(){this._setUpdateStrategy()},Object.defineProperty(e.prototype,"formDirective",{get:function(){return this},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"control",{get:function(){return this.form},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"path",{get:function(){return[]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"controls",{get:function(){return this.form.controls},enumerable:!0,configurable:!0}),e.prototype.addControl=function(t){var e=this;Zp.then(function(){var n=e._findContainer(t.path);t.control=n.registerControl(t.name,t.control),Ep(t.control,t),t.control.updateValueAndValidity({emitEvent:!1}),e._directives.push(t)})},e.prototype.getControl=function(t){return this.form.get(t.path)},e.prototype.removeControl=function(t){var e=this;Zp.then(function(){var n=e._findContainer(t.path);n&&n.removeControl(t.name),Np(e._directives,t)})},e.prototype.addFormGroup=function(t){var e=this;Zp.then(function(){var n=e._findContainer(t.path),i=new Gp({});Op(i,t),n.registerControl(t.name,i),i.updateValueAndValidity({emitEvent:!1})})},e.prototype.removeFormGroup=function(t){var e=this;Zp.then(function(){var n=e._findContainer(t.path);n&&n.removeControl(t.name)})},e.prototype.getFormGroup=function(t){return this.form.get(t.path)},e.prototype.updateModel=function(t,e){var n=this;Zp.then(function(){n.form.get(t.path).setValue(e)})},e.prototype.setValue=function(t){this.control.setValue(t)},e.prototype.onSubmit=function(t){return this.submitted=!0,Rp(this.form,this._directives),this.ngSubmit.emit(t),!1},e.prototype.onReset=function(){this.resetForm()},e.prototype.resetForm=function(t){void 0===t&&(t=void 0),this.form.reset(t),this.submitted=!1},e.prototype._setUpdateStrategy=function(){this.options&&null!=this.options.updateOn&&(this.form._updateOn=this.options.updateOn)},e.prototype._findContainer=function(t){return t.pop(),t.length?this.form.get(t):this.form},s([a(0,zt()),a(0,Ht()),a(0,Vt(Zh)),a(1,zt()),a(1,Ht()),a(1,Vt(Qh))],e)}(Gh),Jp=function(){function t(){}return t.modelParentException=function(){throw new Error('\n ngModel cannot be used to register form controls with a parent formGroup directive. Try using\n formGroup\'s partner directive "formControlName" instead. Example:\n\n '+gp+'\n\n Or, if you\'d like to avoid registering this form control, indicate that it\'s standalone in ngModelOptions:\n\n Example:\n\n \n <div [formGroup]="myGroup">\n <input formControlName="firstName">\n <input [(ngModel)]="showMoreControls" [ngModelOptions]="{standalone: true}">\n </div>\n ')},t.formGroupNameException=function(){throw new Error("\n ngModel cannot be used to register form controls with a parent formGroupName or formArrayName directive.\n\n Option 1: Use formControlName instead of ngModel (reactive strategy):\n\n "+mp+"\n\n Option 2: Update ngModel's parent be ngModelGroup (template-driven strategy):\n\n "+vp)},t.missingNameException=function(){throw new Error('If ngModel is used within a form tag, either the name attribute must be set or the form\n control must be defined as \'standalone\' in ngModelOptions.\n\n Example 1: <input [(ngModel)]="person.firstName" name="first">\n Example 2: <input [(ngModel)]="person.firstName" [ngModelOptions]="{standalone: true}">')},t.modelGroupParentException=function(){throw new Error("\n ngModelGroup cannot be used with a parent formGroup directive.\n\n Option 1: Use formGroupName instead of ngModelGroup (reactive strategy):\n\n "+mp+"\n\n Option 2: Use a regular form tag instead of the formGroup directive (template-driven strategy):\n\n "+vp)},t}(),$p=function(t){function e(e,n,i){var r=t.call(this)||this;return r._parent=e,r._validators=n,r._asyncValidators=i,r}var n;return r(e,t),n=e,e.prototype._checkParentType=function(){this._parent instanceof n||this._parent instanceof Qp||Jp.modelGroupParentException()},n=s([a(0,Ut()),a(0,Wt()),a(1,zt()),a(1,Ht()),a(1,Vt(Zh)),a(2,zt()),a(2,Ht()),a(2,Vt(Qh))],e)}(Bp),td=Promise.resolve(null),ed=function(t){function e(e,n,i,r){var o=t.call(this)||this;return o.control=new qp,o._registered=!1,o.update=new In,o._parent=e,o._rawValidators=n||[],o._rawAsyncValidators=i||[],o.valueAccessor=Fp(o,r),o}return r(e,t),e.prototype.ngOnChanges=function(t){this._checkForErrors(),this._registered||this._setUpControl(),"isDisabled"in t&&this._updateDisabled(t),jp(t,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)},e.prototype.ngOnDestroy=function(){this.formDirective&&this.formDirective.removeControl(this)},Object.defineProperty(e.prototype,"path",{get:function(){return this._parent?kp(this.name,this._parent):[this.name]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"formDirective",{get:function(){return this._parent?this._parent.formDirective:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"validator",{get:function(){return Pp(this._rawValidators)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"asyncValidator",{get:function(){return Dp(this._rawAsyncValidators)},enumerable:!0,configurable:!0}),e.prototype.viewToModelUpdate=function(t){this.viewModel=t,this.update.emit(t)},e.prototype._setUpControl=function(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0},e.prototype._setUpdateStrategy=function(){this.options&&null!=this.options.updateOn&&(this.control._updateOn=this.options.updateOn)},e.prototype._isStandalone=function(){return!this._parent||!(!this.options||!this.options.standalone)},e.prototype._setUpStandalone=function(){Ep(this.control,this),this.control.updateValueAndValidity({emitEvent:!1})},e.prototype._checkForErrors=function(){this._isStandalone()||this._checkParentType(),this._checkName()},e.prototype._checkParentType=function(){!(this._parent instanceof $p)&&this._parent instanceof Bp?Jp.formGroupNameException():this._parent instanceof $p||this._parent instanceof Qp||Jp.modelParentException()},e.prototype._checkName=function(){this.options&&this.options.name&&(this.name=this.options.name),this._isStandalone()||this.name||Jp.missingNameException()},e.prototype._updateValue=function(t){var e=this;td.then(function(){e.control.setValue(t,{emitViewToModelChange:!1})})},e.prototype._updateDisabled=function(t){var e=this,n=t.isDisabled.currentValue,i=""===n||n&&"false"!==n;td.then(function(){i&&!e.control.disabled?e.control.disable():!i&&e.control.disabled&&e.control.enable()})},s([a(0,zt()),a(0,Ut()),a(1,zt()),a(1,Ht()),a(1,Vt(Zh)),a(2,zt()),a(2,Ht()),a(2,Vt(Qh)),a(3,zt()),a(3,Ht()),a(3,Vt(ip))],e)}(hp),nd=new yt("NgModelWithFormControlWarning"),id=function(t){function e(e,n,i,r){var o=t.call(this)||this;return o._ngModelWarningConfig=r,o.update=new In,o._ngModelWarningSent=!1,o._rawValidators=e||[],o._rawAsyncValidators=n||[],o.valueAccessor=Fp(o,i),o}var n;return r(e,t),n=e,Object.defineProperty(e.prototype,"isDisabled",{set:function(t){yp.disabledAttrWarning()},enumerable:!0,configurable:!0}),e.prototype.ngOnChanges=function(t){this._isControlChanged(t)&&(Ep(this.form,this),this.control.disabled&&this.valueAccessor.setDisabledState&&this.valueAccessor.setDisabledState(!0),this.form.updateValueAndValidity({emitEvent:!1})),jp(t,this.viewModel)&&(Lp("formControl",n,this,this._ngModelWarningConfig),this.form.setValue(this.model),this.viewModel=this.model)},Object.defineProperty(e.prototype,"path",{get:function(){return[]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"validator",{get:function(){return Pp(this._rawValidators)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"asyncValidator",{get:function(){return Dp(this._rawAsyncValidators)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"control",{get:function(){return this.form},enumerable:!0,configurable:!0}),e.prototype.viewToModelUpdate=function(t){this.viewModel=t,this.update.emit(t)},e.prototype._isControlChanged=function(t){return t.hasOwnProperty("form")},e._ngModelWarningSentOnce=!1,n=s([a(0,zt()),a(0,Ht()),a(0,Vt(Zh)),a(1,zt()),a(1,Ht()),a(1,Vt(Qh)),a(2,zt()),a(2,Ht()),a(2,Vt(ip)),a(3,zt()),a(3,Vt(nd))],e)}(hp),rd=function(t){function e(e,n){var i=t.call(this)||this;return i._validators=e,i._asyncValidators=n,i.submitted=!1,i.directives=[],i.form=null,i.ngSubmit=new In,i}return r(e,t),e.prototype.ngOnChanges=function(t){this._checkFormPresent(),t.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations())},Object.defineProperty(e.prototype,"formDirective",{get:function(){return this},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"control",{get:function(){return this.form},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"path",{get:function(){return[]},enumerable:!0,configurable:!0}),e.prototype.addControl=function(t){var e=this.form.get(t.path);return Ep(e,t),e.updateValueAndValidity({emitEvent:!1}),this.directives.push(t),e},e.prototype.getControl=function(t){return this.form.get(t.path)},e.prototype.removeControl=function(t){Np(this.directives,t)},e.prototype.addFormGroup=function(t){var e=this.form.get(t.path);Op(e,t),e.updateValueAndValidity({emitEvent:!1})},e.prototype.removeFormGroup=function(t){},e.prototype.getFormGroup=function(t){return this.form.get(t.path)},e.prototype.addFormArray=function(t){var e=this.form.get(t.path);Op(e,t),e.updateValueAndValidity({emitEvent:!1})},e.prototype.removeFormArray=function(t){},e.prototype.getFormArray=function(t){return this.form.get(t.path)},e.prototype.updateModel=function(t,e){this.form.get(t.path).setValue(e)},e.prototype.onSubmit=function(t){return this.submitted=!0,Rp(this.form,this.directives),this.ngSubmit.emit(t),!1},e.prototype.onReset=function(){this.resetForm()},e.prototype.resetForm=function(t){void 0===t&&(t=void 0),this.form.reset(t),this.submitted=!1},e.prototype._updateDomValue=function(){var t=this;this.directives.forEach(function(e){var n=t.form.get(e.path);e.control!==n&&(function(t,e){e.valueAccessor.registerOnChange(function(){return Ip(e)}),e.valueAccessor.registerOnTouched(function(){return Ip(e)}),e._rawValidators.forEach(function(t){t.registerOnValidatorChange&&t.registerOnValidatorChange(null)}),e._rawAsyncValidators.forEach(function(t){t.registerOnValidatorChange&&t.registerOnValidatorChange(null)}),t&&t._clearChangeFns()}(e.control,e),n&&Ep(n,e),e.control=n)}),this.form._updateTreeValidity({emitEvent:!1})},e.prototype._updateRegistrations=function(){var t=this;this.form._registerOnCollectionChange(function(){return t._updateDomValue()}),this._oldForm&&this._oldForm._registerOnCollectionChange(function(){}),this._oldForm=this.form},e.prototype._updateValidators=function(){var t=Pp(this._validators);this.form.validator=$h.compose([this.form.validator,t]);var e=Dp(this._asyncValidators);this.form.asyncValidator=$h.composeAsync([this.form.asyncValidator,e])},e.prototype._checkFormPresent=function(){this.form||yp.missingFormException()},s([a(0,zt()),a(0,Ht()),a(0,Vt(Zh)),a(1,zt()),a(1,Ht()),a(1,Vt(Qh))],e)}(Gh),od=function(t){function e(e,n,i){var r=t.call(this)||this;return r._parent=e,r._validators=n,r._asyncValidators=i,r}return r(e,t),e.prototype._checkParentType=function(){ad(this._parent)&&yp.groupParentException()},s([a(0,zt()),a(0,Ut()),a(0,Wt()),a(1,zt()),a(1,Ht()),a(1,Vt(Zh)),a(2,zt()),a(2,Ht()),a(2,Vt(Qh))],e)}(Bp),sd=function(t){function e(e,n,i){var r=t.call(this)||this;return r._parent=e,r._validators=n,r._asyncValidators=i,r}return r(e,t),e.prototype.ngOnInit=function(){this._checkParentType(),this.formDirective.addFormArray(this)},e.prototype.ngOnDestroy=function(){this.formDirective&&this.formDirective.removeFormArray(this)},Object.defineProperty(e.prototype,"control",{get:function(){return this.formDirective.getFormArray(this)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"formDirective",{get:function(){return this._parent?this._parent.formDirective:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"path",{get:function(){return kp(this.name,this._parent)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"validator",{get:function(){return Pp(this._validators)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"asyncValidator",{get:function(){return Dp(this._asyncValidators)},enumerable:!0,configurable:!0}),e.prototype._checkParentType=function(){ad(this._parent)&&yp.arrayParentException()},s([a(0,zt()),a(0,Ut()),a(0,Wt()),a(1,zt()),a(1,Ht()),a(1,Vt(Zh)),a(2,zt()),a(2,Ht()),a(2,Vt(Qh))],e)}(Gh);function ad(t){return!(t instanceof od||t instanceof rd||t instanceof sd)}var ld=function(t){function e(e,n,i,r,o){var s=t.call(this)||this;return s._ngModelWarningConfig=o,s._added=!1,s.update=new In,s._ngModelWarningSent=!1,s._parent=e,s._rawValidators=n||[],s._rawAsyncValidators=i||[],s.valueAccessor=Fp(s,r),s}var n;return r(e,t),n=e,Object.defineProperty(e.prototype,"isDisabled",{set:function(t){yp.disabledAttrWarning()},enumerable:!0,configurable:!0}),e.prototype.ngOnChanges=function(t){this._added||this._setUpControl(),jp(t,this.viewModel)&&(Lp("formControlName",n,this,this._ngModelWarningConfig),this.viewModel=this.model,this.formDirective.updateModel(this,this.model))},e.prototype.ngOnDestroy=function(){this.formDirective&&this.formDirective.removeControl(this)},e.prototype.viewToModelUpdate=function(t){this.viewModel=t,this.update.emit(t)},Object.defineProperty(e.prototype,"path",{get:function(){return kp(this.name,this._parent)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"formDirective",{get:function(){return this._parent?this._parent.formDirective:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"validator",{get:function(){return Pp(this._rawValidators)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"asyncValidator",{get:function(){return Dp(this._rawAsyncValidators)},enumerable:!0,configurable:!0}),e.prototype._checkParentType=function(){!(this._parent instanceof od)&&this._parent instanceof Bp?yp.ngModelGroupException():this._parent instanceof od||this._parent instanceof rd||this._parent instanceof sd||yp.controlParentException()},e.prototype._setUpControl=function(){this._checkParentType(),this.control=this.formDirective.addControl(this),this.control.disabled&&this.valueAccessor.setDisabledState&&this.valueAccessor.setDisabledState(!0),this._added=!0},e._ngModelWarningSentOnce=!1,n=s([a(0,zt()),a(0,Ut()),a(0,Wt()),a(1,zt()),a(1,Ht()),a(1,Vt(Zh)),a(2,zt()),a(2,Ht()),a(2,Vt(Qh)),a(3,zt()),a(3,Ht()),a(3,Vt(ip)),a(4,zt()),a(4,Vt(nd))],e)}(hp),ud=function(){function t(){}return Object.defineProperty(t.prototype,"required",{get:function(){return this._required},set:function(t){this._required=null!=t&&!1!==t&&""+t!="false",this._onChange&&this._onChange()},enumerable:!0,configurable:!0}),t.prototype.validate=function(t){return this.required?$h.required(t):null},t.prototype.registerOnValidatorChange=function(t){this._onChange=t},t}(),cd=function(){function t(){}return t.prototype.group=function(t,e){void 0===e&&(e=null);var n=this._reduceControls(t);return new Gp(n,null!=e?e.validator:null,null!=e?e.asyncValidator:null)},t.prototype.control=function(t,e,n){return new qp(t,e,n)},t.prototype.array=function(t,e,n){var i=this,r=t.map(function(t){return i._createControl(t)});return new Kp(r,e,n)},t.prototype._reduceControls=function(t){var e=this,n={};return Object.keys(t).forEach(function(i){n[i]=e._createControl(t[i])}),n},t.prototype._createControl=function(t){return t instanceof qp||t instanceof Gp||t instanceof Kp?t:Array.isArray(t)?this.control(t[0],t.length>1?t[1]:null,t.length>2?t[2]:null):this.control(t)},t}(),hd=function(){},pd=function(){},dd=function(){},fd=function(){function t(){}var e;return e=t,t.withConfig=function(t){return{ngModule:e,providers:[{provide:nd,useValue:t.warnOnNgModelWithFormControl}]}},t}(),gd=function(){function t(t,e,n,i,r){this.importTool=t,this.config=e,this.panelRef=n,this.canvas=i,this.history=r,this.newCanvasForm=new Gp({width:new qp(800),height:new qp(600)}),this.newCanvasFormVisible=!1,this.sampleImages=this.config.get("pixie.ui.openImageDialog.sampleImages")}return t.prototype.openUploadDialog=function(){var t=this;this.importTool.openUploadDialog({backgroundImage:!0}).then(function(){return t.close()})},t.prototype.openSampleImage=function(t){var e=this;this.importTool.openBackgroundImage(t).then(function(){return e.close()})},t.prototype.createNewCanvas=function(){var t=this,e=this.newCanvasForm.get("width").value,n=this.newCanvasForm.get("height").value;this.config.set("pixie.blankCanvasSize",{width:e,height:n}),this.canvas.openNew(e,n).then(function(){return t.close()})},t.prototype.close=function(){this.panelRef.close(),this.history.addInitial()},t}(),md=function(t){function e(e,n){var i=t.call(this,e,n)||this;return i.scheduler=e,i.work=n,i.pending=!1,i}return r(e,t),e.prototype.schedule=function(t,e){if(void 0===e&&(e=0),this.closed)return this;this.state=t;var n=this.id,i=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(i,n,e)),this.pending=!0,this.delay=e,this.id=this.id||this.requestAsyncId(i,this.id,e),this},e.prototype.requestAsyncId=function(t,e,n){return void 0===n&&(n=0),setInterval(t.flush.bind(t,this),n)},e.prototype.recycleAsyncId=function(t,e,n){if(void 0===n&&(n=0),null!==n&&this.delay===n&&!1===this.pending)return e;clearInterval(e)},e.prototype.execute=function(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(t,e);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(t,e){var n=!1,i=void 0;try{this.work(t)}catch(t){n=!0,i=!!t&&t||new Error(t)}if(n)return this.unsubscribe(),i},e.prototype._unsubscribe=function(){var t=this.id,e=this.scheduler,n=e.actions,i=n.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==i&&n.splice(i,1),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null},e}(function(t){function e(e,n){return t.call(this)||this}return r(e,t),e.prototype.schedule=function(t,e){return void 0===e&&(e=0),this},e}(k)),vd=function(t){function e(e,n){var i=t.call(this,e,n)||this;return i.scheduler=e,i.work=n,i}return r(e,t),e.prototype.schedule=function(e,n){return void 0===n&&(n=0),n>0?t.prototype.schedule.call(this,e,n):(this.delay=n,this.state=e,this.scheduler.flush(this),this)},e.prototype.execute=function(e,n){return n>0||this.closed?t.prototype.execute.call(this,e,n):this._execute(e,n)},e.prototype.requestAsyncId=function(e,n,i){return void 0===i&&(i=0),null!==i&&i>0||null===i&&this.delay>0?t.prototype.requestAsyncId.call(this,e,n,i):e.flush(this)},e}(md),yd=function(){function t(e,n){void 0===n&&(n=t.now),this.SchedulerAction=e,this.now=n}return t.prototype.schedule=function(t,e,n){return void 0===e&&(e=0),new this.SchedulerAction(this,t).schedule(n,e)},t.now=function(){return Date.now()},t}(),bd=function(t){function e(n,i){void 0===i&&(i=yd.now);var r=t.call(this,n,function(){return e.delegate&&e.delegate!==r?e.delegate.now():i()})||this;return r.actions=[],r.active=!1,r.scheduled=void 0,r}return r(e,t),e.prototype.schedule=function(n,i,r){return void 0===i&&(i=0),e.delegate&&e.delegate!==this?e.delegate.schedule(n,i,r):t.prototype.schedule.call(this,n,i,r)},e.prototype.flush=function(t){var e=this.actions;if(this.active)e.push(t);else{var n;this.active=!0;do{if(n=t.execute(t.state,t.delay))break}while(t=e.shift());if(this.active=!1,n){for(;t=e.shift();)t.unsubscribe();throw n}}},e}(yd),_d=new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e}(bd))(vd);function wd(t,e){return new D(e?function(n){return e.schedule(xd,0,{error:t,subscriber:n})}:function(e){return e.error(t)})}function xd(t){t.subscriber.error(t.error)}var Cd=function(){function t(t,e,n){this.kind=t,this.value=e,this.error=n,this.hasValue="N"===t}return t.prototype.observe=function(t){switch(this.kind){case"N":return t.next&&t.next(this.value);case"E":return t.error&&t.error(this.error);case"C":return t.complete&&t.complete()}},t.prototype.do=function(t,e,n){switch(this.kind){case"N":return t&&t(this.value);case"E":return e&&e(this.error);case"C":return n&&n()}},t.prototype.accept=function(t,e,n){return t&&"function"==typeof t.next?this.observe(t):this.do(t,e,n)},t.prototype.toObservable=function(){switch(this.kind){case"N":return Eu(this.value);case"E":return wd(this.error);case"C":return Su()}throw new Error("unexpected notification kind value")},t.createNext=function(e){return void 0!==e?new t("N",e):t.undefinedValueNotification},t.createError=function(e){return new t("E",void 0,e)},t.createComplete=function(){return t.completeNotification},t.completeNotification=new t("C"),t.undefinedValueNotification=new t("N",void 0),t}(),Sd=function(t){function e(e,n,i){void 0===i&&(i=0);var r=t.call(this,e)||this;return r.scheduler=n,r.delay=i,r}return r(e,t),e.dispatch=function(t){t.notification.observe(t.destination),this.unsubscribe()},e.prototype.scheduleMessage=function(t){this.destination.add(this.scheduler.schedule(e.dispatch,this.delay,new kd(t,this.destination)))},e.prototype._next=function(t){this.scheduleMessage(Cd.createNext(t))},e.prototype._error=function(t){this.scheduleMessage(Cd.createError(t)),this.unsubscribe()},e.prototype._complete=function(){this.scheduleMessage(Cd.createComplete()),this.unsubscribe()},e}(O),kd=function(t,e){this.notification=t,this.destination=e},Ed=function(t){function e(e,n,i){void 0===e&&(e=Number.POSITIVE_INFINITY),void 0===n&&(n=Number.POSITIVE_INFINITY);var r=t.call(this)||this;return r.scheduler=i,r._events=[],r._infiniteTimeWindow=!1,r._bufferSize=e<1?1:e,r._windowTime=n<1?1:n,n===Number.POSITIVE_INFINITY?(r._infiniteTimeWindow=!0,r.next=r.nextInfiniteTimeWindow):r.next=r.nextTimeWindow,r}return r(e,t),e.prototype.nextInfiniteTimeWindow=function(e){var n=this._events;n.push(e),n.length>this._bufferSize&&n.shift(),t.prototype.next.call(this,e)},e.prototype.nextTimeWindow=function(e){this._events.push(new Td(this._getNow(),e)),this._trimBufferThenGetEvents(),t.prototype.next.call(this,e)},e.prototype._subscribe=function(t){var e,n=this._infiniteTimeWindow,i=n?this._events:this._trimBufferThenGetEvents(),r=this.scheduler,o=i.length;if(this.closed)throw new rt;if(this.isStopped||this.hasError?e=k.EMPTY:(this.observers.push(t),e=new ot(this,t)),r&&t.add(t=new Sd(t,r)),n)for(var s=0;s<o&&!t.closed;s++)t.next(i[s]);else for(s=0;s<o&&!t.closed;s++)t.next(i[s].value);return this.hasError?t.error(this.thrownError):this.isStopped&&t.complete(),e},e.prototype._getNow=function(){return(this.scheduler||_d).now()},e.prototype._trimBufferThenGetEvents=function(){for(var t=this._getNow(),e=this._bufferSize,n=this._windowTime,i=this._events,r=i.length,o=0;o<r&&!(t-i[o].time<n);)o++;return r>e&&(o=Math.max(o,r-e)),o>0&&i.splice(0,o),i},e}(at),Td=function(t,e){this.time=t,this.value=e},Od=function(){function t(t){this.config=t,this.original={width:0,height:0},this.loading=!1,this.loaded=new Ed(1)}return t.prototype.isEmpty=function(){return!this.config.get("pixie.image")&&!this.config.get("pixie.blankCanvasSize")&&0===this.fabric.getObjects().length},t.prototype.calcWrapperSize=function(){var t=this.wrapperEl.getBoundingClientRect();return{width:t.width,height:t.height}},t}();function Id(){throw Error("Host already has a portal attached")}var Ad=function(){function t(){}return t.prototype.attach=function(t){return null==t&&function(){throw Error("Attempting to attach a portal to a null PortalOutlet")}(),t.hasAttached()&&Id(),this._attachedHost=t,t.attach(this)},t.prototype.detach=function(){var t=this._attachedHost;null==t?function(){throw Error("Attempting to detach a portal that is not attached to a host")}():(this._attachedHost=null,t.detach())},Object.defineProperty(t.prototype,"isAttached",{get:function(){return null!=this._attachedHost},enumerable:!0,configurable:!0}),t.prototype.setAttachedHost=function(t){this._attachedHost=t},t}(),Pd=function(t){function e(e,n,i){var r=t.call(this)||this;return r.component=e,r.viewContainerRef=n,r.injector=i,r}return r(e,t),e}(Ad),Dd=function(t){function e(e,n,i){var r=t.call(this)||this;return r.templateRef=e,r.viewContainerRef=n,r.context=i,r}return r(e,t),Object.defineProperty(e.prototype,"origin",{get:function(){return this.templateRef.elementRef},enumerable:!0,configurable:!0}),e.prototype.attach=function(e,n){return void 0===n&&(n=this.context),this.context=n,t.prototype.attach.call(this,e)},e.prototype.detach=function(){return this.context=void 0,t.prototype.detach.call(this)},e}(Ad),jd=function(){function t(){this._isDisposed=!1}return t.prototype.hasAttached=function(){return!!this._attachedPortal},t.prototype.attach=function(t){return t||function(){throw Error("Must provide a portal to attach")}(),this.hasAttached()&&Id(),this._isDisposed&&function(){throw Error("This PortalOutlet has already been disposed")}(),t instanceof Pd?(this._attachedPortal=t,this.attachComponentPortal(t)):t instanceof Dd?(this._attachedPortal=t,this.attachTemplatePortal(t)):void function(){throw Error("Attempting to attach an unknown Portal type. BasePortalOutlet accepts either a ComponentPortal or a TemplatePortal.")}()},t.prototype.detach=function(){this._attachedPortal&&(this._attachedPortal.setAttachedHost(null),this._attachedPortal=null),this._invokeDisposeFn()},t.prototype.dispose=function(){this.hasAttached()&&this.detach(),this._invokeDisposeFn(),this._isDisposed=!0},t.prototype.setDisposeFn=function(t){this._disposeFn=t},t.prototype._invokeDisposeFn=function(){this._disposeFn&&(this._disposeFn(),this._disposeFn=null)},t}(),Md=function(t){function e(e,n,i,r){var o=t.call(this)||this;return o.outletElement=e,o._componentFactoryResolver=n,o._appRef=i,o._defaultInjector=r,o}return r(e,t),e.prototype.attachComponentPortal=function(t){var e,n=this,i=this._componentFactoryResolver.resolveComponentFactory(t.component);return t.viewContainerRef?(e=t.viewContainerRef.createComponent(i,t.viewContainerRef.length,t.injector||t.viewContainerRef.parentInjector),this.setDisposeFn(function(){return e.destroy()})):(e=i.create(t.injector||this._defaultInjector),this._appRef.attachView(e.hostView),this.setDisposeFn(function(){n._appRef.detachView(e.hostView),e.destroy()})),this.outletElement.appendChild(this._getComponentRootNode(e)),e},e.prototype.attachTemplatePortal=function(t){var e=this,n=t.viewContainerRef,i=n.createEmbeddedView(t.templateRef,t.context);return i.detectChanges(),i.rootNodes.forEach(function(t){return e.outletElement.appendChild(t)}),this.setDisposeFn(function(){var t=n.indexOf(i);-1!==t&&n.remove(t)}),i},e.prototype.dispose=function(){t.prototype.dispose.call(this),null!=this.outletElement.parentNode&&this.outletElement.parentNode.removeChild(this.outletElement)},e.prototype._getComponentRootNode=function(t){return t.hostView.rootNodes[0]},e}(jd),Rd=function(t){function e(e,n){var i=t.call(this)||this;return i._componentFactoryResolver=e,i._viewContainerRef=n,i._isInitialized=!1,i.attached=new In,i}return r(e,t),Object.defineProperty(e.prototype,"portal",{get:function(){return this._attachedPortal},set:function(e){(!this.hasAttached()||e||this._isInitialized)&&(this.hasAttached()&&t.prototype.detach.call(this),e&&t.prototype.attach.call(this,e),this._attachedPortal=e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"attachedRef",{get:function(){return this._attachedRef},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){this._isInitialized=!0},e.prototype.ngOnDestroy=function(){t.prototype.dispose.call(this),this._attachedPortal=null,this._attachedRef=null},e.prototype.attachComponentPortal=function(e){e.setAttachedHost(this);var n=null!=e.viewContainerRef?e.viewContainerRef:this._viewContainerRef,i=this._componentFactoryResolver.resolveComponentFactory(e.component),r=n.createComponent(i,n.length,e.injector||n.parentInjector);return t.prototype.setDisposeFn.call(this,function(){return r.destroy()}),this._attachedPortal=e,this._attachedRef=r,this.attached.emit(r),r},e.prototype.attachTemplatePortal=function(e){var n=this;e.setAttachedHost(this);var i=this._viewContainerRef.createEmbeddedView(e.templateRef,e.context);return t.prototype.setDisposeFn.call(this,function(){return n._viewContainerRef.clear()}),this._attachedPortal=e,this._attachedRef=i,this.attached.emit(i),i},e}(jd),Fd=function(){},Nd=function(){function t(t,e){this._parentInjector=t,this._customTokens=e}return t.prototype.get=function(t,e){var n=this._customTokens.get(t);return void 0!==n?n:this._parentInjector.get(t,e)},t}(),Ld=function(){function t(t){this.overlayRef=t,this.value=new at}return t.prototype.isOpen=function(){return this.overlayRef&&this.overlayRef.hasAttached()},t.prototype.close=function(){this.overlayRef&&this.overlayRef.dispose()},t.prototype.emitValue=function(t){this.value.next(t)},t.prototype.valueChanged=function(){return this.value.asObservable()},t.prototype.getPanelEl=function(){return this.overlayRef.overlayElement},t.prototype.updatePosition=function(){return this.overlayRef.updatePosition()},t}(),Bd=new yt("OVERLAY_PANEL_DATA");function Vd(t){return null!=t&&""+t!="false"}function zd(t,e){return void 0===e&&(e=0),function(t){return!isNaN(parseFloat(t))&&!isNaN(Number(t))}(t)?Number(t):e}function Hd(t){return Array.isArray(t)?t:[t]}function Wd(t){return null==t?"":"string"==typeof t?t:t+"px"}var Ud,Xd="undefined"!=typeof Intl&&Intl.v8BreakIterator,Yd=function(){function t(t){this._platformId=t,this.isBrowser=this._platformId?this._platformId===ec:"object"==typeof document&&!!document,this.EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent),this.TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent),this.BLINK=this.isBrowser&&!(!window.chrome&&!Xd)&&"undefined"!=typeof CSS&&!this.EDGE&&!this.TRIDENT,this.WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT,this.IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,this.FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent),this.ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT,this.SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT}return t.ngInjectableDef=vt({factory:function(){return new t(pe(an,8))},token:t,providedIn:"root"}),t}();function qd(){if(null==Ud&&"undefined"!=typeof window)try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){return Ud=!0}}))}finally{Ud=Ud||!1}return Ud}var Gd=function(){};function Kd(t,e,n,i){return p(n)&&(i=n,n=void 0),i?Kd(t,e,n).pipe(Y(function(t){return v(t)?i.apply(void 0,t):i(t)})):new D(function(i){!function t(e,n,i,r,o){var s;if(function(t){return t&&"function"==typeof t.addEventListener&&"function"==typeof t.removeEventListener}(e)){var a=e;e.addEventListener(n,i,o),s=function(){return a.removeEventListener(n,i,o)}}else if(function(t){return t&&"function"==typeof t.on&&"function"==typeof t.off}(e)){var l=e;e.on(n,i),s=function(){return l.off(n,i)}}else if(function(t){return t&&"function"==typeof t.addListener&&"function"==typeof t.removeListener}(e)){var u=e;e.addListener(n,i),s=function(){return u.removeListener(n,i)}}else{if(!e||!e.length)throw new TypeError("Invalid event target");for(var c=0,h=e.length;c<h;c++)t(e[c],n,i,r,o)}r.add(s)}(t,e,function(t){i.next(arguments.length>1?Array.prototype.slice.call(arguments):t)},i,n)})}Object;var Zd=new bd(md),Qd=function(){function t(t){this.durationSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new Jd(t,this.durationSelector))},t}(),Jd=function(t){function e(e,n){var i=t.call(this,e)||this;return i.durationSelector=n,i.hasValue=!1,i}return r(e,t),e.prototype._next=function(t){if(this.value=t,this.hasValue=!0,!this.throttled){var e=x(this.durationSelector)(t);if(e===_)this.destination.error(_.e);else{var n=U(this,e);!n||n.closed?this.clearThrottle():this.add(this.throttled=n)}}},e.prototype.clearThrottle=function(){var t=this.value,e=this.hasValue,n=this.throttled;n&&(this.remove(n),this.throttled=null,n.unsubscribe()),e&&(this.value=null,this.hasValue=!1,this.destination.next(t))},e.prototype.notifyNext=function(t,e,n,i){this.clearThrottle()},e.prototype.notifyComplete=function(){this.clearThrottle()},e}(X);function $d(t){return!v(t)&&t-parseFloat(t)+1>=0}function tf(t){var e=t.index,n=t.period,i=t.subscriber;if(i.next(e),!i.closed){if(-1===n)return i.complete();t.index=e+1,this.schedule(t,n)}}function ef(t,e){return void 0===e&&(e=Zd),n=function(){return function(t,e,n){void 0===t&&(t=0);var i=-1;return $d(e)?i=Number(e)<1?1:Number(e):M(e)&&(n=e),M(n)||(n=Zd),new D(function(e){var r=$d(t)?t:+t-n.now();return n.schedule(tf,r,{index:0,period:i,subscriber:e})})}(t,e)},function(t){return t.lift(new Qd(n))};var n}var nf=function(){function t(t,e){this._ngZone=t,this._platform=e,this._scrolled=new at,this._globalSubscription=null,this._scrolledCount=0,this.scrollContainers=new Map}return t.prototype.register=function(t){var e=this,n=t.elementScrolled().subscribe(function(){return e._scrolled.next(t)});this.scrollContainers.set(t,n)},t.prototype.deregister=function(t){var e=this.scrollContainers.get(t);e&&(e.unsubscribe(),this.scrollContainers.delete(t))},t.prototype.scrolled=function(t){var e=this;return void 0===t&&(t=20),this._platform.isBrowser?D.create(function(n){e._globalSubscription||e._addGlobalListener();var i=t>0?e._scrolled.pipe(ef(t)).subscribe(n):e._scrolled.subscribe(n);return e._scrolledCount++,function(){i.unsubscribe(),e._scrolledCount--,e._scrolledCount||e._removeGlobalListener()}}):Eu()},t.prototype.ngOnDestroy=function(){var t=this;this._removeGlobalListener(),this.scrollContainers.forEach(function(e,n){return t.deregister(n)}),this._scrolled.complete()},t.prototype.ancestorScrolled=function(t,e){var n=this.getAncestorScrollContainers(t);return this.scrolled(e).pipe(Tu(function(t){return!t||n.indexOf(t)>-1}))},t.prototype.getAncestorScrollContainers=function(t){var e=this,n=[];return this.scrollContainers.forEach(function(i,r){e._scrollableContainsElement(r,t)&&n.push(r)}),n},t.prototype._scrollableContainsElement=function(t,e){var n=e.nativeElement,i=t.getElementRef().nativeElement;do{if(n==i)return!0}while(n=n.parentElement);return!1},t.prototype._addGlobalListener=function(){var t=this;this._globalSubscription=this._ngZone.runOutsideAngular(function(){return Kd(window.document,"scroll").subscribe(function(){return t._scrolled.next()})})},t.prototype._removeGlobalListener=function(){this._globalSubscription&&(this._globalSubscription.unsubscribe(),this._globalSubscription=null)},t.ngInjectableDef=vt({factory:function(){return new t(pe(An),pe(Yd))},token:t,providedIn:"root"}),t}(),rf=function(){function t(t,e){var n=this;this._platform=t,this._change=t.isBrowser?e.runOutsideAngular(function(){return nt(Kd(window,"resize"),Kd(window,"orientationchange"))}):Eu(),this._invalidateCache=this.change().subscribe(function(){return n._updateViewportSize()})}return t.prototype.ngOnDestroy=function(){this._invalidateCache.unsubscribe()},t.prototype.getViewportSize=function(){this._viewportSize||this._updateViewportSize();var t={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),t},t.prototype.getViewportRect=function(){var t=this.getViewportScrollPosition(),e=this.getViewportSize(),n=e.width,i=e.height;return{top:t.top,left:t.left,bottom:t.top+i,right:t.left+n,height:i,width:n}},t.prototype.getViewportScrollPosition=function(){if(!this._platform.isBrowser)return{top:0,left:0};var t=document.documentElement.getBoundingClientRect();return{top:-t.top||document.body.scrollTop||window.scrollY||document.documentElement.scrollTop||0,left:-t.left||document.body.scrollLeft||window.scrollX||document.documentElement.scrollLeft||0}},t.prototype.change=function(t){return void 0===t&&(t=20),t>0?this._change.pipe(ef(t)):this._change},t.prototype._updateViewportSize=function(){this._viewportSize=this._platform.isBrowser?{width:window.innerWidth,height:window.innerHeight}:{width:0,height:0}},t.ngInjectableDef=vt({factory:function(){return new t(pe(Yd),pe(An))},token:t,providedIn:"root"}),t}(),of=function(){};function sf(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}sf.prototype=Object.create(Error.prototype);var af=sf;function lf(t){return function(e){return 0===t?Su():e.lift(new uf(t))}}var uf=function(){function t(t){if(this.total=t,this.total<0)throw new af}return t.prototype.call=function(t,e){return e.subscribe(new cf(t,this.total))},t}(),cf=function(t){function e(e,n){var i=t.call(this,e)||this;return i.total=n,i.count=0,i}return r(e,t),e.prototype._next=function(t){var e=this.total,n=++this.count;n<=e&&(this.destination.next(t),n===e&&(this.destination.complete(),this.unsubscribe()))},e}(O);function hf(t){return function(e){return e.lift(new pf(t))}}var pf=function(){function t(t){this.notifier=t}return t.prototype.call=function(t,e){var n=new df(t),i=U(n,this.notifier);return i&&!n.seenValue?(n.add(i),e.subscribe(n)):n},t}(),df=function(t){function e(e){var n=t.call(this,e)||this;return n.seenValue=!1,n}return r(e,t),e.prototype.notifyNext=function(t,e,n,i,r){this.seenValue=!0,this.complete()},e.prototype.notifyComplete=function(){},e}(X),ff=function(){function t(){}return t.prototype.enable=function(){},t.prototype.disable=function(){},t.prototype.attach=function(){},t}(),gf=function(){return function(t){var e=this;this.scrollStrategy=new ff,this.panelClass="",this.hasBackdrop=!1,this.backdropClass="cdk-overlay-dark-backdrop",t&&Object.keys(t).filter(function(e){return void 0!==t[e]}).forEach(function(n){return e[n]=t[n]})}}();function mf(t,e){if("top"!==e&&"bottom"!==e&&"center"!==e)throw Error("ConnectedPosition: Invalid "+t+' "'+e+'". Expected "top", "bottom" or "center".')}function vf(t,e){if("start"!==e&&"end"!==e&&"center"!==e)throw Error("ConnectedPosition: Invalid "+t+' "'+e+'". Expected "start", "end" or "center".')}var yf=function(){function t(t,e){this._viewportRuler=t,this._previousHTMLStyles={top:"",left:""},this._isEnabled=!1,this._document=e}return t.prototype.attach=function(){},t.prototype.enable=function(){if(this._canBeEnabled()){var t=this._document.documentElement;this._previousScrollPosition=this._viewportRuler.getViewportScrollPosition(),this._previousHTMLStyles.left=t.style.left||"",this._previousHTMLStyles.top=t.style.top||"",t.style.left=Wd(-this._previousScrollPosition.left),t.style.top=Wd(-this._previousScrollPosition.top),t.classList.add("cdk-global-scrollblock"),this._isEnabled=!0}},t.prototype.disable=function(){if(this._isEnabled){var t=this._document.documentElement,e=this._document.body,n=t.style.scrollBehavior||"",i=e.style.scrollBehavior||"";this._isEnabled=!1,t.style.left=this._previousHTMLStyles.left,t.style.top=this._previousHTMLStyles.top,t.classList.remove("cdk-global-scrollblock"),t.style.scrollBehavior=e.style.scrollBehavior="auto",window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),t.style.scrollBehavior=n,e.style.scrollBehavior=i}},t.prototype._canBeEnabled=function(){if(this._document.documentElement.classList.contains("cdk-global-scrollblock")||this._isEnabled)return!1;var t=this._document.body,e=this._viewportRuler.getViewportSize();return t.scrollHeight>e.height||t.scrollWidth>e.width},t}();function bf(){return Error("Scroll strategy has already been attached.")}var _f=function(){function t(t,e,n,i){var r=this;this._scrollDispatcher=t,this._ngZone=e,this._viewportRuler=n,this._config=i,this._scrollSubscription=null,this._detach=function(){r.disable(),r._overlayRef.hasAttached()&&r._ngZone.run(function(){return r._overlayRef.detach()})}}return t.prototype.attach=function(t){if(this._overlayRef)throw bf();this._overlayRef=t},t.prototype.enable=function(){var t=this;if(!this._scrollSubscription){var e=this._scrollDispatcher.scrolled(0);this._config&&this._config.threshold&&this._config.threshold>1?(this._initialScrollPosition=this._viewportRuler.getViewportScrollPosition().top,this._scrollSubscription=e.subscribe(function(){var e=t._viewportRuler.getViewportScrollPosition().top;Math.abs(e-t._initialScrollPosition)>t._config.threshold?t._detach():t._overlayRef.updatePosition()})):this._scrollSubscription=e.subscribe(this._detach)}},t.prototype.disable=function(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)},t}();function wf(t,e){return e.some(function(e){return t.bottom<e.top||t.top>e.bottom||t.right<e.left||t.left>e.right})}function xf(t,e){return e.some(function(e){return t.top<e.top||t.bottom>e.bottom||t.left<e.left||t.right>e.right})}var Cf=function(){function t(t,e,n,i){this._scrollDispatcher=t,this._viewportRuler=e,this._ngZone=n,this._config=i,this._scrollSubscription=null}return t.prototype.attach=function(t){if(this._overlayRef)throw bf();this._overlayRef=t},t.prototype.enable=function(){var t=this;this._scrollSubscription||(this._scrollSubscription=this._scrollDispatcher.scrolled(this._config?this._config.scrollThrottle:0).subscribe(function(){if(t._overlayRef.updatePosition(),t._config&&t._config.autoClose){var e=t._overlayRef.overlayElement.getBoundingClientRect(),n=t._viewportRuler.getViewportSize(),i=n.width,r=n.height;wf(e,[{width:i,height:r,bottom:r,right:i,top:0,left:0}])&&(t.disable(),t._ngZone.run(function(){return t._overlayRef.detach()}))}}))},t.prototype.disable=function(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)},t}(),Sf=function(){function t(t,e,n,i){var r=this;this._scrollDispatcher=t,this._viewportRuler=e,this._ngZone=n,this.noop=function(){return new ff},this.close=function(t){return new _f(r._scrollDispatcher,r._ngZone,r._viewportRuler,t)},this.block=function(){return new yf(r._viewportRuler,r._document)},this.reposition=function(t){return new Cf(r._scrollDispatcher,r._viewportRuler,r._ngZone,t)},this._document=i}return t.ngInjectableDef=vt({factory:function(){return new t(pe(nf),pe(rf),pe(An),pe(tc))},token:t,providedIn:"root"}),t}(),kf=function(){function t(t){var e=this;this._attachedOverlays=[],this._keydownListener=function(t){for(var n=e._attachedOverlays,i=n.length-1;i>-1;i--)if(n[i]._keydownEventSubscriptions>0){n[i]._keydownEvents.next(t);break}},this._document=t}return t.prototype.ngOnDestroy=function(){this._detach()},t.prototype.add=function(t){this.remove(t),this._isAttached||(this._document.body.addEventListener("keydown",this._keydownListener,!0),this._isAttached=!0),this._attachedOverlays.push(t)},t.prototype.remove=function(t){var e=this._attachedOverlays.indexOf(t);e>-1&&this._attachedOverlays.splice(e,1),0===this._attachedOverlays.length&&this._detach()},t.prototype._detach=function(){this._isAttached&&(this._document.body.removeEventListener("keydown",this._keydownListener,!0),this._isAttached=!1)},t.ngInjectableDef=vt({factory:function(){return new t(pe(tc))},token:t,providedIn:"root"}),t}(),Ef=function(){function t(t){this._document=t}return t.prototype.ngOnDestroy=function(){this._containerElement&&this._containerElement.parentNode&&this._containerElement.parentNode.removeChild(this._containerElement)},t.prototype.getContainerElement=function(){return this._containerElement||this._createContainer(),this._containerElement},t.prototype._createContainer=function(){var t=this._document.createElement("div");t.classList.add("cdk-overlay-container"),this._document.body.appendChild(t),this._containerElement=t},t.ngInjectableDef=vt({factory:function(){return new t(pe(tc))},token:t,providedIn:"root"}),t}(),Tf=function(){function t(t,e,n,i,r,o,s){var a=this;this._portalOutlet=t,this._host=e,this._pane=n,this._config=i,this._ngZone=r,this._keyboardDispatcher=o,this._document=s,this._backdropElement=null,this._backdropClick=new at,this._attachments=new at,this._detachments=new at,this._keydownEventsObservable=D.create(function(t){var e=a._keydownEvents.subscribe(t);return a._keydownEventSubscriptions++,function(){e.unsubscribe(),a._keydownEventSubscriptions--}}),this._keydownEvents=new at,this._keydownEventSubscriptions=0,i.scrollStrategy&&i.scrollStrategy.attach(this)}return Object.defineProperty(t.prototype,"overlayElement",{get:function(){return this._pane},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"backdropElement",{get:function(){return this._backdropElement},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hostElement",{get:function(){return this._host},enumerable:!0,configurable:!0}),t.prototype.attach=function(t){var e=this,n=this._portalOutlet.attach(t);return this._config.positionStrategy&&this._config.positionStrategy.attach(this),!this._host.parentElement&&this._previousHostParent&&this._previousHostParent.appendChild(this._host),this._updateStackingOrder(),this._updateElementSize(),this._updateElementDirection(),this._config.scrollStrategy&&this._config.scrollStrategy.enable(),this._ngZone.onStable.asObservable().pipe(lf(1)).subscribe(function(){e.hasAttached()&&e.updatePosition()}),this._togglePointerEvents(!0),this._config.hasBackdrop&&this._attachBackdrop(),this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!0),this._attachments.next(),this._keyboardDispatcher.add(this),n},t.prototype.detach=function(){var t=this;if(this.hasAttached()){this.detachBackdrop(),this._togglePointerEvents(!1),this._config.positionStrategy&&this._config.positionStrategy.detach&&this._config.positionStrategy.detach(),this._config.scrollStrategy&&this._config.scrollStrategy.disable(),this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!1);var e=this._portalOutlet.detach();this._detachments.next(),this._keyboardDispatcher.remove(this);var n=this._ngZone.onStable.asObservable().pipe(hf(nt(this._attachments,this._detachments))).subscribe(function(){t._pane&&t._host&&0!==t._pane.children.length||(t._host&&t._host.parentElement&&(t._previousHostParent=t._host.parentElement,t._previousHostParent.removeChild(t._host)),n.unsubscribe())});return e}},t.prototype.dispose=function(){var t=this.hasAttached();this._config.positionStrategy&&this._config.positionStrategy.dispose(),this._config.scrollStrategy&&this._config.scrollStrategy.disable(),this.detachBackdrop(),this._keyboardDispatcher.remove(this),this._portalOutlet.dispose(),this._attachments.complete(),this._backdropClick.complete(),this._keydownEvents.complete(),this._host&&this._host.parentNode&&(this._host.parentNode.removeChild(this._host),this._host=null),this._previousHostParent=this._pane=null,t&&this._detachments.next(),this._detachments.complete()},t.prototype.hasAttached=function(){return this._portalOutlet.hasAttached()},t.prototype.backdropClick=function(){return this._backdropClick.asObservable()},t.prototype.attachments=function(){return this._attachments.asObservable()},t.prototype.detachments=function(){return this._detachments.asObservable()},t.prototype.keydownEvents=function(){return this._keydownEventsObservable},t.prototype.getConfig=function(){return this._config},t.prototype.updatePosition=function(){this._config.positionStrategy&&this._config.positionStrategy.apply()},t.prototype.updateSize=function(t){this._config=o({},this._config,t),this._updateElementSize()},t.prototype.setDirection=function(t){this._config=o({},this._config,{direction:t}),this._updateElementDirection()},t.prototype.getDirection=function(){var t=this._config.direction;return t?"string"==typeof t?t:t.value:"ltr"},t.prototype._updateElementDirection=function(){this._host.setAttribute("dir",this.getDirection())},t.prototype._updateElementSize=function(){var t=this._pane.style;t.width=Wd(this._config.width),t.height=Wd(this._config.height),t.minWidth=Wd(this._config.minWidth),t.minHeight=Wd(this._config.minHeight),t.maxWidth=Wd(this._config.maxWidth),t.maxHeight=Wd(this._config.maxHeight)},t.prototype._togglePointerEvents=function(t){this._pane.style.pointerEvents=t?"auto":"none"},t.prototype._attachBackdrop=function(){var t=this;this._backdropElement=this._document.createElement("div"),this._backdropElement.classList.add("cdk-overlay-backdrop"),this._config.backdropClass&&this._toggleClasses(this._backdropElement,this._config.backdropClass,!0),this._host.parentElement.insertBefore(this._backdropElement,this._host),this._backdropElement.addEventListener("click",function(e){return t._backdropClick.next(e)}),"undefined"!=typeof requestAnimationFrame?this._ngZone.runOutsideAngular(function(){requestAnimationFrame(function(){t._backdropElement&&t._backdropElement.classList.add("cdk-overlay-backdrop-showing")})}):this._backdropElement.classList.add("cdk-overlay-backdrop-showing")},t.prototype._updateStackingOrder=function(){this._host.nextSibling&&this._host.parentNode.appendChild(this._host)},t.prototype.detachBackdrop=function(){var t=this,e=this._backdropElement;if(e){var n,i=function(){e&&e.parentNode&&e.parentNode.removeChild(e),t._backdropElement==e&&(t._backdropElement=null),clearTimeout(n)};e.classList.remove("cdk-overlay-backdrop-showing"),this._config.backdropClass&&this._toggleClasses(e,this._config.backdropClass,!1),this._ngZone.runOutsideAngular(function(){e.addEventListener("transitionend",i)}),e.style.pointerEvents="none",n=this._ngZone.runOutsideAngular(function(){return setTimeout(i,500)})}},t.prototype._toggleClasses=function(t,e,n){var i=t.classList;Hd(e).forEach(function(t){n?i.add(t):i.remove(t)})},t}(),Of=function(){function t(t,e,n,i,r){var o=this;this._viewportRuler=e,this._document=n,this._platform=i,this._overlayContainer=r,this._isInitialRender=!0,this._lastBoundingBoxSize={width:0,height:0},this._isPushed=!1,this._canPush=!0,this._growAfterOpen=!1,this._hasFlexibleDimensions=!0,this._positionLocked=!1,this._viewportMargin=0,this.scrollables=[],this._preferredPositions=[],this._positionChanges=new at,this._resizeSubscription=k.EMPTY,this._offsetX=0,this._offsetY=0,this._positionChangeSubscriptions=0,this.positionChanges=D.create(function(t){var e=o._positionChanges.subscribe(t);return o._positionChangeSubscriptions++,function(){e.unsubscribe(),o._positionChangeSubscriptions--}}),this.setOrigin(t)}return Object.defineProperty(t.prototype,"positions",{get:function(){return this._preferredPositions},enumerable:!0,configurable:!0}),t.prototype.attach=function(t){var e=this;if(this._overlayRef&&t!==this._overlayRef)throw Error("This position strategy is already attached to an overlay");this._validatePositions(),t.hostElement.classList.add("cdk-overlay-connected-position-bounding-box"),this._overlayRef=t,this._boundingBox=t.hostElement,this._pane=t.overlayElement,this._resizeSubscription.unsubscribe(),this._resizeSubscription=this._viewportRuler.change().subscribe(function(){return e.apply()})},t.prototype.apply=function(){if(!(this._isDisposed||this._platform&&!this._platform.isBrowser))if(!this._isInitialRender&&this._positionLocked&&this._lastPosition)this.reapplyLastPosition();else{this._resetOverlayElementStyles(),this._resetBoundingBoxStyles(),this._viewportRect=this._getNarrowedViewportRect(),this._originRect=this._origin.getBoundingClientRect(),this._overlayRect=this._pane.getBoundingClientRect();for(var t,e=this._originRect,n=this._overlayRect,i=this._viewportRect,r=[],o=0,s=this._preferredPositions;o<s.length;o++){var a=s[o],l=this._getOriginPoint(e,a),u=this._getOverlayPoint(l,n,a),c=this._getOverlayFit(u,n,i,a);if(c.isCompletelyWithinViewport)return this._isPushed=!1,void this._applyPosition(a,l);this._canFitWithFlexibleDimensions(c,u,i)?r.push({position:a,origin:l,overlayRect:n,boundingBoxRect:this._calculateBoundingBoxRect(l,a)}):(!t||t.overlayFit.visibleArea<c.visibleArea)&&(t={overlayFit:c,overlayPoint:u,originPoint:l,position:a,overlayRect:n})}if(r.length){for(var h=null,p=-1,d=0,f=r;d<f.length;d++){var g=f[d],m=g.boundingBoxRect.width*g.boundingBoxRect.height*(g.position.weight||1);m>p&&(p=m,h=g)}return this._isPushed=!1,void this._applyPosition(h.position,h.origin)}if(this._canPush)return this._isPushed=!0,void this._applyPosition(t.position,t.originPoint);this._applyPosition(t.position,t.originPoint)}},t.prototype.detach=function(){this._resizeSubscription.unsubscribe()},t.prototype.dispose=function(){this._isDisposed||(this.detach(),this._boundingBox=null,this._positionChanges.complete(),this._isDisposed=!0)},t.prototype.reapplyLastPosition=function(){if(!this._isDisposed&&(!this._platform||this._platform.isBrowser)){this._originRect=this._origin.getBoundingClientRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._viewportRect=this._getNarrowedViewportRect();var t=this._lastPosition||this._preferredPositions[0],e=this._getOriginPoint(this._originRect,t);this._applyPosition(t,e)}},t.prototype.withScrollableContainers=function(t){this.scrollables=t},t.prototype.withPositions=function(t){return this._preferredPositions=t,-1===t.indexOf(this._lastPosition)&&(this._lastPosition=null),this._validatePositions(),this},t.prototype.withViewportMargin=function(t){return this._viewportMargin=t,this},t.prototype.withFlexibleDimensions=function(t){return void 0===t&&(t=!0),this._hasFlexibleDimensions=t,this},t.prototype.withGrowAfterOpen=function(t){return void 0===t&&(t=!0),this._growAfterOpen=t,this},t.prototype.withPush=function(t){return void 0===t&&(t=!0),this._canPush=t,this},t.prototype.withLockedPosition=function(t){return void 0===t&&(t=!0),this._positionLocked=t,this},t.prototype.setOrigin=function(t){return this._origin=t instanceof ei?t.nativeElement:t,this},t.prototype.withDefaultOffsetX=function(t){return this._offsetX=t,this},t.prototype.withDefaultOffsetY=function(t){return this._offsetY=t,this},t.prototype.withTransformOriginOn=function(t){return this._transformOriginSelector=t,this},t.prototype._getOriginPoint=function(t,e){var n;if("center"==e.originX)n=t.left+t.width/2;else{var i=this._isRtl()?t.right:t.left,r=this._isRtl()?t.left:t.right;n="start"==e.originX?i:r}return{x:n,y:"center"==e.originY?t.top+t.height/2:"top"==e.originY?t.top:t.bottom}},t.prototype._getOverlayPoint=function(t,e,n){var i;return i="center"==n.overlayX?-e.width/2:"start"===n.overlayX?this._isRtl()?-e.width:0:this._isRtl()?0:-e.width,{x:t.x+i,y:t.y+("center"==n.overlayY?-e.height/2:"top"==n.overlayY?0:-e.height)}},t.prototype._getOverlayFit=function(t,e,n,i){var r=t.x,o=t.y,s=this._getOffset(i,"x"),a=this._getOffset(i,"y");s&&(r+=s),a&&(o+=a);var l=0-o,u=o+e.height-n.height,c=this._subtractOverflows(e.width,0-r,r+e.width-n.width),h=this._subtractOverflows(e.height,l,u),p=c*h;return{visibleArea:p,isCompletelyWithinViewport:e.width*e.height===p,fitsInViewportVertically:h===e.height,fitsInViewportHorizontally:c==e.width}},t.prototype._canFitWithFlexibleDimensions=function(t,e,n){if(this._hasFlexibleDimensions){var i=n.bottom-e.y,r=n.right-e.x,o=this._overlayRef.getConfig().minHeight,s=this._overlayRef.getConfig().minWidth;return(t.fitsInViewportVertically||null!=o&&o<=i)&&(t.fitsInViewportHorizontally||null!=s&&s<=r)}},t.prototype._pushOverlayOnScreen=function(t,e){var n=this._viewportRect,i=Math.max(t.x+e.width-n.right,0),r=Math.max(t.y+e.height-n.bottom,0),o=Math.max(n.top-t.y,0),s=Math.max(n.left-t.x,0);return{x:t.x+(e.width<=n.width?s||-i:n.left-t.x),y:t.y+(e.height<=n.height?o||-r:n.top-t.y)}},t.prototype._applyPosition=function(t,e){if(this._setTransformOrigin(t),this._setOverlayElementStyles(e,t),this._setBoundingBoxStyles(e,t),this._lastPosition=t,this._positionChangeSubscriptions>0){var n=new function(t,e){this.connectionPair=t,this.scrollableViewProperties=e}(t,this._getScrollVisibility());this._positionChanges.next(n)}this._isInitialRender=!1},t.prototype._setTransformOrigin=function(t){if(this._transformOriginSelector){var e,n=this._boundingBox.querySelectorAll(this._transformOriginSelector),i=t.overlayY;e="center"===t.overlayX?"center":this._isRtl()?"start"===t.overlayX?"right":"left":"start"===t.overlayX?"left":"right";for(var r=0;r<n.length;r++)n[r].style.transformOrigin=e+" "+i}},t.prototype._calculateBoundingBoxRect=function(t,e){var n,i,r,o,s,a,l=this._viewportRect,u=this._isRtl();if("top"===e.overlayY)i=t.y,n=l.bottom-t.y;else if("bottom"===e.overlayY)n=l.height-(r=l.height-t.y+2*this._viewportMargin)+this._viewportMargin;else{var c=Math.min(l.bottom-t.y,t.y-l.left),h=this._lastBoundingBoxSize.height;i=t.y-c,(n=2*c)>h&&!this._isInitialRender&&!this._growAfterOpen&&(i=t.y-h/2)}if("end"===e.overlayX&&!u||"start"===e.overlayX&&u)a=l.right-t.x+this._viewportMargin,o=t.x-l.left;else if("start"===e.overlayX&&!u||"end"===e.overlayX&&u)s=t.x,o=l.right-t.x;else{c=Math.min(l.right-t.x,t.x-l.top);var p=this._lastBoundingBoxSize.width;s=t.x-c,(o=2*c)>p&&!this._isInitialRender&&!this._growAfterOpen&&(s=t.x-p/2)}return{top:i,left:s,bottom:r,right:a,width:o,height:n}},t.prototype._setBoundingBoxStyles=function(t,e){var n=this._calculateBoundingBoxRect(t,e);this._isInitialRender||this._growAfterOpen||(n.height=Math.min(n.height,this._lastBoundingBoxSize.height),n.width=Math.min(n.width,this._lastBoundingBoxSize.width));var i={};if(this._hasExactPosition())i.top=i.left="0",i.bottom=i.right="",i.width=i.height="100%";else{var r=this._overlayRef.getConfig().maxHeight,o=this._overlayRef.getConfig().maxWidth;i.height=Wd(n.height),i.top=Wd(n.top),i.bottom=Wd(n.bottom),i.width=Wd(n.width),i.left=Wd(n.left),i.right=Wd(n.right),i.alignItems="center"===e.overlayX?"center":"end"===e.overlayX?"flex-end":"flex-start",i.justifyContent="center"===e.overlayY?"center":"bottom"===e.overlayY?"flex-end":"flex-start",r&&(i.maxHeight=Wd(r)),o&&(i.maxWidth=Wd(o))}this._lastBoundingBoxSize=n,If(this._boundingBox.style,i)},t.prototype._resetBoundingBoxStyles=function(){If(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})},t.prototype._resetOverlayElementStyles=function(){If(this._pane.style,{top:"",left:"",bottom:"",right:"",position:""})},t.prototype._setOverlayElementStyles=function(t,e){var n={};this._hasExactPosition()?(If(n,this._getExactOverlayY(e,t)),If(n,this._getExactOverlayX(e,t))):n.position="static";var i="",r=this._getOffset(e,"x"),o=this._getOffset(e,"y");r&&(i+="translateX("+r+"px) "),o&&(i+="translateY("+o+"px)"),n.transform=i.trim(),this._hasFlexibleDimensions&&this._overlayRef.getConfig().maxHeight&&(n.maxHeight=""),this._hasFlexibleDimensions&&this._overlayRef.getConfig().maxWidth&&(n.maxWidth=""),If(this._pane.style,n)},t.prototype._getExactOverlayY=function(t,e){var n={top:null,bottom:null},i=this._getOverlayPoint(e,this._overlayRect,t);this._isPushed&&(i=this._pushOverlayOnScreen(i,this._overlayRect));var r=this._overlayContainer?this._overlayContainer.getContainerElement().getBoundingClientRect().top:0;return i.y-=r,"bottom"===t.overlayY?n.bottom=this._document.documentElement.clientHeight-(i.y+this._overlayRect.height)+"px":n.top=Wd(i.y),n},t.prototype._getExactOverlayX=function(t,e){var n={left:null,right:null},i=this._getOverlayPoint(e,this._overlayRect,t);return this._isPushed&&(i=this._pushOverlayOnScreen(i,this._overlayRect)),"right"==(this._isRtl()?"end"===t.overlayX?"left":"right":"end"===t.overlayX?"right":"left")?n.right=this._document.documentElement.clientWidth-(i.x+this._overlayRect.width)+"px":n.left=Wd(i.x),n},t.prototype._getScrollVisibility=function(){var t=this._origin.getBoundingClientRect(),e=this._pane.getBoundingClientRect(),n=this.scrollables.map(function(t){return t.getElementRef().nativeElement.getBoundingClientRect()});return{isOriginClipped:xf(t,n),isOriginOutsideView:wf(t,n),isOverlayClipped:xf(e,n),isOverlayOutsideView:wf(e,n)}},t.prototype._subtractOverflows=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return e.reduce(function(t,e){return t-Math.max(e,0)},t)},t.prototype._getNarrowedViewportRect=function(){var t=this._document.documentElement.clientWidth,e=this._document.documentElement.clientHeight,n=this._viewportRuler.getViewportScrollPosition();return{top:n.top+this._viewportMargin,left:n.left+this._viewportMargin,right:n.left+t-this._viewportMargin,bottom:n.top+e-this._viewportMargin,width:t-2*this._viewportMargin,height:e-2*this._viewportMargin}},t.prototype._isRtl=function(){return"rtl"===this._overlayRef.getDirection()},t.prototype._hasExactPosition=function(){return!this._hasFlexibleDimensions||this._isPushed},t.prototype._getOffset=function(t,e){return"x"===e?null==t.offsetX?this._offsetX:t.offsetX:null==t.offsetY?this._offsetY:t.offsetY},t.prototype._validatePositions=function(){if(!this._preferredPositions.length)throw Error("FlexibleConnectedPositionStrategy: At least one position is required.");this._preferredPositions.forEach(function(t){vf("originX",t.originX),mf("originY",t.originY),vf("overlayX",t.overlayX),mf("overlayY",t.overlayY)})},t}();function If(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}var Af=function(){function t(t,e,n,i,r,o){this._preferredPositions=[],this._positionStrategy=new Of(n,i,r,o).withFlexibleDimensions(!1).withPush(!1).withViewportMargin(0),this.withFallbackPosition(t,e)}return Object.defineProperty(t.prototype,"_isRtl",{get:function(){return"rtl"===this._overlayRef.getDirection()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onPositionChange",{get:function(){return this._positionStrategy.positionChanges},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"positions",{get:function(){return this._preferredPositions},enumerable:!0,configurable:!0}),t.prototype.attach=function(t){this._overlayRef=t,this._positionStrategy.attach(t),this._direction&&(t.setDirection(this._direction),this._direction=null)},t.prototype.dispose=function(){this._positionStrategy.dispose()},t.prototype.detach=function(){this._positionStrategy.detach()},t.prototype.apply=function(){this._positionStrategy.apply()},t.prototype.recalculateLastPosition=function(){this._positionStrategy.reapplyLastPosition()},t.prototype.withScrollableContainers=function(t){this._positionStrategy.withScrollableContainers(t)},t.prototype.withFallbackPosition=function(t,e,n,i){var r=new function(t,e,n,i){this.offsetX=n,this.offsetY=i,this.originX=t.originX,this.originY=t.originY,this.overlayX=e.overlayX,this.overlayY=e.overlayY}(t,e,n,i);return this._preferredPositions.push(r),this._positionStrategy.withPositions(this._preferredPositions),this},t.prototype.withDirection=function(t){return this._overlayRef?this._overlayRef.setDirection(t):this._direction=t,this},t.prototype.withOffsetX=function(t){return this._positionStrategy.withDefaultOffsetX(t),this},t.prototype.withOffsetY=function(t){return this._positionStrategy.withDefaultOffsetY(t),this},t.prototype.withLockedPosition=function(t){return this._positionStrategy.withLockedPosition(t),this},t.prototype.withPositions=function(t){return this._preferredPositions=t.slice(),this._positionStrategy.withPositions(this._preferredPositions),this},t.prototype.setOrigin=function(t){return this._positionStrategy.setOrigin(t),this},t}(),Pf=function(){function t(){this._cssPosition="static",this._topOffset="",this._bottomOffset="",this._leftOffset="",this._rightOffset="",this._alignItems="",this._justifyContent="",this._width="",this._height=""}return t.prototype.attach=function(t){var e=t.getConfig();this._overlayRef=t,this._width&&!e.width&&t.updateSize({width:this._width}),this._height&&!e.height&&t.updateSize({height:this._height}),t.hostElement.classList.add("cdk-global-overlay-wrapper")},t.prototype.top=function(t){return void 0===t&&(t=""),this._bottomOffset="",this._topOffset=t,this._alignItems="flex-start",this},t.prototype.left=function(t){return void 0===t&&(t=""),this._rightOffset="",this._leftOffset=t,this._justifyContent="flex-start",this},t.prototype.bottom=function(t){return void 0===t&&(t=""),this._topOffset="",this._bottomOffset=t,this._alignItems="flex-end",this},t.prototype.right=function(t){return void 0===t&&(t=""),this._leftOffset="",this._rightOffset=t,this._justifyContent="flex-end",this},t.prototype.width=function(t){return void 0===t&&(t=""),this._overlayRef?this._overlayRef.updateSize({width:t}):this._width=t,this},t.prototype.height=function(t){return void 0===t&&(t=""),this._overlayRef?this._overlayRef.updateSize({height:t}):this._height=t,this},t.prototype.centerHorizontally=function(t){return void 0===t&&(t=""),this.left(t),this._justifyContent="center",this},t.prototype.centerVertically=function(t){return void 0===t&&(t=""),this.top(t),this._alignItems="center",this},t.prototype.apply=function(){if(this._overlayRef.hasAttached()){var t=this._overlayRef.overlayElement.style,e=this._overlayRef.hostElement.style,n=this._overlayRef.getConfig();t.position=this._cssPosition,t.marginLeft="100%"===n.width?"0":this._leftOffset,t.marginTop="100%"===n.height?"0":this._topOffset,t.marginBottom=this._bottomOffset,t.marginRight=this._rightOffset,"100%"===n.width?e.justifyContent="flex-start":"center"===this._justifyContent?e.justifyContent="center":"rtl"===this._overlayRef.getConfig().direction?"flex-start"===this._justifyContent?e.justifyContent="flex-end":"flex-end"===this._justifyContent&&(e.justifyContent="flex-start"):e.justifyContent=this._justifyContent,e.alignItems="100%"===n.height?"flex-start":this._alignItems}},t.prototype.dispose=function(){},t}(),Df=function(){function t(t,e,n,i){this._viewportRuler=t,this._document=e,this._platform=n,this._overlayContainer=i}return t.prototype.global=function(){return new Pf},t.prototype.connectedTo=function(t,e,n){return new Af(e,n,t,this._viewportRuler,this._document)},t.prototype.flexibleConnectedTo=function(t){return new Of(t,this._viewportRuler,this._document,this._platform,this._overlayContainer)},t.ngInjectableDef=vt({factory:function(){return new t(pe(rf),pe(tc),pe(Yd,8),pe(Ef,8))},token:t,providedIn:"root"}),t}(),jf=0,Mf=function(){function t(t,e,n,i,r,o,s,a,l){this.scrollStrategies=t,this._overlayContainer=e,this._componentFactoryResolver=n,this._positionBuilder=i,this._keyboardDispatcher=r,this._injector=o,this._ngZone=s,this._document=a,this._directionality=l}return t.prototype.create=function(t){var e=this._createHostElement(),n=this._createPaneElement(e),i=this._createPortalOutlet(n),r=new gf(t);return r.direction=r.direction||this._directionality.value,new Tf(i,e,n,r,this._ngZone,this._keyboardDispatcher,this._document)},t.prototype.position=function(){return this._positionBuilder},t.prototype._createPaneElement=function(t){var e=this._document.createElement("div");return e.id="cdk-overlay-"+jf++,e.classList.add("cdk-overlay-pane"),t.appendChild(e),e},t.prototype._createHostElement=function(){var t=this._document.createElement("div");return this._overlayContainer.getContainerElement().appendChild(t),t},t.prototype._createPortalOutlet=function(t){return this._appRef||(this._appRef=this._injector.get(Zn)),new Md(t,this._componentFactoryResolver,this._appRef,this._injector)},t}(),Rf=new yt("cdk-connected-overlay-scroll-strategy");function Ff(t){return function(){return t.scrollStrategies.reposition()}}var Nf=function(){},Lf={},Bf=function(){function t(t){this.resultSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new Vf(t,this.resultSelector))},t}(),Vf=function(t){function e(e,n){var i=t.call(this,e)||this;return i.resultSelector=n,i.active=0,i.values=[],i.observables=[],i}return r(e,t),e.prototype._next=function(t){this.values.push(Lf),this.observables.push(t)},e.prototype._complete=function(){var t=this.observables,e=t.length;if(0===e)this.destination.complete();else{this.active=e,this.toRespond=e;for(var n=0;n<e;n++){var i=t[n];this.add(U(this,i,i,n))}}},e.prototype.notifyComplete=function(t){0==(this.active-=1)&&this.destination.complete()},e.prototype.notifyNext=function(t,e,n,i,r){var o=this.values,s=this.toRespond?o[n]===Lf?--this.toRespond:this.toRespond:0;o[n]=e,0===s&&(this.resultSelector?this._tryResultSelector(o):this.destination.next(o.slice()))},e.prototype._tryResultSelector=function(t){var e;try{e=this.resultSelector.apply(this,t)}catch(t){return void this.destination.error(t)}this.destination.next(e)},e}(X);function zf(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){var n=t[t.length-1];M(n)?t.pop():n=null;var i=t.length;return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 1===t.length||2===t.length&&M(t[1])?Z(t[0]):et(1)(Eu.apply(void 0,t))}(1!==i||n?i>0?K(t,n):Su(n):ku(t[0]),e)}}var Hf,Wf=new Set,Uf=function(){function t(t){this.platform=t,this._matchMedia=this.platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):Xf}return t.prototype.matchMedia=function(t){return this.platform.WEBKIT&&function(t){if(!Wf.has(t))try{Hf||((Hf=document.createElement("style")).setAttribute("type","text/css"),document.head.appendChild(Hf)),Hf.sheet&&(Hf.sheet.insertRule("@media "+t+" {.fx-query-test{ }}",0),Wf.add(t))}catch(t){console.error(t)}}(t),this._matchMedia(t)},t.ngInjectableDef=vt({factory:function(){return new t(pe(Yd))},token:t,providedIn:"root"}),t}();function Xf(t){return{matches:"all"===t||""===t,media:t,addListener:function(){},removeListener:function(){}}}var Yf=function(){function t(t,e){this.mediaMatcher=t,this.zone=e,this._queries=new Map,this._destroySubject=new at}return t.prototype.ngOnDestroy=function(){this._destroySubject.next(),this._destroySubject.complete()},t.prototype.isMatched=function(t){var e=this;return qf(Hd(t)).some(function(t){return e._registerQuery(t).mql.matches})},t.prototype.observe=function(t){var e=this;return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=null,i=null;return M(t[t.length-1])&&(i=t.pop()),"function"==typeof t[t.length-1]&&(n=t.pop()),1===t.length&&v(t[0])&&(t=t[0]),K(t,i).lift(new Bf(n))}(qf(Hd(t)).map(function(t){return e._registerQuery(t).observable})).pipe(Y(function(t){var e={matches:!1,breakpoints:{}};return t.forEach(function(t){e.matches=e.matches||t.matches,e.breakpoints[t.query]=t.matches}),e}))},t.prototype._registerQuery=function(t){var e=this;if(this._queries.has(t))return this._queries.get(t);var n=this.mediaMatcher.matchMedia(t),i={observable:function t(e,n,i){return i?t(e,n).pipe(Y(function(t){return v(t)?i.apply(void 0,t):i(t)})):new D(function(t){var i,r=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return t.next(1===e.length?e[0]:e)};try{i=e(r)}catch(e){return void t.error(e)}if(p(n))return function(){return n(r,i)}})}(function(t){n.addListener(function(n){return e.zone.run(function(){return t(n)})})},function(t){n.removeListener(function(n){return e.zone.run(function(){return t(n)})})}).pipe(hf(this._destroySubject),zf(n),Y(function(e){return{query:t,matches:e.matches}})),mql:n};return this._queries.set(t,i),i},t.ngInjectableDef=vt({factory:function(){return new t(pe(Uf),pe(An))},token:t,providedIn:"root"}),t}();function qf(t){return t.map(function(t){return t.split(",")}).reduce(function(t,e){return t.concat(e)}).map(function(t){return t.trim()})}var Gf={XSmall:"(max-width: 599px)",Small:"(min-width: 600px) and (max-width: 959px)",Medium:"(min-width: 960px) and (max-width: 1279px)",Large:"(min-width: 1280px) and (max-width: 1919px)",XLarge:"(min-width: 1920px)",Handset:"(max-width: 599px) and (orientation: portrait), (max-width: 959px) and (orientation: landscape)",Tablet:"(min-width: 600px) and (max-width: 839px) and (orientation: portrait), (min-width: 960px) and (max-width: 1279px) and (orientation: landscape)",Web:"(min-width: 840px) and (orientation: portrait), (min-width: 1280px) and (orientation: landscape)",HandsetPortrait:"(max-width: 599px) and (orientation: portrait)",TabletPortrait:"(min-width: 600px) and (max-width: 839px) and (orientation: portrait)",WebPortrait:"(min-width: 840px) and (orientation: portrait)",HandsetLandscape:"(max-width: 959px) and (orientation: landscape)",TabletLandscape:"(min-width: 960px) and (max-width: 1279px) and (orientation: landscape)",WebLandscape:"(min-width: 1280px) and (orientation: landscape)"},Kf=function(){function t(t){var e=this;this.breakpointObserver=t,this.isMobile=!1,this.breakpointObserver.observe(Gf.Handset).subscribe(function(t){e.isMobile=t.matches})}return t.prototype.observe=function(t){return this.breakpointObserver.observe(t)},t.ngInjectableDef=vt({factory:function(){return new t(pe(Yf))},token:t,providedIn:"root"}),t}(),Zf={hasBackdrop:!0,closeOnBackdropClick:!0,panelClass:"overlay-panel"},Qf=function(){function t(t,e,n){this.overlay=t,this.breakpoints=e,this.injector=n}return t.prototype.open=function(t,e){var n=Object.assign({},Zf,e),i=this.overlay.create({positionStrategy:this.getPositionStrategy(n),hasBackdrop:n.hasBackdrop,panelClass:n.panelClass}),r=new Ld(i),o=new Pd(t,null,this.createInjector(n,r));return i.attach(o),n.closeOnBackdropClick&&i.backdropClick().subscribe(function(){return r.close()}),r},t.prototype.createInjector=function(t,e){var n=new WeakMap;return n.set(Ld,e),n.set(Bd,t.data||null),new Nd(this.injector,n)},t.prototype.getPositionStrategy=function(t){return t.positionStrategy?t.positionStrategy:"global"===t.origin?this.getGlobalPositionStrategy(t):this.getConnectedPositionStrategy(t)},t.prototype.getGlobalPositionStrategy=function(t){var e=this.getPositionOption(t);if("center"===e)return this.overlay.position().global().centerHorizontally().centerVertically();var n=this.overlay.position().global();return Object.keys(e).forEach(function(t){n[t](e[t])}),n},t.prototype.getConnectedPositionStrategy=function(t){return this.overlay.position().flexibleConnectedTo(t.origin).withPositions(this.getPositionOption(t))},t.prototype.getPositionOption=function(t){return t.mobilePosition&&this.breakpoints.isMobile?t.mobilePosition:t.position},t.ngInjectableDef=vt({factory:function(){return new t(pe(Mf),pe(Kf),pe(Gt))},token:t,providedIn:"root"}),t}(),Jf=function(){function t(t,e,n,i){this.canvasState=t,this.config=e,this.overlayPanel=n,this.editorUi=i}return t.prototype.open=function(){if(this.shouldShowOpenImageDialog()){var t=this.overlayPanel.overlay.position().flexibleConnectedTo(new ei(this.canvasState.wrapperEl)).withPositions([{overlayX:"center",overlayY:"center",originX:"center",originY:"center"}]);this.sampleImagePanelRef=this.overlayPanel.open(gd,{hasBackdrop:!0,closeOnBackdropClick:!1,positionStrategy:t,panelClass:"floating-panel"})}},t.prototype.reposition=function(){this.sampleImagePanelRef&&this.sampleImagePanelRef.updatePosition()},t.prototype.shouldShowOpenImageDialog=function(){return this.editorUi.isVisible()&&this.canvasState.isEmpty()&&this.config.get("pixie.ui.openImageDialog.show")&&!this.sampleImagePanelRef},t.ngInjectableDef=vt({factory:function(){return new t(pe(Od),pe(wu),pe(Qf),pe(Fc))},token:t,providedIn:"root"}),t}(),$f=function(){function t(t,e){this.config=t,this.editorUI=e,this.breadcrumbs=["navigation"],this.onClose$=new at}return t.prototype.openPanel=function(t){var e=this;Array.isArray(t)||(t=[t]),t.forEach(function(t){e.breadcrumbs.indexOf(t)>-1||e.breadcrumbs.push(t)})},t.prototype.togglePanel=function(t){this.panelIsVisible(t)?this.closePanel(t):(this.closeAllPanels(),this.openPanel(t))},t.prototype.closePanel=function(t){var e=this.breadcrumbs.indexOf(t);this.breadcrumbs.splice(e,1),this.onClose$.next()},t.prototype.closeCurrentPanel=function(){this.breadcrumbs.length<2||this.closePanel(this.breadcrumbs[this.breadcrumbs.length-1])},t.prototype.closeAllPanels=function(){this.breadcrumbs=["navigation"],this.onClose$.next()},t.prototype.panelIsVisible=function(t){return this.breadcrumbs[this.breadcrumbs.length-1]===t},t.prototype.panelIsOpen=function(t){return this.breadcrumbs.indexOf(t)>-1},t.prototype.openObjectDrawer=function(t){switch(t){case"shape":case"sticker":this.closeAllPanels(),this.openPanel(["objectSettings"]);break;case"text":this.closeAllPanels(),this.openPanel(["text"]);break;case"drawing":this.closeAllPanels(),this.openPanel(["draw"])}},t.prototype.getIconName=function(t){var e=this.editorUI.getNavItems().find(function(e){return e.name===t}),n=t.replace(/([A-Z])/g,"-$1").toLowerCase();return e?e.icon:n+"-custom"},t}(),tg=function(){function t(t,e,n,i,r,o){var s=this;this.canvas=t,this.activeObject=e,this.objects=n,this.frameTool=i,this.googleFonts=r,this.textTool=o,this.items=[],this.pointer=0,this.canvas.state.loaded.subscribe(function(){s.canvas.state.isEmpty()||s.addInitial()})}return t.prototype.canUndo=function(){return this.pointer-1>-1},t.prototype.canRedo=function(){return this.items.length>this.pointer+1},t.prototype.undo=function(){this.canUndo()&&this.load(this.items[this.pointer-1])},t.prototype.redo=function(){this.canRedo()&&this.load(this.items[this.pointer+1])},t.prototype.reload=function(){this.load(this.items[this.pointer])},t.prototype.replaceCurrent=function(){var t=this.items[this.pointer];t&&(this.items[this.pointer]=this.createHistoryItem(t.name,t.icon))},t.prototype.add=function(t,e,n){void 0===n&&(n=!0);var i=this.items.push(this.createHistoryItem(t,e));n&&(this.pointer=i-1)},t.prototype.addFromJson=function(t){var e=this.items.length?"loaded: state":"initial",n=this.createHistoryItem(e,"initial"===e?"home":"history",JSON.parse(t)),i=this.items.push(n);return this.pointer=i-1,this.load(n)},t.prototype.getAllItems=function(){return this.items},t.prototype.isEmpty=function(){return!this.items.length},t.prototype.get=function(t){return this.items.find(function(e){return e.name===t})},t.prototype.getPointer=function(){return this.pointer},t.prototype.getCurrentCanvasState=function(){return{canvas:this.canvas.fabric().toJSON(["selectable","name","data"]),editor:{frame:this.frameTool.getActive(),fonts:this.textTool.getUsedFonts()},canvasWidth:this.canvas.state.original.width,canvasHeight:this.canvas.state.original.height}},t.prototype.clear=function(){this.items=[],this.pointer=0},t.prototype.addInitial=function(){this.items.length||(this.add("Initial","home",!1),this.pointer=0)},t.prototype.load=function(t){var e=this;return new Promise(function(n){"string"==typeof t&&(t=e.get(t));var i=t;e.pointer=e.items.findIndex(function(e){return e===t}),i.editor.fonts.length&&e.googleFonts.loadIntoDom(i.editor.fonts).then(function(){e.canvas.fabric().getObjects("i-text").forEach(function(t){t.set({dirty:!0})}),e.canvas.render()}),e.canvas.fabric().loadFromJSON(i.canvas,function(){i.editor.frame?e.frameTool.add(i.editor.frame.name):e.frameTool.remove(),e.canvas.zoom.set(1),i.canvasWidth&&i.canvasHeight&&e.canvas.resize(i.canvasWidth,i.canvasHeight),e.canvas.render(),e.canvas.fabric().calcOffset(),e.canvas.state.loading=!1,e.canvas.zoom.fitToScreen(),e.objects.syncObjects(),n()},function(t){t.hasOwnProperty("applyFilters")&&t.applyFilters()})})},t.prototype.createHistoryItem=function(t,e,n){return void 0===e&&(e=null),n||(n=this.getCurrentCanvasState()),Object.assign(n,{name:t,index:this.items.length,icon:e,zoom:this.canvas.zoom.get(),activeObjectId:this.activeObject.getId()})},t}();function eg(t){return/(?:\.([^.]+))?$/.exec(t)[1]}var ng,ig=function(){function t(t,e){this.url=null,this.name=t.name,this.size=t.size,this.mime=function(t){var e={md:"text/markdown",markdown:"text/markdown",mp4:"video/mp4",mp3:"audio/mp3",svg:"image/svg+xml",jpg:"image/jpeg",png:"image/png",gif:"image/gif",yaml:"text/yaml",yml:"text/yaml"},n=t.name?eg(t.name):null;return t.type?t.type:n&&e[n]?e[n]:null}(t),this.extension=eg(t.name),this.native=t,this.path=e||t.webkitRelativePath||null}return t.prototype.getData=function(){var t=this;return new Promise(function(e){var n=new FileReader;n.addEventListener("load",function(){e(n.result)}),"json"===t.extension?n.readAsText(t.native):n.readAsDataURL(t.native)})},t}();function rg(t){return void 0===t&&(t={}),new Promise(function(e){var n=function(t){void 0===t&&(t={});var e=document.querySelector("#hidden-file-upload-input");e&&e.remove();var n=document.createElement("input");n.type="file",n.multiple=t.multiple,n.classList.add("hidden"),n.id="hidden-file-upload-input";var i=[];return t.extensions&&i.push(t.extensions.join(",")),t.types&&i.push(t.types.join("|")),i.length&&(n.accept=i.join("|")),t.directory&&(n.webkitdirectory=!0),document.body.appendChild(n),n}(t);n.onchange=function(t){var i=Array.from(t.target.files).map(function(t){return new ig(t)});e(i),n.remove()},document.body.appendChild(n),n.click()})}!function(t){t.image="image/*",t.audio="audio/*",t.video="video/*"}(ng||(ng={}));var og=function(){function t(t,e,n,i,r,o,s){this.history=t,this.canvas=e,this.toast=n,this.config=i,this.frame=r,this.cropzone=o,this.validator=s}return t.prototype.openUploadDialog=function(t){var e=this;void 0===t&&(t={type:"image"});var n=this.getUploadAcceptString(t.type);return new Promise(function(i){rg({extensions:n}).then(function(n){e.validateAndGetData(n[0]).then(function(r){e.executeOnFileOpenCallback(n[0]),t.backgroundImage&&"json"!==r.extension?e.openBackgroundImage(r.data).then(function(t){return i(t)}):e.openFile(r.data,r.extension).then(function(t){return i(t)})},function(){})})})},t.prototype.importAndGetData=function(){var t=this;return new Promise(function(e){rg({types:[ng.image]}).then(function(n){t.validateAndGetData(n[0]).then(function(t){return e(t.data)})})})},t.prototype.validateAndGetData=function(t){var e=this,n=this.validator.validate(t),i=t.extension;return new Promise(function(r,o){if(n.failed)return o();e.readFile(t,i).then(function(t){return r({data:t,extension:i})})})},t.prototype.openStateFile=function(t){var e=this;return this.resetEditor().then(function(){return e.history.addFromJson(t)})},t.prototype.resetEditor=function(){return this.canvas.fabric().clear(),this.frame.remove(),this.cropzone.remove(),this.history.clear(),this.config.merge({pixie:{image:null,blankCanvasSize:null}}),new Promise(function(t){return setTimeout(function(){return t()})})},t.prototype.openFile=function(t,e){return void 0===e&&(e="png"),t instanceof HTMLImageElement&&(t=t.src),"json"===e?this.openStateFile(t):this.canvas.openImage(t)},t.prototype.openBackgroundImage=function(t){return t instanceof HTMLImageElement&&(t=t.src),this.canvas.getMainImage()?this.canvas.changeMainImage(t):this.canvas.loadMainImage(t)},t.prototype.readFile=function(t,e){var n=new FileReader;return new Promise(function(i){n.addEventListener("load",function(){i(n.result)}),"json"===e?n.readAsText(t.native):n.readAsDataURL(t.native)})},t.prototype.getUploadAcceptString=function(t){switch(void 0===t&&(t="all"),t){case"image":return["image/*"];case"state":return[".json","application/json"];case"all":default:return["image/*",".json","application/json"]}},t.prototype.executeOnFileOpenCallback=function(t){var e=this.config.get("pixie.onFileOpen");e&&e(t)},t}(),sg=function(){function t(t,e){this.el=t,this.editorUi=e}return Object.defineProperty(t.prototype,"animate",{get:function(){return this.editorUi.isVisible()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"darkTheme",{get:function(){return"dark"===this.editorUi.getTheme()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"lightTheme",{get:function(){return"light"===this.editorUi.getTheme()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"overlayMode",{get:function(){return"overlay"===this.editorUi.getMode()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"inlineMode",{get:function(){return"inline"===this.editorUi.getMode()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){return this.editorUi.getWidth()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.editorUi.getHeight()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"compact",{get:function(){return this.editorUi.isCompact()},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){this.editorUi.init({root:this.el,overlay:this.overlay})},t}(),ag=n("NlKi"),lg=["Uncaught (in promise): [object Object]","Uncaught (in promise): [object Undefined]","[object Object]",'{"isTrusted"\n true}','The animation trigger "transform" has failed to build due to the following errors',"Cannot call method 'split' of undefined","Cannot call method 'trim' of undefined","undefined is not a function","has no method 'closest'","Object doesn't support property or method 'closest'","Object doesn't support property or method 'setPrototypeOf'","requestAnimationFrame is not defined","Object [object DOMWindow] has no method 'cancelAnimationFrame'","'block' member of ScrollIntoViewOptions 'center' is not a valid value for enumeration ScrollLogicalPosition."],ug=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),cg=function(t){function e(e){var n=t.call(this)||this;return n.settings=e,n.installed=!1,n}return ug(e,t),e.prototype.handleError=function(e,n){e&&(t.prototype.handleError.call(this,e),this.installSentry()&&ag.captureException(e.originalError||e,n))},e.prototype.installSentry=function(){return!!this.installed||!!this.settings.has("logging.sentry_public")&&(ag.config(this.settings.get("logging.sentry_public"),{release:this.settings.get("version"),ignoreErrors:lg}).install(),this.installed=!0)},e}(xe),hg=function(t){return new cg(t)},pg=function(){function t(t){this.injector=t}return t.prototype.ngDoBootstrap=function(t){var e=this.injector.get(lu).selector;t.bootstrap(sg,e)},t}(),dg=function(){var t={HEX:0,RGBA:1,HSLA:2};return t[t.HEX]="HEX",t[t.RGBA]="RGBA",t[t.HSLA]="HSLA",t}(),fg=function(t,e,n,i){this.c=t,this.m=e,this.y=n,this.k=i},gg=function(t,e,n,i){this.h=t,this.s=e,this.l=n,this.a=i},mg=function(t,e,n,i){this.h=t,this.s=e,this.v=n,this.a=i},vg=function(t,e,n,i){this.r=t,this.g=e,this.b=n,this.a=i},yg=function(){function t(){this.newValue=new In}return t.prototype.inputChange=function(t){var e=t.target.value;if(void 0===this.rg)this.newValue.emit(e);else{var n=parseFloat(e);!isNaN(n)&&n>=0&&n<=this.rg&&this.newValue.emit({v:n,rg:this.rg})}},t}(),bg=function(){function t(t){var e=this;this.elRef=t,this.dragEnd=new In,this.dragStart=new In,this.newValue=new In,this.listenerMove=function(t){return e.move(t)},this.listenerStop=function(){return e.stop()}}return t.prototype.mouseDown=function(t){this.start(t)},t.prototype.touchStart=function(t){this.start(t)},t.prototype.move=function(t){t.preventDefault(),this.setCursor(t)},t.prototype.start=function(t){this.setCursor(t),document.addEventListener("mouseup",this.listenerStop),document.addEventListener("touchend",this.listenerStop),document.addEventListener("mousemove",this.listenerMove),document.addEventListener("touchmove",this.listenerMove),this.dragStart.emit()},t.prototype.stop=function(){document.removeEventListener("mouseup",this.listenerStop),document.removeEventListener("touchend",this.listenerStop),document.removeEventListener("mousemove",this.listenerMove),document.removeEventListener("touchmove",this.listenerMove),this.dragEnd.emit()},t.prototype.getX=function(t){var e=this.elRef.nativeElement.getBoundingClientRect();return(void 0!==t.pageX?t.pageX:t.touches[0].pageX)-e.left-window.pageXOffset},t.prototype.getY=function(t){var e=this.elRef.nativeElement.getBoundingClientRect();return(void 0!==t.pageY?t.pageY:t.touches[0].pageY)-e.top-window.pageYOffset},t.prototype.setCursor=function(t){var e=this.elRef.nativeElement.offsetWidth,n=this.elRef.nativeElement.offsetHeight,i=Math.max(0,Math.min(this.getX(t),e)),r=Math.max(0,Math.min(this.getY(t),n));void 0!==this.rgX&&void 0!==this.rgY?this.newValue.emit({s:i/e,v:1-r/n,rgX:this.rgX,rgY:this.rgY}):void 0===this.rgX&&void 0!==this.rgY?this.newValue.emit({v:r/n,rgY:this.rgY}):void 0!==this.rgX&&void 0===this.rgY&&this.newValue.emit({v:i/e,rgX:this.rgX})},t}(),_g=function(t,e,n,i){this.h=t,this.s=e,this.v=n,this.a=i},wg=function(t,e,n,i){this.h=t,this.s=e,this.v=n,this.a=i},xg=function(){function t(){this.active=null}return t.prototype.setActive=function(t){this.active&&this.active!==t&&"inline"!==this.active.cpDialogDisplay&&this.active.closeDialog(),this.active=t},t.prototype.hsva2hsla=function(t){var e=t.h,n=t.s,i=t.v,r=t.a;if(0===i)return new gg(e,0,0,r);if(0===n&&1===i)return new gg(e,1,1,r);var o=i*(2-n)/2;return new gg(e,i*n/(1-Math.abs(2*o-1)),o,r)},t.prototype.hsla2hsva=function(t){var e=Math.min(t.h,1),n=Math.min(t.s,1),i=Math.min(t.l,1),r=Math.min(t.a,1);if(0===i)return new mg(e,0,0,r);var o=i+n*(1-Math.abs(2*i-1))/2;return new mg(e,2*(o-i)/o,o,r)},t.prototype.hsvaToRgba=function(t){var e,n,i,r=t.h,o=t.s,s=t.v,a=t.a,l=Math.floor(6*r),u=6*r-l,c=s*(1-o),h=s*(1-u*o),p=s*(1-(1-u)*o);switch(l%6){case 0:e=s,n=p,i=c;break;case 1:e=h,n=s,i=c;break;case 2:e=c,n=s,i=p;break;case 3:e=c,n=h,i=s;break;case 4:e=p,n=c,i=s;break;case 5:e=s,n=c,i=h;break;default:e=0,n=0,i=0}return new vg(e,n,i,a)},t.prototype.rgbaToCmyk=function(t){var e=1-Math.max(t.r,t.g,t.b);return 1===e?new fg(0,0,0,1):new fg((1-t.r-e)/(1-e),(1-t.g-e)/(1-e),(1-t.b-e)/(1-e),e)},t.prototype.rgbaToHsva=function(t){var e,n,i=Math.min(t.r,1),r=Math.min(t.g,1),o=Math.min(t.b,1),s=Math.min(t.a,1),a=Math.max(i,r,o),l=Math.min(i,r,o),u=a,c=a-l;if(n=0===a?0:c/a,a===l)e=0;else{switch(a){case i:e=(r-o)/c+(r<o?6:0);break;case r:e=(o-i)/c+2;break;case o:e=(i-r)/c+4;break;default:e=0}e/=6}return new mg(e,n,u,s)},t.prototype.rgbaToHex=function(t,e){var n="#"+(1<<24|t.r<<16|t.g<<8|t.b).toString(16).substr(1);return e&&(n+=(256|Math.round(255*t.a)).toString(16).substr(1)),n},t.prototype.denormalizeRGBA=function(t){return new vg(Math.round(255*t.r),Math.round(255*t.g),Math.round(255*t.b),t.a)},t.prototype.stringToHsva=function(t,e){void 0===t&&(t=""),void 0===e&&(e=!1);var n=null;t=(t||"").toLowerCase();var i=[{re:/(rgb)a?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*%?,\s*(\d{1,3})\s*%?(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,parse:function(t){return new vg(parseInt(t[2],10)/255,parseInt(t[3],10)/255,parseInt(t[4],10)/255,isNaN(parseFloat(t[5]))?1:parseFloat(t[5]))}},{re:/(hsl)a?\(\s*(\d{1,3})\s*,\s*(\d{1,3})%\s*,\s*(\d{1,3})%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,parse:function(t){return new gg(parseInt(t[2],10)/360,parseInt(t[3],10)/100,parseInt(t[4],10)/100,isNaN(parseFloat(t[5]))?1:parseFloat(t[5]))}}];for(var r in i.push(e?{re:/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})?$/,parse:function(t){return new vg(parseInt(t[1],16)/255,parseInt(t[2],16)/255,parseInt(t[3],16)/255,parseInt(t[4]||"FF",16)/255)}}:{re:/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})$/,parse:function(t){return new vg(parseInt(t[1],16)/255,parseInt(t[2],16)/255,parseInt(t[3],16)/255,1)}}),i.push({re:/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])$/,parse:function(t){return new vg(parseInt(t[1]+t[1],16)/255,parseInt(t[2]+t[2],16)/255,parseInt(t[3]+t[3],16)/255,1)}}),i)if(i.hasOwnProperty(r)){var o=i[r],s=o.re.exec(t),a=s&&o.parse(s);if(a)return a instanceof vg?n=this.rgbaToHsva(a):a instanceof gg&&(n=this.hsla2hsva(a)),n}return n},t.prototype.outputFormat=function(t,e,n){switch(e){case"hsla":var i=this.hsva2hsla(t),r=new gg(Math.round(360*i.h),Math.round(100*i.s),Math.round(100*i.l),Math.round(100*i.a)/100);return t.a<1||"always"===n?"hsla("+r.h+","+r.s+"%,"+r.l+"%,"+r.a+")":"hsl("+r.h+","+r.s+"%,"+r.l+"%)";case"rgba":var o=this.denormalizeRGBA(this.hsvaToRgba(t));return t.a<1||"always"===n?"rgba("+o.r+","+o.g+","+o.b+","+Math.round(100*o.a)/100+")":"rgb("+o.r+","+o.g+","+o.b+")";default:var s="always"===n||"forced"===n;return this.rgbaToHex(this.denormalizeRGBA(this.hsvaToRgba(t)),s)}},t}(),Cg=function(){function t(t,e,n){this.elRef=t,this.cdRef=e,this.service=n,this.isIE10=!1,this.dialogArrowSize=10,this.dialogArrowOffset=15,this.dialogInputFields=[dg.HEX,dg.RGBA,dg.HSLA],this.useRootViewContainer=!1}return t.prototype.handleEsc=function(t){this.show&&"popup"===this.cpDialogDisplay&&this.onCancelColor(t)},t.prototype.handleEnter=function(t){this.show&&"popup"===this.cpDialogDisplay&&this.onAcceptColor(t)},t.prototype.ngOnInit=function(){var t=this;this.slider=new _g(0,0,0,0),this.sliderDimMax=new wg(this.hueSlider.nativeElement.offsetWidth||140,this.cpWidth,130,this.alphaSlider.nativeElement.offsetWidth||140),this.format="rgba"===this.cpOutputFormat?dg.RGBA:"hsla"===this.cpOutputFormat?dg.HSLA:dg.HEX,"auto"===this.cpOutputFormat&&(this.cpOutputFormat="disabled"!==this.cpAlphaChannel?"rgba":"hex"),this.listenerMouseDown=function(e){t.onMouseDown(e)},this.listenerResize=function(){t.onResize()},this.openDialog(this.initialColor,!1)},t.prototype.ngOnDestroy=function(){this.closeDialog()},t.prototype.ngAfterViewInit=function(){230!==this.cpWidth&&(this.sliderDimMax=new wg(this.hueSlider.nativeElement.offsetWidth||140,this.cpWidth,130,this.alphaSlider.nativeElement.offsetWidth||140),this.updateColorPicker(!1),this.cdRef.detectChanges())},t.prototype.openDialog=function(t,e){void 0===e&&(e=!0),this.service.setActive(this),this.width||(this.cpWidth=this.directiveElementRef.nativeElement.offsetWidth),this.height||(this.height=320),this.setInitialColor(t),this.setColorFromString(t,e),this.openColorPicker()},t.prototype.closeDialog=function(){this.closeColorPicker()},t.prototype.setupDialog=function(t,e,n,i,r,o,s,a,l,u,c,h,p,d,f,g,m,v,y,b,_,w,x,C,S,k,E,T,O,I,A){this.setInitialColor(n),this.isIE10=10===function(){var t="";"undefined"!=typeof navigator&&(t=navigator.userAgent.toLowerCase());var e=t.indexOf("msie ");return e>0&&parseInt(t.substring(e+5,t.indexOf(".",e)),10)}(),this.directiveInstance=t,this.directiveElementRef=e,this.cpDisableInput=u,this.cpAlphaChannel=a,this.cpOutputFormat=l,this.cpDialogDisplay=o,this.cpIgnoredElements=c,this.cpSaveClickOutside=h,this.useRootViewContainer=p,this.width=this.cpWidth=parseInt(i,10),this.height=this.cpHeight=parseInt(r,10),this.cpPosition=d,this.cpPositionOffset=parseInt(f,10),this.cpOKButton=w,this.cpOKButtonText=C,this.cpOKButtonClass=x,this.cpCancelButton=S,this.cpCancelButtonText=E,this.cpCancelButtonClass=k,this.fallbackColor=s||"#fff",this.setPresetConfig(m,v),this.cpMaxPresetColorsLength=y,this.cpPresetEmptyMessage=b,this.cpPresetEmptyMessageClass=_,this.cpAddColorButton=T,this.cpAddColorButtonText=I,this.cpAddColorButtonClass=O,this.cpRemoveColorButtonClass=A,g||(this.dialogArrowOffset=0),"inline"===o&&(this.dialogArrowSize=0,this.dialogArrowOffset=0),"hex"===l&&"always"!==a&&"forced"!==a&&(this.cpAlphaChannel="disabled")},t.prototype.setInitialColor=function(t){this.initialColor=t},t.prototype.setPresetConfig=function(t,e){this.cpPresetLabel=t,this.cpPresetColors=e},t.prototype.setColorFromString=function(t,e,n){var i;void 0===e&&(e=!0),void 0===n&&(n=!0),("always"===this.cpAlphaChannel||"forced"===this.cpAlphaChannel)&&((i=this.service.stringToHsva(t,!0))||this.hsva)||(i=this.service.stringToHsva(t,!1)),i||this.hsva||(i=this.service.stringToHsva(this.fallbackColor,!1)),i&&(this.hsva=i,this.sliderH=this.hsva.h,this.updateColorPicker(e,n))},t.prototype.onResize=function(){"fixed"===this.position?this.setDialogPosition():"inline"!==this.cpDialogDisplay&&this.closeColorPicker()},t.prototype.onDragEnd=function(t){this.directiveInstance.sliderDragEnd({slider:t,color:this.outputColor})},t.prototype.onDragStart=function(t){this.directiveInstance.sliderDragStart({slider:t,color:this.outputColor})},t.prototype.onMouseDown=function(t){this.isIE10||"popup"!==this.cpDialogDisplay||t.target===this.directiveElementRef.nativeElement||this.isDescendant(this.elRef.nativeElement,t.target)||this.isDescendant(this.directiveElementRef.nativeElement,t.target)||0!==this.cpIgnoredElements.filter(function(e){return e===t.target}).length||(this.cpSaveClickOutside||(this.setColorFromString(this.initialColor,!1),this.directiveInstance.colorChanged(this.initialColor)),this.closeColorPicker())},t.prototype.onAcceptColor=function(t){t.stopPropagation(),"popup"===this.cpDialogDisplay&&this.closeColorPicker(),this.outputColor&&this.directiveInstance.colorSelected(this.outputColor)},t.prototype.onCancelColor=function(t){t.stopPropagation(),this.setColorFromString(this.initialColor,!0),"popup"===this.cpDialogDisplay&&(this.directiveInstance.colorChanged(this.initialColor,!0),this.closeColorPicker()),this.directiveInstance.colorCanceled()},t.prototype.onFormatToggle=function(){var t=(this.dialogInputFields.indexOf(this.format)+1)%this.dialogInputFields.length;this.format=this.dialogInputFields[t]},t.prototype.onColorChange=function(t){this.hsva.s=t.s/t.rgX,this.hsva.v=t.v/t.rgY,this.updateColorPicker(),this.directiveInstance.sliderChanged({slider:"lightness",value:this.hsva.v,color:this.outputColor}),this.directiveInstance.sliderChanged({slider:"saturation",value:this.hsva.s,color:this.outputColor})},t.prototype.onHueChange=function(t){this.hsva.h=t.v/t.rgX,this.sliderH=this.hsva.h,this.updateColorPicker(),this.directiveInstance.sliderChanged({slider:"hue",value:this.hsva.h,color:this.outputColor})},t.prototype.onAlphaChange=function(t){this.hsva.a=t.v/t.rgX,this.updateColorPicker(),this.directiveInstance.sliderChanged({slider:"alpha",value:this.hsva.a,color:this.outputColor})},t.prototype.onHexInput=function(t){if(null===t)this.updateColorPicker();else{t&&"#"!==t[0]&&(t="#"+t);var e=/^#([a-f0-9]{3}|[a-f0-9]{6})$/gi;"always"===this.cpAlphaChannel&&(e=/^#([a-f0-9]{3}|[a-f0-9]{6}|[a-f0-9]{8})$/gi),e.test(t)&&(t.length<5&&(t="#"+t.substring(1).split("").map(function(t){return t+t}).join("")),"forced"===this.cpAlphaChannel&&(t+=Math.round(255*this.hsva.a).toString(16)),this.setColorFromString(t,!0,!1),this.directiveInstance.inputChanged({input:"hex",value:t,color:this.outputColor}))}},t.prototype.onRedInput=function(t){var e=this.service.hsvaToRgba(this.hsva);e.r=t.v/t.rg,this.hsva=this.service.rgbaToHsva(e),this.sliderH=this.hsva.h,this.updateColorPicker(),this.directiveInstance.inputChanged({input:"red",value:e.r,color:this.outputColor})},t.prototype.onBlueInput=function(t){var e=this.service.hsvaToRgba(this.hsva);e.b=t.v/t.rg,this.hsva=this.service.rgbaToHsva(e),this.sliderH=this.hsva.h,this.updateColorPicker(),this.directiveInstance.inputChanged({input:"blue",value:e.b,color:this.outputColor})},t.prototype.onGreenInput=function(t){var e=this.service.hsvaToRgba(this.hsva);e.g=t.v/t.rg,this.hsva=this.service.rgbaToHsva(e),this.sliderH=this.hsva.h,this.updateColorPicker(),this.directiveInstance.inputChanged({input:"green",value:e.g,color:this.outputColor})},t.prototype.onAlphaInput=function(t){this.hsva.a=t.v/t.rg,this.updateColorPicker(),this.directiveInstance.inputChanged({input:"alpha",value:this.hsva.a,color:this.outputColor})},t.prototype.onHueInput=function(t){this.hsva.h=t.v/t.rg,this.sliderH=this.hsva.h,this.updateColorPicker(),this.directiveInstance.inputChanged({input:"hue",value:this.hsva.h,color:this.outputColor})},t.prototype.onLightnessInput=function(t){var e=this.service.hsva2hsla(this.hsva);e.l=t.v/t.rg,this.hsva=this.service.hsla2hsva(e),this.sliderH=this.hsva.h,this.updateColorPicker(),this.directiveInstance.inputChanged({input:"lightness",value:e.l,color:this.outputColor})},t.prototype.onSaturationInput=function(t){var e=this.service.hsva2hsla(this.hsva);e.s=t.v/t.rg,this.hsva=this.service.hsla2hsva(e),this.sliderH=this.hsva.h,this.updateColorPicker(),this.directiveInstance.inputChanged({input:"saturation",value:e.s,color:this.outputColor})},t.prototype.onAddPresetColor=function(t,e){t.stopPropagation(),this.cpPresetColors.filter(function(t){return t===e}).length||(this.cpPresetColors=this.cpPresetColors.concat(e),this.directiveInstance.presetColorsChanged(this.cpPresetColors))},t.prototype.onRemovePresetColor=function(t,e){t.stopPropagation(),this.cpPresetColors=this.cpPresetColors.filter(function(t){return t!==e}),this.directiveInstance.presetColorsChanged(this.cpPresetColors)},t.prototype.openColorPicker=function(){var t=this;this.show||(this.show=!0,this.hidden=!0,setTimeout(function(){t.hidden=!1,t.setDialogPosition(),t.cdRef.detectChanges()},0),this.directiveInstance.stateChanged(!0),this.isIE10||document.addEventListener("mousedown",this.listenerMouseDown),window.addEventListener("resize",this.listenerResize))},t.prototype.closeColorPicker=function(){this.show&&(this.show=!1,this.directiveInstance.stateChanged(!1),this.isIE10||document.removeEventListener("mousedown",this.listenerMouseDown),window.removeEventListener("resize",this.listenerResize),this.cdRef.destroyed||this.cdRef.detectChanges())},t.prototype.updateColorPicker=function(t,e){if(void 0===t&&(t=!0),void 0===e&&(e=!0),this.sliderDimMax){var n=this.outputColor,i=this.service.hsva2hsla(this.hsva),r=this.service.denormalizeRGBA(this.service.hsvaToRgba(this.hsva)),o=this.service.denormalizeRGBA(this.service.hsvaToRgba(new mg(this.sliderH||this.hsva.h,1,1,1)));e&&(this.hslaText=new gg(Math.round(360*i.h),Math.round(100*i.s),Math.round(100*i.l),Math.round(100*i.a)/100),this.rgbaText=new vg(r.r,r.g,r.b,Math.round(100*r.a)/100),this.hexText=this.service.rgbaToHex(r,"always"===this.cpAlphaChannel),this.hexAlpha=this.rgbaText.a),this.hueSliderColor="rgb("+o.r+","+o.g+","+o.b+")",this.alphaSliderColor="rgb("+r.r+","+r.g+","+r.b+")",this.outputColor=this.service.outputFormat(this.hsva,this.cpOutputFormat,this.cpAlphaChannel),this.selectedColor=this.service.outputFormat(this.hsva,"rgba",null),this.slider=new _g((this.sliderH||this.hsva.h)*this.sliderDimMax.h-8,this.hsva.s*this.sliderDimMax.s-8,(1-this.hsva.v)*this.sliderDimMax.v-8,this.hsva.a*this.sliderDimMax.a-8),t&&n!==this.outputColor&&this.directiveInstance.colorChanged(this.outputColor)}},t.prototype.setDialogPosition=function(){if("inline"===this.cpDialogDisplay)this.position="relative";else{for(var t="static",e="",n=void 0,i=null,r=null,o=this.directiveElementRef.nativeElement.parentNode,s=this.dialogElement.nativeElement.offsetHeight;null!==o&&"HTML"!==o.tagName;){if(t=(n=window.getComputedStyle(o)).getPropertyValue("position"),e=n.getPropertyValue("transform"),"static"!==t&&null===i&&(i=o),e&&"none"!==e&&null===r&&(r=o),"fixed"===t){i=r;break}o=o.parentNode}var a=this.createDialogBox(this.directiveElementRef.nativeElement,"fixed"!==t);if(this.useRootViewContainer||"fixed"===t&&(!i||i instanceof HTMLUnknownElement))this.top=a.top,this.left=a.left;else{null===i&&(i=o);var l=this.createDialogBox(i,"fixed"!==t);this.top=a.top-l.top,this.left=a.left-l.left}"fixed"===t&&(this.position="fixed"),"left"===this.cpPosition?(this.top+=a.height*this.cpPositionOffset/100-this.dialogArrowOffset,this.left-=this.cpWidth+this.dialogArrowSize-2):"top"===this.cpPosition?(this.arrowTop=s-1,this.top-=s+this.dialogArrowSize,this.left+=this.cpPositionOffset/100*a.width-this.dialogArrowOffset):"bottom"===this.cpPosition?(this.top+=a.height+this.dialogArrowSize,this.left+=this.cpPositionOffset/100*a.width-this.dialogArrowOffset):(this.top+=a.height*this.cpPositionOffset/100-this.dialogArrowOffset,this.left+=a.width+this.dialogArrowSize-2)}},t.prototype.isDescendant=function(t,e){for(var n=e.parentNode;null!==n;){if(n===t)return!0;n=n.parentNode}return!1},t.prototype.createDialogBox=function(t,e){return{top:t.getBoundingClientRect().top+(e?window.pageYOffset:0),left:t.getBoundingClientRect().left+(e?window.pageXOffset:0),width:t.offsetWidth,height:t.offsetHeight}},t}(),Sg=function(){function t(t,e,n,i,r,o){this.injector=t,this.cfr=e,this.appRef=n,this.vcRef=i,this.elRef=r,this._service=o,this.dialogCreated=!1,this.ignoreChanges=!1,this.cpWidth="230px",this.cpHeight="auto",this.cpToggle=!1,this.cpDisabled=!1,this.cpIgnoredElements=[],this.cpDisableInput=!1,this.cpOutputFormat="auto",this.cpAlphaChannel="enabled",this.cpFallbackColor="#fff",this.cpDialogDisplay="popup",this.cpSaveClickOutside=!0,this.cpUseRootViewContainer=!1,this.cpPosition="right",this.cpPositionOffset="0%",this.cpPositionRelativeToArrow=!1,this.cpOKButton=!1,this.cpOKButtonText="OK",this.cpOKButtonClass="cp-ok-button-class",this.cpCancelButton=!1,this.cpCancelButtonText="Cancel",this.cpCancelButtonClass="cp-cancel-button-class",this.cpPresetLabel="Preset colors",this.cpMaxPresetColorsLength=6,this.cpPresetEmptyMessage="No colors added",this.cpPresetEmptyMessageClass="preset-empty-message",this.cpAddColorButton=!1,this.cpAddColorButtonText="Add color",this.cpAddColorButtonClass="cp-add-color-button-class",this.cpRemoveColorButtonClass="cp-remove-color-button-class",this.cpInputChange=new In(!0),this.cpToggleChange=new In(!0),this.cpSliderChange=new In(!0),this.cpSliderDragEnd=new In(!0),this.cpSliderDragStart=new In(!0),this.colorPickerOpen=new In(!0),this.colorPickerClose=new In(!0),this.colorPickerCancel=new In(!0),this.colorPickerSelect=new In(!0),this.colorPickerChange=new In(!1),this.cpPresetColorsChange=new In(!0)}return t.prototype.handleClick=function(t){this.inputFocus(t)},t.prototype.handleFocus=function(t){this.inputFocus(t)},t.prototype.handleInput=function(t){this.inputChange(t)},t.prototype.ngOnDestroy=function(){void 0!==this.cmpRef&&this.cmpRef.destroy()},t.prototype.ngOnChanges=function(t){t.cpToggle&&!this.cpDisabled&&(t.cpToggle.currentValue?this.openDialog():t.cpToggle.currentValue||this.closeDialog()),t.colorPicker&&(this.dialog&&!this.ignoreChanges&&("inline"===this.cpDialogDisplay&&this.dialog.setInitialColor(t.colorPicker.currentValue),this.dialog.setColorFromString(t.colorPicker.currentValue,!1),this.cpUseRootViewContainer&&"inline"!==this.cpDialogDisplay&&this.cmpRef.changeDetectorRef.detectChanges()),this.ignoreChanges=!1),(t.cpPresetLabel||t.cpPresetColors)&&this.dialog&&this.dialog.setPresetConfig(this.cpPresetLabel,this.cpPresetColors)},t.prototype.openDialog=function(){if(this.dialogCreated)this.dialog&&this.dialog.openDialog(this.colorPicker);else{var t=this.vcRef;if(this.dialogCreated=!0,this.cpUseRootViewContainer&&"inline"!==this.cpDialogDisplay){var e=this.injector.get(this.appRef.componentTypes[0]);(t=e.vcRef||e.viewContainerRef||this.vcRef)===this.vcRef&&console.warn("You are using cpUseRootViewContainer, but the root component is not exposing viewContainerRef!Please expose it by adding 'public vcRef: ViewContainerRef' to the constructor.")}var n=this.cfr.resolveComponentFactory(Cg),i=Be.fromResolvedProviders([],t.parentInjector);this.cmpRef=t.createComponent(n,0,i,[]),this.cmpRef.instance.setupDialog(this,this.elRef,this.colorPicker,this.cpWidth,this.cpHeight,this.cpDialogDisplay,this.cpFallbackColor,this.cpAlphaChannel,this.cpOutputFormat,this.cpDisableInput,this.cpIgnoredElements,this.cpSaveClickOutside,this.cpUseRootViewContainer,this.cpPosition,this.cpPositionOffset,this.cpPositionRelativeToArrow,this.cpPresetLabel,this.cpPresetColors,this.cpMaxPresetColorsLength,this.cpPresetEmptyMessage,this.cpPresetEmptyMessageClass,this.cpOKButton,this.cpOKButtonClass,this.cpOKButtonText,this.cpCancelButton,this.cpCancelButtonClass,this.cpCancelButtonText,this.cpAddColorButton,this.cpAddColorButtonClass,this.cpAddColorButtonText,this.cpRemoveColorButtonClass),this.dialog=this.cmpRef.instance,this.vcRef!==t&&this.cmpRef.changeDetectorRef.detectChanges()}},t.prototype.closeDialog=function(){this.dialog&&"popup"===this.cpDialogDisplay&&this.dialog.closeDialog()},t.prototype.stateChanged=function(t){this.cpToggleChange.emit(t),t?this.colorPickerOpen.emit(this.colorPicker):this.colorPickerClose.emit(this.colorPicker)},t.prototype.colorChanged=function(t,e){void 0===e&&(e=!0),this.ignoreChanges=e,this.colorPickerChange.emit(t)},t.prototype.colorCanceled=function(){this.colorPickerCancel.emit()},t.prototype.colorSelected=function(t){this.colorPickerSelect.emit(t)},t.prototype.inputFocus=function(t){var e=this.elRef.nativeElement,n=this.cpIgnoredElements.filter(function(t){return t===e});this.cpDisabled||n.length||("undefined"!=typeof document&&e===document.activeElement?this.openDialog():this.dialog&&this.dialog.show?this.closeDialog():this.openDialog())},t.prototype.inputChange=function(t){this.dialog?this.dialog.setColorFromString(t.target.value,!0):(this.colorPicker=t.target.value,this.colorPickerChange.emit(this.colorPicker))},t.prototype.inputChanged=function(t){this.cpInputChange.emit(t)},t.prototype.sliderChanged=function(t){this.cpSliderChange.emit(t)},t.prototype.sliderDragEnd=function(t){this.cpSliderDragEnd.emit(t)},t.prototype.sliderDragStart=function(t){this.cpSliderDragStart.emit(t)},t.prototype.presetColorsChanged=function(t){this.cpPresetColorsChange.emit(t)},t}(),kg=function(){},Eg=Sr({encapsulation:2,styles:[".color-picker {\n position: absolute;\n z-index: 100000;\n\n width: 230px;\n height: auto;\n border: #777 solid 1px;\n\n cursor: default;\n\n -webkit-user-select: none;\n -khtml-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n\n user-select: none;\n background-color: #fff;\n}\n\n.color-picker * {\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n\n box-sizing: border-box;\n margin: 0;\n\n font-size: 11px;\n}\n\n.color-picker input {\n width: 0;\n height: 26px;\n min-width: 0;\n\n font-size: 13px;\n text-align: center;\n color: #000;\n}\n\n.color-picker input:invalid,\n.color-picker input:-moz-ui-invalid,\n.color-picker input:-moz-submit-invalid {\n box-shadow: none;\n}\n\n.color-picker input::-webkit-inner-spin-button,\n.color-picker input::-webkit-outer-spin-button {\n margin: 0;\n\n -webkit-appearance: none;\n}\n\n.color-picker .arrow {\n position: absolute;\n z-index: 999999;\n\n width: 0;\n height: 0;\n border-style: solid;\n}\n\n.color-picker .arrow.arrow-top {\n left: 8px;\n\n border-width: 10px 5px;\n border-color: #777 rgba(0, 0, 0, 0) rgba(0, 0, 0, 0) rgba(0, 0, 0, 0);\n}\n\n.color-picker .arrow.arrow-left {\n top: 8px;\n left: 100%;\n\n border-width: 5px 10px;\n border-color: rgba(0, 0, 0, 0) rgba(0, 0, 0, 0) rgba(0, 0, 0, 0) #777;\n}\n\n.color-picker .arrow.arrow-right {\n top: 8px;\n left: -20px;\n\n border-width: 5px 10px;\n border-color: rgba(0, 0, 0, 0) #777 rgba(0, 0, 0, 0) rgba(0, 0, 0, 0);\n}\n\n.color-picker .arrow.arrow-bottom {\n top: -20px;\n left: 8px;\n\n border-width: 10px 5px;\n border-color: rgba(0, 0, 0, 0) rgba(0, 0, 0, 0) #777 rgba(0, 0, 0, 0);\n}\n\n.color-picker .cursor {\n position: relative;\n\n width: 16px;\n height: 16px;\n border: #222 solid 2px;\n border-radius: 50%;\n\n cursor: default;\n}\n\n.color-picker .box {\n display: flex;\n padding: 4px 8px;\n}\n\n.color-picker .left {\n position: relative;\n\n padding: 16px 8px;\n}\n\n.color-picker .right {\n -webkit-flex: 1 1 auto;\n -ms-flex: 1 1 auto;\n\n flex: 1 1 auto;\n\n padding: 12px 8px;\n}\n\n.color-picker .button-area {\n padding: 0 16px 16px;\n\n text-align: right;\n}\n\n.color-picker .preset-area {\n padding: 4px 15px;\n}\n\n.color-picker .preset-area .preset-label {\n overflow: hidden;\n width: 100%;\n padding: 4px;\n\n font-size: 11px;\n white-space: nowrap;\n text-align: left;\n text-overflow: ellipsis;\n color: #555;\n}\n\n.color-picker .preset-area .preset-color {\n position: relative;\n\n display: inline-block;\n width: 18px;\n height: 18px;\n margin: 4px 6px 8px;\n border: #a9a9a9 solid 1px;\n border-radius: 25%;\n\n cursor: pointer;\n}\n\n.color-picker .preset-area .preset-empty-message {\n min-height: 18px;\n margin-top: 4px;\n margin-bottom: 8px;\n\n font-style: italic;\n text-align: center;\n}\n\n.color-picker .hex-text {\n width: 100%;\n padding: 4px 8px;\n\n font-size: 11px;\n}\n\n.color-picker .hex-text .box {\n padding: 0 24px 8px 8px;\n}\n\n.color-picker .hex-text .box div {\n float: left;\n\n -webkit-flex: 1 1 auto;\n -ms-flex: 1 1 auto;\n\n flex: 1 1 auto;\n\n text-align: center;\n color: #555;\n clear: left;\n}\n\n.color-picker .hex-text .box input {\n -webkit-flex: 1 1 auto;\n -ms-flex: 1 1 auto;\n\n flex: 1 1 auto;\n padding: 1px;\n border: #a9a9a9 solid 1px;\n}\n\n.color-picker .hex-alpha .box div:first-child,\n.color-picker .hex-alpha .box input:first-child {\n flex-grow: 3;\n margin-right: 8px;\n}\n\n.color-picker .hsla-text,\n.color-picker .rgba-text {\n width: 100%;\n padding: 4px 8px;\n\n font-size: 11px;\n}\n\n.color-picker .hsla-text .box,\n.color-picker .rgba-text .box {\n padding: 0 24px 8px 8px;\n}\n\n.color-picker .hsla-text .box div,\n.color-picker .rgba-text .box div {\n -webkit-flex: 1 1 auto;\n -ms-flex: 1 1 auto;\n\n flex: 1 1 auto;\n margin-right: 8px;\n\n text-align: center;\n color: #555;\n}\n\n.color-picker .hsla-text .box div:last-child,\n.color-picker .rgba-text .box div:last-child {\n margin-right: 0;\n}\n\n.color-picker .hsla-text .box input,\n.color-picker .rgba-text .box input {\n float: left;\n\n -webkit-flex: 1;\n -ms-flex: 1;\n\n flex: 1;\n padding: 1px;\n margin: 0 8px 0 0;\n border: #a9a9a9 solid 1px;\n}\n\n.color-picker .hsla-text .box input:last-child,\n.color-picker .rgba-text .box input:last-child {\n margin-right: 0;\n}\n\n.color-picker .hue-alpha {\n margin-bottom: 3px;\n}\n\n.color-picker .hue {\n direction: ltr;\n\n width: 100%;\n height: 16px;\n margin-bottom: 16px;\n border: none;\n\n cursor: pointer;\n background-size: 100% 100%;\n background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAAAQCAYAAAD06IYnAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4AIWDwkUFWbCCAAAAFxJREFUaN7t0kEKg0AQAME2x83/n2qu5qCgD1iDhCoYdpnbQC9bbY1qVO/jvc6k3ad91s7/7F1/csgPrujuQ17BDYSFsBAWwgJhISyEBcJCWAgLhIWwEBYIi2f7Ar/1TCgFH2X9AAAAAElFTkSuQmCC');\n}\n\n.color-picker .alpha {\n direction: ltr;\n\n width: 100%;\n height: 16px;\n border: none;\n\n cursor: pointer;\n background-size: 100% 100%;\n background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAAAQCAYAAAD06IYnAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4AIWDwYQlZMa3gAAAWVJREFUaN7tmEGO6jAQRCsOArHgBpyAJYGjcGocxAm4A2IHpmoWE0eBH+ezmFlNvU06shJ3W6VEelWMUQAIIF9f6qZpimsA1LYtS2uF51/u27YVAFZVRUkEoGHdPV/sIcbIEIIkUdI/9Xa7neyv61+SWFUVAVCSct00TWn2fv6u3+Ecfd3tXzy/0+nEUu+SPjo/kqzrmiQpScN6v98XewfA8/lMkiLJ2WxGSUopcT6fM6U0NX9/frfbjev1WtfrlZfLhYfDQQHG/AIOlnGwjINlHCxjHCzjYJm/TJWdCwquJXseFFzGwDNNeiKMOJTO8xQdDQaeB29+K9efeLaBo9J7vdvtJj1RjFFjfiv7qv95tjx/7leSQgh93e1ffMeIp6O+YQjho/N791t1XVOSSI7N//K+4/GoxWLBx+PB5/Op5XLJ+/3OlJJWqxU3m83ovv5iGf8KjYNlHCxjHCzjYBkHy5gf5gusvQU7U37jTAAAAABJRU5ErkJggg==');\n}\n\n.color-picker .type-policy {\n position: absolute;\n top: 218px;\n right: 12px;\n\n width: 16px;\n height: 24px;\n\n background-size: 8px 16px;\n background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAAgCAYAAAAffCjxAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAACewAAAnsB01CO3AAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAIASURBVEiJ7ZY9axRRFIafsxMStrLQJpAgpBFhi+C9w1YSo00I6RZ/g9vZpBf/QOr4GyRgkSKNSrAadsZqQGwCkuAWyRZJsySwvhZ7N/vhzrgbLH3Ld8597jlzz50zJokyxXH8DqDVar0qi6v8BbItqSGpEcfxdlmsFWXkvX8AfAVWg3UKPEnT9GKujMzsAFgZsVaCN1VTQd77XUnrgE1kv+6935268WRpzrnHZvYRWC7YvC3pRZZl3wozqtVqiyH9IgjAspkd1Gq1xUJQtVrdB9ZKIAOthdg/Qc65LUk7wNIMoCVJO865rYFhkqjX6/d7vV4GPJwBMqofURS5JEk6FYBer/eeYb/Mo9WwFnPOvQbeAvfuAAK4BN4sAJtAG/gJIElmNuiJyba3EGNmZiPeZuEVmVell/Y/6N+CzDn3AXhEOOo7Hv/3BeAz8IzQkMPnJbuPx1wC+yYJ7/0nYIP5S/0FHKdp+rwCEEXRS/rf5Hl1Gtb2M0iSpCOpCZzPATmX1EySpHMLAsiy7MjMDoHrGSDXZnaYZdnRwBh7J91utwmczAA6CbG3GgPleX4jqUH/a1CktqRGnuc3hSCAMB32gKspkCtgb3KCQMmkjeP4WNJThrNNZval1WptTIsv7JtQ4tmIdRa8qSoEpWl6YWZNoAN0zKxZNPehpLSBZv2t+Q0CJ9lLnARQLAAAAABJRU5ErkJggg==');\n background-repeat: no-repeat;\n background-position: center;\n}\n\n.color-picker .selected-color {\n position: absolute;\n top: 16px;\n left: 8px;\n\n width: 40px;\n height: 40px;\n border: 1px solid #a9a9a9;\n border-radius: 50%;\n}\n\n.color-picker .selected-color-background {\n width: 40px;\n height: 40px;\n border-radius: 50%;\n\n background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAh0lEQVRYR+2W0QlAMQgD60zdfwOdqa8TmI/wQMr5K0I5bZLIzLOa2nt37VVVbd+dDx5obgCC3KBLwJ2ff4PnVidkf+ucIhw80HQaCLo3DMH3CRK3iFsmAWVl6hPNDwt8EvNE5q+YuEXcMgkonVM6SdyCoEvAnZ8v1Hjx817MilmxSUB5rdLJDycZgUAZUch/AAAAAElFTkSuQmCC');\n}\n\n.color-picker .saturation-lightness {\n direction: ltr;\n\n width: 100%;\n height: 130px;\n border: none;\n\n cursor: pointer;\n background-size: 100% 100%;\n background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAOYAAACCCAYAAABSD7T3AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4AIWDwksPWR6lgAAIABJREFUeNrtnVuT47gRrAHN+P//Or/61Y5wONZ7mZ1u3XAeLMjJZGZVgdKsfc5xR3S0RIIUW+CHzCpc2McYo7XGv3ex7UiZd57rjyzzv+v+33X/R/+3r/f7vR386Y+TvKNcf/wdhTLPcv9qU2wZd74uth0t1821jkIZLPcsI/6nWa4XvutquU0Z85mnx80S/ZzgpnLnOtHNt7/ofx1TKXcSNzN/7qbMQ3ju7rNQmMYYd/4s2j9aa+P+gGaMcZrb1M/tdrvf7/d2v99P9/t93O/3cbvdxu12G9frdVwul3E+n8c///nP+2+//Xb66aefxl//+tfx5z//2YK5Al2rgvf4UsbpdGrB52bAvArXpuzjmiqAVSGz5eDmGYXzhbAZmCrnmzddpUU+8Y1dAOYeXCtDUwVwV7YCGH6uAmyMcZ9l5vkUaBPGMUZ7/J5w/792/fvv9Xq93263dr/fTxPECeME8nK5jM/Pz/HTTz/dv337dvrll1/GP/7xj/G3v/1t/OUvfwkVswongjdOp9PzH3U3D3zmWGnZVXn4jCqs7wC2BKP4/8tAzkZsoWx6XrqeHZymvp4ABCBJhTQwKfDT8gzrZCIqi5AhiACjBfEB2rP8/X63MM7f6/V6v9/v7Xa7bYC83W7jcrlsVHIq5ffv30+//fbb+OWXX8ZPP/00/v73v4+ff/75JSvbeu+bL2WMMaFbAlpBNM85QX+ct6qoSqkPAwuQlBVKqGNFSUOAA3Bmu7gC5hNOd15nSwvAOUW7C4giUCV8Sgn5L9hNFIqTsp0GxI0ysioyjAjkY/tGJVEpz+fz+OWXX+7fv38//f777+Pbt2/j119/HT///PP49ddfx8fHRwrmTjV779EXu2px2xhjwtdJZQcAWQIPLPISsMJaSwiD8gzIKrwSyATE5j5nAbR5c1dBUwBlsEWW0h6LqiYsqFPAQxCyRZ3wOSARxmlXMX5k64pQfvv27f75+dk+Pj5OHx8f4/v37+Pbt2/jt99+G9++fRsfHx/jcrmUFLO31gYDWblxRIs/TqfT7ousxJsAxXA2Gc7TA9XdgfdoHbFsj76X2+1WArgI1ageGwA3qupqoHsmcbI6Fu93quggFa9d7LeDtgKfAFHBJ+NEByIkcJ5KervdTmhhGcgJJSZ5vn//fj+fz+18Pp8+Pz/H5+fnmGD+/vvv4/v37+Pj42N8fn6O2+1Ws7JjjP6wraMI5E4RZ8x2vV5TSwkquotV7/d7Tz6HFWsD/qNcdw0CQ3q/321c686TwDVIdbuy73zNldhSHb8I2klZznm+InBS4U6n0302aBFsLhHDAKJVJVglfI9jhvu53W53sLANYNxAiDA6MCeUHx8f9+v12i6XS7tcLqcZW57P5yeY8/fz83Ocz+fnsSmYUyknWEG85WBst9stzSLyMdfr9Qi08iY15UZ0LlDGLhR3o5zK2j7OPUTD0E+nU3tk7Xb/16NFbhloAMuY1zjLUOO3BKeIDe+Z8s3/J4gFo4TM5jPmuRg28foUKKVSwo16TgA5npywcWLHgYl/Pz8/73/605/ab7/91m63W7tcLie0sZj4mao5gTyfz88E0f1+j8EcYzwTPEG2cqjyfHNF0M8fuqEiaOVnRzZZQNh5fwQyHg/HDGfJo89Q1zb/quu5XC6773I2XKfTqd/v9+d3wuqWva/YTdUdEV3fhIv/Viyps6YE3x3r43K5bJQS66zaxVGFsvd+//j4aF+/fm3fv39vt9utff36tf3+++/tdrudvn37ZuNLBaaCMgUzC+rZRiFowxUuJI8YMqcCp9Opq5vagaYU6lGJA1XQqejchw6Cj0Gw5nYBrGw01A2O206n04BGouNNyTfp/FwElhUey6nXrIKw7QQWddxuN2ldL5fL839gSPF8ahu/JvBO48CPSuqMf8Vp9/P53L58+dLu93s7n8/tfr8/39/v9/b5+TkhPJ3P56mQ436/j+/fv+/iSgbzer0+AZx/5+88bv6OMda6S5z6kd21fYC9dxv7cIJJ2d9AOS30fPMzyHiTM8B4DF6XUlYHp4KQW3W+1t77MNB1vGHxWq7Xa7vf78+y5/N5A+H1et29xuP5dbYtyaRu4AksbPq6936fjRzXRxBbPr/b+b18+fKljTHaBBBfn8/n0/1+H1++fBnn8zm0sB8fH5u4cr5GuBhMVk0EEn9RsctgVhM+ixlJtMA23R8B6yysAstBOgFXIKKCMIgToMqNEu2fYMH7ztc732dQKkCj1ytAZtY0Kx8pIr8GGJ+AT3V+2Hirhl++fBmXy2Wz73w+b17P8p+fn8/tUwGVleVkTyUb68DkfayWY4zxNRihU4EpLJPZVrK+u7J4/mgfKqeLW9X2REWlItL1diynbDDb3+jXgYjQqn0rrxWc+NkILP7F7xIbMvx7vV53x40xnlbWJF12ZSag/N0pW6t+ZzmOMzHjajKwDfond78zYTdfq18up97zr2q8v3IioBprRtBl0EZ9og5WBRGOdOHjIjXF7UotFbgOWnXzIJyzYvjG5IYgsmMOxHkz8OsMSrVNWeq5T8DaOcbEv1Od5rbs9aO7YvMet63EkF++fMExq+MRl4/L5bLZN/+ez+fnZ6KazuMqXSQVO5spJXflHAIzes/xJseckRJiDMog9d6VfRrqXMr6KpVV27jRwJacGovOAM1zMdQMnwK1AubK63kdCChvI1C7g0z9nf/D+Xze2Vj8H7Gx4P9duQlsYCrqyN8XqG3Hm/10Oj3jw/n+crlstuM+jPmmxT2dTuPz83Pzt2pn1XsEHX/bnPaVqVmh0xwOt0o6XLLAHePUU203wHfcrspCwmV3TryB5s0Mseeg97x/BwzCjBlbB+pRAPla0BVQuT6V6QHdBlj3d0KG147b+DqxQeUymDO43W4dQar+TIjwmAd0z8/h65vf0/yLv3Pb5XLpru/ydDo9s7ET0I+Pj6dKK9VUEIeKWQWPAOrJ8LKd4vE+t91Y3e7UFlWatg2VwJnb+HPmtvm/sfK59/OaWF3x/eP1UPHvA5DDYDpYXfb0drv1V2DkBkxtw/tEWVVlXWdC9pFYs5/jfh9dS/16vW7s6lTG+TfqsxSJHxkXXq/Xdr1eu4LsfD6P3vsT3N77DkL+zPm5jSdKL4zR3AxQd6rHkLkYlSowsrq7znzu6wSwdsMJOXmA5fBcjxtgMGBYHlr5zokhtsMCTgXLQOW4XC6dEyEMprL8mAQzXRgduix2yZzorxkYsDn3hB1VeMLGsXsVtgl2pW8S3svk0vw7R4hNaHvv4cACl5HFzwIH0Kc6zu4XjDPR/jpAVxWzO1Xk2DDb3vTcxeGU1iWZHkmIDWziWKvirCJ4Dravs6IJ/GG6cTqWdXDy+fArQDVVkLqkVjAoZIITdmmIqXwqa95N3+MGYoZQdRVNO53Y1xRkhO16vY7eu507Ca9lJnbGpxOemQhSw/AQsmmp5zU9BiU8G6wvX76M6/U6Pj4+do0Bz4CpgiknTUeDqwlKBmg3u4OVjrZ1A+rAcgaejWq6eJCvCYFDONSwOgHX4EQRw8lxbzDOdEK6gZ3Hk1b+8g2o1JFtKXyv/fEdTXuWjWXdAZiBp6ADeDrCFiim7B6ZFneeI7Gvm/PMkUDX67W7xI8b0D7/v8dA9qfN5oaCf74WZjH0mf1cmfY1Y0JUFmVrTWu8uzkNcLtEj7u5FXBTkfC6GOA5q8YMxO8KVvF6sAVGdcrUbsKODcQKkLMOMdmlxum642YrPm26AlhZW1YB1R+rrGswE8TaYAWeUMxdf+WjwSvZ2Ef3ytOyfn5+PpVPAaqOn43MtNBqvmjjxbjM4lZjZY4gqNMI5ktaW/sYKNwS+9lFQzGihmMCKPa7+Z0V6Eb0GRmobtpX8JljWu5FMLN5ja6hG9kwQgZqf5+1NH5UxzkFReCdWhJ8XdlGUkxO7HRlYRm4mVO43W7ter12TPJEw/rmEN3L5SKHIWZg9mz+pUoKOYq5bJTJdX2gme1UcxMZQFaEQIlHct32M+Y1BzGkGuzfiyAN9z+ugplZ1symCrDCYYkGxDTpI9RzBy0rHyeDUC1nWaeUaD9n4xkNyYMBDZtzZ3B++fJlY21XFDOcARJlabOyiS3uCpLI9jrZjCDkaVvcCCjwognKShWdzXZWlZMvVTgD8LpqlCLrqgbcB+qYwrgKYpT0ccCqbKyCValkEabn/FynogCrPKfqf51xJ7sGB2ZXcZmxoSOztjx300DZi7a0/2AIR0UlBag9SuDw6KcAzlaB7vHZvWpjK90dyrq6bKyDUZQbR0B05biLQkHIcSUmgIK+SwuqgHCnoio2RQU1yj+BnBy9pphVKLGyC7ZzFK1pxWK+E8IhVCWLN/uLtnUU4ayoYLoaANz8FdtaSvY4pV0BEW2ls61czqllBKpTyKgMAhrZ1cdc1RROtPmvWNkdcKZ7ZKxaWjiPLJMpp7OZKxA+rqG/oJLjxf0pnJlqLoDZo3gyU0mKGys2taKecj/d1C+rJSplBqlTyAqgR+D8KjKlmRL2gtUcAdCtsL+ijCNT1oqqqkH2OHEbG5sDFnUg5Aa+yLou2VU1ptj1S2ZQqv1ORZN9IWzRfgaRBxKoBE8UWyqlJFtrIc0AxNjSjed99CTY/XDfSzCz5M0IZoVEsWnPFNTsl8ooVC1TzbGgqFZNDSgVwKK+1sGDMKqxZCWGVMDysiEr1jVSQJUYwj5iHOlThdHt44SQg9CN+nl8D90NMIgAdgr46JqRiR9I8vRdFvbr17m/yxUMKjNLMiVUADwu2CWGhhi+F55TWM9M9cogzms1dnM4uOF/LAEYWdcqnM7yFmyq3IfwmOROd7Y1iFWtOjoY8To41mTV5IysgFFuRzsbWFGbNIIJCDv1dOo4lZG7jWBwRFtVTKuWyeCByJKOan8oZ3ep9XddNl0tDuaywLz9cXPYeDAA0SpkBO9sbVcTOVWldPv4uyzEkzxHtjvonHoSkFEWNoo1d8DhcQputd2ppNon4BzoAiJ1hBFQg0dVtdbGHHDQWushmNEQukLM2QO1G2Y8bgTXqFhcBJj7EjPgcPts8US8qPpPB/dXznOh5Z438tzH5ec6QgrOKrRRfKmysBmUDB+PhYabMlVPER+GCSITTzr7am2tArH3bgcEzPJm+cr5jJ4NnHNFDVrFXcI5Le9k5Jnw+bedbV+FfRzZIHaOOaOsLY0/7UGs58DjrGwKMIMFIGzOEW1/jGsdAtCN6hEAI4hBe9YXeRROBSVPAVPAqvIM5bx5hVKWAMP6zBRy3iescridVdFBinBxXDnG2GRY2XbCvp1lhvGtO9Bxu5h908XQu42lnSArMFdizMim8uwRCxPGnnOS8lwpnbOiDqTAjsrRN/PcoAScCbaACqVM40ylnjjTBs+bwWlAG23/UKbdkiwKWIQPGzWaczpoSlxPEj822cNWkpS7FyzsDrqpfgpG3jahw2vgbaSQAxuLWZYt7JzyNe8JoZpNAcvDFOdw0wqYT9AK1rZz/DdbSlLPp0ryIxgQJlK9AZlEq7IOXpohg9PIhrCng88JsOxiV4ZWAYfg4sikx/8ky2Z9l862uqwrfscIH8+ugTmVGyiddeVYUgEMn4GZzg14EwIsh9sx2cKKiWXReuOE5gzGOQgdlRKVVdlevqb279Xq0Qnsts2VDaBO0coezsruWtHApu6sKG4IBhN0aGU2kLrMKGRTN3HmbCDwKV14zvkMEDG4QfZVspVlaNU2mhc5TEZ3N1h/zqTheuLpW05ZWTGVjb3dbnNmxKZBnN8JqidaVLKAOyARNLS+MB54Z2+VaqoMLKroVBlngefnTPAcoHNWCSvlfA8CI0HEmBNBnBlXyMrzU7A7WVm94PPqQ2gmqKx+WDGsnvilmcSOBJqOK1nYyAIzuAyesq3UdSK3KfWcYKD95HmfYOU3qser2CtYEUA+FpfqdNvgPBZUBhDrGONRVlQsh8rLcaUCykHG0OOUwTlLBrsh5soEMGezi1E4HRVt1icp5wZEFXdibCkG8Y8vX75sbO4E0iom9z+hjSiOfy3DhpXItpVhE+UGQdvoWjtChmrGHf4YAzKgBNnGtuJxFCeGdhUAfQLLK8kBYAP6gvFJZajMG3Xkycy8KuC0q4Eyymwtwdxdv2M0mIBtK0LKnf640j00Auq4gUkdWGlhs22qJc6dZCsL19oxnlTJG4SYVRIGpD8TPFBuM6OElbS1pldid4mGAyN6ZIupbC5bXJN9fdpbThSxLUaI8IG1XIYBxW3Tjs6KQosKcxfxcQmdnwRGM10GnFcCy2XYunLMyAkdgk4mePiczsLygthcBut6goOqS7YVFXADLjaosB6s6ofcZWAZSIRYqSUkizYwttYab3vUOQ9w2HRxIIg8WwRVeE68xi4UtL3zRphxplzwuZrcqYCq1I3jPI5dnJIygEohMbPqVJSzrwzxBJTs5zN+ReUSgxikPQVF3JVBeNQxbHENrEMNvEdFZVV9lH9+ORGEsNZQpyTNc4C3AG7XF4ngzq+DrO2zbuaaOXgdaFcdkEotoSFBVX2qJ0C8OWZeG4KGlpghA0XfTOPCqV2qqwQ26QWfF2PMLhI2w1lVAa2aPsYd0za25MQRwgcZN6uQDCi+ZxiD4XEM2kZxOT41FnZnaRlcpZouzlRqqdbQVWopQoSB58RV50lBNrHi/AwXS5LrwDVlpY3Fc3ByiYGc52Trist6kOXdwInAQtJpp5QchyaquYOV7Su+fxVMaV3dc0RE2S6mUY0gLt2pMcYqrKIQ9w2l1gpQUMtQYcmmbt5DTNxdhnUCjQqtbK9SUSzvrC0mmhhE1e2FS2+oxypy/ZASutkmtjx3vcBC24PX65nbqkBCRhfjS9kIYPnee8cMagVOhI/3T1fAmdtAWZsCswTJCkQVNa0qWKSKPOpHAUhD9DrbVcyoYkwqhvh17vYAayXLQyKGYdxlUDFp494rBXRjYgO17DDYetNIUj/ezp6S0lnlpEwsWmJMkOwsKXeZKEAjIHn0EQJISaRBcO6UMINz7p/bEjjnw4ft+xmDvksxX4G2rIris7qaeKwAFMP2Oi7n4criuZwtpSUwpfLxSnORSrIqusc5ZFaXysqRWjiZ2DyAWEIL35tVSoQElFACjOeGGSE7AHEQgdo/LSvCOgGBvkxsmDbvlS3Fp5vhaB2TAGqRKrKKMrhLVpaGzEVjZ0OQxDhaCTA+QyRR1d15aQzrJntL3RibsipjG6jlgL4yqbS0sNYg1e84vhbBVrElK64CUcWYXDfKxhpIuxiVJZUxsbMy/uRBKTNRQ4kQ3LdRYLS0rJjRPlTPqY6gdJsEDc+aQXAn+HgsNUCbRuF0Oj0zwnA7bWDkbhO5Ens00qeQhS1laBMl5M/cAaxsLF8rKyql+Tf7ELLEGu/ixiimdCvo0TjfpjKwaggen4eh5v7LokLKbLuyvHhcZG8dhGrEDx7Hg93ZppJF7qBqO3iVveXEDQNInzeoe8Yq6ePaZBZ2JviM3W2UAGotekRCAGq4EkF1X3DOnR11yRsBL1tRa0PVcZiNFXZ2c34FskvomInQQ6lzpJoZbJxk43NwKJFBquJSsrByHydxKOnTxQASBmS3j+JMnsHSla3Ec6K9VWoJVn9zfjwOM7hqYAAqJQwE2a3nA48J2QGegRkpZNivSY+ys3EkKd4oJIwsvIHl3cWgLt5k4NH6OmtLWdpurOkwEMupYc7eMtDRhOcI2ui5JhVIzXzLyto/GAPuZoyo8wkoduVgJglCt7OhGbgID4Mq4si+63zUS1FuFFXFlqyaj2emHlLMcBqYu0FMuR28BbB7lOxRMSiCQXFhCKuwkhZ+pYDiGSgbsKKV8MiSRsuHSIWM9rklRiIlZZuqXjsQK8ooYJMgq3JKWVkhHbhsVxFUzthOWPkYijcbx54IKsSdT+uLr3crGKyoYgFiGR9iBk4kfloUX+JIlQRQqabmpgnhqtpQpb6RVQ1WH5DnrS4hEoGZqaerQ2dhFbz8XePxShmDbo70eISjoorO2vK8SJXI4SUmEU4zWKDzUDtWTYw7xXlbSTEj4FRg7zKnKoGRALv0Gs9Tgc1BpCywGZRQAtqVz2xrBcAMzEpfZwFSa2G5W0QBFjSMapWAEFa3HcGN7CxDzECyIkJ97qwrqWNTWVo876PPsjPkj2wvgroM5lLZKMETKVql/CvnWVFiFa/SzJUQwkoZsr67Y6vlSRV3/2tmNTOY3vnaxYwMuoPKqdzR1w7IqHymlPxaAThfU7Ko2ZXYj4AYJHL+kNdKwRQYESTRa5fsUZ/rVC1TMTyWVyYoqNtuzaHsMyv2tvoarxdfqwYgU1axFo/cnql1FGsqK+uAROV8BX4GU8WcZTATi2q7Qcyi0O0V+GhWBMNRUkn8H1SsWVE5By3Gi0ECqUeJoBfAtDa4amkdXG37AGP5Ggeb84p7UazpoKRzdFzeQ8HkoHGxprKy/Hpm5t12p47J6xTYDEz7uINEXSuxYXvFskYAc+ySxH9sf5ftKzU6IbwVBcUGg5e5FMCEXSErZR0wGayV19woM9guPjTqJdVTqR4uE4nJnLldWVkECCZLd2VLF+xtamex7IpiriSDUpvrpn9lrwGMCHyppMH+ps6LILsuFGUj1XEOXiqbqSHPUKnClpWV68kqtURVNDY4TNaocykoYeTU5ngGEQa/S1DnnE4AeXMcKjHPAmFVjCBENaeyLVNHfr3px8xUstJ94hIpfH4HKE/eDaArK6lSyVVFbdt1gxTIVk3pppVlFXi4pEhVBTObquohU85MLXn1iahvUkHJjSCMc01tLFveVVBx0DodM6jftCu7DOtIzYxrc0qp1JGP2ayYFz2Gb6HvMrO8cnGtV6Gjm3uImSfD2GpWK6uowbZGMxFKQCo1pOMtcMXFpRst+hXGoAomF3sSTBGgTglbBKWwsQ3tZqaYSp0Z1CimRDWFcCJUPYJ00BI5FkKYNoifuQxmN88SWVXWLMaUqqqgC0BmQJR6sk3u9NCf6jYLXxAfqsYEgVLAhRY2AtgtflZNFmFyhxdrLkAdWlk4D88M2ixHyepIdhMHrG/iR1ZGtq0MGpbDbRPYOXeSY1M6Ny4ZstvGSktK+XbFPATj2D371saPEsAMXhXrsZ0km/XStkhhMyBfsa6uXFZe2VCe+YMr1+GKgwrQyNYq1VRrB+EizAow6NsdNKcyVEkYeM73ys6q4kAHp6BiFklTkIrVC5oYV7uzwOGCz4UJ0Stq2lWMJy4wtb+RetL6tZFicnJmBw5UjCvXXMZVJX2MQkbf+XN5EWd78Vz8/JEsMZTBiKNzsm1inLRUQ74H4NidaqI68j5sAFgxcRveC7ieLJXfQYxjZZ2CsiWFewZXJmBIlZ1tdtrX4hSuateKso/RZOtOKW2nmq1oTzeK6dRWAWu2NRVb4hq0SXm1GvtugHrbr5IXqmSktg5CuDE2MSlPwsY5kNE2Wp3AqiZbWVLAxiBF+2iBZbuNj6MB6rsMLC7FyasaYDyo7KkoPyEtw3pEMXfPvxAJi2jAQQgjrz0rLIZSWZlIoNhwd5xK4AR9mYNjWAaLrnuImJeBVN9zBORObVvbr+mTTfFSEJLSRnHo7hEJoIi8MFqjxmvgmF5URZz4zLFgZZ8Ctu2X7ggVccKm9gVxIsOHqxXgNMKnFWZYnf1dBnOhayXq17QwFlWW09eNKyVJFmXqaONGA5aCegMbJ3UUkGY1ic3nKWgjq8qfVYGQG1gRt6rs62a6HiqqUOqdesK5NmX4nGofJoiE1d0dF9lVVkvT1/kEEaaCoYOwFpcVcoLM+7669PxC9rWqktH0sWUYld0VCpuBZ/stVRcGgy9WX2+U1Qthi9SzAqSxzZsy+OiFzBYnySGV6Gku44rD8BCOZBV3BvD5+AKRHNwMEsB6EzHnJpkTAeiUlEGkcECeB6GDZTp5YEJTlvdrknxYjTllMkfNtXwDjM7uVjK5JXUUn43rrqpK2jytaxHW0M5G8DC8rtHMYs7KSgduVQMGTYFqFvVS6rkD3sDJ46afdYFwoq11AOKCBLhvwoUgc8IGANycR6knZrdJPdsuxnyjfd3FovTlRMdEdtOl5CMV5EHsXQBis7TOwvIDZaGj2Vnpbh7cpK63VwYEMLwqbjzyl699sawFFkF1yqjUU31HfC6sW1ZFVFuXVXVgz9keEaw0ys1lWfm+azQAQSWA+hKYVfsZjPncAcUB9oIayy/UZXRNckDGji77GsWbvBo6tPrWPqOyVkBUq+INeqpzNdYs/u0ifh5qmpqIW+33JVSUcwY70KL4U9lYdU6ljtSls7lmfi9g3YzeQfVkaGFaV3ODCnaD2N8wsEDFklE3RzM3ZghdYkWHsszq70FIecnKkVkt8ezMzRq9bkGuKojRLBVSod3Y1yPqKgYW7JRQTPVyy5xIYLjOgxgT52RKJUY1dOrIiRd4futQx/A5AcSmEjz0vFWrkLzvbWAu9HOWbGgxFk1VNTpnBKk6TgwisI/HcxYXP1uAWO72ULFlBTq+aSu2VTUs6hrxM2CF+hEor1VIA9ZmFUaab1lSSgZsVs4sxzHlVLoJHr9H4DhONTkI1XC0/wiY2NoWAG5RlnHFnq6oLccpQddMuJ/O17JVA5OHLi0BqCztq7Y1++ucCd98qLI8MIHBV/cKjxQTme3hFBS3MyCqnDsuym2o80HjvFFTtrURmNaGJsmVahImjTsUXKtQZTAVs7Mvv8/+fzUrZAXcLJ6M4koe6XP0b6SmWWNDzyUpQ8bl+LtWx4tuqZ36cRYV3yuVxPNwvIiqiQCSmu7srgTzR6nkyhpCarXwFy1vGd5iP2cY06lFr5Njhhg1Y6+NB28ftbK83s8rf7kLJbKwDFPbLg25a0AdZJEiqr5phixKMDlRUtcssq1hriLqGoH+zeNgVm9OemjsETV8JdF0NHnkIFxWY1OB4Yrp7rtWJ7NgAAAPXklEQVQ3oNs5nplyVf8u2FoLu1JrHveaZWQjqAkshtFa2gzsSG3Zpkbvg3HafF9slPPlldjFlK80Gysm8Mr4MPhneNWENPGjAIpmilTPATdTRTXlCBYHYAQuPwA36xIpWtGN4q3Y2MhiGsUpuSSnlEJRD8PorC7CFYVw+F51qThgabxsTxWzCGY0ZSsb3lfqAy0OPNjNy8xiQQKsHYFQ2HBZVvVbBuq3m1oWKajqaonsM6uZUr6CjXWNZ0l5E3h3jURma6kP3MJIiy1Lm+kahQq41N2iZja5sjtlLYNZHZrH6qUGm4vMbDp6Rw2CFmvuyFkrBcCyMtFqBaECmsHoK9BZ2LA/lJcRqSaDqnaWbrZdGaz3DLgIvBln4woGztbyJGqslwxkhhHrTjTYFXCtOoKS8uLdofVdAbOylGU6nlYpXWZts4nXBq6WxJitMNokHUJnbnJplQm+aGpY2a5GMV2QD1hRubBPFKdumf5OHkLHz0F9luE5kjBjRa0nFE5CUGqHw32MmjZ6xkgINVnSnZ1VZStK2qKlRaLlQgK7uTq7JFXJwM+3SOEKyhZNI+tJ0I5qMYy9k2qJD7dVWdqKXa0CKNR0Ccjg+B2IYu2fcBZJZkMFgM11r0X92wilghFGgzVnexlqB7xL9mS29SiYUVY2nXOZjNBRsyDsQPRWW5hrZ4XcdC4HVWRbjgJr4sFofK5SzjQ7rhI1UebdPdEbj6sqIvTZQZ5va08rABsAW0UxeWytAk7A2KJ9ZpxzCioB24XFtYAeXYxr6anSqhLgppEqWbGwLunTgrV+IjWlL29ljaAl4EQMGsErp4apeZiquwRXLXAqOCeru32mmydc6oWTSWpFAGdzeTB8RTHVMEtlM90CbbQCYhPjq3egYr1FGdYIQjiuDGZ5zZ/AzobKGOyLxti6c4Rwtv2anyWlLICnlLhxJRXt6A5ebDBWFNONbxWZ2d02mnu4S9YECpeppV1zSWRBWxHYzVIv1CXSouwqqX3jBBBDZdYQbpTQW4ZQlS8r5kH4suSRmg2++3JN10x1PaAmEkmtYlEdeGpJEM6kOuCqCR22oSujj5IV2HdT0zj5prLKTjXFAPjdQlyq7xIBxAQP5yMczG4VxAKw0n6ilZ2QBce2pLulkuxxqnoIzFfgqyqjil9S1VNwBrFmeyeops8yOjZUybZdfS8CuaTIJumzs5tODaNtLpFDQ/PcJGweLhmeL1nB0KqiUDScsiUVD89Di3HtrKtSULw3RLiygZD+7sF8JTObgYsrGvDNUFRGl1iy0Ll1YkUc2aJYMog920I8qW6YDCg1Mqk0JHJFKXkbgbRreI+qpYNOZHrVcDUba7pjsphSJNtK6upgRNAVoOS0mugBeN4bIZgHhuPZ/s1ENaX6KsVr+YNrh1Nb7ipR0PE5zbNRegCbrHRUw6Yf07dLBJl1f8KB9as2V1nNqAsl62LBBhehwalerkHmB1JFIEZKSEusdl5JQj1nJlHXSCF342gJ9CYGrXelknJIXqVP8sD+qtplCR3XH2qfKq0ygMp+KnVkKxNlZ8m2YkIlVMiCnXUwl7qznBKSvQz3m3Pt6oQbXO5b5FixCh/fHxUQW/AEcK6zCNqKQnL9sywqmKuwvqSYzT/aPVNNpVyhvRW21aqciCsjdWvBwILUvh5VyCzbWoC1pJjJ680CWsl+udKB6T5RwG1mlohnlpbg47iz5U9ha0FGtmRLFYBtO99y97Ap0z+ZDTAog6kSLZsMHg/IFkkgp6CpvU2U0cYVSdnmkjwBdOmXbxTWNWzuIbipMioVxEckZEoahSOiy2M3K0jcC1LhVDwaqG0ZvkcWqCnrG4GIxykrqlbWdw6LQyBaZR8HmLRIhQWsHswD42ZXVLNkf9l+FlW0HVQ2lwFsC/Z1FdzlQR0KaPfo+Fdfu+/dwVRICu1CGR7AEIiAhc+AZUF0kOBaPxmUqg4i64vQnU4nFDYJ9Nz+1fVXveH9qmr+kPILx8oKcRV/BFbxbE0JMT0kSD4w6L/lNY8ocsqagVdU3A3MjxhxcGuqzsPH4irpaow1q6OyrVjvp9Npc59E91LldboYVzJWdimWfAW2SNEKcDaX2FmBLLA/uKxlmhh613Is1URQApbKfttwxL02q6Onx5pQxSbPojAg+v5hAnN6LHVRDXIsvKtRjiS0qJUyZTAXVbAK82ElFJWaQdVoqUC1Unt7BVaTQudM6SuqexjQJN4+0icaxv/utbKv83ETbT8H8gjcOKxOJmbUa6OOVXht3dFY6rHv9XoNzFLceEA1o8+pKm0LAHPHZ2rYKjFq0hfZFixsqHJgD3eD5n+U0kb1mFjXkn2lvMSSOsNE/CdIAKF0Sytq6urOHUN5gwg4GZosgbmggM5ucra2qrS2Ig1cbiBBcxYzgzUDNLCvL8GbZXNp6ORy3LmS+Kk83zRIAK6A1ioKa2I9NapIuiUFdfC9766PFZUtqUr6KbWk+zZU1a/ZrIXEztrjTOfz7hwKziCeXIaraHtbZIMz+2pGgazCmw4qWAFvEdhodYp0Xq0pV7G1YWYWbO4qhGq42+Z8BYtrLWvluNPpZAeaFFS1vubPgbgxsqcpnAaszBovKaFoDQ8BGtjfUOl4NAG2nmQV04feJgumvX2fsrQEWZghL0JnVdYkn3DOZIeRN86RqPWCmsvGVqEMRnwxQAxwS8EMYo3IzmY2+BCcLp4MKiuyuhImamlbZFcNoNl7tp+RHd18ZjQIRKyXdFRhN98/hyKqwXWNo7O1wiaXoHN108REZZWEq6grnIfjzeg8jdRf1XEL4kkXa5bBjKxoKaljBjeHlVxQ4GaycpW4lDOAKtnTxHAtOfzOtZwHAM7sqVXkV6yu6kap1nHkXKqWF/4XHqjenNKqBjpR3l1ch3Ejg1+EsgdQhsdG0B4FM9sWAVWpuAyiwTPleZxt9VyZVS2qXfReWqTAilpr9ApoWTjxymit7NwV4JTriZyOA9B0k7HFfULourmKYHVnRQvqGL5HMHdqFcR2qWpmcK6eTwx2dipWrviDilr+fKWq3OWRWdHKwA4eu8wjchbeRzFilqjjZN3ufCpfkJ0/scVpnYk6L0PI77lxdWCZ87WiWm7B/AGquQSnujGKsB8CJmiJq8q1pKIVWyqOiTK66r18BN8r74/AE71fdC3yPS2MxdOpnE1tlVxD9JmVOoggN+r4PjAXVFPa3Eg5jVJGFVUGNolH20GVrUB7BOySWq6WqYQdWR92pcFMYMwckbSgCKCqD67DiiWu1g8MQC9ByfcFqW1L+jL714qNCuznoSxt0da2gtWN1G8F0BK0NN0nuimelUF9dIdAfjO44UT3CjQLoUeLHJFTO3gmpRuIIOvwBQCbqNeo3qtZ9iF6xVK13GRlo4zqimq+CGdTiR1uRY8oqgE02hZBa79kZXPMquxRHKla2saZWN4mRqZUj0vLCKhkjKnqOQHNuSZVJoKvAqS1wpEquvWDC1B2ypwrCPsRMEPVTODMLJMDv6qeKXwi2JYV5Sq4qKyvgGsHCLiuj2jR59V8gMqSJ2FJZRXEHVRHj3sFPrct6OpqlW1GpatQdt0GvwfM6n63InsGVFhJGaBqgqqIV6IsXllZgySPq4R3bnt3wi5cv+cN2yqQLW1T95KYVsWWtKk4cB9W53WQQflQYR6Wl4HaJZjvVE0D5yvq+RKgZCs5qdBEP5sD94cAvQLlSgNaSMAtHx88BuNQ41zdFsX30zKbcs0MLD/ihkpQzl0wiTqKLTfbKmCmyYICnK0IbaieC4CG9iSyLQ7cIMGQwau6TKoq60Apl3WN40LZpca1CKKK9VQyyIEn8w0F8F6CL2h8o3ixGwC7s7EWzCOqmcApYxYD4jsAzVS0sl2t98pA7vrKophCVSonbYpgH6mvSn24pTBV4sdtV3BtMq5k82y+IADvUJ0uAlkCVTxIaPm+UNu/qkV4F1TzHXCGrXIAqItBKypqK99VtAOVs64O4ObX7pHLVCpYHcRmwvLR7TvYAKBBN58LGVzDuFz+hQbWgncQyCZAk+VbsPSouf93261iZgmfCpwRbAvqmSqriU2PwhjaoOyYqtIegVXViTsmyta6bGySpY3gyRrpIyAeaWDDxtpsXwKyalMDKNP7YBXMqEskUsi2uC8FNAPxAKTVfT1o6VzM0E0jF+1rWcUuHvdyg7vgoFplX8HpvHpMCOMRUPHzZkInsqlFKNX/EIO52E0SxSzOwob2VmRLW5D1XIU0rbgM1AzWgyC7fe8G7xUAK/taEBat7luqtyP7EmsaJQOj5F+mrnZfCuYCfBUAWwShyd6pMY/vAHG1UqOYpbI/gy5T0CMKm+UO3gFuC85dgfDVeguPDfITrIBLsLrcgdh3CFgFZjaKJ4Iv3F8ANEqvuxR1tVKOgLoCa1jxboBAkj6v7j/icFbA7f4rfRnQDLRViG13i0vqBQrYVqBbADZT0ZpiHoSzvQpopKIFS3sE1HfBWlHXd0H7LnArqvougMtljHBgZnh3Eoz/BKjLML4Z2Aq0+hEJr9jaVUBbvNzCIUiroC7AWmmFw4o5AK3MtB5VypZMSFgs05JyGVwlwBqsEGAAa2ZU1CjUexXGsE4rKriilBvFzOKKo3AuAroE6QFQU3u8YpNXwS5k+1TZt5UrwouN4KiUEw+k3ZWDp1RXHNRqXb21Ts39945yZSg3VnZFNQ9CF3XeZyr5DgBXKiwCMa2MxeTDYXgP1Fsf9QNKZc0k81RJk3r6EQ3rCmBVyLL75EjZ1pIVDHoFtiOAHoB0BdTVylqBsKKKS+AeBXJVLY+CXASuGvO/Auq7GuEjDfGKg1oKa1z/dmmi9I9SUGNhl0AtfulHAawoYrnSkmNXAVuGEhrEVXvUF+A5Ct2PqNOjDetyna4CmeUolmeXLN4Aq7C5Sj10Q7yjgl+t6CNxSRHmI5X+CpwreYB3Qfdqna4q21KdBuc4GoZsn49ZOOiVinwHqK9WzjvgeweEh2AU5+vtxZ9Cd9Wqkh49V18E5oj6vVyn0RStAyGIO5edXRKd5B0VGVXq2yr3xYp+5Ut+C4QJ4P1N339pQMjRejj4vb/Dcr6rQc3O/0rjmtZpeYCBiCHfCemRbNhbK/pNUPc3wfKy5f2D7OlL3/uPhve/oU4T0F8f+VNM2vyoiv0jK+KHQfdHq+0bncz4oz73/+Y6LbKw1o/5B7eOf1Rl/0du9B9tn/9bvrf/j+v0h6ttn2tp/r/4819y4/zv5391uvzzfwDifz6phT1MPgAAAABJRU5ErkJggg==');\n}\n\n.color-picker .cp-add-color-button-class {\n position: absolute;\n\n display: inline;\n padding: 0;\n margin: 3px -3px;\n border: 0;\n\n cursor: pointer;\n background: transparent;\n}\n\n.color-picker .cp-add-color-button-class:hover {\n text-decoration: underline;\n}\n\n.color-picker .cp-add-color-button-class:disabled {\n cursor: not-allowed;\n color: #999;\n}\n\n.color-picker .cp-add-color-button-class:disabled:hover {\n text-decoration: none;\n}\n\n.color-picker .cp-remove-color-button-class {\n position: absolute;\n top: -5px;\n right: -5px;\n\n display: block;\n width: 10px;\n height: 10px;\n border-radius: 50%;\n\n cursor: pointer;\n text-align: center;\n background: #fff;\n\n box-shadow: 1px 1px 5px #333;\n}\n\n.color-picker .cp-remove-color-button-class::before {\n content: 'x';\n\n position: relative;\n bottom: 3.5px;\n\n display: inline-block;\n\n font-size: 10px;\n}\n"],data:{}});function Tg(t){return bs(0,[(t()(),to(0,0,null,null,0,"div",[],[[8,"className",0],[4,"top","px"]],null,null,null,null))],null,function(t,e){var n=e.component;t(e,0,0,Qr(1,"arrow arrow-",n.cpPosition,""),n.arrowTop)})}function Og(t){return bs(0,[(t()(),to(0,0,null,null,1,"button",[],[[8,"className",0],[8,"disabled",0]],[[null,"click"]],function(t,e,n){var i=!0,r=t.component;return"click"===e&&(i=!1!==r.onAddPresetColor(n,r.selectedColor)&&i),i},null,null)),(t()(),ms(1,null,[" "," "]))],null,function(t,e){var n=e.component;t(e,0,0,Qr(1,"",n.cpAddColorButtonClass,""),n.cpPresetColors&&n.cpPresetColors.length>=n.cpMaxPresetColorsLength),t(e,1,0,n.cpAddColorButtonText)})}function Ig(t){return bs(0,[(t()(),to(0,0,null,null,0,"div",[["style","height: 16px;"]],null,null,null,null,null))],null,null)}function Ag(t){return bs(0,[(t()(),to(0,0,null,null,1,"input",[["max","1"],["min","0"],["pattern","[0-9]+([\\.,][0-9]{1,2})?"],["step","0.1"],["type","number"]],[[8,"value",0]],[[null,"keyup.enter"],[null,"newValue"],[null,"input"]],function(t,e,n){var i=!0,r=t.component;return"input"===e&&(i=!1!==Ao(t,1).inputChange(n)&&i),"keyup.enter"===e&&(i=!1!==r.onAcceptColor(n)&&i),"newValue"===e&&(i=!1!==r.onAlphaInput(n)&&i),i},null,null)),Wo(1,16384,null,0,yg,[],{rg:[0,"rg"]},{newValue:"newValue"})],function(t,e){t(e,1,0,1)},function(t,e){var n=e.component;t(e,0,0,null==n.hslaText?null:n.hslaText.a)})}function Pg(t){return bs(0,[(t()(),to(0,0,null,null,1,"div",[],null,null,null,null,null)),(t()(),ms(-1,null,["A"]))],null,null)}function Dg(t){return bs(0,[(t()(),to(0,0,null,null,18,"div",[["class","hsla-text"]],[[4,"display",null]],null,null,null,null)),(t()(),to(1,0,null,null,8,"div",[["class","box"]],null,null,null,null,null)),(t()(),to(2,0,null,null,1,"input",[["max","360"],["min","0"],["pattern","[0-9]*"],["type","number"]],[[8,"value",0]],[[null,"keyup.enter"],[null,"newValue"],[null,"input"]],function(t,e,n){var i=!0,r=t.component;return"input"===e&&(i=!1!==Ao(t,3).inputChange(n)&&i),"keyup.enter"===e&&(i=!1!==r.onAcceptColor(n)&&i),"newValue"===e&&(i=!1!==r.onHueInput(n)&&i),i},null,null)),Wo(3,16384,null,0,yg,[],{rg:[0,"rg"]},{newValue:"newValue"}),(t()(),to(4,0,null,null,1,"input",[["max","100"],["min","0"],["pattern","[0-9]*"],["type","number"]],[[8,"value",0]],[[null,"keyup.enter"],[null,"newValue"],[null,"input"]],function(t,e,n){var i=!0,r=t.component;return"input"===e&&(i=!1!==Ao(t,5).inputChange(n)&&i),"keyup.enter"===e&&(i=!1!==r.onAcceptColor(n)&&i),"newValue"===e&&(i=!1!==r.onSaturationInput(n)&&i),i},null,null)),Wo(5,16384,null,0,yg,[],{rg:[0,"rg"]},{newValue:"newValue"}),(t()(),to(6,0,null,null,1,"input",[["max","100"],["min","0"],["pattern","[0-9]*"],["type","number"]],[[8,"value",0]],[[null,"keyup.enter"],[null,"newValue"],[null,"input"]],function(t,e,n){var i=!0,r=t.component;return"input"===e&&(i=!1!==Ao(t,7).inputChange(n)&&i),"keyup.enter"===e&&(i=!1!==r.onAcceptColor(n)&&i),"newValue"===e&&(i=!1!==r.onLightnessInput(n)&&i),i},null,null)),Wo(7,16384,null,0,yg,[],{rg:[0,"rg"]},{newValue:"newValue"}),(t()(),$r(16777216,null,null,1,null,Ag)),Wo(9,16384,null,0,Wu,[ri,ii],{ngIf:[0,"ngIf"]},null),(t()(),to(10,0,null,null,8,"div",[["class","box"]],null,null,null,null,null)),(t()(),to(11,0,null,null,1,"div",[],null,null,null,null,null)),(t()(),ms(-1,null,["H"])),(t()(),to(13,0,null,null,1,"div",[],null,null,null,null,null)),(t()(),ms(-1,null,["S"])),(t()(),to(15,0,null,null,1,"div",[],null,null,null,null,null)),(t()(),ms(-1,null,["L"])),(t()(),$r(16777216,null,null,1,null,Pg)),Wo(18,16384,null,0,Wu,[ri,ii],{ngIf:[0,"ngIf"]},null)],function(t,e){var n=e.component;t(e,3,0,360),t(e,5,0,100),t(e,7,0,100),t(e,9,0,"disabled"!==n.cpAlphaChannel),t(e,18,0,"disabled"!==n.cpAlphaChannel)},function(t,e){var n=e.component;t(e,0,0,2!==n.format?"none":"block"),t(e,2,0,null==n.hslaText?null:n.hslaText.h),t(e,4,0,null==n.hslaText?null:n.hslaText.s),t(e,6,0,null==n.hslaText?null:n.hslaText.l)})}function jg(t){return bs(0,[(t()(),to(0,0,null,null,1,"input",[["max","1"],["min","0"],["pattern","[0-9]+([\\.,][0-9]{1,2})?"],["step","0.1"],["type","number"]],[[8,"value",0]],[[null,"keyup.enter"],[null,"newValue"],[null,"input"]],function(t,e,n){var i=!0,r=t.component;return"input"===e&&(i=!1!==Ao(t,1).inputChange(n)&&i),"keyup.enter"===e&&(i=!1!==r.onAcceptColor(n)&&i),"newValue"===e&&(i=!1!==r.onAlphaInput(n)&&i),i},null,null)),Wo(1,16384,null,0,yg,[],{rg:[0,"rg"]},{newValue:"newValue"})],function(t,e){t(e,1,0,1)},function(t,e){var n=e.component;t(e,0,0,null==n.rgbaText?null:n.rgbaText.a)})}function Mg(t){return bs(0,[(t()(),to(0,0,null,null,1,"div",[],null,null,null,null,null)),(t()(),ms(-1,null,["A"]))],null,null)}function Rg(t){return bs(0,[(t()(),to(0,0,null,null,18,"div",[["class","rgba-text"]],[[4,"display",null]],null,null,null,null)),(t()(),to(1,0,null,null,8,"div",[["class","box"]],null,null,null,null,null)),(t()(),to(2,0,null,null,1,"input",[["max","255"],["min","0"],["pattern","[0-9]*"],["type","number"]],[[8,"value",0]],[[null,"keyup.enter"],[null,"newValue"],[null,"input"]],function(t,e,n){var i=!0,r=t.component;return"input"===e&&(i=!1!==Ao(t,3).inputChange(n)&&i),"keyup.enter"===e&&(i=!1!==r.onAcceptColor(n)&&i),"newValue"===e&&(i=!1!==r.onRedInput(n)&&i),i},null,null)),Wo(3,16384,null,0,yg,[],{rg:[0,"rg"]},{newValue:"newValue"}),(t()(),to(4,0,null,null,1,"input",[["max","255"],["min","0"],["pattern","[0-9]*"],["type","number"]],[[8,"value",0]],[[null,"keyup.enter"],[null,"newValue"],[null,"input"]],function(t,e,n){var i=!0,r=t.component;return"input"===e&&(i=!1!==Ao(t,5).inputChange(n)&&i),"keyup.enter"===e&&(i=!1!==r.onAcceptColor(n)&&i),"newValue"===e&&(i=!1!==r.onGreenInput(n)&&i),i},null,null)),Wo(5,16384,null,0,yg,[],{rg:[0,"rg"]},{newValue:"newValue"}),(t()(),to(6,0,null,null,1,"input",[["max","255"],["min","0"],["pattern","[0-9]*"],["type","number"]],[[8,"value",0]],[[null,"keyup.enter"],[null,"newValue"],[null,"input"]],function(t,e,n){var i=!0,r=t.component;return"input"===e&&(i=!1!==Ao(t,7).inputChange(n)&&i),"keyup.enter"===e&&(i=!1!==r.onAcceptColor(n)&&i),"newValue"===e&&(i=!1!==r.onBlueInput(n)&&i),i},null,null)),Wo(7,16384,null,0,yg,[],{rg:[0,"rg"]},{newValue:"newValue"}),(t()(),$r(16777216,null,null,1,null,jg)),Wo(9,16384,null,0,Wu,[ri,ii],{ngIf:[0,"ngIf"]},null),(t()(),to(10,0,null,null,8,"div",[["class","box"]],null,null,null,null,null)),(t()(),to(11,0,null,null,1,"div",[],null,null,null,null,null)),(t()(),ms(-1,null,["R"])),(t()(),to(13,0,null,null,1,"div",[],null,null,null,null,null)),(t()(),ms(-1,null,["G"])),(t()(),to(15,0,null,null,1,"div",[],null,null,null,null,null)),(t()(),ms(-1,null,["B"])),(t()(),$r(16777216,null,null,1,null,Mg)),Wo(18,16384,null,0,Wu,[ri,ii],{ngIf:[0,"ngIf"]},null)],function(t,e){var n=e.component;t(e,3,0,255),t(e,5,0,255),t(e,7,0,255),t(e,9,0,"disabled"!==n.cpAlphaChannel),t(e,18,0,"disabled"!==n.cpAlphaChannel)},function(t,e){var n=e.component;t(e,0,0,1!==n.format?"none":"block"),t(e,2,0,null==n.rgbaText?null:n.rgbaText.r),t(e,4,0,null==n.rgbaText?null:n.rgbaText.g),t(e,6,0,null==n.rgbaText?null:n.rgbaText.b)})}function Fg(t){return bs(0,[(t()(),to(0,0,null,null,1,"input",[["max","1"],["min","0"],["pattern","[0-9]+([\\.,][0-9]{1,2})?"],["step","0.1"],["type","number"]],[[8,"value",0]],[[null,"keyup.enter"],[null,"newValue"],[null,"input"]],function(t,e,n){var i=!0,r=t.component;return"input"===e&&(i=!1!==Ao(t,1).inputChange(n)&&i),"keyup.enter"===e&&(i=!1!==r.onAcceptColor(n)&&i),"newValue"===e&&(i=!1!==r.onAlphaInput(n)&&i),i},null,null)),Wo(1,16384,null,0,yg,[],{rg:[0,"rg"]},{newValue:"newValue"})],function(t,e){t(e,1,0,1)},function(t,e){t(e,0,0,e.component.hexAlpha)})}function Ng(t){return bs(0,[(t()(),to(0,0,null,null,1,"div",[],null,null,null,null,null)),(t()(),ms(-1,null,["A"]))],null,null)}function Lg(t){return bs(0,[(t()(),to(0,0,null,null,10,"div",[["class","hex-text"]],[[2,"hex-alpha",null],[4,"display",null]],null,null,null,null)),(t()(),to(1,0,null,null,4,"div",[["class","box"]],null,null,null,null,null)),(t()(),to(2,0,null,null,1,"input",[],[[8,"value",0]],[[null,"blur"],[null,"keyup.enter"],[null,"newValue"],[null,"input"]],function(t,e,n){var i=!0,r=t.component;return"input"===e&&(i=!1!==Ao(t,3).inputChange(n)&&i),"blur"===e&&(i=!1!==r.onHexInput(null)&&i),"keyup.enter"===e&&(i=!1!==r.onAcceptColor(n)&&i),"newValue"===e&&(i=!1!==r.onHexInput(n)&&i),i},null,null)),Wo(3,16384,null,0,yg,[],null,{newValue:"newValue"}),(t()(),$r(16777216,null,null,1,null,Fg)),Wo(5,16384,null,0,Wu,[ri,ii],{ngIf:[0,"ngIf"]},null),(t()(),to(6,0,null,null,4,"div",[["class","box"]],null,null,null,null,null)),(t()(),to(7,0,null,null,1,"div",[],null,null,null,null,null)),(t()(),ms(-1,null,["Hex"])),(t()(),$r(16777216,null,null,1,null,Ng)),Wo(10,16384,null,0,Wu,[ri,ii],{ngIf:[0,"ngIf"]},null)],function(t,e){var n=e.component;t(e,5,0,"forced"===n.cpAlphaChannel),t(e,10,0,"forced"===n.cpAlphaChannel)},function(t,e){var n=e.component;t(e,0,0,"forced"===n.cpAlphaChannel,0!==n.format?"none":"block"),t(e,2,0,n.hexText)})}function Bg(t){return bs(0,[(t()(),to(0,0,null,null,0,"div",[["class","type-policy"]],null,[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.onFormatToggle()&&i),i},null,null))],null,null)}function Vg(t){return bs(0,[(t()(),to(0,0,null,null,0,"span",[],[[8,"className",0]],[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.onRemovePresetColor(n,t.parent.context.$implicit)&&i),i},null,null))],null,function(t,e){t(e,0,0,Qr(1,"",e.component.cpRemoveColorButtonClass,""))})}function zg(t){return bs(0,[(t()(),to(0,0,null,null,2,"div",[["class","preset-color"]],[[4,"backgroundColor",null]],[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.setColorFromString(t.context.$implicit)&&i),i},null,null)),(t()(),$r(16777216,null,null,1,null,Vg)),Wo(2,16384,null,0,Wu,[ri,ii],{ngIf:[0,"ngIf"]},null)],function(t,e){t(e,2,0,e.component.cpAddColorButton)},function(t,e){t(e,0,0,e.context.$implicit)})}function Hg(t){return bs(0,[(t()(),to(0,0,null,null,2,"div",[],null,null,null,null,null)),(t()(),$r(16777216,null,null,1,null,zg)),Wo(2,278528,null,0,zu,[ri,ii,Ei],{ngForOf:[0,"ngForOf"]},null)],function(t,e){t(e,2,0,e.component.cpPresetColors)},null)}function Wg(t){return bs(0,[(t()(),to(0,0,null,null,1,"div",[],[[8,"className",0]],null,null,null,null)),(t()(),ms(1,null,["",""]))],null,function(t,e){var n=e.component;t(e,0,0,Qr(1,"",n.cpPresetEmptyMessageClass,"")),t(e,1,0,n.cpPresetEmptyMessage)})}function Ug(t){return bs(0,[(t()(),to(0,0,null,null,7,"div",[["class","preset-area"]],null,null,null,null,null)),(t()(),to(1,0,null,null,0,"hr",[],null,null,null,null,null)),(t()(),to(2,0,null,null,1,"div",[["class","preset-label"]],null,null,null,null,null)),(t()(),ms(3,null,["",""])),(t()(),$r(16777216,null,null,1,null,Hg)),Wo(5,16384,null,0,Wu,[ri,ii],{ngIf:[0,"ngIf"]},null),(t()(),$r(16777216,null,null,1,null,Wg)),Wo(7,16384,null,0,Wu,[ri,ii],{ngIf:[0,"ngIf"]},null)],function(t,e){var n=e.component;t(e,5,0,null==n.cpPresetColors?null:n.cpPresetColors.length),t(e,7,0,!(null!=n.cpPresetColors&&n.cpPresetColors.length)&&n.cpAddColorButton)},function(t,e){t(e,3,0,e.component.cpPresetLabel)})}function Xg(t){return bs(0,[(t()(),to(0,0,null,null,1,"button",[["type","button"]],[[8,"className",0]],[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.onCancelColor(n)&&i),i},null,null)),(t()(),ms(1,null,["",""]))],null,function(t,e){var n=e.component;t(e,0,0,Qr(1,"",n.cpCancelButtonClass,"")),t(e,1,0,n.cpCancelButtonText)})}function Yg(t){return bs(0,[(t()(),to(0,0,null,null,1,"button",[["type","button"]],[[8,"className",0]],[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.onAcceptColor(n)&&i),i},null,null)),(t()(),ms(1,null,["",""]))],null,function(t,e){var n=e.component;t(e,0,0,Qr(1,"",n.cpOKButtonClass,"")),t(e,1,0,n.cpOKButtonText)})}function qg(t){return bs(0,[(t()(),to(0,0,null,null,4,"div",[["class","button-area"]],null,null,null,null,null)),(t()(),$r(16777216,null,null,1,null,Xg)),Wo(2,16384,null,0,Wu,[ri,ii],{ngIf:[0,"ngIf"]},null),(t()(),$r(16777216,null,null,1,null,Yg)),Wo(4,16384,null,0,Wu,[ri,ii],{ngIf:[0,"ngIf"]},null)],function(t,e){var n=e.component;t(e,2,0,n.cpCancelButton),t(e,4,0,n.cpOKButton)},null)}function Gg(t){return bs(0,[ss(402653184,1,{hueSlider:0}),ss(402653184,2,{alphaSlider:0}),ss(402653184,3,{dialogElement:0}),(t()(),to(3,0,[[3,0],["dialogPopup",1]],null,32,"div",[["class","color-picker"]],[[4,"visibility",null],[4,"top","px"],[4,"left","px"],[4,"position",null],[4,"height","px"],[4,"width","px"]],null,null,null,null)),(t()(),$r(16777216,null,null,1,null,Tg)),Wo(5,16384,null,0,Wu,[ri,ii],{ngIf:[0,"ngIf"]},null),(t()(),to(6,0,null,null,2,"div",[["class","saturation-lightness"]],[[4,"background-color",null]],[[null,"newValue"],[null,"dragStart"],[null,"dragEnd"],[null,"mousedown"],[null,"touchstart"]],function(t,e,n){var i=!0,r=t.component;return"mousedown"===e&&(i=!1!==Ao(t,7).mouseDown(n)&&i),"touchstart"===e&&(i=!1!==Ao(t,7).touchStart(n)&&i),"newValue"===e&&(i=!1!==r.onColorChange(n)&&i),"dragStart"===e&&(i=!1!==r.onDragStart("saturation-lightness")&&i),"dragEnd"===e&&(i=!1!==r.onDragEnd("saturation-lightness")&&i),i},null,null)),Wo(7,16384,null,0,bg,[ei],{rgX:[0,"rgX"],rgY:[1,"rgY"]},{dragEnd:"dragEnd",dragStart:"dragStart",newValue:"newValue"}),(t()(),to(8,0,null,null,0,"div",[["class","cursor"]],[[4,"top","px"],[4,"left","px"]],null,null,null,null)),(t()(),to(9,0,null,null,14,"div",[["class","hue-alpha box"]],null,null,null,null,null)),(t()(),to(10,0,null,null,4,"div",[["class","left"]],null,null,null,null,null)),(t()(),to(11,0,null,null,0,"div",[["class","selected-color-background"]],null,null,null,null,null)),(t()(),to(12,0,null,null,0,"div",[["class","selected-color"]],[[4,"background-color",null]],null,null,null,null)),(t()(),$r(16777216,null,null,1,null,Og)),Wo(14,16384,null,0,Wu,[ri,ii],{ngIf:[0,"ngIf"]},null),(t()(),to(15,0,null,null,8,"div",[["class","right"]],null,null,null,null,null)),(t()(),$r(16777216,null,null,1,null,Ig)),Wo(17,16384,null,0,Wu,[ri,ii],{ngIf:[0,"ngIf"]},null),(t()(),to(18,0,[[1,0],["hueSlider",1]],null,2,"div",[["class","hue"]],null,[[null,"newValue"],[null,"dragStart"],[null,"dragEnd"],[null,"mousedown"],[null,"touchstart"]],function(t,e,n){var i=!0,r=t.component;return"mousedown"===e&&(i=!1!==Ao(t,19).mouseDown(n)&&i),"touchstart"===e&&(i=!1!==Ao(t,19).touchStart(n)&&i),"newValue"===e&&(i=!1!==r.onHueChange(n)&&i),"dragStart"===e&&(i=!1!==r.onDragStart("hue")&&i),"dragEnd"===e&&(i=!1!==r.onDragEnd("hue")&&i),i},null,null)),Wo(19,16384,null,0,bg,[ei],{rgX:[0,"rgX"]},{dragEnd:"dragEnd",dragStart:"dragStart",newValue:"newValue"}),(t()(),to(20,0,null,null,0,"div",[["class","cursor"]],[[4,"left","px"]],null,null,null,null)),(t()(),to(21,0,[[2,0],["alphaSlider",1]],null,2,"div",[["class","alpha"]],[[4,"display",null],[4,"background-color",null]],[[null,"newValue"],[null,"dragStart"],[null,"dragEnd"],[null,"mousedown"],[null,"touchstart"]],function(t,e,n){var i=!0,r=t.component;return"mousedown"===e&&(i=!1!==Ao(t,22).mouseDown(n)&&i),"touchstart"===e&&(i=!1!==Ao(t,22).touchStart(n)&&i),"newValue"===e&&(i=!1!==r.onAlphaChange(n)&&i),"dragStart"===e&&(i=!1!==r.onDragStart("alpha")&&i),"dragEnd"===e&&(i=!1!==r.onDragEnd("alpha")&&i),i},null,null)),Wo(22,16384,null,0,bg,[ei],{rgX:[0,"rgX"]},{dragEnd:"dragEnd",dragStart:"dragStart",newValue:"newValue"}),(t()(),to(23,0,null,null,0,"div",[["class","cursor"]],[[4,"left","px"]],null,null,null,null)),(t()(),$r(16777216,null,null,1,null,Dg)),Wo(25,16384,null,0,Wu,[ri,ii],{ngIf:[0,"ngIf"]},null),(t()(),$r(16777216,null,null,1,null,Rg)),Wo(27,16384,null,0,Wu,[ri,ii],{ngIf:[0,"ngIf"]},null),(t()(),$r(16777216,null,null,1,null,Lg)),Wo(29,16384,null,0,Wu,[ri,ii],{ngIf:[0,"ngIf"]},null),(t()(),$r(16777216,null,null,1,null,Bg)),Wo(31,16384,null,0,Wu,[ri,ii],{ngIf:[0,"ngIf"]},null),(t()(),$r(16777216,null,null,1,null,Ug)),Wo(33,16384,null,0,Wu,[ri,ii],{ngIf:[0,"ngIf"]},null),(t()(),$r(16777216,null,null,1,null,qg)),Wo(35,16384,null,0,Wu,[ri,ii],{ngIf:[0,"ngIf"]},null)],function(t,e){var n=e.component;t(e,5,0,"popup"==n.cpDialogDisplay),t(e,7,0,1,1),t(e,14,0,n.cpAddColorButton),t(e,17,0,"disabled"===n.cpAlphaChannel),t(e,19,0,1),t(e,22,0,1),t(e,25,0,!n.cpDisableInput),t(e,27,0,!n.cpDisableInput),t(e,29,0,!n.cpDisableInput),t(e,31,0,!n.cpDisableInput),t(e,33,0,(null==n.cpPresetColors?null:n.cpPresetColors.length)||n.cpAddColorButton),t(e,35,0,n.cpOKButton||n.cpCancelButton)},function(t,e){var n=e.component;t(e,3,0,n.hidden||!n.show?"hidden":"visible",n.top,n.left,n.position,n.cpHeight,n.cpWidth),t(e,6,0,n.hueSliderColor),t(e,8,0,n.slider.v,n.slider.s),t(e,12,0,n.selectedColor),t(e,20,0,n.slider.h),t(e,21,0,"disabled"===n.cpAlphaChannel?"none":"block",n.alphaSliderColor),t(e,23,0,n.slider.a)})}var Kg=bo("color-picker",Cg,function(t){return bs(0,[(t()(),to(0,0,null,null,1,"color-picker",[],null,[["document","keyup.esc"],["document","keyup.enter"]],function(t,e,n){var i=!0;return"document:keyup.esc"===e&&(i=!1!==Ao(t,1).handleEsc(n)&&i),"document:keyup.enter"===e&&(i=!1!==Ao(t,1).handleEnter(n)&&i),i},Gg,Eg)),Wo(1,4440064,null,0,Cg,[ei,oi,xg],null,null)],function(t,e){t(e,1,0)},null)},{},{},[]),Zg=function(){function t(t,e){this.data=t,this.overlayPanelRef=e}return t.prototype.ngOnInit=function(){var t=this;this.color=this.getInitialColor(),setTimeout(function(){t.trigger.nativeElement.click()})},t.prototype.emitSelectedEvent=function(t){this.color=t,this.overlayPanelRef.emitValue(t)},t.prototype.getInitialColor=function(){var t=this.data&&this.data.color||null;return t&&"rgba(0,0,0,0)"===t.replace(/ /g,"")&&(t=void 0),t},t}(),Qg=Sr({encapsulation:2,styles:[["colorpicker-panel{display:block;width:230px;height:277px}colorpicker-panel>.trigger{display:block}"]],data:{}});function Jg(t){return bs(0,[ss(402653184,1,{trigger:0}),(t()(),to(1,16777216,[[1,0],["trigger",1]],null,1,"div",[["class","trigger"]],null,[[null,"colorPickerChange"],[null,"click"],[null,"focus"],[null,"input"]],function(t,e,n){var i=!0,r=t.component;return"click"===e&&(i=!1!==Ao(t,2).handleClick(n)&&i),"focus"===e&&(i=!1!==Ao(t,2).handleFocus(n)&&i),"input"===e&&(i=!1!==Ao(t,2).handleInput(n)&&i),"colorPickerChange"===e&&(i=!1!==r.emitSelectedEvent(n)&&i),i},null,null)),Wo(2,671744,null,0,Sg,[Zt,_n,Zn,ri,ei,xg],{colorPicker:[0,"colorPicker"],cpToggle:[1,"cpToggle"],cpAlphaChannel:[2,"cpAlphaChannel"],cpDialogDisplay:[3,"cpDialogDisplay"]},{colorPickerChange:"colorPickerChange"})],function(t,e){t(e,2,0,e.component.color,!1,"always","inline")},null)}var $g=bo("colorpicker-panel",Zg,function(t){return bs(0,[(t()(),to(0,0,null,null,1,"colorpicker-panel",[],null,null,null,Jg,Qg)),Wo(1,114688,null,0,Zg,[[2,Bd],Ld],null,null)],function(t,e){t(e,1,0)},null)},{},{},[]),tm=function(){},em="*";function nm(t,e){return void 0===e&&(e=null),{type:2,steps:t,options:e}}function im(t){return{type:6,styles:t,offset:null}}function rm(t){Promise.resolve(null).then(t)}var om=function(){function t(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this.parentPlayer=null,this.totalTime=t+e}return t.prototype._onFinish=function(){this._finished||(this._finished=!0,this._onDoneFns.forEach(function(t){return t()}),this._onDoneFns=[])},t.prototype.onStart=function(t){this._onStartFns.push(t)},t.prototype.onDone=function(t){this._onDoneFns.push(t)},t.prototype.onDestroy=function(t){this._onDestroyFns.push(t)},t.prototype.hasStarted=function(){return this._started},t.prototype.init=function(){},t.prototype.play=function(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0},t.prototype.triggerMicrotask=function(){var t=this;rm(function(){return t._onFinish()})},t.prototype._onStart=function(){this._onStartFns.forEach(function(t){return t()}),this._onStartFns=[]},t.prototype.pause=function(){},t.prototype.restart=function(){},t.prototype.finish=function(){this._onFinish()},t.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(function(t){return t()}),this._onDestroyFns=[])},t.prototype.reset=function(){},t.prototype.setPosition=function(t){},t.prototype.getPosition=function(){return 0},t.prototype.triggerCallback=function(t){var e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(function(t){return t()}),e.length=0},t}(),sm=function(){function t(t){var e=this;this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=t;var n=0,i=0,r=0,o=this.players.length;0==o?rm(function(){return e._onFinish()}):this.players.forEach(function(t){t.onDone(function(){++n==o&&e._onFinish()}),t.onDestroy(function(){++i==o&&e._onDestroy()}),t.onStart(function(){++r==o&&e._onStart()})}),this.totalTime=this.players.reduce(function(t,e){return Math.max(t,e.totalTime)},0)}return t.prototype._onFinish=function(){this._finished||(this._finished=!0,this._onDoneFns.forEach(function(t){return t()}),this._onDoneFns=[])},t.prototype.init=function(){this.players.forEach(function(t){return t.init()})},t.prototype.onStart=function(t){this._onStartFns.push(t)},t.prototype._onStart=function(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(function(t){return t()}),this._onStartFns=[])},t.prototype.onDone=function(t){this._onDoneFns.push(t)},t.prototype.onDestroy=function(t){this._onDestroyFns.push(t)},t.prototype.hasStarted=function(){return this._started},t.prototype.play=function(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(function(t){return t.play()})},t.prototype.pause=function(){this.players.forEach(function(t){return t.pause()})},t.prototype.restart=function(){this.players.forEach(function(t){return t.restart()})},t.prototype.finish=function(){this._onFinish(),this.players.forEach(function(t){return t.finish()})},t.prototype.destroy=function(){this._onDestroy()},t.prototype._onDestroy=function(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(function(t){return t.destroy()}),this._onDestroyFns.forEach(function(t){return t()}),this._onDestroyFns=[])},t.prototype.reset=function(){this.players.forEach(function(t){return t.reset()}),this._destroyed=!1,this._finished=!1,this._started=!1},t.prototype.setPosition=function(t){var e=t*this.totalTime;this.players.forEach(function(t){var n=t.totalTime?Math.min(1,e/t.totalTime):1;t.setPosition(n)})},t.prototype.getPosition=function(){var t=0;return this.players.forEach(function(e){var n=e.getPosition();t=Math.min(n,t)}),t},t.prototype.beforeDestroy=function(){this.players.forEach(function(t){t.beforeDestroy&&t.beforeDestroy()})},t.prototype.triggerCallback=function(t){var e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(function(t){return t()}),e.length=0},t}(),am="!",lm=20;function um(t){return Error('Tooltip position "'+t+'" is invalid.')}var cm=new yt("mat-tooltip-scroll-strategy");function hm(t){return function(){return t.scrollStrategies.reposition({scrollThrottle:lm})}}var pm=new yt("mat-tooltip-default-options",{providedIn:"root",factory:function(){return{showDelay:0,hideDelay:0,touchendHideDelay:1500}}}),dm=function(){function t(t,e,n,i,r,o,s,a,l,u,c){var h=this;this._overlay=t,this._elementRef=e,this._scrollDispatcher=n,this._viewContainerRef=i,this._ngZone=r,this._platform=o,this._ariaDescriber=s,this._focusMonitor=a,this._scrollStrategy=l,this._dir=u,this._defaultOptions=c,this._position="below",this._disabled=!1,this.showDelay=this._defaultOptions.showDelay,this.hideDelay=this._defaultOptions.hideDelay,this._message="",this._manualListeners=new Map,this._destroyed=new at;var p=e.nativeElement;o.IOS||o.ANDROID?!o.IOS||"INPUT"!==p.nodeName&&"TEXTAREA"!==p.nodeName||(p.style.webkitUserSelect=p.style.userSelect=""):this._manualListeners.set("mouseenter",function(){return h.show()}).set("mouseleave",function(){return h.hide()}).forEach(function(t,e){return p.addEventListener(e,t)}),p.draggable&&"none"===p.style.webkitUserDrag&&(p.style.webkitUserDrag=""),a.monitor(p).pipe(hf(this._destroyed)).subscribe(function(t){t?"keyboard"===t&&r.run(function(){return h.show()}):r.run(function(){return h.hide(0)})})}return Object.defineProperty(t.prototype,"position",{get:function(){return this._position},set:function(t){t!==this._position&&(this._position=t,this._overlayRef&&(this._updatePosition(),this._tooltipInstance&&this._tooltipInstance.show(0),this._overlayRef.updatePosition()))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"disabled",{get:function(){return this._disabled},set:function(t){this._disabled=Vd(t),this._disabled&&this.hide(0)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"message",{get:function(){return this._message},set:function(t){this._ariaDescriber.removeDescription(this._elementRef.nativeElement,this._message),this._message=null!=t?(""+t).trim():"",!this._message&&this._isTooltipVisible()?this.hide(0):(this._updateTooltipMessage(),this._ariaDescriber.describe(this._elementRef.nativeElement,this.message))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"tooltipClass",{get:function(){return this._tooltipClass},set:function(t){this._tooltipClass=t,this._tooltipInstance&&this._setTooltipClass(this._tooltipClass)},enumerable:!0,configurable:!0}),t.prototype.ngOnDestroy=function(){var t=this;this._overlayRef&&(this._overlayRef.dispose(),this._tooltipInstance=null),this._platform.IOS||(this._manualListeners.forEach(function(e,n){return t._elementRef.nativeElement.removeEventListener(n,e)}),this._manualListeners.clear()),this._destroyed.next(),this._destroyed.complete(),this._ariaDescriber.removeDescription(this._elementRef.nativeElement,this.message),this._focusMonitor.stopMonitoring(this._elementRef.nativeElement)},t.prototype.show=function(t){var e=this;if(void 0===t&&(t=this.showDelay),!this.disabled&&this.message){var n=this._createOverlay();this._detach(),this._portal=this._portal||new Pd(fm,this._viewContainerRef),this._tooltipInstance=n.attach(this._portal).instance,this._tooltipInstance.afterHidden().pipe(hf(this._destroyed)).subscribe(function(){return e._detach()}),this._setTooltipClass(this._tooltipClass),this._updateTooltipMessage(),this._tooltipInstance.show(t)}},t.prototype.hide=function(t){void 0===t&&(t=this.hideDelay),this._tooltipInstance&&this._tooltipInstance.hide(t)},t.prototype.toggle=function(){this._isTooltipVisible()?this.hide():this.show()},t.prototype._isTooltipVisible=function(){return!!this._tooltipInstance&&this._tooltipInstance.isVisible()},t.prototype._handleKeydown=function(t){this._isTooltipVisible()&&27===t.keyCode&&(t.stopPropagation(),this.hide(0))},t.prototype._handleTouchend=function(){this.hide(this._defaultOptions.touchendHideDelay)},t.prototype._createOverlay=function(){var t=this;if(this._overlayRef)return this._overlayRef;var e=this._overlay.position().flexibleConnectedTo(this._elementRef).withTransformOriginOn(".mat-tooltip").withFlexibleDimensions(!1).withViewportMargin(8),n=this._scrollDispatcher.getAncestorScrollContainers(this._elementRef);return e.withScrollableContainers(n),e.positionChanges.pipe(hf(this._destroyed)).subscribe(function(e){t._tooltipInstance&&e.scrollableViewProperties.isOverlayClipped&&t._tooltipInstance.isVisible()&&t._ngZone.run(function(){return t.hide(0)})}),this._overlayRef=this._overlay.create({direction:this._dir,positionStrategy:e,panelClass:"mat-tooltip-panel",scrollStrategy:this._scrollStrategy()}),this._updatePosition(),this._overlayRef.detachments().pipe(hf(this._destroyed)).subscribe(function(){return t._detach()}),this._overlayRef},t.prototype._detach=function(){this._overlayRef&&this._overlayRef.hasAttached()&&this._overlayRef.detach(),this._tooltipInstance=null},t.prototype._updatePosition=function(){var t=this._overlayRef.getConfig().positionStrategy,e=this._getOrigin(),n=this._getOverlayPosition();t.withPositions([o({},e.main,n.main),o({},e.fallback,n.fallback)])},t.prototype._getOrigin=function(){var t,e=!this._dir||"ltr"==this._dir.value,n=this.position;if("above"==n||"below"==n)t={originX:"center",originY:"above"==n?"top":"bottom"};else if("before"==n||"left"==n&&e||"right"==n&&!e)t={originX:"start",originY:"center"};else{if(!("after"==n||"right"==n&&e||"left"==n&&!e))throw um(n);t={originX:"end",originY:"center"}}var i=this._invertPosition(t.originX,t.originY);return{main:t,fallback:{originX:i.x,originY:i.y}}},t.prototype._getOverlayPosition=function(){var t,e=!this._dir||"ltr"==this._dir.value,n=this.position;if("above"==n)t={overlayX:"center",overlayY:"bottom"};else if("below"==n)t={overlayX:"center",overlayY:"top"};else if("before"==n||"left"==n&&e||"right"==n&&!e)t={overlayX:"end",overlayY:"center"};else{if(!("after"==n||"right"==n&&e||"left"==n&&!e))throw um(n);t={overlayX:"start",overlayY:"center"}}var i=this._invertPosition(t.overlayX,t.overlayY);return{main:t,fallback:{overlayX:i.x,overlayY:i.y}}},t.prototype._updateTooltipMessage=function(){var t=this;this._tooltipInstance&&(this._tooltipInstance.message=this.message,this._tooltipInstance._markForCheck(),this._ngZone.onMicrotaskEmpty.asObservable().pipe(lf(1),hf(this._destroyed)).subscribe(function(){t._tooltipInstance&&t._overlayRef.updatePosition()}))},t.prototype._setTooltipClass=function(t){this._tooltipInstance&&(this._tooltipInstance.tooltipClass=t,this._tooltipInstance._markForCheck())},t.prototype._invertPosition=function(t,e){return"above"===this.position||"below"===this.position?"top"===e?e="bottom":"bottom"===e&&(e="top"):"end"===t?t="start":"start"===t&&(t="end"),{x:t,y:e}},t}(),fm=function(){function t(t,e){this._changeDetectorRef=t,this._breakpointObserver=e,this._visibility="initial",this._closeOnInteraction=!1,this._onHide=new at,this._isHandset=this._breakpointObserver.observe(Gf.Handset)}return t.prototype.show=function(t){var e=this;this._hideTimeoutId&&clearTimeout(this._hideTimeoutId),this._closeOnInteraction=!0,this._showTimeoutId=setTimeout(function(){e._visibility="visible",e._markForCheck()},t)},t.prototype.hide=function(t){var e=this;this._showTimeoutId&&clearTimeout(this._showTimeoutId),this._hideTimeoutId=setTimeout(function(){e._visibility="hidden",e._markForCheck()},t)},t.prototype.afterHidden=function(){return this._onHide.asObservable()},t.prototype.isVisible=function(){return"visible"===this._visibility},t.prototype._animationStart=function(){this._closeOnInteraction=!1},t.prototype._animationDone=function(t){var e=t.toState;"hidden"!==e||this.isVisible()||this._onHide.next(),"visible"!==e&&"hidden"!==e||(this._closeOnInteraction=!0)},t.prototype._handleBodyInteraction=function(){this._closeOnInteraction&&this.hide(0)},t.prototype._markForCheck=function(){this._changeDetectorRef.markForCheck()},t}(),gm=function(){};function mm(t,e){return void 0===e&&(e=Zd),function(n){return n.lift(new vm(t,e))}}var vm=function(){function t(t,e){this.dueTime=t,this.scheduler=e}return t.prototype.call=function(t,e){return e.subscribe(new ym(t,this.dueTime,this.scheduler))},t}(),ym=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.dueTime=n,r.scheduler=i,r.debouncedSubscription=null,r.lastValue=null,r.hasValue=!1,r}return r(e,t),e.prototype._next=function(t){this.clearDebounce(),this.lastValue=t,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(bm,this.dueTime,this))},e.prototype._complete=function(){this.debouncedNext(),this.destination.complete()},e.prototype.debouncedNext=function(){if(this.clearDebounce(),this.hasValue){var t=this.lastValue;this.lastValue=null,this.hasValue=!1,this.destination.next(t)}},e.prototype.clearDebounce=function(){var t=this.debouncedSubscription;null!==t&&(this.remove(t),t.unsubscribe(),this.debouncedSubscription=null)},e}(O);function bm(t){t.debouncedNext()}var _m=function(){function t(){}return t.prototype.create=function(t){return"undefined"==typeof MutationObserver?null:new MutationObserver(t)},t.ngInjectableDef=vt({factory:function(){return new t},token:t,providedIn:"root"}),t}(),wm=function(){function t(t){this._mutationObserverFactory=t,this._observedElements=new Map}return t.prototype.ngOnDestroy=function(){var t=this;this._observedElements.forEach(function(e,n){return t._cleanupObserver(n)})},t.prototype.observe=function(t){var e=this,n=t instanceof ei?t.nativeElement:t;return D.create(function(t){var i=e._observeElement(n).subscribe(t);return function(){i.unsubscribe(),e._unobserveElement(n)}})},t.prototype._observeElement=function(t){if(this._observedElements.has(t))this._observedElements.get(t).count++;else{var e=new at,n=this._mutationObserverFactory.create(function(t){return e.next(t)});n&&n.observe(t,{characterData:!0,childList:!0,subtree:!0}),this._observedElements.set(t,{observer:n,stream:e,count:1})}return this._observedElements.get(t).stream},t.prototype._unobserveElement=function(t){this._observedElements.has(t)&&(this._observedElements.get(t).count--,this._observedElements.get(t).count||this._cleanupObserver(t))},t.prototype._cleanupObserver=function(t){if(this._observedElements.has(t)){var e=this._observedElements.get(t),n=e.observer,i=e.stream;n&&n.disconnect(),i.complete(),this._observedElements.delete(t)}},t.ngInjectableDef=vt({factory:function(){return new t(pe(_m))},token:t,providedIn:"root"}),t}(),xm=function(){function t(t,e,n){this._contentObserver=t,this._elementRef=e,this._ngZone=n,this.event=new In,this._disabled=!1,this._currentSubscription=null}return Object.defineProperty(t.prototype,"disabled",{get:function(){return this._disabled},set:function(t){this._disabled=Vd(t),this._disabled?this._unsubscribe():this._subscribe()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"debounce",{get:function(){return this._debounce},set:function(t){this._debounce=zd(t),this._subscribe()},enumerable:!0,configurable:!0}),t.prototype.ngAfterContentInit=function(){this._currentSubscription||this.disabled||this._subscribe()},t.prototype.ngOnDestroy=function(){this._unsubscribe()},t.prototype._subscribe=function(){var t=this;this._unsubscribe();var e=this._contentObserver.observe(this._elementRef);this._ngZone.runOutsideAngular(function(){t._currentSubscription=(t.debounce?e.pipe(mm(t.debounce)):e).subscribe(t.event)})},t.prototype._unsubscribe=function(){this._currentSubscription&&this._currentSubscription.unsubscribe()},t}(),Cm=function(){},Sm=new yt("cdk-dir-doc",{providedIn:"root",factory:function(){return pe(tc)}}),km=function(){function t(t){if(this.value="ltr",this.change=new In,t){var e=(t.body?t.body.dir:null)||(t.documentElement?t.documentElement.dir:null);this.value="ltr"===e||"rtl"===e?e:"ltr"}}return t.prototype.ngOnDestroy=function(){this.change.complete()},t.ngInjectableDef=vt({factory:function(){return new t(pe(Sm,8))},token:t,providedIn:"root"}),t}(),Em=function(){};function Tm(t,e,n){return function(i){return i.lift(new Om(t,e,n))}}var Om=function(){function t(t,e,n){this.nextOrObserver=t,this.error=e,this.complete=n}return t.prototype.call=function(t,e){return e.subscribe(new Im(t,this.nextOrObserver,this.error,this.complete))},t}(),Im=function(t){function e(e,n,i,r){var o=t.call(this,e)||this;return o._tapNext=P,o._tapError=P,o._tapComplete=P,o._tapError=i||P,o._tapComplete=r||P,p(n)?(o._context=o,o._tapNext=n):n&&(o._context=n,o._tapNext=n.next||P,o._tapError=n.error||P,o._tapComplete=n.complete||P),o}return r(e,t),e.prototype._next=function(t){try{this._tapNext.call(this._context,t)}catch(t){return void this.destination.error(t)}this.destination.next(t)},e.prototype._error=function(t){try{this._tapError.call(this._context,t)}catch(t){return void this.destination.error(t)}this.destination.error(t)},e.prototype._complete=function(){try{this._tapComplete.call(this._context)}catch(t){return void this.destination.error(t)}return this.destination.complete()},e}(O);function Am(t,e){return(t.getAttribute(e)||"").match(/\S+/g)||[]}var Pm=0,Dm=new Map,jm=null,Mm=function(){function t(t){this._document=t}return t.prototype.describe=function(t,e){this._canBeDescribed(t,e)&&(Dm.has(e)||this._createMessageElement(e),this._isElementDescribedByMessage(t,e)||this._addMessageReference(t,e))},t.prototype.removeDescription=function(t,e){if(this._canBeDescribed(t,e)){this._isElementDescribedByMessage(t,e)&&this._removeMessageReference(t,e);var n=Dm.get(e);n&&0===n.referenceCount&&this._deleteMessageElement(e),jm&&0===jm.childNodes.length&&this._deleteMessagesContainer()}},t.prototype.ngOnDestroy=function(){for(var t=this._document.querySelectorAll("[cdk-describedby-host]"),e=0;e<t.length;e++)this._removeCdkDescribedByReferenceIds(t[e]),t[e].removeAttribute("cdk-describedby-host");jm&&this._deleteMessagesContainer(),Dm.clear()},t.prototype._createMessageElement=function(t){var e=this._document.createElement("div");e.setAttribute("id","cdk-describedby-message-"+Pm++),e.appendChild(this._document.createTextNode(t)),this._createMessagesContainer(),jm.appendChild(e),Dm.set(t,{messageElement:e,referenceCount:0})},t.prototype._deleteMessageElement=function(t){var e=Dm.get(t),n=e&&e.messageElement;jm&&n&&jm.removeChild(n),Dm.delete(t)},t.prototype._createMessagesContainer=function(){if(!jm){var t=this._document.getElementById("cdk-describedby-message-container");t&&t.parentNode.removeChild(t),(jm=this._document.createElement("div")).id="cdk-describedby-message-container",jm.setAttribute("aria-hidden","true"),jm.style.display="none",this._document.body.appendChild(jm)}},t.prototype._deleteMessagesContainer=function(){jm&&jm.parentNode&&(jm.parentNode.removeChild(jm),jm=null)},t.prototype._removeCdkDescribedByReferenceIds=function(t){var e=Am(t,"aria-describedby").filter(function(t){return 0!=t.indexOf("cdk-describedby-message")});t.setAttribute("aria-describedby",e.join(" "))},t.prototype._addMessageReference=function(t,e){var n,i,r,o,s=Dm.get(e);r=s.messageElement.id,(o=Am(n=t,i="aria-describedby")).some(function(t){return t.trim()==r.trim()})||(o.push(r.trim()),n.setAttribute(i,o.join(" "))),t.setAttribute("cdk-describedby-host",""),s.referenceCount++},t.prototype._removeMessageReference=function(t,e){var n,i,r,o,s=Dm.get(e);s.referenceCount--,r=s.messageElement.id,o=Am(n=t,i="aria-describedby").filter(function(t){return t!=r.trim()}),n.setAttribute(i,o.join(" ")),t.removeAttribute("cdk-describedby-host")},t.prototype._isElementDescribedByMessage=function(t,e){var n=Am(t,"aria-describedby"),i=Dm.get(e),r=i&&i.messageElement.id;return!!r&&-1!=n.indexOf(r)},t.prototype._canBeDescribed=function(t,e){return t.nodeType===this._document.ELEMENT_NODE&&null!=e&&!!(""+e).trim()},t.ngInjectableDef=vt({factory:function(){return new t(pe(tc))},token:t,providedIn:"root"}),t}(),Rm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._origin="program",e}return r(e,t),e.prototype.setFocusOrigin=function(t){return this._origin=t,this},e.prototype.setActiveItem=function(e){t.prototype.setActiveItem.call(this,e),this.activeItem&&this.activeItem.focus(this._origin)},e}(function(){function t(t){var e=this;this._items=t,this._activeItemIndex=-1,this._wrap=!1,this._letterKeyStream=new at,this._typeaheadSubscription=k.EMPTY,this._vertical=!0,this._skipPredicateFn=function(t){return t.disabled},this._pressedLetters=[],this.tabOut=new at,this.change=new at,t instanceof ni&&t.changes.subscribe(function(t){if(e._activeItem){var n=t.toArray().indexOf(e._activeItem);n>-1&&n!==e._activeItemIndex&&(e._activeItemIndex=n)}})}return t.prototype.skipPredicate=function(t){return this._skipPredicateFn=t,this},t.prototype.withWrap=function(t){return void 0===t&&(t=!0),this._wrap=t,this},t.prototype.withVerticalOrientation=function(t){return void 0===t&&(t=!0),this._vertical=t,this},t.prototype.withHorizontalOrientation=function(t){return this._horizontal=t,this},t.prototype.withTypeAhead=function(t){var e=this;if(void 0===t&&(t=200),this._items.length&&this._items.some(function(t){return"function"!=typeof t.getLabel}))throw Error("ListKeyManager items in typeahead mode must implement the `getLabel` method.");return this._typeaheadSubscription.unsubscribe(),this._typeaheadSubscription=this._letterKeyStream.pipe(Tm(function(t){return e._pressedLetters.push(t)}),mm(t),Tu(function(){return e._pressedLetters.length>0}),Y(function(){return e._pressedLetters.join("")})).subscribe(function(t){for(var n=e._getItemsArray(),i=1;i<n.length+1;i++){var r=(e._activeItemIndex+i)%n.length,o=n[r];if(!e._skipPredicateFn(o)&&0===o.getLabel().toUpperCase().trim().indexOf(t)){e.setActiveItem(r);break}}e._pressedLetters=[]}),this},t.prototype.setActiveItem=function(t){var e=this._activeItemIndex;this.updateActiveItem(t),this._activeItemIndex!==e&&this.change.next(this._activeItemIndex)},t.prototype.onKeydown=function(t){var e=t.keyCode;switch(e){case 9:return void this.tabOut.next();case 40:if(this._vertical){this.setNextItemActive();break}return;case 38:if(this._vertical){this.setPreviousItemActive();break}return;case 39:if("ltr"===this._horizontal){this.setNextItemActive();break}if("rtl"===this._horizontal){this.setPreviousItemActive();break}return;case 37:if("ltr"===this._horizontal){this.setPreviousItemActive();break}if("rtl"===this._horizontal){this.setNextItemActive();break}return;default:return void(t.key&&1===t.key.length?this._letterKeyStream.next(t.key.toLocaleUpperCase()):(e>=65&&e<=90||e>=48&&e<=57)&&this._letterKeyStream.next(String.fromCharCode(e)))}this._pressedLetters=[],t.preventDefault()},Object.defineProperty(t.prototype,"activeItemIndex",{get:function(){return this._activeItemIndex},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"activeItem",{get:function(){return this._activeItem},enumerable:!0,configurable:!0}),t.prototype.setFirstItemActive=function(){this._setActiveItemByIndex(0,1)},t.prototype.setLastItemActive=function(){this._setActiveItemByIndex(this._items.length-1,-1)},t.prototype.setNextItemActive=function(){this._activeItemIndex<0?this.setFirstItemActive():this._setActiveItemByDelta(1)},t.prototype.setPreviousItemActive=function(){this._activeItemIndex<0&&this._wrap?this.setLastItemActive():this._setActiveItemByDelta(-1)},t.prototype.updateActiveItem=function(t){var e=this._getItemsArray(),n="number"==typeof t?t:e.indexOf(t);this._activeItemIndex=n,this._activeItem=e[n]},t.prototype.updateActiveItemIndex=function(t){this.updateActiveItem(t)},t.prototype._setActiveItemByDelta=function(t){this._wrap?this._setActiveInWrapMode(t):this._setActiveInDefaultMode(t)},t.prototype._setActiveInWrapMode=function(t){for(var e=this._getItemsArray(),n=1;n<=e.length;n++){var i=(this._activeItemIndex+t*n+e.length)%e.length;if(!this._skipPredicateFn(e[i]))return void this.setActiveItem(i)}},t.prototype._setActiveInDefaultMode=function(t){this._setActiveItemByIndex(this._activeItemIndex+t,t)},t.prototype._setActiveItemByIndex=function(t,e){var n=this._getItemsArray();if(n[t]){for(;this._skipPredicateFn(n[t]);)if(!n[t+=e])return;this.setActiveItem(t)}},t.prototype._getItemsArray=function(){return this._items instanceof ni?this._items.toArray():this._items},t}()),Fm=new yt("liveAnnouncerElement",{providedIn:"root",factory:function(){return null}}),Nm=function(){function t(t,e){this._document=e,this._liveElement=t||this._createLiveElement()}return t.prototype.announce=function(t,e){var n=this;return void 0===e&&(e="polite"),this._liveElement.textContent="",this._liveElement.setAttribute("aria-live",e),new Promise(function(e){setTimeout(function(){n._liveElement.textContent=t,e()},100)})},t.prototype.ngOnDestroy=function(){this._liveElement&&this._liveElement.parentNode&&this._liveElement.parentNode.removeChild(this._liveElement)},t.prototype._createLiveElement=function(){for(var t=this._document.getElementsByClassName("cdk-live-announcer-element"),e=0;e<t.length;e++)t[e].parentNode.removeChild(t[e]);var n=this._document.createElement("div");return n.classList.add("cdk-live-announcer-element"),n.classList.add("cdk-visually-hidden"),n.setAttribute("aria-atomic","true"),n.setAttribute("aria-live","polite"),this._document.body.appendChild(n),n},t.ngInjectableDef=vt({factory:function(){return new t(pe(Fm,8),pe(tc))},token:t,providedIn:"root"}),t}(),Lm=function(){function t(t,e){this._ngZone=t,this._platform=e,this._origin=null,this._windowFocused=!1,this._elementInfo=new Map,this._unregisterGlobalListeners=function(){},this._monitoredElementCount=0}return t.prototype.monitor=function(t,e){var n=this;if(void 0===e&&(e=!1),!this._platform.isBrowser)return Eu(null);if(this._elementInfo.has(t)){var i=this._elementInfo.get(t);return i.checkChildren=e,i.subject.asObservable()}var r={unlisten:function(){},checkChildren:e,subject:new at};this._elementInfo.set(t,r),this._incrementMonitoredElementCount();var o=function(e){return n._onFocus(e,t)},s=function(e){return n._onBlur(e,t)};return this._ngZone.runOutsideAngular(function(){t.addEventListener("focus",o,!0),t.addEventListener("blur",s,!0)}),r.unlisten=function(){t.removeEventListener("focus",o,!0),t.removeEventListener("blur",s,!0)},r.subject.asObservable()},t.prototype.stopMonitoring=function(t){var e=this._elementInfo.get(t);e&&(e.unlisten(),e.subject.complete(),this._setClasses(t),this._elementInfo.delete(t),this._decrementMonitoredElementCount())},t.prototype.focusVia=function(t,e,n){this._setOriginForCurrentEventQueue(e),"function"==typeof t.focus&&t.focus(n)},t.prototype.ngOnDestroy=function(){var t=this;this._elementInfo.forEach(function(e,n){return t.stopMonitoring(n)})},t.prototype._registerGlobalListeners=function(){var t=this;if(this._platform.isBrowser){var e=function(){t._lastTouchTarget=null,t._setOriginForCurrentEventQueue("keyboard")},n=function(){t._lastTouchTarget||t._setOriginForCurrentEventQueue("mouse")},i=function(e){null!=t._touchTimeoutId&&clearTimeout(t._touchTimeoutId),t._lastTouchTarget=e.target,t._touchTimeoutId=setTimeout(function(){return t._lastTouchTarget=null},650)},r=function(){t._windowFocused=!0,t._windowFocusTimeoutId=setTimeout(function(){return t._windowFocused=!1})};this._ngZone.runOutsideAngular(function(){document.addEventListener("keydown",e,!0),document.addEventListener("mousedown",n,!0),document.addEventListener("touchstart",i,!qd()||{passive:!0,capture:!0}),window.addEventListener("focus",r)}),this._unregisterGlobalListeners=function(){document.removeEventListener("keydown",e,!0),document.removeEventListener("mousedown",n,!0),document.removeEventListener("touchstart",i,!qd()||{passive:!0,capture:!0}),window.removeEventListener("focus",r),clearTimeout(t._windowFocusTimeoutId),clearTimeout(t._touchTimeoutId),clearTimeout(t._originTimeoutId)}}},t.prototype._toggleClass=function(t,e,n){n?t.classList.add(e):t.classList.remove(e)},t.prototype._setClasses=function(t,e){this._elementInfo.get(t)&&(this._toggleClass(t,"cdk-focused",!!e),this._toggleClass(t,"cdk-touch-focused","touch"===e),this._toggleClass(t,"cdk-keyboard-focused","keyboard"===e),this._toggleClass(t,"cdk-mouse-focused","mouse"===e),this._toggleClass(t,"cdk-program-focused","program"===e))},t.prototype._setOriginForCurrentEventQueue=function(t){var e=this;this._ngZone.runOutsideAngular(function(){e._origin=t,e._originTimeoutId=setTimeout(function(){return e._origin=null},1)})},t.prototype._wasCausedByTouch=function(t){var e=t.target;return this._lastTouchTarget instanceof Node&&e instanceof Node&&(e===this._lastTouchTarget||e.contains(this._lastTouchTarget))},t.prototype._onFocus=function(t,e){var n=this._elementInfo.get(e);if(n&&(n.checkChildren||e===t.target)){var i=this._origin;i||(i=this._windowFocused&&this._lastFocusOrigin?this._lastFocusOrigin:this._wasCausedByTouch(t)?"touch":"program"),this._setClasses(e,i),this._emitOrigin(n.subject,i),this._lastFocusOrigin=i}},t.prototype._onBlur=function(t,e){var n=this._elementInfo.get(e);!n||n.checkChildren&&t.relatedTarget instanceof Node&&e.contains(t.relatedTarget)||(this._setClasses(e),this._emitOrigin(n.subject,null))},t.prototype._emitOrigin=function(t,e){this._ngZone.run(function(){return t.next(e)})},t.prototype._incrementMonitoredElementCount=function(){1==++this._monitoredElementCount&&this._registerGlobalListeners()},t.prototype._decrementMonitoredElementCount=function(){--this._monitoredElementCount||(this._unregisterGlobalListeners(),this._unregisterGlobalListeners=function(){})},t.ngInjectableDef=vt({factory:function(){return new t(pe(An),pe(Yd))},token:t,providedIn:"root"}),t}();function Bm(t){return 0===t.buttons}var Vm=function(){},zm=new yt("mat-sanity-checks",{providedIn:"root",factory:function(){return!0}}),Hm=function(){function t(t){this._sanityChecksEnabled=t,this._hasDoneGlobalChecks=!1,this._hasCheckedHammer=!1,this._document="object"==typeof document&&document?document:null,this._window="object"==typeof window&&window?window:null,this._areChecksEnabled()&&!this._hasDoneGlobalChecks&&(this._checkDoctypeIsDefined(),this._checkThemeIsPresent(),this._hasDoneGlobalChecks=!0)}return t.prototype._areChecksEnabled=function(){return this._sanityChecksEnabled&&Un()&&!this._isTestEnv()},t.prototype._isTestEnv=function(){return this._window&&(this._window.__karma__||this._window.jasmine)},t.prototype._checkDoctypeIsDefined=function(){this._document&&!this._document.doctype&&console.warn("Current document does not have a doctype. This may cause some Angular Material components not to behave as expected.")},t.prototype._checkThemeIsPresent=function(){if(this._document&&this._document.body&&"function"==typeof getComputedStyle){var t=this._document.createElement("div");t.classList.add("mat-theme-loaded-marker"),this._document.body.appendChild(t);var e=getComputedStyle(t);e&&"none"!==e.display&&console.warn("Could not find Angular Material core theme. Most Material components may not work as expected. For more info refer to the theming guide: https://material.angular.io/guide/theming"),this._document.body.removeChild(t)}},t.prototype._checkHammerIsAvailable=function(){!this._hasCheckedHammer&&this._window&&(this._areChecksEnabled()&&!this._window.Hammer&&console.warn("Could not find HammerJS. Certain Angular Material components may not work correctly."),this._hasCheckedHammer=!0)},t}();function Wm(t){return function(t){function e(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var i=t.apply(this,e)||this;return i._disabled=!1,i}return r(e,t),Object.defineProperty(e.prototype,"disabled",{get:function(){return this._disabled},set:function(t){this._disabled=Vd(t)},enumerable:!0,configurable:!0}),e}(t)}function Um(t,e){return function(t){function n(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];var r=t.apply(this,n)||this;return r.color=e,r}return r(n,t),Object.defineProperty(n.prototype,"color",{get:function(){return this._color},set:function(t){var n=t||e;n!==this._color&&(this._color&&this._elementRef.nativeElement.classList.remove("mat-"+this._color),n&&this._elementRef.nativeElement.classList.add("mat-"+n),this._color=n)},enumerable:!0,configurable:!0}),n}(t)}function Xm(t){return function(t){function e(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var i=t.apply(this,e)||this;return i._disableRipple=!1,i}return r(e,t),Object.defineProperty(e.prototype,"disableRipple",{get:function(){return this._disableRipple},set:function(t){this._disableRipple=Vd(t)},enumerable:!0,configurable:!0}),e}(t)}function Ym(t,e){return void 0===e&&(e=0),function(t){function n(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];var r=t.apply(this,n)||this;return r._tabIndex=e,r}return r(n,t),Object.defineProperty(n.prototype,"tabIndex",{get:function(){return this.disabled?-1:this._tabIndex},set:function(t){this._tabIndex=null!=t?t:e},enumerable:!0,configurable:!0}),n}(t)}var qm=new yt("MAT_HAMMER_OPTIONS"),Gm=["longpress","slide","slidestart","slideend","slideright","slideleft"],Km={on:function(){},off:function(){}},Zm=function(t){function e(e,n){var i=t.call(this)||this;return i._hammerOptions=e,i.events=Gm,n&&n._checkHammerIsAvailable(),i}return r(e,t),e.prototype.buildHammer=function(t){var e="undefined"!=typeof window?window.Hammer:null;if(!e)return Km;var n=new e(t,this._hammerOptions||void 0),i=new e.Pan,r=new e.Swipe,o=new e.Press,s=this._createRecognizer(i,{event:"slide",threshold:0},r),a=this._createRecognizer(o,{event:"longpress",time:500});return i.recognizeWith(r),n.add([r,o,i,s,a]),n},e.prototype._createRecognizer=function(t,e){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];var r=new t.constructor(e);return n.push(t),n.forEach(function(t){return r.recognizeWith(t)}),r},e}(Dh),Qm=function(){var t={FADING_IN:0,VISIBLE:1,FADING_OUT:2,HIDDEN:3};return t[t.FADING_IN]="FADING_IN",t[t.VISIBLE]="VISIBLE",t[t.FADING_OUT]="FADING_OUT",t[t.HIDDEN]="HIDDEN",t}(),Jm=function(){function t(t,e,n){this._renderer=t,this.element=e,this.config=n,this.state=Qm.HIDDEN}return t.prototype.fadeOut=function(){this._renderer.fadeOutRipple(this)},t}(),$m={enterDuration:450,exitDuration:400},tv=800,ev=function(){function t(t,e,n,i){var r=this;this._target=t,this._ngZone=e,this._isPointerDown=!1,this._triggerEvents=new Map,this._activeRipples=new Set,this._eventOptions=!!qd()&&{passive:!0},this.onMousedown=function(t){var e=Bm(t),n=r._lastTouchStartEvent&&Date.now()<r._lastTouchStartEvent+tv;r._target.rippleDisabled||e||n||(r._isPointerDown=!0,r.fadeInRipple(t.clientX,t.clientY,r._target.rippleConfig))},this.onTouchStart=function(t){r._target.rippleDisabled||(r._lastTouchStartEvent=Date.now(),r._isPointerDown=!0,r.fadeInRipple(t.touches[0].clientX,t.touches[0].clientY,r._target.rippleConfig))},this.onPointerUp=function(){r._isPointerDown&&(r._isPointerDown=!1,r._activeRipples.forEach(function(t){!t.config.persistent&&(t.state===Qm.VISIBLE||t.config.terminateOnPointerUp&&t.state===Qm.FADING_IN)&&t.fadeOut()}))},i.isBrowser&&(this._containerElement=n.nativeElement,this._triggerEvents.set("mousedown",this.onMousedown),this._triggerEvents.set("mouseup",this.onPointerUp),this._triggerEvents.set("mouseleave",this.onPointerUp),this._triggerEvents.set("touchstart",this.onTouchStart),this._triggerEvents.set("touchend",this.onPointerUp))}return t.prototype.fadeInRipple=function(t,e,n){var i=this;void 0===n&&(n={});var r=this._containerRect=this._containerRect||this._containerElement.getBoundingClientRect(),s=o({},$m,n.animation);n.centered&&(t=r.left+r.width/2,e=r.top+r.height/2);var a=n.radius||function(t,e,n){var i=Math.max(Math.abs(t-n.left),Math.abs(t-n.right)),r=Math.max(Math.abs(e-n.top),Math.abs(e-n.bottom));return Math.sqrt(i*i+r*r)}(t,e,r),l=t-r.left,u=e-r.top,c=s.enterDuration/(n.speedFactor||1),h=document.createElement("div");h.classList.add("mat-ripple-element"),h.style.left=l-a+"px",h.style.top=u-a+"px",h.style.height=2*a+"px",h.style.width=2*a+"px",h.style.backgroundColor=n.color||null,h.style.transitionDuration=c+"ms",this._containerElement.appendChild(h),window.getComputedStyle(h).getPropertyValue("opacity"),h.style.transform="scale(1)";var p=new Jm(this,h,n);return p.state=Qm.FADING_IN,this._activeRipples.add(p),n.persistent||(this._mostRecentTransientRipple=p),this.runTimeoutOutsideZone(function(){var t=p===i._mostRecentTransientRipple;p.state=Qm.VISIBLE,n.persistent||t&&i._isPointerDown||p.fadeOut()},c),p},t.prototype.fadeOutRipple=function(t){var e=this._activeRipples.delete(t);if(t===this._mostRecentTransientRipple&&(this._mostRecentTransientRipple=null),this._activeRipples.size||(this._containerRect=null),e){var n=t.element,i=o({},$m,t.config.animation);n.style.transitionDuration=i.exitDuration+"ms",n.style.opacity="0",t.state=Qm.FADING_OUT,this.runTimeoutOutsideZone(function(){t.state=Qm.HIDDEN,n.parentNode.removeChild(n)},i.exitDuration)}},t.prototype.fadeOutAll=function(){this._activeRipples.forEach(function(t){return t.fadeOut()})},t.prototype.setupTriggerEvents=function(t){var e=this;t&&t!==this._triggerElement&&(this._removeTriggerEvents(),this._ngZone.runOutsideAngular(function(){e._triggerEvents.forEach(function(n,i){return t.addEventListener(i,n,e._eventOptions)})}),this._triggerElement=t)},t.prototype.runTimeoutOutsideZone=function(t,e){void 0===e&&(e=0),this._ngZone.runOutsideAngular(function(){return setTimeout(t,e)})},t.prototype._removeTriggerEvents=function(){var t=this;this._triggerElement&&this._triggerEvents.forEach(function(e,n){t._triggerElement.removeEventListener(n,e,t._eventOptions)})},t}(),nv=new yt("mat-ripple-global-options"),iv=function(){function t(t,e,n,i,r){this._elementRef=t,this.radius=0,this.speedFactor=1,this._disabled=!1,this._isInitialized=!1,this._globalOptions=i||{},this._rippleRenderer=new ev(this,e,t,n),"NoopAnimations"===r&&(this._globalOptions.animation={enterDuration:0,exitDuration:0})}return Object.defineProperty(t.prototype,"disabled",{get:function(){return this._disabled},set:function(t){this._disabled=t,this._setupTriggerEventsIfEnabled()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"trigger",{get:function(){return this._trigger||this._elementRef.nativeElement},set:function(t){this._trigger=t,this._setupTriggerEventsIfEnabled()},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){this._isInitialized=!0,this._setupTriggerEventsIfEnabled()},t.prototype.ngOnDestroy=function(){this._rippleRenderer._removeTriggerEvents()},t.prototype.fadeOutAll=function(){this._rippleRenderer.fadeOutAll()},Object.defineProperty(t.prototype,"rippleConfig",{get:function(){return{centered:this.centered,radius:this.radius,color:this.color,animation:o({},this._globalOptions.animation,this.animation),terminateOnPointerUp:this._globalOptions.terminateOnPointerUp,speedFactor:this.speedFactor*(this._globalOptions.baseSpeedFactor||1)}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"rippleDisabled",{get:function(){return this.disabled||!!this._globalOptions.disabled},enumerable:!0,configurable:!0}),t.prototype._setupTriggerEventsIfEnabled=function(){!this.disabled&&this._isInitialized&&this._rippleRenderer.setupTriggerEvents(this.trigger)},t.prototype.launch=function(t,e,n){return void 0===e&&(e=0),"number"==typeof t?this._rippleRenderer.fadeInRipple(t,e,o({},this.rippleConfig,n)):this._rippleRenderer.fadeInRipple(0,0,o({},this.rippleConfig,t))},t}(),rv=function(){},ov=Sr({encapsulation:2,styles:[".mat-tooltip-panel{pointer-events:none!important}.mat-tooltip{color:#fff;border-radius:2px;margin:14px;max-width:250px;padding-left:8px;padding-right:8px;overflow:hidden;text-overflow:ellipsis}@media screen and (-ms-high-contrast:active){.mat-tooltip{outline:solid 1px}}.mat-tooltip-handset{margin:24px;padding-left:16px;padding-right:16px}"],data:{animation:[{type:7,name:"state",definitions:[{type:0,name:"initial, void, hidden",styles:{type:6,styles:{transform:"scale(0)"},offset:null},options:void 0},{type:0,name:"visible",styles:{type:6,styles:{transform:"scale(1)"},offset:null},options:void 0},{type:1,expr:"* => visible",animation:{type:4,styles:null,timings:"150ms cubic-bezier(0.0, 0.0, 0.2, 1)"},options:null},{type:1,expr:"* => hidden",animation:{type:4,styles:null,timings:"150ms cubic-bezier(0.4, 0.0, 1, 1)"},options:null}],options:{}}]}});function sv(t){return bs(2,[(t()(),to(0,0,null,null,3,"div",[["class","mat-tooltip"]],[[2,"mat-tooltip-handset",null],[24,"@state",0]],[[null,"@state.start"],[null,"@state.done"]],function(t,e,n){var i=!0,r=t.component;return"@state.start"===e&&(i=!1!==r._animationStart()&&i),"@state.done"===e&&(i=!1!==r._animationDone(n)&&i),i},null,null)),Wo(1,278528,null,0,Bu,[Ei,Ti,ei,ti],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),Uo(131072,Zu,[oi]),(t()(),ms(3,null,["",""]))],function(t,e){t(e,1,0,"mat-tooltip",e.component.tooltipClass)},function(t,e){var n=e.component;t(e,0,0,wr(e,0,0,Ao(e,2).transform(n._isHandset)).matches,n._visibility),t(e,3,0,n.message)})}var av=bo("mat-tooltip-component",fm,function(t){return bs(0,[(t()(),to(0,0,null,null,1,"mat-tooltip-component",[["aria-hidden","true"]],[[4,"zoom",null]],[["body","click"]],function(t,e,n){var i=!0;return"body:click"===e&&(i=!1!==Ao(t,1)._handleBodyInteraction()&&i),i},sv,ov)),Wo(1,49152,null,0,fm,[oi,Yf],null,null)],null,function(t,e){t(e,0,0,"visible"===Ao(e,1)._visibility?1:null)})},{},{},[]),lv=function(){function t(t,e,n){this.el=t,this.i18n=e,this.settings=n,this.subscriptions=[]}return t.prototype.ngAfterViewInit=function(){var t=this;if(this.settings.get("i18n.enable")){var e=this.i18n.localizationChange.subscribe(function(){return t.translate()});this.translate(),this.subscriptions.push(e)}},t.prototype.translate=function(){var t=this.el.nativeElement;if(t.getAttribute("placeholder")){var e=t.getAttribute("placeholder");t.setAttribute("placeholder",this.i18n.t(e))}else t.getAttribute("title")?(e=t.getAttribute("title"),t.setAttribute("title",this.i18n.t(e))):this.translateTextContent(t)},t.prototype.translateTextContent=function(t){var e=Array.from(t.childNodes);e.sort(function(t,e){return t.nodeType===Node.TEXT_NODE?-1:1});for(var n=0;n<e.length;n++){var i=e[n];if(i.nodeType===Node.TEXT_NODE)return i.nodeValue=this.i18n.t(i.textContent);if(this.translateTextContent(i))return}},t.prototype.ngOnDestroy=function(){this.subscriptions.filter(function(t){return!!t}).forEach(function(t){return t.unsubscribe()}),this.subscriptions=[]},t}(),uv=function(){function t(t){this.settings=t,this.localizationChange=new In,this.localization={model:new Rc,lines:{}}}return t.prototype.t=function(t,e){if(!t)return"";if(!this.translationsEnabled())return this.replacePlaceholders(t,e);var n=this.localization.lines[t.toLowerCase().trim()]||t;return this.replacePlaceholders(n,e)},t.prototype.replacePlaceholders=function(t,e){return e?(Object.keys(e).forEach(function(n){t=t.replace(":"+n,e[n])}),t):t},t.prototype.getActive=function(){return this.localization},t.prototype.setLocalization=function(t){t&&t.lines&&t.model&&this.localization.model.name!==t.model.name&&(t.lines=this.objectKeysToLowerCase(t.lines),this.localization=t,this.localizationChange.emit())},t.prototype.objectKeysToLowerCase=function(t){var e={};return Object.keys(t).forEach(function(n){e[n.toLowerCase()]=t[n]}),e},t.prototype.translationsEnabled=function(){return this.settings.get("i18n.enable")},t.ngInjectableDef=vt({factory:function(){return new t(pe(wu))},token:t,providedIn:"root"}),t}(),cv=function(){function t(t){this.i18n=t}return t.prototype.transform=function(t){return this.i18n.t(t)},t}(),hv=function(){function t(t){this.callback=t}return t.prototype.call=function(t,e){return e.subscribe(new pv(t,this.callback))},t}(),pv=function(t){function e(e,n){var i=t.call(this,e)||this;return i.add(new k(n)),i}return r(e,t),e}(O);function dv(t){return function(e){var n=new fv(t),i=e.lift(n);return n.caught=i}}var fv=function(){function t(t){this.selector=t}return t.prototype.call=function(t,e){return e.subscribe(new gv(t,this.selector,this.caught))},t}(),gv=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.selector=n,r.caught=i,r}return r(e,t),e.prototype.error=function(e){if(!this.isStopped){var n=void 0;try{n=this.selector(e,this.caught)}catch(e){return void t.prototype.error.call(this,e)}this._unsubscribeAndRecycle();var i=new R(this,void 0,void 0);this.add(i),U(this,n,void 0,void 0,i)}},e}(X);function mv(t){return Error('Unable to find icon with the name "'+t+'"')}function vv(t){return Error("The URL provided to MatIconRegistry was not trusted as a resource URL via Angular's DomSanitizer. Attempted URL was \""+t+'".')}function yv(t){return Error("The literal provided to MatIconRegistry was not trusted as safe HTML by Angular's DomSanitizer. Attempted literal was \""+t+'".')}var bv=function(t){t.nodeName?this.svgElement=t:this.url=t},_v=function(){function t(t,e,n){this._httpClient=t,this._sanitizer=e,this._svgIconConfigs=new Map,this._iconSetConfigs=new Map,this._cachedIconsByUrl=new Map,this._inProgressUrlFetches=new Map,this._fontCssClassesByAlias=new Map,this._defaultFontSetClass="material-icons",this._document=n}return t.prototype.addSvgIcon=function(t,e){return this.addSvgIconInNamespace("",t,e)},t.prototype.addSvgIconLiteral=function(t,e){return this.addSvgIconLiteralInNamespace("",t,e)},t.prototype.addSvgIconInNamespace=function(t,e,n){return this._addSvgIconConfig(t,e,new bv(n))},t.prototype.addSvgIconLiteralInNamespace=function(t,e,n){var i=this._sanitizer.sanitize(or.HTML,n);if(!i)throw yv(n);var r=this._createSvgElementForSingleIcon(i);return this._addSvgIconConfig(t,e,new bv(r))},t.prototype.addSvgIconSet=function(t){return this.addSvgIconSetInNamespace("",t)},t.prototype.addSvgIconSetLiteral=function(t){return this.addSvgIconSetLiteralInNamespace("",t)},t.prototype.addSvgIconSetInNamespace=function(t,e){return this._addSvgIconSetConfig(t,new bv(e))},t.prototype.addSvgIconSetLiteralInNamespace=function(t,e){var n=this._sanitizer.sanitize(or.HTML,e);if(!n)throw yv(e);var i=this._svgElementFromString(n);return this._addSvgIconSetConfig(t,new bv(i))},t.prototype.registerFontClassAlias=function(t,e){return void 0===e&&(e=t),this._fontCssClassesByAlias.set(t,e),this},t.prototype.classNameForFontAlias=function(t){return this._fontCssClassesByAlias.get(t)||t},t.prototype.setDefaultFontSetClass=function(t){return this._defaultFontSetClass=t,this},t.prototype.getDefaultFontSetClass=function(){return this._defaultFontSetClass},t.prototype.getSvgIconFromUrl=function(t){var e=this,n=this._sanitizer.sanitize(or.RESOURCE_URL,t);if(!n)throw vv(t);var i=this._cachedIconsByUrl.get(n);return i?Eu(wv(i)):this._loadSvgIconFromConfig(new bv(t)).pipe(Tm(function(t){return e._cachedIconsByUrl.set(n,t)}),Y(function(t){return wv(t)}))},t.prototype.getNamedSvgIcon=function(t,e){void 0===e&&(e="");var n=xv(e,t),i=this._svgIconConfigs.get(n);if(i)return this._getSvgFromConfig(i);var r=this._iconSetConfigs.get(e);return r?this._getSvgFromIconSetConfigs(t,r):wd(mv(n))},t.prototype._getSvgFromConfig=function(t){return t.svgElement?Eu(wv(t.svgElement)):this._loadSvgIconFromConfig(t).pipe(Tm(function(e){return t.svgElement=e}),Y(function(t){return wv(t)}))},t.prototype._getSvgFromIconSetConfigs=function(t,e){var n=this,i=this._extractIconWithNameFromAnySet(t,e);return i?Eu(i):Nc(e.filter(function(t){return!t.svgElement}).map(function(t){return n._loadSvgIconSetFromConfig(t).pipe(dv(function(e){var i=n._sanitizer.sanitize(or.RESOURCE_URL,t.url);return console.error("Loading icon set URL: "+i+" failed: "+e.message),Eu(null)}))})).pipe(Y(function(){var i=n._extractIconWithNameFromAnySet(t,e);if(!i)throw mv(t);return i}))},t.prototype._extractIconWithNameFromAnySet=function(t,e){for(var n=e.length-1;n>=0;n--){var i=e[n];if(i.svgElement){var r=this._extractSvgIconFromSet(i.svgElement,t);if(r)return r}}return null},t.prototype._loadSvgIconFromConfig=function(t){var e=this;return this._fetchUrl(t.url).pipe(Y(function(t){return e._createSvgElementForSingleIcon(t)}))},t.prototype._loadSvgIconSetFromConfig=function(t){var e=this;return t.svgElement?Eu(t.svgElement):this._fetchUrl(t.url).pipe(Y(function(n){return t.svgElement||(t.svgElement=e._svgElementFromString(n)),t.svgElement}))},t.prototype._createSvgElementForSingleIcon=function(t){var e=this._svgElementFromString(t);return this._setSvgAttributes(e),e},t.prototype._extractSvgIconFromSet=function(t,e){var n=t.querySelector("#"+e);if(!n)return null;var i=n.cloneNode(!0);if(i.removeAttribute("id"),"svg"===i.nodeName.toLowerCase())return this._setSvgAttributes(i);if("symbol"===i.nodeName.toLowerCase())return this._setSvgAttributes(this._toSvgElement(i));var r=this._svgElementFromString("<svg></svg>");return r.appendChild(i),this._setSvgAttributes(r)},t.prototype._svgElementFromString=function(t){var e=this._document.createElement("DIV");e.innerHTML=t;var n=e.querySelector("svg");if(!n)throw Error("<svg> tag not found");return n},t.prototype._toSvgElement=function(t){for(var e=this._svgElementFromString("<svg></svg>"),n=0;n<t.childNodes.length;n++)t.childNodes[n].nodeType===this._document.ELEMENT_NODE&&e.appendChild(t.childNodes[n].cloneNode(!0));return e},t.prototype._setSvgAttributes=function(t){return t.setAttribute("fit",""),t.setAttribute("height","100%"),t.setAttribute("width","100%"),t.setAttribute("preserveAspectRatio","xMidYMid meet"),t.setAttribute("focusable","false"),t},t.prototype._fetchUrl=function(t){var e=this;if(!this._httpClient)throw Error("Could not find HttpClient provider for use with Angular Material icons. Please include the HttpClientModule from @angular/common/http in your app imports.");if(null==t)throw Error('Cannot fetch icon from URL "'+t+'".');var n=this._sanitizer.sanitize(or.RESOURCE_URL,t);if(!n)throw vv(t);var i=this._inProgressUrlFetches.get(n);if(i)return i;var r,o=this._httpClient.get(n,{responseType:"text"}).pipe((r=function(){return e._inProgressUrlFetches.delete(n)},function(t){return t.lift(new hv(r))}),mt());return this._inProgressUrlFetches.set(n,o),o},t.prototype._addSvgIconConfig=function(t,e,n){return this._svgIconConfigs.set(xv(t,e),n),this},t.prototype._addSvgIconSetConfig=function(t,e){var n=this._iconSetConfigs.get(t);return n?n.push(e):this._iconSetConfigs.set(t,[e]),this},t.ngInjectableDef=vt({factory:function(){return new t(pe(bc,8),pe(Nh),pe(tc,8))},token:t,providedIn:"root"}),t}();function wv(t){return t.cloneNode(!0)}function xv(t,e){return t+":"+e}var Cv,Sv=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r._iconRegistry=n,r._inline=!1,i||e.nativeElement.setAttribute("aria-hidden","true"),r}return r(e,t),Object.defineProperty(e.prototype,"inline",{get:function(){return this._inline},set:function(t){this._inline=Vd(t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fontSet",{get:function(){return this._fontSet},set:function(t){this._fontSet=this._cleanupFontValue(t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fontIcon",{get:function(){return this._fontIcon},set:function(t){this._fontIcon=this._cleanupFontValue(t)},enumerable:!0,configurable:!0}),e.prototype._splitIconName=function(t){if(!t)return["",""];var e=t.split(":");switch(e.length){case 1:return["",e[0]];case 2:return e;default:throw Error('Invalid icon name: "'+t+'"')}},e.prototype.ngOnChanges=function(t){var e=this;if(t.svgIcon)if(this.svgIcon){var n=this._splitIconName(this.svgIcon);this._iconRegistry.getNamedSvgIcon(n[1],n[0]).pipe(lf(1)).subscribe(function(t){return e._setSvgElement(t)},function(t){return console.log("Error retrieving icon: "+t.message)})}else this._clearSvgElement();this._usingFontIcon()&&this._updateFontIconClasses()},e.prototype.ngOnInit=function(){this._usingFontIcon()&&this._updateFontIconClasses()},e.prototype._usingFontIcon=function(){return!this.svgIcon},e.prototype._setSvgElement=function(t){this._clearSvgElement();for(var e=t.querySelectorAll("style"),n=0;n<e.length;n++)e[n].textContent+=" ";this._elementRef.nativeElement.appendChild(t)},e.prototype._clearSvgElement=function(){for(var t=this._elementRef.nativeElement,e=t.childNodes.length;e--;){var n=t.childNodes[e];1===n.nodeType&&"svg"!==n.nodeName.toLowerCase()||t.removeChild(n)}},e.prototype._updateFontIconClasses=function(){if(this._usingFontIcon()){var t=this._elementRef.nativeElement,e=this.fontSet?this._iconRegistry.classNameForFontAlias(this.fontSet):this._iconRegistry.getDefaultFontSetClass();e!=this._previousFontSetClass&&(this._previousFontSetClass&&t.classList.remove(this._previousFontSetClass),e&&t.classList.add(e),this._previousFontSetClass=e),this.fontIcon!=this._previousFontIconClass&&(this._previousFontIconClass&&t.classList.remove(this._previousFontIconClass),this.fontIcon&&t.classList.add(this.fontIcon),this._previousFontIconClass=this.fontIcon)}},e.prototype._cleanupFontValue=function(t){return"string"==typeof t?t.trim().split(" ")[0]:t},e}(Um(function(t){this._elementRef=t})),kv=function(){},Ev=Sr({encapsulation:2,styles:[".mat-icon{background-repeat:no-repeat;display:inline-block;fill:currentColor;height:24px;width:24px}.mat-icon.mat-icon-inline{font-size:inherit;height:inherit;line-height:inherit;width:inherit}[dir=rtl] .mat-icon-rtl-mirror{transform:scale(-1,1)}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon{display:block}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button .mat-icon{margin:auto}"],data:{}});function Tv(t){return bs(2,[hs(null,0)],null,null)}!function(t){t.display="Display",t.handwriting="Hand Writing",t.monospace="Mono Space",t["sans-serif"]="Sans Serif",t.serif="Serif"}(Cv||(Cv={}));var Ov=function(){function t(t,e){this.overlayPanelRef=t,this.fonts=e,this.fontCategories=Cv}return t.prototype.ngOnInit=function(){this.fonts.init()},t.prototype.ngOnDestroy=function(){this.fonts.paginator.reset()},t.prototype.applyFont=function(t){this.overlayPanelRef.emitValue(t),this.overlayPanelRef.close()},t}(),Iv=n("J9Y1"),Av=function(){function t(t,e,n){var i=this;this.http=t,this.settings=e,this.paginator=n,this.loadedFonts=[],this.customFonts=[],this.paginator.current$.subscribe(function(t){i.loadIntoDom(t)}),this.customFonts=this.settings.get("pixie.tools.text.items",[])}return t.prototype.init=function(){return t=this,void 0,n=function(){var t,e,n;return function(t,e){var n,i,r,o,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,i&&(r=2&o[0]?i.return:o[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,o[1])).done)return r;switch(i=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,i=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(r=(r=s.trys).length>0&&r[r.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){s.label=o[1];break}if(6===o[0]&&s.label<r[1]){s.label=r[1],r=o;break}if(r&&s.label<r[2]){s.label=r[2],s.ops.push(o);break}r[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],i=0}finally{n=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}}(this,function(i){switch(i.label){case 0:return t=this.customFonts.slice(),this.settings.get("pixie.tools.text.replaceDefault")?[3,2]:(n=(e=t).concat,[4,this.getGoogleFonts()]);case 1:t=n.apply(e,[i.sent()]),i.label=2;case 2:return this.paginator.setFonts(t),[2]}})},new((e=void 0)||(e=Promise))(function(i,r){function o(t){try{a(n.next(t))}catch(t){r(t)}}function s(t){try{a(n.throw(t))}catch(t){r(t)}}function a(t){t.done?i(t.value):new e(function(e){e(t.value)}).then(o,s)}a((n=n.apply(t,[])).next())});var t,e,n},t.prototype.loadIntoDom=function(t,e){var n=this;return void 0===t&&(t=[]),new Promise(function(i){if(!(t=t.filter(function(t){return!n.loadedFonts.find(function(e){return e.family===t.family})})).length)return i();n.loadedFonts=n.loadedFonts.concat(t);var r=t.filter(function(t){return"google"===t.type}),o=t.filter(function(t){return"custom"===t.type}),s={active:i,context:e,classes:!1};r.length&&(s.google={families:r.map(function(t){return t.family})}),o.length&&(n.loadCustomFonts(o,e),s.custom={families:o.map(function(t){return t.family})}),Iv.load(s)})},t.prototype.loadCustomFonts=function(t,e){var n=this;if(void 0===t&&(t=[]),t.length){var i="";t.forEach(function(t){var e=n.settings.getAssetUrl("fonts")+t.filePath;i+="@font-face { font-family: "+t.family+'; src: url("'+e+'"); }'});var r=document.createElement("style");r.innerHTML=i,(e||window).document.head.appendChild(r)}},t.prototype.getGoogleFonts=function(){var t=this.settings.get("pixie.googleFontsApiKey");return this.http.getWithCache("https://www.googleapis.com/webfonts/v1/webfonts?sort=popularity&key="+t).pipe(Y(function(t){return t.items.map(function(t){return{family:t.family,category:t.category,type:"google"}})})).toPromise()},t}(),Pv=Sr({encapsulation:2,styles:[["google-fonts-panel{display:block;width:280px;min-height:600px;background-color:#fff;box-shadow:-1px 0 2px rgba(0,0,0,.5);border-radius:2px;color:rgba(0,0,0,.87)}google-fonts-panel>.header{display:flex;align-items:center;padding:12px;color:#fff;border-bottom:1px solid #e0e0e0;background-color:#1565c0}google-fonts-panel>.header>.close-button{margin-left:auto}google-fonts-panel .many-inputs{padding:10px}google-fonts-panel .many-inputs .input-container{width:auto}google-fonts-panel .many-inputs .input-container>input{background-color:#fff;border-color:#e0e0e0}google-fonts-panel>.fonts{text-align:center;padding:10px 0}google-fonts-panel>.fonts>.font{display:block;font-size:2.5rem;margin-bottom:10px;width:100%;transition:color .2s}google-fonts-panel>.fonts>.font:hover{color:#009688}google-fonts-panel>.pagination{padding:0 10px 10px;text-align:right;margin-top:auto}"]],data:{}});function Dv(t){return bs(0,[(t()(),to(0,0,null,null,4,"option",[["trans",""]],null,null,null,null,null)),Wo(1,147456,null,0,wp,[ei,ti,[2,_p]],{value:[0,"value"]},null),Wo(2,147456,null,0,Sp,[ei,ti,[8,null]],{value:[0,"value"]},null),Wo(3,4341760,null,0,lv,[ei,uv,wu],null,null),(t()(),ms(4,null,["",""]))],function(t,e){t(e,1,0,e.context.$implicit.key),t(e,2,0,e.context.$implicit.key)},function(t,e){t(e,4,0,e.context.$implicit.value)})}function jv(t){return bs(0,[(t()(),to(0,0,null,null,1,"button",[["class","no-style font"]],[[4,"fontFamily",null]],[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.applyFont(t.context.$implicit)&&i),i},null,null)),(t()(),ms(1,null,["",""]))],null,function(t,e){t(e,0,0,e.context.$implicit.family),t(e,1,0,e.context.$implicit.family)})}function Mv(t){return bs(0,[Uo(0,cv,[uv]),(t()(),to(1,0,null,null,6,"div",[["class","header"]],null,null,null,null,null)),(t()(),to(2,0,null,null,2,"div",[["class","name"],["trans",""]],null,null,null,null,null)),Wo(3,4341760,null,0,lv,[ei,uv,wu],null,null),(t()(),ms(-1,null,["Google Fonts"])),(t()(),to(5,0,null,null,2,"button",[["class","close-button no-style"]],null,[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.overlayPanelRef.close()&&i),i},null,null)),(t()(),to(6,0,null,null,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","close"]],[[2,"mat-icon-inline",null]],null,null,Tv,Ev)),Wo(7,638976,null,0,Sv,[ei,_v,[8,null]],{svgIcon:[0,"svgIcon"]},null),(t()(),to(8,0,null,null,22,"form",[["class","many-inputs"],["novalidate",""]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"submit"],[null,"reset"]],function(t,e,n){var i=!0;return"submit"===e&&(i=!1!==Ao(t,10).onSubmit(n)&&i),"reset"===e&&(i=!1!==Ao(t,10).onReset()&&i),i},null,null)),Wo(9,16384,null,0,hd,[],null,null),Wo(10,540672,null,0,rd,[[8,null],[8,null]],{form:[0,"form"]},null),Xo(2048,null,Gh,null,[rd]),Wo(12,16384,null,0,Hp,[[4,Gh]],null,null),(t()(),to(13,0,null,null,7,"div",[["class","input-container search"]],null,null,null,null,null)),(t()(),to(14,0,null,null,6,"input",[["formControlName","search"],["placeholder","Search..."],["trans-placeholder",""],["type","search"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"]],function(t,e,n){var i=!0;return"input"===e&&(i=!1!==Ao(t,15)._handleInput(n.target.value)&&i),"blur"===e&&(i=!1!==Ao(t,15).onTouched()&&i),"compositionstart"===e&&(i=!1!==Ao(t,15)._compositionStart()&&i),"compositionend"===e&&(i=!1!==Ao(t,15)._compositionEnd(n.target.value)&&i),i},null,null)),Wo(15,16384,null,0,sp,[ti,ei,[2,op]],null,null),Xo(1024,null,ip,function(t){return[t]},[sp]),Wo(17,671744,null,0,ld,[[3,Gh],[8,null],[8,null],[6,ip],[2,nd]],{name:[0,"name"]},null),Xo(2048,null,hp,null,[ld]),Wo(19,16384,null,0,zp,[[4,hp]],null,null),Wo(20,4341760,null,0,lv,[ei,uv,wu],null,null),(t()(),to(21,0,null,null,9,"div",[["class","input-container category"]],null,null,null,null,null)),(t()(),to(22,0,null,null,8,"select",[["formControlName","category"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"change"],[null,"blur"]],function(t,e,n){var i=!0;return"change"===e&&(i=!1!==Ao(t,23).onChange(n.target.value)&&i),"blur"===e&&(i=!1!==Ao(t,23).onTouched()&&i),i},null,null)),Wo(23,16384,null,0,_p,[ti,ei],null,null),Xo(1024,null,ip,function(t){return[t]},[_p]),Wo(25,671744,null,0,ld,[[3,Gh],[8,null],[8,null],[6,ip],[2,nd]],{name:[0,"name"]},null),Xo(2048,null,hp,null,[ld]),Wo(27,16384,null,0,zp,[[4,hp]],null,null),(t()(),$r(16777216,null,null,2,null,Dv)),Wo(29,278528,null,0,zu,[ri,ii,Ei],{ngForOf:[0,"ngForOf"]},null),Uo(0,Qu,[Ti]),(t()(),to(31,0,null,null,3,"div",[["class","fonts"]],null,null,null,null,null)),(t()(),$r(16777216,null,null,2,null,jv)),Wo(33,278528,null,0,zu,[ri,ii,Ei],{ngForOf:[0,"ngForOf"]},null),Uo(131072,Zu,[oi]),(t()(),to(35,0,null,null,10,"div",[["class","pagination"]],null,null,null,null,null)),(t()(),to(36,16777216,null,null,4,"button",[["class","no-style previous-page"]],null,[[null,"click"],[null,"longpress"],[null,"keydown"],[null,"touchend"]],function(t,e,n){var i=!0,r=t.component;return"longpress"===e&&(i=!1!==Ao(t,37).show()&&i),"keydown"===e&&(i=!1!==Ao(t,37)._handleKeydown(n)&&i),"touchend"===e&&(i=!1!==Ao(t,37)._handleTouchend()&&i),"click"===e&&(i=!1!==r.fonts.paginator.previous()&&i),i},null,null)),Wo(37,147456,null,0,dm,[Mf,ei,nf,ri,An,Yd,Mm,Lm,cm,[2,km],[2,pm]],{message:[0,"message"]},null),ds(38,1),(t()(),to(39,0,null,null,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","keyboard-arrow-left"]],[[2,"mat-icon-inline",null]],null,null,Tv,Ev)),Wo(40,638976,null,0,Sv,[ei,_v,[8,null]],{svgIcon:[0,"svgIcon"]},null),(t()(),to(41,16777216,null,null,4,"button",[["class","no-style next-page"]],null,[[null,"click"],[null,"longpress"],[null,"keydown"],[null,"touchend"]],function(t,e,n){var i=!0,r=t.component;return"longpress"===e&&(i=!1!==Ao(t,42).show()&&i),"keydown"===e&&(i=!1!==Ao(t,42)._handleKeydown(n)&&i),"touchend"===e&&(i=!1!==Ao(t,42)._handleTouchend()&&i),"click"===e&&(i=!1!==r.fonts.paginator.next()&&i),i},null,null)),Wo(42,147456,null,0,dm,[Mf,ei,nf,ri,An,Yd,Mm,Lm,cm,[2,km],[2,pm]],{message:[0,"message"]},null),ds(43,1),(t()(),to(44,0,null,null,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","keyboard-arrow-right"]],[[2,"mat-icon-inline",null]],null,null,Tv,Ev)),Wo(45,638976,null,0,Sv,[ei,_v,[8,null]],{svgIcon:[0,"svgIcon"]},null)],function(t,e){var n=e.component;t(e,7,0,"close"),t(e,10,0,n.fonts.paginator.filters),t(e,17,0,"search"),t(e,25,0,"category"),t(e,29,0,wr(e,29,0,Ao(e,30).transform(n.fontCategories))),t(e,33,0,wr(e,33,0,Ao(e,34).transform(n.fonts.paginator.current$))),t(e,37,0,wr(e,37,0,t(e,38,0,Ao(e,0),"Previous Page"))),t(e,40,0,"keyboard-arrow-left"),t(e,42,0,wr(e,42,0,t(e,43,0,Ao(e,0),"Next Page"))),t(e,45,0,"keyboard-arrow-right")},function(t,e){t(e,6,0,Ao(e,7).inline),t(e,8,0,Ao(e,12).ngClassUntouched,Ao(e,12).ngClassTouched,Ao(e,12).ngClassPristine,Ao(e,12).ngClassDirty,Ao(e,12).ngClassValid,Ao(e,12).ngClassInvalid,Ao(e,12).ngClassPending),t(e,14,0,Ao(e,19).ngClassUntouched,Ao(e,19).ngClassTouched,Ao(e,19).ngClassPristine,Ao(e,19).ngClassDirty,Ao(e,19).ngClassValid,Ao(e,19).ngClassInvalid,Ao(e,19).ngClassPending),t(e,22,0,Ao(e,27).ngClassUntouched,Ao(e,27).ngClassTouched,Ao(e,27).ngClassPristine,Ao(e,27).ngClassDirty,Ao(e,27).ngClassValid,Ao(e,27).ngClassInvalid,Ao(e,27).ngClassPending),t(e,39,0,Ao(e,40).inline),t(e,44,0,Ao(e,45).inline)})}var Rv=bo("google-fonts-panel",Ov,function(t){return bs(0,[(t()(),to(0,0,null,null,1,"google-fonts-panel",[],null,null,null,Mv,Pv)),Wo(1,245760,null,0,Ov,[Ld,Av],null,null)],function(t,e){t(e,1,0)},null)},{},{},[]),Fv=function(){function t(t,e){var n=this;this._overlayRef=e,this._afterDismissed=new at,this._afterOpened=new at,this._onAction=new at,this._dismissedByAction=!1,this.containerInstance=t,this.onAction().subscribe(function(){return n.dismiss()}),t._onExit.subscribe(function(){return n._finishDismiss()})}return t.prototype.dismiss=function(){this._afterDismissed.closed||this.containerInstance.exit(),clearTimeout(this._durationTimeoutId)},t.prototype.dismissWithAction=function(){this._onAction.closed||(this._dismissedByAction=!0,this._onAction.next(),this._onAction.complete())},t.prototype.closeWithAction=function(){this.dismissWithAction()},t.prototype._dismissAfter=function(t){var e=this;this._durationTimeoutId=setTimeout(function(){return e.dismiss()},t)},t.prototype._open=function(){this._afterOpened.closed||(this._afterOpened.next(),this._afterOpened.complete())},t.prototype._finishDismiss=function(){this._overlayRef.dispose(),this._onAction.closed||this._onAction.complete(),this._afterDismissed.next({dismissedByAction:this._dismissedByAction}),this._afterDismissed.complete(),this._dismissedByAction=!1},t.prototype.afterDismissed=function(){return this._afterDismissed.asObservable()},t.prototype.afterOpened=function(){return this.containerInstance._onEnter},t.prototype.onAction=function(){return this._onAction.asObservable()},t}(),Nv=new yt("MatSnackBarData"),Lv=function(){this.politeness="assertive",this.announcementMessage="",this.duration=0,this.data=null,this.horizontalPosition="center",this.verticalPosition="bottom"},Bv=function(){function t(t,e){this.snackBarRef=t,this.data=e}return t.prototype.action=function(){this.snackBarRef.dismissWithAction()},Object.defineProperty(t.prototype,"hasAction",{get:function(){return!!this.data.action},enumerable:!0,configurable:!0}),t}(),Vv=function(t){function e(e,n,i,r){var o=t.call(this)||this;return o._ngZone=e,o._elementRef=n,o._changeDetectorRef=i,o.snackBarConfig=r,o._destroyed=!1,o._onExit=new at,o._onEnter=new at,o._animationState="void",o}return r(e,t),e.prototype.attachComponentPortal=function(t){return this._assertNotAttached(),this._applySnackBarClasses(),this._portalOutlet.attachComponentPortal(t)},e.prototype.attachTemplatePortal=function(t){return this._assertNotAttached(),this._applySnackBarClasses(),this._portalOutlet.attachTemplatePortal(t)},e.prototype.onAnimationEnd=function(t){var e=t.toState;if(("void"===e&&"void"!==t.fromState||e.startsWith("hidden"))&&this._completeExit(),e.startsWith("visible")){var n=this._onEnter;this._ngZone.run(function(){n.next(),n.complete()})}},e.prototype.enter=function(){this._destroyed||(this._animationState="visible-"+this.snackBarConfig.verticalPosition,this._changeDetectorRef.detectChanges())},e.prototype.exit=function(){return this._animationState="hidden-"+this.snackBarConfig.verticalPosition,this._onExit},e.prototype.ngOnDestroy=function(){this._destroyed=!0,this._completeExit()},e.prototype._completeExit=function(){var t=this;this._ngZone.onMicrotaskEmpty.asObservable().pipe(lf(1)).subscribe(function(){t._onExit.next(),t._onExit.complete()})},e.prototype._applySnackBarClasses=function(){var t=this._elementRef.nativeElement,e=this.snackBarConfig.panelClass;e&&(Array.isArray(e)?e.forEach(function(e){return t.classList.add(e)}):t.classList.add(e)),"center"===this.snackBarConfig.horizontalPosition&&t.classList.add("mat-snack-bar-center"),"top"===this.snackBarConfig.verticalPosition&&t.classList.add("mat-snack-bar-top")},e.prototype._assertNotAttached=function(){if(this._portalOutlet.hasAttached())throw Error("Attempting to attach snack bar content after content is already attached")},e}(jd),zv=function(){},Hv=new yt("mat-snack-bar-default-options",{providedIn:"root",factory:function(){return new Lv}}),Wv=function(){function t(t,e,n,i,r,o){this._overlay=t,this._live=e,this._injector=n,this._breakpointObserver=i,this._parentSnackBar=r,this._defaultConfig=o,this._snackBarRefAtThisLevel=null}return Object.defineProperty(t.prototype,"_openedSnackBarRef",{get:function(){var t=this._parentSnackBar;return t?t._openedSnackBarRef:this._snackBarRefAtThisLevel},set:function(t){this._parentSnackBar?this._parentSnackBar._openedSnackBarRef=t:this._snackBarRefAtThisLevel=t},enumerable:!0,configurable:!0}),t.prototype.openFromComponent=function(t,e){return this._attach(t,e)},t.prototype.openFromTemplate=function(t,e){return this._attach(t,e)},t.prototype.open=function(t,e,n){void 0===e&&(e="");var i=o({},this._defaultConfig,n);return i.data={message:t,action:e},i.announcementMessage||(i.announcementMessage=t),this.openFromComponent(Bv,i)},t.prototype.dismiss=function(){this._openedSnackBarRef&&this._openedSnackBarRef.dismiss()},t.prototype._attachSnackBarContainer=function(t,e){var n=new Nd(e&&e.viewContainerRef&&e.viewContainerRef.injector||this._injector,new WeakMap([[Lv,e]])),i=new Pd(Vv,e.viewContainerRef,n),r=t.attach(i);return r.instance.snackBarConfig=e,r.instance},t.prototype._attach=function(t,e){var n=o({},new Lv,this._defaultConfig,e),i=this._createOverlay(n),r=this._attachSnackBarContainer(i,n),s=new Fv(r,i);if(t instanceof ii){var a=new Dd(t,null,{$implicit:n.data,snackBarRef:s});s.instance=r.attachTemplatePortal(a)}else{var l=this._createInjector(n,s),u=(a=new Pd(t,void 0,l),r.attachComponentPortal(a));s.instance=u.instance}return this._breakpointObserver.observe(Gf.Handset).pipe(hf(i.detachments().pipe(lf(1)))).subscribe(function(t){t.matches?i.overlayElement.classList.add("mat-snack-bar-handset"):i.overlayElement.classList.remove("mat-snack-bar-handset")}),this._animateSnackBar(s,n),this._openedSnackBarRef=s,this._openedSnackBarRef},t.prototype._animateSnackBar=function(t,e){var n=this;t.afterDismissed().subscribe(function(){n._openedSnackBarRef==t&&(n._openedSnackBarRef=null)}),this._openedSnackBarRef?(this._openedSnackBarRef.afterDismissed().subscribe(function(){t.containerInstance.enter()}),this._openedSnackBarRef.dismiss()):t.containerInstance.enter(),e.duration&&e.duration>0&&t.afterOpened().subscribe(function(){return t._dismissAfter(e.duration)}),e.announcementMessage&&this._live.announce(e.announcementMessage,e.politeness)},t.prototype._createOverlay=function(t){var e=new gf;e.direction=t.direction;var n=this._overlay.position().global(),i="rtl"===t.direction,r="left"===t.horizontalPosition||"start"===t.horizontalPosition&&!i||"end"===t.horizontalPosition&&i,o=!r&&"center"!==t.horizontalPosition;return r?n.left("0"):o?n.right("0"):n.centerHorizontally(),"top"===t.verticalPosition?n.top("0"):n.bottom("0"),e.positionStrategy=n,this._overlay.create(e)},t.prototype._createInjector=function(t,e){return new Nd(t&&t.viewContainerRef&&t.viewContainerRef.injector||this._injector,new WeakMap([[Fv,e],[Nv,t.data]]))},t.ngInjectableDef=vt({factory:function(){return new t(pe(Mf),pe(Nm),pe(Gt),pe(Yf),pe(t,12),pe(Hv))},token:t,providedIn:zv}),t}(),Uv="accent",Xv="primary",Yv=["mat-button","mat-flat-button","mat-icon-button","mat-raised-button","mat-stroked-button","mat-mini-fab","mat-fab"],qv=function(t){function e(e,n,i,r){var o=t.call(this,e)||this;o._platform=n,o._focusMonitor=i,o._animationMode=r,o.isRoundButton=o._hasHostAttributes("mat-fab","mat-mini-fab"),o.isIconButton=o._hasHostAttributes("mat-icon-button");for(var s=0,a=Yv;s<a.length;s++){var l=a[s];o._hasHostAttributes(l)&&e.nativeElement.classList.add(l)}return o._focusMonitor.monitor(o._elementRef.nativeElement,!0),o.isRoundButton?o.color=Uv:o._hasHostAttributes("mat-flat-button")&&(o.color=Xv),o}return r(e,t),e.prototype.ngOnDestroy=function(){this._focusMonitor.stopMonitoring(this._elementRef.nativeElement)},e.prototype.focus=function(){this._getHostElement().focus()},e.prototype._getHostElement=function(){return this._elementRef.nativeElement},e.prototype._isRippleDisabled=function(){return this.disableRipple||this.disabled},e.prototype._hasHostAttributes=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return e.some(function(e){return t._getHostElement().hasAttribute(e)})},e}(Um(Wm(Xm(function(t){this._elementRef=t})))),Gv=function(){};function Kv(){return"undefined"!=typeof process}function Zv(t){switch(t.length){case 0:return new om;case 1:return t[0];default:return new sm(t)}}function Qv(t,e,n,i,r,o){void 0===r&&(r={}),void 0===o&&(o={});var s=[],a=[],l=-1,u=null;if(i.forEach(function(t){var n=t.offset,i=n==l,c=i&&u||{};Object.keys(t).forEach(function(n){var i=n,a=t[n];if("offset"!==n)switch(i=e.normalizePropertyName(i,s),a){case am:a=r[n];break;case em:a=o[n];break;default:a=e.normalizeStyleValue(n,i,a,s)}c[i]=a}),i||a.push(c),u=c,l=n}),s.length)throw new Error("Unable to animate due to the following errors:\n - "+s.join("\n - "));return a}function Jv(t,e,n,i){switch(e){case"start":t.onStart(function(){return i(n&&$v(n,"start",t))});break;case"done":t.onDone(function(){return i(n&&$v(n,"done",t))});break;case"destroy":t.onDestroy(function(){return i(n&&$v(n,"destroy",t))})}}function $v(t,e,n){var i=n.totalTime,r=ty(t.element,t.triggerName,t.fromState,t.toState,e||t.phaseName,void 0==i?t.totalTime:i,!!n.disabled),o=t._data;return null!=o&&(r._data=o),r}function ty(t,e,n,i,r,o,s){return void 0===r&&(r=""),void 0===o&&(o=0),{element:t,triggerName:e,fromState:n,toState:i,phaseName:r,totalTime:o,disabled:!!s}}function ey(t,e,n){var i;return t instanceof Map?(i=t.get(e))||t.set(e,i=n):(i=t[e])||(i=t[e]=n),i}function ny(t){var e=t.indexOf(":");return[t.substring(1,e),t.substr(e+1)]}var iy=function(t,e){return!1},ry=function(t,e){return!1},oy=function(t,e,n){return[]},sy=Kv();if(sy||"undefined"!=typeof Element){if(iy=function(t,e){return t.contains(e)},sy||Element.prototype.matches)ry=function(t,e){return t.matches(e)};else{var ay=Element.prototype,ly=ay.matchesSelector||ay.mozMatchesSelector||ay.msMatchesSelector||ay.oMatchesSelector||ay.webkitMatchesSelector;ly&&(ry=function(t,e){return ly.apply(t,[e])})}oy=function(t,e,n){var i=[];if(n)i.push.apply(i,h(t.querySelectorAll(e)));else{var r=t.querySelector(e);r&&i.push(r)}return i}}var uy=null,cy=!1;function hy(t){uy||(uy=("undefined"!=typeof document?document.body:null)||{},cy=!!uy.style&&"WebkitAppearance"in uy.style);var e=!0;return uy.style&&!function(t){return"ebkit"==t.substring(1,6)}(t)&&!(e=t in uy.style)&&cy&&(e="Webkit"+t.charAt(0).toUpperCase()+t.substr(1)in uy.style),e}var py=ry,dy=iy,fy=oy;function gy(t){var e={};return Object.keys(t).forEach(function(n){var i=n.replace(/([a-z])([A-Z])/g,"$1-$2");e[i]=t[n]}),e}var my=function(){function t(){}return t.prototype.validateStyleProperty=function(t){return hy(t)},t.prototype.matchesElement=function(t,e){return py(t,e)},t.prototype.containsElement=function(t,e){return dy(t,e)},t.prototype.query=function(t,e,n){return fy(t,e,n)},t.prototype.computeStyle=function(t,e,n){return n||""},t.prototype.animate=function(t,e,n,i,r,o,s){return void 0===o&&(o=[]),new om(n,i)},t}(),vy=function(){function t(){}return t.NOOP=new my,t}(),yy=1e3;function by(t){if("number"==typeof t)return t;var e=t.match(/^(-?[\.\d]+)(m?s)/);return!e||e.length<2?0:_y(parseFloat(e[1]),e[2])}function _y(t,e){switch(e){case"s":return t*yy;default:return t}}function wy(t,e,n){return t.hasOwnProperty("duration")?t:function(t,e,n){var i,r=0,o="";if("string"==typeof t){var s=t.match(/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i);if(null===s)return e.push('The provided timing value "'+t+'" is invalid.'),{duration:0,delay:0,easing:""};i=_y(parseFloat(s[1]),s[2]);var a=s[3];null!=a&&(r=_y(Math.floor(parseFloat(a)),s[4]));var l=s[5];l&&(o=l)}else i=t;if(!n){var u=!1,c=e.length;i<0&&(e.push("Duration values below 0 are not allowed for this animation step."),u=!0),r<0&&(e.push("Delay values below 0 are not allowed for this animation step."),u=!0),u&&e.splice(c,0,'The provided timing value "'+t+'" is invalid.')}return{duration:i,delay:r,easing:o}}(t,e,n)}function xy(t,e){return void 0===e&&(e={}),Object.keys(t).forEach(function(n){e[n]=t[n]}),e}function Cy(t,e,n){if(void 0===n&&(n={}),e)for(var i in t)n[i]=t[i];else xy(t,n);return n}function Sy(t,e,n){return n?e+":"+n+";":""}function ky(t){for(var e="",n=0;n<t.style.length;n++)e+=Sy(0,i=t.style.item(n),t.style.getPropertyValue(i));for(var i in t.style)t.style.hasOwnProperty(i)&&!i.startsWith("_")&&(e+=Sy(0,i.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),t.style[i]));t.setAttribute("style",e)}function Ey(t,e){t.style&&(Object.keys(e).forEach(function(n){var i=My(n);t.style[i]=e[n]}),Kv()&&ky(t))}function Ty(t,e){t.style&&(Object.keys(e).forEach(function(e){var n=My(e);t.style[n]=""}),Kv()&&ky(t))}function Oy(t){return Array.isArray(t)?1==t.length?t[0]:nm(t):t}var Iy=new RegExp("{{\\s*(.+?)\\s*}}","g");function Ay(t){var e=[];if("string"==typeof t){for(var n=t.toString(),i=void 0;i=Iy.exec(n);)e.push(i[1]);Iy.lastIndex=0}return e}function Py(t,e,n){var i=t.toString(),r=i.replace(Iy,function(t,i){var r=e[i];return e.hasOwnProperty(i)||(n.push("Please provide a value for the animation param "+i),r=""),r.toString()});return r==i?t:r}function Dy(t){for(var e=[],n=t.next();!n.done;)e.push(n.value),n=t.next();return e}var jy=/-+([a-z0-9])/g;function My(t){return t.replace(jy,function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t[1].toUpperCase()})}function Ry(t,e){return 0===t||0===e}function Fy(t,e,n){var i=Object.keys(n);if(i.length&&e.length){var r=e[0],o=[];if(i.forEach(function(t){r.hasOwnProperty(t)||o.push(t),r[t]=n[t]}),o.length)for(var s=function(){var n=e[a];o.forEach(function(e){n[e]=Ly(t,e)})},a=1;a<e.length;a++)s()}return e}function Ny(t,e,n){switch(e.type){case 7:return t.visitTrigger(e,n);case 0:return t.visitState(e,n);case 1:return t.visitTransition(e,n);case 2:return t.visitSequence(e,n);case 3:return t.visitGroup(e,n);case 4:return t.visitAnimate(e,n);case 5:return t.visitKeyframes(e,n);case 6:return t.visitStyle(e,n);case 8:return t.visitReference(e,n);case 9:return t.visitAnimateChild(e,n);case 10:return t.visitAnimateRef(e,n);case 11:return t.visitQuery(e,n);case 12:return t.visitStagger(e,n);default:throw new Error("Unable to resolve animation metadata node #"+e.type)}}function Ly(t,e){return window.getComputedStyle(t)[e]}var By="*",Vy=new Set(["true","1"]),zy=new Set(["false","0"]);function Hy(t,e){var n=Vy.has(t)||zy.has(t),i=Vy.has(e)||zy.has(e);return function(r,o){var s=t==By||t==r,a=e==By||e==o;return!s&&n&&"boolean"==typeof r&&(s=r?Vy.has(t):zy.has(t)),!a&&i&&"boolean"==typeof o&&(a=o?Vy.has(e):zy.has(e)),s&&a}}var Wy=new RegExp("s*:selfs*,?","g");function Uy(t,e,n){return new Xy(t).build(e,n)}var Xy=function(){function t(t){this._driver=t}return t.prototype.build=function(t,e){var n=new Yy(e);return this._resetContextStyleTimingState(n),Ny(this,Oy(t),n)},t.prototype._resetContextStyleTimingState=function(t){t.currentQuerySelector="",t.collectedStyles={},t.collectedStyles[""]={},t.currentTime=0},t.prototype.visitTrigger=function(t,e){var n=this,i=e.queryCount=0,r=e.depCount=0,o=[],s=[];return"@"==t.name.charAt(0)&&e.errors.push("animation triggers cannot be prefixed with an `@` sign (e.g. trigger('@foo', [...]))"),t.definitions.forEach(function(t){if(n._resetContextStyleTimingState(e),0==t.type){var a=t,l=a.name;l.toString().split(/\s*,\s*/).forEach(function(t){a.name=t,o.push(n.visitState(a,e))}),a.name=l}else if(1==t.type){var u=n.visitTransition(t,e);i+=u.queryCount,r+=u.depCount,s.push(u)}else e.errors.push("only state() and transition() definitions can sit inside of a trigger()")}),{type:7,name:t.name,states:o,transitions:s,queryCount:i,depCount:r,options:null}},t.prototype.visitState=function(t,e){var n=this.visitStyle(t.styles,e),i=t.options&&t.options.params||null;if(n.containsDynamicStyles){var r=new Set,o=i||{};if(n.styles.forEach(function(t){if(qy(t)){var e=t;Object.keys(e).forEach(function(t){Ay(e[t]).forEach(function(t){o.hasOwnProperty(t)||r.add(t)})})}}),r.size){var s=Dy(r.values());e.errors.push('state("'+t.name+'", ...) must define default values for all the following style substitutions: '+s.join(", "))}}return{type:0,name:t.name,style:n,options:i?{params:i}:null}},t.prototype.visitTransition=function(t,e){e.queryCount=0,e.depCount=0;var n,i,r,o=Ny(this,Oy(t.animation),e);return{type:1,matchers:(n=t.expr,i=e.errors,r=[],"string"==typeof n?n.split(/\s*,\s*/).forEach(function(t){return function(t,e,n){if(":"==t[0]){var i=function(t,e){switch(t){case":enter":return"void => *";case":leave":return"* => void";case":increment":return function(t,e){return parseFloat(e)>parseFloat(t)};case":decrement":return function(t,e){return parseFloat(e)<parseFloat(t)};default:return e.push('The transition alias value "'+t+'" is not supported'),"* => *"}}(t,n);if("function"==typeof i)return void e.push(i);t=i}var r=t.match(/^(\*|[-\w]+)\s*(<?[=-]>)\s*(\*|[-\w]+)$/);if(null==r||r.length<4)return n.push('The provided transition expression "'+t+'" is not supported'),e;var o=r[1],s=r[2],a=r[3];e.push(Hy(o,a)),"<"!=s[0]||o==By&&a==By||e.push(Hy(a,o))}(t,r,i)}):r.push(n),r),animation:o,queryCount:e.queryCount,depCount:e.depCount,options:Gy(t.options)}},t.prototype.visitSequence=function(t,e){var n=this;return{type:2,steps:t.steps.map(function(t){return Ny(n,t,e)}),options:Gy(t.options)}},t.prototype.visitGroup=function(t,e){var n=this,i=e.currentTime,r=0,o=t.steps.map(function(t){e.currentTime=i;var o=Ny(n,t,e);return r=Math.max(r,e.currentTime),o});return e.currentTime=r,{type:3,steps:o,options:Gy(t.options)}},t.prototype.visitAnimate=function(t,e){var n,i=function(t,e){var n=null;if(t.hasOwnProperty("duration"))n=t;else if("number"==typeof t)return Ky(wy(t,e).duration,0,"");var i=t;if(i.split(/\s+/).some(function(t){return"{"==t.charAt(0)&&"{"==t.charAt(1)})){var r=Ky(0,0,"");return r.dynamic=!0,r.strValue=i,r}return Ky((n=n||wy(i,e)).duration,n.delay,n.easing)}(t.timings,e.errors);e.currentAnimateTimings=i;var r=t.styles?t.styles:im({});if(5==r.type)n=this.visitKeyframes(r,e);else{var o=t.styles,s=!1;if(!o){s=!0;var a={};i.easing&&(a.easing=i.easing),o=im(a)}e.currentTime+=i.duration+i.delay;var l=this.visitStyle(o,e);l.isEmptyStep=s,n=l}return e.currentAnimateTimings=null,{type:4,timings:i,style:n,options:null}},t.prototype.visitStyle=function(t,e){var n=this._makeStyleAst(t,e);return this._validateStyleAst(n,e),n},t.prototype._makeStyleAst=function(t,e){var n=[];Array.isArray(t.styles)?t.styles.forEach(function(t){"string"==typeof t?t==em?n.push(t):e.errors.push("The provided style string value "+t+" is not allowed."):n.push(t)}):n.push(t.styles);var i=!1,r=null;return n.forEach(function(t){if(qy(t)){var e=t,n=e.easing;if(n&&(r=n,delete e.easing),!i)for(var o in e)if(e[o].toString().indexOf("{{")>=0){i=!0;break}}}),{type:6,styles:n,easing:r,offset:t.offset,containsDynamicStyles:i,options:null}},t.prototype._validateStyleAst=function(t,e){var n=this,i=e.currentAnimateTimings,r=e.currentTime,o=e.currentTime;i&&o>0&&(o-=i.duration+i.delay),t.styles.forEach(function(t){"string"!=typeof t&&Object.keys(t).forEach(function(i){if(n._driver.validateStyleProperty(i)){var s,a,l,u=e.collectedStyles[e.currentQuerySelector],c=u[i],h=!0;c&&(o!=r&&o>=c.startTime&&r<=c.endTime&&(e.errors.push('The CSS property "'+i+'" that exists between the times of "'+c.startTime+'ms" and "'+c.endTime+'ms" is also being animated in a parallel animation between the times of "'+o+'ms" and "'+r+'ms"'),h=!1),o=c.startTime),h&&(u[i]={startTime:o,endTime:r}),e.options&&(s=e.errors,a=e.options.params||{},(l=Ay(t[i])).length&&l.forEach(function(t){a.hasOwnProperty(t)||s.push("Unable to resolve the local animation param "+t+" in the given list of values")}))}else e.errors.push('The provided animation property "'+i+'" is not a supported CSS property for animations')})})},t.prototype.visitKeyframes=function(t,e){var n=this,i={type:5,styles:[],options:null};if(!e.currentAnimateTimings)return e.errors.push("keyframes() must be placed inside of a call to animate()"),i;var r=0,o=[],s=!1,a=!1,l=0,u=t.steps.map(function(t){var i=n._makeStyleAst(t,e),u=null!=i.offset?i.offset:function(t){if("string"==typeof t)return null;var e=null;if(Array.isArray(t))t.forEach(function(t){if(qy(t)&&t.hasOwnProperty("offset")){var n=t;e=parseFloat(n.offset),delete n.offset}});else if(qy(t)&&t.hasOwnProperty("offset")){var n=t;e=parseFloat(n.offset),delete n.offset}return e}(i.styles),c=0;return null!=u&&(r++,c=i.offset=u),a=a||c<0||c>1,s=s||c<l,l=c,o.push(c),i});a&&e.errors.push("Please ensure that all keyframe offsets are between 0 and 1"),s&&e.errors.push("Please ensure that all keyframe offsets are in order");var c=t.steps.length,h=0;r>0&&r<c?e.errors.push("Not all style() steps within the declared keyframes() contain offsets"):0==r&&(h=1/(c-1));var p=c-1,d=e.currentTime,f=e.currentAnimateTimings,g=f.duration;return u.forEach(function(t,r){var s=h>0?r==p?1:h*r:o[r],a=s*g;e.currentTime=d+f.delay+a,f.duration=a,n._validateStyleAst(t,e),t.offset=s,i.styles.push(t)}),i},t.prototype.visitReference=function(t,e){return{type:8,animation:Ny(this,Oy(t.animation),e),options:Gy(t.options)}},t.prototype.visitAnimateChild=function(t,e){return e.depCount++,{type:9,options:Gy(t.options)}},t.prototype.visitAnimateRef=function(t,e){return{type:10,animation:this.visitReference(t.animation,e),options:Gy(t.options)}},t.prototype.visitQuery=function(t,e){var n=e.currentQuerySelector,i=t.options||{};e.queryCount++,e.currentQuery=t;var r=c(function(t){var e=!!t.split(/\s*,\s*/).find(function(t){return":self"==t});return e&&(t=t.replace(Wy,"")),[t=t.replace(/@\*/g,".ng-trigger").replace(/@\w+/g,function(t){return".ng-trigger-"+t.substr(1)}).replace(/:animating/g,".ng-animating"),e]}(t.selector),2),o=r[0],s=r[1];e.currentQuerySelector=n.length?n+" "+o:o,ey(e.collectedStyles,e.currentQuerySelector,{});var a=Ny(this,Oy(t.animation),e);return e.currentQuery=null,e.currentQuerySelector=n,{type:11,selector:o,limit:i.limit||0,optional:!!i.optional,includeSelf:s,animation:a,originalSelector:t.selector,options:Gy(t.options)}},t.prototype.visitStagger=function(t,e){e.currentQuery||e.errors.push("stagger() can only be used inside of query()");var n="full"===t.timings?{duration:0,delay:0,easing:"full"}:wy(t.timings,e.errors,!0);return{type:12,animation:Ny(this,Oy(t.animation),e),timings:n,options:null}},t}(),Yy=function(t){this.errors=t,this.queryCount=0,this.depCount=0,this.currentTransition=null,this.currentQuery=null,this.currentQuerySelector=null,this.currentAnimateTimings=null,this.currentTime=0,this.collectedStyles={},this.options=null};function qy(t){return!Array.isArray(t)&&"object"==typeof t}function Gy(t){var e;return t?(t=xy(t)).params&&(t.params=(e=t.params)?xy(e):null):t={},t}function Ky(t,e,n){return{duration:t,delay:e,easing:n}}function Zy(t,e,n,i,r,o,s,a){return void 0===s&&(s=null),void 0===a&&(a=!1),{type:1,element:t,keyframes:e,preStyleProps:n,postStyleProps:i,duration:r,delay:o,totalTime:r+o,easing:s,subTimeline:a}}var Qy=function(){function t(){this._map=new Map}return t.prototype.consume=function(t){var e=this._map.get(t);return e?this._map.delete(t):e=[],e},t.prototype.append=function(t,e){var n=this._map.get(t);n||this._map.set(t,n=[]),n.push.apply(n,h(e))},t.prototype.has=function(t){return this._map.has(t)},t.prototype.clear=function(){this._map.clear()},t}(),Jy=new RegExp(":enter","g"),$y=new RegExp(":leave","g");function tb(t,e,n,i,r,o,s,a,l,u){return void 0===o&&(o={}),void 0===s&&(s={}),void 0===u&&(u=[]),(new eb).buildKeyframes(t,e,n,i,r,o,s,a,l,u)}var eb=function(){function t(){}return t.prototype.buildKeyframes=function(t,e,n,i,r,o,s,a,l,u){void 0===u&&(u=[]),l=l||new Qy;var c=new ib(t,e,l,i,r,u,[]);c.options=a,c.currentTimeline.setStyles([o],null,c.errors,a),Ny(this,n,c);var h=c.timelines.filter(function(t){return t.containsAnimation()});if(h.length&&Object.keys(s).length){var p=h[h.length-1];p.allowOnlyTimelineStyles()||p.setStyles([s],null,c.errors,a)}return h.length?h.map(function(t){return t.buildKeyframes()}):[Zy(e,[],[],[],0,0,"",!1)]},t.prototype.visitTrigger=function(t,e){},t.prototype.visitState=function(t,e){},t.prototype.visitTransition=function(t,e){},t.prototype.visitAnimateChild=function(t,e){var n=e.subInstructions.consume(e.element);if(n){var i=e.createSubContext(t.options),r=e.currentTimeline.currentTime,o=this._visitSubInstructions(n,i,i.options);r!=o&&e.transformIntoNewTimeline(o)}e.previousNode=t},t.prototype.visitAnimateRef=function(t,e){var n=e.createSubContext(t.options);n.transformIntoNewTimeline(),this.visitReference(t.animation,n),e.transformIntoNewTimeline(n.currentTimeline.currentTime),e.previousNode=t},t.prototype._visitSubInstructions=function(t,e,n){var i=e.currentTimeline.currentTime,r=null!=n.duration?by(n.duration):null,o=null!=n.delay?by(n.delay):null;return 0!==r&&t.forEach(function(t){var n=e.appendInstructionToTimeline(t,r,o);i=Math.max(i,n.duration+n.delay)}),i},t.prototype.visitReference=function(t,e){e.updateOptions(t.options,!0),Ny(this,t.animation,e),e.previousNode=t},t.prototype.visitSequence=function(t,e){var n=this,i=e.subContextCount,r=e,o=t.options;if(o&&(o.params||o.delay)&&((r=e.createSubContext(o)).transformIntoNewTimeline(),null!=o.delay)){6==r.previousNode.type&&(r.currentTimeline.snapshotCurrentStyles(),r.previousNode=nb);var s=by(o.delay);r.delayNextStep(s)}t.steps.length&&(t.steps.forEach(function(t){return Ny(n,t,r)}),r.currentTimeline.applyStylesToKeyframe(),r.subContextCount>i&&r.transformIntoNewTimeline()),e.previousNode=t},t.prototype.visitGroup=function(t,e){var n=this,i=[],r=e.currentTimeline.currentTime,o=t.options&&t.options.delay?by(t.options.delay):0;t.steps.forEach(function(s){var a=e.createSubContext(t.options);o&&a.delayNextStep(o),Ny(n,s,a),r=Math.max(r,a.currentTimeline.currentTime),i.push(a.currentTimeline)}),i.forEach(function(t){return e.currentTimeline.mergeTimelineCollectedStyles(t)}),e.transformIntoNewTimeline(r),e.previousNode=t},t.prototype._visitTiming=function(t,e){if(t.dynamic){var n=t.strValue;return wy(e.params?Py(n,e.params,e.errors):n,e.errors)}return{duration:t.duration,delay:t.delay,easing:t.easing}},t.prototype.visitAnimate=function(t,e){var n=e.currentAnimateTimings=this._visitTiming(t.timings,e),i=e.currentTimeline;n.delay&&(e.incrementTime(n.delay),i.snapshotCurrentStyles());var r=t.style;5==r.type?this.visitKeyframes(r,e):(e.incrementTime(n.duration),this.visitStyle(r,e),i.applyStylesToKeyframe()),e.currentAnimateTimings=null,e.previousNode=t},t.prototype.visitStyle=function(t,e){var n=e.currentTimeline,i=e.currentAnimateTimings;!i&&n.getCurrentStyleProperties().length&&n.forwardFrame();var r=i&&i.easing||t.easing;t.isEmptyStep?n.applyEmptyStep(r):n.setStyles(t.styles,r,e.errors,e.options),e.previousNode=t},t.prototype.visitKeyframes=function(t,e){var n=e.currentAnimateTimings,i=e.currentTimeline.duration,r=n.duration,o=e.createSubContext().currentTimeline;o.easing=n.easing,t.styles.forEach(function(t){o.forwardTime((t.offset||0)*r),o.setStyles(t.styles,t.easing,e.errors,e.options),o.applyStylesToKeyframe()}),e.currentTimeline.mergeTimelineCollectedStyles(o),e.transformIntoNewTimeline(i+r),e.previousNode=t},t.prototype.visitQuery=function(t,e){var n=this,i=e.currentTimeline.currentTime,r=t.options||{},o=r.delay?by(r.delay):0;o&&(6===e.previousNode.type||0==i&&e.currentTimeline.getCurrentStyleProperties().length)&&(e.currentTimeline.snapshotCurrentStyles(),e.previousNode=nb);var s=i,a=e.invokeQuery(t.selector,t.originalSelector,t.limit,t.includeSelf,!!r.optional,e.errors);e.currentQueryTotal=a.length;var l=null;a.forEach(function(i,r){e.currentQueryIndex=r;var a=e.createSubContext(t.options,i);o&&a.delayNextStep(o),i===e.element&&(l=a.currentTimeline),Ny(n,t.animation,a),a.currentTimeline.applyStylesToKeyframe(),s=Math.max(s,a.currentTimeline.currentTime)}),e.currentQueryIndex=0,e.currentQueryTotal=0,e.transformIntoNewTimeline(s),l&&(e.currentTimeline.mergeTimelineCollectedStyles(l),e.currentTimeline.snapshotCurrentStyles()),e.previousNode=t},t.prototype.visitStagger=function(t,e){var n=e.parentContext,i=e.currentTimeline,r=t.timings,o=Math.abs(r.duration),s=o*(e.currentQueryTotal-1),a=o*e.currentQueryIndex;switch(r.duration<0?"reverse":r.easing){case"reverse":a=s-a;break;case"full":a=n.currentStaggerTime}var l=e.currentTimeline;a&&l.delayNextStep(a);var u=l.currentTime;Ny(this,t.animation,e),e.previousNode=t,n.currentStaggerTime=i.currentTime-u+(i.startTime-n.currentTimeline.startTime)},t}(),nb={},ib=function(){function t(t,e,n,i,r,o,s,a){this._driver=t,this.element=e,this.subInstructions=n,this._enterClassName=i,this._leaveClassName=r,this.errors=o,this.timelines=s,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=nb,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=a||new rb(this._driver,e,0),s.push(this.currentTimeline)}return Object.defineProperty(t.prototype,"params",{get:function(){return this.options.params},enumerable:!0,configurable:!0}),t.prototype.updateOptions=function(t,e){var n=this;if(t){var i=t,r=this.options;null!=i.duration&&(r.duration=by(i.duration)),null!=i.delay&&(r.delay=by(i.delay));var o=i.params;if(o){var s=r.params;s||(s=this.options.params={}),Object.keys(o).forEach(function(t){e&&s.hasOwnProperty(t)||(s[t]=Py(o[t],s,n.errors))})}}},t.prototype._copyOptions=function(){var t={};if(this.options){var e=this.options.params;if(e){var n=t.params={};Object.keys(e).forEach(function(t){n[t]=e[t]})}}return t},t.prototype.createSubContext=function(e,n,i){void 0===e&&(e=null);var r=n||this.element,o=new t(this._driver,r,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(r,i||0));return o.previousNode=this.previousNode,o.currentAnimateTimings=this.currentAnimateTimings,o.options=this._copyOptions(),o.updateOptions(e),o.currentQueryIndex=this.currentQueryIndex,o.currentQueryTotal=this.currentQueryTotal,o.parentContext=this,this.subContextCount++,o},t.prototype.transformIntoNewTimeline=function(t){return this.previousNode=nb,this.currentTimeline=this.currentTimeline.fork(this.element,t),this.timelines.push(this.currentTimeline),this.currentTimeline},t.prototype.appendInstructionToTimeline=function(t,e,n){var i={duration:null!=e?e:t.duration,delay:this.currentTimeline.currentTime+(null!=n?n:0)+t.delay,easing:""},r=new ob(this._driver,t.element,t.keyframes,t.preStyleProps,t.postStyleProps,i,t.stretchStartingKeyframe);return this.timelines.push(r),i},t.prototype.incrementTime=function(t){this.currentTimeline.forwardTime(this.currentTimeline.duration+t)},t.prototype.delayNextStep=function(t){t>0&&this.currentTimeline.delayNextStep(t)},t.prototype.invokeQuery=function(t,e,n,i,r,o){var s=[];if(i&&s.push(this.element),t.length>0){t=(t=t.replace(Jy,"."+this._enterClassName)).replace($y,"."+this._leaveClassName);var a=this._driver.query(this.element,t,1!=n);0!==n&&(a=n<0?a.slice(a.length+n,a.length):a.slice(0,n)),s.push.apply(s,h(a))}return r||0!=s.length||o.push('`query("'+e+'")` returned zero elements. (Use `query("'+e+'", { optional: true })` if you wish to allow this.)'),s},t}(),rb=function(){function t(t,e,n,i){this._driver=t,this.element=e,this.startTime=n,this._elementTimelineStylesLookup=i,this.duration=0,this._previousKeyframe={},this._currentKeyframe={},this._keyframes=new Map,this._styleSummary={},this._pendingStyles={},this._backFill={},this._currentEmptyStepKeyframe=null,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._localTimelineStyles=Object.create(this._backFill,{}),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(e),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(e,this._localTimelineStyles)),this._loadKeyframe()}return t.prototype.containsAnimation=function(){switch(this._keyframes.size){case 0:return!1;case 1:return this.getCurrentStyleProperties().length>0;default:return!0}},t.prototype.getCurrentStyleProperties=function(){return Object.keys(this._currentKeyframe)},Object.defineProperty(t.prototype,"currentTime",{get:function(){return this.startTime+this.duration},enumerable:!0,configurable:!0}),t.prototype.delayNextStep=function(t){var e=1==this._keyframes.size&&Object.keys(this._pendingStyles).length;this.duration||e?(this.forwardTime(this.currentTime+t),e&&this.snapshotCurrentStyles()):this.startTime+=t},t.prototype.fork=function(e,n){return this.applyStylesToKeyframe(),new t(this._driver,e,n||this.currentTime,this._elementTimelineStylesLookup)},t.prototype._loadKeyframe=function(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=Object.create(this._backFill,{}),this._keyframes.set(this.duration,this._currentKeyframe))},t.prototype.forwardFrame=function(){this.duration+=1,this._loadKeyframe()},t.prototype.forwardTime=function(t){this.applyStylesToKeyframe(),this.duration=t,this._loadKeyframe()},t.prototype._updateStyle=function(t,e){this._localTimelineStyles[t]=e,this._globalTimelineStyles[t]=e,this._styleSummary[t]={time:this.currentTime,value:e}},t.prototype.allowOnlyTimelineStyles=function(){return this._currentEmptyStepKeyframe!==this._currentKeyframe},t.prototype.applyEmptyStep=function(t){var e=this;t&&(this._previousKeyframe.easing=t),Object.keys(this._globalTimelineStyles).forEach(function(t){e._backFill[t]=e._globalTimelineStyles[t]||em,e._currentKeyframe[t]=em}),this._currentEmptyStepKeyframe=this._currentKeyframe},t.prototype.setStyles=function(t,e,n,i){var r=this;e&&(this._previousKeyframe.easing=e);var o=i&&i.params||{},s=function(t,e){var n,i={};return t.forEach(function(t){"*"===t?(n=n||Object.keys(e)).forEach(function(t){i[t]=em}):Cy(t,!1,i)}),i}(t,this._globalTimelineStyles);Object.keys(s).forEach(function(t){var e=Py(s[t],o,n);r._pendingStyles[t]=e,r._localTimelineStyles.hasOwnProperty(t)||(r._backFill[t]=r._globalTimelineStyles.hasOwnProperty(t)?r._globalTimelineStyles[t]:em),r._updateStyle(t,e)})},t.prototype.applyStylesToKeyframe=function(){var t=this,e=this._pendingStyles,n=Object.keys(e);0!=n.length&&(this._pendingStyles={},n.forEach(function(n){t._currentKeyframe[n]=e[n]}),Object.keys(this._localTimelineStyles).forEach(function(e){t._currentKeyframe.hasOwnProperty(e)||(t._currentKeyframe[e]=t._localTimelineStyles[e])}))},t.prototype.snapshotCurrentStyles=function(){var t=this;Object.keys(this._localTimelineStyles).forEach(function(e){var n=t._localTimelineStyles[e];t._pendingStyles[e]=n,t._updateStyle(e,n)})},t.prototype.getFinalKeyframe=function(){return this._keyframes.get(this.duration)},Object.defineProperty(t.prototype,"properties",{get:function(){var t=[];for(var e in this._currentKeyframe)t.push(e);return t},enumerable:!0,configurable:!0}),t.prototype.mergeTimelineCollectedStyles=function(t){var e=this;Object.keys(t._styleSummary).forEach(function(n){var i=e._styleSummary[n],r=t._styleSummary[n];(!i||r.time>i.time)&&e._updateStyle(n,r.value)})},t.prototype.buildKeyframes=function(){var t=this;this.applyStylesToKeyframe();var e=new Set,n=new Set,i=1===this._keyframes.size&&0===this.duration,r=[];this._keyframes.forEach(function(o,s){var a=Cy(o,!0);Object.keys(a).forEach(function(t){var i=a[t];i==am?e.add(t):i==em&&n.add(t)}),i||(a.offset=s/t.duration),r.push(a)});var o=e.size?Dy(e.values()):[],s=n.size?Dy(n.values()):[];if(i){var a=r[0],l=xy(a);a.offset=0,l.offset=1,r=[a,l]}return Zy(this.element,r,o,s,this.duration,this.startTime,this.easing,!1)},t}(),ob=function(t){function e(e,n,i,r,o,s,a){void 0===a&&(a=!1);var l=t.call(this,e,n,s.delay)||this;return l.element=n,l.keyframes=i,l.preStyleProps=r,l.postStyleProps=o,l._stretchStartingKeyframe=a,l.timings={duration:s.duration,delay:s.delay,easing:s.easing},l}return r(e,t),e.prototype.containsAnimation=function(){return this.keyframes.length>1},e.prototype.buildKeyframes=function(){var t=this.keyframes,e=this.timings,n=e.delay,i=e.duration,r=e.easing;if(this._stretchStartingKeyframe&&n){var o=[],s=i+n,a=n/s,l=Cy(t[0],!1);l.offset=0,o.push(l);var u=Cy(t[0],!1);u.offset=sb(a),o.push(u);for(var c=t.length-1,h=1;h<=c;h++){var p=Cy(t[h],!1);p.offset=sb((n+p.offset*i)/s),o.push(p)}i=s,n=0,r="",t=o}return Zy(this.element,t,this.preStyleProps,this.postStyleProps,i,n,r,!0)},e}(rb);function sb(t,e){void 0===e&&(e=3);var n=Math.pow(10,e-1);return Math.round(t*n)/n}var ab=function(){},lb=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.normalizePropertyName=function(t,e){return My(t)},e.prototype.normalizeStyleValue=function(t,e,n,i){var r="",o=n.toString().trim();if(ub[e]&&0!==n&&"0"!==n)if("number"==typeof n)r="px";else{var s=n.match(/^[+-]?[\d\.]+([a-z]*)$/);s&&0==s[1].length&&i.push("Please provide a CSS unit value for "+t+":"+n)}return o+r},e}(ab),ub=function(t){var e={};return"width,height,minWidth,minHeight,maxWidth,maxHeight,left,top,bottom,right,fontSize,outlineWidth,outlineOffset,paddingTop,paddingLeft,paddingBottom,paddingRight,marginTop,marginLeft,marginBottom,marginRight,borderRadius,borderWidth,borderTopWidth,borderLeftWidth,borderRightWidth,borderBottomWidth,textIndent,perspective".split(",").forEach(function(t){return e[t]=!0}),e}();function cb(t,e,n,i,r,o,s,a,l,u,c,h,p){return{type:0,element:t,triggerName:e,isRemovalTransition:r,fromState:n,fromStyles:o,toState:i,toStyles:s,timelines:a,queriedElements:l,preStyleProps:u,postStyleProps:c,totalTime:h,errors:p}}var hb={},pb=function(){function t(t,e,n){this._triggerName=t,this.ast=e,this._stateStyles=n}return t.prototype.match=function(t,e,n,i){return function(t,e,n,i,r){return t.some(function(t){return t(e,n,i,r)})}(this.ast.matchers,t,e,n,i)},t.prototype.buildStyles=function(t,e,n){var i=this._stateStyles["*"],r=this._stateStyles[t],o=i?i.buildStyles(e,n):{};return r?r.buildStyles(e,n):o},t.prototype.build=function(t,e,n,i,r,s,a,l,u,c){var h=[],p=this.ast.options&&this.ast.options.params||hb,d=this.buildStyles(n,a&&a.params||hb,h),f=l&&l.params||hb,g=this.buildStyles(i,f,h),m=new Set,v=new Map,y=new Map,b="void"===i,_={params:o({},p,f)},w=c?[]:tb(t,e,this.ast.animation,r,s,d,g,_,u,h),x=0;if(w.forEach(function(t){x=Math.max(t.duration+t.delay,x)}),h.length)return cb(e,this._triggerName,n,i,b,d,g,[],[],v,y,x,h);w.forEach(function(t){var n=t.element,i=ey(v,n,{});t.preStyleProps.forEach(function(t){return i[t]=!0});var r=ey(y,n,{});t.postStyleProps.forEach(function(t){return r[t]=!0}),n!==e&&m.add(n)});var C=Dy(m.values());return cb(e,this._triggerName,n,i,b,d,g,w,C,v,y,x)},t}(),db=function(){function t(t,e){this.styles=t,this.defaultParams=e}return t.prototype.buildStyles=function(t,e){var n={},i=xy(this.defaultParams);return Object.keys(t).forEach(function(e){var n=t[e];null!=n&&(i[e]=n)}),this.styles.styles.forEach(function(t){if("string"!=typeof t){var r=t;Object.keys(r).forEach(function(t){var o=r[t];o.length>1&&(o=Py(o,i,e)),n[t]=o})}}),n},t}(),fb=function(){function t(t,e){var n=this;this.name=t,this.ast=e,this.transitionFactories=[],this.states={},e.states.forEach(function(t){n.states[t.name]=new db(t.style,t.options&&t.options.params||{})}),gb(this.states,"true","1"),gb(this.states,"false","0"),e.transitions.forEach(function(e){n.transitionFactories.push(new pb(t,e,n.states))}),this.fallbackTransition=new pb(t,{type:1,animation:{type:2,steps:[],options:null},matchers:[function(t,e){return!0}],options:null,queryCount:0,depCount:0},this.states)}return Object.defineProperty(t.prototype,"containsQueries",{get:function(){return this.ast.queryCount>0},enumerable:!0,configurable:!0}),t.prototype.matchTransition=function(t,e,n,i){return this.transitionFactories.find(function(r){return r.match(t,e,n,i)})||null},t.prototype.matchStyles=function(t,e,n){return this.fallbackTransition.buildStyles(t,e,n)},t}();function gb(t,e,n){t.hasOwnProperty(e)?t.hasOwnProperty(n)||(t[n]=t[e]):t.hasOwnProperty(n)&&(t[e]=t[n])}var mb=new Qy,vb=function(){function t(t,e,n){this.bodyNode=t,this._driver=e,this._normalizer=n,this._animations={},this._playersById={},this.players=[]}return t.prototype.register=function(t,e){var n=[],i=Uy(this._driver,e,n);if(n.length)throw new Error("Unable to build the animation due to the following errors: "+n.join("\n"));this._animations[t]=i},t.prototype._buildPlayer=function(t,e,n){var i=t.element,r=Qv(0,this._normalizer,0,t.keyframes,e,n);return this._driver.animate(i,r,t.duration,t.delay,t.easing,[],!0)},t.prototype.create=function(t,e,n){var i=this;void 0===n&&(n={});var r,o=[],s=this._animations[t],a=new Map;if(s?(r=tb(this._driver,e,s,"ng-enter","ng-leave",{},{},n,mb,o)).forEach(function(t){var e=ey(a,t.element,{});t.postStyleProps.forEach(function(t){return e[t]=null})}):(o.push("The requested animation doesn't exist or has already been destroyed"),r=[]),o.length)throw new Error("Unable to create the animation due to the following errors: "+o.join("\n"));a.forEach(function(t,e){Object.keys(t).forEach(function(n){t[n]=i._driver.computeStyle(e,n,em)})});var l=Zv(r.map(function(t){var e=a.get(t.element);return i._buildPlayer(t,{},e)}));return this._playersById[t]=l,l.onDestroy(function(){return i.destroy(t)}),this.players.push(l),l},t.prototype.destroy=function(t){var e=this._getPlayer(t);e.destroy(),delete this._playersById[t];var n=this.players.indexOf(e);n>=0&&this.players.splice(n,1)},t.prototype._getPlayer=function(t){var e=this._playersById[t];if(!e)throw new Error("Unable to find the timeline player referenced by "+t);return e},t.prototype.listen=function(t,e,n,i){var r=ty(e,"","","");return Jv(this._getPlayer(t),n,r,i),function(){}},t.prototype.command=function(t,e,n,i){if("register"!=n)if("create"!=n){var r=this._getPlayer(t);switch(n){case"play":r.play();break;case"pause":r.pause();break;case"reset":r.reset();break;case"restart":r.restart();break;case"finish":r.finish();break;case"init":r.init();break;case"setPosition":r.setPosition(parseFloat(i[0]));break;case"destroy":this.destroy(t)}}else this.create(t,e,i[0]||{});else this.register(t,i[0])},t}(),yb=[],bb={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},_b={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},wb="__ng_removed",xb=function(){function t(t,e){void 0===e&&(e=""),this.namespaceId=e;var n=t&&t.hasOwnProperty("value");if(this.value=function(t){return null!=t?t:null}(n?t.value:t),n){var i=xy(t);delete i.value,this.options=i}else this.options={};this.options.params||(this.options.params={})}return Object.defineProperty(t.prototype,"params",{get:function(){return this.options.params},enumerable:!0,configurable:!0}),t.prototype.absorbOptions=function(t){var e=t.params;if(e){var n=this.options.params;Object.keys(e).forEach(function(t){null==n[t]&&(n[t]=e[t])})}},t}(),Cb=new xb("void"),Sb=function(){function t(t,e,n){this.id=t,this.hostElement=e,this._engine=n,this.players=[],this._triggers={},this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+t,Db(e,this._hostClassName)}return t.prototype.listen=function(t,e,n,i){var r,o=this;if(!this._triggers.hasOwnProperty(e))throw new Error('Unable to listen on the animation trigger event "'+n+'" because the animation trigger "'+e+"\" doesn't exist!");if(null==n||0==n.length)throw new Error('Unable to listen on the animation trigger "'+e+'" because the provided event is undefined!');if("start"!=(r=n)&&"done"!=r)throw new Error('The provided animation trigger event "'+n+'" for the animation trigger "'+e+'" is not supported!');var s=ey(this._elementListeners,t,[]),a={name:e,phase:n,callback:i};s.push(a);var l=ey(this._engine.statesByElement,t,{});return l.hasOwnProperty(e)||(Db(t,"ng-trigger"),Db(t,"ng-trigger-"+e),l[e]=Cb),function(){o._engine.afterFlush(function(){var t=s.indexOf(a);t>=0&&s.splice(t,1),o._triggers[e]||delete l[e]})}},t.prototype.register=function(t,e){return!this._triggers[t]&&(this._triggers[t]=e,!0)},t.prototype._getTrigger=function(t){var e=this._triggers[t];if(!e)throw new Error('The provided animation trigger "'+t+'" has not been registered!');return e},t.prototype.trigger=function(t,e,n,i){var r=this;void 0===i&&(i=!0);var o=this._getTrigger(e),s=new Eb(this.id,e,t),a=this._engine.statesByElement.get(t);a||(Db(t,"ng-trigger"),Db(t,"ng-trigger-"+e),this._engine.statesByElement.set(t,a={}));var l=a[e],u=new xb(n,this.id);if(!(n&&n.hasOwnProperty("value"))&&l&&u.absorbOptions(l.options),a[e]=u,l||(l=Cb),"void"===u.value||l.value!==u.value){var c=ey(this._engine.playersByElement,t,[]);c.forEach(function(t){t.namespaceId==r.id&&t.triggerName==e&&t.queued&&t.destroy()});var h=o.matchTransition(l.value,u.value,t,u.params),p=!1;if(!h){if(!i)return;h=o.fallbackTransition,p=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:e,transition:h,fromState:l,toState:u,player:s,isFallbackTransition:p}),p||(Db(t,"ng-animate-queued"),s.onStart(function(){jb(t,"ng-animate-queued")})),s.onDone(function(){var e=r.players.indexOf(s);e>=0&&r.players.splice(e,1);var n=r._engine.playersByElement.get(t);if(n){var i=n.indexOf(s);i>=0&&n.splice(i,1)}}),this.players.push(s),c.push(s),s}if(!function(t,e){var n=Object.keys(t),i=Object.keys(e);if(n.length!=i.length)return!1;for(var r=0;r<n.length;r++){var o=n[r];if(!e.hasOwnProperty(o)||t[o]!==e[o])return!1}return!0}(l.params,u.params)){var d=[],f=o.matchStyles(l.value,l.params,d),g=o.matchStyles(u.value,u.params,d);d.length?this._engine.reportError(d):this._engine.afterFlush(function(){Ty(t,f),Ey(t,g)})}},t.prototype.deregister=function(t){var e=this;delete this._triggers[t],this._engine.statesByElement.forEach(function(e,n){delete e[t]}),this._elementListeners.forEach(function(n,i){e._elementListeners.set(i,n.filter(function(e){return e.name!=t}))})},t.prototype.clearElementCache=function(t){this._engine.statesByElement.delete(t),this._elementListeners.delete(t);var e=this._engine.playersByElement.get(t);e&&(e.forEach(function(t){return t.destroy()}),this._engine.playersByElement.delete(t))},t.prototype._signalRemovalForInnerTriggers=function(t,e,n){var i=this;void 0===n&&(n=!1),this._engine.driver.query(t,".ng-trigger",!0).forEach(function(t){if(!t[wb]){var n=i._engine.fetchNamespacesByElement(t);n.size?n.forEach(function(n){return n.triggerLeaveAnimation(t,e,!1,!0)}):i.clearElementCache(t)}})},t.prototype.triggerLeaveAnimation=function(t,e,n,i){var r=this,o=this._engine.statesByElement.get(t);if(o){var s=[];if(Object.keys(o).forEach(function(e){if(r._triggers[e]){var n=r.trigger(t,e,"void",i);n&&s.push(n)}}),s.length)return this._engine.markElementAsRemoved(this.id,t,!0,e),n&&Zv(s).onDone(function(){return r._engine.processLeaveNode(t)}),!0}return!1},t.prototype.prepareLeaveAnimationListeners=function(t){var e=this,n=this._elementListeners.get(t);if(n){var i=new Set;n.forEach(function(n){var r=n.name;if(!i.has(r)){i.add(r);var o=e._triggers[r].fallbackTransition,s=e._engine.statesByElement.get(t)[r]||Cb,a=new xb("void"),l=new Eb(e.id,r,t);e._engine.totalQueuedPlayers++,e._queue.push({element:t,triggerName:r,transition:o,fromState:s,toState:a,player:l,isFallbackTransition:!0})}})}},t.prototype.removeNode=function(t,e){var n=this,i=this._engine;if(t.childElementCount&&this._signalRemovalForInnerTriggers(t,e,!0),!this.triggerLeaveAnimation(t,e,!0)){var r=!1;if(i.totalAnimations){var o=i.players.length?i.playersByQueriedElement.get(t):[];if(o&&o.length)r=!0;else for(var s=t;s=s.parentNode;)if(i.statesByElement.get(s)){r=!0;break}}this.prepareLeaveAnimationListeners(t),r?i.markElementAsRemoved(this.id,t,!1,e):(i.afterFlush(function(){return n.clearElementCache(t)}),i.destroyInnerAnimations(t),i._onRemovalComplete(t,e))}},t.prototype.insertNode=function(t,e){Db(t,this._hostClassName)},t.prototype.drainQueuedTransitions=function(t){var e=this,n=[];return this._queue.forEach(function(i){var r=i.player;if(!r.destroyed){var o=i.element,s=e._elementListeners.get(o);s&&s.forEach(function(e){if(e.name==i.triggerName){var n=ty(o,i.triggerName,i.fromState.value,i.toState.value);n._data=t,Jv(i.player,e.phase,n,e.callback)}}),r.markedForDestroy?e._engine.afterFlush(function(){r.destroy()}):n.push(i)}}),this._queue=[],n.sort(function(t,n){var i=t.transition.ast.depCount,r=n.transition.ast.depCount;return 0==i||0==r?i-r:e._engine.driver.containsElement(t.element,n.element)?1:-1})},t.prototype.destroy=function(t){this.players.forEach(function(t){return t.destroy()}),this._signalRemovalForInnerTriggers(this.hostElement,t)},t.prototype.elementContainsData=function(t){var e=!1;return this._elementListeners.has(t)&&(e=!0),!!this._queue.find(function(e){return e.element===t})||e},t}(),kb=function(){function t(t,e,n){this.bodyNode=t,this.driver=e,this._normalizer=n,this.players=[],this.newHostElements=new Map,this.playersByElement=new Map,this.playersByQueriedElement=new Map,this.statesByElement=new Map,this.disabledNodes=new Set,this.totalAnimations=0,this.totalQueuedPlayers=0,this._namespaceLookup={},this._namespaceList=[],this._flushFns=[],this._whenQuietFns=[],this.namespacesByHostElement=new Map,this.collectedEnterElements=[],this.collectedLeaveElements=[],this.onRemovalComplete=function(t,e){}}return t.prototype._onRemovalComplete=function(t,e){this.onRemovalComplete(t,e)},Object.defineProperty(t.prototype,"queuedPlayers",{get:function(){var t=[];return this._namespaceList.forEach(function(e){e.players.forEach(function(e){e.queued&&t.push(e)})}),t},enumerable:!0,configurable:!0}),t.prototype.createNamespace=function(t,e){var n=new Sb(t,e,this);return e.parentNode?this._balanceNamespaceList(n,e):(this.newHostElements.set(e,n),this.collectEnterElement(e)),this._namespaceLookup[t]=n},t.prototype._balanceNamespaceList=function(t,e){var n=this._namespaceList.length-1;if(n>=0){for(var i=!1,r=n;r>=0;r--)if(this.driver.containsElement(this._namespaceList[r].hostElement,e)){this._namespaceList.splice(r+1,0,t),i=!0;break}i||this._namespaceList.splice(0,0,t)}else this._namespaceList.push(t);return this.namespacesByHostElement.set(e,t),t},t.prototype.register=function(t,e){var n=this._namespaceLookup[t];return n||(n=this.createNamespace(t,e)),n},t.prototype.registerTrigger=function(t,e,n){var i=this._namespaceLookup[t];i&&i.register(e,n)&&this.totalAnimations++},t.prototype.destroy=function(t,e){var n=this;if(t){var i=this._fetchNamespace(t);this.afterFlush(function(){n.namespacesByHostElement.delete(i.hostElement),delete n._namespaceLookup[t];var e=n._namespaceList.indexOf(i);e>=0&&n._namespaceList.splice(e,1)}),this.afterFlushAnimationsDone(function(){return i.destroy(e)})}},t.prototype._fetchNamespace=function(t){return this._namespaceLookup[t]},t.prototype.fetchNamespacesByElement=function(t){var e=new Set,n=this.statesByElement.get(t);if(n)for(var i=Object.keys(n),r=0;r<i.length;r++){var o=n[i[r]].namespaceId;if(o){var s=this._fetchNamespace(o);s&&e.add(s)}}return e},t.prototype.trigger=function(t,e,n,i){if(Tb(e)){var r=this._fetchNamespace(t);if(r)return r.trigger(e,n,i),!0}return!1},t.prototype.insertNode=function(t,e,n,i){if(Tb(e)){var r=e[wb];if(r&&r.setForRemoval){r.setForRemoval=!1,r.setForMove=!0;var o=this.collectedLeaveElements.indexOf(e);o>=0&&this.collectedLeaveElements.splice(o,1)}if(t){var s=this._fetchNamespace(t);s&&s.insertNode(e,n)}i&&this.collectEnterElement(e)}},t.prototype.collectEnterElement=function(t){this.collectedEnterElements.push(t)},t.prototype.markElementAsDisabled=function(t,e){e?this.disabledNodes.has(t)||(this.disabledNodes.add(t),Db(t,"ng-animate-disabled")):this.disabledNodes.has(t)&&(this.disabledNodes.delete(t),jb(t,"ng-animate-disabled"))},t.prototype.removeNode=function(t,e,n){if(Tb(e)){var i=t?this._fetchNamespace(t):null;i?i.removeNode(e,n):this.markElementAsRemoved(t,e,!1,n)}else this._onRemovalComplete(e,n)},t.prototype.markElementAsRemoved=function(t,e,n,i){this.collectedLeaveElements.push(e),e[wb]={namespaceId:t,setForRemoval:i,hasAnimation:n,removedBeforeQueried:!1}},t.prototype.listen=function(t,e,n,i,r){return Tb(e)?this._fetchNamespace(t).listen(e,n,i,r):function(){}},t.prototype._buildInstruction=function(t,e,n,i,r){return t.transition.build(this.driver,t.element,t.fromState.value,t.toState.value,n,i,t.fromState.options,t.toState.options,e,r)},t.prototype.destroyInnerAnimations=function(t){var e=this,n=this.driver.query(t,".ng-trigger",!0);n.forEach(function(t){return e.destroyActiveAnimationsForElement(t)}),0!=this.playersByQueriedElement.size&&(n=this.driver.query(t,".ng-animating",!0)).forEach(function(t){return e.finishActiveQueriedAnimationOnElement(t)})},t.prototype.destroyActiveAnimationsForElement=function(t){var e=this.playersByElement.get(t);e&&e.forEach(function(t){t.queued?t.markedForDestroy=!0:t.destroy()})},t.prototype.finishActiveQueriedAnimationOnElement=function(t){var e=this.playersByQueriedElement.get(t);e&&e.forEach(function(t){return t.finish()})},t.prototype.whenRenderingDone=function(){var t=this;return new Promise(function(e){if(t.players.length)return Zv(t.players).onDone(function(){return e()});e()})},t.prototype.processLeaveNode=function(t){var e=this,n=t[wb];if(n&&n.setForRemoval){if(t[wb]=bb,n.namespaceId){this.destroyInnerAnimations(t);var i=this._fetchNamespace(n.namespaceId);i&&i.clearElementCache(t)}this._onRemovalComplete(t,n.setForRemoval)}this.driver.matchesElement(t,".ng-animate-disabled")&&this.markElementAsDisabled(t,!1),this.driver.query(t,".ng-animate-disabled",!0).forEach(function(n){e.markElementAsDisabled(t,!1)})},t.prototype.flush=function(t){var e=this;void 0===t&&(t=-1);var n=[];if(this.newHostElements.size&&(this.newHostElements.forEach(function(t,n){return e._balanceNamespaceList(t,n)}),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(var i=0;i<this.collectedEnterElements.length;i++)Db(this.collectedEnterElements[i],"ng-star-inserted");if(this._namespaceList.length&&(this.totalQueuedPlayers||this.collectedLeaveElements.length)){var r=[];try{n=this._flushAnimations(r,t)}finally{for(i=0;i<r.length;i++)r[i]()}}else for(i=0;i<this.collectedLeaveElements.length;i++)this.processLeaveNode(this.collectedLeaveElements[i]);if(this.totalQueuedPlayers=0,this.collectedEnterElements.length=0,this.collectedLeaveElements.length=0,this._flushFns.forEach(function(t){return t()}),this._flushFns=[],this._whenQuietFns.length){var o=this._whenQuietFns;this._whenQuietFns=[],n.length?Zv(n).onDone(function(){o.forEach(function(t){return t()})}):o.forEach(function(t){return t()})}},t.prototype.reportError=function(t){throw new Error("Unable to process animations due to the following failed trigger transitions\n "+t.join("\n"))},t.prototype._flushAnimations=function(t,e){var n=this,i=new Qy,r=[],s=new Map,a=[],l=new Map,u=new Map,c=new Map,p=new Set;this.disabledNodes.forEach(function(t){p.add(t);for(var e=n.driver.query(t,".ng-animate-queued",!0),i=0;i<e.length;i++)p.add(e[i])});var d=this.bodyNode,f=Array.from(this.statesByElement.keys()),g=Ab(f,this.collectedEnterElements),m=new Map,v=0;g.forEach(function(t,e){var n="ng-enter"+v++;m.set(e,n),t.forEach(function(t){return Db(t,n)})});for(var y=[],b=new Set,_=new Set,w=0;w<this.collectedLeaveElements.length;w++)(L=(N=this.collectedLeaveElements[w])[wb])&&L.setForRemoval&&(y.push(N),b.add(N),L.hasAnimation?this.driver.query(N,".ng-star-inserted",!0).forEach(function(t){return b.add(t)}):_.add(N));var x=new Map,C=Ab(f,Array.from(b));C.forEach(function(t,e){var n="ng-leave"+v++;x.set(e,n),t.forEach(function(t){return Db(t,n)})}),t.push(function(){g.forEach(function(t,e){var n=m.get(e);t.forEach(function(t){return jb(t,n)})}),C.forEach(function(t,e){var n=x.get(e);t.forEach(function(t){return jb(t,n)})}),y.forEach(function(t){n.processLeaveNode(t)})});for(var S=[],k=[],E=this._namespaceList.length-1;E>=0;E--)this._namespaceList[E].drainQueuedTransitions(e).forEach(function(t){var e=t.player,o=t.element;if(S.push(e),n.collectedEnterElements.length){var s=o[wb];if(s&&s.setForMove)return void e.destroy()}var h=!d||!n.driver.containsElement(d,o),p=x.get(o),f=m.get(o),g=n._buildInstruction(t,i,f,p,h);if(g.errors&&g.errors.length)k.push(g);else{if(h)return e.onStart(function(){return Ty(o,g.fromStyles)}),e.onDestroy(function(){return Ey(o,g.toStyles)}),void r.push(e);if(t.isFallbackTransition)return e.onStart(function(){return Ty(o,g.fromStyles)}),e.onDestroy(function(){return Ey(o,g.toStyles)}),void r.push(e);g.timelines.forEach(function(t){return t.stretchStartingKeyframe=!0}),i.append(o,g.timelines),a.push({instruction:g,player:e,element:o}),g.queriedElements.forEach(function(t){return ey(l,t,[]).push(e)}),g.preStyleProps.forEach(function(t,e){var n=Object.keys(t);if(n.length){var i=u.get(e);i||u.set(e,i=new Set),n.forEach(function(t){return i.add(t)})}}),g.postStyleProps.forEach(function(t,e){var n=Object.keys(t),i=c.get(e);i||c.set(e,i=new Set),n.forEach(function(t){return i.add(t)})})}});if(k.length){var T=[];k.forEach(function(t){T.push("@"+t.triggerName+" has failed due to:\n"),t.errors.forEach(function(t){return T.push("- "+t+"\n")})}),S.forEach(function(t){return t.destroy()}),this.reportError(T)}var O=new Map,I=new Map;a.forEach(function(t){var e=t.element;i.has(e)&&(I.set(e,e),n._beforeAnimationBuild(t.player.namespaceId,t.instruction,O))}),r.forEach(function(t){var e=t.element;n._getPreviousPlayers(e,!1,t.namespaceId,t.triggerName,null).forEach(function(t){ey(O,e,[]).push(t),t.destroy()})});var A=y.filter(function(t){return Rb(t,u,c)}),P=new Map;Ib(P,this.driver,_,c,em).forEach(function(t){Rb(t,u,c)&&A.push(t)});var D=new Map;g.forEach(function(t,e){Ib(D,n.driver,new Set(t),u,am)}),A.forEach(function(t){var e=P.get(t),n=D.get(t);P.set(t,o({},e,n))});var j=[],M=[],R={};a.forEach(function(t){var e=t.element,o=t.player,a=t.instruction;if(i.has(e)){if(p.has(e))return o.onDestroy(function(){return Ey(e,a.toStyles)}),o.disabled=!0,o.overrideTotalTime(a.totalTime),void r.push(o);var l=R;if(I.size>1){for(var u=e,c=[];u=u.parentNode;){var h=I.get(u);if(h){l=h;break}c.push(u)}c.forEach(function(t){return I.set(t,l)})}var d=n._buildAnimation(o.namespaceId,a,O,s,D,P);if(o.setRealPlayer(d),l===R)j.push(o);else{var f=n.playersByElement.get(l);f&&f.length&&(o.parentPlayer=Zv(f)),r.push(o)}}else Ty(e,a.fromStyles),o.onDestroy(function(){return Ey(e,a.toStyles)}),M.push(o),p.has(e)&&r.push(o)}),M.forEach(function(t){var e=s.get(t.element);if(e&&e.length){var n=Zv(e);t.setRealPlayer(n)}}),r.forEach(function(t){t.parentPlayer?t.syncPlayerEvents(t.parentPlayer):t.destroy()});for(var F=0;F<y.length;F++){var N,L=(N=y[F])[wb];if(jb(N,"ng-leave"),!L||!L.hasAnimation){var B=[];if(l.size){var V=l.get(N);V&&V.length&&B.push.apply(B,h(V));for(var z=this.driver.query(N,".ng-animating",!0),H=0;H<z.length;H++){var W=l.get(z[H]);W&&W.length&&B.push.apply(B,h(W))}}var U=B.filter(function(t){return!t.destroyed});U.length?Mb(this,N,U):this.processLeaveNode(N)}}return y.length=0,j.forEach(function(t){n.players.push(t),t.onDone(function(){t.destroy();var e=n.players.indexOf(t);n.players.splice(e,1)}),t.play()}),j},t.prototype.elementContainsData=function(t,e){var n=!1,i=e[wb];return i&&i.setForRemoval&&(n=!0),this.playersByElement.has(e)&&(n=!0),this.playersByQueriedElement.has(e)&&(n=!0),this.statesByElement.has(e)&&(n=!0),this._fetchNamespace(t).elementContainsData(e)||n},t.prototype.afterFlush=function(t){this._flushFns.push(t)},t.prototype.afterFlushAnimationsDone=function(t){this._whenQuietFns.push(t)},t.prototype._getPreviousPlayers=function(t,e,n,i,r){var o=[];if(e){var s=this.playersByQueriedElement.get(t);s&&(o=s)}else{var a=this.playersByElement.get(t);if(a){var l=!r||"void"==r;a.forEach(function(t){t.queued||(l||t.triggerName==i)&&o.push(t)})}}return(n||i)&&(o=o.filter(function(t){return!(n&&n!=t.namespaceId||i&&i!=t.triggerName)})),o},t.prototype._beforeAnimationBuild=function(t,e,n){var i,r,o=e.element,s=e.isRemovalTransition?void 0:t,a=e.isRemovalTransition?void 0:e.triggerName,l=function(t){var i=t.element,r=i!==o,l=ey(n,i,[]);c._getPreviousPlayers(i,r,s,a,e.toState).forEach(function(t){var e=t.getRealPlayer();e.beforeDestroy&&e.beforeDestroy(),t.destroy(),l.push(t)})},c=this;try{for(var h=u(e.timelines),p=h.next();!p.done;p=h.next())l(p.value)}catch(t){i={error:t}}finally{try{p&&!p.done&&(r=h.return)&&r.call(h)}finally{if(i)throw i.error}}Ty(o,e.fromStyles)},t.prototype._buildAnimation=function(t,e,n,i,r,o){var s=this,a=e.triggerName,l=e.element,u=[],c=new Set,h=new Set,p=e.timelines.map(function(e){var p=e.element;c.add(p);var d=p[wb];if(d&&d.removedBeforeQueried)return new om(e.duration,e.delay);var f,g,m=p!==l,v=(f=(n.get(p)||yb).map(function(t){return t.getRealPlayer()}),g=[],function t(e,n){for(var i=0;i<e.length;i++){var r=e[i];r instanceof sm?t(r.players,n):n.push(r)}}(f,g),g).filter(function(t){return!!t.element&&t.element===p}),y=r.get(p),b=o.get(p),_=Qv(0,s._normalizer,0,e.keyframes,y,b),w=s._buildPlayer(e,_,v);if(e.subTimeline&&i&&h.add(p),m){var x=new Eb(t,a,p);x.setRealPlayer(w),u.push(x)}return w});u.forEach(function(t){ey(s.playersByQueriedElement,t.element,[]).push(t),t.onDone(function(){return function(t,e,n){var i;if(t instanceof Map){if(i=t.get(e)){if(i.length){var r=i.indexOf(n);i.splice(r,1)}0==i.length&&t.delete(e)}}else(i=t[e])&&(i.length&&(r=i.indexOf(n),i.splice(r,1)),0==i.length&&delete t[e]);return i}(s.playersByQueriedElement,t.element,t)})}),c.forEach(function(t){return Db(t,"ng-animating")});var d=Zv(p);return d.onDestroy(function(){c.forEach(function(t){return jb(t,"ng-animating")}),Ey(l,e.toStyles)}),h.forEach(function(t){ey(i,t,[]).push(d)}),d},t.prototype._buildPlayer=function(t,e,n){return e.length>0?this.driver.animate(t.element,e,t.duration,t.delay,t.easing,n):new om(t.duration,t.delay)},t}(),Eb=function(){function t(t,e,n){this.namespaceId=t,this.triggerName=e,this.element=n,this._player=new om,this._containsRealPlayer=!1,this._queuedCallbacks={},this.destroyed=!1,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}return t.prototype.setRealPlayer=function(t){var e=this;this._containsRealPlayer||(this._player=t,Object.keys(this._queuedCallbacks).forEach(function(n){e._queuedCallbacks[n].forEach(function(e){return Jv(t,n,void 0,e)})}),this._queuedCallbacks={},this._containsRealPlayer=!0,this.overrideTotalTime(t.totalTime),this.queued=!1)},t.prototype.getRealPlayer=function(){return this._player},t.prototype.overrideTotalTime=function(t){this.totalTime=t},t.prototype.syncPlayerEvents=function(t){var e=this,n=this._player;n.triggerCallback&&t.onStart(function(){return n.triggerCallback("start")}),t.onDone(function(){return e.finish()}),t.onDestroy(function(){return e.destroy()})},t.prototype._queueEvent=function(t,e){ey(this._queuedCallbacks,t,[]).push(e)},t.prototype.onDone=function(t){this.queued&&this._queueEvent("done",t),this._player.onDone(t)},t.prototype.onStart=function(t){this.queued&&this._queueEvent("start",t),this._player.onStart(t)},t.prototype.onDestroy=function(t){this.queued&&this._queueEvent("destroy",t),this._player.onDestroy(t)},t.prototype.init=function(){this._player.init()},t.prototype.hasStarted=function(){return!this.queued&&this._player.hasStarted()},t.prototype.play=function(){!this.queued&&this._player.play()},t.prototype.pause=function(){!this.queued&&this._player.pause()},t.prototype.restart=function(){!this.queued&&this._player.restart()},t.prototype.finish=function(){this._player.finish()},t.prototype.destroy=function(){this.destroyed=!0,this._player.destroy()},t.prototype.reset=function(){!this.queued&&this._player.reset()},t.prototype.setPosition=function(t){this.queued||this._player.setPosition(t)},t.prototype.getPosition=function(){return this.queued?0:this._player.getPosition()},t.prototype.triggerCallback=function(t){var e=this._player;e.triggerCallback&&e.triggerCallback(t)},t}();function Tb(t){return t&&1===t.nodeType}function Ob(t,e){var n=t.style.display;return t.style.display=null!=e?e:"none",n}function Ib(t,e,n,i,r){var o=[];n.forEach(function(t){return o.push(Ob(t))});var s=[];i.forEach(function(n,i){var o={};n.forEach(function(t){var n=o[t]=e.computeStyle(i,t,r);n&&0!=n.length||(i[wb]=_b,s.push(i))}),t.set(i,o)});var a=0;return n.forEach(function(t){return Ob(t,o[a++])}),s}function Ab(t,e){var n=new Map;if(t.forEach(function(t){return n.set(t,[])}),0==e.length)return n;var i=new Set(e),r=new Map;return e.forEach(function(t){var e=function t(e){if(!e)return 1;var o=r.get(e);if(o)return o;var s=e.parentNode;return o=n.has(s)?s:i.has(s)?1:t(s),r.set(e,o),o}(t);1!==e&&n.get(e).push(t)}),n}var Pb="$$classes";function Db(t,e){if(t.classList)t.classList.add(e);else{var n=t[Pb];n||(n=t[Pb]={}),n[e]=!0}}function jb(t,e){if(t.classList)t.classList.remove(e);else{var n=t[Pb];n&&delete n[e]}}function Mb(t,e,n){Zv(n).onDone(function(){return t.processLeaveNode(e)})}function Rb(t,e,n){var i=n.get(t);if(!i)return!1;var r=e.get(t);return r?i.forEach(function(t){return r.add(t)}):e.set(t,i),n.delete(t),!0}var Fb=function(){function t(t,e,n){var i=this;this.bodyNode=t,this._driver=e,this._triggerCache={},this.onRemovalComplete=function(t,e){},this._transitionEngine=new kb(t,e,n),this._timelineEngine=new vb(t,e,n),this._transitionEngine.onRemovalComplete=function(t,e){return i.onRemovalComplete(t,e)}}return t.prototype.registerTrigger=function(t,e,n,i,r){var o=t+"-"+i,s=this._triggerCache[o];if(!s){var a=[],l=Uy(this._driver,r,a);if(a.length)throw new Error('The animation trigger "'+i+'" has failed to build due to the following errors:\n - '+a.join("\n - "));s=function(t,e){return new fb(t,e)}(i,l),this._triggerCache[o]=s}this._transitionEngine.registerTrigger(e,i,s)},t.prototype.register=function(t,e){this._transitionEngine.register(t,e)},t.prototype.destroy=function(t,e){this._transitionEngine.destroy(t,e)},t.prototype.onInsert=function(t,e,n,i){this._transitionEngine.insertNode(t,e,n,i)},t.prototype.onRemove=function(t,e,n){this._transitionEngine.removeNode(t,e,n)},t.prototype.disableAnimations=function(t,e){this._transitionEngine.markElementAsDisabled(t,e)},t.prototype.process=function(t,e,n,i){if("@"==n.charAt(0)){var r=c(ny(n),2);this._timelineEngine.command(r[0],e,r[1],i)}else this._transitionEngine.trigger(t,e,n,i)},t.prototype.listen=function(t,e,n,i,r){if("@"==n.charAt(0)){var o=c(ny(n),2);return this._timelineEngine.listen(o[0],e,o[1],r)}return this._transitionEngine.listen(t,e,n,i,r)},t.prototype.flush=function(t){void 0===t&&(t=-1),this._transitionEngine.flush(t)},Object.defineProperty(t.prototype,"players",{get:function(){return this._transitionEngine.players.concat(this._timelineEngine.players)},enumerable:!0,configurable:!0}),t.prototype.whenRenderingDone=function(){return this._transitionEngine.whenRenderingDone()},t}(),Nb="animation",Lb="animationend",Bb=function(){function t(t,e,n,i,r,o,s){var a=this;this._element=t,this._name=e,this._duration=n,this._delay=i,this._easing=r,this._fillMode=o,this._onDoneFn=s,this._finished=!1,this._destroyed=!1,this._startTime=0,this._position=0,this._eventFn=function(t){return a._handleCallback(t)}}return t.prototype.apply=function(){var t,e,n;e=this._duration+"ms "+this._easing+" "+this._delay+"ms 1 normal "+this._fillMode+" "+this._name,(n=Xb(t=this._element,"").trim()).length&&(function(t,e){for(var n=0;n<t.length;n++)","===t.charAt(n)&&0}(n),e=n+", "+e),Ub(t,"",e),Wb(this._element,this._eventFn,!1),this._startTime=Date.now()},t.prototype.pause=function(){Vb(this._element,this._name,"paused")},t.prototype.resume=function(){Vb(this._element,this._name,"running")},t.prototype.setPosition=function(t){var e=zb(this._element,this._name);this._position=t*this._duration,Ub(this._element,"Delay","-"+this._position+"ms",e)},t.prototype.getPosition=function(){return this._position},t.prototype._handleCallback=function(t){var e=t._ngTestManualTimestamp||Date.now(),n=1e3*parseFloat(t.elapsedTime.toFixed(3));t.animationName==this._name&&Math.max(e-this._startTime,0)>=this._delay&&n>=this._duration&&this.finish()},t.prototype.finish=function(){this._finished||(this._finished=!0,this._onDoneFn(),Wb(this._element,this._eventFn,!0))},t.prototype.destroy=function(){var t,e,n,i;this._destroyed||(this._destroyed=!0,this.finish(),e=this._name,(i=Hb(n=Xb(t=this._element,"").split(","),e))>=0&&(n.splice(i,1),Ub(t,"",n.join(","))))},t}();function Vb(t,e,n){Ub(t,"PlayState",n,zb(t,e))}function zb(t,e){var n=Xb(t,"");return n.indexOf(",")>0?Hb(n.split(","),e):Hb([n],e)}function Hb(t,e){for(var n=0;n<t.length;n++)if(t[n].indexOf(e)>=0)return n;return-1}function Wb(t,e,n){n?t.removeEventListener(Lb,e):t.addEventListener(Lb,e)}function Ub(t,e,n,i){var r=Nb+e;if(null!=i){var o=t.style[r];if(o.length){var s=o.split(",");s[i]=n,n=s.join(",")}}t.style[r]=n}function Xb(t,e){return t.style[Nb+e]}var Yb="linear",qb=function(){function t(t,e,n,i,r,o,s){this.element=t,this.keyframes=e,this.animationName=n,this._duration=i,this._delay=r,this._finalStyles=s,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._started=!1,this.currentSnapshot={},this._state=0,this.easing=o||Yb,this.totalTime=i+r,this._buildStyler()}return t.prototype.onStart=function(t){this._onStartFns.push(t)},t.prototype.onDone=function(t){this._onDoneFns.push(t)},t.prototype.onDestroy=function(t){this._onDestroyFns.push(t)},t.prototype.destroy=function(){this.init(),this._state>=4||(this._state=4,this._styler.destroy(),this._flushStartFns(),this._flushDoneFns(),this._onDestroyFns.forEach(function(t){return t()}),this._onDestroyFns=[])},t.prototype._flushDoneFns=function(){this._onDoneFns.forEach(function(t){return t()}),this._onDoneFns=[]},t.prototype._flushStartFns=function(){this._onStartFns.forEach(function(t){return t()}),this._onStartFns=[]},t.prototype.finish=function(){this.init(),this._state>=3||(this._state=3,this._styler.finish(),this._flushStartFns(),this._flushDoneFns())},t.prototype.setPosition=function(t){this._styler.setPosition(t)},t.prototype.getPosition=function(){return this._styler.getPosition()},t.prototype.hasStarted=function(){return this._state>=2},t.prototype.init=function(){this._state>=1||(this._state=1,this._styler.apply(),this._delay&&this._styler.pause())},t.prototype.play=function(){this.init(),this.hasStarted()||(this._flushStartFns(),this._state=2),this._styler.resume()},t.prototype.pause=function(){this.init(),this._styler.pause()},t.prototype.restart=function(){this.reset(),this.play()},t.prototype.reset=function(){this._styler.destroy(),this._buildStyler(),this._styler.apply()},t.prototype._buildStyler=function(){var t=this;this._styler=new Bb(this.element,this.animationName,this._duration,this._delay,this.easing,"forwards",function(){return t.finish()})},t.prototype.triggerCallback=function(t){var e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(function(t){return t()}),e.length=0},t.prototype.beforeDestroy=function(){var t=this;this.init();var e={};if(this.hasStarted()){var n=this._state>=3;Object.keys(this._finalStyles).forEach(function(i){"offset"!=i&&(e[i]=n?t._finalStyles[i]:Ly(t.element,i))})}this.currentSnapshot=e},t}(),Gb=function(t){function e(e,n){var i=t.call(this)||this;return i.element=e,i._startingStyles={},i.__initialized=!1,i._styles=gy(n),i}return r(e,t),e.prototype.init=function(){var e=this;!this.__initialized&&this._startingStyles&&(this.__initialized=!0,Object.keys(this._styles).forEach(function(t){e._startingStyles[t]=e.element.style[t]}),t.prototype.init.call(this))},e.prototype.play=function(){var e=this;this._startingStyles&&(this.init(),Object.keys(this._styles).forEach(function(t){return e.element.style.setProperty(t,e._styles[t])}),t.prototype.play.call(this))},e.prototype.destroy=function(){var e=this;this._startingStyles&&(Object.keys(this._startingStyles).forEach(function(t){var n=e._startingStyles[t];n?e.element.style.setProperty(t,n):e.element.style.removeProperty(t)}),this._startingStyles=null,t.prototype.destroy.call(this))},e}(om),Kb=function(){function t(){this._count=0,this._head=document.querySelector("head"),this._warningIssued=!1}return t.prototype.validateStyleProperty=function(t){return hy(t)},t.prototype.matchesElement=function(t,e){return py(t,e)},t.prototype.containsElement=function(t,e){return dy(t,e)},t.prototype.query=function(t,e,n){return fy(t,e,n)},t.prototype.computeStyle=function(t,e,n){return window.getComputedStyle(t)[e]},t.prototype.buildKeyframeElement=function(t,e,n){var i="@keyframes "+e+" {\n",r="";(n=n.map(function(t){return gy(t)})).forEach(function(t){r=" ";var e=parseFloat(t.offset);i+=""+r+100*e+"% {\n",r+=" ",Object.keys(t).forEach(function(e){var n=t[e];switch(e){case"offset":return;case"easing":return void(n&&(i+=r+"animation-timing-function: "+n+";\n"));default:return void(i+=""+r+e+": "+n+";\n")}}),i+=r+"}\n"}),i+="}\n";var o=document.createElement("style");return o.innerHTML=i,o},t.prototype.animate=function(t,e,n,i,r,o,s){void 0===o&&(o=[]),s&&this._notifyFaultyScrubber();var a=o.filter(function(t){return t instanceof qb}),l={};Ry(n,i)&&a.forEach(function(t){var e=t.currentSnapshot;Object.keys(e).forEach(function(t){return l[t]=e[t]})});var u=function(t){var e={};return t&&(Array.isArray(t)?t:[t]).forEach(function(t){Object.keys(t).forEach(function(n){"offset"!=n&&"easing"!=n&&(e[n]=t[n])})}),e}(e=Fy(t,e,l));if(0==n)return new Gb(t,u);var c="gen_css_kf_"+this._count++,h=this.buildKeyframeElement(t,c,e);document.querySelector("head").appendChild(h);var p=new qb(t,e,c,n,i,r,u);return p.onDestroy(function(){var t;(t=h).parentNode.removeChild(t)}),p},t.prototype._notifyFaultyScrubber=function(){this._warningIssued||(console.warn("@angular/animations: please load the web-animations.js polyfill to allow programmatic access...\n"," visit http://bit.ly/IWukam to learn more about using the web-animation-js polyfill."),this._warningIssued=!0)},t}(),Zb=function(){function t(t,e,n){this.element=t,this.keyframes=e,this.options=n,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._initialized=!1,this._finished=!1,this._started=!1,this._destroyed=!1,this.time=0,this.parentPlayer=null,this.currentSnapshot={},this._duration=n.duration,this._delay=n.delay||0,this.time=this._duration+this._delay}return t.prototype._onFinish=function(){this._finished||(this._finished=!0,this._onDoneFns.forEach(function(t){return t()}),this._onDoneFns=[])},t.prototype.init=function(){this._buildPlayer(),this._preparePlayerBeforeStart()},t.prototype._buildPlayer=function(){var t=this;if(!this._initialized){this._initialized=!0;var e=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,e,this.options),this._finalKeyframe=e.length?e[e.length-1]:{},this.domPlayer.addEventListener("finish",function(){return t._onFinish()})}},t.prototype._preparePlayerBeforeStart=function(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()},t.prototype._triggerWebAnimation=function(t,e,n){return t.animate(e,n)},t.prototype.onStart=function(t){this._onStartFns.push(t)},t.prototype.onDone=function(t){this._onDoneFns.push(t)},t.prototype.onDestroy=function(t){this._onDestroyFns.push(t)},t.prototype.play=function(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(function(t){return t()}),this._onStartFns=[],this._started=!0),this.domPlayer.play()},t.prototype.pause=function(){this.init(),this.domPlayer.pause()},t.prototype.finish=function(){this.init(),this._onFinish(),this.domPlayer.finish()},t.prototype.reset=function(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1},t.prototype._resetDomPlayerState=function(){this.domPlayer&&this.domPlayer.cancel()},t.prototype.restart=function(){this.reset(),this.play()},t.prototype.hasStarted=function(){return this._started},t.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._onDestroyFns.forEach(function(t){return t()}),this._onDestroyFns=[])},t.prototype.setPosition=function(t){this.domPlayer.currentTime=t*this.time},t.prototype.getPosition=function(){return this.domPlayer.currentTime/this.time},Object.defineProperty(t.prototype,"totalTime",{get:function(){return this._delay+this._duration},enumerable:!0,configurable:!0}),t.prototype.beforeDestroy=function(){var t=this,e={};this.hasStarted()&&Object.keys(this._finalKeyframe).forEach(function(n){"offset"!=n&&(e[n]=t._finished?t._finalKeyframe[n]:Ly(t.element,n))}),this.currentSnapshot=e},t.prototype.triggerCallback=function(t){var e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(function(t){return t()}),e.length=0},t}(),Qb=function(){function t(){this._isNativeImpl=/\{\s*\[native\s+code\]\s*\}/.test(Jb().toString()),this._cssKeyframesDriver=new Kb}return t.prototype.validateStyleProperty=function(t){return hy(t)},t.prototype.matchesElement=function(t,e){return py(t,e)},t.prototype.containsElement=function(t,e){return dy(t,e)},t.prototype.query=function(t,e,n){return fy(t,e,n)},t.prototype.computeStyle=function(t,e,n){return window.getComputedStyle(t)[e]},t.prototype.overrideWebAnimationsSupport=function(t){this._isNativeImpl=t},t.prototype.animate=function(t,e,n,i,r,o,s){if(void 0===o&&(o=[]),!s&&!this._isNativeImpl)return this._cssKeyframesDriver.animate(t,e,n,i,r,o);var a={duration:n,delay:i,fill:0==i?"both":"forwards"};r&&(a.easing=r);var l={},u=o.filter(function(t){return t instanceof Zb});return Ry(n,i)&&u.forEach(function(t){var e=t.currentSnapshot;Object.keys(e).forEach(function(t){return l[t]=e[t]})}),e=Fy(t,e=e.map(function(t){return Cy(t,!1)}),l),new Zb(t,e,a)},t}();function Jb(){return"undefined"!=typeof window&&void 0!==window.document&&Element.prototype.animate||{}}var $b=function(t){function e(e,n){var i=t.call(this)||this;return i._nextAnimationId=0,i._renderer=e.createRenderer(n.body,{id:"0",encapsulation:fe.None,styles:[],data:{animation:[]}}),i}return r(e,t),e.prototype.build=function(t){var e=this._nextAnimationId.toString();this._nextAnimationId++;var n=Array.isArray(t)?nm(t):t;return n_(this._renderer,null,e,"register",[n]),new t_(e,this._renderer)},s([a(1,Vt(Gc))],e)}(tm),t_=function(t){function e(e,n){var i=t.call(this)||this;return i._id=e,i._renderer=n,i}return r(e,t),e.prototype.create=function(t,e){return new e_(this._id,t,e||{},this._renderer)},e}(function(){}),e_=function(){function t(t,e,n,i){this.id=t,this.element=e,this._renderer=i,this.parentPlayer=null,this._started=!1,this.totalTime=0,this._command("create",n)}return t.prototype._listen=function(t,e){return this._renderer.listen(this.element,"@@"+this.id+":"+t,e)},t.prototype._command=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return n_(this._renderer,this.element,this.id,t,e)},t.prototype.onDone=function(t){this._listen("done",t)},t.prototype.onStart=function(t){this._listen("start",t)},t.prototype.onDestroy=function(t){this._listen("destroy",t)},t.prototype.init=function(){this._command("init")},t.prototype.hasStarted=function(){return this._started},t.prototype.play=function(){this._command("play"),this._started=!0},t.prototype.pause=function(){this._command("pause")},t.prototype.restart=function(){this._command("restart")},t.prototype.finish=function(){this._command("finish")},t.prototype.destroy=function(){this._command("destroy")},t.prototype.reset=function(){this._command("reset")},t.prototype.setPosition=function(t){this._command("setPosition",t)},t.prototype.getPosition=function(){return 0},t}();function n_(t,e,n,i,r){return t.setProperty(e,"@@"+n+":"+i,r)}var i_=function(){function t(t,e,n){this.delegate=t,this.engine=e,this._zone=n,this._currentId=0,this._microtaskId=1,this._animationCallbacksBuffer=[],this._rendererCache=new Map,this._cdRecurDepth=0,this.promise=Promise.resolve(0),e.onRemovalComplete=function(t,e){e&&e.parentNode(t)&&e.removeChild(t.parentNode,t)}}return t.prototype.createRenderer=function(t,e){var n=this,i=this.delegate.createRenderer(t,e);if(!(t&&e&&e.data&&e.data.animation)){var r=this._rendererCache.get(i);return r||(r=new r_("",i,this.engine),this._rendererCache.set(i,r)),r}var o=e.id,s=e.id+"-"+this._currentId;return this._currentId++,this.engine.register(s,t),e.data.animation.forEach(function(e){return n.engine.registerTrigger(o,s,t,e.name,e)}),new o_(this,s,i,this.engine)},t.prototype.begin=function(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()},t.prototype._scheduleCountTask=function(){var t=this;this.promise.then(function(){t._microtaskId++})},t.prototype.scheduleListenerCallback=function(t,e,n){var i=this;t>=0&&t<this._microtaskId?this._zone.run(function(){return e(n)}):(0==this._animationCallbacksBuffer.length&&Promise.resolve(null).then(function(){i._zone.run(function(){i._animationCallbacksBuffer.forEach(function(t){var e=c(t,2);(0,e[0])(e[1])}),i._animationCallbacksBuffer=[]})}),this._animationCallbacksBuffer.push([e,n]))},t.prototype.end=function(){var t=this;this._cdRecurDepth--,0==this._cdRecurDepth&&this._zone.runOutsideAngular(function(){t._scheduleCountTask(),t.engine.flush(t._microtaskId)}),this.delegate.end&&this.delegate.end()},t.prototype.whenRenderingDone=function(){return this.engine.whenRenderingDone()},t}(),r_=function(){function t(t,e,n){this.namespaceId=t,this.delegate=e,this.engine=n,this.destroyNode=this.delegate.destroyNode?function(t){return e.destroyNode(t)}:null}return Object.defineProperty(t.prototype,"data",{get:function(){return this.delegate.data},enumerable:!0,configurable:!0}),t.prototype.destroy=function(){this.engine.destroy(this.namespaceId,this.delegate),this.delegate.destroy()},t.prototype.createElement=function(t,e){return this.delegate.createElement(t,e)},t.prototype.createComment=function(t){return this.delegate.createComment(t)},t.prototype.createText=function(t){return this.delegate.createText(t)},t.prototype.appendChild=function(t,e){this.delegate.appendChild(t,e),this.engine.onInsert(this.namespaceId,e,t,!1)},t.prototype.insertBefore=function(t,e,n){this.delegate.insertBefore(t,e,n),this.engine.onInsert(this.namespaceId,e,t,!0)},t.prototype.removeChild=function(t,e){this.engine.onRemove(this.namespaceId,e,this.delegate)},t.prototype.selectRootElement=function(t){return this.delegate.selectRootElement(t)},t.prototype.parentNode=function(t){return this.delegate.parentNode(t)},t.prototype.nextSibling=function(t){return this.delegate.nextSibling(t)},t.prototype.setAttribute=function(t,e,n,i){this.delegate.setAttribute(t,e,n,i)},t.prototype.removeAttribute=function(t,e,n){this.delegate.removeAttribute(t,e,n)},t.prototype.addClass=function(t,e){this.delegate.addClass(t,e)},t.prototype.removeClass=function(t,e){this.delegate.removeClass(t,e)},t.prototype.setStyle=function(t,e,n,i){this.delegate.setStyle(t,e,n,i)},t.prototype.removeStyle=function(t,e,n){this.delegate.removeStyle(t,e,n)},t.prototype.setProperty=function(t,e,n){"@"==e.charAt(0)&&"@.disabled"==e?this.disableAnimations(t,!!n):this.delegate.setProperty(t,e,n)},t.prototype.setValue=function(t,e){this.delegate.setValue(t,e)},t.prototype.listen=function(t,e,n){return this.delegate.listen(t,e,n)},t.prototype.disableAnimations=function(t,e){this.engine.disableAnimations(t,e)},t}(),o_=function(t){function e(e,n,i,r){var o=t.call(this,n,i,r)||this;return o.factory=e,o.namespaceId=n,o}return r(e,t),e.prototype.setProperty=function(t,e,n){"@"==e.charAt(0)?"."==e.charAt(1)&&"@.disabled"==e?this.disableAnimations(t,n=void 0===n||!!n):this.engine.process(this.namespaceId,t,e.substr(1),n):this.delegate.setProperty(t,e,n)},e.prototype.listen=function(t,e,n){var i,r,o,s=this;if("@"==e.charAt(0)){var a=function(t){switch(t){case"body":return document.body;case"document":return document;case"window":return window;default:return t}}(t),l=e.substr(1),u="";return"@"!=l.charAt(0)&&(l=(i=c((r=l,o=r.indexOf("."),[r.substring(0,o),r.substr(o+1)]),2))[0],u=i[1]),this.engine.listen(this.namespaceId,a,l,u,function(t){s.factory.scheduleListenerCallback(t._data||-1,n,t)})}return this.delegate.listen(t,e,n)},e}(r_),s_=function(t){function e(e,n,i){return t.call(this,e.body,n,i)||this}return r(e,t),s([a(0,Vt(tc))],e)}(Fb);function a_(){return"function"==typeof Jb()?new Qb:new Kb}function l_(){return new lb}function u_(t,e,n){return new i_(t,e,n)}var c_=new yt("AnimationModuleType"),h_=function(){},p_=Sr({encapsulation:2,styles:[".mat-button,.mat-flat-button,.mat-icon-button,.mat-stroked-button{box-sizing:border-box;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:0;border:none;-webkit-tap-highlight-color:transparent;display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:88px;line-height:36px;padding:0 16px;border-radius:2px;overflow:visible}.mat-button::-moz-focus-inner,.mat-flat-button::-moz-focus-inner,.mat-icon-button::-moz-focus-inner,.mat-stroked-button::-moz-focus-inner{border:0}.mat-button[disabled],.mat-flat-button[disabled],.mat-icon-button[disabled],.mat-stroked-button[disabled]{cursor:default}.mat-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-button.cdk-program-focused .mat-button-focus-overlay,.mat-flat-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-flat-button.cdk-program-focused .mat-button-focus-overlay,.mat-icon-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-icon-button.cdk-program-focused .mat-button-focus-overlay,.mat-stroked-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-stroked-button.cdk-program-focused .mat-button-focus-overlay{opacity:1}.mat-button::-moz-focus-inner,.mat-flat-button::-moz-focus-inner,.mat-icon-button::-moz-focus-inner,.mat-stroked-button::-moz-focus-inner{border:0}.mat-button .mat-button-focus-overlay,.mat-icon-button .mat-button-focus-overlay{opacity:0}.mat-button:hover .mat-button-focus-overlay,.mat-stroked-button:hover .mat-button-focus-overlay{opacity:1}@media (hover:none){.mat-button:hover .mat-button-focus-overlay,.mat-stroked-button:hover .mat-button-focus-overlay{opacity:0}}.mat-raised-button{box-sizing:border-box;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:0;border:none;-webkit-tap-highlight-color:transparent;display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:88px;line-height:36px;padding:0 16px;border-radius:2px;overflow:visible;transform:translate3d(0,0,0);transition:background .4s cubic-bezier(.25,.8,.25,1),box-shadow 280ms cubic-bezier(.4,0,.2,1)}.mat-raised-button::-moz-focus-inner{border:0}.mat-raised-button[disabled]{cursor:default}.mat-raised-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-raised-button.cdk-program-focused .mat-button-focus-overlay{opacity:1}.mat-raised-button::-moz-focus-inner{border:0}.mat-raised-button:not([class*=mat-elevation-z]){box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12)}._mat-animation-noopable.mat-raised-button{transition:none;animation:none}.mat-raised-button:not([disabled]):active:not([class*=mat-elevation-z]){box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.mat-raised-button[disabled]{box-shadow:none}.mat-stroked-button{border:1px solid currentColor;padding:0 15px;line-height:34px}.mat-stroked-button:not([class*=mat-elevation-z]){box-shadow:0 0 0 0 rgba(0,0,0,.2),0 0 0 0 rgba(0,0,0,.14),0 0 0 0 rgba(0,0,0,.12)}.mat-flat-button:not([class*=mat-elevation-z]){box-shadow:0 0 0 0 rgba(0,0,0,.2),0 0 0 0 rgba(0,0,0,.14),0 0 0 0 rgba(0,0,0,.12)}.mat-fab{box-sizing:border-box;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:0;border:none;-webkit-tap-highlight-color:transparent;display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:88px;line-height:36px;padding:0 16px;border-radius:2px;overflow:visible;transform:translate3d(0,0,0);transition:background .4s cubic-bezier(.25,.8,.25,1),box-shadow 280ms cubic-bezier(.4,0,.2,1);min-width:0;border-radius:50%;width:56px;height:56px;padding:0;flex-shrink:0}.mat-fab::-moz-focus-inner{border:0}.mat-fab[disabled]{cursor:default}.mat-fab.cdk-keyboard-focused .mat-button-focus-overlay,.mat-fab.cdk-program-focused .mat-button-focus-overlay{opacity:1}.mat-fab::-moz-focus-inner{border:0}.mat-fab:not([class*=mat-elevation-z]){box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12)}._mat-animation-noopable.mat-fab{transition:none;animation:none}.mat-fab:not([disabled]):active:not([class*=mat-elevation-z]){box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.mat-fab[disabled]{box-shadow:none}.mat-fab:not([class*=mat-elevation-z]){box-shadow:0 3px 5px -1px rgba(0,0,0,.2),0 6px 10px 0 rgba(0,0,0,.14),0 1px 18px 0 rgba(0,0,0,.12)}.mat-fab:not([disabled]):active:not([class*=mat-elevation-z]){box-shadow:0 7px 8px -4px rgba(0,0,0,.2),0 12px 17px 2px rgba(0,0,0,.14),0 5px 22px 4px rgba(0,0,0,.12)}.mat-fab .mat-button-wrapper{padding:16px 0;display:inline-block;line-height:24px}.mat-mini-fab{box-sizing:border-box;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:0;border:none;-webkit-tap-highlight-color:transparent;display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:88px;line-height:36px;padding:0 16px;border-radius:2px;overflow:visible;transform:translate3d(0,0,0);transition:background .4s cubic-bezier(.25,.8,.25,1),box-shadow 280ms cubic-bezier(.4,0,.2,1);min-width:0;border-radius:50%;width:40px;height:40px;padding:0;flex-shrink:0}.mat-mini-fab::-moz-focus-inner{border:0}.mat-mini-fab[disabled]{cursor:default}.mat-mini-fab.cdk-keyboard-focused .mat-button-focus-overlay,.mat-mini-fab.cdk-program-focused .mat-button-focus-overlay{opacity:1}.mat-mini-fab::-moz-focus-inner{border:0}.mat-mini-fab:not([class*=mat-elevation-z]){box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12)}._mat-animation-noopable.mat-mini-fab{transition:none;animation:none}.mat-mini-fab:not([disabled]):active:not([class*=mat-elevation-z]){box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.mat-mini-fab[disabled]{box-shadow:none}.mat-mini-fab:not([class*=mat-elevation-z]){box-shadow:0 3px 5px -1px rgba(0,0,0,.2),0 6px 10px 0 rgba(0,0,0,.14),0 1px 18px 0 rgba(0,0,0,.12)}.mat-mini-fab:not([disabled]):active:not([class*=mat-elevation-z]){box-shadow:0 7px 8px -4px rgba(0,0,0,.2),0 12px 17px 2px rgba(0,0,0,.14),0 5px 22px 4px rgba(0,0,0,.12)}.mat-mini-fab .mat-button-wrapper{padding:8px 0;display:inline-block;line-height:24px}.mat-icon-button{padding:0;min-width:0;width:40px;height:40px;flex-shrink:0;line-height:40px;border-radius:50%}.mat-icon-button .mat-icon,.mat-icon-button i{line-height:24px}.mat-button-focus-overlay,.mat-button-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-button-focus-overlay{background-color:rgba(0,0,0,.12);border-radius:inherit;opacity:0;transition:opacity .2s cubic-bezier(.35,0,.25,1),background-color .2s cubic-bezier(.35,0,.25,1)}._mat-animation-noopable .mat-button-focus-overlay{transition:none}@media screen and (-ms-high-contrast:active){.mat-button-focus-overlay{background-color:rgba(255,255,255,.5)}}.mat-button-ripple-round{border-radius:50%;z-index:1}.mat-button .mat-button-wrapper>*,.mat-fab .mat-button-wrapper>*,.mat-flat-button .mat-button-wrapper>*,.mat-icon-button .mat-button-wrapper>*,.mat-mini-fab .mat-button-wrapper>*,.mat-raised-button .mat-button-wrapper>*,.mat-stroked-button .mat-button-wrapper>*{vertical-align:middle}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button{display:block;font-size:inherit;width:2.5em;height:2.5em}@media screen and (-ms-high-contrast:active){.mat-button,.mat-fab,.mat-flat-button,.mat-icon-button,.mat-mini-fab,.mat-raised-button{outline:solid 1px}}"],data:{}});function d_(t){return bs(2,[ss(402653184,1,{ripple:0}),(t()(),to(1,0,null,null,1,"span",[["class","mat-button-wrapper"]],null,null,null,null,null)),hs(null,0),(t()(),to(3,0,null,null,1,"div",[["class","mat-button-ripple mat-ripple"],["matRipple",""]],[[2,"mat-button-ripple-round",null],[2,"mat-ripple-unbounded",null]],null,null,null,null)),Wo(4,212992,[[1,4]],0,iv,[ei,An,Yd,[2,nv],[2,c_]],{centered:[0,"centered"],disabled:[1,"disabled"],trigger:[2,"trigger"]},null),(t()(),to(5,0,null,null,0,"div",[["class","mat-button-focus-overlay"]],null,null,null,null,null))],function(t,e){var n=e.component;t(e,4,0,n.isIconButton,n._isRippleDisabled(),n._getHostElement())},function(t,e){var n=e.component;t(e,3,0,n.isRoundButton||n.isIconButton,Ao(e,4).unbounded)})}var f_=Sr({encapsulation:2,styles:[".mat-snack-bar-container{border-radius:2px;box-sizing:border-box;display:block;margin:24px;max-width:568px;min-width:288px;padding:14px 24px;transform:translateY(100%) translateY(24px)}.mat-snack-bar-container.mat-snack-bar-center{margin:0;transform:translateY(100%)}.mat-snack-bar-container.mat-snack-bar-top{transform:translateY(-100%) translateY(-24px)}.mat-snack-bar-container.mat-snack-bar-top.mat-snack-bar-center{transform:translateY(-100%)}@media screen and (-ms-high-contrast:active){.mat-snack-bar-container{border:solid 1px}}.mat-snack-bar-handset{width:100%}.mat-snack-bar-handset .mat-snack-bar-container{margin:0;max-width:inherit;width:100%}"],data:{animation:[{type:7,name:"state",definitions:[{type:0,name:"visible-top, visible-bottom",styles:{type:6,styles:{transform:"translateY(0%)"},offset:null},options:void 0},{type:1,expr:"visible-top => hidden-top, visible-bottom => hidden-bottom",animation:{type:4,styles:null,timings:"195ms cubic-bezier(0.4,0.0,1,1)"},options:null},{type:1,expr:"void => visible-top, void => visible-bottom",animation:{type:4,styles:null,timings:"225ms cubic-bezier(0.0,0.0,0.2,1)"},options:null}],options:{}}]}});function g_(t){return bs(0,[(t()(),$r(0,null,null,0))],null,null)}function m_(t){return bs(2,[ss(402653184,1,{_portalOutlet:0}),(t()(),$r(16777216,null,null,1,null,g_)),Wo(2,212992,[[1,4]],0,Rd,[_n,ri],{portal:[0,"portal"]},null)],function(t,e){t(e,2,0,"")},null)}var v_=bo("snack-bar-container",Vv,function(t){return bs(0,[(t()(),to(0,0,null,null,1,"snack-bar-container",[["class","mat-snack-bar-container"],["role","alert"]],[[40,"@state",0]],[["component","@state.done"]],function(t,e,n){var i=!0;return"component:@state.done"===e&&(i=!1!==Ao(t,1).onAnimationEnd(n)&&i),i},m_,f_)),Wo(1,180224,null,0,Vv,[An,ei,oi,Lv],null,null)],null,function(t,e){t(e,0,0,Ao(e,1)._animationState)})},{},{},[]),y_=Sr({encapsulation:2,styles:[".mat-simple-snackbar{display:flex;justify-content:space-between;line-height:20px;opacity:1}.mat-simple-snackbar-action{display:flex;flex-direction:column;flex-shrink:0;justify-content:space-around;margin:-8px 0 -8px 8px}.mat-simple-snackbar-action button{flex:1;max-height:36px}[dir=rtl] .mat-simple-snackbar-action{margin-left:0;margin-right:8px}"],data:{animation:[{type:7,name:"contentFade",definitions:[{type:1,expr:":enter",animation:[{type:6,styles:{opacity:"0"},offset:null},{type:4,styles:null,timings:"375ms cubic-bezier(0.4,0.0,0.2,1)"}],options:null}],options:{}}]}});function b_(t){return bs(0,[(t()(),to(0,0,null,null,3,"div",[["class","mat-simple-snackbar-action"]],null,null,null,null,null)),(t()(),to(1,0,null,null,2,"button",[["mat-button",""]],[[8,"disabled",0],[2,"_mat-animation-noopable",null]],[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.action()&&i),i},d_,p_)),Wo(2,180224,null,0,qv,[ei,Yd,Lm,[2,c_]],null,null),(t()(),ms(3,0,["",""]))],null,function(t,e){var n=e.component;t(e,1,0,Ao(e,2).disabled||null,"NoopAnimations"===Ao(e,2)._animationMode),t(e,3,0,n.data.action)})}function __(t){return bs(2,[(t()(),to(0,0,null,null,1,"span",[],null,null,null,null,null)),(t()(),ms(1,null,["",""])),(t()(),$r(16777216,null,null,1,null,b_)),Wo(3,16384,null,0,Wu,[ri,ii],{ngIf:[0,"ngIf"]},null)],function(t,e){t(e,3,0,e.component.hasAction)},function(t,e){t(e,1,0,e.component.data.message)})}var w_=bo("simple-snack-bar",Bv,function(t){return bs(0,[(t()(),to(0,0,null,null,1,"simple-snack-bar",[["class","mat-simple-snackbar"]],[[40,"@contentFade",0]],null,null,__,y_)),Wo(1,49152,null,0,Bv,[Fv,Nv],null,null)],null,function(t,e){t(e,0,0,void 0)})},{},{},[]),x_=Sr({encapsulation:2,styles:[["open-sample-image-panel{display:block;padding:15px;border-radius:3px;overflow:hidden;max-width:318px;margin:0 auto}open-sample-image-panel h2{font-size:1.6rem;font-weight:400;margin:10px 0;text-align:center}open-sample-image-panel .separator{position:relative;text-align:center;height:30px;display:flex;justify-content:center;align-items:center;margin-bottom:8px}open-sample-image-panel .separator>hr{position:absolute;left:0;top:13px;width:100%;height:2px;background-color:rgba(0,0,0,.07);margin:0;border:none}open-sample-image-panel .separator>.text{display:block;background-color:#fff;position:relative;z-index:1;padding:0 10px}open-sample-image-panel .buttons{display:flex;justify-content:center;margin:20px 0;text-align:center}open-sample-image-panel .buttons>button{display:block;margin:0 10px}open-sample-image-panel .samples{display:flex;justify-content:center}open-sample-image-panel .samples>img{cursor:pointer;width:80px;height:80px;-o-object-fit:cover;object-fit:cover;transition:box-shadow .3s;margin:0 8px}open-sample-image-panel .samples>img:hover{box-shadow:0 3px 5px -1px rgba(0,0,0,.2),0 5px 8px 0 rgba(0,0,0,.14),0 1px 14px 0 rgba(0,0,0,.12)}open-sample-image-panel .new-canvas-container{margin:20px 0;padding-top:20px;border-top:2px solid rgba(0,0,0,.07)}open-sample-image-panel .new-canvas-container .form-buttons{text-align:right}"]],data:{}});function C_(t){return bs(0,[(t()(),to(0,0,null,null,8,"div",[["class","buttons"]],null,null,null,null,null)),(t()(),to(1,0,null,null,3,"button",[["color","primary"],["mat-flat-button",""],["trans",""]],[[8,"disabled",0],[2,"_mat-animation-noopable",null]],[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.openUploadDialog()&&i),i},d_,p_)),Wo(2,4341760,null,0,lv,[ei,uv,wu],null,null),Wo(3,180224,null,0,qv,[ei,Yd,Lm,[2,c_]],{color:[0,"color"]},null),(t()(),ms(-1,0,["Open Photo"])),(t()(),to(5,0,null,null,3,"button",[["color","primary"],["mat-stroked-button",""],["trans",""]],[[8,"disabled",0],[2,"_mat-animation-noopable",null]],[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=0!=(t.component.newCanvasFormVisible=!0)&&i),i},d_,p_)),Wo(6,4341760,null,0,lv,[ei,uv,wu],null,null),Wo(7,180224,null,0,qv,[ei,Yd,Lm,[2,c_]],{color:[0,"color"]},null),(t()(),ms(-1,0,["Create New"]))],function(t,e){t(e,3,0,"primary"),t(e,7,0,"primary")},function(t,e){t(e,1,0,Ao(e,3).disabled||null,"NoopAnimations"===Ao(e,3)._animationMode),t(e,5,0,Ao(e,7).disabled||null,"NoopAnimations"===Ao(e,7)._animationMode)})}function S_(t){return bs(0,[(t()(),to(0,0,null,null,35,"div",[["class","new-canvas-container"]],null,null,null,null,null)),(t()(),to(1,0,null,null,34,"form",[["class","many-inputs"],["ngNativeValidate",""]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngSubmit"],[null,"submit"],[null,"reset"]],function(t,e,n){var i=!0,r=t.component;return"submit"===e&&(i=!1!==Ao(t,2).onSubmit(n)&&i),"reset"===e&&(i=!1!==Ao(t,2).onReset()&&i),"ngSubmit"===e&&(i=!1!==r.createNewCanvas()&&i),i},null,null)),Wo(2,540672,null,0,rd,[[8,null],[8,null]],{form:[0,"form"]},{ngSubmit:"ngSubmit"}),Xo(2048,null,Gh,null,[rd]),Wo(4,16384,null,0,Hp,[[4,Gh]],null,null),(t()(),to(5,0,null,null,10,"div",[["class","input-container"]],null,null,null,null,null)),(t()(),to(6,0,null,null,2,"label",[["for","width"],["trans",""]],null,null,null,null,null)),Wo(7,4341760,null,0,lv,[ei,uv,wu],null,null),(t()(),ms(-1,null,["Width"])),(t()(),to(9,0,null,null,6,"input",[["formControlName","width"],["id","width"],["min","1"],["type","number"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"],[null,"change"]],function(t,e,n){var i=!0;return"input"===e&&(i=!1!==Ao(t,10)._handleInput(n.target.value)&&i),"blur"===e&&(i=!1!==Ao(t,10).onTouched()&&i),"compositionstart"===e&&(i=!1!==Ao(t,10)._compositionStart()&&i),"compositionend"===e&&(i=!1!==Ao(t,10)._compositionEnd(n.target.value)&&i),"change"===e&&(i=!1!==Ao(t,11).onChange(n.target.value)&&i),"input"===e&&(i=!1!==Ao(t,11).onChange(n.target.value)&&i),"blur"===e&&(i=!1!==Ao(t,11).onTouched()&&i),i},null,null)),Wo(10,16384,null,0,sp,[ti,ei,[2,op]],null,null),Wo(11,16384,null,0,up,[ti,ei],null,null),Xo(1024,null,ip,function(t,e){return[t,e]},[sp,up]),Wo(13,671744,null,0,ld,[[3,Gh],[8,null],[8,null],[6,ip],[2,nd]],{name:[0,"name"]},null),Xo(2048,null,hp,null,[ld]),Wo(15,16384,null,0,zp,[[4,hp]],null,null),(t()(),to(16,0,null,null,10,"div",[["class","input-container"]],null,null,null,null,null)),(t()(),to(17,0,null,null,2,"label",[["for","height"],["trans",""]],null,null,null,null,null)),Wo(18,4341760,null,0,lv,[ei,uv,wu],null,null),(t()(),ms(-1,null,["Height"])),(t()(),to(20,0,null,null,6,"input",[["formControlName","height"],["id","height"],["min","1"],["type","number"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"],[null,"change"]],function(t,e,n){var i=!0;return"input"===e&&(i=!1!==Ao(t,21)._handleInput(n.target.value)&&i),"blur"===e&&(i=!1!==Ao(t,21).onTouched()&&i),"compositionstart"===e&&(i=!1!==Ao(t,21)._compositionStart()&&i),"compositionend"===e&&(i=!1!==Ao(t,21)._compositionEnd(n.target.value)&&i),"change"===e&&(i=!1!==Ao(t,22).onChange(n.target.value)&&i),"input"===e&&(i=!1!==Ao(t,22).onChange(n.target.value)&&i),"blur"===e&&(i=!1!==Ao(t,22).onTouched()&&i),i},null,null)),Wo(21,16384,null,0,sp,[ti,ei,[2,op]],null,null),Wo(22,16384,null,0,up,[ti,ei],null,null),Xo(1024,null,ip,function(t,e){return[t,e]},[sp,up]),Wo(24,671744,null,0,ld,[[3,Gh],[8,null],[8,null],[6,ip],[2,nd]],{name:[0,"name"]},null),Xo(2048,null,hp,null,[ld]),Wo(26,16384,null,0,zp,[[4,hp]],null,null),(t()(),to(27,0,null,null,8,"div",[["class","form-buttons"]],null,null,null,null,null)),(t()(),to(28,0,null,null,3,"button",[["mat-button",""],["trans",""],["type","button"]],[[8,"disabled",0],[2,"_mat-animation-noopable",null]],[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=0!=(t.component.newCanvasFormVisible=!1)&&i),i},d_,p_)),Wo(29,4341760,null,0,lv,[ei,uv,wu],null,null),Wo(30,180224,null,0,qv,[ei,Yd,Lm,[2,c_]],null,null),(t()(),ms(-1,0,["Cancel"])),(t()(),to(32,0,null,null,3,"button",[["color","primary"],["mat-raised-button",""],["trans",""],["type","submit"]],[[8,"disabled",0],[2,"_mat-animation-noopable",null]],null,null,d_,p_)),Wo(33,4341760,null,0,lv,[ei,uv,wu],null,null),Wo(34,180224,null,0,qv,[ei,Yd,Lm,[2,c_]],{color:[0,"color"]},null),(t()(),ms(-1,0,["Create"]))],function(t,e){t(e,2,0,e.component.newCanvasForm),t(e,13,0,"width"),t(e,24,0,"height"),t(e,34,0,"primary")},function(t,e){t(e,1,0,Ao(e,4).ngClassUntouched,Ao(e,4).ngClassTouched,Ao(e,4).ngClassPristine,Ao(e,4).ngClassDirty,Ao(e,4).ngClassValid,Ao(e,4).ngClassInvalid,Ao(e,4).ngClassPending),t(e,9,0,Ao(e,15).ngClassUntouched,Ao(e,15).ngClassTouched,Ao(e,15).ngClassPristine,Ao(e,15).ngClassDirty,Ao(e,15).ngClassValid,Ao(e,15).ngClassInvalid,Ao(e,15).ngClassPending),t(e,20,0,Ao(e,26).ngClassUntouched,Ao(e,26).ngClassTouched,Ao(e,26).ngClassPristine,Ao(e,26).ngClassDirty,Ao(e,26).ngClassValid,Ao(e,26).ngClassInvalid,Ao(e,26).ngClassPending),t(e,28,0,Ao(e,30).disabled||null,"NoopAnimations"===Ao(e,30)._animationMode),t(e,32,0,Ao(e,34).disabled||null,"NoopAnimations"===Ao(e,34)._animationMode)})}function k_(t){return bs(0,[(t()(),to(0,0,null,null,0,"img",[],[[8,"src",4]],[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.openSampleImage(t.context.$implicit.url)&&i),i},null,null))],null,function(t,e){t(e,0,0,e.context.$implicit.thumbnail||e.context.$implicit.url)})}function E_(t){return bs(0,[(t()(),to(0,0,null,null,2,"h2",[["trans",""]],null,null,null,null,null)),Wo(1,4341760,null,0,lv,[ei,uv,wu],null,null),(t()(),ms(-1,null,["Open a photo or design to get started."])),(t()(),$r(16777216,null,null,1,null,C_)),Wo(4,16384,null,0,Wu,[ri,ii],{ngIf:[0,"ngIf"]},null),(t()(),$r(16777216,null,null,1,null,S_)),Wo(6,16384,null,0,Wu,[ri,ii],{ngIf:[0,"ngIf"]},null),(t()(),to(7,0,null,null,4,"div",[["class","separator"]],null,null,null,null,null)),(t()(),to(8,0,null,null,0,"hr",[],null,null,null,null,null)),(t()(),to(9,0,null,null,2,"span",[["class","text"],["trans",""]],null,null,null,null,null)),Wo(10,4341760,null,0,lv,[ei,uv,wu],null,null),(t()(),ms(-1,null,["or use a sample"])),(t()(),to(12,0,null,null,2,"div",[["class","samples"]],null,null,null,null,null)),(t()(),$r(16777216,null,null,1,null,k_)),Wo(14,278528,null,0,zu,[ri,ii,Ei],{ngForOf:[0,"ngForOf"]},null)],function(t,e){var n=e.component;t(e,4,0,!n.newCanvasFormVisible),t(e,6,0,n.newCanvasFormVisible),t(e,14,0,n.sampleImages)},null)}var T_=bo("open-sample-image-panel",gd,function(t){return bs(0,[(t()(),to(0,0,null,null,1,"open-sample-image-panel",[],null,null,null,E_,x_)),Wo(1,49152,null,0,gd,[og,wu,Ld,_u,tg],null,null)],null,null)},{},{},[]);function O_(t){return getComputedStyle(t)}function I_(t,e){for(var n in e){var i=e[n];"number"==typeof i&&(i+="px"),t.style[n]=i}return t}function A_(t){var e=document.createElement("div");return e.className=t,e}var P_="undefined"!=typeof Element&&(Element.prototype.matches||Element.prototype.webkitMatchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector);function D_(t,e){if(!P_)throw new Error("No element matching method supported");return P_.call(t,e)}function j_(t){t.remove?t.remove():t.parentNode&&t.parentNode.removeChild(t)}function M_(t,e){return Array.prototype.filter.call(t.children,function(t){return D_(t,e)})}var R_={main:"ps",element:{thumb:function(t){return"ps__thumb-"+t},rail:function(t){return"ps__rail-"+t},consuming:"ps__child--consume"},state:{focus:"ps--focus",clicking:"ps--clicking",active:function(t){return"ps--active-"+t},scrolling:function(t){return"ps--scrolling-"+t}}},F_={x:null,y:null};function N_(t,e){var n=t.element.classList,i=R_.state.scrolling(e);n.contains(i)?clearTimeout(F_[e]):n.add(i)}function L_(t,e){F_[e]=setTimeout(function(){return t.isAlive&&t.element.classList.remove(R_.state.scrolling(e))},t.settings.scrollingThreshold)}var B_=function(t){this.element=t,this.handlers={}},V_={isEmpty:{configurable:!0}};B_.prototype.bind=function(t,e){void 0===this.handlers[t]&&(this.handlers[t]=[]),this.handlers[t].push(e),this.element.addEventListener(t,e,!1)},B_.prototype.unbind=function(t,e){var n=this;this.handlers[t]=this.handlers[t].filter(function(i){return!(!e||i===e)||(n.element.removeEventListener(t,i,!1),!1)})},B_.prototype.unbindAll=function(){for(var t in this.handlers)this.unbind(t)},V_.isEmpty.get=function(){var t=this;return Object.keys(this.handlers).every(function(e){return 0===t.handlers[e].length})},Object.defineProperties(B_.prototype,V_);var z_=function(){this.eventElements=[]};function H_(t){if("function"==typeof window.CustomEvent)return new CustomEvent(t);var e=document.createEvent("CustomEvent");return e.initCustomEvent(t,!1,!1,void 0),e}z_.prototype.eventElement=function(t){var e=this.eventElements.filter(function(e){return e.element===t})[0];return e||(e=new B_(t),this.eventElements.push(e)),e},z_.prototype.bind=function(t,e,n){this.eventElement(t).bind(e,n)},z_.prototype.unbind=function(t,e,n){var i=this.eventElement(t);i.unbind(e,n),i.isEmpty&&this.eventElements.splice(this.eventElements.indexOf(i),1)},z_.prototype.unbindAll=function(){this.eventElements.forEach(function(t){return t.unbindAll()}),this.eventElements=[]},z_.prototype.once=function(t,e,n){var i=this.eventElement(t),r=function(t){i.unbind(e,r),n(t)};i.bind(e,r)};var W_=function(t,e,n,i,r){var o;if(void 0===i&&(i=!0),void 0===r&&(r=!1),"top"===e)o=["contentHeight","containerHeight","scrollTop","y","up","down"];else{if("left"!==e)throw new Error("A proper axis should be provided");o=["contentWidth","containerWidth","scrollLeft","x","left","right"]}!function(t,e,n,i,r){var s=o[0],a=o[1],l=o[2],u=o[3],c=o[4],h=o[5];void 0===i&&(i=!0),void 0===r&&(r=!1);var p=t.element;t.reach[u]=null,p[l]<1&&(t.reach[u]="start"),p[l]>t[s]-t[a]-1&&(t.reach[u]="end"),e&&(p.dispatchEvent(H_("ps-scroll-"+u)),e<0?p.dispatchEvent(H_("ps-scroll-"+c)):e>0&&p.dispatchEvent(H_("ps-scroll-"+h)),i&&function(t,e){N_(t,e),L_(t,e)}(t,u)),t.reach[u]&&(e||r)&&p.dispatchEvent(H_("ps-"+u+"-reach-"+t.reach[u]))}(t,n,0,i,r)};function U_(t){return parseInt(t,10)||0}var X_={isWebKit:"undefined"!=typeof document&&"WebkitAppearance"in document.documentElement.style,supportsTouch:"undefined"!=typeof window&&("ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch),supportsIePointer:"undefined"!=typeof navigator&&navigator.msMaxTouchPoints,isChrome:"undefined"!=typeof navigator&&/Chrome/i.test(navigator&&navigator.userAgent)},Y_=function(t){var e=t.element,n=Math.floor(e.scrollTop);t.containerWidth=e.clientWidth,t.containerHeight=e.clientHeight,t.contentWidth=e.scrollWidth,t.contentHeight=e.scrollHeight,e.contains(t.scrollbarXRail)||(M_(e,R_.element.rail("x")).forEach(function(t){return j_(t)}),e.appendChild(t.scrollbarXRail)),e.contains(t.scrollbarYRail)||(M_(e,R_.element.rail("y")).forEach(function(t){return j_(t)}),e.appendChild(t.scrollbarYRail)),!t.settings.suppressScrollX&&t.containerWidth+t.settings.scrollXMarginOffset<t.contentWidth?(t.scrollbarXActive=!0,t.railXWidth=t.containerWidth-t.railXMarginWidth,t.railXRatio=t.containerWidth/t.railXWidth,t.scrollbarXWidth=q_(t,U_(t.railXWidth*t.containerWidth/t.contentWidth)),t.scrollbarXLeft=U_((t.negativeScrollAdjustment+e.scrollLeft)*(t.railXWidth-t.scrollbarXWidth)/(t.contentWidth-t.containerWidth))):t.scrollbarXActive=!1,!t.settings.suppressScrollY&&t.containerHeight+t.settings.scrollYMarginOffset<t.contentHeight?(t.scrollbarYActive=!0,t.railYHeight=t.containerHeight-t.railYMarginHeight,t.railYRatio=t.containerHeight/t.railYHeight,t.scrollbarYHeight=q_(t,U_(t.railYHeight*t.containerHeight/t.contentHeight)),t.scrollbarYTop=U_(n*(t.railYHeight-t.scrollbarYHeight)/(t.contentHeight-t.containerHeight))):t.scrollbarYActive=!1,t.scrollbarXLeft>=t.railXWidth-t.scrollbarXWidth&&(t.scrollbarXLeft=t.railXWidth-t.scrollbarXWidth),t.scrollbarYTop>=t.railYHeight-t.scrollbarYHeight&&(t.scrollbarYTop=t.railYHeight-t.scrollbarYHeight),function(t,e){var n={width:e.railXWidth},i=Math.floor(t.scrollTop);n.left=e.isRtl?e.negativeScrollAdjustment+t.scrollLeft+e.containerWidth-e.contentWidth:t.scrollLeft,e.isScrollbarXUsingBottom?n.bottom=e.scrollbarXBottom-i:n.top=e.scrollbarXTop+i,I_(e.scrollbarXRail,n);var r={top:i,height:e.railYHeight};e.isScrollbarYUsingRight?r.right=e.isRtl?e.contentWidth-(e.negativeScrollAdjustment+t.scrollLeft)-e.scrollbarYRight-e.scrollbarYOuterWidth:e.scrollbarYRight-t.scrollLeft:r.left=e.isRtl?e.negativeScrollAdjustment+t.scrollLeft+2*e.containerWidth-e.contentWidth-e.scrollbarYLeft-e.scrollbarYOuterWidth:e.scrollbarYLeft+t.scrollLeft,I_(e.scrollbarYRail,r),I_(e.scrollbarX,{left:e.scrollbarXLeft,width:e.scrollbarXWidth-e.railBorderXWidth}),I_(e.scrollbarY,{top:e.scrollbarYTop,height:e.scrollbarYHeight-e.railBorderYWidth})}(e,t),t.scrollbarXActive?e.classList.add(R_.state.active("x")):(e.classList.remove(R_.state.active("x")),t.scrollbarXWidth=0,t.scrollbarXLeft=0,e.scrollLeft=0),t.scrollbarYActive?e.classList.add(R_.state.active("y")):(e.classList.remove(R_.state.active("y")),t.scrollbarYHeight=0,t.scrollbarYTop=0,e.scrollTop=0)};function q_(t,e){return t.settings.minScrollbarLength&&(e=Math.max(e,t.settings.minScrollbarLength)),t.settings.maxScrollbarLength&&(e=Math.min(e,t.settings.maxScrollbarLength)),e}function G_(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],s=e[5],a=e[6],l=e[7],u=e[8],c=t.element,h=null,p=null,d=null;function f(e){c[a]=h+d*(e[r]-p),N_(t,l),Y_(t),e.stopPropagation(),e.preventDefault()}function g(){L_(t,l),t[u].classList.remove(R_.state.clicking),t.event.unbind(t.ownerDocument,"mousemove",f)}t.event.bind(t[e[4]],"mousedown",function(e){h=c[a],p=e[r],d=(t[i]-t[n])/(t[o]-t[s]),t.event.bind(t.ownerDocument,"mousemove",f),t.event.once(t.ownerDocument,"mouseup",g),t[u].classList.add(R_.state.clicking),e.stopPropagation(),e.preventDefault()})}var K_={"click-rail":function(t){t.event.bind(t.scrollbarY,"mousedown",function(t){return t.stopPropagation()}),t.event.bind(t.scrollbarYRail,"mousedown",function(e){var n=e.pageY-window.pageYOffset-t.scrollbarYRail.getBoundingClientRect().top;t.element.scrollTop+=(n>t.scrollbarYTop?1:-1)*t.containerHeight,Y_(t),e.stopPropagation()}),t.event.bind(t.scrollbarX,"mousedown",function(t){return t.stopPropagation()}),t.event.bind(t.scrollbarXRail,"mousedown",function(e){var n=e.pageX-window.pageXOffset-t.scrollbarXRail.getBoundingClientRect().left;t.element.scrollLeft+=(n>t.scrollbarXLeft?1:-1)*t.containerWidth,Y_(t),e.stopPropagation()})},"drag-thumb":function(t){G_(t,["containerWidth","contentWidth","pageX","railXWidth","scrollbarX","scrollbarXWidth","scrollLeft","x","scrollbarXRail"]),G_(t,["containerHeight","contentHeight","pageY","railYHeight","scrollbarY","scrollbarYHeight","scrollTop","y","scrollbarYRail"])},keyboard:function(t){var e=t.element;t.event.bind(t.ownerDocument,"keydown",function(n){if(!(n.isDefaultPrevented&&n.isDefaultPrevented()||n.defaultPrevented)&&(D_(e,":hover")||D_(t.scrollbarX,":focus")||D_(t.scrollbarY,":focus"))){var i,r=document.activeElement?document.activeElement:t.ownerDocument.activeElement;if(r){if("IFRAME"===r.tagName)r=r.contentDocument.activeElement;else for(;r.shadowRoot;)r=r.shadowRoot.activeElement;if(D_(i=r,"input,[contenteditable]")||D_(i,"select,[contenteditable]")||D_(i,"textarea,[contenteditable]")||D_(i,"button,[contenteditable]"))return}var o=0,s=0;switch(n.which){case 37:o=n.metaKey?-t.contentWidth:n.altKey?-t.containerWidth:-30;break;case 38:s=n.metaKey?t.contentHeight:n.altKey?t.containerHeight:30;break;case 39:o=n.metaKey?t.contentWidth:n.altKey?t.containerWidth:30;break;case 40:s=n.metaKey?-t.contentHeight:n.altKey?-t.containerHeight:-30;break;case 32:s=n.shiftKey?t.containerHeight:-t.containerHeight;break;case 33:s=t.containerHeight;break;case 34:s=-t.containerHeight;break;case 36:s=t.contentHeight;break;case 35:s=-t.contentHeight;break;default:return}t.settings.suppressScrollX&&0!==o||t.settings.suppressScrollY&&0!==s||(e.scrollTop-=s,e.scrollLeft+=o,Y_(t),function(n,i){var r=Math.floor(e.scrollTop);if(0===n){if(!t.scrollbarYActive)return!1;if(0===r&&i>0||r>=t.contentHeight-t.containerHeight&&i<0)return!t.settings.wheelPropagation}var o=e.scrollLeft;if(0===i){if(!t.scrollbarXActive)return!1;if(0===o&&n<0||o>=t.contentWidth-t.containerWidth&&n>0)return!t.settings.wheelPropagation}return!0}(o,s)&&n.preventDefault())}})},wheel:function(t){var e=t.element;function n(n){var i=function(t){var e=t.deltaX,n=-1*t.deltaY;return void 0!==e&&void 0!==n||(e=-1*t.wheelDeltaX/6,n=t.wheelDeltaY/6),t.deltaMode&&1===t.deltaMode&&(e*=10,n*=10),e!=e&&n!=n&&(e=0,n=t.wheelDelta),t.shiftKey?[-n,-e]:[e,n]}(n),r=i[0],o=i[1];if(!function(t,n,i){if(!X_.isWebKit&&e.querySelector("select:focus"))return!0;if(!e.contains(t))return!1;for(var r=t;r&&r!==e;){if(r.classList.contains(R_.element.consuming))return!0;var o=O_(r);if([o.overflow,o.overflowX,o.overflowY].join("").match(/(scroll|auto)/)){var s=r.scrollHeight-r.clientHeight;if(s>0&&!(0===r.scrollTop&&i>0||r.scrollTop===s&&i<0))return!0;var a=r.scrollWidth-r.clientWidth;if(a>0&&!(0===r.scrollLeft&&n<0||r.scrollLeft===a&&n>0))return!0}r=r.parentNode}return!1}(n.target,r,o)){var s=!1;t.settings.useBothWheelAxes?t.scrollbarYActive&&!t.scrollbarXActive?(o?e.scrollTop-=o*t.settings.wheelSpeed:e.scrollTop+=r*t.settings.wheelSpeed,s=!0):t.scrollbarXActive&&!t.scrollbarYActive&&(r?e.scrollLeft+=r*t.settings.wheelSpeed:e.scrollLeft-=o*t.settings.wheelSpeed,s=!0):(e.scrollTop-=o*t.settings.wheelSpeed,e.scrollLeft+=r*t.settings.wheelSpeed),Y_(t),(s=s||function(n,i){var r=Math.floor(e.scrollTop),o=0===e.scrollTop,s=r+e.offsetHeight===e.scrollHeight,a=0===e.scrollLeft,l=e.scrollLeft+e.offsetWidth===e.scrollWidth;return!(Math.abs(i)>Math.abs(n)?o||s:a||l)||!t.settings.wheelPropagation}(r,o))&&!n.ctrlKey&&(n.stopPropagation(),n.preventDefault())}}void 0!==window.onwheel?t.event.bind(e,"wheel",n):void 0!==window.onmousewheel&&t.event.bind(e,"mousewheel",n)},touch:function(t){if(X_.supportsTouch||X_.supportsIePointer){var e=t.element,n={},i=0,r={},o=null;X_.supportsTouch?(t.event.bind(e,"touchstart",u),t.event.bind(e,"touchmove",c),t.event.bind(e,"touchend",h)):X_.supportsIePointer&&(window.PointerEvent?(t.event.bind(e,"pointerdown",u),t.event.bind(e,"pointermove",c),t.event.bind(e,"pointerup",h)):window.MSPointerEvent&&(t.event.bind(e,"MSPointerDown",u),t.event.bind(e,"MSPointerMove",c),t.event.bind(e,"MSPointerUp",h)))}function s(n,i){e.scrollTop-=i,e.scrollLeft-=n,Y_(t)}function a(t){return t.targetTouches?t.targetTouches[0]:t}function l(t){return!(t.pointerType&&"pen"===t.pointerType&&0===t.buttons||(!t.targetTouches||1!==t.targetTouches.length)&&(!t.pointerType||"mouse"===t.pointerType||t.pointerType===t.MSPOINTER_TYPE_MOUSE))}function u(t){if(l(t)){var e=a(t);n.pageX=e.pageX,n.pageY=e.pageY,i=(new Date).getTime(),null!==o&&clearInterval(o)}}function c(o){if(l(o)){var u=a(o),c={pageX:u.pageX,pageY:u.pageY},h=c.pageX-n.pageX,p=c.pageY-n.pageY;if(function(t,n,i){if(!e.contains(t))return!1;for(var r=t;r&&r!==e;){if(r.classList.contains(R_.element.consuming))return!0;var o=O_(r);if([o.overflow,o.overflowX,o.overflowY].join("").match(/(scroll|auto)/)){var s=r.scrollHeight-r.clientHeight;if(s>0&&!(0===r.scrollTop&&i>0||r.scrollTop===s&&i<0))return!0;var a=r.scrollLeft-r.clientWidth;if(a>0&&!(0===r.scrollLeft&&n<0||r.scrollLeft===a&&n>0))return!0}r=r.parentNode}return!1}(o.target,h,p))return;s(h,p),n=c;var d=(new Date).getTime(),f=d-i;f>0&&(r.x=h/f,r.y=p/f,i=d),function(n,i){var r=Math.floor(e.scrollTop),o=e.scrollLeft,s=Math.abs(n),a=Math.abs(i);if(a>s){if(i<0&&r===t.contentHeight-t.containerHeight||i>0&&0===r)return 0===window.scrollY&&i>0&&X_.isChrome}else if(s>a&&(n<0&&o===t.contentWidth-t.containerWidth||n>0&&0===o))return!0;return!0}(h,p)&&o.preventDefault()}}function h(){t.settings.swipeEasing&&(clearInterval(o),o=setInterval(function(){t.isInitialized?clearInterval(o):r.x||r.y?Math.abs(r.x)<.01&&Math.abs(r.y)<.01?clearInterval(o):(s(30*r.x,30*r.y),r.x*=.8,r.y*=.8):clearInterval(o)},10))}}},Z_=function(t,e){var n=this;if(void 0===e&&(e={}),"string"==typeof t&&(t=document.querySelector(t)),!t||!t.nodeName)throw new Error("no element is specified to initialize PerfectScrollbar");for(var i in this.element=t,t.classList.add(R_.main),this.settings={handlers:["click-rail","drag-thumb","keyboard","wheel","touch"],maxScrollbarLength:null,minScrollbarLength:null,scrollingThreshold:1e3,scrollXMarginOffset:0,scrollYMarginOffset:0,suppressScrollX:!1,suppressScrollY:!1,swipeEasing:!0,useBothWheelAxes:!1,wheelPropagation:!0,wheelSpeed:1},e)n.settings[i]=e[i];this.containerWidth=null,this.containerHeight=null,this.contentWidth=null,this.contentHeight=null;var r,o,s=function(){return t.classList.add(R_.state.focus)},a=function(){return t.classList.remove(R_.state.focus)};this.isRtl="rtl"===O_(t).direction,this.isNegativeScroll=(o=t.scrollLeft,t.scrollLeft=-1,r=t.scrollLeft<0,t.scrollLeft=o,r),this.negativeScrollAdjustment=this.isNegativeScroll?t.scrollWidth-t.clientWidth:0,this.event=new z_,this.ownerDocument=t.ownerDocument||document,this.scrollbarXRail=A_(R_.element.rail("x")),t.appendChild(this.scrollbarXRail),this.scrollbarX=A_(R_.element.thumb("x")),this.scrollbarXRail.appendChild(this.scrollbarX),this.scrollbarX.setAttribute("tabindex",0),this.event.bind(this.scrollbarX,"focus",s),this.event.bind(this.scrollbarX,"blur",a),this.scrollbarXActive=null,this.scrollbarXWidth=null,this.scrollbarXLeft=null;var l=O_(this.scrollbarXRail);this.scrollbarXBottom=parseInt(l.bottom,10),isNaN(this.scrollbarXBottom)?(this.isScrollbarXUsingBottom=!1,this.scrollbarXTop=U_(l.top)):this.isScrollbarXUsingBottom=!0,this.railBorderXWidth=U_(l.borderLeftWidth)+U_(l.borderRightWidth),I_(this.scrollbarXRail,{display:"block"}),this.railXMarginWidth=U_(l.marginLeft)+U_(l.marginRight),I_(this.scrollbarXRail,{display:""}),this.railXWidth=null,this.railXRatio=null,this.scrollbarYRail=A_(R_.element.rail("y")),t.appendChild(this.scrollbarYRail),this.scrollbarY=A_(R_.element.thumb("y")),this.scrollbarYRail.appendChild(this.scrollbarY),this.scrollbarY.setAttribute("tabindex",0),this.event.bind(this.scrollbarY,"focus",s),this.event.bind(this.scrollbarY,"blur",a),this.scrollbarYActive=null,this.scrollbarYHeight=null,this.scrollbarYTop=null;var u=O_(this.scrollbarYRail);this.scrollbarYRight=parseInt(u.right,10),isNaN(this.scrollbarYRight)?(this.isScrollbarYUsingRight=!1,this.scrollbarYLeft=U_(u.left)):this.isScrollbarYUsingRight=!0,this.scrollbarYOuterWidth=this.isRtl?function(t){var e=O_(t);return U_(e.width)+U_(e.paddingLeft)+U_(e.paddingRight)+U_(e.borderLeftWidth)+U_(e.borderRightWidth)}(this.scrollbarY):null,this.railBorderYWidth=U_(u.borderTopWidth)+U_(u.borderBottomWidth),I_(this.scrollbarYRail,{display:"block"}),this.railYMarginHeight=U_(u.marginTop)+U_(u.marginBottom),I_(this.scrollbarYRail,{display:""}),this.railYHeight=null,this.railYRatio=null,this.reach={x:t.scrollLeft<=0?"start":t.scrollLeft>=this.contentWidth-this.containerWidth?"end":null,y:t.scrollTop<=0?"start":t.scrollTop>=this.contentHeight-this.containerHeight?"end":null},this.isAlive=!0,this.settings.handlers.forEach(function(t){return K_[t](n)}),this.lastScrollTop=Math.floor(t.scrollTop),this.lastScrollLeft=t.scrollLeft,this.event.bind(this.element,"scroll",function(t){return n.onScroll(t)}),Y_(this)};Z_.prototype.update=function(){this.isAlive&&(this.negativeScrollAdjustment=this.isNegativeScroll?this.element.scrollWidth-this.element.clientWidth:0,I_(this.scrollbarXRail,{display:"block"}),I_(this.scrollbarYRail,{display:"block"}),this.railXMarginWidth=U_(O_(this.scrollbarXRail).marginLeft)+U_(O_(this.scrollbarXRail).marginRight),this.railYMarginHeight=U_(O_(this.scrollbarYRail).marginTop)+U_(O_(this.scrollbarYRail).marginBottom),I_(this.scrollbarXRail,{display:"none"}),I_(this.scrollbarYRail,{display:"none"}),Y_(this),W_(this,"top",0,!1,!0),W_(this,"left",0,!1,!0),I_(this.scrollbarXRail,{display:""}),I_(this.scrollbarYRail,{display:""}))},Z_.prototype.onScroll=function(t){this.isAlive&&(Y_(this),W_(this,"top",this.element.scrollTop-this.lastScrollTop),W_(this,"left",this.element.scrollLeft-this.lastScrollLeft),this.lastScrollTop=Math.floor(this.element.scrollTop),this.lastScrollLeft=this.element.scrollLeft)},Z_.prototype.destroy=function(){this.isAlive&&(this.event.unbindAll(),j_(this.scrollbarX),j_(this.scrollbarY),j_(this.scrollbarXRail),j_(this.scrollbarYRail),this.removePsClasses(),this.element=null,this.scrollbarX=null,this.scrollbarY=null,this.scrollbarXRail=null,this.scrollbarYRail=null,this.isAlive=!1)},Z_.prototype.removePsClasses=function(){this.element.className=this.element.className.split(" ").filter(function(t){return!t.match(/^ps([-_].+|)$/)}).join(" ")};var Q_=Z_,J_=function(){function t(t,e,n,i,r,o,s){this.el=t,this.renderer=e,this.breakpoints=n,this.ngZone=i,this.mutationObserverFactory=r,this.config=o,this.supportsNativeStyling=s,this.subscriptions=[],this.minLength=100,this.suppressX=!0,this.scrollTop=0,this.native=!0,this.debouncer=new at}return t.prototype.ngAfterViewInit=function(){this.renderer.addClass(this.el.nativeElement,this.suppressX?"scroll-container":"scroll-container-x"),this.shouldUseNative()||(this.scrollbar=new Q_(this.el.nativeElement,{minScrollbarLength:this.minLength,suppressScrollX:this.suppressX,useBothWheelAxes:!this.suppressX,wheelSpeed:2}),this.native=!1,this.bindToContentChange())},t.prototype.update=function(){this.native||this.scrollbar.update()},t.prototype.setScrollTop=function(t){void 0===t&&(t=0),this.el.nativeElement.scrollTop=t,this.scrollTop=this.el.nativeElement.scrollTop,this.update()},t.prototype.ngOnDestroy=function(){this.subscriptions.forEach(function(t){return t.unsubscribe()}),this.subscriptions=[],this.native||this.scrollbar.destroy(),this.debouncer.complete(),this.observer&&this.observer.disconnect()},t.prototype.shouldUseNative=function(){return!this.config.get("vebto.forceCustomScrollbar")&&!/Edge/.test(navigator.userAgent)&&(!!this.breakpoints.isMobile||this.supportsNativeStyling)},t.prototype.bindToContentChange=function(){var t=this;this.observer=this.ngZone.runOutsideAngular(function(){return t.mutationObserverFactory.create(function(e){t.debouncer.next(e)})}),this.observer.observe(this.el.nativeElement,{childList:!0,subtree:!0}),this.ngZone.runOutsideAngular(function(){t.debouncer.subscribe(function(e){return t.update()})})},t}(),$_=new yt("SUPPORTS_NATIVE_SCROLLBAR_STYLING",{providedIn:"root",factory:function(){var t=document.createElement("div");t.className="__sb-test",t.style.overflow="scroll",t.style.width="40px";var e=document.createElement("style");e.innerHTML=".__sb-test::-webkit-scrollbar { width: 0px; }",t.appendChild(e),document.body.appendChild(t);var n=40==t.scrollWidth;return document.body.removeChild(t),n}}),tw=function(){function t(t,e){this.history=t,this.panelRef=e}return t.prototype.loadHistoryState=function(t){this.history.load(t)},t}(),ew=Sr({encapsulation:2,styles:[["history-panel{display:block;bottom:5px;right:5px}"]],data:{}});function nw(t){return bs(0,[(t()(),to(0,0,null,null,5,"div",[["class","item"]],[[2,"active",null]],[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.loadHistoryState(t.context.$implicit)&&i),i},null,null)),(t()(),to(1,0,null,null,1,"mat-icon",[["class","list-icon mat-icon"],["role","img"]],[[2,"mat-icon-inline",null]],null,null,Tv,Ev)),Wo(2,638976,null,0,Sv,[ei,_v,[8,null]],{svgIcon:[0,"svgIcon"]},null),(t()(),to(3,0,null,null,2,"div",[["class","name"],["trans",""]],null,null,null,null,null)),Wo(4,4341760,null,0,lv,[ei,uv,wu],null,null),(t()(),ms(5,null,["",""]))],function(t,e){t(e,2,0,e.context.$implicit.icon)},function(t,e){t(e,0,0,e.context.$implicit.index===e.component.history.getPointer()),t(e,1,0,Ao(e,2).inline),t(e,5,0,e.context.$implicit.name)})}function iw(t){return bs(0,[(t()(),to(0,0,null,null,7,"div",[["class","header"]],null,null,null,null,null)),(t()(),to(1,0,null,null,2,"div",[["class","name"],["trans",""]],null,null,null,null,null)),Wo(2,4341760,null,0,lv,[ei,uv,wu],null,null),(t()(),ms(-1,null,["History"])),(t()(),to(4,0,null,null,3,"button",[["class","close-button"],["mat-icon-button",""]],[[8,"disabled",0],[2,"_mat-animation-noopable",null]],[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.panelRef.close()&&i),i},d_,p_)),Wo(5,180224,null,0,qv,[ei,Yd,Lm,[2,c_]],null,null),(t()(),to(6,0,null,0,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","close"]],[[2,"mat-icon-inline",null]],null,null,Tv,Ev)),Wo(7,638976,null,0,Sv,[ei,_v,[8,null]],{svgIcon:[0,"svgIcon"]},null),(t()(),to(8,0,null,null,3,"div",[["class","items-list"],["customScrollbar",""]],null,null,null,null,null)),Wo(9,4341760,null,0,J_,[ei,ti,Kf,An,_m,wu,$_],null,null),(t()(),$r(16777216,null,null,1,null,nw)),Wo(11,278528,null,0,zu,[ri,ii,Ei],{ngForOf:[0,"ngForOf"]},null)],function(t,e){var n=e.component;t(e,7,0,"close"),t(e,11,0,n.history.getAllItems())},function(t,e){t(e,4,0,Ao(e,5).disabled||null,"NoopAnimations"===Ao(e,5)._animationMode),t(e,6,0,Ao(e,7).inline)})}var rw=bo("history-panel",tw,function(t){return bs(0,[(t()(),to(0,0,null,null,1,"history-panel",[],null,null,null,iw,ew)),Wo(1,49152,null,0,tw,[tg,Ld],null,null)],null,null)},{},{},[]),ow=n("U/5H"),sw=function(){function t(t,e,n,i){this.el=t,this.objects=e,this.zone=n,this.canvasState=i}return t.prototype.ngAfterContentInit=function(){var t=this;new ow(this.el.nativeElement,{draggable:".reorder-item-wrapper",animation:250,onUpdate:function(){Array.from(t.el.nativeElement.querySelectorAll(".item")).map(function(t){return t.dataset.id}).reverse().forEach(function(e,n){return t.objects.getById(e).moveTo(n)}),t.canvasState.fabric.requestRenderAll(),t.objects.syncObjects()}})},t}(),aw=function(){function t(t,e){this.canvas=t,this.activeObject=e,this.objects=[],this.init()}return t.prototype.getAll=function(){return this.objects},t.prototype.get=function(t){return this.objects.find(function(e){return e.name===t})},t.prototype.getById=function(t){return this.objects.find(function(e){return e.data.id===t})},t.prototype.isActive=function(t){return this.activeObject.getId()===t.data.id},t.prototype.has=function(t){return this.objects.findIndex(function(e){return e.name===t})>-1},t.prototype.select=function(t){this.canvas.state.fabric.setActiveObject(t),this.canvas.state.fabric.requestRenderAll()},t.prototype.syncObjects=function(){this.objects=this.canvas.fabric().getObjects().filter(function(t){if(t.name)return-1===t.name.indexOf("crop.")&&-1===t.name.indexOf("round.")&&-1===t.name.indexOf("frame.")}).reverse()},t.prototype.init=function(){var t=this;this.canvas.state.loaded.subscribe(function(){t.canvas.state.loaded.subscribe(function(){t.syncObjects()}),t.canvas.fabric().on("object:added",function(){setTimeout(function(){return t.syncObjects()})}),t.canvas.fabric().on("object:removed",function(){t.syncObjects()})})},t}(),lw=function(){function t(t,e,n,i){this.objects=t,this.panelRef=e,this.controls=n,this.activeDrawer=i}return t.prototype.getIcon=function(t){switch(t.name){case"text":return"text-box-custom";case"shape":return"polygon-custom";case"sticker":return"sticker-custom";case"drawing":return"pencil-custom";case"mainImage":case"image":return"photo-library"}},t.prototype.selectObject=function(t){this.objects.select(t),this.activeDrawer.dirty()||this.controls.openPanel("objectSettings")},t.prototype.getObjectDisplayName=function(t){var e=t.name;return e?e.replace(/([A-Z])/g," $1"):""},t}(),uw=function(){function t(t){this.controls=t,this.drawers=[],this.bindToPanelClose()}return t.prototype.set=function(t){t&&this.drawers.push(t)},t.prototype.isOpen=function(){return this.drawers.length>0},t.prototype.close=function(){var t=this.getActive();t?t.close():this.controls.closeCurrentPanel()},t.prototype.apply=function(){this.getActive().apply()},t.prototype.dirty=function(){return this.getActive()&&this.getActive().dirty},t.prototype.getName=function(){return this.getActive()&&this.getActive().name},t.prototype.getDisplayName=function(){var t=this.getName();return t?t.replace(/([A-Z])/g," $1"):""},t.prototype.canApplyChanges=function(){return"objectSettings"!==this.getName()&&this.dirty()},t.prototype.getActive=function(){return this.drawers[this.drawers.length-1]},t.prototype.bindToPanelClose=function(){var t=this;this.controls.onClose$.subscribe(function(){t.drawers.forEach(function(e,n){t.controls.panelIsOpen(e.name)||t.drawers.splice(n,1)})})},t}(),cw=Sr({encapsulation:2,styles:[["objects-panel{display:block}objects-panel .action-button{vertical-align:middle;width:20px;height:20px;line-height:20px;margin:0 5px}objects-panel .action-button mat-icon{width:20px;height:20px}"]],data:{}});function hw(t){return bs(0,[(t()(),to(0,0,null,null,6,"div",[["class","reorder-item-wrapper"]],null,null,null,null,null)),(t()(),to(1,0,null,null,5,"div",[["class","item"]],[[2,"disabled",null],[2,"active",null],[1,"data-id",0]],[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.selectObject(t.context.$implicit)&&i),i},null,null)),(t()(),to(2,0,null,null,1,"mat-icon",[["class","list-icon mat-icon"],["role","img"]],[[2,"mat-icon-inline",null]],null,null,Tv,Ev)),Wo(3,638976,null,0,Sv,[ei,_v,[8,null]],{svgIcon:[0,"svgIcon"]},null),(t()(),to(4,0,null,null,2,"div",[["class","name"],["trans",""]],null,null,null,null,null)),Wo(5,4341760,null,0,lv,[ei,uv,wu],null,null),(t()(),ms(6,null,["",""]))],function(t,e){t(e,3,0,e.component.getIcon(e.context.$implicit))},function(t,e){var n=e.component;t(e,1,0,!e.context.$implicit.selectable&&"drawing"!==e.context.$implicit.name,n.objects.isActive(e.context.$implicit),e.context.$implicit.data.id),t(e,2,0,Ao(e,3).inline),t(e,6,0,n.getObjectDisplayName(e.context.$implicit))})}function pw(t){return bs(0,[(t()(),to(0,0,null,null,7,"div",[["class","header"]],null,null,null,null,null)),(t()(),to(1,0,null,null,2,"div",[["class","name"],["trans",""]],null,null,null,null,null)),Wo(2,4341760,null,0,lv,[ei,uv,wu],null,null),(t()(),ms(-1,null,["Objects"])),(t()(),to(4,0,null,null,3,"button",[["class","close-button"],["mat-icon-button",""]],[[8,"disabled",0],[2,"_mat-animation-noopable",null]],[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.panelRef.close()&&i),i},d_,p_)),Wo(5,180224,null,0,qv,[ei,Yd,Lm,[2,c_]],null,null),(t()(),to(6,0,null,0,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","close"]],[[2,"mat-icon-inline",null]],null,null,Tv,Ev)),Wo(7,638976,null,0,Sv,[ei,_v,[8,null]],{svgIcon:[0,"svgIcon"]},null),(t()(),to(8,0,null,null,4,"div",[["class","items-list"],["customScrollbar",""],["reorderObjects",""]],null,null,null,null,null)),Wo(9,4341760,null,0,J_,[ei,ti,Kf,An,_m,wu,$_],null,null),Wo(10,1064960,null,0,sw,[ei,aw,An,Od],null,null),(t()(),$r(16777216,null,null,1,null,hw)),Wo(12,278528,null,0,zu,[ri,ii,Ei],{ngForOf:[0,"ngForOf"]},null)],function(t,e){var n=e.component;t(e,7,0,"close"),t(e,12,0,n.objects.getAll())},function(t,e){t(e,4,0,Ao(e,5).disabled||null,"NoopAnimations"===Ao(e,5)._animationMode),t(e,6,0,Ao(e,7).inline)})}var dw=bo("objects-panel",lw,function(t){return bs(0,[(t()(),to(0,0,null,null,1,"objects-panel",[],null,null,null,pw,cw)),Wo(1,49152,null,0,lw,[aw,Ld,$f,uw],null,null)],null,null)},{},{},[]),fw=1,gw={},mw=function(t){function e(e,n){var i=t.call(this,e,n)||this;return i.scheduler=e,i.work=n,i}return r(e,t),e.prototype.requestAsyncId=function(e,n,i){return void 0===i&&(i=0),null!==i&&i>0?t.prototype.requestAsyncId.call(this,e,n,i):(e.actions.push(this),e.scheduled||(e.scheduled=(r=e.flush.bind(e,null),o=fw++,gw[o]=r,Promise.resolve().then(function(){return function(t){var e=gw[t];e&&e()}(o)}),o)));var r,o},e.prototype.recycleAsyncId=function(e,n,i){if(void 0===i&&(i=0),null!==i&&i>0||null===i&&this.delay>0)return t.prototype.recycleAsyncId.call(this,e,n,i);0===e.actions.length&&(delete gw[n],e.scheduled=void 0)},e}(md),vw=new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.flush=function(t){this.active=!0,this.scheduled=void 0;var e,n=this.actions,i=-1,r=n.length;t=t||n.shift();do{if(e=t.execute(t.state,t.delay))break}while(++i<r&&(t=n.shift()));if(this.active=!1,e){for(;++i<r&&(t=n.shift());)t.unsubscribe();throw e}},e}(bd))(mw),yw=function(){function t(t){this.project=t}return t.prototype.call=function(t,e){return e.subscribe(new bw(t,this.project))},t}(),bw=function(t){function e(e,n){var i=t.call(this,e)||this;return i.project=n,i.index=0,i}return r(e,t),e.prototype._next=function(t){var e,n=this.index++;try{e=this.project(t,n)}catch(t){return void this.destination.error(t)}this._innerSub(e,t,n)},e.prototype._innerSub=function(t,e,n){var i=this.innerSubscription;i&&i.unsubscribe();var r=new R(this,void 0,void 0);this.destination.add(r),this.innerSubscription=U(this,t,e,n,r)},e.prototype._complete=function(){var e=this.innerSubscription;e&&!e.closed||t.prototype._complete.call(this),this.unsubscribe()},e.prototype._unsubscribe=function(){this.innerSubscription=null},e.prototype.notifyComplete=function(e){this.destination.remove(e),this.innerSubscription=null,this.isStopped&&t.prototype._complete.call(this)},e.prototype.notifyNext=function(t,e,n,i,r){this.destination.next(e)},e}(X);function _w(t,e){void 0===e&&(e=Zd);var n,i=(n=t)instanceof Date&&!isNaN(+n)?+t-e.now():Math.abs(t);return function(t){return t.lift(new ww(i,e))}}var ww=function(){function t(t,e){this.delay=t,this.scheduler=e}return t.prototype.call=function(t,e){return e.subscribe(new xw(t,this.delay,this.scheduler))},t}(),xw=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.delay=n,r.scheduler=i,r.queue=[],r.active=!1,r.errored=!1,r}return r(e,t),e.dispatch=function(t){for(var e=t.source,n=e.queue,i=t.scheduler,r=t.destination;n.length>0&&n[0].time-i.now()<=0;)n.shift().notification.observe(r);if(n.length>0){var o=Math.max(0,n[0].time-i.now());this.schedule(t,o)}else this.unsubscribe(),e.active=!1},e.prototype._schedule=function(t){this.active=!0,this.destination.add(t.schedule(e.dispatch,this.delay,{source:this,destination:this.destination,scheduler:t}))},e.prototype.scheduleNotification=function(t){if(!0!==this.errored){var e=this.scheduler,n=new Cw(e.now()+this.delay,t);this.queue.push(n),!1===this.active&&this._schedule(e)}},e.prototype._next=function(t){this.scheduleNotification(Cd.createNext(t))},e.prototype._error=function(t){this.errored=!0,this.queue=[],this.destination.error(t),this.unsubscribe()},e.prototype._complete=function(){this.scheduleNotification(Cd.createComplete()),this.unsubscribe()},e}(O),Cw=function(t,e){this.time=t,this.notification=e},Sw=new yt("MAT_MENU_PANEL"),kw=function(t){function e(e,n,i,r){var o=t.call(this)||this;return o._elementRef=e,o._focusMonitor=i,o._parentMenu=r,o._hovered=new at,o._highlighted=!1,o._triggersSubmenu=!1,i&&i.monitor(o._getHostElement(),!1),r&&r.addItem&&r.addItem(o),o._document=n,o}return r(e,t),e.prototype.focus=function(t){void 0===t&&(t="program"),this._focusMonitor?this._focusMonitor.focusVia(this._getHostElement(),t):this._getHostElement().focus()},e.prototype.ngOnDestroy=function(){this._focusMonitor&&this._focusMonitor.stopMonitoring(this._getHostElement()),this._parentMenu&&this._parentMenu.removeItem&&this._parentMenu.removeItem(this),this._hovered.complete()},e.prototype._getTabIndex=function(){return this.disabled?"-1":"0"},e.prototype._getHostElement=function(){return this._elementRef.nativeElement},e.prototype._checkDisabled=function(t){this.disabled&&(t.preventDefault(),t.stopPropagation())},e.prototype._handleMouseEnter=function(){this._hovered.next(this)},e.prototype.getLabel=function(){var t=this._elementRef.nativeElement,e=this._document?this._document.TEXT_NODE:3,n="";if(t.childNodes)for(var i=t.childNodes.length,r=0;r<i;r++)t.childNodes[r].nodeType===e&&(n+=t.childNodes[r].textContent);return n.trim()},e}(Xm(Wm(function(){}))),Ew=new yt("mat-menu-default-options",{providedIn:"root",factory:function(){return{overlapTrigger:!0,xPosition:"after",yPosition:"below",backdropClass:"cdk-overlay-transparent-backdrop"}}}),Tw=function(){function t(t,e,n){this._elementRef=t,this._ngZone=e,this._defaultOptions=n,this._xPosition=this._defaultOptions.xPosition,this._yPosition=this._defaultOptions.yPosition,this._items=[],this._itemChanges=new at,this._tabSubscription=k.EMPTY,this._classList={},this._panelAnimationState="void",this._animationDone=new at,this.backdropClass=this._defaultOptions.backdropClass,this._overlapTrigger=this._defaultOptions.overlapTrigger,this._hasBackdrop=this._defaultOptions.hasBackdrop,this.closed=new In,this.close=this.closed}return Object.defineProperty(t.prototype,"xPosition",{get:function(){return this._xPosition},set:function(t){"before"!==t&&"after"!==t&&function(){throw Error('xPosition value must be either \'before\' or after\'.\n Example: <mat-menu xPosition="before" #menu="matMenu"></mat-menu>')}(),this._xPosition=t,this.setPositionClasses()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"yPosition",{get:function(){return this._yPosition},set:function(t){"above"!==t&&"below"!==t&&function(){throw Error('yPosition value must be either \'above\' or below\'.\n Example: <mat-menu yPosition="above" #menu="matMenu"></mat-menu>')}(),this._yPosition=t,this.setPositionClasses()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"overlapTrigger",{get:function(){return this._overlapTrigger},set:function(t){this._overlapTrigger=Vd(t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hasBackdrop",{get:function(){return this._hasBackdrop},set:function(t){this._hasBackdrop=Vd(t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"panelClass",{set:function(t){t&&t.length&&(this._classList=t.split(" ").reduce(function(t,e){return t[e]=!0,t},{}),this._elementRef.nativeElement.className="")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"classList",{get:function(){return this.panelClass},set:function(t){this.panelClass=t},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){this.setPositionClasses()},t.prototype.ngAfterContentInit=function(){var t=this;this._keyManager=new Rm(this._items).withWrap().withTypeAhead(),this._tabSubscription=this._keyManager.tabOut.subscribe(function(){return t.closed.emit("tab")})},t.prototype.ngOnDestroy=function(){this._tabSubscription.unsubscribe(),this.closed.complete()},t.prototype._hovered=function(){return this._itemChanges.pipe(zf(this._items),function t(e,n){return"function"==typeof n?function(i){return i.pipe(t(function(t,i){return Z(e(t,i)).pipe(Y(function(e,r){return n(t,e,i,r)}))}))}:function(t){return t.lift(new yw(e))}}(function(t){return nt.apply(void 0,t.map(function(t){return t._hovered}))}))},t.prototype._handleKeydown=function(t){var e=t.keyCode;switch(e){case 27:this.closed.emit("keydown"),t.stopPropagation();break;case 37:this.parentMenu&&"ltr"===this.direction&&this.closed.emit("keydown");break;case 39:this.parentMenu&&"rtl"===this.direction&&this.closed.emit("keydown");break;default:38!==e&&40!==e||this._keyManager.setFocusOrigin("keyboard"),this._keyManager.onKeydown(t)}},t.prototype.focusFirstItem=function(t){var e=this;void 0===t&&(t="program"),this.lazyContent?this._ngZone.onStable.asObservable().pipe(lf(1)).subscribe(function(){return e._keyManager.setFocusOrigin(t).setFirstItemActive()}):this._keyManager.setFocusOrigin(t).setFirstItemActive()},t.prototype.resetActiveItem=function(){this._keyManager.setActiveItem(-1)},t.prototype.setElevation=function(t){var e="mat-elevation-z"+(2+t),n=Object.keys(this._classList).find(function(t){return t.startsWith("mat-elevation-z")});n&&n!==this._previousElevation||(this._previousElevation&&(this._classList[this._previousElevation]=!1),this._classList[e]=!0,this._previousElevation=e)},t.prototype.addItem=function(t){-1===this._items.indexOf(t)&&(this._items.push(t),this._itemChanges.next(this._items))},t.prototype.removeItem=function(t){var e=this._items.indexOf(t);this._items.indexOf(t)>-1&&(this._items.splice(e,1),this._itemChanges.next(this._items))},t.prototype.setPositionClasses=function(t,e){void 0===t&&(t=this.xPosition),void 0===e&&(e=this.yPosition);var n=this._classList;n["mat-menu-before"]="before"===t,n["mat-menu-after"]="after"===t,n["mat-menu-above"]="above"===e,n["mat-menu-below"]="below"===e},t.prototype._startAnimation=function(){this._panelAnimationState="enter"},t.prototype._resetAnimation=function(){this._panelAnimationState="void"},t.prototype._onAnimationDone=function(t){this._animationDone.next(t),this._isAnimating=!1,"enter"===t.toState&&0===this._keyManager.activeItemIndex&&(t.element.scrollTop=0)},t}(),Ow=new yt("mat-menu-scroll-strategy");function Iw(t){return function(){return t.scrollStrategies.reposition()}}var Aw=function(){function t(t,e,n,i,r,o,s,a){this._overlay=t,this._element=e,this._viewContainerRef=n,this._scrollStrategy=i,this._parentMenu=r,this._menuItemInstance=o,this._dir=s,this._focusMonitor=a,this._overlayRef=null,this._menuOpen=!1,this._closeSubscription=k.EMPTY,this._hoverSubscription=k.EMPTY,this._openedByMouse=!1,this.menuOpened=new In,this.onMenuOpen=this.menuOpened,this.menuClosed=new In,this.onMenuClose=this.menuClosed,o&&(o._triggersSubmenu=this.triggersSubmenu())}return Object.defineProperty(t.prototype,"_deprecatedMatMenuTriggerFor",{get:function(){return this.menu},set:function(t){this.menu=t},enumerable:!0,configurable:!0}),t.prototype.ngAfterContentInit=function(){var t=this;this._checkMenu(),this.menu.close.subscribe(function(e){t._destroyMenu(),"click"!==e&&"tab"!==e||!t._parentMenu||t._parentMenu.closed.emit(e)}),this._handleHover()},t.prototype.ngOnDestroy=function(){this._overlayRef&&(this._overlayRef.dispose(),this._overlayRef=null),this._cleanUpSubscriptions()},Object.defineProperty(t.prototype,"menuOpen",{get:function(){return this._menuOpen},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dir",{get:function(){return this._dir&&"rtl"===this._dir.value?"rtl":"ltr"},enumerable:!0,configurable:!0}),t.prototype.triggersSubmenu=function(){return!(!this._menuItemInstance||!this._parentMenu)},t.prototype.toggleMenu=function(){return this._menuOpen?this.closeMenu():this.openMenu()},t.prototype.openMenu=function(){var t=this;if(!this._menuOpen){this._checkMenu();var e=this._createOverlay();this._setPosition(e.getConfig().positionStrategy),e.attach(this._portal),this.menu.lazyContent&&this.menu.lazyContent.attach(this.menuData),this._closeSubscription=this._menuClosingActions().subscribe(function(){return t.closeMenu()}),this._initMenu(),this.menu instanceof Tw&&this.menu._startAnimation()}},t.prototype.closeMenu=function(){this.menu.close.emit()},t.prototype.focus=function(t){void 0===t&&(t="program"),this._focusMonitor?this._focusMonitor.focusVia(this._element.nativeElement,t):this._element.nativeElement.focus()},t.prototype._destroyMenu=function(){var t=this;if(this._overlayRef&&this.menuOpen){var e=this.menu;this._closeSubscription.unsubscribe(),this._overlayRef.detach(),e instanceof Tw?(e._resetAnimation(),e.lazyContent?e._animationDone.pipe(Tu(function(t){return"void"===t.toState}),lf(1),hf(e.lazyContent._attached)).subscribe(function(){return e.lazyContent.detach()},void 0,function(){t._resetMenu()}):this._resetMenu()):(this._resetMenu(),e.lazyContent&&e.lazyContent.detach())}},t.prototype._initMenu=function(){this.menu.parentMenu=this.triggersSubmenu()?this._parentMenu:void 0,this.menu.direction=this.dir,this._setMenuElevation(),this._setIsMenuOpen(!0),this.menu.focusFirstItem(this._openedByMouse?"mouse":"program")},t.prototype._setMenuElevation=function(){if(this.menu.setElevation){for(var t=0,e=this.menu.parentMenu;e;)t++,e=e.parentMenu;this.menu.setElevation(t)}},t.prototype._resetMenu=function(){this._setIsMenuOpen(!1),this._openedByMouse?this.triggersSubmenu()||this.focus("mouse"):this.focus(),this._openedByMouse=!1},t.prototype._setIsMenuOpen=function(t){this._menuOpen=t,this._menuOpen?this.menuOpened.emit():this.menuClosed.emit(),this.triggersSubmenu()&&(this._menuItemInstance._highlighted=t)},t.prototype._checkMenu=function(){this.menu||function(){throw Error('matMenuTriggerFor: must pass in an mat-menu instance.\n\n Example:\n <mat-menu #menu="matMenu"></mat-menu>\n <button [matMenuTriggerFor]="menu"></button>')}()},t.prototype._createOverlay=function(){if(!this._overlayRef){this._portal=new Dd(this.menu.templateRef,this._viewContainerRef);var t=this._getOverlayConfig();this._subscribeToPositions(t.positionStrategy),this._overlayRef=this._overlay.create(t)}return this._overlayRef},t.prototype._getOverlayConfig=function(){return new gf({positionStrategy:this._overlay.position().flexibleConnectedTo(this._element).withTransformOriginOn(".mat-menu-panel"),hasBackdrop:null==this.menu.hasBackdrop?!this.triggersSubmenu():this.menu.hasBackdrop,backdropClass:this.menu.backdropClass||"cdk-overlay-transparent-backdrop",scrollStrategy:this._scrollStrategy(),direction:this._dir})},t.prototype._subscribeToPositions=function(t){var e=this;this.menu.setPositionClasses&&t.positionChanges.subscribe(function(t){e.menu.setPositionClasses("start"===t.connectionPair.overlayX?"after":"before","top"===t.connectionPair.overlayY?"below":"above")})},t.prototype._setPosition=function(t){var e="before"===this.menu.xPosition?["end","start"]:["start","end"],n=e[0],i=e[1],r="above"===this.menu.yPosition?["bottom","top"]:["top","bottom"],o=r[0],s=r[1],a=[o,s],l=a[0],u=a[1],c=[n,i],h=c[0],p=c[1],d=0;this.triggersSubmenu()?(p=n="before"===this.menu.xPosition?"start":"end",i=h="end"===n?"start":"end",d="bottom"===o?8:-8):this.menu.overlapTrigger||(l="top"===o?"bottom":"top",u="top"===s?"bottom":"top"),t.withPositions([{originX:n,originY:l,overlayX:h,overlayY:o,offsetY:d},{originX:i,originY:l,overlayX:p,overlayY:o,offsetY:d},{originX:n,originY:u,overlayX:h,overlayY:s,offsetY:-d},{originX:i,originY:u,overlayX:p,overlayY:s,offsetY:-d}])},t.prototype._cleanUpSubscriptions=function(){this._closeSubscription.unsubscribe(),this._hoverSubscription.unsubscribe()},t.prototype._menuClosingActions=function(){var t=this,e=this._overlayRef.backdropClick(),n=this._overlayRef.detachments();return nt(e,this._parentMenu?this._parentMenu.closed:Eu(),this._parentMenu?this._parentMenu._hovered().pipe(Tu(function(e){return e!==t._menuItemInstance}),Tu(function(){return t._menuOpen})):Eu(),n)},t.prototype._handleMousedown=function(t){Bm(t)||(this._openedByMouse=!0,this.triggersSubmenu()&&t.preventDefault())},t.prototype._handleKeydown=function(t){var e=t.keyCode;this.triggersSubmenu()&&(39===e&&"ltr"===this.dir||37===e&&"rtl"===this.dir)&&this.openMenu()},t.prototype._handleClick=function(t){this.triggersSubmenu()?(t.stopPropagation(),this.openMenu()):this.toggleMenu()},t.prototype._handleHover=function(){var t=this;this.triggersSubmenu()&&(this._hoverSubscription=this._parentMenu._hovered().pipe(Tu(function(e){return e===t._menuItemInstance&&!e.disabled}),_w(0,vw)).subscribe(function(){t._openedByMouse=!0,t.menu instanceof Tw&&t.menu._isAnimating?t.menu._animationDone.pipe(lf(1),hf(t._parentMenu._hovered())).subscribe(function(){return t.openMenu()}):t.openMenu()}))},t}(),Pw=function(){},Dw=Sr({encapsulation:2,styles:[".mat-menu-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;max-height:calc(100vh - 48px);border-radius:2px;outline:0}.mat-menu-panel:not([class*=mat-elevation-z]){box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12)}@media screen and (-ms-high-contrast:active){.mat-menu-panel{outline:solid 1px}}.mat-menu-content:not(:empty){padding-top:8px;padding-bottom:8px}.mat-menu-item{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:0;border:none;-webkit-tap-highlight-color:transparent;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;line-height:48px;height:48px;padding:0 16px;text-align:left;text-decoration:none;max-width:100%;position:relative}.mat-menu-item::-moz-focus-inner{border:0}.mat-menu-item[disabled]{cursor:default}[dir=rtl] .mat-menu-item{text-align:right}.mat-menu-item .mat-icon{margin-right:16px;vertical-align:middle}.mat-menu-item .mat-icon svg{vertical-align:top}[dir=rtl] .mat-menu-item .mat-icon{margin-left:16px;margin-right:0}@media screen and (-ms-high-contrast:active){.mat-menu-item-highlighted,.mat-menu-item.cdk-keyboard-focused,.mat-menu-item.cdk-program-focused{outline:dotted 1px}}.mat-menu-item-submenu-trigger{padding-right:32px}.mat-menu-item-submenu-trigger::after{width:0;height:0;border-style:solid;border-width:5px 0 5px 5px;border-color:transparent transparent transparent currentColor;content:'';display:inline-block;position:absolute;top:50%;right:16px;transform:translateY(-50%)}[dir=rtl] .mat-menu-item-submenu-trigger{padding-right:16px;padding-left:32px}[dir=rtl] .mat-menu-item-submenu-trigger::after{right:auto;left:16px;transform:rotateY(180deg) translateY(-50%)}.mat-menu-panel.ng-animating .mat-menu-item-submenu-trigger{pointer-events:none}button.mat-menu-item{width:100%}.mat-menu-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}"],data:{animation:[{type:7,name:"transformMenu",definitions:[{type:0,name:"void",styles:{type:6,styles:{opacity:0,transform:"scale(0.01, 0.01)"},offset:null},options:void 0},{type:1,expr:"void => enter",animation:{type:2,steps:[{type:11,selector:".mat-menu-content",animation:{type:6,styles:{opacity:0},offset:null},options:null},{type:4,styles:{type:6,styles:{opacity:1,transform:"scale(1, 0.5)"},offset:null},timings:"100ms linear"},{type:3,steps:[{type:11,selector:".mat-menu-content",animation:{type:4,styles:{type:6,styles:{opacity:1},offset:null},timings:"400ms cubic-bezier(0.55, 0, 0.55, 0.2)"},options:null},{type:4,styles:{type:6,styles:{transform:"scale(1, 1)"},offset:null},timings:"300ms cubic-bezier(0.25, 0.8, 0.25, 1)"}],options:null}],options:null},options:null},{type:1,expr:"* => void",animation:{type:4,styles:{type:6,styles:{opacity:0},offset:null},timings:"150ms 50ms linear"},options:null}],options:{}},{type:7,name:"fadeInItems",definitions:[{type:0,name:"showing",styles:{type:6,styles:{opacity:1},offset:null},options:void 0},{type:1,expr:"void => *",animation:[{type:6,styles:{opacity:0},offset:null},{type:4,styles:null,timings:"400ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)"}],options:null}],options:{}}]}});function jw(t){return bs(0,[(t()(),to(0,0,null,null,3,"div",[["class","mat-menu-panel"],["role","menu"],["tabindex","-1"]],[[24,"@transformMenu",0]],[[null,"keydown"],[null,"click"],[null,"@transformMenu.start"],[null,"@transformMenu.done"]],function(t,e,n){var i=!0,r=t.component;return"keydown"===e&&(i=!1!==r._handleKeydown(n)&&i),"click"===e&&(i=!1!==r.closed.emit("click")&&i),"@transformMenu.start"===e&&(i=0!=(r._isAnimating=!0)&&i),"@transformMenu.done"===e&&(i=!1!==r._onAnimationDone(n)&&i),i},null,null)),Wo(1,278528,null,0,Bu,[Ei,Ti,ei,ti],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),(t()(),to(2,0,null,null,1,"div",[["class","mat-menu-content"]],null,null,null,null,null)),hs(null,0)],function(t,e){t(e,1,0,"mat-menu-panel",e.component._classList)},function(t,e){t(e,0,0,e.component._panelAnimationState)})}function Mw(t){return bs(2,[ss(402653184,1,{templateRef:0}),(t()(),$r(0,[[1,2]],null,0,null,jw))],null,null)}var Rw=Sr({encapsulation:2,styles:[],data:{}});function Fw(t){return bs(2,[hs(null,0),(t()(),to(1,0,null,null,1,"div",[["class","mat-menu-ripple mat-ripple"],["matRipple",""]],[[2,"mat-ripple-unbounded",null]],null,null,null,null)),Wo(2,212992,null,0,iv,[ei,An,Yd,[2,nv],[2,c_]],{disabled:[0,"disabled"],trigger:[1,"trigger"]},null)],function(t,e){var n=e.component;t(e,2,0,n.disableRipple||n.disabled,n._getHostElement())},function(t,e){t(e,1,0,Ao(e,2).unbounded)})}var Nw=function(){function t(t,e,n,i,r,o,s,a,l,u,c){this.history=t,this.config=e,this.zoom=n,this.panels=i,this.breakpoints=r,this.activeDrawer=o,this.importTool=s,this.exportTool=a,this.editorUi=l,this.canvas=u,this.floatingPanels=c,this.compactMode=!1}return t.prototype.ngAfterViewInit=function(){var t=this;this.canvas.state.loaded.pipe(_w(0)).subscribe(function(){t.floatingPanels.openSampleImagePanel()}),this.breakpoints.observe("(max-width: 768px)").subscribe(function(e){return t.compactMode=e.matches})},t.prototype.zoomIn=function(){this.zoom.set(this.zoom.get()+.05)},t.prototype.zoomOut=function(){this.zoom.set(this.zoom.get()-.05)},t.prototype.exportImage=function(t){this.exportTool.export(null,t)},t.prototype.openBackgroundImage=function(){var t=this;this.importTool.openUploadDialog({type:"image",backgroundImage:!0}).then(function(){t.history.add("changed: background Image","photo-library")})},t.prototype.openOverlayImage=function(){var t=this;this.importTool.openUploadDialog().then(function(e){e&&(t.canvas.fabric().setActiveObject(e),t.history.add("added: overlay Image","photo-library"))})},t.prototype.openStateFile=function(){this.importTool.openUploadDialog({type:"state"})},t.prototype.executeOpenButtonAction=function(){var t=this.config.get("pixie.ui.toolbar.openButtonAction");t?t():this.matMenuTrigger.toggleMenu()},t}(),Lw=function(){function t(t,e,n){this.state=t,this.pan=e,this.config=n,this.maxScale=2,this.minScale=.1,this.currentZoom=1}return t.prototype.get=function(){return this.currentZoom},t.prototype.getPercent=function(){return Math.floor(100*this.currentZoom)},t.prototype.set=function(t,e){if(void 0===e&&(e=!0),!(t<this.minScale||t>this.maxScale)){var n=this.state.original.width*t,i=this.state.original.height*t;this.state.fabric.setZoom(t),e&&(this.state.fabric.setHeight(i),this.state.fabric.setWidth(n)),this.currentZoom=t}},t.prototype.fitToScreen=function(){var t=this.state.calcWrapperSize(),e=t.width-40,n=t.height-40;if(this.state.original.height>n||this.state.original.width>e){var i=Math.min(n/this.state.original.height,e/this.state.original.width);this.set(i)}},t.prototype.init=function(){this.config.get("pixie.ui.allowZoom")&&(this.bindMouseWheel(),this.bindToPinchZoom())},t.prototype.bindMouseWheel=function(){var t=this;this.state.fabric.on("mouse:wheel",function(e){e.e.preventDefault(),e.e.stopPropagation(),t.set(e.e.deltaY<0?t.currentZoom+.05:t.currentZoom-.05),t.pan.set(),t.state.fabric.requestRenderAll()})},t.prototype.bindToPinchZoom=function(){var t=this,e=new Hammer.Manager(this.state.maskWrapperEl),n=new Hammer.Pinch;e.add([n]),e.on("pinch",function(e){var n=Math.abs(e.overallVelocity);t.set("pinchout"===e.additionalEvent?t.get()+n:t.get()-n),t.pan.set(),t.state.fabric.requestRenderAll()})},t}(),Bw=function(){function t(t,e,n,i){this.overlayPanel=t,this.state=e,this.openSampleImageDialog=n,this.breakpoints=i}return t.prototype.openSampleImagePanel=function(){this.openSampleImageDialog.open()},t.prototype.toggleHistory=function(){this.closePanel("objects"),this.panelIsOpen("history")?this.historyPanelRef.close():this.openHistoryPanel()},t.prototype.toggleObjects=function(){this.closePanel("history"),this.panelIsOpen("objects")?this.objectsPanelRef.close():this.openObjectsPanel()},t.prototype.openHistoryPanel=function(){this.historyPanelRef=this.overlayPanel.open(tw,this.getPanelConfig())},t.prototype.openObjectsPanel=function(){this.objectsPanelRef=this.overlayPanel.open(lw,this.getPanelConfig())},t.prototype.closePanel=function(t){switch(t){case"history":this.historyPanelRef&&this.historyPanelRef.close();break;case"objects":this.objectsPanelRef&&this.objectsPanelRef.close()}},t.prototype.panelIsOpen=function(t){var e="history"===t?this.historyPanelRef:this.objectsPanelRef;return e&&e.isOpen()},t.prototype.getPanelConfig=function(){return{hasBackdrop:!1,positionStrategy:this.getPositionStrategy(),panelClass:"floating-panel"}},t.prototype.getPositionStrategy=function(){return this.breakpoints.isMobile?this.overlayPanel.overlay.position().flexibleConnectedTo(new ei(this.state.wrapperEl)).withPositions([{overlayX:"center",overlayY:"center",originX:"center",originY:"center"}]):this.overlayPanel.overlay.position().flexibleConnectedTo(new ei(this.state.wrapperEl)).withPositions([{overlayX:"end",overlayY:"bottom",originX:"end",originY:"bottom",offsetY:-10,offsetX:-10}])},t}(),Vw=n("JEAp"),zw=n("RdDz"),Hw=function(){function t(t,e,n,i,r,o,s){this.canvas=t,this.cropzone=e,this.history=n,this.config=i,this.http=r,this.watermark=o,this.toast=s,this.defaultName=this.config.get("pixie.tools.export.defaultName"),this.defaultFormat=this.config.get("pixie.tools.export.defaultFormat"),this.defaultQuality=this.config.get("pixie.tools.export.defaultQuality")}return t.prototype.export=function(t,e,n){t||(t=this.defaultName),e||(e=this.defaultFormat),n||(n=this.defaultQuality);var i,r=t+"."+e;this.applyWaterMark(),i="json"===e?this.getJsonState():this.getDataUrl(e,n),this.watermark.remove(),i&&(this.config.has("pixie.saveUrl")?this.http.post(this.config.get("pixie.saveUrl"),{data:i,filename:r,format:e}).subscribe(function(){},function(){}):this.config.has("pixie.onSave")?this.config.get("pixie.onSave")(i,r,e):this.getCanvasBlob(e,i).then(function(t){Object(Vw.saveAs)(t,r)}))},t.prototype.getCanvasBlob=function(t,e){return new Promise(function(n){var i;if("json"===t)i=new Blob([e],{type:"application/json"});else{var r="image/"+t;e=e.replace("data:"+r+";base64,",""),i=zw(e,r)}n(i)})},t.prototype.getDataUrl=function(t,e){void 0===t&&(t=this.defaultFormat),void 0===e&&(e=this.defaultQuality),this.prepareCanvas();try{return this.canvas.fabric().toDataURL({format:t,quality:e,multiplier:this.canvas.state.original.width/this.canvas.fabric().getWidth()})}catch(t){if(-1===t.message.toLowerCase().indexOf("tainted"))return null;this.toast.open("Could not export canvas with external image.")}},t.prototype.getJsonState=function(){return JSON.stringify(this.history.getCurrentCanvasState())},t.prototype.prepareCanvas=function(){this.canvas.fabric().discardActiveObject(),this.canvas.pan.reset(),this.cropzone.remove()},t.prototype.applyWaterMark=function(){var t=this.config.get("pixie.watermarkText");t&&this.watermark.add(t)},t}(),Ww=Sr({encapsulation:2,styles:[["toolbar{display:flex;align-items:center;height:50px;padding:0 20px;color:#fff;background-color:#1976d2;position:relative;z-index:3;box-shadow:0 2px 1px -1px rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 1px 3px 0 rgba(0,0,0,.12)}toolbar .mobile-open-button,toolbar .open-button{position:relative}toolbar .mat-menu-trigger{display:block;position:absolute;left:-1px;bottom:-1px}toolbar>.center{display:flex;align-items:center;justify-content:center;width:140px;text-transform:capitalize}toolbar>.center .current{margin:0 8px}toolbar>.center .value{text-align:center}toolbar>.left{margin-right:auto}toolbar>.right{margin-left:auto}toolbar>.right .toggle-history-button{margin-left:40px}toolbar .drawer-name{font-size:1.5rem}toolbar .status-bar{height:30px;background-color:#1565c0;text-align:center;line-height:30px}toolbar .close-button{margin-left:25px}toolbar .open-button mat-icon{margin-right:5px}toolbar .export-button mat-icon{margin-right:2px}"]],data:{}});function Uw(t){return bs(0,[(t()(),to(0,0,null,null,8,"button",[["class","open-button"],["mat-button",""]],[[8,"disabled",0],[2,"_mat-animation-noopable",null]],[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.executeOpenButtonAction()&&i),i},d_,p_)),Wo(1,180224,null,0,qv,[ei,Yd,Lm,[2,c_]],null,null),(t()(),to(2,16777216,null,0,1,"span",[["aria-haspopup","true"],["class","mat-menu-trigger"]],[[1,"aria-expanded",0]],[[null,"mousedown"],[null,"keydown"],[null,"click"]],function(t,e,n){var i=!0;return"mousedown"===e&&(i=!1!==Ao(t,3)._handleMousedown(n)&&i),"keydown"===e&&(i=!1!==Ao(t,3)._handleKeydown(n)&&i),"click"===e&&(i=!1!==Ao(t,3)._handleClick(n)&&i),i},null,null)),Wo(3,1196032,[[1,4]],0,Aw,[Mf,ei,ri,Ow,[2,Tw],[8,null],[2,km],Lm],{menu:[0,"menu"]},null),(t()(),to(4,0,null,0,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","photo-library"]],[[2,"mat-icon-inline",null]],null,null,Tv,Ev)),Wo(5,638976,null,0,Sv,[ei,_v,[8,null]],{svgIcon:[0,"svgIcon"]},null),(t()(),to(6,0,null,0,2,"span",[["class","name"],["trans",""]],null,null,null,null,null)),Wo(7,4341760,null,0,lv,[ei,uv,wu],null,null),(t()(),ms(-1,null,["Open"]))],function(t,e){t(e,3,0,Ao(e.parent.parent,6)),t(e,5,0,"photo-library")},function(t,e){t(e,0,0,Ao(e,1).disabled||null,"NoopAnimations"===Ao(e,1)._animationMode),t(e,2,0,Ao(e,3).menuOpen||null),t(e,4,0,Ao(e,5).inline)})}function Xw(t){return bs(0,[(t()(),to(0,0,null,null,6,"button",[["class","export-button"],["mat-button",""]],[[8,"disabled",0],[2,"_mat-animation-noopable",null]],[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.exportImage()&&i),i},d_,p_)),Wo(1,180224,null,0,qv,[ei,Yd,Lm,[2,c_]],null,null),(t()(),to(2,0,null,0,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","file-download"]],[[2,"mat-icon-inline",null]],null,null,Tv,Ev)),Wo(3,638976,null,0,Sv,[ei,_v,[8,null]],{svgIcon:[0,"svgIcon"]},null),(t()(),to(4,0,null,0,2,"span",[["class","name"],["trans",""]],null,null,null,null,null)),Wo(5,4341760,null,0,lv,[ei,uv,wu],null,null),(t()(),ms(-1,null,["Save"]))],function(t,e){t(e,3,0,"file-download")},function(t,e){t(e,0,0,Ao(e,1).disabled||null,"NoopAnimations"===Ao(e,1)._animationMode),t(e,2,0,Ao(e,3).inline)})}function Yw(t){return bs(0,[(t()(),to(0,0,null,null,14,"div",[["class","center"]],null,null,null,null,null)),(t()(),to(1,0,null,null,3,"button",[["mat-icon-button",""]],[[8,"disabled",0],[2,"_mat-animation-noopable",null]],[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.zoomOut()&&i),i},d_,p_)),Wo(2,180224,null,0,qv,[ei,Yd,Lm,[2,c_]],null,null),(t()(),to(3,0,null,0,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","remove"]],[[2,"mat-icon-inline",null]],null,null,Tv,Ev)),Wo(4,638976,null,0,Sv,[ei,_v,[8,null]],{svgIcon:[0,"svgIcon"]},null),(t()(),to(5,0,null,null,5,"div",[["class","current"]],null,null,null,null,null)),(t()(),to(6,0,null,null,2,"div",[["trans",""]],null,null,null,null,null)),Wo(7,4341760,null,0,lv,[ei,uv,wu],null,null),(t()(),ms(-1,null,["Zoom"])),(t()(),to(9,0,null,null,1,"div",[["class","value"]],null,null,null,null,null)),(t()(),ms(10,null,["","%"])),(t()(),to(11,0,null,null,3,"button",[["mat-icon-button",""]],[[8,"disabled",0],[2,"_mat-animation-noopable",null]],[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.zoomIn()&&i),i},d_,p_)),Wo(12,180224,null,0,qv,[ei,Yd,Lm,[2,c_]],null,null),(t()(),to(13,0,null,0,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","add"]],[[2,"mat-icon-inline",null]],null,null,Tv,Ev)),Wo(14,638976,null,0,Sv,[ei,_v,[8,null]],{svgIcon:[0,"svgIcon"]},null)],function(t,e){t(e,4,0,"remove"),t(e,14,0,"add")},function(t,e){var n=e.component;t(e,1,0,Ao(e,2).disabled||null,"NoopAnimations"===Ao(e,2)._animationMode),t(e,3,0,Ao(e,4).inline),t(e,10,0,n.zoom.getPercent()),t(e,11,0,Ao(e,12).disabled||null,"NoopAnimations"===Ao(e,12)._animationMode),t(e,13,0,Ao(e,14).inline)})}function qw(t){return bs(0,[(t()(),to(0,0,null,null,3,"button",[["class","close-button"],["mat-icon-button",""]],[[8,"disabled",0],[2,"_mat-animation-noopable",null]],[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.editorUi.close()&&i),i},d_,p_)),Wo(1,180224,null,0,qv,[ei,Yd,Lm,[2,c_]],null,null),(t()(),to(2,0,null,0,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","close"]],[[2,"mat-icon-inline",null]],null,null,Tv,Ev)),Wo(3,638976,null,0,Sv,[ei,_v,[8,null]],{svgIcon:[0,"svgIcon"]},null)],function(t,e){t(e,3,0,"close")},function(t,e){t(e,0,0,Ao(e,1).disabled||null,"NoopAnimations"===Ao(e,1)._animationMode),t(e,2,0,Ao(e,3).inline)})}function Gw(t){return bs(0,[(t()(),to(0,0,null,null,26,null,null,null,null,null,null,null)),(t()(),to(1,0,null,null,4,"div",[["class","left"]],null,null,null,null,null)),(t()(),$r(16777216,null,null,1,null,Uw)),Wo(3,16384,null,0,Wu,[ri,ii],{ngIf:[0,"ngIf"]},null),(t()(),$r(16777216,null,null,1,null,Xw)),Wo(5,16384,null,0,Wu,[ri,ii],{ngIf:[0,"ngIf"]},null),(t()(),$r(16777216,null,null,1,null,Yw)),Wo(7,16384,null,0,Wu,[ri,ii],{ngIf:[0,"ngIf"]},null),(t()(),to(8,0,null,null,18,"div",[["class","right"]],null,null,null,null,null)),(t()(),to(9,0,null,null,3,"button",[["mat-icon-button",""]],[[8,"disabled",0],[2,"_mat-animation-noopable",null]],[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.history.undo()&&i),i},d_,p_)),Wo(10,180224,null,0,qv,[ei,Yd,Lm,[2,c_]],{disabled:[0,"disabled"]},null),(t()(),to(11,0,null,0,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","undo"]],[[2,"mat-icon-inline",null]],null,null,Tv,Ev)),Wo(12,638976,null,0,Sv,[ei,_v,[8,null]],{svgIcon:[0,"svgIcon"]},null),(t()(),to(13,0,null,null,3,"button",[["mat-icon-button",""]],[[8,"disabled",0],[2,"_mat-animation-noopable",null]],[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.history.redo()&&i),i},d_,p_)),Wo(14,180224,null,0,qv,[ei,Yd,Lm,[2,c_]],{disabled:[0,"disabled"]},null),(t()(),to(15,0,null,0,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","redo"]],[[2,"mat-icon-inline",null]],null,null,Tv,Ev)),Wo(16,638976,null,0,Sv,[ei,_v,[8,null]],{svgIcon:[0,"svgIcon"]},null),(t()(),to(17,0,null,null,3,"button",[["class","toggle-history-button"],["mat-icon-button",""]],[[8,"disabled",0],[2,"_mat-animation-noopable",null]],[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.panels.toggleHistory()&&i),i},d_,p_)),Wo(18,180224,null,0,qv,[ei,Yd,Lm,[2,c_]],null,null),(t()(),to(19,0,null,0,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","history"]],[[2,"mat-icon-inline",null]],null,null,Tv,Ev)),Wo(20,638976,null,0,Sv,[ei,_v,[8,null]],{svgIcon:[0,"svgIcon"]},null),(t()(),to(21,0,null,null,3,"button",[["mat-icon-button",""]],[[8,"disabled",0],[2,"_mat-animation-noopable",null]],[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.panels.toggleObjects()&&i),i},d_,p_)),Wo(22,180224,null,0,qv,[ei,Yd,Lm,[2,c_]],null,null),(t()(),to(23,0,null,0,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","layers"]],[[2,"mat-icon-inline",null]],null,null,Tv,Ev)),Wo(24,638976,null,0,Sv,[ei,_v,[8,null]],{svgIcon:[0,"svgIcon"]},null),(t()(),$r(16777216,null,null,1,null,qw)),Wo(26,16384,null,0,Wu,[ri,ii],{ngIf:[0,"ngIf"]},null)],function(t,e){var n=e.component;t(e,3,0,!n.config.get("pixie.ui.toolbar.hideOpenButton")),t(e,5,0,!n.config.get("pixie.ui.toolbar.hideSaveButton")),t(e,7,0,n.config.get("pixie.ui.allowZoom")),t(e,10,0,!n.history.canUndo()),t(e,12,0,"undo"),t(e,14,0,!n.history.canRedo()),t(e,16,0,"redo"),t(e,20,0,"history"),t(e,24,0,"layers"),t(e,26,0,n.editorUi.isOverlayMode()||!n.config.get("pixie.ui.toolbar.hideCloseButton"))},function(t,e){t(e,9,0,Ao(e,10).disabled||null,"NoopAnimations"===Ao(e,10)._animationMode),t(e,11,0,Ao(e,12).inline),t(e,13,0,Ao(e,14).disabled||null,"NoopAnimations"===Ao(e,14)._animationMode),t(e,15,0,Ao(e,16).inline),t(e,17,0,Ao(e,18).disabled||null,"NoopAnimations"===Ao(e,18)._animationMode),t(e,19,0,Ao(e,20).inline),t(e,21,0,Ao(e,22).disabled||null,"NoopAnimations"===Ao(e,22)._animationMode),t(e,23,0,Ao(e,24).inline)})}function Kw(t){return bs(0,[(t()(),to(0,0,null,null,3,"button",[["mat-icon-button",""]],[[8,"disabled",0],[2,"_mat-animation-noopable",null]],[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.activeDrawer.close()&&i),i},d_,p_)),Wo(1,180224,null,0,qv,[ei,Yd,Lm,[2,c_]],null,null),(t()(),to(2,0,null,0,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","close"]],[[2,"mat-icon-inline",null]],null,null,Tv,Ev)),Wo(3,638976,null,0,Sv,[ei,_v,[8,null]],{svgIcon:[0,"svgIcon"]},null)],function(t,e){t(e,3,0,"close")},function(t,e){t(e,0,0,Ao(e,1).disabled||null,"NoopAnimations"===Ao(e,1)._animationMode),t(e,2,0,Ao(e,3).inline)})}function Zw(t){return bs(0,[(t()(),to(0,0,null,null,5,"button",[["class","mobile-open-button"],["mat-icon-button",""]],[[8,"disabled",0],[2,"_mat-animation-noopable",null]],[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.executeOpenButtonAction()&&i),i},d_,p_)),Wo(1,180224,null,0,qv,[ei,Yd,Lm,[2,c_]],null,null),(t()(),to(2,16777216,null,0,1,"span",[["aria-haspopup","true"],["class","mat-menu-trigger"]],[[1,"aria-expanded",0]],[[null,"mousedown"],[null,"keydown"],[null,"click"]],function(t,e,n){var i=!0;return"mousedown"===e&&(i=!1!==Ao(t,3)._handleMousedown(n)&&i),"keydown"===e&&(i=!1!==Ao(t,3)._handleKeydown(n)&&i),"click"===e&&(i=!1!==Ao(t,3)._handleClick(n)&&i),i},null,null)),Wo(3,1196032,[[1,4]],0,Aw,[Mf,ei,ri,Ow,[2,Tw],[8,null],[2,km],Lm],{menu:[0,"menu"]},null),(t()(),to(4,0,null,0,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","photo-library"]],[[2,"mat-icon-inline",null]],null,null,Tv,Ev)),Wo(5,638976,null,0,Sv,[ei,_v,[8,null]],{svgIcon:[0,"svgIcon"]},null)],function(t,e){t(e,3,0,Ao(e.parent.parent,6)),t(e,5,0,"photo-library")},function(t,e){t(e,0,0,Ao(e,1).disabled||null,"NoopAnimations"===Ao(e,1)._animationMode),t(e,2,0,Ao(e,3).menuOpen||null),t(e,4,0,Ao(e,5).inline)})}function Qw(t){return bs(0,[(t()(),to(0,0,null,null,1,"span",[],null,null,null,null,null)),(t()(),ms(1,null,["",""]))],null,function(t,e){t(e,1,0,e.component.activeDrawer.getDisplayName())})}function Jw(t){return bs(0,[(t()(),to(0,0,null,null,2,"span",[["trans",""]],null,null,null,null,null)),Wo(1,4341760,null,0,lv,[ei,uv,wu],null,null),(t()(),ms(-1,null,["Editor"]))],null,null)}function $w(t){return bs(0,[(t()(),to(0,0,null,null,3,"button",[["mat-icon-button",""]],[[8,"disabled",0],[2,"_mat-animation-noopable",null]],[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.activeDrawer.apply()&&i),i},d_,p_)),Wo(1,180224,null,0,qv,[ei,Yd,Lm,[2,c_]],null,null),(t()(),to(2,0,null,0,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","check"]],[[2,"mat-icon-inline",null]],null,null,Tv,Ev)),Wo(3,638976,null,0,Sv,[ei,_v,[8,null]],{svgIcon:[0,"svgIcon"]},null)],function(t,e){t(e,3,0,"check")},function(t,e){t(e,0,0,Ao(e,1).disabled||null,"NoopAnimations"===Ao(e,1)._animationMode),t(e,2,0,Ao(e,3).inline)})}function tx(t){return bs(0,[(t()(),to(0,0,null,null,3,"button",[["mat-icon-button",""]],[[8,"disabled",0],[2,"_mat-animation-noopable",null]],[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.exportImage()&&i),i},d_,p_)),Wo(1,180224,null,0,qv,[ei,Yd,Lm,[2,c_]],null,null),(t()(),to(2,0,null,0,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","file-download"]],[[2,"mat-icon-inline",null]],null,null,Tv,Ev)),Wo(3,638976,null,0,Sv,[ei,_v,[8,null]],{svgIcon:[0,"svgIcon"]},null)],function(t,e){t(e,3,0,"file-download")},function(t,e){t(e,0,0,Ao(e,1).disabled||null,"NoopAnimations"===Ao(e,1)._animationMode),t(e,2,0,Ao(e,3).inline)})}function ex(t){return bs(0,[(t()(),to(0,0,null,null,15,null,null,null,null,null,null,null)),(t()(),to(1,0,null,null,4,"div",[["class","left"]],null,null,null,null,null)),(t()(),$r(16777216,null,null,1,null,Kw)),Wo(3,16384,null,0,Wu,[ri,ii],{ngIf:[0,"ngIf"]},null),(t()(),$r(16777216,null,null,1,null,Zw)),Wo(5,16384,null,0,Wu,[ri,ii],{ngIf:[0,"ngIf"]},null),(t()(),to(6,0,null,null,4,"div",[["class","center drawer-name"]],null,null,null,null,null)),(t()(),$r(16777216,null,null,1,null,Qw)),Wo(8,16384,null,0,Wu,[ri,ii],{ngIf:[0,"ngIf"]},null),(t()(),$r(16777216,null,null,1,null,Jw)),Wo(10,16384,null,0,Wu,[ri,ii],{ngIf:[0,"ngIf"]},null),(t()(),to(11,0,null,null,4,"div",[["class","right"]],null,null,null,null,null)),(t()(),$r(16777216,null,null,1,null,$w)),Wo(13,16384,null,0,Wu,[ri,ii],{ngIf:[0,"ngIf"]},null),(t()(),$r(16777216,null,null,1,null,tx)),Wo(15,16384,null,0,Wu,[ri,ii],{ngIf:[0,"ngIf"]},null)],function(t,e){var n=e.component;t(e,3,0,n.activeDrawer.isOpen()),t(e,5,0,!n.activeDrawer.isOpen()),t(e,8,0,n.activeDrawer.isOpen()),t(e,10,0,!n.activeDrawer.isOpen()),t(e,13,0,n.activeDrawer.isOpen()),t(e,15,0,!n.activeDrawer.isOpen())},null)}function nx(t){return bs(0,[ss(671088640,1,{matMenuTrigger:0}),(t()(),$r(16777216,null,null,1,null,Gw)),Wo(2,16384,null,0,Wu,[ri,ii],{ngIf:[0,"ngIf"]},null),(t()(),$r(16777216,null,null,1,null,ex)),Wo(4,16384,null,0,Wu,[ri,ii],{ngIf:[0,"ngIf"]},null),(t()(),to(5,0,null,null,16,"mat-menu",[],null,null,null,Mw,Dw)),Wo(6,1294336,[["openMenu",4]],2,Tw,[ei,An,Ew],{overlapTrigger:[0,"overlapTrigger"]},null),ss(603979776,2,{items:1}),ss(335544320,3,{lazyContent:0}),Xo(2048,null,Sw,null,[Tw]),(t()(),to(10,0,null,0,3,"button",[["class","mat-menu-item"],["mat-menu-item",""],["role","menuitem"],["trans",""]],[[2,"mat-menu-item-highlighted",null],[2,"mat-menu-item-submenu-trigger",null],[1,"tabindex",0],[1,"aria-disabled",0],[1,"disabled",0]],[[null,"click"],[null,"mouseenter"]],function(t,e,n){var i=!0,r=t.component;return"click"===e&&(i=!1!==Ao(t,12)._checkDisabled(n)&&i),"mouseenter"===e&&(i=!1!==Ao(t,12)._handleMouseEnter()&&i),"click"===e&&(i=!1!==r.openBackgroundImage()&&i),i},Fw,Rw)),Wo(11,4341760,null,0,lv,[ei,uv,wu],null,null),Wo(12,180224,[[2,4]],0,kw,[ei,tc,Lm,[2,Sw]],null,null),(t()(),ms(-1,0,["Background Image"])),(t()(),to(14,0,null,0,3,"button",[["class","mat-menu-item"],["mat-menu-item",""],["role","menuitem"],["trans",""]],[[2,"mat-menu-item-highlighted",null],[2,"mat-menu-item-submenu-trigger",null],[1,"tabindex",0],[1,"aria-disabled",0],[1,"disabled",0]],[[null,"click"],[null,"mouseenter"]],function(t,e,n){var i=!0,r=t.component;return"click"===e&&(i=!1!==Ao(t,16)._checkDisabled(n)&&i),"mouseenter"===e&&(i=!1!==Ao(t,16)._handleMouseEnter()&&i),"click"===e&&(i=!1!==r.openOverlayImage()&&i),i},Fw,Rw)),Wo(15,4341760,null,0,lv,[ei,uv,wu],null,null),Wo(16,180224,[[2,4]],0,kw,[ei,tc,Lm,[2,Sw]],null,null),(t()(),ms(-1,0,["Overlay Image"])),(t()(),to(18,0,null,0,3,"button",[["class","mat-menu-item"],["mat-menu-item",""],["role","menuitem"],["trans",""]],[[2,"mat-menu-item-highlighted",null],[2,"mat-menu-item-submenu-trigger",null],[1,"tabindex",0],[1,"aria-disabled",0],[1,"disabled",0]],[[null,"click"],[null,"mouseenter"]],function(t,e,n){var i=!0,r=t.component;return"click"===e&&(i=!1!==Ao(t,20)._checkDisabled(n)&&i),"mouseenter"===e&&(i=!1!==Ao(t,20)._handleMouseEnter()&&i),"click"===e&&(i=!1!==r.openStateFile()&&i),i},Fw,Rw)),Wo(19,4341760,null,0,lv,[ei,uv,wu],null,null),Wo(20,180224,[[2,4]],0,kw,[ei,tc,Lm,[2,Sw]],null,null),(t()(),ms(-1,0,["Editor Project File"]))],function(t,e){var n=e.component;t(e,2,0,!n.compactMode),t(e,4,0,n.compactMode),t(e,6,0,!1)},function(t,e){t(e,10,0,Ao(e,12)._highlighted,Ao(e,12)._triggersSubmenu,Ao(e,12)._getTabIndex(),Ao(e,12).disabled.toString(),Ao(e,12).disabled||null),t(e,14,0,Ao(e,16)._highlighted,Ao(e,16)._triggersSubmenu,Ao(e,16)._getTabIndex(),Ao(e,16).disabled.toString(),Ao(e,16).disabled||null),t(e,18,0,Ao(e,20)._highlighted,Ao(e,20)._triggersSubmenu,Ao(e,20)._getTabIndex(),Ao(e,20).disabled.toString(),Ao(e,20).disabled||null)})}var ix=function(){function t(t,e,n,i,r,o,s,a){this.controls=t,this.canvas=e,this.saveTool=n,this.config=i,this.mergeTool=r,this.history=o,this.editorUi=s,this.toast=a}return t.prototype.executeNavItemAction=function(t){return"merge"===t.action?this.merge():"string"==typeof t.action?this.controls.togglePanel(t.action):void("function"==typeof t.action&&t.action())},t.prototype.navItemIsDisabled=function(t){var e=!!this.canvas.getMainImage();return"merge"===t.name?!this.mergeTool.canMerge():"transform"===t.name?!e:"background"===t.name&&e},t.prototype.merge=function(){var t=this;this.mergeTool.apply().then(function(){t.history.add("objects: merged",t.controls.getIconName("merge")),t.toast.open("Objects merged.")})},t}(),rx=function(){function t(t,e,n,i,r){this.activeObject=t,this.canvas=e,this.saveTool=n,this.objects=i,this.activeFrame=r}return t.prototype.canMerge=function(){return this.objects.getAll().length>1},t.prototype.apply=function(){var t=this;return new Promise(function(e){return n=t,void 0,r=function(){var t;return function(t,e){var n,i,r,o,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,i&&(r=2&o[0]?i.return:o[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,o[1])).done)return r;switch(i=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,i=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(r=(r=s.trys).length>0&&r[r.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){s.label=o[1];break}if(6===o[0]&&s.label<r[1]){s.label=r[1],r=o;break}if(r&&s.label<r[2]){s.label=r[2],s.ops.push(o);break}r[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],i=0}finally{n=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}}(this,function(n){switch(n.label){case 0:return t=this.saveTool.getDataUrl(),this.clearCanvas(),[4,this.canvas.loadMainImage(t)];case 1:return n.sent(),e(),[2]}})},new((i=void 0)||(i=Promise))(function(t,e){function o(t){try{a(r.next(t))}catch(t){e(t)}}function s(t){try{a(r.throw(t))}catch(t){e(t)}}function a(e){e.done?t(e.value):new i(function(t){t(e.value)}).then(o,s)}a((r=r.apply(n,[])).next())});var n,i,r})},t.prototype.clearCanvas=function(){this.activeFrame.remove(),this.canvas.fabric().clear()},t}(),ox=function(){function t(t,e,n){this.settings=t,this.i18n=e,this.snackbar=n}return t.prototype.open=function(t,e){return void 0===e&&(e={}),e.duration||0===e.duration||(e.duration=this.settings.get("toast.default_timeout",3e3)),this.snackbar.open(this.i18n.t(t),this.i18n.t(e.action),{duration:e.duration})},t.prototype.openComponent=function(t,e){return this.snackbar.openFromComponent(t,e)},t.ngInjectableDef=vt({factory:function(){return new t(pe(wu),pe(uv),pe(Wv))},token:t,providedIn:"root"}),t}(),sx=Sr({encapsulation:2,styles:[["navigation-bar{display:block;width:100%;height:100%;padding:0 12px}navigation-bar .scroll-container{display:flex;align-items:center;justify-content:center;width:100%;height:100%;position:relative;overflow-x:auto;overflow-y:hidden;white-space:nowrap}@media only screen and (max-width:1065px){navigation-bar .scroll-container{justify-content:flex-start}navigation-bar .scroll-container .separator{display:none}}navigation-bar .control-button{text-align:center;margin:0 12px}navigation-bar .control-button[disabled]{opacity:.4;cursor:default}navigation-bar .control-button>mat-icon{width:38px;height:38px;margin:0 auto;color:rgba(0,0,0,.75)}navigation-bar .control-button>.name{display:block;margin-top:6px;text-transform:uppercase;font-size:1.3rem}navigation-bar .separator{height:75px;width:1px;flex:0 0 1px;background-color:rgba(0,0,0,.07);margin:0 20px}"]],data:{}});function ax(t){return bs(0,[(t()(),to(0,0,null,null,0,"div",[["class","separator"]],null,null,null,null,null))],null,null)}function lx(t){return bs(0,[(t()(),to(0,0,null,null,5,"button",[["class","no-style control-button"]],[[8,"disabled",0]],[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.executeNavItemAction(t.parent.context.$implicit)&&i),i},null,null)),(t()(),to(1,0,null,null,1,"mat-icon",[["class","mat-icon"],["role","img"]],[[2,"mat-icon-inline",null]],null,null,Tv,Ev)),Wo(2,638976,null,0,Sv,[ei,_v,[8,null]],{svgIcon:[0,"svgIcon"]},null),(t()(),to(3,0,null,null,2,"span",[["class","name"],["trans",""]],null,null,null,null,null)),Wo(4,4341760,null,0,lv,[ei,uv,wu],null,null),(t()(),ms(5,null,["",""]))],function(t,e){t(e,2,0,e.parent.context.$implicit.icon)},function(t,e){t(e,0,0,e.component.navItemIsDisabled(e.parent.context.$implicit)),t(e,1,0,Ao(e,2).inline),t(e,5,0,e.parent.context.$implicit.display_name||e.parent.context.$implicit.name)})}function ux(t){return bs(0,[(t()(),to(0,0,null,null,4,null,null,null,null,null,null,null)),(t()(),$r(16777216,null,null,1,null,ax)),Wo(2,16384,null,0,Wu,[ri,ii],{ngIf:[0,"ngIf"]},null),(t()(),$r(16777216,null,null,1,null,lx)),Wo(4,16384,null,0,Wu,[ri,ii],{ngIf:[0,"ngIf"]},null),(t()(),$r(0,null,null,0))],function(t,e){t(e,2,0,"separator"===e.context.$implicit.type),t(e,4,0,"separator"!==e.context.$implicit.type)},null)}function cx(t){return bs(0,[(t()(),to(0,0,null,null,3,"div",[["class","scroll-container"],["customScrollbar",""]],null,null,null,null,null)),Wo(1,4341760,null,0,J_,[ei,ti,Kf,An,_m,wu,$_],{suppressX:[0,"suppressX"]},null),(t()(),$r(16777216,null,null,1,null,ux)),Wo(3,278528,null,0,zu,[ri,ii,Ei],{ngForOf:[0,"ngForOf"]},null)],function(t,e){var n=e.component;t(e,1,0,!1),t(e,3,0,n.editorUi.getNavItems())},null)}var hx=[{originX:"center",originY:"bottom",overlayX:"center",overlayY:"top",offsetY:5},{originX:"center",originY:"top",overlayX:"center",overlayY:"bottom"}],px=function(){function t(t,e){this.overlayPanel=t,this.config=e,this.compact=!1,this.selectedColor="#000",this.colors=this.config.get("pixie.ui.colorPresets.items")}return t.prototype.changeColor=function(t){this.selectedColor=t,this.propagateChange(t)},t.prototype.openColorPicker=function(){var t=this;this.overlayPanel.open(Zg,{position:hx,hasBackdrop:!0,origin:this.colorPickerButton}).valueChanged().subscribe(function(e){return t.changeColor(e)})},t.prototype.writeValue=function(t){this.selectedColor=t},t.prototype.registerOnChange=function(t){this.propagateChange=t},t.prototype.registerOnTouched=function(){},t}(),dx=Sr({encapsulation:2,styles:[["color-widget{display:block;margin:0 25px}color-widget.compact .round-action-button{width:40px;height:40px;line-height:40px;margin-right:10px}color-widget.compact .round-action-button mat-icon{width:30px;height:30px}color-widget .round-action-button{margin-right:15px}color-widget .colors{display:flex;align-items:center;width:358px;overflow:hidden}color-widget button.color{width:25px;height:25px;flex:0 0 25px;border:1px solid #e0e0e0;border-radius:50%;margin:0 5px;transition:box-shadow 225ms;position:relative;z-index:2}color-widget button.color.selected{border-color:transparent;box-shadow:0 3px 5px -1px rgba(0,0,0,.2),0 5px 8px 0 rgba(0,0,0,.14),0 1px 14px 0 rgba(0,0,0,.12)}"]],data:{}});function fx(t){return bs(0,[(t()(),to(0,0,null,null,0,"button",[["class","no-style color control"]],[[4,"background",null],[2,"selected",null]],[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.changeColor(t.context.$implicit)&&i),i},null,null))],null,function(t,e){t(e,0,0,e.context.$implicit,e.component.selectedColor===e.context.$implicit)})}function gx(t){return bs(0,[ss(402653184,1,{colorPickerButton:0}),(t()(),to(1,0,null,null,6,"div",[["class","colors"]],null,null,null,null,null)),(t()(),to(2,0,[[1,0]],null,3,"button",[["class","round-action-button color-picker-button"],["mat-icon-button",""]],[[8,"disabled",0],[2,"_mat-animation-noopable",null]],[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.openColorPicker()&&i),i},d_,p_)),Wo(3,180224,[["colorPickerButton",4]],0,qv,[ei,Yd,Lm,[2,c_]],null,null),(t()(),to(4,0,null,0,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","color-wheel-custom"]],[[2,"mat-icon-inline",null]],null,null,Tv,Ev)),Wo(5,638976,null,0,Sv,[ei,_v,[8,null]],{svgIcon:[0,"svgIcon"]},null),(t()(),$r(16777216,null,null,1,null,fx)),Wo(7,278528,null,0,zu,[ri,ii,Ei],{ngForOf:[0,"ngForOf"]},null),(t()(),to(8,0,null,null,2,"div",[["class","bottom-label"],["trans",""]],null,null,null,null,null)),Wo(9,4341760,null,0,lv,[ei,uv,wu],null,null),hs(null,0)],function(t,e){var n=e.component;t(e,5,0,"color-wheel-custom"),t(e,7,0,n.colors)},function(t,e){t(e,2,0,Ao(e,3).disabled||null,"NoopAnimations"===Ao(e,3)._animationMode),t(e,4,0,Ao(e,5).inline)})}var mx=function(t){function e(e,n,i,r,o,s){var a=t.call(this,e)||this;return a._focusMonitor=n,a._changeDetectorRef=i,a._dir=r,a._animationMode=s,a._invert=!1,a._max=100,a._min=0,a._step=1,a._thumbLabel=!1,a._tickInterval=0,a._value=null,a._vertical=!1,a.change=new In,a.input=new In,a.valueChange=new In,a.onTouched=function(){},a._percent=0,a._isSliding=!1,a._isActive=!1,a._tickIntervalPercent=0,a._sliderDimensions=null,a._controlValueAccessorChangeFn=function(){},a._dirChangeSubscription=k.EMPTY,a.tabIndex=parseInt(o)||0,a}return r(e,t),Object.defineProperty(e.prototype,"invert",{get:function(){return this._invert},set:function(t){this._invert=Vd(t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"max",{get:function(){return this._max},set:function(t){this._max=zd(t,this._max),this._percent=this._calculatePercentage(this._value),this._changeDetectorRef.markForCheck()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"min",{get:function(){return this._min},set:function(t){this._min=zd(t,this._min),null===this._value&&(this.value=this._min),this._percent=this._calculatePercentage(this._value),this._changeDetectorRef.markForCheck()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"step",{get:function(){return this._step},set:function(t){this._step=zd(t,this._step),this._step%1!=0&&(this._roundToDecimal=this._step.toString().split(".").pop().length),this._changeDetectorRef.markForCheck()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"thumbLabel",{get:function(){return this._thumbLabel},set:function(t){this._thumbLabel=Vd(t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tickInterval",{get:function(){return this._tickInterval},set:function(t){this._tickInterval="auto"===t?"auto":"number"==typeof t||"string"==typeof t?zd(t,this._tickInterval):0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return null===this._value&&(this.value=this._min),this._value},set:function(t){if(t!==this._value){var e=zd(t);this._roundToDecimal&&(e=parseFloat(e.toFixed(this._roundToDecimal))),this._value=e,this._percent=this._calculatePercentage(this._value),this._changeDetectorRef.markForCheck()}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"vertical",{get:function(){return this._vertical},set:function(t){this._vertical=Vd(t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"displayValue",{get:function(){return this.displayWith?this.displayWith(this.value):this._roundToDecimal&&this.value&&this.value%1!=0?this.value.toFixed(this._roundToDecimal):this.value||0},enumerable:!0,configurable:!0}),e.prototype.focus=function(){this._focusHostElement()},e.prototype.blur=function(){this._blurHostElement()},Object.defineProperty(e.prototype,"percent",{get:function(){return this._clamp(this._percent)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_invertAxis",{get:function(){return this.vertical?!this.invert:this.invert},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_isMinValue",{get:function(){return 0===this.percent},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_thumbGap",{get:function(){return this.disabled?7:this._isMinValue&&!this.thumbLabel?this._isActive?10:7:0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_trackBackgroundStyles",{get:function(){return{transform:"translate"+(this.vertical?"Y":"X")+"("+(this._invertMouseCoords?"-":"")+this._thumbGap+"px) scale3d("+(this.vertical?"1, "+(1-this.percent)+", 1":1-this.percent+", 1, 1")+")"}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_trackFillStyles",{get:function(){return{transform:"translate"+(this.vertical?"Y":"X")+"("+(this._invertMouseCoords?"":"-")+this._thumbGap+"px) scale3d("+(this.vertical?"1, "+this.percent+", 1":this.percent+", 1, 1")+")"}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_ticksContainerStyles",{get:function(){return{transform:"translate"+(this.vertical?"Y":"X")+"("+(this.vertical||"rtl"!=this._direction?"-":"")+this._tickIntervalPercent/2*100+"%)"}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_ticksStyles",{get:function(){var t=100*this._tickIntervalPercent,e={backgroundSize:this.vertical?"2px "+t+"%":t+"% 2px",transform:"translateZ(0) translate"+(this.vertical?"Y":"X")+"("+(this.vertical||"rtl"!=this._direction?"":"-")+t/2+"%)"+(this.vertical||"rtl"!=this._direction?"":" rotate(180deg)")};return this._isMinValue&&this._thumbGap&&(e["padding"+(this.vertical?this._invertAxis?"Bottom":"Top":this._invertAxis?"Right":"Left")]=this._thumbGap+"px"),e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_thumbContainerStyles",{get:function(){return{transform:"translate"+(this.vertical?"Y":"X")+"(-"+100*(("rtl"!=this._direction||this.vertical?this._invertAxis:!this._invertAxis)?this.percent:1-this.percent)+"%)"}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_invertMouseCoords",{get:function(){return"rtl"!=this._direction||this.vertical?this._invertAxis:!this._invertAxis},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_direction",{get:function(){return this._dir&&"rtl"==this._dir.value?"rtl":"ltr"},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){var t=this;this._focusMonitor.monitor(this._elementRef.nativeElement,!0).subscribe(function(e){t._isActive=!!e&&"keyboard"!==e,t._changeDetectorRef.detectChanges()}),this._dir&&(this._dirChangeSubscription=this._dir.change.subscribe(function(){t._changeDetectorRef.markForCheck()}))},e.prototype.ngOnDestroy=function(){this._focusMonitor.stopMonitoring(this._elementRef.nativeElement),this._dirChangeSubscription.unsubscribe()},e.prototype._onMouseenter=function(){this.disabled||(this._sliderDimensions=this._getSliderDimensions(),this._updateTickIntervalPercent())},e.prototype._onClick=function(t){if(!this.disabled){var e=this.value;this._isSliding=!1,this._focusHostElement(),this._updateValueFromPosition({x:t.clientX,y:t.clientY}),e!=this.value&&(this._emitInputEvent(),this._emitChangeEvent())}},e.prototype._onSlide=function(t){if(!this.disabled){this._isSliding||this._onSlideStart(null),t.preventDefault();var e=this.value;this._updateValueFromPosition({x:t.center.x,y:t.center.y}),e!=this.value&&this._emitInputEvent()}},e.prototype._onSlideStart=function(t){this.disabled||this._isSliding||(this._onMouseenter(),this._isSliding=!0,this._focusHostElement(),this._valueOnSlideStart=this.value,t&&(this._updateValueFromPosition({x:t.center.x,y:t.center.y}),t.preventDefault()))},e.prototype._onSlideEnd=function(){this._isSliding=!1,this._valueOnSlideStart==this.value||this.disabled||this._emitChangeEvent(),this._valueOnSlideStart=null},e.prototype._onFocus=function(){this._sliderDimensions=this._getSliderDimensions(),this._updateTickIntervalPercent()},e.prototype._onBlur=function(){this.onTouched()},e.prototype._onKeydown=function(t){if(!this.disabled){var e=this.value;switch(t.keyCode){case 33:this._increment(10);break;case 34:this._increment(-10);break;case 35:this.value=this.max;break;case 36:this.value=this.min;break;case 37:this._increment("rtl"==this._direction?1:-1);break;case 38:this._increment(1);break;case 39:this._increment("rtl"==this._direction?-1:1);break;case 40:this._increment(-1);break;default:return}e!=this.value&&(this._emitInputEvent(),this._emitChangeEvent()),this._isSliding=!0,t.preventDefault()}},e.prototype._onKeyup=function(){this._isSliding=!1},e.prototype._increment=function(t){this.value=this._clamp((this.value||0)+this.step*t,this.min,this.max)},e.prototype._updateValueFromPosition=function(t){if(this._sliderDimensions){var e=this._clamp(((this.vertical?t.y:t.x)-(this.vertical?this._sliderDimensions.top:this._sliderDimensions.left))/(this.vertical?this._sliderDimensions.height:this._sliderDimensions.width));if(this._invertMouseCoords&&(e=1-e),0===e)this.value=this.min;else if(1===e)this.value=this.max;else{var n=this._calculateValue(e),i=Math.round((n-this.min)/this.step)*this.step+this.min;this.value=this._clamp(i,this.min,this.max)}}},e.prototype._emitChangeEvent=function(){this._controlValueAccessorChangeFn(this.value),this.valueChange.emit(this.value),this.change.emit(this._createChangeEvent())},e.prototype._emitInputEvent=function(){this.input.emit(this._createChangeEvent())},e.prototype._updateTickIntervalPercent=function(){if(this.tickInterval&&this._sliderDimensions)if("auto"==this.tickInterval){var t=this.vertical?this._sliderDimensions.height:this._sliderDimensions.width,e=Math.ceil(30/(t*this.step/(this.max-this.min)));this._tickIntervalPercent=e*this.step/t}else this._tickIntervalPercent=this.tickInterval*this.step/(this.max-this.min)},e.prototype._createChangeEvent=function(t){void 0===t&&(t=this.value);var e=new function(){};return e.source=this,e.value=t,e},e.prototype._calculatePercentage=function(t){return((t||0)-this.min)/(this.max-this.min)},e.prototype._calculateValue=function(t){return this.min+t*(this.max-this.min)},e.prototype._clamp=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=1),Math.max(e,Math.min(t,n))},e.prototype._getSliderDimensions=function(){return this._sliderWrapper?this._sliderWrapper.nativeElement.getBoundingClientRect():null},e.prototype._focusHostElement=function(){this._elementRef.nativeElement.focus()},e.prototype._blurHostElement=function(){this._elementRef.nativeElement.blur()},e.prototype.writeValue=function(t){this.value=t},e.prototype.registerOnChange=function(t){this._controlValueAccessorChangeFn=t},e.prototype.registerOnTouched=function(t){this.onTouched=t},e.prototype.setDisabledState=function(t){this.disabled=t},e}(Ym(Um(Wm(function(t){this._elementRef=t}),"accent"))),vx=function(){},yx=Sr({encapsulation:2,styles:[".mat-slider{display:inline-block;position:relative;box-sizing:border-box;padding:8px;outline:0;vertical-align:middle}.mat-slider-wrapper{position:absolute}.mat-slider-track-wrapper{position:absolute;top:0;left:0;overflow:hidden}.mat-slider-track-fill{position:absolute;transform-origin:0 0;transition:transform .4s cubic-bezier(.25,.8,.25,1),background-color .4s cubic-bezier(.25,.8,.25,1)}.mat-slider-track-background{position:absolute;transform-origin:100% 100%;transition:transform .4s cubic-bezier(.25,.8,.25,1),background-color .4s cubic-bezier(.25,.8,.25,1)}.mat-slider-ticks-container{position:absolute;left:0;top:0;overflow:hidden}.mat-slider-ticks{background-repeat:repeat;background-clip:content-box;box-sizing:border-box;opacity:0;transition:opacity .4s cubic-bezier(.25,.8,.25,1)}.mat-slider-thumb-container{position:absolute;z-index:1;transition:transform .4s cubic-bezier(.25,.8,.25,1)}.mat-slider-focus-ring{position:absolute;width:30px;height:30px;border-radius:50%;transform:scale(0);opacity:0;transition:transform .4s cubic-bezier(.25,.8,.25,1),background-color .4s cubic-bezier(.25,.8,.25,1),opacity .4s cubic-bezier(.25,.8,.25,1)}.cdk-keyboard-focused .mat-slider-focus-ring,.cdk-program-focused .mat-slider-focus-ring{transform:scale(1);opacity:1}.mat-slider:not(.mat-slider-disabled) .mat-slider-thumb,.mat-slider:not(.mat-slider-disabled) .mat-slider-thumb-label{cursor:-webkit-grab;cursor:grab}.mat-slider-sliding:not(.mat-slider-disabled) .mat-slider-thumb,.mat-slider-sliding:not(.mat-slider-disabled) .mat-slider-thumb-label,.mat-slider:not(.mat-slider-disabled) .mat-slider-thumb-label:active,.mat-slider:not(.mat-slider-disabled) .mat-slider-thumb:active{cursor:-webkit-grabbing;cursor:grabbing}.mat-slider-thumb{position:absolute;right:-10px;bottom:-10px;box-sizing:border-box;width:20px;height:20px;border:3px solid transparent;border-radius:50%;transform:scale(.7);transition:transform .4s cubic-bezier(.25,.8,.25,1),background-color .4s cubic-bezier(.25,.8,.25,1),border-color .4s cubic-bezier(.25,.8,.25,1)}.mat-slider-thumb-label{display:none;align-items:center;justify-content:center;position:absolute;width:28px;height:28px;border-radius:50%;transition:transform .4s cubic-bezier(.25,.8,.25,1),border-radius .4s cubic-bezier(.25,.8,.25,1),background-color .4s cubic-bezier(.25,.8,.25,1)}@media screen and (-ms-high-contrast:active){.mat-slider-thumb-label{outline:solid 1px}}.mat-slider-thumb-label-text{z-index:1;opacity:0;transition:opacity .4s cubic-bezier(.25,.8,.25,1)}.mat-slider-sliding .mat-slider-thumb-container,.mat-slider-sliding .mat-slider-track-background,.mat-slider-sliding .mat-slider-track-fill{transition-duration:0s}.mat-slider-has-ticks .mat-slider-wrapper::after{content:'';position:absolute;border-width:0;border-style:solid;opacity:0;transition:opacity .4s cubic-bezier(.25,.8,.25,1)}.mat-slider-has-ticks.cdk-focused:not(.mat-slider-hide-last-tick) .mat-slider-wrapper::after,.mat-slider-has-ticks:hover:not(.mat-slider-hide-last-tick) .mat-slider-wrapper::after{opacity:1}.mat-slider-has-ticks.cdk-focused:not(.mat-slider-disabled) .mat-slider-ticks,.mat-slider-has-ticks:hover:not(.mat-slider-disabled) .mat-slider-ticks{opacity:1}.mat-slider-thumb-label-showing .mat-slider-focus-ring{transform:scale(0);opacity:0}.mat-slider-thumb-label-showing .mat-slider-thumb-label{display:flex}.mat-slider-axis-inverted .mat-slider-track-fill{transform-origin:100% 100%}.mat-slider-axis-inverted .mat-slider-track-background{transform-origin:0 0}.mat-slider:not(.mat-slider-disabled).cdk-focused.mat-slider-thumb-label-showing .mat-slider-thumb{transform:scale(0)}.mat-slider:not(.mat-slider-disabled).cdk-focused .mat-slider-thumb-label{border-radius:50% 50% 0}.mat-slider:not(.mat-slider-disabled).cdk-focused .mat-slider-thumb-label-text{opacity:1}.mat-slider:not(.mat-slider-disabled).cdk-mouse-focused .mat-slider-thumb,.mat-slider:not(.mat-slider-disabled).cdk-program-focused .mat-slider-thumb,.mat-slider:not(.mat-slider-disabled).cdk-touch-focused .mat-slider-thumb{border-width:2px;transform:scale(1)}.mat-slider-disabled .mat-slider-focus-ring{transform:scale(0);opacity:0}.mat-slider-disabled .mat-slider-thumb{border-width:4px;transform:scale(.5)}.mat-slider-disabled .mat-slider-thumb-label{display:none}.mat-slider-horizontal{height:48px;min-width:128px}.mat-slider-horizontal .mat-slider-wrapper{height:2px;top:23px;left:8px;right:8px}.mat-slider-horizontal .mat-slider-wrapper::after{height:2px;border-left-width:2px;right:0;top:0}.mat-slider-horizontal .mat-slider-track-wrapper{height:2px;width:100%}.mat-slider-horizontal .mat-slider-track-fill{height:2px;width:100%;transform:scaleX(0)}.mat-slider-horizontal .mat-slider-track-background{height:2px;width:100%;transform:scaleX(1)}.mat-slider-horizontal .mat-slider-ticks-container{height:2px;width:100%}@media screen and (-ms-high-contrast:active){.mat-slider-horizontal .mat-slider-ticks-container{height:0;outline:solid 2px;top:1px}}.mat-slider-horizontal .mat-slider-ticks{height:2px;width:100%}.mat-slider-horizontal .mat-slider-thumb-container{width:100%;height:0;top:50%}.mat-slider-horizontal .mat-slider-focus-ring{top:-15px;right:-15px}.mat-slider-horizontal .mat-slider-thumb-label{right:-14px;top:-40px;transform:translateY(26px) scale(.01) rotate(45deg)}.mat-slider-horizontal .mat-slider-thumb-label-text{transform:rotate(-45deg)}.mat-slider-horizontal.cdk-focused .mat-slider-thumb-label{transform:rotate(45deg)}@media screen and (-ms-high-contrast:active){.mat-slider-horizontal.cdk-focused .mat-slider-thumb-label,.mat-slider-horizontal.cdk-focused .mat-slider-thumb-label-text{transform:none}}.mat-slider-vertical{width:48px;min-height:128px}.mat-slider-vertical .mat-slider-wrapper{width:2px;top:8px;bottom:8px;left:23px}.mat-slider-vertical .mat-slider-wrapper::after{width:2px;border-top-width:2px;bottom:0;left:0}.mat-slider-vertical .mat-slider-track-wrapper{height:100%;width:2px}.mat-slider-vertical .mat-slider-track-fill{height:100%;width:2px;transform:scaleY(0)}.mat-slider-vertical .mat-slider-track-background{height:100%;width:2px;transform:scaleY(1)}.mat-slider-vertical .mat-slider-ticks-container{width:2px;height:100%}@media screen and (-ms-high-contrast:active){.mat-slider-vertical .mat-slider-ticks-container{width:0;outline:solid 2px;left:1px}}.mat-slider-vertical .mat-slider-focus-ring{bottom:-15px;left:-15px}.mat-slider-vertical .mat-slider-ticks{width:2px;height:100%}.mat-slider-vertical .mat-slider-thumb-container{height:100%;width:0;left:50%}.mat-slider-vertical .mat-slider-thumb{-webkit-backface-visibility:hidden;backface-visibility:hidden}.mat-slider-vertical .mat-slider-thumb-label{bottom:-14px;left:-40px;transform:translateX(26px) scale(.01) rotate(-45deg)}.mat-slider-vertical .mat-slider-thumb-label-text{transform:rotate(45deg)}.mat-slider-vertical.cdk-focused .mat-slider-thumb-label{transform:rotate(-45deg)}[dir=rtl] .mat-slider-wrapper::after{left:0;right:auto}[dir=rtl] .mat-slider-horizontal .mat-slider-track-fill{transform-origin:100% 100%}[dir=rtl] .mat-slider-horizontal .mat-slider-track-background{transform-origin:0 0}[dir=rtl] .mat-slider-horizontal.mat-slider-axis-inverted .mat-slider-track-fill{transform-origin:0 0}[dir=rtl] .mat-slider-horizontal.mat-slider-axis-inverted .mat-slider-track-background{transform-origin:100% 100%}.mat-slider._mat-animation-noopable .mat-slider-focus-ring,.mat-slider._mat-animation-noopable .mat-slider-has-ticks .mat-slider-wrapper::after,.mat-slider._mat-animation-noopable .mat-slider-thumb,.mat-slider._mat-animation-noopable .mat-slider-thumb-container,.mat-slider._mat-animation-noopable .mat-slider-thumb-label,.mat-slider._mat-animation-noopable .mat-slider-thumb-label-text,.mat-slider._mat-animation-noopable .mat-slider-ticks,.mat-slider._mat-animation-noopable .mat-slider-track-background,.mat-slider._mat-animation-noopable .mat-slider-track-fill{transition:none}"],data:{}});function bx(t){return bs(2,[ss(402653184,1,{_sliderWrapper:0}),(t()(),to(1,0,[[1,0],["sliderWrapper",1]],null,16,"div",[["class","mat-slider-wrapper"]],null,null,null,null,null)),(t()(),to(2,0,null,null,4,"div",[["class","mat-slider-track-wrapper"]],null,null,null,null,null)),(t()(),to(3,0,null,null,1,"div",[["class","mat-slider-track-background"]],null,null,null,null,null)),Wo(4,278528,null,0,Yu,[Ti,ei,ti],{ngStyle:[0,"ngStyle"]},null),(t()(),to(5,0,null,null,1,"div",[["class","mat-slider-track-fill"]],null,null,null,null,null)),Wo(6,278528,null,0,Yu,[Ti,ei,ti],{ngStyle:[0,"ngStyle"]},null),(t()(),to(7,0,null,null,3,"div",[["class","mat-slider-ticks-container"]],null,null,null,null,null)),Wo(8,278528,null,0,Yu,[Ti,ei,ti],{ngStyle:[0,"ngStyle"]},null),(t()(),to(9,0,null,null,1,"div",[["class","mat-slider-ticks"]],null,null,null,null,null)),Wo(10,278528,null,0,Yu,[Ti,ei,ti],{ngStyle:[0,"ngStyle"]},null),(t()(),to(11,0,null,null,6,"div",[["class","mat-slider-thumb-container"]],null,null,null,null,null)),Wo(12,278528,null,0,Yu,[Ti,ei,ti],{ngStyle:[0,"ngStyle"]},null),(t()(),to(13,0,null,null,0,"div",[["class","mat-slider-focus-ring"]],null,null,null,null,null)),(t()(),to(14,0,null,null,0,"div",[["class","mat-slider-thumb"]],null,null,null,null,null)),(t()(),to(15,0,null,null,2,"div",[["class","mat-slider-thumb-label"]],null,null,null,null,null)),(t()(),to(16,0,null,null,1,"span",[["class","mat-slider-thumb-label-text"]],null,null,null,null,null)),(t()(),ms(17,null,["",""]))],function(t,e){var n=e.component;t(e,4,0,n._trackBackgroundStyles),t(e,6,0,n._trackFillStyles),t(e,8,0,n._ticksContainerStyles),t(e,10,0,n._ticksStyles),t(e,12,0,n._thumbContainerStyles)},function(t,e){t(e,17,0,e.component.displayValue)})}var _x=function(){function t(t,e,n,i,r){this.activeObject=t,this.history=e,this.controls=n,this.overlayPanel=i,this.filterTool=r,this.name="filterOptions",this.colorFormControl=new qp}return t.prototype.applyFilterValue=function(t,e){this.filterTool.applyValue(this.selectedFilter,t,e)},t}(),wx=function(){function t(t){this.canvasState=t,this.defaults={fill:"#eee",opacity:1,backgroundColor:"#000",stroke:{width:.1,color:"#000"},shadow:{color:"#000",blur:0,offsetX:3,offsetY:3},text:{align:"initial",underline:!1,linethrough:!1,fontStyle:"normal",fontFamily:"Times New Roman",fontWeight:400}},this.model=new Gp({fill:new qp("#eee"),opacity:new qp(1),backgroundColor:new qp("#000"),stroke:new Gp({width:new qp(.1),color:new qp("#000")}),shadow:new Gp({color:new qp("#000"),blur:new qp(0),offsetX:new qp(3),offsetY:new qp(3)}),text:new Gp({align:new qp("initial"),underline:new qp(!1),linethrough:new qp(!1),fontStyle:new qp("normal"),fontFamily:new qp("Times New Roman"),fontWeight:new qp(400)})}),window.activeObject=this}return t.prototype.getControl=function(t){return this.model.get(t)},t.prototype.isText=function(){var t=this.get();return t&&"i-text"===t.type},t.prototype.isEditing=function(){return this.isText()&&this.get().isEditing},t.prototype.setValue=function(t,e){this.getControl(t).setValue(e)},t.prototype.getValue=function(t){return this.getControl(t).value},t.prototype.get=function(){var t=this.canvasState.fabric.getActiveObject();return t&&t.name?t.name.indexOf("crop.")>-1||t.name.indexOf("round.")>-1?null:t:null},t.prototype.set=function(t,e){var n=this.get();n&&(n.set(t,e),this.canvasState.fabric.requestRenderAll())},t.prototype.move=function(t,e){var n=this.get();n&&(n.set(t,n[t]+e),this.canvasState.fabric.requestRenderAll())},t.prototype.bringToFront=function(){var t=this.get();t&&(t.bringToFront(),this.canvasState.fabric.requestRenderAll())},t.prototype.sendToBack=function(){var t=this.get();t&&(t.sendToBack(),this.canvasState.fabric.requestRenderAll())},t.prototype.flipHorizontal=function(){var t=this.get();t&&(t.flipX=!t.flipX,this.canvasState.fabric.requestRenderAll())},t.prototype.getId=function(){var t=this.get();return t&&t.data?t.data.id:null},t.prototype.init=function(){this.bindToObjectSelected(),this.bindToModelChange(),this.bindToObjectDeselected()},t.prototype.bindToObjectDeselected=function(){var t=this;this.canvasState.fabric.on("selection:cleared",function(e){t.model.patchValue(t.defaults,{emitEvent:!1})})},t.prototype.bindToObjectSelected=function(){var t=this;this.canvasState.fabric.on("selection:created",function(e){var n=e.target,i=n.shadow||{},r={fill:n.fill,opacity:n.opacity,backgroundColor:n.backgroundColor,stroke:{color:n.stroke,width:n.strokeWidth},shadow:{color:i.color||t.getControl("shadow.color").value,blur:i.blur||t.getControl("shadow.blur").value,offsetX:i.offsetX||t.getControl("shadow.offsetX").value,offsetY:i.offsetY||t.getControl("shadow.offsetY").value},text:{}};"i-text"===n.type&&(r.text={align:n.textAlign,underline:n.underline,linethrough:n.strikeThrough,fontStyle:n.fontStyle,fontFamily:n.fontFamily,fontWeight:n.fontWeight}),t.model.patchValue(r,{emitEvent:!1})})},t.prototype.bindToModelChange=function(){var t=this;this.getControl("fill").valueChanges.subscribe(function(e){var n=t.get();n&&"sticker"===n.name&&n.forEachObject&&n.forEachObject(function(t){return t.set("fill",e)})}),this.model.valueChanges.subscribe(function(e){var n=t.get();if(n){var i={strokeWidth:e.stroke.width,stroke:e.stroke.color,fill:e.fill,opacity:e.opacity,backgroundColor:e.backgroundColor};t.isText()&&(i.textAlign=e.text.align,i.underline=e.text.underline,i.linethrough=e.text.linethrough,i.fontStyle=e.text.fontStyle,i.fontFamily=e.text.fontFamily),n.set(i),t.applyShadow(n),t.canvasState.fabric.requestRenderAll()}})},t.prototype.applyShadow=function(t){var e=this.model.get("shadow").value,n=t.shadow;e.blur&&e.color&&(n?(n.blur=e.blur,n.color=e.color,n.offsetX=e.offsetX,n.offsetY=e.offsetY):t.setShadow(new yu.fabric.Shadow(e)))},t.prototype.delete=function(){var t=this.get();t&&(this.canvasState.fabric.remove(t),this.canvasState.fabric.requestRenderAll())},t.prototype.deselect=function(){this.canvasState.fabric.discardActiveObject(),this.canvasState.fabric.requestRenderAll()},t}(),xx=[{name:"grayscale"},{name:"blackWhite",displayName:"Black & White"},{name:"sharpen",uses:"Convolute",matrix:[0,-1,0,-1,5,-1,0,-1,0]},{name:"invert"},{name:"vintage"},{name:"polaroid"},{name:"kodachrome"},{name:"technicolor"},{name:"brownie"},{name:"sepia"},{name:"removeColor",displayName:"Remove Color",options:{distance:{type:"slider",current:.1,min:0,max:1,step:.01},color:{current:"#fff",type:"colorPicker"}}},{name:"brightness",options:{brightness:{type:"slider",current:.1,min:-1,max:1,step:.1}}},{name:"gamma",options:{red:{type:"slider",current:.1,min:.2,max:2.2,step:.003921},green:{type:"slider",current:.1,min:.2,max:2.2,step:.003921},blue:{type:"slider",current:.1,min:.2,max:2.2,step:.003921}},apply:function(t,e,n){t.gamma=[t.red,t.green,t.blue]}},{name:"noise",options:{noise:{type:"slider",current:40,max:600}}},{name:"pixelate",options:{blocksize:{type:"slider",min:1,max:40,current:6}}},{name:"blur",uses:"Convolute",matrix:[1/9,1/9,1/9,1/9,1/9,1/9,1/9,1/9,1/9]},{name:"emboss",uses:"Convolute",matrix:[1,1,1,1,.7,-1,-1,-1,-1]},{name:"blendColor",displayName:"blend",options:{mode:{current:"add",type:"select",available:["add","multiply","subtract","diff","screen","lighten","darken"]},alpha:{type:"slider",current:.5,min:.1,max:1,step:.1},color:{type:"colorPicker",current:"#FF4081"}}}];function Cx(t){return t.charAt(0).toUpperCase()+t.slice(1)}var Sx=function(){function t(t){this.canvas=t,this.filtersList=xx}return t.prototype.apply=function(t){if(this.applied(t.name))return this.remove(t);var e=this.create(t);this.getImages().forEach(function(t){t.filters.push(e),t.applyFilters()}),this.canvas.render()},t.prototype.remove=function(t){var e=this;this.canvas.state.loading=!0,this.getImages().forEach(function(n){var i=e.findFilterIndex(t.name,n.filters);n.filters.splice(i,1),n.applyFilters()}),this.canvas.render(),this.canvas.state.loading=!1},t.prototype.getAll=function(){return this.filtersList},t.prototype.getByName=function(t){return this.filtersList.find(function(e){return e.name===t})},t.prototype.applied=function(t){var e=this.canvas.getMainImage();if(e)return this.findFilterIndex(t,e.filters)>-1},t.prototype.findFilterIndex=function(t,e){var n=this;if(e.length){var i=this.getByName(t);return e.findIndex(function(e){var r=e.type.toLowerCase();return r===t.toLowerCase()||"convolute"===r&&n.matrixAreEqual(i.matrix,e.matrix)})}},t.prototype.matrixAreEqual=function(t,e){if(!t||!e||t.length!==e.length)return!1;for(var n=t.length;n--;)if(t[n]!==e[n])return!1;return!0},t.prototype.applyValue=function(t,e,n){this.canvas.state.loading=!0,this.getImages().forEach(function(i){var r=i.filters.find(function(e){return e.type.toLowerCase()===t.name.toLowerCase()});r[e]=n,t.apply&&t.apply(r,e,n),i.applyFilters()}),this.canvas.render()},t.prototype.create=function(t){var e;if(t.uses)e=new(yu.fabric.Image.filters[Cx(t.uses)])({matrix:t.matrix});else{var n={};for(var i in t.options)n[i]=t.options[i].current;e=new(yu.fabric.Image.filters[Cx(t.name)])(n)}return e},t.prototype.addCustom=function(t,e,n){yu.fabric.Image.filters[t]=yu.fabric.util.createClass(yu.fabric.Image.filters.BaseFilter,e),yu.fabric.Image.filters[t].fromObject=yu.fabric.Image.filters.BaseFilter.fromObject,xx.push({name:t,options:n})},t.prototype.getImages=function(){return this.canvas.fabric().getObjects("image")},t}(),kx=Sr({encapsulation:2,styles:[["filter-controls-drawer{display:block}filter-controls-drawer .content{flex-direction:column}filter-controls-drawer .content.blendColor .input-container{display:none}@media only screen and (max-width:768px){filter-controls-drawer .content{justify-content:flex-start}}"]],data:{}});function Ex(t){return bs(0,[(t()(),to(0,0,null,null,6,null,null,null,null,null,null,null)),(t()(),to(1,0,null,null,5,"color-widget",[],[[2,"compact",null],[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngModelChange"]],function(t,e,n){var i=!0;return"ngModelChange"===e&&(i=!1!==t.component.applyFilterValue("color",n)&&i),i},gx,dx)),Wo(2,49152,null,0,px,[Qf,wu],{compact:[0,"compact"]},null),Xo(1024,null,ip,function(t){return[t]},[px]),Wo(4,540672,null,0,id,[[8,null],[8,null],[6,ip],[2,nd]],{form:[0,"form"]},{update:"ngModelChange"}),Xo(2048,null,hp,null,[id]),Wo(6,16384,null,0,zp,[[4,hp]],null,null)],function(t,e){var n=e.component;t(e,2,0,!0),t(e,4,0,n.colorFormControl)},function(t,e){t(e,1,0,Ao(e,2).compact,Ao(e,6).ngClassUntouched,Ao(e,6).ngClassTouched,Ao(e,6).ngClassPristine,Ao(e,6).ngClassDirty,Ao(e,6).ngClassValid,Ao(e,6).ngClassInvalid,Ao(e,6).ngClassPending)})}function Tx(t){return bs(0,[(t()(),to(0,0,null,null,4,"option",[["trans",""]],null,null,null,null,null)),Wo(1,147456,null,0,wp,[ei,ti,[8,null]],{value:[0,"value"]},null),Wo(2,147456,null,0,Sp,[ei,ti,[8,null]],{value:[0,"value"]},null),Wo(3,4341760,null,0,lv,[ei,uv,wu],null,null),(t()(),ms(4,null,["",""]))],function(t,e){t(e,1,0,e.context.$implicit),t(e,2,0,e.context.$implicit)},function(t,e){t(e,4,0,e.context.$implicit)})}function Ox(t){return bs(0,[(t()(),to(0,0,null,null,6,"div",[["class","input-container"]],null,null,null,null,null)),(t()(),to(1,0,null,null,2,"label",[["trans",""]],[[8,"htmlFor",0]],null,null,null,null)),Wo(2,4341760,null,0,lv,[ei,uv,wu],null,null),(t()(),ms(3,null,["",""])),(t()(),to(4,0,null,null,2,"select",[],[[8,"id",0]],[[null,"change"]],function(t,e,n){var i=!0;return"change"===e&&(i=!1!==t.component.applyFilterValue(t.parent.context.$implicit.key,n.target.value)&&i),i},null,null)),(t()(),$r(16777216,null,null,1,null,Tx)),Wo(6,278528,null,0,zu,[ri,ii,Ei],{ngForOf:[0,"ngForOf"]},null)],function(t,e){t(e,6,0,e.parent.context.$implicit.value.available)},function(t,e){t(e,1,0,e.parent.context.$implicit.key),t(e,3,0,e.parent.context.$implicit.key),t(e,4,0,e.parent.context.$implicit.key)})}function Ix(t){return bs(0,[(t()(),to(0,0,null,null,6,"div",[["class","slider-container"]],null,null,null,null,null)),(t()(),to(1,0,null,null,2,"div",[["class","slider-label"],["trans",""]],null,null,null,null,null)),Wo(2,4341760,null,0,lv,[ei,uv,wu],null,null),(t()(),ms(3,null,["",""])),(t()(),to(4,0,null,null,2,"mat-slider",[["class","mat-slider"],["role","slider"]],[[8,"tabIndex",0],[1,"aria-disabled",0],[1,"aria-valuemax",0],[1,"aria-valuemin",0],[1,"aria-valuenow",0],[1,"aria-orientation",0],[2,"mat-slider-disabled",null],[2,"mat-slider-has-ticks",null],[2,"mat-slider-horizontal",null],[2,"mat-slider-axis-inverted",null],[2,"mat-slider-sliding",null],[2,"mat-slider-thumb-label-showing",null],[2,"mat-slider-vertical",null],[2,"mat-slider-min-value",null],[2,"mat-slider-hide-last-tick",null],[2,"_mat-animation-noopable",null]],[[null,"input"],[null,"focus"],[null,"blur"],[null,"click"],[null,"keydown"],[null,"keyup"],[null,"mouseenter"],[null,"slide"],[null,"slideend"],[null,"slidestart"]],function(t,e,n){var i=!0,r=t.component;return"focus"===e&&(i=!1!==Ao(t,6)._onFocus()&&i),"blur"===e&&(i=!1!==Ao(t,6)._onBlur()&&i),"click"===e&&(i=!1!==Ao(t,6)._onClick(n)&&i),"keydown"===e&&(i=!1!==Ao(t,6)._onKeydown(n)&&i),"keyup"===e&&(i=!1!==Ao(t,6)._onKeyup()&&i),"mouseenter"===e&&(i=!1!==Ao(t,6)._onMouseenter()&&i),"slide"===e&&(i=!1!==Ao(t,6)._onSlide(n)&&i),"slideend"===e&&(i=!1!==Ao(t,6)._onSlideEnd()&&i),"slidestart"===e&&(i=!1!==Ao(t,6)._onSlideStart(n)&&i),"input"===e&&(i=!1!==r.applyFilterValue(t.parent.context.$implicit.key,n.value)&&i),i},bx,yx)),Xo(5120,null,ip,function(t){return[t]},[mx]),Wo(6,245760,null,0,mx,[ei,Lm,oi,[2,km],[8,null],[2,c_]],{max:[0,"max"],min:[1,"min"],step:[2,"step"],value:[3,"value"]},{input:"input"})],function(t,e){t(e,6,0,e.parent.context.$implicit.value.max||100,e.parent.context.$implicit.value.min||0,e.parent.context.$implicit.value.step||1,e.parent.context.$implicit.value.current)},function(t,e){t(e,3,0,e.parent.context.$implicit.key),t(e,4,1,[Ao(e,6).tabIndex,Ao(e,6).disabled,Ao(e,6).max,Ao(e,6).min,Ao(e,6).value,Ao(e,6).vertical?"vertical":"horizontal",Ao(e,6).disabled,Ao(e,6).tickInterval,!Ao(e,6).vertical,Ao(e,6)._invertAxis,Ao(e,6)._isSliding,Ao(e,6).thumbLabel,Ao(e,6).vertical,Ao(e,6)._isMinValue,Ao(e,6).disabled||Ao(e,6)._isMinValue&&Ao(e,6)._thumbGap&&Ao(e,6)._invertAxis,"NoopAnimations"===Ao(e,6)._animationMode])})}function Ax(t){return bs(0,[(t()(),to(0,0,null,null,6,null,null,null,null,null,null,null)),(t()(),$r(16777216,null,null,1,null,Ex)),Wo(2,16384,null,0,Wu,[ri,ii],{ngIf:[0,"ngIf"]},null),(t()(),$r(16777216,null,null,1,null,Ox)),Wo(4,16384,null,0,Wu,[ri,ii],{ngIf:[0,"ngIf"]},null),(t()(),$r(16777216,null,null,1,null,Ix)),Wo(6,16384,null,0,Wu,[ri,ii],{ngIf:[0,"ngIf"]},null),(t()(),$r(0,null,null,0))],function(t,e){t(e,2,0,"colorPicker"===e.context.$implicit.value.type),t(e,4,0,"select"===e.context.$implicit.value.type),t(e,6,0,"slider"===e.context.$implicit.value.type)},null)}function Px(t){return bs(0,[(t()(),to(0,0,null,null,5,null,null,null,null,null,null,null)),(t()(),to(1,0,null,null,4,"div",[["class","content"]],null,null,null,null,null)),Wo(2,278528,null,0,Bu,[Ei,Ti,ei,ti],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),(t()(),$r(16777216,null,null,2,null,Ax)),Wo(4,278528,null,0,zu,[ri,ii,Ei],{ngForOf:[0,"ngForOf"]},null),Uo(0,Qu,[Ti])],function(t,e){var n=e.component;t(e,2,0,"content",n.selectedFilter.name),t(e,4,0,wr(e,4,0,Ao(e,5).transform(n.selectedFilter.options)))},null)}function Dx(t){return bs(0,[(t()(),$r(16777216,null,null,1,null,Px)),Wo(1,16384,null,0,Wu,[ri,ii],{ngIf:[0,"ngIf"]},null)],function(t,e){t(e,1,0,e.component.selectedFilter)},null)}var jx=function(){function t(t,e){this.history=t,this.controls=e,this.dirty=!1}return t.prototype.close=function(){this.controls.closeCurrentPanel(),this.dirty&&(this.history.reload(),this.dirty=!1)},t.prototype.apply=function(){this.controls.closeCurrentPanel(),this.saveChanges()},t.prototype.saveChanges=function(){this.dirty&&(this.addChangesToHistory(),this.dirty=!1)},t.prototype.addChangesToHistory=function(){var t=this.name.replace(/([A-Z])/g," $1");this.history.add("applied: "+t,this.controls.getIconName(this.name))},t}(),Mx=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Rx=function(t){function e(e,n,i,r){var o=t.call(this,i,r)||this;return o.settings=e,o.filterTool=n,o.history=i,o.controls=r,o.name="filter",o}return Mx(e,t),e.prototype.apply=function(){this.controls.closeAllPanels(),t.prototype.apply.call(this)},e.prototype.toggleFilter=function(t){this.dirty=!0,this.filterTool.apply(t)},e.prototype.filterApplied=function(t){return this.filterTool.applied(t)},e.prototype.getFilterImage=function(t){return this.settings.getAssetUrl("images/filters/square/"+t.name.replace(" ","-")+".jpg")},e.prototype.removeFilter=function(t){this.dirty=!0,this.filterTool.remove(t)},e.prototype.showFilterConfig=function(t){this.dirty=!0,this.selectedFilter=t,this.controls.openPanel("filterControls")},e}(jx),Fx=Sr({encapsulation:2,styles:[["filter-drawer{display:block;width:100%}filter-drawer.controls-drawer>.content{justify-content:flex-start}filter-drawer .button-with-image{position:relative}filter-drawer .button-with-image img{border-radius:4px;width:65px;height:65px}filter-drawer .button-with-image .bottom-label{margin-top:3px;font-size:1.1rem}"]],data:{}});function Nx(t){return bs(0,[(t()(),to(0,0,null,null,3,"button",[["mat-icon-button",""]],[[8,"disabled",0],[2,"_mat-animation-noopable",null]],[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(t.component.showFilterConfig(t.parent.parent.context.$implicit),i=!1!==n.stopPropagation()&&i),i},d_,p_)),Wo(1,180224,null,0,qv,[ei,Yd,Lm,[2,c_]],null,null),(t()(),to(2,0,null,0,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","settings"]],[[2,"mat-icon-inline",null]],null,null,Tv,Ev)),Wo(3,638976,null,0,Sv,[ei,_v,[8,null]],{svgIcon:[0,"svgIcon"]},null)],function(t,e){t(e,3,0,"settings")},function(t,e){t(e,0,0,Ao(e,1).disabled||null,"NoopAnimations"===Ao(e,1)._animationMode),t(e,2,0,Ao(e,3).inline)})}function Lx(t){return bs(0,[(t()(),to(0,0,null,null,6,"div",[["class","overlay"]],null,null,null,null,null)),(t()(),to(1,0,null,null,3,"button",[["mat-icon-button",""]],[[8,"disabled",0],[2,"_mat-animation-noopable",null]],[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(t.component.removeFilter(t.parent.context.$implicit),i=!1!==n.stopPropagation()&&i),i},d_,p_)),Wo(2,180224,null,0,qv,[ei,Yd,Lm,[2,c_]],null,null),(t()(),to(3,0,null,0,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","cancel"]],[[2,"mat-icon-inline",null]],null,null,Tv,Ev)),Wo(4,638976,null,0,Sv,[ei,_v,[8,null]],{svgIcon:[0,"svgIcon"]},null),(t()(),$r(16777216,null,null,1,null,Nx)),Wo(6,16384,null,0,Wu,[ri,ii],{ngIf:[0,"ngIf"]},null)],function(t,e){t(e,4,0,"cancel"),t(e,6,0,e.parent.context.$implicit.options)},function(t,e){t(e,1,0,Ao(e,2).disabled||null,"NoopAnimations"===Ao(e,2)._animationMode),t(e,3,0,Ao(e,4).inline)})}function Bx(t){return bs(0,[(t()(),to(0,0,null,null,7,"div",[["class","button-with-image"]],null,[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.toggleFilter(t.context.$implicit)&&i),i},null,null)),(t()(),to(1,0,null,null,3,"div",[["class","image-container"]],null,null,null,null,null)),(t()(),to(2,0,null,null,0,"img",[["alt","Filter preview"]],[[8,"src",4]],null,null,null,null)),(t()(),$r(16777216,null,null,1,null,Lx)),Wo(4,16384,null,0,Wu,[ri,ii],{ngIf:[0,"ngIf"]},null),(t()(),to(5,0,null,null,2,"div",[["class","bottom-label"],["trans",""]],null,null,null,null,null)),Wo(6,4341760,null,0,lv,[ei,uv,wu],null,null),(t()(),ms(7,null,["",""]))],function(t,e){t(e,4,0,e.component.filterApplied(e.context.$implicit.name))},function(t,e){t(e,2,0,e.component.getFilterImage(e.context.$implicit)),t(e,7,0,e.context.$implicit.displayName||e.context.$implicit.name)})}function Vx(t){return bs(0,[(t()(),to(0,0,null,null,2,null,null,null,null,null,null,null)),(t()(),$r(16777216,null,null,1,null,Bx)),Wo(2,278528,null,0,zu,[ri,ii,Ei],{ngForOf:[0,"ngForOf"]},null),(t()(),$r(0,null,null,0))],function(t,e){t(e,2,0,e.component.filterTool.getAll())},null)}function zx(t){return bs(0,[(t()(),to(0,0,null,null,1,"filter-controls-drawer",[["class","controls-drawer"]],null,null,null,Dx,kx)),Wo(1,49152,null,0,_x,[wx,tg,$f,Qf,Sx],{selectedFilter:[0,"selectedFilter"]},null)],function(t,e){t(e,1,0,e.component.selectedFilter)},null)}function Hx(t){return bs(0,[(t()(),to(0,0,null,null,4,"div",[["class","content"]],null,null,null,null,null)),(t()(),$r(16777216,null,null,1,null,Vx)),Wo(2,16384,null,0,Wu,[ri,ii],{ngIf:[0,"ngIf"]},null),(t()(),$r(16777216,null,null,1,null,zx)),Wo(4,16384,null,0,Wu,[ri,ii],{ngIf:[0,"ngIf"]},null)],function(t,e){var n=e.component;t(e,2,0,!n.controls.panelIsVisible("filterControls")),t(e,4,0,n.controls.panelIsVisible("filterControls"))},null)}var Wx=new yt("mat-checkbox-click-action"),Ux=0,Xx=function(){var t={Init:0,Checked:1,Unchecked:2,Indeterminate:3};return t[t.Init]="Init",t[t.Checked]="Checked",t[t.Unchecked]="Unchecked",t[t.Indeterminate]="Indeterminate",t}(),Yx=function(t){function e(e,n,i,r,o,s,a){var l=t.call(this,e)||this;return l._changeDetectorRef=n,l._focusMonitor=i,l._ngZone=r,l._clickAction=s,l._animationMode=a,l.ariaLabel="",l.ariaLabelledby=null,l._uniqueId="mat-checkbox-"+ ++Ux,l.id=l._uniqueId,l.labelPosition="after",l.name=null,l.change=new In,l.indeterminateChange=new In,l._onTouched=function(){},l._currentAnimationClass="",l._currentCheckState=Xx.Init,l._controlValueAccessorChangeFn=function(){},l._checked=!1,l._disabled=!1,l._indeterminate=!1,l.tabIndex=parseInt(o)||0,l}return r(e,t),Object.defineProperty(e.prototype,"inputId",{get:function(){return(this.id||this._uniqueId)+"-input"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"required",{get:function(){return this._required},set:function(t){this._required=Vd(t)},enumerable:!0,configurable:!0}),e.prototype.ngAfterViewInit=function(){var t=this;this._focusMonitor.monitor(this._inputElement.nativeElement).subscribe(function(e){return t._onInputFocusChange(e)})},e.prototype.ngOnDestroy=function(){this._focusMonitor.stopMonitoring(this._inputElement.nativeElement)},Object.defineProperty(e.prototype,"checked",{get:function(){return this._checked},set:function(t){t!=this.checked&&(this._checked=t,this._changeDetectorRef.markForCheck())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"disabled",{get:function(){return this._disabled},set:function(t){t!=this.disabled&&(this._disabled=t,this._changeDetectorRef.markForCheck())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"indeterminate",{get:function(){return this._indeterminate},set:function(t){var e=t!=this._indeterminate;this._indeterminate=t,e&&(this._transitionCheckState(this._indeterminate?Xx.Indeterminate:this.checked?Xx.Checked:Xx.Unchecked),this.indeterminateChange.emit(this._indeterminate))},enumerable:!0,configurable:!0}),e.prototype._isRippleDisabled=function(){return this.disableRipple||this.disabled},e.prototype._onLabelTextChange=function(){this._changeDetectorRef.markForCheck()},e.prototype.writeValue=function(t){this.checked=!!t},e.prototype.registerOnChange=function(t){this._controlValueAccessorChangeFn=t},e.prototype.registerOnTouched=function(t){this._onTouched=t},e.prototype.setDisabledState=function(t){this.disabled=t},e.prototype._getAriaChecked=function(){return this.checked?"true":this.indeterminate?"mixed":"false"},e.prototype._transitionCheckState=function(t){var e=this._currentCheckState,n=this._elementRef.nativeElement;if(e!==t&&(this._currentAnimationClass.length>0&&n.classList.remove(this._currentAnimationClass),this._currentAnimationClass=this._getAnimationClassForCheckStateTransition(e,t),this._currentCheckState=t,this._currentAnimationClass.length>0)){n.classList.add(this._currentAnimationClass);var i=this._currentAnimationClass;this._ngZone.runOutsideAngular(function(){setTimeout(function(){n.classList.remove(i)},1e3)})}},e.prototype._emitChangeEvent=function(){var t=new function(){};t.source=this,t.checked=this.checked,this._controlValueAccessorChangeFn(this.checked),this.change.emit(t)},e.prototype._onInputFocusChange=function(t){var e=this;this._focusRipple||"keyboard"!==t?t||(this._focusRipple&&(this._focusRipple.fadeOut(),this._focusRipple=null),Promise.resolve().then(function(){return e._onTouched()})):this._focusRipple=this.ripple.launch(0,0,{persistent:!0})},e.prototype.toggle=function(){this.checked=!this.checked},e.prototype._onInputClick=function(t){var e=this;t.stopPropagation(),this.disabled||"noop"===this._clickAction?this.disabled||"noop"!==this._clickAction||(this._inputElement.nativeElement.checked=this.checked,this._inputElement.nativeElement.indeterminate=this.indeterminate):(this.indeterminate&&"check"!==this._clickAction&&Promise.resolve().then(function(){e._indeterminate=!1,e.indeterminateChange.emit(e._indeterminate)}),this.toggle(),this._transitionCheckState(this._checked?Xx.Checked:Xx.Unchecked),this._emitChangeEvent())},e.prototype.focus=function(){this._focusMonitor.focusVia(this._inputElement.nativeElement,"keyboard")},e.prototype._onInteractionEvent=function(t){t.stopPropagation()},e.prototype._getAnimationClassForCheckStateTransition=function(t,e){if("NoopAnimations"===this._animationMode)return"";var n="";switch(t){case Xx.Init:if(e===Xx.Checked)n="unchecked-checked";else{if(e!=Xx.Indeterminate)return"";n="unchecked-indeterminate"}break;case Xx.Unchecked:n=e===Xx.Checked?"unchecked-checked":"unchecked-indeterminate";break;case Xx.Checked:n=e===Xx.Unchecked?"checked-unchecked":"checked-indeterminate";break;case Xx.Indeterminate:n=e===Xx.Checked?"indeterminate-checked":"indeterminate-unchecked"}return"mat-checkbox-anim-"+n},e}(Ym(Um(Xm(Wm(function(t){this._elementRef=t})),"accent"))),qx=function(){},Gx=Sr({encapsulation:2,styles:["@keyframes mat-checkbox-fade-in-background{0%{opacity:0}50%{opacity:1}}@keyframes mat-checkbox-fade-out-background{0%,50%{opacity:1}100%{opacity:0}}@keyframes mat-checkbox-unchecked-checked-checkmark-path{0%,50%{stroke-dashoffset:22.91026}50%{animation-timing-function:cubic-bezier(0,0,.2,.1)}100%{stroke-dashoffset:0}}@keyframes mat-checkbox-unchecked-indeterminate-mixedmark{0%,68.2%{transform:scaleX(0)}68.2%{animation-timing-function:cubic-bezier(0,0,0,1)}100%{transform:scaleX(1)}}@keyframes mat-checkbox-checked-unchecked-checkmark-path{from{animation-timing-function:cubic-bezier(.4,0,1,1);stroke-dashoffset:0}to{stroke-dashoffset:-22.91026}}@keyframes mat-checkbox-checked-indeterminate-checkmark{from{animation-timing-function:cubic-bezier(0,0,.2,.1);opacity:1;transform:rotate(0)}to{opacity:0;transform:rotate(45deg)}}@keyframes mat-checkbox-indeterminate-checked-checkmark{from{animation-timing-function:cubic-bezier(.14,0,0,1);opacity:0;transform:rotate(45deg)}to{opacity:1;transform:rotate(360deg)}}@keyframes mat-checkbox-checked-indeterminate-mixedmark{from{animation-timing-function:cubic-bezier(0,0,.2,.1);opacity:0;transform:rotate(-45deg)}to{opacity:1;transform:rotate(0)}}@keyframes mat-checkbox-indeterminate-checked-mixedmark{from{animation-timing-function:cubic-bezier(.14,0,0,1);opacity:1;transform:rotate(0)}to{opacity:0;transform:rotate(315deg)}}@keyframes mat-checkbox-indeterminate-unchecked-mixedmark{0%{animation-timing-function:linear;opacity:1;transform:scaleX(1)}100%,32.8%{opacity:0;transform:scaleX(0)}}.mat-checkbox-checkmark,.mat-checkbox-mixedmark{width:calc(100% - 4px)}.mat-checkbox-background,.mat-checkbox-frame{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:2px;box-sizing:border-box;pointer-events:none}.mat-checkbox{transition:background .4s cubic-bezier(.25,.8,.25,1),box-shadow 280ms cubic-bezier(.4,0,.2,1);cursor:pointer;-webkit-tap-highlight-color:transparent}._mat-animation-noopable.mat-checkbox{transition:none;animation:none}.mat-checkbox-layout{cursor:inherit;align-items:baseline;vertical-align:middle;display:inline-flex;white-space:nowrap}.mat-checkbox-inner-container{display:inline-block;height:20px;line-height:0;margin:auto;margin-right:8px;order:0;position:relative;vertical-align:middle;white-space:nowrap;width:20px;flex-shrink:0}[dir=rtl] .mat-checkbox-inner-container{margin-left:8px;margin-right:auto}.mat-checkbox-inner-container-no-side-margin{margin-left:0;margin-right:0}.mat-checkbox-frame{background-color:transparent;transition:border-color 90ms cubic-bezier(0,0,.2,.1);border-width:2px;border-style:solid}._mat-animation-noopable .mat-checkbox-frame{transition:none}.mat-checkbox-background{align-items:center;display:inline-flex;justify-content:center;transition:background-color 90ms cubic-bezier(0,0,.2,.1),opacity 90ms cubic-bezier(0,0,.2,.1)}._mat-animation-noopable .mat-checkbox-background{transition:none}.mat-checkbox-checkmark{top:0;left:0;right:0;bottom:0;position:absolute;width:100%}.mat-checkbox-checkmark-path{stroke-dashoffset:22.91026;stroke-dasharray:22.91026;stroke-width:2.66667px}.mat-checkbox-mixedmark{height:2px;opacity:0;transform:scaleX(0) rotate(0)}@media screen and (-ms-high-contrast:active){.mat-checkbox-mixedmark{height:0;border-top:solid 2px;margin-top:2px}}.mat-checkbox-label-before .mat-checkbox-inner-container{order:1;margin-left:8px;margin-right:auto}[dir=rtl] .mat-checkbox-label-before .mat-checkbox-inner-container{margin-left:auto;margin-right:8px}.mat-checkbox-checked .mat-checkbox-checkmark{opacity:1}.mat-checkbox-checked .mat-checkbox-checkmark-path{stroke-dashoffset:0}.mat-checkbox-checked .mat-checkbox-mixedmark{transform:scaleX(1) rotate(-45deg)}.mat-checkbox-indeterminate .mat-checkbox-checkmark{opacity:0;transform:rotate(45deg)}.mat-checkbox-indeterminate .mat-checkbox-checkmark-path{stroke-dashoffset:0}.mat-checkbox-indeterminate .mat-checkbox-mixedmark{opacity:1;transform:scaleX(1) rotate(0)}.mat-checkbox-unchecked .mat-checkbox-background{background-color:transparent}.mat-checkbox-disabled{cursor:default}.mat-checkbox-anim-unchecked-checked .mat-checkbox-background{animation:180ms linear 0s mat-checkbox-fade-in-background}.mat-checkbox-anim-unchecked-checked .mat-checkbox-checkmark-path{animation:180ms linear 0s mat-checkbox-unchecked-checked-checkmark-path}.mat-checkbox-anim-unchecked-indeterminate .mat-checkbox-background{animation:180ms linear 0s mat-checkbox-fade-in-background}.mat-checkbox-anim-unchecked-indeterminate .mat-checkbox-mixedmark{animation:90ms linear 0s mat-checkbox-unchecked-indeterminate-mixedmark}.mat-checkbox-anim-checked-unchecked .mat-checkbox-background{animation:180ms linear 0s mat-checkbox-fade-out-background}.mat-checkbox-anim-checked-unchecked .mat-checkbox-checkmark-path{animation:90ms linear 0s mat-checkbox-checked-unchecked-checkmark-path}.mat-checkbox-anim-checked-indeterminate .mat-checkbox-checkmark{animation:90ms linear 0s mat-checkbox-checked-indeterminate-checkmark}.mat-checkbox-anim-checked-indeterminate .mat-checkbox-mixedmark{animation:90ms linear 0s mat-checkbox-checked-indeterminate-mixedmark}.mat-checkbox-anim-indeterminate-checked .mat-checkbox-checkmark{animation:.5s linear 0s mat-checkbox-indeterminate-checked-checkmark}.mat-checkbox-anim-indeterminate-checked .mat-checkbox-mixedmark{animation:.5s linear 0s mat-checkbox-indeterminate-checked-mixedmark}.mat-checkbox-anim-indeterminate-unchecked .mat-checkbox-background{animation:180ms linear 0s mat-checkbox-fade-out-background}.mat-checkbox-anim-indeterminate-unchecked .mat-checkbox-mixedmark{animation:.3s linear 0s mat-checkbox-indeterminate-unchecked-mixedmark}.mat-checkbox-input{bottom:0;left:50%}.mat-checkbox-ripple{position:absolute;left:calc(50% - 25px);top:calc(50% - 25px);height:50px;width:50px;z-index:1;pointer-events:none}"],data:{}});function Kx(t){return bs(2,[ss(402653184,1,{_inputElement:0}),ss(402653184,2,{ripple:0}),(t()(),to(2,0,[["label",1]],null,15,"label",[["class","mat-checkbox-layout"]],[[1,"for",0]],null,null,null,null)),(t()(),to(3,0,null,null,9,"div",[["class","mat-checkbox-inner-container"]],[[2,"mat-checkbox-inner-container-no-side-margin",null]],null,null,null,null)),(t()(),to(4,0,[[1,0],["input",1]],null,0,"input",[["class","mat-checkbox-input cdk-visually-hidden"],["type","checkbox"]],[[8,"id",0],[8,"required",0],[8,"checked",0],[1,"value",0],[8,"disabled",0],[1,"name",0],[8,"tabIndex",0],[8,"indeterminate",0],[1,"aria-label",0],[1,"aria-labelledby",0],[1,"aria-checked",0]],[[null,"change"],[null,"click"]],function(t,e,n){var i=!0,r=t.component;return"change"===e&&(i=!1!==r._onInteractionEvent(n)&&i),"click"===e&&(i=!1!==r._onInputClick(n)&&i),i},null,null)),(t()(),to(5,0,null,null,2,"div",[["class","mat-checkbox-ripple mat-ripple"],["matRipple",""]],[[2,"mat-ripple-unbounded",null]],null,null,null,null)),Wo(6,212992,[[2,4]],0,iv,[ei,An,Yd,[2,nv],[2,c_]],{centered:[0,"centered"],radius:[1,"radius"],animation:[2,"animation"],disabled:[3,"disabled"],trigger:[4,"trigger"]},null),fs(7,{enterDuration:0}),(t()(),to(8,0,null,null,0,"div",[["class","mat-checkbox-frame"]],null,null,null,null,null)),(t()(),to(9,0,null,null,3,"div",[["class","mat-checkbox-background"]],null,null,null,null,null)),(t()(),to(10,0,null,null,1,":svg:svg",[[":xml:space","preserve"],["class","mat-checkbox-checkmark"],["focusable","false"],["version","1.1"],["viewBox","0 0 24 24"]],null,null,null,null,null)),(t()(),to(11,0,null,null,0,":svg:path",[["class","mat-checkbox-checkmark-path"],["d","M4.1,12.7 9,17.6 20.3,6.3"],["fill","none"],["stroke","white"]],null,null,null,null,null)),(t()(),to(12,0,null,null,0,"div",[["class","mat-checkbox-mixedmark"]],null,null,null,null,null)),(t()(),to(13,0,[["checkboxLabel",1]],null,4,"span",[["class","mat-checkbox-label"]],null,[[null,"cdkObserveContent"]],function(t,e,n){var i=!0;return"cdkObserveContent"===e&&(i=!1!==t.component._onLabelTextChange()&&i),i},null,null)),Wo(14,1196032,null,0,xm,[wm,ei,An],null,{event:"cdkObserveContent"}),(t()(),to(15,0,null,null,1,"span",[["style","display:none"]],null,null,null,null,null)),(t()(),ms(-1,null,["\xa0"])),hs(null,0)],function(t,e){var n=e.component;t(e,6,0,!0,25,t(e,7,0,150),n._isRippleDisabled(),Ao(e,2))},function(t,e){var n=e.component;t(e,2,0,n.inputId),t(e,3,0,!Ao(e,13).textContent||!Ao(e,13).textContent.trim()),t(e,4,1,[n.inputId,n.required,n.checked,n.value,n.disabled,n.name,n.tabIndex,n.indeterminate,n.ariaLabel||null,n.ariaLabelledby,n._getAriaChecked()]),t(e,5,0,Ao(e,6).unbounded)})}var Zx=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Qx=function(t){function e(e,n,i,r,o){var s=t.call(this,n,r)||this;return s.canvas=e,s.history=n,s.resizeTool=i,s.controls=r,s.toast=o,s.name="resize",s.usePercentages=!1,s.maintainAspectRatio=!0,s.dirty=!0,s}return Zx(e,t),Object.defineProperty(e.prototype,"width",{get:function(){return this._width},set:function(t){this._width=Math.floor(t),this.aspectToHeight(this._width)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this._height},set:function(t){this._height=Math.floor(t),this.aspectToWidth(this._height)},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){this.width=this.usePercentages?100:this.canvas.state.original.width,this.height=this.usePercentages?100:this.canvas.state.original.height},e.prototype.apply=function(){this.resizeTool.apply(this.width,this.height,this.usePercentages),t.prototype.apply.call(this),this.toast.open("Photo resized.")},e.prototype.togglePercentages=function(){this.usePercentages?(this.width=100,this.height=100):(this.width=this.canvas.state.original.width,this.height=this.canvas.state.original.height)},e.prototype.aspectToWidth=function(t){if(this.maintainAspectRatio)if(this.usePercentages)this._width=t;else{var e=parseFloat((this.canvas.state.original.height/t).toPrecision(3));this._width=Math.floor(this.canvas.state.original.width/e)}},e.prototype.aspectToHeight=function(t){if(this.maintainAspectRatio)if(this.usePercentages)this._height=t;else{var e=parseFloat((this.canvas.state.original.width/t).toPrecision(3));this._height=Math.floor(this.canvas.state.original.height/e)}},e}(jx),Jx=function(){function t(t){this.canvas=t}return t.prototype.apply=function(t,e,n){void 0===n&&(n=!1);var i,r,o=Math.ceil(this.canvas.state.original.width),s=Math.ceil(this.canvas.state.original.height),a=Math.ceil(t),l=Math.ceil(e);n?(i=t/100,r=e/100):(i=t/this.canvas.state.original.width,r=e/this.canvas.state.original.height),o===a&&s===l||this.resize(i,r)},t.prototype.resize=function(t,e){this.canvas.zoom.set(1,!1);var n=Math.round(this.canvas.state.original.height*e),i=Math.round(this.canvas.state.original.width*t);this.canvas.fabric().setHeight(n),this.canvas.fabric().setWidth(i),this.canvas.state.original.width=i,this.canvas.state.original.height=n,this.canvas.fabric().getObjects().forEach(function(n){var i=n.scaleY*e,r=n.left*t,o=n.top*e;n.scaleX=n.scaleX*t,n.scaleY=i,n.left=r,n.top=o,n.setCoords()}),this.canvas.zoom.fitToScreen(),this.canvas.render()},t}(),$x=Sr({encapsulation:2,styles:[["resize-drawer{display:block}resize-drawer .input-container{display:inline-block;width:auto;margin:0 15px;text-align:center}resize-drawer .input-container.checkbox-container{text-align:left}resize-drawer .input-container>input{width:95px;height:45px;border-radius:3px}resize-drawer .input-container>label{padding:0}resize-drawer .input-container>.mat-checkbox{display:block}resize-drawer .input-container>.mat-checkbox:first-of-type{margin-bottom:8px}resize-drawer form{margin:0}@media only screen and (max-width:768px){resize-drawer .content{flex-direction:column;height:100%}resize-drawer .input-container>input{height:40px}resize-drawer .input-container>label{font-size:1.3rem}resize-drawer .input-container>.percentages-checkbox{display:none}resize-drawer .input-container>.aspect-ratio-checkbox{margin:8px}resize-drawer .input-container>.aspect-ratio-checkbox label{padding:0}}"]],data:{}});function tC(t){return bs(0,[(t()(),to(0,0,null,null,48,"div",[["class","content"]],null,null,null,null,null)),(t()(),to(1,0,null,null,30,"form",[["ngNativeValidate",""]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngSubmit"],[null,"submit"],[null,"reset"]],function(t,e,n){var i=!0,r=t.component;return"submit"===e&&(i=!1!==Ao(t,2).onSubmit(n)&&i),"reset"===e&&(i=!1!==Ao(t,2).onReset()&&i),"ngSubmit"===e&&(i=!1!==r.apply()&&i),i},null,null)),Wo(2,4210688,null,0,Qp,[[8,null],[8,null]],null,{ngSubmit:"ngSubmit"}),Xo(2048,null,Gh,null,[Qp]),Wo(4,16384,null,0,Hp,[[4,Gh]],null,null),(t()(),to(5,0,null,null,12,"div",[["class","input-container"]],null,null,null,null,null)),(t()(),to(6,0,null,null,2,"label",[["for","width"],["trans",""]],null,null,null,null,null)),Wo(7,4341760,null,0,lv,[ei,uv,wu],null,null),(t()(),ms(-1,null,["Width"])),(t()(),to(9,0,null,null,8,"input",[["id","width"],["name","width"],["required",""],["type","number"]],[[8,"min",0],[1,"required",0],[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngModelChange"],[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"],[null,"change"]],function(t,e,n){var i=!0,r=t.component;return"input"===e&&(i=!1!==Ao(t,10)._handleInput(n.target.value)&&i),"blur"===e&&(i=!1!==Ao(t,10).onTouched()&&i),"compositionstart"===e&&(i=!1!==Ao(t,10)._compositionStart()&&i),"compositionend"===e&&(i=!1!==Ao(t,10)._compositionEnd(n.target.value)&&i),"change"===e&&(i=!1!==Ao(t,11).onChange(n.target.value)&&i),"input"===e&&(i=!1!==Ao(t,11).onChange(n.target.value)&&i),"blur"===e&&(i=!1!==Ao(t,11).onTouched()&&i),"ngModelChange"===e&&(i=!1!==(r.width=n)&&i),i},null,null)),Wo(10,16384,null,0,sp,[ti,ei,[2,op]],null,null),Wo(11,16384,null,0,up,[ti,ei],null,null),Wo(12,16384,null,0,ud,[],{required:[0,"required"]},null),Xo(1024,null,Zh,function(t){return[t]},[ud]),Xo(1024,null,ip,function(t,e){return[t,e]},[sp,up]),Wo(15,671744,null,0,ed,[[2,Gh],[6,Zh],[8,null],[6,ip]],{name:[0,"name"],model:[1,"model"]},{update:"ngModelChange"}),Xo(2048,null,hp,null,[ed]),Wo(17,16384,null,0,zp,[[4,hp]],null,null),(t()(),to(18,0,null,null,12,"div",[["class","input-container"]],null,null,null,null,null)),(t()(),to(19,0,null,null,2,"label",[["for","height"],["trans",""]],null,null,null,null,null)),Wo(20,4341760,null,0,lv,[ei,uv,wu],null,null),(t()(),ms(-1,null,["Height"])),(t()(),to(22,0,null,null,8,"input",[["id","height"],["name","height"],["required",""],["type","number"]],[[8,"min",0],[1,"required",0],[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngModelChange"],[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"],[null,"change"]],function(t,e,n){var i=!0,r=t.component;return"input"===e&&(i=!1!==Ao(t,23)._handleInput(n.target.value)&&i),"blur"===e&&(i=!1!==Ao(t,23).onTouched()&&i),"compositionstart"===e&&(i=!1!==Ao(t,23)._compositionStart()&&i),"compositionend"===e&&(i=!1!==Ao(t,23)._compositionEnd(n.target.value)&&i),"change"===e&&(i=!1!==Ao(t,24).onChange(n.target.value)&&i),"input"===e&&(i=!1!==Ao(t,24).onChange(n.target.value)&&i),"blur"===e&&(i=!1!==Ao(t,24).onTouched()&&i),"ngModelChange"===e&&(i=!1!==(r.height=n)&&i),i},null,null)),Wo(23,16384,null,0,sp,[ti,ei,[2,op]],null,null),Wo(24,16384,null,0,up,[ti,ei],null,null),Wo(25,16384,null,0,ud,[],{required:[0,"required"]},null),Xo(1024,null,Zh,function(t){return[t]},[ud]),Xo(1024,null,ip,function(t,e){return[t,e]},[sp,up]),Wo(28,671744,null,0,ed,[[2,Gh],[6,Zh],[8,null],[6,ip]],{name:[0,"name"],model:[1,"model"]},{update:"ngModelChange"}),Xo(2048,null,hp,null,[ed]),Wo(30,16384,null,0,zp,[[4,hp]],null,null),(t()(),to(31,0,null,null,0,"button",[["class","hidden"],["type","submit"]],null,null,null,null,null)),(t()(),to(32,0,null,null,16,"div",[["class","input-container checkbox-container"]],null,null,null,null,null)),(t()(),to(33,0,null,null,7,"mat-checkbox",[["class","aspect-ratio-checkbox mat-checkbox"],["trans",""]],[[8,"id",0],[2,"mat-checkbox-indeterminate",null],[2,"mat-checkbox-checked",null],[2,"mat-checkbox-disabled",null],[2,"mat-checkbox-label-before",null],[2,"_mat-animation-noopable",null],[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngModelChange"]],function(t,e,n){var i=!0;return"ngModelChange"===e&&(i=!1!==(t.component.maintainAspectRatio=n)&&i),i},Kx,Gx)),Wo(34,4374528,null,0,Yx,[ei,oi,Lm,An,[8,null],[2,Wx],[2,c_]],null,null),Xo(1024,null,ip,function(t){return[t]},[Yx]),Wo(36,671744,null,0,ed,[[8,null],[8,null],[8,null],[6,ip]],{model:[0,"model"]},{update:"ngModelChange"}),Xo(2048,null,hp,null,[ed]),Wo(38,16384,null,0,zp,[[4,hp]],null,null),Wo(39,4341760,null,0,lv,[ei,uv,wu],null,null),(t()(),ms(-1,0,["Maintain Aspect Ratio"])),(t()(),to(41,0,null,null,7,"mat-checkbox",[["class","percentages-checkbox mat-checkbox"],["trans",""]],[[8,"id",0],[2,"mat-checkbox-indeterminate",null],[2,"mat-checkbox-checked",null],[2,"mat-checkbox-disabled",null],[2,"mat-checkbox-label-before",null],[2,"_mat-animation-noopable",null],[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngModelChange"]],function(t,e,n){var i=!0,r=t.component;return"ngModelChange"===e&&(i=!1!==(r.usePercentages=n)&&i),"ngModelChange"===e&&(i=!1!==r.togglePercentages()&&i),i},Kx,Gx)),Wo(42,4374528,null,0,Yx,[ei,oi,Lm,An,[8,null],[2,Wx],[2,c_]],null,null),Xo(1024,null,ip,function(t){return[t]},[Yx]),Wo(44,671744,null,0,ed,[[8,null],[8,null],[8,null],[6,ip]],{model:[0,"model"]},{update:"ngModelChange"}),Xo(2048,null,hp,null,[ed]),Wo(46,16384,null,0,zp,[[4,hp]],null,null),Wo(47,4341760,null,0,lv,[ei,uv,wu],null,null),(t()(),ms(-1,0,["Use Percentages"]))],function(t,e){var n=e.component;t(e,12,0,""),t(e,15,0,"width",n.width),t(e,25,0,""),t(e,28,0,"height",n.height),t(e,36,0,n.maintainAspectRatio),t(e,44,0,n.usePercentages)},function(t,e){t(e,1,0,Ao(e,4).ngClassUntouched,Ao(e,4).ngClassTouched,Ao(e,4).ngClassPristine,Ao(e,4).ngClassDirty,Ao(e,4).ngClassValid,Ao(e,4).ngClassInvalid,Ao(e,4).ngClassPending),t(e,9,0,1,Ao(e,12).required?"":null,Ao(e,17).ngClassUntouched,Ao(e,17).ngClassTouched,Ao(e,17).ngClassPristine,Ao(e,17).ngClassDirty,Ao(e,17).ngClassValid,Ao(e,17).ngClassInvalid,Ao(e,17).ngClassPending),t(e,22,0,1,Ao(e,25).required?"":null,Ao(e,30).ngClassUntouched,Ao(e,30).ngClassTouched,Ao(e,30).ngClassPristine,Ao(e,30).ngClassDirty,Ao(e,30).ngClassValid,Ao(e,30).ngClassInvalid,Ao(e,30).ngClassPending),t(e,33,1,[Ao(e,34).id,Ao(e,34).indeterminate,Ao(e,34).checked,Ao(e,34).disabled,"before"==Ao(e,34).labelPosition,"NoopAnimations"===Ao(e,34)._animationMode,Ao(e,38).ngClassUntouched,Ao(e,38).ngClassTouched,Ao(e,38).ngClassPristine,Ao(e,38).ngClassDirty,Ao(e,38).ngClassValid,Ao(e,38).ngClassInvalid,Ao(e,38).ngClassPending]),t(e,41,1,[Ao(e,42).id,Ao(e,42).indeterminate,Ao(e,42).checked,Ao(e,42).disabled,"before"==Ao(e,42).labelPosition,"NoopAnimations"===Ao(e,42)._animationMode,Ao(e,46).ngClassUntouched,Ao(e,46).ngClassTouched,Ao(e,46).ngClassPristine,Ao(e,46).ngClassDirty,Ao(e,46).ngClassValid,Ao(e,46).ngClassInvalid,Ao(e,46).ngClassPending])})}var eC=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),nC=function(t){function e(e,n,i){var r=t.call(this,e,i)||this;return r.history=e,r.transformTool=n,r.controls=i,r.name="transform",r}return eC(e,t),e.prototype.rotateLeft=function(){this.transformTool.rotate("basic",-90),this.dirty=!0},e.prototype.rotateRight=function(){this.transformTool.rotate("basic",90),this.dirty=!0},e.prototype.skew=function(t){this.transformTool.rotate("skew",t.value),this.dirty=!0},e.prototype.flipHorizontal=function(){this.transformTool.flip("horizontal"),this.dirty=!0},e.prototype.flipVertical=function(){this.transformTool.flip("vertical"),this.dirty=!0},e}(jx),iC=function(){function t(t){this.canvas=t}return t.prototype.rotate=function(t,e,n){"basic"===t?this.rotateFixed(e):this.rotateFree(e,n)},t.prototype.flip=function(t){var e="horizontal"===t?"flipY":"flipX";this.canvas.fabric().forEachObject(function(t){t[e]=!t[e]}),this.canvas.render()},t.prototype.rotateFixed=function(t){this.canvas.zoom.set(1);var e=(this.canvas.getMainImage().angle+t)%360,n=Math.abs(this.canvas.getMainImage().width*Math.sin(e*Math.PI/180))+Math.abs(this.canvas.getMainImage().height*Math.cos(e*Math.PI/180)),i=Math.abs(this.canvas.getMainImage().height*Math.sin(e*Math.PI/180))+Math.abs(this.canvas.getMainImage().width*Math.cos(e*Math.PI/180));this.canvas.resize(i,n),this.canvas.getMainImage().viewportCenter(),this.canvas.fabric().forEachObject(function(e){e.rotate((e.angle+t)%360),e.setCoords()}),this.canvas.render(),this.canvas.zoom.fitToScreen()},t.prototype.rotateFree=function(t,e){var n=this;if(!(t>360||t<0)){var i=!1;this.canvas.fabric().forEachObject(function(r){e&&"left"===e?t=r.angle-90:e&&"right"===e&&(t=r.angle+90),"center"===r.originX&&"center"===r.originY||!r.centeredRotation||(n.setOriginToCenter(r),i=!0),r.angle=t=t>360?90:t<0?270:t,r.setCoords(),i&&n.setCenterToOrigin(r)}),this.canvas.render()}},t.prototype.setOriginToCenter=function(t){t._originalOriginX=t.originX,t._originalOriginY=t.originY;var e=t.getCenterPoint();t.set({originX:"center",originY:"center",left:e.x,top:e.y})},t.prototype.setCenterToOrigin=function(t){var e=t.translateToOriginPoint(t.getCenterPoint(),t._originalOriginX,t._originalOriginY);t.set({originX:t._originalOriginX,originY:t._originalOriginY,left:e.x,top:e.y})},t}(),rC=Sr({encapsulation:2,styles:[["transform-drawer{display:block}transform-drawer .content{flex-wrap:wrap}transform-drawer .buttons-container{margin:0 25px}transform-drawer .button-with-image.small{width:55px;height:55px}transform-drawer .button-with-image.small img,transform-drawer .button-with-image.small mat-icon{width:30px;height:30px}@media only screen and (max-width:768px){transform-drawer .buttons-container{margin:0}transform-drawer .mat-slider{display:none}}"]],data:{}});function oC(t){return bs(0,[(t()(),to(0,0,null,null,17,"div",[["class","content"]],null,null,null,null,null)),(t()(),to(1,0,null,null,6,"div",[["class","buttons-container"]],null,null,null,null,null)),(t()(),to(2,0,null,null,2,"button",[["class","rotate-button button-with-image small"]],null,[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.rotateLeft()&&i),i},null,null)),(t()(),to(3,0,null,null,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","rotate-left"]],[[2,"mat-icon-inline",null]],null,null,Tv,Ev)),Wo(4,638976,null,0,Sv,[ei,_v,[8,null]],{svgIcon:[0,"svgIcon"]},null),(t()(),to(5,0,null,null,2,"button",[["class","rotate-button button-with-image small"]],null,[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.rotateRight()&&i),i},null,null)),(t()(),to(6,0,null,null,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","rotate-right"]],[[2,"mat-icon-inline",null]],null,null,Tv,Ev)),Wo(7,638976,null,0,Sv,[ei,_v,[8,null]],{svgIcon:[0,"svgIcon"]},null),(t()(),to(8,0,null,null,6,"div",[["class","buttons-container"]],null,null,null,null,null)),(t()(),to(9,0,null,null,2,"button",[["class","rotate-button button-with-image small"]],null,[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.flipVertical()&&i),i},null,null)),(t()(),to(10,0,null,null,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","flip-vertical-custom"]],[[2,"mat-icon-inline",null]],null,null,Tv,Ev)),Wo(11,638976,null,0,Sv,[ei,_v,[8,null]],{svgIcon:[0,"svgIcon"]},null),(t()(),to(12,0,null,null,2,"button",[["class","rotate-button button-with-image small"]],null,[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.flipHorizontal()&&i),i},null,null)),(t()(),to(13,0,null,null,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","flip-horizontal-custom"]],[[2,"mat-icon-inline",null]],null,null,Tv,Ev)),Wo(14,638976,null,0,Sv,[ei,_v,[8,null]],{svgIcon:[0,"svgIcon"]},null),(t()(),to(15,0,null,null,2,"mat-slider",[["class","mat-slider"],["role","slider"]],[[8,"tabIndex",0],[1,"aria-disabled",0],[1,"aria-valuemax",0],[1,"aria-valuemin",0],[1,"aria-valuenow",0],[1,"aria-orientation",0],[2,"mat-slider-disabled",null],[2,"mat-slider-has-ticks",null],[2,"mat-slider-horizontal",null],[2,"mat-slider-axis-inverted",null],[2,"mat-slider-sliding",null],[2,"mat-slider-thumb-label-showing",null],[2,"mat-slider-vertical",null],[2,"mat-slider-min-value",null],[2,"mat-slider-hide-last-tick",null],[2,"_mat-animation-noopable",null]],[[null,"input"],[null,"focus"],[null,"blur"],[null,"click"],[null,"keydown"],[null,"keyup"],[null,"mouseenter"],[null,"slide"],[null,"slideend"],[null,"slidestart"]],function(t,e,n){var i=!0,r=t.component;return"focus"===e&&(i=!1!==Ao(t,17)._onFocus()&&i),"blur"===e&&(i=!1!==Ao(t,17)._onBlur()&&i),"click"===e&&(i=!1!==Ao(t,17)._onClick(n)&&i),"keydown"===e&&(i=!1!==Ao(t,17)._onKeydown(n)&&i),"keyup"===e&&(i=!1!==Ao(t,17)._onKeyup()&&i),"mouseenter"===e&&(i=!1!==Ao(t,17)._onMouseenter()&&i),"slide"===e&&(i=!1!==Ao(t,17)._onSlide(n)&&i),"slideend"===e&&(i=!1!==Ao(t,17)._onSlideEnd()&&i),"slidestart"===e&&(i=!1!==Ao(t,17)._onSlideStart(n)&&i),"input"===e&&(i=!1!==r.skew(n)&&i),i},bx,yx)),Xo(5120,null,ip,function(t){return[t]},[mx]),Wo(17,245760,null,0,mx,[ei,Lm,oi,[2,km],[8,null],[2,c_]],{max:[0,"max"],min:[1,"min"]},{input:"input"})],function(t,e){t(e,4,0,"rotate-left"),t(e,7,0,"rotate-right"),t(e,11,0,"flip-vertical-custom"),t(e,14,0,"flip-horizontal-custom"),t(e,17,0,360,0)},function(t,e){t(e,3,0,Ao(e,4).inline),t(e,6,0,Ao(e,7).inline),t(e,10,0,Ao(e,11).inline),t(e,13,0,Ao(e,14).inline),t(e,15,1,[Ao(e,17).tabIndex,Ao(e,17).disabled,Ao(e,17).max,Ao(e,17).min,Ao(e,17).value,Ao(e,17).vertical?"vertical":"horizontal",Ao(e,17).disabled,Ao(e,17).tickInterval,!Ao(e,17).vertical,Ao(e,17)._invertAxis,Ao(e,17)._isSliding,Ao(e,17).thumbLabel,Ao(e,17).vertical,Ao(e,17)._isMinValue,Ao(e,17).disabled||Ao(e,17)._isMinValue&&Ao(e,17)._thumbGap&&Ao(e,17)._invertAxis,"NoopAnimations"===Ao(e,17)._animationMode])})}var sC=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),aC=function(t){function e(e,n,i,r,o){var s=t.call(this,i,r)||this;return s.cropZone=e,s.cropTool=n,s.history=i,s.controls=r,s.config=o,s.name="crop",s.aspectRatios=s.config.get("pixie.tools.crop.items"),s.dirty=!0,s}return sC(e,t),e.prototype.ngAfterViewInit=function(){var t=this;this.ratioPreviews.forEach(function(e){var n=t.cropZone.getAdjustedSize(e.nativeElement.dataset.ratio,40,30);e.nativeElement.style.width=n.width+"px",e.nativeElement.style.height=n.height+"px"})},e.prototype.ngOnInit=function(){var t=this;this.cropZone.draw(),this.updateZoneSize(),this.cropZone.resize$.subscribe(function(){return t.updateZoneSize()})},e.prototype.ngOnDestroy=function(){this.cropZone.remove()},e.prototype.apply=function(){this.cropZone.remove(),this.cropTool.apply(this.cropZone.getSize()),this.dirty=!0,t.prototype.apply.call(this)},e.prototype.applyAspectRatio=function(t){this.cropZone.changeAspectRatio(t),this.updateZoneSize()},e.prototype.updateZoneSize=function(){var t=this.cropZone.getSize();this.cropzoneHeight=Math.floor(t.height),this.cropzoneWidth=Math.floor(t.width)},e.prototype.resizeCropzone=function(){this.cropZone.resize(this.cropzoneWidth,this.cropzoneHeight)},e}(jx),lC=function(){function t(t,e){this.canvas=t,this.canvasState=e,this.initiated=!1,this.gridColor="rgba(244,244,244,.4)",this.aspectRatio="16:9",this.resize$=new at}return t.prototype.draw=function(){this.drawMainZone(),this.drawOverlay(),this.drawGrid(),this.attachEvents(),this.canvas.render(),this.initiated=!0},t.prototype.remove=function(){this.initiated&&(this.rect.off(),this.canvas.fabric().discardActiveObject(),this.canvas.fabric().remove(this.rect,this.grid,this.overlay),this.canvas.render(),this.initiated=!1)},t.prototype.constrainWithinCanvas=function(t){var e=t.left,n=t.top,i=t.getScaledWidth(),r=t.getScaledHeight(),o=this.canvasState.original.width-i,s=this.canvasState.original.height-r;e<0&&(t.left=0),n<0&&(t.top=0),e>o&&(t.left=o),n>s&&(t.top=s)},t.prototype.constrainWithinCanvasOnScaling=function(t){var e=Math.floor(t.left),n=Math.floor(t.top),i=e+t.getScaledWidth()-1,r=n+t.getScaledHeight()-1;(e<0||i>this.canvasState.original.width)&&(t.scaleX=this.lastScaleX||1),e<0&&(t.left=0),(n<0||r>this.canvasState.original.height)&&(t.scaleY=this.lastScaleY||1),n<0&&(t.top=0),this.lastScaleX=t.scaleX,this.lastScaleY=t.scaleY},t.prototype.attachEvents=function(){var t=this;this.rect.on("moving",function(){t.constrainWithinCanvas(t.rect),t.drawOverlay(),t.drawGrid(),t.resize$.next()}),this.rect.on("scaling",function(){t.constrainWithinCanvasOnScaling(t.rect),t.drawOverlay(),t.drawGrid(),t.resize$.next()})},t.prototype.gcd=function(t,e){return 0==e?t:this.gcd(e,t%e)},t.prototype.getAdjustedSize=function(t,e,n){void 0===t&&(t="16:9");var i=e,r=n,o=t.split(":"),s=parseInt(o[0])/parseInt(o[1]);return n*s>e?r=e/s:i=n*s,{width:i,height:r}},t.prototype.drawMainZone=function(t){var e=this;this.initiated||(this.rect=new yu.fabric.Rect({fill:"transparent",borderColor:this.gridColor,borderScaleFactor:2,hasRotatingPoint:!1,name:"crop.zone",lockScalingFlip:!0,minScaleLimit:0}),this.rect.on("deselected",function(){e.canvas.fabric().setActiveObject(e.rect)}),this.canvas.fabric().add(this.rect),this.rect.moveTo(3),this.canvas.fabric().setActiveObject(this.rect));var n=this.getAdjustedSize(t,this.canvasState.original.width,this.canvasState.original.height);this.rect.set({width:n.width,height:n.height,lockUniScaling:!!t}),this.rect.viewportCenter(),this.rect.setCoords()},t.prototype.drawGrid=function(){if(!this.initiated){var t={stroke:this.gridColor,strokeWidth:4,selectable:!1,evented:!1},e=[new yu.fabric.Line([],t),new yu.fabric.Line([],t),new yu.fabric.Line([],t),new yu.fabric.Line([],t)];this.grid=new yu.fabric.Group(e,{name:"crop.grid",selectable:!1,evented:!1}),this.canvas.fabric().add(this.grid),this.grid.moveTo(10)}this.grid.width=this.rect.getScaledWidth(),this.grid.height=this.rect.getScaledHeight(),this.grid.left=this.rect.left,this.grid.top=this.rect.top;var n=this.grid.width/2,i=this.grid.width/3,r=this.grid.height/2,o=this.grid.height/3,s=this.grid.getObjects();s[0].set({x1:-(n-i),y1:-r,x2:-(n-i),y2:r}),s[1].set({x1:n-i,y1:-r,x2:n-i,y2:r}),s[2].set({x1:-n,y1:-(r-o),x2:n,y2:-(r-o)}),s[3].set({x1:-n,y1:r-o,x2:n,y2:r-o})},t.prototype.drawOverlay=function(){if(!this.initiated){var t=new yu.fabric.Rect({fill:"rgba(0,0,0,0.6)",selectable:!0,evented:!1}),e=new yu.fabric.Rect({fill:"rgba(0,0,0,0.6)",selectable:!0,evented:!1}),n=new yu.fabric.Rect({fill:"rgba(0,0,0,0.6)",selectable:!0,evented:!1}),i=new yu.fabric.Rect({fill:"rgba(0,0,0,0.6)",selectable:!0,evented:!1});this.overlay=new yu.fabric.Group([t,e,n,i],{width:this.canvasState.original.width,height:this.canvasState.original.height,selectable:!1,evented:!1,name:"crop.overlay"}),this.canvas.fabric().add(this.overlay),this.overlay.moveTo(1)}var r=-this.overlay.width/2,o=-this.overlay.height/2,s=this.overlay.getObjects();s[0].set({left:r,top:o,width:this.overlay.width,height:this.rect.getScaledHeight()<0?this.rect.top-Math.abs(this.rect.getScaledHeight()):this.rect.top}),s[1].set({left:(this.rect.getScaledWidth()<0?this.rect.left:this.rect.left+this.rect.getScaledWidth())+r,top:this.rect.top+o,width:this.rect.getScaledWidth()<0?this.canvasState.original.width-(this.rect.left+this.rect.getScaledWidth())-Math.abs(this.rect.getScaledWidth()):this.canvasState.original.width-(this.rect.left+this.rect.getScaledWidth()),height:this.rect.getScaledHeight()}),s[2].set({left:r,top:(this.rect.getScaledHeight()<0?this.rect.top:this.rect.top+this.rect.getScaledHeight())+o,width:this.canvasState.original.width,height:this.rect.getScaledHeight()<0?this.canvasState.original.height-this.rect.top:this.canvasState.original.height-(this.rect.top+this.rect.getScaledHeight())}),s[3].set({left:r,top:this.rect.top+o,width:this.rect.getScaledWidth()>0?this.rect.left:this.rect.left-Math.abs(this.rect.getScaledWidth()),height:this.rect.getScaledHeight()})},t.prototype.changeAspectRatio=function(t){this.aspectRatio=t,this.drawMainZone(t),this.drawOverlay(),this.drawGrid(),this.canvas.render()},t.prototype.getSize=function(){return{width:this.rect.getScaledWidth(),height:this.rect.getScaledHeight(),left:this.rect.left,top:this.rect.top}},t.prototype.resize=function(t,e){this.aspectRatio=null,this.rect.width=t,this.rect.height=e,this.rect.lockUniScaling=!1,this.rect.setCoords(),this.drawOverlay(),this.drawGrid(),this.canvas.render()},t}(),uC=function(){function t(t,e){this.canvas=t,this.mergeTool=e}return t.prototype.apply=function(t){var e=this;this.mergeTool.apply().then(function(){e.canvas.resize(t.width,t.height);var n=e.canvas.getMainImage();n.cropX=t.left,n.cropY=t.top,n.width=t.width,n.height=t.height,e.canvas.render()})},t}(),cC=Sr({encapsulation:2,styles:[["crop-drawer{display:block}crop-drawer .custom-ratio-container{padding-right:10px;border-right:1px solid #e0e0e0}crop-drawer .custom-ratio-container .input-container{display:inline-block;width:auto;margin:0 15px;text-align:center}crop-drawer .custom-ratio-container .input-container.checkbox-container{text-align:left}crop-drawer .custom-ratio-container .input-container>input{width:95px;height:45px;border-radius:3px}crop-drawer .custom-ratio-container .input-container>label{padding:0}crop-drawer .custom-ratio-container .input-container>.mat-checkbox{display:block}crop-drawer .custom-ratio-container .input-container>.mat-checkbox:first-of-type{margin-bottom:8px}crop-drawer .aspect-ratios{display:flex;align-items:flex-end}crop-drawer .aspect-ratios>.aspect-ratio{cursor:pointer;padding:0 20px}crop-drawer .aspect-ratios>.aspect-ratio.selected,crop-drawer .aspect-ratios>.aspect-ratio:hover .name{color:#009688}crop-drawer .aspect-ratios>.aspect-ratio>.preview{width:40px;height:30px;border:3px solid currentColor}crop-drawer .aspect-ratios>.aspect-ratio>.name{font-size:1.5rem;text-align:center;margin-top:6px}@media only screen and (max-width:1168px){crop-drawer .custom-ratio-container{display:none}}@media only screen and (max-width:768px){crop-drawer.controls-drawer .content{justify-content:flex-start}crop-drawer .custom-ratio-container{display:none}}"]],data:{}});function hC(t){return bs(0,[(t()(),to(0,0,null,null,23,"div",[["class","custom-ratio-container"]],null,null,null,null,null)),(t()(),to(1,0,null,null,22,"div",[["class","inputs"]],null,null,null,null,null)),(t()(),to(2,0,null,null,10,"div",[["class","input-container"]],null,null,null,null,null)),(t()(),to(3,0,null,null,2,"label",[["for","width"],["trans",""]],null,null,null,null,null)),Wo(4,4341760,null,0,lv,[ei,uv,wu],null,null),(t()(),ms(-1,null,["Width"])),(t()(),to(6,0,null,null,6,"input",[["id","width"],["min","1"],["type","number"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngModelChange"],[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"],[null,"change"]],function(t,e,n){var i=!0,r=t.component;return"input"===e&&(i=!1!==Ao(t,7)._handleInput(n.target.value)&&i),"blur"===e&&(i=!1!==Ao(t,7).onTouched()&&i),"compositionstart"===e&&(i=!1!==Ao(t,7)._compositionStart()&&i),"compositionend"===e&&(i=!1!==Ao(t,7)._compositionEnd(n.target.value)&&i),"change"===e&&(i=!1!==Ao(t,8).onChange(n.target.value)&&i),"input"===e&&(i=!1!==Ao(t,8).onChange(n.target.value)&&i),"blur"===e&&(i=!1!==Ao(t,8).onTouched()&&i),"ngModelChange"===e&&(i=!1!==(r.cropzoneWidth=n)&&i),"ngModelChange"===e&&(i=!1!==r.resizeCropzone()&&i),i},null,null)),Wo(7,16384,null,0,sp,[ti,ei,[2,op]],null,null),Wo(8,16384,null,0,up,[ti,ei],null,null),Xo(1024,null,ip,function(t,e){return[t,e]},[sp,up]),Wo(10,671744,null,0,ed,[[8,null],[8,null],[8,null],[6,ip]],{model:[0,"model"]},{update:"ngModelChange"}),Xo(2048,null,hp,null,[ed]),Wo(12,16384,null,0,zp,[[4,hp]],null,null),(t()(),to(13,0,null,null,10,"div",[["class","input-container"]],null,null,null,null,null)),(t()(),to(14,0,null,null,2,"label",[["for","height"],["trans",""]],null,null,null,null,null)),Wo(15,4341760,null,0,lv,[ei,uv,wu],null,null),(t()(),ms(-1,null,["Height"])),(t()(),to(17,0,null,null,6,"input",[["id","height"],["min","1"],["type","number"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngModelChange"],[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"],[null,"change"]],function(t,e,n){var i=!0,r=t.component;return"input"===e&&(i=!1!==Ao(t,18)._handleInput(n.target.value)&&i),"blur"===e&&(i=!1!==Ao(t,18).onTouched()&&i),"compositionstart"===e&&(i=!1!==Ao(t,18)._compositionStart()&&i),"compositionend"===e&&(i=!1!==Ao(t,18)._compositionEnd(n.target.value)&&i),"change"===e&&(i=!1!==Ao(t,19).onChange(n.target.value)&&i),"input"===e&&(i=!1!==Ao(t,19).onChange(n.target.value)&&i),"blur"===e&&(i=!1!==Ao(t,19).onTouched()&&i),"ngModelChange"===e&&(i=!1!==(r.cropzoneHeight=n)&&i),"ngModelChange"===e&&(i=!1!==r.resizeCropzone()&&i),i},null,null)),Wo(18,16384,null,0,sp,[ti,ei,[2,op]],null,null),Wo(19,16384,null,0,up,[ti,ei],null,null),Xo(1024,null,ip,function(t,e){return[t,e]},[sp,up]),Wo(21,671744,null,0,ed,[[8,null],[8,null],[8,null],[6,ip]],{model:[0,"model"]},{update:"ngModelChange"}),Xo(2048,null,hp,null,[ed]),Wo(23,16384,null,0,zp,[[4,hp]],null,null)],function(t,e){var n=e.component;t(e,10,0,n.cropzoneWidth),t(e,21,0,n.cropzoneHeight)},function(t,e){t(e,6,0,Ao(e,12).ngClassUntouched,Ao(e,12).ngClassTouched,Ao(e,12).ngClassPristine,Ao(e,12).ngClassDirty,Ao(e,12).ngClassValid,Ao(e,12).ngClassInvalid,Ao(e,12).ngClassPending),t(e,17,0,Ao(e,23).ngClassUntouched,Ao(e,23).ngClassTouched,Ao(e,23).ngClassPristine,Ao(e,23).ngClassDirty,Ao(e,23).ngClassValid,Ao(e,23).ngClassInvalid,Ao(e,23).ngClassPending)})}function pC(t){return bs(0,[(t()(),to(0,0,null,null,3,"div",[["class","aspect-ratio"]],[[2,"selected",null]],[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.applyAspectRatio(t.context.$implicit)&&i),i},null,null)),(t()(),to(1,0,[[1,0],["ratioPreview",1]],null,0,"div",[["class","preview"]],[[1,"data-ratio",0]],null,null,null,null)),(t()(),to(2,0,null,null,1,"div",[["class","name"]],null,null,null,null,null)),(t()(),ms(3,null,["",""]))],null,function(t,e){t(e,0,0,e.component.cropZone.aspectRatio===e.context.$implicit),t(e,1,0,e.context.$implicit),t(e,3,0,e.context.$implicit)})}function dC(t){return bs(0,[ss(671088640,1,{ratioPreviews:1}),(t()(),to(1,0,null,null,5,"div",[["class","content"]],null,null,null,null,null)),(t()(),to(2,0,null,null,4,"div",[["class","aspect-ratios"]],null,null,null,null,null)),(t()(),$r(16777216,null,null,1,null,hC)),Wo(4,16384,null,0,Wu,[ri,ii],{ngIf:[0,"ngIf"]},null),(t()(),$r(16777216,null,null,1,null,pC)),Wo(6,278528,null,0,zu,[ri,ii,Ei],{ngForOf:[0,"ngForOf"]},null)],function(t,e){var n=e.component;t(e,4,0,!n.config.get("pixie.tools.crop.hideCustomControls")),t(e,6,0,n.aspectRatios)},null)}var fC=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),gC=function(t){function e(e,n,i,r,o,s){var a=t.call(this,i,r)||this;return a.drawTool=e,a.settings=n,a.history=i,a.editorControls=r,a.canvas=o,a.config=s,a.name="draw",a.brushSizes=a.config.get("pixie.tools.draw.brushSizes"),a.brushTypes=a.config.get("pixie.tools.draw.brushTypes"),a}return fC(e,t),e.prototype.ngOnInit=function(){this.drawTool.enable(),this.canvas.fabric().on("object:added",this.maybeMarkAsDirty.bind(this))},e.prototype.ngOnDestroy=function(){this.drawTool.disable(),this.canvas.fabric().off("object:added",this.maybeMarkAsDirty.bind(this))},e.prototype.getBrushPreviewUrl=function(t){var e=t.replace("Brush","").toLowerCase();return this.settings.getAssetUrl("images/brushes/"+e+"-square.png")},e.prototype.setBrushType=function(t){this.drawTool.setBrushType(t),this.editorControls.closePanel("draw.brushTypes")},e.prototype.maybeMarkAsDirty=function(){var t=this.canvas.fabric().getObjects().find(function(t){return"drawing"===t.name});t&&(this.dirty=!0,t.set({selectable:!1,evented:!1,hasControls:!1,hasBorders:!1}),this.canvas.render())},e}(jx),mC=function(t){var e=new yu.fabric.PatternBrush(t);return e.getPatternSrc=function(){var t=document.createElement("canvas");t.width=t.height=10;var e=t.getContext("2d");return e.strokeStyle=this.color,e.lineWidth=5,e.beginPath(),e.moveTo(0,5),e.lineTo(10,5),e.closePath(),e.stroke(),t},e},vC=function(t){var e=new yu.fabric.PatternBrush(t);return e.getPatternSrc=function(){var t=document.createElement("canvas");t.width=t.height=10;var e=t.getContext("2d");return e.strokeStyle=this.color,e.lineWidth=5,e.beginPath(),e.moveTo(5,0),e.lineTo(5,10),e.closePath(),e.stroke(),t},e},yC=function(t){var e=new yu.fabric.PatternBrush(t);return e.getPatternSrc=function(){var t=document.createElement("canvas");t.width=t.height=12;var e=t.getContext("2d");return e.fillStyle=this.color,e.fillRect(0,0,10,10),t},e},bC=function(){function t(t){this.canvasState=t,this.enabled=!1,this.customBrushes={VLineBrush:mC(this.canvasState.fabric),HLineBrush:vC(this.canvasState.fabric),SquareBrush:yC(this.canvasState.fabric)},this.currentBrush={type:"PencilBrush",color:"#000",width:au[1]}}return t.prototype.enable=function(){this.canvasState.fabric.isDrawingMode=!0,this.setBrushType(this.currentBrush.type),this.enabled=!0,this.canvasState.fabric.on("object:added",this.onDrawingAdded)},t.prototype.disable=function(){this.canvasState.fabric.isDrawingMode=!1,this.enabled=!1,this.canvasState.fabric.off("object:added",this.onDrawingAdded)},t.prototype.getBrushType=function(){return this.currentBrush.type},t.prototype.setBrushType=function(t){this.currentBrush.type=t;var e=yu.fabric[t]?new yu.fabric[t](this.canvasState.fabric):this.customBrushes[t];this.canvasState.fabric.freeDrawingBrush=e,this.applyBrushStyles()},t.prototype.applyBrushStyles=function(){var t=this;Object.keys(this.currentBrush).forEach(function(e){t.canvasState.fabric.freeDrawingBrush[e]=t.currentBrush[e]})},t.prototype.setBrushSize=function(t){this.currentBrush.width=t,this.applyBrushStyles()},t.prototype.getBrushSize=function(){return this.currentBrush.width},t.prototype.setBrushColor=function(t){this.currentBrush.color=t,this.applyBrushStyles()},t.prototype.getBrushColor=function(){return this.currentBrush.color},t.prototype.onDrawingAdded=function(t){"path"===t.target.type&&(t.target.name="drawing")},t}(),_C=Sr({encapsulation:2,styles:[["draw-drawer{display:block}draw-drawer .brush-sizes{margin-left:25px}draw-drawer .brush-sizes .sizes{display:flex;align-items:center;margin-top:16px}draw-drawer .brush-sizes .sizes .size{width:10px;height:10px;max-width:30px;max-height:30px;border:3px solid currentColor;margin:0 8px;border-radius:50%}draw-drawer .brush-sizes .sizes .size.selected{border-color:#009688}draw-drawer .brush-sizes .bottom-label{margin-top:17px}draw-drawer .brush-type-button-wrapper{margin:0 15px}@media only screen and (max-width:768px){draw-drawer .main-content{flex-direction:column}draw-drawer .bottom-label{display:none}draw-drawer .brush-type-button-wrapper{position:absolute;left:15px;bottom:10px}draw-drawer .brush-sizes .sizes{margin-top:10px}draw-drawer.controls-drawer .brush-types-content{justify-content:flex-start}}"]],data:{}});function wC(t){return bs(0,[(t()(),to(0,0,null,null,2,"button",[["class","no-style size control"]],[[2,"selected",null]],[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.drawTool.setBrushSize(t.context.$implicit)&&i),i},null,null)),Wo(1,278528,null,0,Yu,[Ti,ei,ti],{ngStyle:[0,"ngStyle"]},null),fs(2,{width:0,height:1})],function(t,e){t(e,1,0,t(e,2,0,e.context.$implicit+"px",e.context.$implicit+"px"))},function(t,e){t(e,0,0,e.component.drawTool.getBrushSize()===e.context.$implicit)})}function xC(t){return bs(0,[(t()(),to(0,0,null,null,23,null,null,null,null,null,null,null)),(t()(),to(1,0,null,null,7,"color-widget",[["trans",""]],[[2,"compact",null],[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngModelChange"]],function(t,e,n){var i=!0,r=t.component;return"ngModelChange"===e&&(i=!1!==(r.drawTool.currentBrush.color=n)&&i),"ngModelChange"===e&&(i=!1!==r.drawTool.setBrushColor(n)&&i),i},gx,dx)),Wo(2,49152,null,0,px,[Qf,wu],null,null),Xo(1024,null,ip,function(t){return[t]},[px]),Wo(4,671744,null,0,ed,[[8,null],[8,null],[8,null],[6,ip]],{model:[0,"model"]},{update:"ngModelChange"}),Xo(2048,null,hp,null,[ed]),Wo(6,16384,null,0,zp,[[4,hp]],null,null),Wo(7,4341760,null,0,lv,[ei,uv,wu],null,null),(t()(),ms(-1,0,["Brush Color"])),(t()(),to(9,0,null,null,7,"div",[["class","brush-type-button-wrapper"]],null,null,null,null,null)),(t()(),to(10,0,null,null,3,"button",[["class","round-action-button"],["mat-icon-button",""]],[[4,"color",null],[8,"disabled",0],[2,"_mat-animation-noopable",null]],[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.controls.openPanel("draw.brushTypes")&&i),i},d_,p_)),Wo(11,180224,null,0,qv,[ei,Yd,Lm,[2,c_]],null,null),(t()(),to(12,0,null,0,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","pencil-custom"]],[[2,"mat-icon-inline",null]],null,null,Tv,Ev)),Wo(13,638976,null,0,Sv,[ei,_v,[8,null]],{svgIcon:[0,"svgIcon"]},null),(t()(),to(14,0,null,null,2,"div",[["class","bottom-label"],["trans",""]],null,null,null,null,null)),Wo(15,4341760,null,0,lv,[ei,uv,wu],null,null),(t()(),ms(-1,null,["Brush Type"])),(t()(),to(17,0,null,null,6,"div",[["class","brush-sizes brush-controls"]],null,null,null,null,null)),(t()(),to(18,0,null,null,2,"div",[["class","sizes controls"]],null,null,null,null,null)),(t()(),$r(16777216,null,null,1,null,wC)),Wo(20,278528,null,0,zu,[ri,ii,Ei],{ngForOf:[0,"ngForOf"]},null),(t()(),to(21,0,null,null,2,"div",[["class","bottom-label"],["trans",""]],null,null,null,null,null)),Wo(22,4341760,null,0,lv,[ei,uv,wu],null,null),(t()(),ms(-1,null,["Brush Size"]))],function(t,e){var n=e.component;t(e,4,0,n.drawTool.currentBrush.color),t(e,13,0,"pencil-custom"),t(e,20,0,n.brushSizes)},function(t,e){var n=e.component;t(e,1,0,Ao(e,2).compact,Ao(e,6).ngClassUntouched,Ao(e,6).ngClassTouched,Ao(e,6).ngClassPristine,Ao(e,6).ngClassDirty,Ao(e,6).ngClassValid,Ao(e,6).ngClassInvalid,Ao(e,6).ngClassPending),t(e,10,0,n.drawTool.getBrushColor(),Ao(e,11).disabled||null,"NoopAnimations"===Ao(e,11)._animationMode),t(e,12,0,Ao(e,13).inline)})}function CC(t){return bs(0,[(t()(),to(0,0,null,null,2,"div",[["class","content main-content"]],null,null,null,null,null)),(t()(),$r(16777216,null,null,1,null,xC)),Wo(2,16384,null,0,Wu,[ri,ii],{ngIf:[0,"ngIf"]},null)],function(t,e){t(e,2,0,e.component.controls.panelIsVisible("draw"))},null)}function SC(t){return bs(0,[(t()(),to(0,0,null,null,1,"button",[["class","no-style button-with-image"]],[[2,"selected",null]],[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.setBrushType(t.context.$implicit)&&i),i},null,null)),(t()(),to(1,0,null,null,0,"img",[],[[8,"src",4],[8,"alt",0]],null,null,null,null))],null,function(t,e){var n=e.component;t(e,0,0,n.drawTool.getBrushType()==e.context.$implicit),t(e,1,0,n.getBrushPreviewUrl(e.context.$implicit),Qr(1,"",e.context.$implicit," brush preview"))})}function kC(t){return bs(0,[(t()(),to(0,0,null,null,2,"div",[["class","content brush-types-content"]],null,null,null,null,null)),(t()(),$r(16777216,null,null,1,null,SC)),Wo(2,278528,null,0,zu,[ri,ii,Ei],{ngForOf:[0,"ngForOf"]},null)],function(t,e){t(e,2,0,e.component.brushTypes)},null)}function EC(t){return bs(0,[(t()(),$r(16777216,null,null,1,null,CC)),Wo(1,16384,null,0,Wu,[ri,ii],{ngIf:[0,"ngIf"]},null),(t()(),$r(16777216,null,null,1,null,kC)),Wo(3,16384,null,0,Wu,[ri,ii],{ngIf:[0,"ngIf"]},null)],function(t,e){var n=e.component;t(e,1,0,!n.controls.panelIsVisible("draw.brushTypes")),t(e,3,0,n.controls.panelIsVisible("draw.brushTypes"))},null)}var TC=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),OC=function(t){function e(e,n,i,r,o){var s=t.call(this,i,r)||this;return s.textTool=e,s.overlayPanel=n,s.history=i,s.controls=r,s.activeObject=o,s.name="text",s}return TC(e,t),e.prototype.addText=function(){this.dirty=!0,this.textTool.add()},e.prototype.openGoogleFontsPanel=function(t){var e=this;this.overlayPanel.open(Ov,{position:hx,origin:new ei(t)}).valueChanged().subscribe(function(t){e.textTool.setFont(t)})},e}(jx),IC=function(){function t(t,e,n){this.canvas=t,this.activeObject=e,this.objects=n,this.minWidth=250}return t.prototype.getStyle=function(t){return this.activeObject.getValue("text."+t)},t.prototype.add=function(t,e){void 0===t&&(t="Double click here"),void 0===e&&(e={});var n=Object.assign({fill:"rgb(30, 139, 195)",name:"text"},e),i=new yu.fabric.IText(t,n);this.canvas.fabric().add(i),this.autoPositionText(i),this.canvas.fabric().setActiveObject(i),this.canvas.render()},t.prototype.autoPositionText=function(t){var e=this,n=this.canvas.fabric().getWidth(),i=this.canvas.fabric().getHeight(),r=Math.min(this.canvas.fabric().getWidth(),this.minWidth);t.scaleToWidth(Math.max(n/3,r)),t.getScaledHeight()>i&&t.scaleToHeight(i-t.getScaledHeight()-20),t.viewportCenter(),this.canvas.fabric().getObjects("i-text").forEach(function(n){if(n!==t&&n.intersectsWithObject(t)){var i=n.top-t.top+n.getScaledHeight(),r=t.top+i;r>e.canvas.state.original.height-n.getScaledHeight()&&(r=0),t.set("top",r),t.setCoords()}})},t.prototype.setFont=function(t){this.activeObject.isText()&&(this.activeObject.get().data.font=t,this.activeObject.setValue("text.fontFamily",t.family))},t.prototype.getUsedFonts=function(){var t=[];return this.objects.getAll().filter(function(t){return"i-text"===t.type}).forEach(function(e){e.data.font&&"regular"!==e.data.font.type&&t.push(e.data.font)}),t},t}(),AC=Sr({encapsulation:2,styles:[["text-drawer{display:block}text-drawer .select-font-wrapper{margin-left:25px}text-drawer .select-font-wrapper .select-font-button{position:relative;font-size:1.6rem;font-weight:500;margin-top:12px;border:1px solid #e0e0e0;padding:0 30px 0 10px;width:170px;height:35px;line-height:35px;overflow:hidden;text-overflow:ellipsis}text-drawer .select-font-wrapper .select-font-button mat-icon{position:absolute;top:6px;right:4px}text-drawer .select-font-wrapper .bottom-label{margin-top:12px}text-drawer .add-text-button-wrapper{margin:0 25px}@media only screen and (max-width:768px){text-drawer.controls-drawer color-widget{width:100%;margin-bottom:5px}text-drawer.controls-drawer .content{flex-wrap:wrap}text-drawer.controls-drawer .bottom-label{display:none}text-drawer.controls-drawer .select-font-button{margin:0 0 0 10px}text-drawer.controls-drawer .add-text-button{background-color:#009688;color:#fff;border:none;box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12);margin-bottom:3px}text-drawer.controls-drawer .select-font-wrapper{margin-left:0}}"]],data:{}});function PC(t){return bs(0,[(t()(),to(0,0,null,null,24,"div",[["class","content"]],null,null,null,null,null)),(t()(),to(1,0,null,null,7,"color-widget",[["trans",""]],[[2,"compact",null],[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],null,null,gx,dx)),Wo(2,49152,null,0,px,[Qf,wu],null,null),Xo(1024,null,ip,function(t){return[t]},[px]),Wo(4,540672,null,0,id,[[8,null],[8,null],[6,ip],[2,nd]],{form:[0,"form"]},null),Xo(2048,null,hp,null,[id]),Wo(6,16384,null,0,zp,[[4,hp]],null,null),Wo(7,4341760,null,0,lv,[ei,uv,wu],null,null),(t()(),ms(-1,0,["Color Picker"])),(t()(),to(9,0,null,null,6,"div",[["class","add-text-button-wrapper"]],null,null,null,null,null)),(t()(),to(10,0,null,null,2,"div",[["class","round-action-button add-text-button"]],null,[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.addText()&&i),i},null,null)),(t()(),to(11,0,null,null,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","add"]],[[2,"mat-icon-inline",null]],null,null,Tv,Ev)),Wo(12,638976,null,0,Sv,[ei,_v,[8,null]],{svgIcon:[0,"svgIcon"]},null),(t()(),to(13,0,null,null,2,"div",[["class","bottom-label"],["trans",""]],null,null,null,null,null)),Wo(14,4341760,null,0,lv,[ei,uv,wu],null,null),(t()(),ms(-1,null,["Add Text"])),(t()(),to(16,0,null,null,8,"section",[["class","select-font-wrapper"]],null,null,null,null,null)),(t()(),to(17,0,[["fontsButton",1]],null,4,"button",[["class","select-font-button no-style"]],[[4,"fontFamily",null]],[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.openGoogleFontsPanel(Ao(t,17))&&i),i},null,null)),(t()(),to(18,0,null,null,1,"span",[["class","text"]],null,null,null,null,null)),(t()(),ms(19,null,["",""])),(t()(),to(20,0,null,null,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","keyboard-arrow-down"]],[[2,"mat-icon-inline",null]],null,null,Tv,Ev)),Wo(21,638976,null,0,Sv,[ei,_v,[8,null]],{svgIcon:[0,"svgIcon"]},null),(t()(),to(22,0,null,null,2,"div",[["class","bottom-label"],["trans",""]],null,null,null,null,null)),Wo(23,4341760,null,0,lv,[ei,uv,wu],null,null),(t()(),ms(-1,null,["Font"]))],function(t,e){t(e,4,0,e.component.activeObject.getControl("fill")),t(e,12,0,"add"),t(e,21,0,"keyboard-arrow-down")},function(t,e){var n=e.component;t(e,1,0,Ao(e,2).compact,Ao(e,6).ngClassUntouched,Ao(e,6).ngClassTouched,Ao(e,6).ngClassPristine,Ao(e,6).ngClassDirty,Ao(e,6).ngClassValid,Ao(e,6).ngClassInvalid,Ao(e,6).ngClassPending),t(e,11,0,Ao(e,12).inline),t(e,17,0,n.textTool.getStyle("fontFamily")),t(e,19,0,n.textTool.getStyle("fontFamily")),t(e,20,0,Ao(e,21).inline)})}var DC=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),jC=function(t){function e(e,n,i,r){var o=t.call(this,n,i)||this;return o.shapesTool=e,o.history=n,o.editorControls=i,o.config=r,o.name="shapes",o.shapes=o.config.get("pixie.tools.shapes.items"),o}return DC(e,t),e.prototype.addShape=function(t){this.shapesTool.addBasicShape(t),this.dirty=!0},e.prototype.close=function(){this.editorControls.closeAllPanels(),t.prototype.close.call(this)},e}(jx),MC=function(){function t(t,e){this.canvas=t,this.config=e}return t.prototype.getShapeByName=function(t){return this.config.get("pixie.tools.shapes.items").find(function(e){return e.name===t})},t.prototype.addBasicShape=function(t){"string"==typeof t&&(t=this.getShapeByName(t));var e,n=t,i=this.canvas.fabric().getWidth(),r=n.options||{},o=i/2;"circle"===n.name?r.radius=o:"ellipse"===n.name?(r.rx=o,r.ry=o/2):(r.width=o,r.height=o),e="Path"===n.type?new yu.fabric[n.type](r.path,r):new yu.fabric[n.type](r),this.addAndPositionSticker(e)},t.prototype.addSticker=function(t,e){var n=this;return new Promise(function(i){n.addStickerResolve=i,"svg"===t.type?n.addSvgSticker(t,e):n.addRegularSticker(t,e)})},t.prototype.addRegularSticker=function(t,e){var n=this;yu.fabric.util.loadImage(this.getStickerUrl(t,e),function(t){var e=new yu.fabric.Image(t);n.addAndPositionSticker(e,"sticker")})},t.prototype.addAndPositionSticker=function(t,e){void 0===e&&(e="shape"),t.name=e,this.canvas.fabric().add(t),this.canvas.fabric().setActiveObject(t),t.scaleToWidth(this.canvas.fabric().getWidth()/4),t.viewportCenter(),t.setCoords(),this.canvas.render(),this.addStickerResolve&&this.addStickerResolve()},t.prototype.getStickerUrl=function(t,e){return this.config.getAssetUrl("images/stickers/"+t.name+"/"+e+"."+t.type)},t.prototype.getStickerCategoryUrl=function(t){return t.thumbnailUrl?this.config.getAssetUrl(t.thumbnailUrl):this.getStickerUrl(t,1)},t.prototype.addSvgSticker=function(t,e){var n=this;yu.fabric.loadSVGFromURL(this.getStickerUrl(t,e),function(t,e){var i=yu.fabric.util.groupSVGElements(t,e);n.addAndPositionSticker(i,"sticker")})},t}(),RC=Sr({encapsulation:2,styles:[["shapes-drawer{display:block}shapes-drawer .content.stickers-visible{justify-content:flex-start}shapes-drawer .button-with-image>svg path{fill:transparent;stroke:currentColor;stroke-width:25}shapes-drawer .basic-shape{margin:0 10px;cursor:pointer}shapes-drawer .basic-shape .preview{background-color:#009688;height:50px}shapes-drawer .basic-shape .rectangle{width:50px}shapes-drawer .basic-shape .circle{width:50px;border-radius:50%}shapes-drawer .basic-shape .triangle{width:50px;background-color:transparent;border-left:18px solid transparent;border-right:18px solid transparent;border-bottom:33px solid #009688}shapes-drawer .basic-shape .ellipse{width:80px;height:50px;border-radius:50%}shapes-drawer .stickers-drawer .content-wrapper>.shapes{justify-content:initial}shapes-drawer .shape:first-of-type{margin-left:0}@media only screen and (max-width:768px){shapes-drawer.controls-drawer .content{justify-content:flex-start}}"]],data:{}});function FC(t){return bs(0,[(t()(),to(0,0,null,null,1,":svg:svg",[["viewBox","0 -100 512 700"],["xmlns","http://www.w3.org/2000/svg"]],null,null,null,null,null)),(t()(),to(1,0,null,null,0,":svg:path",[],[[1,"d",0],[1,"stroke-width",0]],null,null,null,null))],null,function(t,e){t(e,1,0,e.parent.context.$implicit.options.path,e.parent.context.$implicit.options.strokeWidth||10)})}function NC(t){return bs(0,[(t()(),to(0,0,null,null,1,"mat-icon",[["class","mat-icon"],["role","img"]],[[2,"mat-icon-inline",null]],null,null,Tv,Ev)),Wo(1,638976,null,0,Sv,[ei,_v,[8,null]],{svgIcon:[0,"svgIcon"]},null)],function(t,e){t(e,1,0,e.parent.context.$implicit.name+"-custom")},function(t,e){t(e,0,0,Ao(e,1).inline)})}function LC(t){return bs(0,[(t()(),to(0,0,[["button",1]],null,7,"button",[["class","button-with-image"]],null,[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(t.component.addShape(t.context.$implicit),i=!1!==Ao(t,0).blur()&&i),i},null,null)),(t()(),$r(16777216,null,null,1,null,FC)),Wo(2,16384,null,0,Wu,[ri,ii],{ngIf:[0,"ngIf"]},null),(t()(),$r(16777216,null,null,1,null,NC)),Wo(4,16384,null,0,Wu,[ri,ii],{ngIf:[0,"ngIf"]},null),(t()(),to(5,0,null,null,2,"span",[["class","name bottom-label"],["trans",""]],null,null,null,null,null)),Wo(6,4341760,null,0,lv,[ei,uv,wu],null,null),(t()(),ms(7,null,["",""]))],function(t,e){t(e,2,0,"Path"===e.context.$implicit.type),t(e,4,0,"Path"!==e.context.$implicit.type)},function(t,e){t(e,7,0,e.context.$implicit.name)})}function BC(t){return bs(0,[(t()(),to(0,0,null,null,2,"div",[["class","content"]],null,null,null,null,null)),(t()(),$r(16777216,null,null,1,null,LC)),Wo(2,278528,null,0,zu,[ri,ii,Ei],{ngForOf:[0,"ngForOf"]},null)],function(t,e){t(e,2,0,e.component.shapes)},null)}var VC=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),zC=function(t){function e(e,n,i,r){var o=t.call(this,n,i)||this;return o.shapesTool=e,o.history=n,o.editorControls=i,o.config=r,o.name="stickers",o.categories=o.config.get("pixie.tools.stickers.items"),o}return VC(e,t),e.prototype.addSticker=function(t,e){var n=this;this.shapesTool.addSticker(t,e).then(function(){n.dirty=!0})},e.prototype.openStickersCategory=function(t){this.activeCategory=t,this.editorControls.openPanel("shapes.stickers."+t.name)},e.prototype.getStickersIterable=function(t){return t.list?t.list:Array.from(Array(t.items).keys())},e}(jx),HC=Sr({encapsulation:2,styles:[["stickers-drawer{display:block}stickers-drawer .button-with-image.dark-bg{background-color:rgba(0,0,0,.12)}stickers-drawer .stickers-list{display:flex;align-items:center;justify-content:flex-start;width:100%}@media only screen and (max-width:768px){stickers-drawer.controls-drawer .content{justify-content:flex-start}}"]],data:{}});function WC(t){return bs(0,[(t()(),to(0,0,null,null,4,"div",[["class","category button-with-image"]],null,[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.openStickersCategory(t.context.$implicit)&&i),i},null,null)),(t()(),to(1,0,null,null,0,"img",[["alt","Sticker category preview image"]],[[8,"src",4]],null,null,null,null)),(t()(),to(2,0,null,null,2,"div",[["class","bottom-label"],["trans",""]],null,null,null,null,null)),Wo(3,4341760,null,0,lv,[ei,uv,wu],null,null),(t()(),ms(4,null,["",""]))],null,function(t,e){t(e,1,0,e.component.shapesTool.getStickerCategoryUrl(e.context.$implicit)),t(e,4,0,e.context.$implicit.name)})}function UC(t){return bs(0,[(t()(),to(0,0,null,null,2,null,null,null,null,null,null,null)),(t()(),$r(16777216,null,null,1,null,WC)),Wo(2,278528,null,0,zu,[ri,ii,Ei],{ngForOf:[0,"ngForOf"]},null),(t()(),$r(0,null,null,0))],function(t,e){t(e,2,0,e.component.categories)},null)}function XC(t){return bs(0,[(t()(),to(0,0,null,null,2,"span",[["class","bottom-label"],["trans",""]],null,null,null,null,null)),Wo(1,4341760,null,0,lv,[ei,uv,wu],null,null),(t()(),ms(2,null,["",""]))],null,function(t,e){t(e,2,0,e.parent.context.$implicit)})}function YC(t){return bs(0,[(t()(),to(0,0,[["button",1]],null,3,"button",[["class","sticker button-with-image"]],[[2,"no-label",null],[2,"dark-bg",null]],[[null,"click"]],function(t,e,n){var i=!0,r=t.component;return"click"===e&&(r.addSticker(r.activeCategory,t.context.$implicit),i=!1!==Ao(t,0).blur()&&i),i},null,null)),(t()(),to(1,0,null,null,0,"img",[["alt","Sticker preview image"]],[[8,"src",4]],null,null,null,null)),(t()(),$r(16777216,null,null,1,null,XC)),Wo(3,16384,null,0,Wu,[ri,ii],{ngIf:[0,"ngIf"]},null)],function(t,e){t(e,3,0,e.component.activeCategory.list)},function(t,e){var n=e.component;t(e,0,0,!n.activeCategory.list,n.activeCategory.darkBg),t(e,1,0,n.shapesTool.getStickerUrl(n.activeCategory,e.context.$implicit))})}function qC(t){return bs(0,[(t()(),to(0,0,null,null,2,"div",[["class","stickers-list"]],null,null,null,null,null)),(t()(),$r(16777216,null,null,1,null,YC)),Wo(2,278528,null,0,zu,[ri,ii,Ei],{ngForOf:[0,"ngForOf"]},null)],function(t,e){var n=e.component;t(e,2,0,n.getStickersIterable(n.activeCategory))},null)}function GC(t){return bs(0,[(t()(),to(0,0,null,null,4,"div",[["class","content"]],null,null,null,null,null)),(t()(),$r(16777216,null,null,1,null,UC)),Wo(2,16384,null,0,Wu,[ri,ii],{ngIf:[0,"ngIf"]},null),(t()(),$r(16777216,null,null,1,null,qC)),Wo(4,16384,null,0,Wu,[ri,ii],{ngIf:[0,"ngIf"]},null)],function(t,e){var n=e.component;t(e,2,0,!n.activeCategory||n.controls.panelIsVisible("stickers")),t(e,4,0,n.activeCategory&&!n.controls.panelIsVisible("stickers"))},null)}var KC=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),ZC=function(t){function e(e,n,i,r){var o=t.call(this,n,i)||this;return o.activeObject=e,o.history=n,o.controls=i,o.roundTool=r,o.name="corners",o.radius=50,o}return KC(e,t),e.prototype.ngOnInit=function(){this.roundTool.showPreview(),this.dirty=!0},e.prototype.ngOnDestroy=function(){this.roundTool.hidePreview()},e.prototype.apply=function(){var e=this;this.roundTool.apply(this.roundTool.getPreviewRadius()).then(function(){t.prototype.apply.call(e)})},e}(jx),QC=function(){function t(t,e,n,i){this.activeObject=t,this.canvas=e,this.state=n,this.saveTool=i}return t.prototype.apply=function(t){var e=this;this.updatePreview(t),this.state.fabric.remove(this.previewRect),this.state.fabric.clipTo=function(t){var n=e.state.fabric.getRetinaScaling();e.previewRect.set({width:e.previewRect.width/n,height:e.previewRect.height/n,rx:e.previewRect.rx/n,ry:e.previewRect.ry/n,stroke:null}),e.previewRect.render(t),e.state.fabric.clipTo=null};var n=this.saveTool.getDataUrl();return this.state.fabric.clear(),this.hidePreview(),this.canvas.loadMainImage(n)},t.prototype.getPreviewRadius=function(){return this.previewRect.rx},t.prototype.updatePreview=function(t){this.previewRect.set({rx:t,ry:t}),this.canvas.render()},t.prototype.showPreview=function(){this.previewRect=new yu.fabric.Rect({width:this.state.original.width,height:this.state.original.height,rx:50,ry:50,objectCaching:!1,fill:"transparent",name:"round.rect",stroke:"rgba(255,255,255,0.8)",strokeWidth:3,strokeDashArray:[4,4],selectable:!1,evented:!1}),this.state.fabric.add(this.previewRect),this.previewRect.moveTo(99),this.previewRect.viewportCenter(),this.canvas.render()},t.prototype.hidePreview=function(){this.previewRect&&(this.state.fabric.remove(this.previewRect),this.canvas.render(),this.previewRect=null)},t}(),JC=Sr({encapsulation:2,styles:[["texture-controls-drawer{display:flex;justify-content:flex-start;align-items:center}texture-controls-drawer>.texture{margin:0 5px}texture-controls-drawer>.texture:first-of-type{margin-left:0}"]],data:{}});function $C(t){return bs(0,[(t()(),to(0,0,null,null,10,"div",[["class","content"]],null,null,null,null,null)),(t()(),to(1,0,null,null,9,"div",[["class","slider-container"]],null,null,null,null,null)),(t()(),to(2,0,null,null,2,"div",[["class","slider-label"],["trans",""]],null,null,null,null,null)),Wo(3,4341760,null,0,lv,[ei,uv,wu],null,null),(t()(),ms(-1,null,["Radius"])),(t()(),to(5,0,null,null,5,"mat-slider",[["class","mat-slider"],["max","300"],["min","1"],["role","slider"]],[[8,"tabIndex",0],[1,"aria-disabled",0],[1,"aria-valuemax",0],[1,"aria-valuemin",0],[1,"aria-valuenow",0],[1,"aria-orientation",0],[2,"mat-slider-disabled",null],[2,"mat-slider-has-ticks",null],[2,"mat-slider-horizontal",null],[2,"mat-slider-axis-inverted",null],[2,"mat-slider-sliding",null],[2,"mat-slider-thumb-label-showing",null],[2,"mat-slider-vertical",null],[2,"mat-slider-min-value",null],[2,"mat-slider-hide-last-tick",null],[2,"_mat-animation-noopable",null],[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"input"],[null,"ngModelChange"],[null,"focus"],[null,"blur"],[null,"click"],[null,"keydown"],[null,"keyup"],[null,"mouseenter"],[null,"slide"],[null,"slideend"],[null,"slidestart"]],function(t,e,n){var i=!0,r=t.component;return"focus"===e&&(i=!1!==Ao(t,6)._onFocus()&&i),"blur"===e&&(i=!1!==Ao(t,6)._onBlur()&&i),"click"===e&&(i=!1!==Ao(t,6)._onClick(n)&&i),"keydown"===e&&(i=!1!==Ao(t,6)._onKeydown(n)&&i),"keyup"===e&&(i=!1!==Ao(t,6)._onKeyup()&&i),"mouseenter"===e&&(i=!1!==Ao(t,6)._onMouseenter()&&i),"slide"===e&&(i=!1!==Ao(t,6)._onSlide(n)&&i),"slideend"===e&&(i=!1!==Ao(t,6)._onSlideEnd()&&i),"slidestart"===e&&(i=!1!==Ao(t,6)._onSlideStart(n)&&i),"input"===e&&(i=!1!==r.roundTool.updatePreview(n.value)&&i),"ngModelChange"===e&&(i=!1!==(r.radius=n)&&i),i},bx,yx)),Wo(6,245760,null,0,mx,[ei,Lm,oi,[2,km],[8,null],[2,c_]],{max:[0,"max"],min:[1,"min"]},{input:"input"}),Xo(1024,null,ip,function(t){return[t]},[mx]),Wo(8,671744,null,0,ed,[[8,null],[8,null],[8,null],[6,ip]],{model:[0,"model"]},{update:"ngModelChange"}),Xo(2048,null,hp,null,[ed]),Wo(10,16384,null,0,zp,[[4,hp]],null,null)],function(t,e){var n=e.component;t(e,6,0,"300","1"),t(e,8,0,n.radius)},function(t,e){t(e,5,1,[Ao(e,6).tabIndex,Ao(e,6).disabled,Ao(e,6).max,Ao(e,6).min,Ao(e,6).value,Ao(e,6).vertical?"vertical":"horizontal",Ao(e,6).disabled,Ao(e,6).tickInterval,!Ao(e,6).vertical,Ao(e,6)._invertAxis,Ao(e,6)._isSliding,Ao(e,6).thumbLabel,Ao(e,6).vertical,Ao(e,6)._isMinValue,Ao(e,6).disabled||Ao(e,6)._isMinValue&&Ao(e,6)._thumbGap&&Ao(e,6)._invertAxis,"NoopAnimations"===Ao(e,6)._animationMode,Ao(e,10).ngClassUntouched,Ao(e,10).ngClassTouched,Ao(e,10).ngClassPristine,Ao(e,10).ngClassDirty,Ao(e,10).ngClassValid,Ao(e,10).ngClassInvalid,Ao(e,10).ngClassPending])})}var tS=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),eS=function(t){function e(e,n,i,r){var o=t.call(this,r,n)||this;return o.frameTool=e,o.controls=n,o.activeFrame=i,o.history=r,o.name="frame",o.colorControl=new qp,o}return tS(e,t),e.prototype.ngOnInit=function(){var t=this;this.colorControl.valueChanges.subscribe(function(e){t.frameTool.changeColor(e)})},e.prototype.getFrameThumbUrl=function(t){return this.frameTool.patterns.getBaseUrl(t)+"/thumbnail.png"},e.prototype.selectFrame=function(t){this.dirty=!0,this.frameTool.add(t.name)},e.prototype.scaleFrame=function(t){this.frameTool.resize(t)},e.prototype.frameIsActive=function(t){return this.activeFrame.is(t)},e.prototype.removeFrame=function(){this.activeFrame.remove()},e.prototype.showFrameConfig=function(t){this.sizeModel=t.size.default,this.controls.openPanel("frameControls")},e}(jx),nS=function(){function t(t,e,n,i,r){var o=this;this.config=t,this.canvas=e,this.patterns=n,this.activeFrame=i,this.frameBuilder=r,this.frames=[],this.frames=this.config.get("pixie.tools.frame.items"),this.canvas.state.loaded.subscribe(function(){o.canvas.fabric().on("object:added",function(){o.activeFrame.group&&o.activeFrame.group.moveTo(98)})})}return t.prototype.add=function(t){var e=this.getByName(t);if(!this.activeFrame.is(e)){this.activeFrame.exists()&&this.activeFrame.remove();var n=this.calcFrameSize(e.size.default);this.frameBuilder.build(e,n)}},t.prototype.resize=function(t){var e=this.calcFrameSize(t);this.frameBuilder.resize(e),this.patterns.scale(e),this.canvas.render()},t.prototype.changeColor=function(t){this.activeFrame.changeColor(t)},t.prototype.remove=function(){this.activeFrame.remove()},t.prototype.getByName=function(t){return this.frames.find(function(e){return e.name===t})},t.prototype.getActive=function(){return this.activeFrame.config},t.prototype.getAll=function(){return this.frames},t.prototype.calcFrameSize=function(t){return t/100*Math.min(this.canvas.state.original.width,this.canvas.state.original.height)},t}(),iS=function(){function t(t){this.canvas=t,this.corners=["topLeft","topRight","bottomLeft","bottomRight"],this.sides=["top","right","bottom","left"]}return t.prototype.getPartNames=function(){return this.corners.concat(this.sides)},t.prototype.exists=function(){return null!=this.config},t.prototype.remove=function(){var t=this;this.exists()&&(this.canvas.fabric().remove(this.group),this.group.off(),this.group=null,this.config=null,this.getPartNames().forEach(function(e){t[e]=null}),this.canvas.render())},t.prototype.is=function(t){return!!this.config&&this.config.name===t.name},t.prototype.changeColor=function(t){var e=this;"basic"===this.config.mode&&(this.getPartNames().forEach(function(n){e[n].set("fill",t)}),this.canvas.render())},t.prototype.isBasic=function(){return this.config&&"basic"===this.config.mode},t.prototype.getMinSize=function(){if(this.exists())return this.config.size.min||1},t.prototype.getMaxSize=function(){if(this.exists())return this.config.size.max||35},t.prototype.getDefaultSize=function(){if(this.exists())return this.config.size.default||15},t}(),rS=Sr({encapsulation:2,styles:[["frame-drawer{display:block}frame-drawer .frame-controls{flex-direction:column}frame-drawer .button-with-image{position:relative}frame-drawer .button-with-image img{border-radius:4px;width:65px;height:65px}frame-drawer .button-with-image .bottom-label{margin-top:3px;font-size:1.1rem}@media only screen and (max-width:768px){frame-drawer.controls-drawer .main-content{justify-content:flex-start}frame-drawer .frame-controls{padding:0 15px}}"]],data:{}});function oS(t){return bs(0,[(t()(),to(0,0,null,null,8,"div",[["class","overlay"]],null,null,null,null,null)),(t()(),to(1,0,null,null,3,"button",[["mat-icon-button",""]],[[8,"disabled",0],[2,"_mat-animation-noopable",null]],[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(t.component.removeFrame(),i=!1!==n.stopPropagation()&&i),i},d_,p_)),Wo(2,180224,null,0,qv,[ei,Yd,Lm,[2,c_]],null,null),(t()(),to(3,0,null,0,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","cancel"]],[[2,"mat-icon-inline",null]],null,null,Tv,Ev)),Wo(4,638976,null,0,Sv,[ei,_v,[8,null]],{svgIcon:[0,"svgIcon"]},null),(t()(),to(5,0,null,null,3,"button",[["mat-icon-button",""]],[[8,"disabled",0],[2,"_mat-animation-noopable",null]],[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(t.component.showFrameConfig(t.parent.context.$implicit),i=!1!==n.stopPropagation()&&i),i},d_,p_)),Wo(6,180224,null,0,qv,[ei,Yd,Lm,[2,c_]],null,null),(t()(),to(7,0,null,0,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","settings"]],[[2,"mat-icon-inline",null]],null,null,Tv,Ev)),Wo(8,638976,null,0,Sv,[ei,_v,[8,null]],{svgIcon:[0,"svgIcon"]},null)],function(t,e){t(e,4,0,"cancel"),t(e,8,0,"settings")},function(t,e){t(e,1,0,Ao(e,2).disabled||null,"NoopAnimations"===Ao(e,2)._animationMode),t(e,3,0,Ao(e,4).inline),t(e,5,0,Ao(e,6).disabled||null,"NoopAnimations"===Ao(e,6)._animationMode),t(e,7,0,Ao(e,8).inline)})}function sS(t){return bs(0,[(t()(),to(0,0,null,null,7,"div",[["class","button-with-image"]],null,[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.selectFrame(t.context.$implicit)&&i),i},null,null)),(t()(),to(1,0,null,null,3,"div",[["class","image-container"]],null,null,null,null,null)),(t()(),to(2,0,null,null,0,"img",[],[[8,"src",4]],null,null,null,null)),(t()(),$r(16777216,null,null,1,null,oS)),Wo(4,16384,null,0,Wu,[ri,ii],{ngIf:[0,"ngIf"]},null),(t()(),to(5,0,null,null,2,"span",[["class","bottom-label"],["trans",""]],null,null,null,null,null)),Wo(6,4341760,null,0,lv,[ei,uv,wu],null,null),(t()(),ms(7,null,["",""]))],function(t,e){t(e,4,0,e.component.frameIsActive(e.context.$implicit))},function(t,e){t(e,2,0,e.component.getFrameThumbUrl(e.context.$implicit)),t(e,7,0,e.context.$implicit.display_name||e.context.$implicit.name)})}function aS(t){return bs(0,[(t()(),to(0,0,null,null,5,"color-widget",[],[[2,"compact",null],[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],null,null,gx,dx)),Wo(1,49152,null,0,px,[Qf,wu],{compact:[0,"compact"]},null),Xo(1024,null,ip,function(t){return[t]},[px]),Wo(3,540672,null,0,id,[[8,null],[8,null],[6,ip],[2,nd]],{form:[0,"form"]},null),Xo(2048,null,hp,null,[id]),Wo(5,16384,null,0,zp,[[4,hp]],null,null)],function(t,e){var n=e.component;t(e,1,0,!0),t(e,3,0,n.colorControl)},function(t,e){t(e,0,0,Ao(e,1).compact,Ao(e,5).ngClassUntouched,Ao(e,5).ngClassTouched,Ao(e,5).ngClassPristine,Ao(e,5).ngClassDirty,Ao(e,5).ngClassValid,Ao(e,5).ngClassInvalid,Ao(e,5).ngClassPending)})}function lS(t){return bs(0,[(t()(),to(0,0,null,null,2,"section",[["class","content main-content"]],[[2,"hidden",null]],null,null,null,null)),(t()(),$r(16777216,null,null,1,null,sS)),Wo(2,278528,null,0,zu,[ri,ii,Ei],{ngForOf:[0,"ngForOf"]},null),(t()(),to(3,0,null,null,12,"section",[["class","content frame-controls"]],[[2,"hidden",null]],null,null,null,null)),(t()(),$r(16777216,null,null,1,null,aS)),Wo(5,16384,null,0,Wu,[ri,ii],{ngIf:[0,"ngIf"]},null),(t()(),to(6,0,null,null,9,"div",[["class","slider-container"]],null,null,null,null,null)),(t()(),to(7,0,null,null,2,"div",[["class","slider-label"],["trans",""]],null,null,null,null,null)),Wo(8,4341760,null,0,lv,[ei,uv,wu],null,null),(t()(),ms(-1,null,["Size"])),(t()(),to(10,0,null,null,5,"mat-slider",[["class","mat-slider"],["role","slider"]],[[8,"tabIndex",0],[1,"aria-disabled",0],[1,"aria-valuemax",0],[1,"aria-valuemin",0],[1,"aria-valuenow",0],[1,"aria-orientation",0],[2,"mat-slider-disabled",null],[2,"mat-slider-has-ticks",null],[2,"mat-slider-horizontal",null],[2,"mat-slider-axis-inverted",null],[2,"mat-slider-sliding",null],[2,"mat-slider-thumb-label-showing",null],[2,"mat-slider-vertical",null],[2,"mat-slider-min-value",null],[2,"mat-slider-hide-last-tick",null],[2,"_mat-animation-noopable",null],[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngModelChange"],[null,"input"],[null,"focus"],[null,"blur"],[null,"click"],[null,"keydown"],[null,"keyup"],[null,"mouseenter"],[null,"slide"],[null,"slideend"],[null,"slidestart"]],function(t,e,n){var i=!0,r=t.component;return"focus"===e&&(i=!1!==Ao(t,11)._onFocus()&&i),"blur"===e&&(i=!1!==Ao(t,11)._onBlur()&&i),"click"===e&&(i=!1!==Ao(t,11)._onClick(n)&&i),"keydown"===e&&(i=!1!==Ao(t,11)._onKeydown(n)&&i),"keyup"===e&&(i=!1!==Ao(t,11)._onKeyup()&&i),"mouseenter"===e&&(i=!1!==Ao(t,11)._onMouseenter()&&i),"slide"===e&&(i=!1!==Ao(t,11)._onSlide(n)&&i),"slideend"===e&&(i=!1!==Ao(t,11)._onSlideEnd()&&i),"slidestart"===e&&(i=!1!==Ao(t,11)._onSlideStart(n)&&i),"ngModelChange"===e&&(i=!1!==(r.sizeModel=n)&&i),"input"===e&&(i=!1!==r.scaleFrame(n.value)&&i),i},bx,yx)),Wo(11,245760,null,0,mx,[ei,Lm,oi,[2,km],[8,null],[2,c_]],{max:[0,"max"],min:[1,"min"]},{input:"input"}),Xo(1024,null,ip,function(t){return[t]},[mx]),Wo(13,671744,null,0,ed,[[8,null],[8,null],[8,null],[6,ip]],{model:[0,"model"]},{update:"ngModelChange"}),Xo(2048,null,hp,null,[ed]),Wo(15,16384,null,0,zp,[[4,hp]],null,null)],function(t,e){var n=e.component;t(e,2,0,n.frameTool.getAll()),t(e,5,0,n.activeFrame.isBasic()),t(e,11,0,n.activeFrame.getMaxSize(),n.activeFrame.getMinSize()),t(e,13,0,n.sizeModel)},function(t,e){var n=e.component;t(e,0,0,!n.controls.panelIsVisible("frame")),t(e,3,0,!n.controls.panelIsVisible("frameControls")),t(e,10,1,[Ao(e,11).tabIndex,Ao(e,11).disabled,Ao(e,11).max,Ao(e,11).min,Ao(e,11).value,Ao(e,11).vertical?"vertical":"horizontal",Ao(e,11).disabled,Ao(e,11).tickInterval,!Ao(e,11).vertical,Ao(e,11)._invertAxis,Ao(e,11)._isSliding,Ao(e,11).thumbLabel,Ao(e,11).vertical,Ao(e,11)._isMinValue,Ao(e,11).disabled||Ao(e,11)._isMinValue&&Ao(e,11)._thumbGap&&Ao(e,11)._invertAxis,"NoopAnimations"===Ao(e,11)._animationMode,Ao(e,15).ngClassUntouched,Ao(e,15).ngClassTouched,Ao(e,15).ngClassPristine,Ao(e,15).ngClassDirty,Ao(e,15).ngClassValid,Ao(e,15).ngClassInvalid,Ao(e,15).ngClassPending])})}var uS=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),cS=function(t){function e(e,n,i){var r=t.call(this,e,n)||this;return r.history=e,r.controls=n,r.canvas=i,r.name="background",r.formControl=new qp,r}return uS(e,t),e.prototype.ngOnInit=function(){var t=this;this.formControl.valueChanges.subscribe(function(e){e&&(t.dirty=!0,t.canvas.fabric().setBackgroundColor(e),t.canvas.render())})},e}(jx),hS=Sr({encapsulation:2,styles:[["canvas-background-drawer{display:block}"]],data:{}});function pS(t){return bs(0,[(t()(),to(0,0,null,null,8,"div",[["class","content"]],null,null,null,null,null)),(t()(),to(1,0,null,null,7,"color-widget",[["trans",""]],[[2,"compact",null],[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],null,null,gx,dx)),Wo(2,49152,null,0,px,[Qf,wu],null,null),Xo(1024,null,ip,function(t){return[t]},[px]),Wo(4,540672,null,0,id,[[8,null],[8,null],[6,ip],[2,nd]],{form:[0,"form"]},null),Xo(2048,null,hp,null,[id]),Wo(6,16384,null,0,zp,[[4,hp]],null,null),Wo(7,4341760,null,0,lv,[ei,uv,wu],null,null),(t()(),ms(-1,0,["Canvas Background"]))],function(t,e){t(e,4,0,e.component.formControl)},function(t,e){t(e,1,0,Ao(e,2).compact,Ao(e,6).ngClassUntouched,Ao(e,6).ngClassTouched,Ao(e,6).ngClassPristine,Ao(e,6).ngClassDirty,Ao(e,6).ngClassValid,Ao(e,6).ngClassInvalid,Ao(e,6).ngClassPending)})}var dS=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),fS=function(t){function e(e,n,i,r){var o=t.call(this,i,r)||this;return o.overlayPanel=e,o.activeObject=n,o.history=i,o.controls=r,o.name="shadow",o}return dS(e,t),e.prototype.setValue=function(t,e){this.dirty=!0,this.activeObject.setValue(t,e)},e.prototype.openColorPicker=function(){var t=this;this.overlayPanel.open(Zg,{position:hx,origin:this.colorPickerButton}).valueChanged().subscribe(function(e){t.setValue("shadow.color",e)})},e}(jx),gS=Sr({encapsulation:2,styles:[["shadow-controls-drawer{display:flex;justify-content:center;align-items:center;width:100%;padding:0 20px}@media only screen and (max-width:768px){shadow-controls-drawer{justify-content:flex-start;padding:0 5px}shadow-controls-drawer .slider-container{margin:0 5px}}"]],data:{}});function mS(t){return bs(0,[ss(402653184,1,{colorPickerButton:0}),(t()(),to(1,0,[[1,0]],null,3,"button",[["class","round-action-button color-picker-button"],["mat-icon-button",""]],[[8,"disabled",0],[2,"_mat-animation-noopable",null]],[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.openColorPicker()&&i),i},d_,p_)),Wo(2,180224,[["colorPickerButton",4]],0,qv,[ei,Yd,Lm,[2,c_]],null,null),(t()(),to(3,0,null,0,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","color-wheel-custom"]],[[2,"mat-icon-inline",null]],null,null,Tv,Ev)),Wo(4,638976,null,0,Sv,[ei,_v,[8,null]],{svgIcon:[0,"svgIcon"]},null),(t()(),to(5,0,null,null,9,"div",[["class","slider-container"]],null,null,null,null,null)),(t()(),to(6,0,null,null,2,"div",[["class","slider-label"],["trans",""]],null,null,null,null,null)),Wo(7,4341760,null,0,lv,[ei,uv,wu],null,null),(t()(),ms(-1,null,["Blur"])),(t()(),to(9,0,null,null,5,"mat-slider",[["class","mat-slider"],["max","20"],["min","1"],["role","slider"]],[[8,"tabIndex",0],[1,"aria-disabled",0],[1,"aria-valuemax",0],[1,"aria-valuemin",0],[1,"aria-valuenow",0],[1,"aria-orientation",0],[2,"mat-slider-disabled",null],[2,"mat-slider-has-ticks",null],[2,"mat-slider-horizontal",null],[2,"mat-slider-axis-inverted",null],[2,"mat-slider-sliding",null],[2,"mat-slider-thumb-label-showing",null],[2,"mat-slider-vertical",null],[2,"mat-slider-min-value",null],[2,"mat-slider-hide-last-tick",null],[2,"_mat-animation-noopable",null],[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"input"],[null,"focus"],[null,"blur"],[null,"click"],[null,"keydown"],[null,"keyup"],[null,"mouseenter"],[null,"slide"],[null,"slideend"],[null,"slidestart"]],function(t,e,n){var i=!0,r=t.component;return"focus"===e&&(i=!1!==Ao(t,10)._onFocus()&&i),"blur"===e&&(i=!1!==Ao(t,10)._onBlur()&&i),"click"===e&&(i=!1!==Ao(t,10)._onClick(n)&&i),"keydown"===e&&(i=!1!==Ao(t,10)._onKeydown(n)&&i),"keyup"===e&&(i=!1!==Ao(t,10)._onKeyup()&&i),"mouseenter"===e&&(i=!1!==Ao(t,10)._onMouseenter()&&i),"slide"===e&&(i=!1!==Ao(t,10)._onSlide(n)&&i),"slideend"===e&&(i=!1!==Ao(t,10)._onSlideEnd()&&i),"slidestart"===e&&(i=!1!==Ao(t,10)._onSlideStart(n)&&i),"input"===e&&(i=!1!==r.setValue("shadow.blur",n.value)&&i),i},bx,yx)),Wo(10,245760,null,0,mx,[ei,Lm,oi,[2,km],[8,null],[2,c_]],{max:[0,"max"],min:[1,"min"]},{input:"input"}),Xo(1024,null,ip,function(t){return[t]},[mx]),Wo(12,540672,null,0,id,[[8,null],[8,null],[6,ip],[2,nd]],{form:[0,"form"]},null),Xo(2048,null,hp,null,[id]),Wo(14,16384,null,0,zp,[[4,hp]],null,null),(t()(),to(15,0,null,null,9,"div",[["class","slider-container"]],null,null,null,null,null)),(t()(),to(16,0,null,null,2,"div",[["class","slider-label"],["trans",""]],null,null,null,null,null)),Wo(17,4341760,null,0,lv,[ei,uv,wu],null,null),(t()(),ms(-1,null,["Offset X"])),(t()(),to(19,0,null,null,5,"mat-slider",[["class","mat-slider"],["max","20"],["min","1"],["role","slider"]],[[8,"tabIndex",0],[1,"aria-disabled",0],[1,"aria-valuemax",0],[1,"aria-valuemin",0],[1,"aria-valuenow",0],[1,"aria-orientation",0],[2,"mat-slider-disabled",null],[2,"mat-slider-has-ticks",null],[2,"mat-slider-horizontal",null],[2,"mat-slider-axis-inverted",null],[2,"mat-slider-sliding",null],[2,"mat-slider-thumb-label-showing",null],[2,"mat-slider-vertical",null],[2,"mat-slider-min-value",null],[2,"mat-slider-hide-last-tick",null],[2,"_mat-animation-noopable",null],[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"input"],[null,"focus"],[null,"blur"],[null,"click"],[null,"keydown"],[null,"keyup"],[null,"mouseenter"],[null,"slide"],[null,"slideend"],[null,"slidestart"]],function(t,e,n){var i=!0,r=t.component;return"focus"===e&&(i=!1!==Ao(t,20)._onFocus()&&i),"blur"===e&&(i=!1!==Ao(t,20)._onBlur()&&i),"click"===e&&(i=!1!==Ao(t,20)._onClick(n)&&i),"keydown"===e&&(i=!1!==Ao(t,20)._onKeydown(n)&&i),"keyup"===e&&(i=!1!==Ao(t,20)._onKeyup()&&i),"mouseenter"===e&&(i=!1!==Ao(t,20)._onMouseenter()&&i),"slide"===e&&(i=!1!==Ao(t,20)._onSlide(n)&&i),"slideend"===e&&(i=!1!==Ao(t,20)._onSlideEnd()&&i),"slidestart"===e&&(i=!1!==Ao(t,20)._onSlideStart(n)&&i),"input"===e&&(i=!1!==r.setValue("shadow.offsetX",n.value)&&i),i},bx,yx)),Wo(20,245760,null,0,mx,[ei,Lm,oi,[2,km],[8,null],[2,c_]],{max:[0,"max"],min:[1,"min"]},{input:"input"}),Xo(1024,null,ip,function(t){return[t]},[mx]),Wo(22,540672,null,0,id,[[8,null],[8,null],[6,ip],[2,nd]],{form:[0,"form"]},null),Xo(2048,null,hp,null,[id]),Wo(24,16384,null,0,zp,[[4,hp]],null,null),(t()(),to(25,0,null,null,9,"div",[["class","slider-container"]],null,null,null,null,null)),(t()(),to(26,0,null,null,2,"div",[["class","slider-label"],["trans",""]],null,null,null,null,null)),Wo(27,4341760,null,0,lv,[ei,uv,wu],null,null),(t()(),ms(-1,null,["Offset Y"])),(t()(),to(29,0,null,null,5,"mat-slider",[["class","mat-slider"],["max","20"],["min","1"],["role","slider"]],[[8,"tabIndex",0],[1,"aria-disabled",0],[1,"aria-valuemax",0],[1,"aria-valuemin",0],[1,"aria-valuenow",0],[1,"aria-orientation",0],[2,"mat-slider-disabled",null],[2,"mat-slider-has-ticks",null],[2,"mat-slider-horizontal",null],[2,"mat-slider-axis-inverted",null],[2,"mat-slider-sliding",null],[2,"mat-slider-thumb-label-showing",null],[2,"mat-slider-vertical",null],[2,"mat-slider-min-value",null],[2,"mat-slider-hide-last-tick",null],[2,"_mat-animation-noopable",null],[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"input"],[null,"focus"],[null,"blur"],[null,"click"],[null,"keydown"],[null,"keyup"],[null,"mouseenter"],[null,"slide"],[null,"slideend"],[null,"slidestart"]],function(t,e,n){var i=!0,r=t.component;return"focus"===e&&(i=!1!==Ao(t,30)._onFocus()&&i),"blur"===e&&(i=!1!==Ao(t,30)._onBlur()&&i),"click"===e&&(i=!1!==Ao(t,30)._onClick(n)&&i),"keydown"===e&&(i=!1!==Ao(t,30)._onKeydown(n)&&i),"keyup"===e&&(i=!1!==Ao(t,30)._onKeyup()&&i),"mouseenter"===e&&(i=!1!==Ao(t,30)._onMouseenter()&&i),"slide"===e&&(i=!1!==Ao(t,30)._onSlide(n)&&i),"slideend"===e&&(i=!1!==Ao(t,30)._onSlideEnd()&&i),"slidestart"===e&&(i=!1!==Ao(t,30)._onSlideStart(n)&&i),"input"===e&&(i=!1!==r.setValue("shadow.offsetY",n.value)&&i),i},bx,yx)),Wo(30,245760,null,0,mx,[ei,Lm,oi,[2,km],[8,null],[2,c_]],{max:[0,"max"],min:[1,"min"]},{input:"input"}),Xo(1024,null,ip,function(t){return[t]},[mx]),Wo(32,540672,null,0,id,[[8,null],[8,null],[6,ip],[2,nd]],{form:[0,"form"]},null),Xo(2048,null,hp,null,[id]),Wo(34,16384,null,0,zp,[[4,hp]],null,null)],function(t,e){var n=e.component;t(e,4,0,"color-wheel-custom"),t(e,10,0,"20","1"),t(e,12,0,n.activeObject.getControl("shadow.blur")),t(e,20,0,"20","1"),t(e,22,0,n.activeObject.getControl("shadow.offsetX")),t(e,30,0,"20","1"),t(e,32,0,n.activeObject.getControl("shadow.offsetY"))},function(t,e){t(e,1,0,Ao(e,2).disabled||null,"NoopAnimations"===Ao(e,2)._animationMode),t(e,3,0,Ao(e,4).inline),t(e,9,1,[Ao(e,10).tabIndex,Ao(e,10).disabled,Ao(e,10).max,Ao(e,10).min,Ao(e,10).value,Ao(e,10).vertical?"vertical":"horizontal",Ao(e,10).disabled,Ao(e,10).tickInterval,!Ao(e,10).vertical,Ao(e,10)._invertAxis,Ao(e,10)._isSliding,Ao(e,10).thumbLabel,Ao(e,10).vertical,Ao(e,10)._isMinValue,Ao(e,10).disabled||Ao(e,10)._isMinValue&&Ao(e,10)._thumbGap&&Ao(e,10)._invertAxis,"NoopAnimations"===Ao(e,10)._animationMode,Ao(e,14).ngClassUntouched,Ao(e,14).ngClassTouched,Ao(e,14).ngClassPristine,Ao(e,14).ngClassDirty,Ao(e,14).ngClassValid,Ao(e,14).ngClassInvalid,Ao(e,14).ngClassPending]),t(e,19,1,[Ao(e,20).tabIndex,Ao(e,20).disabled,Ao(e,20).max,Ao(e,20).min,Ao(e,20).value,Ao(e,20).vertical?"vertical":"horizontal",Ao(e,20).disabled,Ao(e,20).tickInterval,!Ao(e,20).vertical,Ao(e,20)._invertAxis,Ao(e,20)._isSliding,Ao(e,20).thumbLabel,Ao(e,20).vertical,Ao(e,20)._isMinValue,Ao(e,20).disabled||Ao(e,20)._isMinValue&&Ao(e,20)._thumbGap&&Ao(e,20)._invertAxis,"NoopAnimations"===Ao(e,20)._animationMode,Ao(e,24).ngClassUntouched,Ao(e,24).ngClassTouched,Ao(e,24).ngClassPristine,Ao(e,24).ngClassDirty,Ao(e,24).ngClassValid,Ao(e,24).ngClassInvalid,Ao(e,24).ngClassPending]),t(e,29,1,[Ao(e,30).tabIndex,Ao(e,30).disabled,Ao(e,30).max,Ao(e,30).min,Ao(e,30).value,Ao(e,30).vertical?"vertical":"horizontal",Ao(e,30).disabled,Ao(e,30).tickInterval,!Ao(e,30).vertical,Ao(e,30)._invertAxis,Ao(e,30)._isSliding,Ao(e,30).thumbLabel,Ao(e,30).vertical,Ao(e,30)._isMinValue,Ao(e,30).disabled||Ao(e,30)._isMinValue&&Ao(e,30)._thumbGap&&Ao(e,30)._invertAxis,"NoopAnimations"===Ao(e,30)._animationMode,Ao(e,34).ngClassUntouched,Ao(e,34).ngClassTouched,Ao(e,34).ngClassPristine,Ao(e,34).ngClassDirty,Ao(e,34).ngClassValid,Ao(e,34).ngClassInvalid,Ao(e,34).ngClassPending])})}var vS=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),yS=function(t){function e(e,n,i){var r=t.call(this,n,i)||this;return r.activeObject=e,r.history=n,r.controls=i,r.name="color",r}return vS(e,t),e}(jx),bS=Sr({encapsulation:2,styles:[["color-controls-drawer{display:block}color-controls-drawer color-widget{margin:0 auto}"]],data:{}});function _S(t){return bs(0,[(t()(),to(0,0,null,null,7,"div",[["class","content"]],null,null,null,null,null)),(t()(),to(1,0,null,null,6,"color-widget",[],[[2,"compact",null],[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngModelChange"]],function(t,e,n){var i=!0;return"ngModelChange"===e&&(i=0!=(t.component.dirty=!0)&&i),i},gx,dx)),Wo(2,49152,null,0,px,[Qf,wu],null,null),Xo(1024,null,ip,function(t){return[t]},[px]),Wo(4,540672,null,0,id,[[8,null],[8,null],[6,ip],[2,nd]],{form:[0,"form"]},{update:"ngModelChange"}),Xo(2048,null,hp,null,[id]),Wo(6,16384,null,0,zp,[[4,hp]],null,null),hs(0,0)],function(t,e){var n=e.component;t(e,4,0,n.activeObject.getControl(n.controlName))},function(t,e){t(e,1,0,Ao(e,2).compact,Ao(e,6).ngClassUntouched,Ao(e,6).ngClassTouched,Ao(e,6).ngClassPristine,Ao(e,6).ngClassDirty,Ao(e,6).ngClassValid,Ao(e,6).ngClassInvalid,Ao(e,6).ngClassPending)})}var wS=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),xS=function(t){function e(e,n,i){var r=t.call(this,n,i)||this;return r.activeObject=e,r.history=n,r.controls=i,r.name="outline",r}return wS(e,t),e.prototype.setValue=function(t,e){this.dirty=!0,this.activeObject.setValue(t,e)},e}(jx),CS=Sr({encapsulation:2,styles:[["outline-controls-drawer{display:block}outline-controls-drawer .slider-container{margin:0}outline-controls-drawer .content{flex-direction:column}"]],data:{}});function SS(t){return bs(0,[(t()(),to(0,0,null,null,16,"div",[["class","content"]],null,null,null,null,null)),(t()(),to(1,0,null,null,5,"color-widget",[],[[2,"compact",null],[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],null,null,gx,dx)),Wo(2,49152,null,0,px,[Qf,wu],{compact:[0,"compact"]},null),Xo(1024,null,ip,function(t){return[t]},[px]),Wo(4,540672,null,0,id,[[8,null],[8,null],[6,ip],[2,nd]],{form:[0,"form"]},null),Xo(2048,null,hp,null,[id]),Wo(6,16384,null,0,zp,[[4,hp]],null,null),(t()(),to(7,0,null,null,9,"div",[["class","slider-container"]],null,null,null,null,null)),(t()(),to(8,0,null,null,2,"div",[["class","slider-label"],["trans",""]],null,null,null,null,null)),Wo(9,4341760,null,0,lv,[ei,uv,wu],null,null),(t()(),ms(-1,null,["Outline Width"])),(t()(),to(11,0,null,null,5,"mat-slider",[["class","mat-slider"],["max","20"],["min","0"],["role","slider"],["step","1"]],[[8,"tabIndex",0],[1,"aria-disabled",0],[1,"aria-valuemax",0],[1,"aria-valuemin",0],[1,"aria-valuenow",0],[1,"aria-orientation",0],[2,"mat-slider-disabled",null],[2,"mat-slider-has-ticks",null],[2,"mat-slider-horizontal",null],[2,"mat-slider-axis-inverted",null],[2,"mat-slider-sliding",null],[2,"mat-slider-thumb-label-showing",null],[2,"mat-slider-vertical",null],[2,"mat-slider-min-value",null],[2,"mat-slider-hide-last-tick",null],[2,"_mat-animation-noopable",null],[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"input"],[null,"focus"],[null,"blur"],[null,"click"],[null,"keydown"],[null,"keyup"],[null,"mouseenter"],[null,"slide"],[null,"slideend"],[null,"slidestart"]],function(t,e,n){var i=!0,r=t.component;return"focus"===e&&(i=!1!==Ao(t,12)._onFocus()&&i),"blur"===e&&(i=!1!==Ao(t,12)._onBlur()&&i),"click"===e&&(i=!1!==Ao(t,12)._onClick(n)&&i),"keydown"===e&&(i=!1!==Ao(t,12)._onKeydown(n)&&i),"keyup"===e&&(i=!1!==Ao(t,12)._onKeyup()&&i),"mouseenter"===e&&(i=!1!==Ao(t,12)._onMouseenter()&&i),"slide"===e&&(i=!1!==Ao(t,12)._onSlide(n)&&i),"slideend"===e&&(i=!1!==Ao(t,12)._onSlideEnd()&&i),"slidestart"===e&&(i=!1!==Ao(t,12)._onSlideStart(n)&&i),"input"===e&&(i=!1!==r.setValue("stroke.width",n.value)&&i),i},bx,yx)),Wo(12,245760,null,0,mx,[ei,Lm,oi,[2,km],[8,null],[2,c_]],{max:[0,"max"],min:[1,"min"],step:[2,"step"]},{input:"input"}),Xo(1024,null,ip,function(t){return[t]},[mx]),Wo(14,540672,null,0,id,[[8,null],[8,null],[6,ip],[2,nd]],{form:[0,"form"]},null),Xo(2048,null,hp,null,[id]),Wo(16,16384,null,0,zp,[[4,hp]],null,null)],function(t,e){var n=e.component;t(e,2,0,!0),t(e,4,0,n.activeObject.getControl(n.controlName)),t(e,12,0,"20","0","1"),t(e,14,0,n.activeObject.getControl("stroke.width"))},function(t,e){t(e,1,0,Ao(e,2).compact,Ao(e,6).ngClassUntouched,Ao(e,6).ngClassTouched,Ao(e,6).ngClassPristine,Ao(e,6).ngClassDirty,Ao(e,6).ngClassValid,Ao(e,6).ngClassInvalid,Ao(e,6).ngClassPending),t(e,11,1,[Ao(e,12).tabIndex,Ao(e,12).disabled,Ao(e,12).max,Ao(e,12).min,Ao(e,12).value,Ao(e,12).vertical?"vertical":"horizontal",Ao(e,12).disabled,Ao(e,12).tickInterval,!Ao(e,12).vertical,Ao(e,12)._invertAxis,Ao(e,12)._isSliding,Ao(e,12).thumbLabel,Ao(e,12).vertical,Ao(e,12)._isMinValue,Ao(e,12).disabled||Ao(e,12)._isMinValue&&Ao(e,12)._thumbGap&&Ao(e,12)._invertAxis,"NoopAnimations"===Ao(e,12)._animationMode,Ao(e,16).ngClassUntouched,Ao(e,16).ngClassTouched,Ao(e,16).ngClassPristine,Ao(e,16).ngClassDirty,Ao(e,16).ngClassValid,Ao(e,16).ngClassInvalid,Ao(e,16).ngClassPending])})}var kS=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),ES=function(t){function e(e,n,i,r,o,s,a){var l=t.call(this,n,i)||this;return l.activeObject=e,l.history=n,l.controls=i,l.settings=r,l.sanitizer=o,l.fillTool=s,l.importTool=a,l.name="texture",l.defaultTextures=Array.from(Array(28).keys()),l}return kS(e,t),e.prototype.getTextureBgStyle=function(t){return this.sanitizer.bypassSecurityTrustStyle("url("+this.getTextureUrl(t)+")")},e.prototype.getTextureUrl=function(t){return this.settings.getAssetUrl("images/textures/"+t+".png")},e.prototype.fillWithPattern=function(t){this.dirty=!0,this.fillTool.withPattern(this.getTextureUrl(t))},e.prototype.openUploadDialog=function(){var t=this;this.importTool.importAndGetData().then(function(e){t.dirty=!0,t.fillTool.withPattern(e)})},e}(jx),TS=[{type:"linear",x1:-80,y1:0,x2:80,y2:0,colorStops:{0:"#ffe47b",1:"rgb(111,154,211)"}},{type:"linear",x1:0,y1:-120,x2:0,y2:120,colorStops:{0:"#ff4040",1:"#e6399b"}},{type:"linear",x1:-90,y1:-90,x2:90,y2:90,colorStops:{0:"rgb(166,111,213)",.5:"rgba(106, 72, 215, 0.5)",1:"#200772"}},{type:"radial",r1:100,r2:10,x1:0,y1:0,x2:0,y2:0,colorStops:{0:"#FF4F4F",1:"rgb(255, 239, 64)"}},{type:"radial",r1:100,r2:10,x1:0,y1:0,x2:20,y2:20,colorStops:{0:"#ffe47b",.5:"rgb(111,154,211)",1:"rgb(166,111,213)"}},{type:"radial",r1:50,r2:80,x1:45,y1:45,x2:52,y2:50,colorStops:{0:"rgb(155, 237, 0)",1:"rgba(0, 164, 128,0.4)"}},{type:"linear",x1:-90,y1:-90,x2:90,y2:90,colorStops:{0:"#9ecb2d",.5:"#72aa00",1:"#bfd255"}},{type:"radial",r1:100,r2:50,x1:30,y1:0,x2:0,y2:0,colorStops:{0:"#aebcbf",1:"#0a0809"}},{type:"linear",x1:-80,y1:0,x2:80,y2:0,colorStops:{0:"#ffffff",1:"#f6f6f6"}},{type:"linear",x1:0,y1:-120,x2:0,y2:120,colorStops:{0:"#fefcea",1:"#f1da36"}},{type:"linear",x1:-90,y1:-90,x2:90,y2:90,colorStops:{0:"rgb(166,111,213)",.5:"rgba(106, 72, 215, 0.5)",1:"#ff1a00"}},{type:"linear",x1:0,y1:-120,x2:0,y2:120,colorStops:{0:"#b7deed",1:"#21b4e2"}},{type:"linear",x1:-80,y1:100,x2:80,y2:-100,colorStops:{0:"#ffe47b",1:"rgb(111,154,211)"}}],OS=function(){function t(t,e){this.activeObject=t,this.canvas=e}return t.prototype.withPattern=function(t){var e=this;yu.fabric.util.loadImage(t,function(t){var n=new yu.fabric.Pattern({source:t,repeat:"repeat"});e.activeObject.setValue("fill",n)})},t.prototype.withGradient=function(t,e){void 0===e&&(e="fill");var n=this.activeObject.get();n&&(n.setGradient(e,TS[t]),this.canvas.render())},t}(),IS=Sr({encapsulation:2,styles:[["texture-controls-drawer{display:flex;justify-content:flex-start;align-items:center}texture-controls-drawer>.texture{margin:0 5px}texture-controls-drawer>.texture:first-of-type{margin-left:0}"]],data:{}});function AS(t){return bs(0,[(t()(),to(0,0,null,null,1,"div",[["class","texture button-with-image"]],null,[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.fillWithPattern(t.context.$implicit)&&i),i},null,null)),(t()(),to(1,0,null,null,0,"div",[["class","bg-image"]],[[4,"background-image",null]],null,null,null,null))],null,function(t,e){t(e,1,0,e.component.getTextureBgStyle(e.context.$implicit))})}function PS(t){return bs(0,[(t()(),to(0,0,null,null,5,"div",[["class","button-with-image"]],null,[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.openUploadDialog()&&i),i},null,null)),(t()(),to(1,0,null,null,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","add-image-custom"]],[[2,"mat-icon-inline",null]],null,null,Tv,Ev)),Wo(2,638976,null,0,Sv,[ei,_v,[8,null]],{svgIcon:[0,"svgIcon"]},null),(t()(),to(3,0,null,null,2,"div",[["class","bottom-label"],["trans",""]],null,null,null,null,null)),Wo(4,4341760,null,0,lv,[ei,uv,wu],null,null),(t()(),ms(-1,null,["Upload"])),(t()(),$r(16777216,null,null,1,null,AS)),Wo(7,278528,null,0,zu,[ri,ii,Ei],{ngForOf:[0,"ngForOf"]},null)],function(t,e){var n=e.component;t(e,2,0,"add-image-custom"),t(e,7,0,n.defaultTextures)},function(t,e){t(e,1,0,Ao(e,2).inline)})}var DS=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),jS=function(t){function e(e,n,i,r,o,s){var a=t.call(this,n,i)||this;return a.activeObject=e,a.history=n,a.controls=i,a.settings=r,a.sanitizer=o,a.fillTool=s,a.name="gradient",a.defaultGradients=TS,a}return DS(e,t),e.prototype.getGradientBgStyle=function(t){return this.sanitizer.bypassSecurityTrustStyle("url("+this.getGradientUrl(t)+")")},e.prototype.getGradientUrl=function(t){return this.settings.getAssetUrl("images/gradients/"+t+".png")},e.prototype.fillWithGradient=function(t){this.dirty=!0,this.fillTool.withGradient(t)},e}(jx),MS=Sr({encapsulation:2,styles:[["gradient-controls-drawer{display:flex;justify-content:center;align-items:center}@media only screen and (max-width:768px){gradient-controls-drawer{justify-content:flex-start}}"]],data:{}});function RS(t){return bs(0,[(t()(),to(0,0,null,null,1,"div",[["class","gradient button-with-image no-label"]],null,[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.fillWithGradient(t.context.index)&&i),i},null,null)),(t()(),to(1,0,null,null,0,"div",[["class","bg-image"]],[[4,"background-image",null]],null,null,null,null))],null,function(t,e){t(e,1,0,e.component.getGradientBgStyle(e.context.index+1))})}function FS(t){return bs(0,[(t()(),$r(16777216,null,null,1,null,RS)),Wo(1,278528,null,0,zu,[ri,ii,Ei],{ngForOf:[0,"ngForOf"]},null)],function(t,e){t(e,1,0,e.component.defaultGradients)},null)}var NS=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),LS=function(t){function e(e,n,i){var r=t.call(this,n,i)||this;return r.activeObject=e,r.history=n,r.controls=i,r.name="opacity",r}return NS(e,t),e.prototype.setValue=function(t,e){this.dirty=!0,this.activeObject.setValue(t,e)},e}(jx),BS=Sr({encapsulation:2,styles:[["opacity-controls-drawer{display:block}"]],data:{}});function VS(t){return bs(0,[ss(402653184,1,{colorPickerButton:0}),(t()(),to(1,0,null,null,10,"div",[["class","content"]],null,null,null,null,null)),(t()(),to(2,0,null,null,9,"div",[["class","slider-container"]],null,null,null,null,null)),(t()(),to(3,0,null,null,2,"div",[["class","slider-label"],["trans",""]],null,null,null,null,null)),Wo(4,4341760,null,0,lv,[ei,uv,wu],null,null),(t()(),ms(-1,null,["Opacity"])),(t()(),to(6,0,null,null,5,"mat-slider",[["class","mat-slider"],["max","1"],["min","0.1"],["role","slider"],["step","0.1"]],[[8,"tabIndex",0],[1,"aria-disabled",0],[1,"aria-valuemax",0],[1,"aria-valuemin",0],[1,"aria-valuenow",0],[1,"aria-orientation",0],[2,"mat-slider-disabled",null],[2,"mat-slider-has-ticks",null],[2,"mat-slider-horizontal",null],[2,"mat-slider-axis-inverted",null],[2,"mat-slider-sliding",null],[2,"mat-slider-thumb-label-showing",null],[2,"mat-slider-vertical",null],[2,"mat-slider-min-value",null],[2,"mat-slider-hide-last-tick",null],[2,"_mat-animation-noopable",null],[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"input"],[null,"focus"],[null,"blur"],[null,"click"],[null,"keydown"],[null,"keyup"],[null,"mouseenter"],[null,"slide"],[null,"slideend"],[null,"slidestart"]],function(t,e,n){var i=!0,r=t.component;return"focus"===e&&(i=!1!==Ao(t,7)._onFocus()&&i),"blur"===e&&(i=!1!==Ao(t,7)._onBlur()&&i),"click"===e&&(i=!1!==Ao(t,7)._onClick(n)&&i),"keydown"===e&&(i=!1!==Ao(t,7)._onKeydown(n)&&i),"keyup"===e&&(i=!1!==Ao(t,7)._onKeyup()&&i),"mouseenter"===e&&(i=!1!==Ao(t,7)._onMouseenter()&&i),"slide"===e&&(i=!1!==Ao(t,7)._onSlide(n)&&i),"slideend"===e&&(i=!1!==Ao(t,7)._onSlideEnd()&&i),"slidestart"===e&&(i=!1!==Ao(t,7)._onSlideStart(n)&&i),"input"===e&&(i=!1!==r.setValue("opacity",n.value)&&i),i},bx,yx)),Wo(7,245760,null,0,mx,[ei,Lm,oi,[2,km],[8,null],[2,c_]],{max:[0,"max"],min:[1,"min"],step:[2,"step"]},{input:"input"}),Xo(1024,null,ip,function(t){return[t]},[mx]),Wo(9,540672,null,0,id,[[8,null],[8,null],[6,ip],[2,nd]],{form:[0,"form"]},null),Xo(2048,null,hp,null,[id]),Wo(11,16384,null,0,zp,[[4,hp]],null,null)],function(t,e){var n=e.component;t(e,7,0,"1","0.1","0.1"),t(e,9,0,n.activeObject.getControl("opacity"))},function(t,e){t(e,6,1,[Ao(e,7).tabIndex,Ao(e,7).disabled,Ao(e,7).max,Ao(e,7).min,Ao(e,7).value,Ao(e,7).vertical?"vertical":"horizontal",Ao(e,7).disabled,Ao(e,7).tickInterval,!Ao(e,7).vertical,Ao(e,7)._invertAxis,Ao(e,7)._isSliding,Ao(e,7).thumbLabel,Ao(e,7).vertical,Ao(e,7)._isMinValue,Ao(e,7).disabled||Ao(e,7)._isMinValue&&Ao(e,7)._thumbGap&&Ao(e,7)._invertAxis,"NoopAnimations"===Ao(e,7)._animationMode,Ao(e,11).ngClassUntouched,Ao(e,11).ngClassTouched,Ao(e,11).ngClassPristine,Ao(e,11).ngClassDirty,Ao(e,11).ngClassValid,Ao(e,11).ngClassInvalid,Ao(e,11).ngClassPending])})}var zS=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),HS=function(t){function e(e,n,i){var r=t.call(this,n,i)||this;return r.activeObject=e,r.history=n,r.editorControls=i,r.name="textOptions",r}return zS(e,t),e.prototype.toggleValue=function(t){this.dirty=!0;var e=this.activeObject.getControl(t);e.setValue(!e.value)},e.prototype.toggleItalicStyle=function(){this.dirty=!0;var t=this.activeObject.getControl("text.fontStyle");t.setValue("italic"===t.value?"normal":"italic")},e}(jx),WS=Sr({encapsulation:2,styles:[["text-controls-drawer{display:block;height:100%}text-controls-drawer form{height:100%;display:flex;align-items:center;justify-content:center}text-controls-drawer .selected{color:#009688}"]],data:{}});function US(t){return bs(0,[(t()(),to(0,0,null,null,38,"form",[["novalidate",""]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"submit"],[null,"reset"]],function(t,e,n){var i=!0;return"submit"===e&&(i=!1!==Ao(t,2).onSubmit(n)&&i),"reset"===e&&(i=!1!==Ao(t,2).onReset()&&i),i},null,null)),Wo(1,16384,null,0,hd,[],null,null),Wo(2,540672,null,0,rd,[[8,null],[8,null]],{form:[0,"form"]},null),Xo(2048,null,Gh,null,[rd]),Wo(4,16384,null,0,Hp,[[4,Gh]],null,null),(t()(),to(5,0,null,null,16,"div",[["class","button-group"]],null,null,null,null,null)),(t()(),to(6,0,null,null,12,"div",[["class","buttons"]],null,null,null,null,null)),(t()(),to(7,0,null,null,3,"button",[["mat-icon-button",""]],[[2,"selected",null],[8,"disabled",0],[2,"_mat-animation-noopable",null]],[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.activeObject.setValue("text.align","left")&&i),i},d_,p_)),Wo(8,180224,null,0,qv,[ei,Yd,Lm,[2,c_]],null,null),(t()(),to(9,0,null,0,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","format-align-left"]],[[2,"mat-icon-inline",null]],null,null,Tv,Ev)),Wo(10,638976,null,0,Sv,[ei,_v,[8,null]],{svgIcon:[0,"svgIcon"]},null),(t()(),to(11,0,null,null,3,"button",[["mat-icon-button",""]],[[2,"selected",null],[8,"disabled",0],[2,"_mat-animation-noopable",null]],[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.activeObject.setValue("text.align","center")&&i),i},d_,p_)),Wo(12,180224,null,0,qv,[ei,Yd,Lm,[2,c_]],null,null),(t()(),to(13,0,null,0,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","format-align-center"]],[[2,"mat-icon-inline",null]],null,null,Tv,Ev)),Wo(14,638976,null,0,Sv,[ei,_v,[8,null]],{svgIcon:[0,"svgIcon"]},null),(t()(),to(15,0,null,null,3,"button",[["mat-icon-button",""]],[[2,"selected",null],[8,"disabled",0],[2,"_mat-animation-noopable",null]],[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.activeObject.setValue("text.align","right")&&i),i},d_,p_)),Wo(16,180224,null,0,qv,[ei,Yd,Lm,[2,c_]],null,null),(t()(),to(17,0,null,0,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","format-align-right"]],[[2,"mat-icon-inline",null]],null,null,Tv,Ev)),Wo(18,638976,null,0,Sv,[ei,_v,[8,null]],{svgIcon:[0,"svgIcon"]},null),(t()(),to(19,0,null,null,2,"div",[["class","name bottom-label"],["trans",""]],null,null,null,null,null)),Wo(20,4341760,null,0,lv,[ei,uv,wu],null,null),(t()(),ms(-1,null,["Align Text"])),(t()(),to(22,0,null,null,16,"div",[["class","button-group"]],null,null,null,null,null)),(t()(),to(23,0,null,null,12,"div",[["class","buttons"]],null,null,null,null,null)),(t()(),to(24,0,null,null,3,"button",[["mat-icon-button",""]],[[2,"selected",null],[8,"disabled",0],[2,"_mat-animation-noopable",null]],[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.toggleValue("text.underline")&&i),i},d_,p_)),Wo(25,180224,null,0,qv,[ei,Yd,Lm,[2,c_]],null,null),(t()(),to(26,0,null,0,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","format-underlined"]],[[2,"mat-icon-inline",null]],null,null,Tv,Ev)),Wo(27,638976,null,0,Sv,[ei,_v,[8,null]],{svgIcon:[0,"svgIcon"]},null),(t()(),to(28,0,null,null,3,"button",[["mat-icon-button",""]],[[2,"selected",null],[8,"disabled",0],[2,"_mat-animation-noopable",null]],[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.toggleValue("text.linethrough")&&i),i},d_,p_)),Wo(29,180224,null,0,qv,[ei,Yd,Lm,[2,c_]],null,null),(t()(),to(30,0,null,0,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","format-strikethrough"]],[[2,"mat-icon-inline",null]],null,null,Tv,Ev)),Wo(31,638976,null,0,Sv,[ei,_v,[8,null]],{svgIcon:[0,"svgIcon"]},null),(t()(),to(32,0,null,null,3,"button",[["mat-icon-button",""]],[[2,"selected",null],[8,"disabled",0],[2,"_mat-animation-noopable",null]],[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.toggleItalicStyle()&&i),i},d_,p_)),Wo(33,180224,null,0,qv,[ei,Yd,Lm,[2,c_]],null,null),(t()(),to(34,0,null,0,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","format-italic"]],[[2,"mat-icon-inline",null]],null,null,Tv,Ev)),Wo(35,638976,null,0,Sv,[ei,_v,[8,null]],{svgIcon:[0,"svgIcon"]},null),(t()(),to(36,0,null,null,2,"div",[["class","name bottom-label"],["trans",""]],null,null,null,null,null)),Wo(37,4341760,null,0,lv,[ei,uv,wu],null,null),(t()(),ms(-1,null,["Format Text"]))],function(t,e){t(e,2,0,e.component.activeObject.model),t(e,10,0,"format-align-left"),t(e,14,0,"format-align-center"),t(e,18,0,"format-align-right"),t(e,27,0,"format-underlined"),t(e,31,0,"format-strikethrough"),t(e,35,0,"format-italic")},function(t,e){var n=e.component;t(e,0,0,Ao(e,4).ngClassUntouched,Ao(e,4).ngClassTouched,Ao(e,4).ngClassPristine,Ao(e,4).ngClassDirty,Ao(e,4).ngClassValid,Ao(e,4).ngClassInvalid,Ao(e,4).ngClassPending),t(e,7,0,"left"===n.activeObject.getValue("text.align"),Ao(e,8).disabled||null,"NoopAnimations"===Ao(e,8)._animationMode),t(e,9,0,Ao(e,10).inline),t(e,11,0,"center"===n.activeObject.getValue("text.align"),Ao(e,12).disabled||null,"NoopAnimations"===Ao(e,12)._animationMode),t(e,13,0,Ao(e,14).inline),t(e,15,0,"right"===n.activeObject.getValue("text.align"),Ao(e,16).disabled||null,"NoopAnimations"===Ao(e,16)._animationMode),t(e,17,0,Ao(e,18).inline),t(e,24,0,n.activeObject.getValue("text.underline"),Ao(e,25).disabled||null,"NoopAnimations"===Ao(e,25)._animationMode),t(e,26,0,Ao(e,27).inline),t(e,28,0,n.activeObject.getValue("text.linethrough"),Ao(e,29).disabled||null,"NoopAnimations"===Ao(e,29)._animationMode),t(e,30,0,Ao(e,31).inline),t(e,32,0,"italic"===n.activeObject.getValue("text.fontStyle"),Ao(e,33).disabled||null,"NoopAnimations"===Ao(e,33)._animationMode),t(e,34,0,Ao(e,35).inline)})}var XS=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),YS=function(t){function e(e,n,i,r){var o=t.call(this,n,i)||this;return o.activeObject=e,o.history=n,o.editorControls=i,o.activeDrawer=r,o.name="objectSettings",o}return XS(e,t),e.prototype.ngAfterViewInit=function(){var t=this;this.drawers.changes.pipe(_w(0)).subscribe(function(){t.activeDrawer.set(t.drawers.last||t.drawers.first)})},e.prototype.apply=function(){this.activeObject.deselect(),this.controls.closeAllPanels()},e.prototype.close=function(){this.activeObject.deselect(),this.controls.closeAllPanels()},e}(jx),qS=Sr({encapsulation:2,styles:[["object-settings-drawer{display:block}object-settings-drawer .button-with-image mat-icon{margin-top:8px;vertical-align:middle}@media only screen and (max-width:768px){object-settings-drawer.controls-drawer .content{justify-content:flex-start!important}}"]],data:{}});function GS(t){return bs(0,[(t()(),to(0,0,null,null,5,"div",[["class","button-with-image"]],null,[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.controls.openPanel("textControls")&&i),i},null,null)),(t()(),to(1,0,null,null,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","text-options-custom"]],[[2,"mat-icon-inline",null]],null,null,Tv,Ev)),Wo(2,638976,null,0,Sv,[ei,_v,[8,null]],{svgIcon:[0,"svgIcon"]},null),(t()(),to(3,0,null,null,2,"div",[["class","bottom-label"],["trans",""]],null,null,null,null,null)),Wo(4,4341760,null,0,lv,[ei,uv,wu],null,null),(t()(),ms(-1,null,["Text Style"]))],function(t,e){t(e,2,0,"text-options-custom")},function(t,e){t(e,1,0,Ao(e,2).inline)})}function KS(t){return bs(0,[(t()(),to(0,0,null,null,44,null,null,null,null,null,null,null)),(t()(),to(1,0,null,null,5,"div",[["class","button-with-image"]],null,[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.controls.openPanel("shadowControls")&&i),i},null,null)),(t()(),to(2,0,null,null,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","shadow-custom"]],[[2,"mat-icon-inline",null]],null,null,Tv,Ev)),Wo(3,638976,null,0,Sv,[ei,_v,[8,null]],{svgIcon:[0,"svgIcon"]},null),(t()(),to(4,0,null,null,2,"div",[["class","bottom-label"],["trans",""]],null,null,null,null,null)),Wo(5,4341760,null,0,lv,[ei,uv,wu],null,null),(t()(),ms(-1,null,["Shadow"])),(t()(),to(7,0,null,null,5,"div",[["class","button-with-image"]],null,[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.controls.openPanel("colorControls")&&i),i},null,null)),(t()(),to(8,0,null,null,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","color-custom"]],[[2,"mat-icon-inline",null]],null,null,Tv,Ev)),Wo(9,638976,null,0,Sv,[ei,_v,[8,null]],{svgIcon:[0,"svgIcon"]},null),(t()(),to(10,0,null,null,2,"div",[["class","bottom-label"],["trans",""]],null,null,null,null,null)),Wo(11,4341760,null,0,lv,[ei,uv,wu],null,null),(t()(),ms(-1,null,["Color"])),(t()(),to(13,0,null,null,5,"div",[["class","button-with-image"]],null,[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.controls.openPanel("outlineControls")&&i),i},null,null)),(t()(),to(14,0,null,null,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","outline-custom"]],[[2,"mat-icon-inline",null]],null,null,Tv,Ev)),Wo(15,638976,null,0,Sv,[ei,_v,[8,null]],{svgIcon:[0,"svgIcon"]},null),(t()(),to(16,0,null,null,2,"div",[["class","bottom-label"],["trans",""]],null,null,null,null,null)),Wo(17,4341760,null,0,lv,[ei,uv,wu],null,null),(t()(),ms(-1,null,["Outline"])),(t()(),to(19,0,null,null,5,"div",[["class","button-with-image"]],null,[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.controls.openPanel("backgroundControls")&&i),i},null,null)),(t()(),to(20,0,null,null,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","background-custom"]],[[2,"mat-icon-inline",null]],null,null,Tv,Ev)),Wo(21,638976,null,0,Sv,[ei,_v,[8,null]],{svgIcon:[0,"svgIcon"]},null),(t()(),to(22,0,null,null,2,"div",[["class","bottom-label"],["trans",""]],null,null,null,null,null)),Wo(23,4341760,null,0,lv,[ei,uv,wu],null,null),(t()(),ms(-1,null,["Background"])),(t()(),to(25,0,null,null,5,"div",[["class","button-with-image"]],null,[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.controls.openPanel("textureControls")&&i),i},null,null)),(t()(),to(26,0,null,null,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","texture-custom"]],[[2,"mat-icon-inline",null]],null,null,Tv,Ev)),Wo(27,638976,null,0,Sv,[ei,_v,[8,null]],{svgIcon:[0,"svgIcon"]},null),(t()(),to(28,0,null,null,2,"div",[["class","bottom-label"],["trans",""]],null,null,null,null,null)),Wo(29,4341760,null,0,lv,[ei,uv,wu],null,null),(t()(),ms(-1,null,["Texture"])),(t()(),to(31,0,null,null,5,"div",[["class","button-with-image"]],null,[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.controls.openPanel("gradientControls")&&i),i},null,null)),(t()(),to(32,0,null,null,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","gradient-custom"]],[[2,"mat-icon-inline",null]],null,null,Tv,Ev)),Wo(33,638976,null,0,Sv,[ei,_v,[8,null]],{svgIcon:[0,"svgIcon"]},null),(t()(),to(34,0,null,null,2,"div",[["class","bottom-label"],["trans",""]],null,null,null,null,null)),Wo(35,4341760,null,0,lv,[ei,uv,wu],null,null),(t()(),ms(-1,null,["Gradient"])),(t()(),to(37,0,null,null,5,"div",[["class","button-with-image"]],null,[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.controls.openPanel("opacityControls")&&i),i},null,null)),(t()(),to(38,0,null,null,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","opacity-custom"]],[[2,"mat-icon-inline",null]],null,null,Tv,Ev)),Wo(39,638976,null,0,Sv,[ei,_v,[8,null]],{svgIcon:[0,"svgIcon"]},null),(t()(),to(40,0,null,null,2,"div",[["class","bottom-label"],["trans",""]],null,null,null,null,null)),Wo(41,4341760,null,0,lv,[ei,uv,wu],null,null),(t()(),ms(-1,null,["Opacity"])),(t()(),$r(16777216,null,null,1,null,GS)),Wo(44,16384,null,0,Wu,[ri,ii],{ngIf:[0,"ngIf"]},null),(t()(),$r(0,null,null,0))],function(t,e){var n=e.component;t(e,3,0,"shadow-custom"),t(e,9,0,"color-custom"),t(e,15,0,"outline-custom"),t(e,21,0,"background-custom"),t(e,27,0,"texture-custom"),t(e,33,0,"gradient-custom"),t(e,39,0,"opacity-custom"),t(e,44,0,n.activeObject.isText())},function(t,e){t(e,2,0,Ao(e,3).inline),t(e,8,0,Ao(e,9).inline),t(e,14,0,Ao(e,15).inline),t(e,20,0,Ao(e,21).inline),t(e,26,0,Ao(e,27).inline),t(e,32,0,Ao(e,33).inline),t(e,38,0,Ao(e,39).inline)})}function ZS(t){return bs(0,[(t()(),to(0,0,null,null,1,"shadow-controls-drawer",[["class","controls-drawer"]],null,null,null,mS,gS)),Wo(1,49152,[[1,4],["controlsDrawer",4]],0,fS,[Qf,wx,tg,$f],null,null)],null,null)}function QS(t){return bs(0,[(t()(),to(0,0,null,null,3,"color-controls-drawer",[["class","controls-drawer"],["controlName","fill"],["name","colorControls"],["trans",""]],null,null,null,_S,bS)),Wo(1,4341760,null,0,lv,[ei,uv,wu],null,null),Wo(2,49152,[[1,4],["controlsDrawer",4]],0,yS,[wx,tg,$f],{name:[0,"name"],controlName:[1,"controlName"]},null),(t()(),ms(-1,0,["Color"]))],function(t,e){t(e,2,0,"colorControls","fill")},null)}function JS(t){return bs(0,[(t()(),to(0,0,null,null,1,"outline-controls-drawer",[["class","controls-drawer"],["controlName","stroke.color"]],null,null,null,SS,CS)),Wo(1,49152,[[1,4],["controlsDrawer",4]],0,xS,[wx,tg,$f],{controlName:[0,"controlName"]},null)],function(t,e){t(e,1,0,"stroke.color")},null)}function $S(t){return bs(0,[(t()(),to(0,0,null,null,3,"color-controls-drawer",[["class","controls-drawer"],["controlName","backgroundColor"],["name","background"],["trans",""]],null,null,null,_S,bS)),Wo(1,4341760,null,0,lv,[ei,uv,wu],null,null),Wo(2,49152,[[1,4],["controlsDrawer",4]],0,yS,[wx,tg,$f],{name:[0,"name"],controlName:[1,"controlName"]},null),(t()(),ms(-1,0,["Background Color"]))],function(t,e){t(e,2,0,"background","backgroundColor")},null)}function tk(t){return bs(0,[(t()(),to(0,0,null,null,1,"texture-controls-drawer",[["class","controls-drawer"]],null,null,null,PS,IS)),Wo(1,49152,[[1,4],["controlsDrawer",4]],0,ES,[wx,tg,$f,wu,Nh,OS,og],null,null)],null,null)}function ek(t){return bs(0,[(t()(),to(0,0,null,null,1,"gradient-controls-drawer",[["class","controls-drawer"]],null,null,null,FS,MS)),Wo(1,49152,[[1,4],["controlsDrawer",4]],0,jS,[wx,tg,$f,wu,Nh,OS],null,null)],null,null)}function nk(t){return bs(0,[(t()(),to(0,0,null,null,1,"opacity-controls-drawer",[["class","controls-drawer"]],null,null,null,VS,BS)),Wo(1,49152,[[1,4],["controlsDrawer",4]],0,LS,[wx,tg,$f],null,null)],null,null)}function ik(t){return bs(0,[(t()(),to(0,0,null,null,1,"text-controls-drawer",[["class","controls-drawer"]],null,null,null,US,WS)),Wo(1,49152,[[1,4],["controlsDrawer",4]],0,HS,[wx,tg,$f],null,null)],null,null)}function rk(t){return bs(0,[ss(671088640,1,{drawers:1}),(t()(),to(1,0,null,null,18,"div",[["class","content"]],null,null,null,null,null)),(t()(),$r(16777216,null,null,1,null,KS)),Wo(3,16384,null,0,Wu,[ri,ii],{ngIf:[0,"ngIf"]},null),(t()(),$r(16777216,null,null,1,null,ZS)),Wo(5,16384,null,0,Wu,[ri,ii],{ngIf:[0,"ngIf"]},null),(t()(),$r(16777216,null,null,1,null,QS)),Wo(7,16384,null,0,Wu,[ri,ii],{ngIf:[0,"ngIf"]},null),(t()(),$r(16777216,null,null,1,null,JS)),Wo(9,16384,null,0,Wu,[ri,ii],{ngIf:[0,"ngIf"]},null),(t()(),$r(16777216,null,null,1,null,$S)),Wo(11,16384,null,0,Wu,[ri,ii],{ngIf:[0,"ngIf"]},null),(t()(),$r(16777216,null,null,1,null,tk)),Wo(13,16384,null,0,Wu,[ri,ii],{ngIf:[0,"ngIf"]},null),(t()(),$r(16777216,null,null,1,null,ek)),Wo(15,16384,null,0,Wu,[ri,ii],{ngIf:[0,"ngIf"]},null),(t()(),$r(16777216,null,null,1,null,nk)),Wo(17,16384,null,0,Wu,[ri,ii],{ngIf:[0,"ngIf"]},null),(t()(),$r(16777216,null,null,1,null,ik)),Wo(19,16384,null,0,Wu,[ri,ii],{ngIf:[0,"ngIf"]},null)],function(t,e){var n=e.component;t(e,3,0,n.controls.panelIsVisible("objectSettings")),t(e,5,0,n.controls.panelIsVisible("shadowControls")),t(e,7,0,n.controls.panelIsVisible("colorControls")),t(e,9,0,n.controls.panelIsVisible("outlineControls")),t(e,11,0,n.controls.panelIsVisible("backgroundControls")),t(e,13,0,n.controls.panelIsVisible("textureControls")),t(e,15,0,n.controls.panelIsVisible("gradientControls")),t(e,17,0,n.controls.panelIsVisible("opacityControls")),t(e,19,0,n.controls.panelIsVisible("textControls"))},null)}var ok=function(){function t(t,e,n,i,r,o){this.history=t,this.activeObject=e,this.controls=n,this.activeDrawer=i,this.breakpoints=r,this.objects=o}return t.prototype.deleteObject=function(){var t=this.activeObject.get();t&&(this.activeObject.delete(),this.history.add("deleted: "+t.name,"delete-custom"))},t.prototype.openObjectDrawer=function(){var t=this.activeObject.get();switch(this.controls.closeAllPanels(),t.name){case"shape":this.controls.openPanel("shapes");break;case"sticker":this.controls.openPanel("stickers");break;case"text":this.controls.openPanel("text")}},t.prototype.shouldShowSettingsIcon=function(){return!this.activeDrawer.dirty()&&!this.controls.panelIsVisible("objectSettings")},t.prototype.bringActiveObjectToFront=function(){this.activeObject.bringToFront(),this.objects.syncObjects()},t}(),sk=Sr({encapsulation:2,styles:[["mobile-secondary-controls{display:flex;position:absolute;bottom:-60px;height:50px;left:10px;right:10px;padding:5px;max-width:210px;background-color:#fff;box-shadow:0 2px 1px -1px rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 1px 3px 0 rgba(0,0,0,.12);border-radius:2px}mobile-secondary-controls>.left{flex:1 1 auto;text-align:left}mobile-secondary-controls .right{flex:0 0 100px;width:100%;text-align:right}@media only screen and (max-width:768px){mobile-secondary-controls{top:-50px;height:40px;bottom:0;background-color:transparent;box-shadow:none;padding:0;max-width:none}mobile-secondary-controls .mat-icon-button{background-color:#fff;border-radius:3px;margin:0 3px;box-shadow:0 2px 1px -1px rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 1px 3px 0 rgba(0,0,0,.12)}mobile-secondary-controls .mat-icon-button .mat-button-ripple{border-radius:3px}}"]],data:{}});function ak(t){return bs(0,[(t()(),to(0,0,null,null,20,null,null,null,null,null,null,null)),(t()(),to(1,0,null,null,3,"button",[["mat-icon-button",""]],[[8,"disabled",0],[2,"_mat-animation-noopable",null]],[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.openObjectDrawer()&&i),i},d_,p_)),Wo(2,180224,null,0,qv,[ei,Yd,Lm,[2,c_]],null,null),(t()(),to(3,0,null,0,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","add-circle-outline"]],[[2,"mat-icon-inline",null]],null,null,Tv,Ev)),Wo(4,638976,null,0,Sv,[ei,_v,[8,null]],{svgIcon:[0,"svgIcon"]},null),(t()(),to(5,0,null,null,3,"button",[["mat-icon-button",""]],[[8,"disabled",0],[2,"_mat-animation-noopable",null]],[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.deleteObject()&&i),i},d_,p_)),Wo(6,180224,null,0,qv,[ei,Yd,Lm,[2,c_]],null,null),(t()(),to(7,0,null,0,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","delete-custom"]],[[2,"mat-icon-inline",null]],null,null,Tv,Ev)),Wo(8,638976,null,0,Sv,[ei,_v,[8,null]],{svgIcon:[0,"svgIcon"]},null),(t()(),to(9,0,null,null,3,"button",[["mat-icon-button",""]],[[8,"disabled",0],[2,"_mat-animation-noopable",null]],[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.activeObject.flipHorizontal()&&i),i},d_,p_)),Wo(10,180224,null,0,qv,[ei,Yd,Lm,[2,c_]],null,null),(t()(),to(11,0,null,0,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","flip"]],[[2,"mat-icon-inline",null]],null,null,Tv,Ev)),Wo(12,638976,null,0,Sv,[ei,_v,[8,null]],{svgIcon:[0,"svgIcon"]},null),(t()(),to(13,0,null,null,3,"button",[["mat-icon-button",""]],[[8,"disabled",0],[2,"_mat-animation-noopable",null]],[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.bringActiveObjectToFront()&&i),i},d_,p_)),Wo(14,180224,null,0,qv,[ei,Yd,Lm,[2,c_]],null,null),(t()(),to(15,0,null,0,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","flip-to-front"]],[[2,"mat-icon-inline",null]],null,null,Tv,Ev)),Wo(16,638976,null,0,Sv,[ei,_v,[8,null]],{svgIcon:[0,"svgIcon"]},null),(t()(),to(17,0,null,null,3,"button",[["mat-icon-button",""]],[[8,"disabled",0],[2,"_mat-animation-noopable",null]],[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.controls.openPanel("objectSettings")&&i),i},d_,p_)),Wo(18,180224,null,0,qv,[ei,Yd,Lm,[2,c_]],{disabled:[0,"disabled"]},null),(t()(),to(19,0,null,0,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","settings-custom"]],[[2,"mat-icon-inline",null]],null,null,Tv,Ev)),Wo(20,638976,null,0,Sv,[ei,_v,[8,null]],{svgIcon:[0,"svgIcon"]},null)],function(t,e){var n=e.component;t(e,4,0,"add-circle-outline"),t(e,8,0,"delete-custom"),t(e,12,0,"flip"),t(e,16,0,"flip-to-front"),t(e,18,0,!n.shouldShowSettingsIcon()),t(e,20,0,"settings-custom")},function(t,e){t(e,1,0,Ao(e,2).disabled||null,"NoopAnimations"===Ao(e,2)._animationMode),t(e,3,0,Ao(e,4).inline),t(e,5,0,Ao(e,6).disabled||null,"NoopAnimations"===Ao(e,6)._animationMode),t(e,7,0,Ao(e,8).inline),t(e,9,0,Ao(e,10).disabled||null,"NoopAnimations"===Ao(e,10)._animationMode),t(e,11,0,Ao(e,12).inline),t(e,13,0,Ao(e,14).disabled||null,"NoopAnimations"===Ao(e,14)._animationMode),t(e,15,0,Ao(e,16).inline),t(e,17,0,Ao(e,18).disabled||null,"NoopAnimations"===Ao(e,18)._animationMode),t(e,19,0,Ao(e,20).inline)})}function lk(t){return bs(0,[(t()(),to(0,0,null,null,8,"div",[["class","right"]],null,null,null,null,null)),(t()(),to(1,0,null,null,3,"button",[["mat-icon-button",""]],[[8,"disabled",0],[2,"_mat-animation-noopable",null]],[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.history.undo()&&i),i},d_,p_)),Wo(2,180224,null,0,qv,[ei,Yd,Lm,[2,c_]],{disabled:[0,"disabled"]},null),(t()(),to(3,0,null,0,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","undo"]],[[2,"mat-icon-inline",null]],null,null,Tv,Ev)),Wo(4,638976,null,0,Sv,[ei,_v,[8,null]],{svgIcon:[0,"svgIcon"]},null),(t()(),to(5,0,null,null,3,"button",[["mat-icon-button",""]],[[8,"disabled",0],[2,"_mat-animation-noopable",null]],[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.history.redo()&&i),i},d_,p_)),Wo(6,180224,null,0,qv,[ei,Yd,Lm,[2,c_]],{disabled:[0,"disabled"]},null),(t()(),to(7,0,null,0,1,"mat-icon",[["class","mat-icon"],["role","img"],["svgIcon","redo"]],[[2,"mat-icon-inline",null]],null,null,Tv,Ev)),Wo(8,638976,null,0,Sv,[ei,_v,[8,null]],{svgIcon:[0,"svgIcon"]},null)],function(t,e){var n=e.component;t(e,2,0,!n.history.canUndo()),t(e,4,0,"undo"),t(e,6,0,!n.history.canRedo()),t(e,8,0,"redo")},function(t,e){t(e,1,0,Ao(e,2).disabled||null,"NoopAnimations"===Ao(e,2)._animationMode),t(e,3,0,Ao(e,4).inline),t(e,5,0,Ao(e,6).disabled||null,"NoopAnimations"===Ao(e,6)._animationMode),t(e,7,0,Ao(e,8).inline)})}function uk(t){return bs(0,[(t()(),to(0,0,null,null,2,"div",[["class","left"]],null,null,null,null,null)),(t()(),$r(16777216,null,null,1,null,ak)),Wo(2,16384,null,0,Wu,[ri,ii],{ngIf:[0,"ngIf"]},null),(t()(),$r(16777216,null,null,1,null,lk)),Wo(4,16384,null,0,Wu,[ri,ii],{ngIf:[0,"ngIf"]},null)],function(t,e){var n=e.component;t(e,2,0,n.activeObject.getId()),t(e,4,0,n.breakpoints.isMobile)},null)}var ck=function(){function t(t,e){this.breakpoints=t,this.activeDrawer=e}return t.prototype.ngAfterContentInit=function(){var t=this;this.drawers.changes.pipe(_w(0)).subscribe(function(){t.activeDrawer.set(t.drawers.last||t.drawers.first)})},t}(),hk=Sr({encapsulation:2,styles:[["drawer-wrapper{display:flex;position:absolute;top:0;left:0;height:115px;width:100%;overflow:hidden;align-items:center;padding:0 30px}drawer-wrapper .scroll-container{position:relative;width:100%;height:100%;flex:1 1 auto;min-width:0;overflow-x:auto;overflow-y:hidden;padding:8px 0;margin:0 15px}@media only screen and (max-width:768px){drawer-wrapper{padding:0}drawer-wrapper .scroll-container{margin:0 8px}}drawer-wrapper .controls-drawer{width:100%;height:100%}drawer-wrapper .controls-drawer>.content{display:flex;justify-content:center;align-items:center;width:100%;height:100%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}drawer-wrapper .apply-button,drawer-wrapper .back-button{display:block;height:36px}"]],data:{}});function pk(t){return bs(0,[(t()(),to(0,0,null,null,2,"span",[["trans",""]],null,null,null,null,null)),Wo(1,4341760,null,0,lv,[ei,uv,wu],null,null),(t()(),ms(-1,null,["Cancel"]))],null,null)}function dk(t){return bs(0,[(t()(),to(0,0,null,null,2,"span",[["trans",""]],null,null,null,null,null)),Wo(1,4341760,null,0,lv,[ei,uv,wu],null,null),(t()(),ms(-1,null,["Close"]))],null,null)}function fk(t){return bs(0,[(t()(),to(0,0,null,null,5,"button",[["class","back-button"],["mat-raised-button",""]],[[8,"disabled",0],[2,"_mat-animation-noopable",null]],[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.activeDrawer.close()&&i),i},d_,p_)),Wo(1,180224,null,0,qv,[ei,Yd,Lm,[2,c_]],null,null),(t()(),$r(16777216,null,0,1,null,pk)),Wo(3,16384,null,0,Wu,[ri,ii],{ngIf:[0,"ngIf"]},null),(t()(),$r(16777216,null,0,1,null,dk)),Wo(5,16384,null,0,Wu,[ri,ii],{ngIf:[0,"ngIf"]},null)],function(t,e){var n=e.component;t(e,3,0,n.activeDrawer.dirty()),t(e,5,0,!n.activeDrawer.dirty())},function(t,e){t(e,0,0,Ao(e,1).disabled||null,"NoopAnimations"===Ao(e,1)._animationMode)})}function gk(t){return bs(0,[(t()(),to(0,0,null,null,3,"button",[["class","apply-button"],["color","accent"],["mat-raised-button",""],["trans",""]],[[8,"disabled",0],[2,"_mat-animation-noopable",null]],[[null,"click"]],function(t,e,n){var i=!0;return"click"===e&&(i=!1!==t.component.activeDrawer.apply()&&i),i},d_,p_)),Wo(1,4341760,null,0,lv,[ei,uv,wu],null,null),Wo(2,180224,null,0,qv,[ei,Yd,Lm,[2,c_]],{disabled:[0,"disabled"],color:[1,"color"]},null),(t()(),ms(-1,0,["Apply"]))],function(t,e){t(e,2,0,!e.component.activeDrawer.canApplyChanges(),"accent")},function(t,e){t(e,0,0,Ao(e,2).disabled||null,"NoopAnimations"===Ao(e,2)._animationMode)})}function mk(t){return bs(0,[(t()(),$r(16777216,null,null,1,null,fk)),Wo(1,16384,null,0,Wu,[ri,ii],{ngIf:[0,"ngIf"]},null),(t()(),to(2,0,null,null,2,"section",[["class","scroll-container"],["customScrollbar",""]],null,null,null,null,null)),Wo(3,4341760,null,0,J_,[ei,ti,Kf,An,_m,wu,$_],{suppressX:[0,"suppressX"]},null),hs(null,0),(t()(),$r(16777216,null,null,1,null,gk)),Wo(6,16384,null,0,Wu,[ri,ii],{ngIf:[0,"ngIf"]},null)],function(t,e){var n=e.component;t(e,1,0,!n.breakpoints.isMobile),t(e,3,0,!1),t(e,6,0,!n.breakpoints.isMobile)},null)}var vk=function(){function t(t,e,n,i){this.controls=t,this.settings=e,this.activeDrawer=n,this.activeObject=i}return t.prototype.getControlsPosition=function(){return this.settings.get("pixie.ui.controls.position","top")},t}(),yk=Sr({encapsulation:2,styles:[["editor-controls{display:block;z-index:2;width:100%;background-color:#fff;height:115px;position:relative;box-shadow:0 2px 1px -1px rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 1px 3px 0 rgba(0,0,0,.12)}editor-controls .drawer,editor-controls navigation-bar{position:absolute;top:0;left:0}editor-controls .bottom-label{display:block;margin-top:5px;text-align:center;font-size:1.3rem;text-transform:capitalize}editor-controls .button-with-image{text-align:center;cursor:pointer;margin:0 5px;padding:5px;width:90px;height:90px;flex:0 0 90px;border:1px solid #e0e0e0;border-radius:4px;background-color:#fafafa;transition:box-shadow .3s}editor-controls .button-with-image.no-label>img,editor-controls .button-with-image.no-label>mat-icon{width:80px;height:80px}editor-controls .button-with-image:hover{box-shadow:0 3px 3px -2px rgba(0,0,0,.2),0 3px 4px 0 rgba(0,0,0,.14),0 1px 8px 0 rgba(0,0,0,.12)}editor-controls .button-with-image>.bottom-label{font-size:1.2rem}editor-controls .button-with-image img,editor-controls .button-with-image>svg{display:block;width:60px;height:60px;margin:0 auto}editor-controls .button-with-image mat-icon{width:40px;height:40px;margin:auto}editor-controls .button-with-image .bg-image{width:100%;height:100%}editor-controls .button-with-image .image-container{width:100%;position:relative;border-radius:3px;overflow:hidden}editor-controls .button-with-image .overlay{position:absolute;top:0;left:0;width:100%;height:100%;display:flex;justify-content:center;align-items:center;background-color:rgba(255,255,255,.8);color:#009688;padding-top:5px}editor-controls .button-with-image .overlay mat-icon{width:34px;height:34px;line-height:34px}editor-controls .round-action-button{display:flex;justify-content:center;align-items:center;border:1px solid #e0e0e0;width:60px;height:60px;line-height:60px;border-radius:50%;cursor:pointer}editor-controls .round-action-button mat-icon{width:45px;height:45px}@media only screen and (max-width:768px){editor-controls .round-action-button{width:40px;height:40px;line-height:40px;margin-right:5px}editor-controls .round-action-button mat-icon{width:25px;height:25px}}editor-controls .slider-container{display:inline-flex;align-items:center;width:100%;max-width:400px;margin:0 30px}editor-controls .slider-container>.slider-label{text-transform:capitalize;white-space:nowrap;font-size:1.3rem;margin-right:10px;padding-left:8px}editor-controls .slider-container>.mat-slider{flex:1 1 auto}editor-controls.position-bottom mobile-secondary-controls{bottom:120px}"]],data:{animation:[{type:7,name:"navAnimation",definitions:[{type:0,name:"true",styles:{type:6,styles:{opacity:"*",display:"block"},offset:null},options:void 0},{type:0,name:"false",styles:{type:6,styles:{opacity:"0",display:"none"},offset:null},options:void 0},{type:1,expr:"true <=> false",animation:{type:4,styles:null,timings:"225ms cubic-bezier(.4,0,.2,1)"},options:null}],options:{}},{type:7,name:"controlsAnimation",definitions:[{type:0,name:"true",styles:{type:6,styles:{opacity:"*",display:"flex"},offset:null},options:void 0},{type:0,name:"false",styles:{type:6,styles:{opacity:"0",display:"none"},offset:null},options:void 0},{type:1,expr:"true <=> false",animation:{type:4,styles:null,timings:"225ms cubic-bezier(.4,0,.2,1)"},options:null}],options:{}}]}});function bk(t){return bs(0,[(t()(),to(0,0,null,null,1,"navigation-bar",[],[[24,"@navAnimation",0]],null,null,cx,sx)),Wo(1,49152,null,0,ix,[$f,_u,Hw,wu,rx,tg,Fc,ox],null,null)],null,function(t,e){t(e,0,0,e.component.controls.panelIsVisible("navigation"))})}function _k(t){return bs(0,[(t()(),to(0,0,null,null,1,"navigation-bar",[],[[24,"@navAnimation",0]],null,null,cx,sx)),Wo(1,49152,null,0,ix,[$f,_u,Hw,wu,rx,tg,Fc,ox],null,null)],null,function(t,e){t(e,0,0,e.component.controls.panelIsVisible("navigation"))})}function wk(t){return bs(0,[(t()(),to(0,0,null,null,1,"filter-drawer",[["class","controls-drawer"]],[[2,"hidden",null]],null,null,Hx,Fx)),Wo(1,49152,[[1,4],["controlsDrawer",4]],0,Rx,[wu,Sx,tg,$f],null,null)],null,function(t,e){t(e,0,0,e.component.controls.panelIsOpen("objectSettings"))})}function xk(t){return bs(0,[(t()(),to(0,0,null,null,1,"resize-drawer",[["class","controls-drawer"]],[[2,"hidden",null]],null,null,tC,$x)),Wo(1,114688,[[1,4],["controlsDrawer",4]],0,Qx,[_u,tg,Jx,$f,ox],null,null)],function(t,e){t(e,1,0)},function(t,e){t(e,0,0,e.component.controls.panelIsOpen("objectSettings"))})}function Ck(t){return bs(0,[(t()(),to(0,0,null,null,1,"transform-drawer",[["class","controls-drawer"]],[[2,"hidden",null]],null,null,oC,rC)),Wo(1,49152,[[1,4],["controlsDrawer",4]],0,nC,[tg,iC,$f],null,null)],null,function(t,e){t(e,0,0,e.component.controls.panelIsOpen("objectSettings"))})}function Sk(t){return bs(0,[(t()(),to(0,0,null,null,1,"crop-drawer",[["class","controls-drawer"]],[[2,"hidden",null]],null,null,dC,cC)),Wo(1,4440064,[[1,4],["controlsDrawer",4]],0,aC,[lC,uC,tg,$f,wu],null,null)],function(t,e){t(e,1,0)},function(t,e){t(e,0,0,e.component.controls.panelIsOpen("objectSettings"))})}function kk(t){return bs(0,[(t()(),to(0,0,null,null,1,"draw-drawer",[["class","controls-drawer"]],[[2,"hidden",null]],null,null,EC,_C)),Wo(1,245760,[[1,4],["controlsDrawer",4]],0,gC,[bC,wu,tg,$f,_u,wu],null,null)],function(t,e){t(e,1,0)},function(t,e){t(e,0,0,e.component.controls.panelIsOpen("objectSettings"))})}function Ek(t){return bs(0,[(t()(),to(0,0,null,null,1,"text-drawer",[["class","controls-drawer"]],[[2,"hidden",null]],null,null,PC,AC)),Wo(1,49152,[[1,4],["controlsDrawer",4]],0,OC,[IC,Qf,tg,$f,wx],null,null)],null,function(t,e){t(e,0,0,e.component.controls.panelIsOpen("objectSettings"))})}function Tk(t){return bs(0,[(t()(),to(0,0,null,null,1,"shapes-drawer",[["class","controls-drawer"]],[[2,"hidden",null]],null,null,BC,RC)),Wo(1,49152,[[1,4],["controlsDrawer",4]],0,jC,[MC,tg,$f,wu],null,null)],null,function(t,e){t(e,0,0,e.component.controls.panelIsOpen("objectSettings"))})}function Ok(t){return bs(0,[(t()(),to(0,0,null,null,1,"stickers-drawer",[["class","controls-drawer"]],[[2,"hidden",null]],null,null,GC,HC)),Wo(1,49152,[[1,4],["controlsDrawer",4]],0,zC,[MC,tg,$f,wu],null,null)],null,function(t,e){t(e,0,0,e.component.controls.panelIsOpen("objectSettings"))})}function Ik(t){return bs(0,[(t()(),to(0,0,null,null,1,"round-drawer",[["class","controls-drawer"]],[[2,"hidden",null]],null,null,$C,JC)),Wo(1,245760,[[1,4],["controlsDrawer",4]],0,ZC,[wx,tg,$f,QC],null,null)],function(t,e){t(e,1,0)},function(t,e){t(e,0,0,e.component.controls.panelIsOpen("objectSettings"))})}function Ak(t){return bs(0,[(t()(),to(0,0,null,null,1,"frame-drawer",[["class","controls-drawer"]],[[2,"hidden",null]],null,null,lS,rS)),Wo(1,114688,[[1,4],["controlsDrawer",4]],0,eS,[nS,$f,iS,tg],null,null)],function(t,e){t(e,1,0)},function(t,e){t(e,0,0,e.component.controls.panelIsOpen("objectSettings"))})}function Pk(t){return bs(0,[(t()(),to(0,0,null,null,1,"canvas-background-drawer",[["class","controls-drawer"]],[[2,"hidden",null]],null,null,pS,hS)),Wo(1,114688,[[1,4],["controlsDrawer",4]],0,cS,[tg,$f,_u],null,null)],function(t,e){t(e,1,0)},function(t,e){t(e,0,0,e.component.controls.panelIsOpen("objectSettings"))})}function Dk(t){return bs(0,[(t()(),to(0,0,null,null,1,"object-settings-drawer",[["class","controls-drawer"]],null,null,null,rk,qS)),Wo(1,4243456,[[1,4],["controlsDrawer",4]],0,YS,[wx,tg,$f,uw],null,null)],null,null)}function jk(t){return bs(0,[(t()(),to(0,0,null,null,1,"mobile-secondary-controls",[],null,null,null,uk,sk)),Wo(1,49152,null,0,ok,[tg,wx,$f,uw,Kf,aw],null,null)],null,null)}function Mk(t){return bs(0,[(t()(),$r(16777216,null,null,1,null,bk)),Wo(1,16384,null,0,Wu,[ri,ii],{ngIf:[0,"ngIf"]},null),(t()(),$r(16777216,null,null,1,null,_k)),Wo(3,16384,null,0,Wu,[ri,ii],{ngIf:[0,"ngIf"]},null),(t()(),to(4,0,null,null,26,"drawer-wrapper",[["class","controls-drawer"]],[[24,"@controlsAnimation",0]],null,null,mk,hk)),Wo(5,1097728,null,1,ck,[Kf,uw],null,null),ss(603979776,1,{drawers:1}),(t()(),$r(16777216,null,0,1,null,wk)),Wo(8,16384,null,0,Wu,[ri,ii],{ngIf:[0,"ngIf"]},null),(t()(),$r(16777216,null,0,1,null,xk)),Wo(10,16384,null,0,Wu,[ri,ii],{ngIf:[0,"ngIf"]},null),(t()(),$r(16777216,null,0,1,null,Ck)),Wo(12,16384,null,0,Wu,[ri,ii],{ngIf:[0,"ngIf"]},null),(t()(),$r(16777216,null,0,1,null,Sk)),Wo(14,16384,null,0,Wu,[ri,ii],{ngIf:[0,"ngIf"]},null),(t()(),$r(16777216,null,0,1,null,kk)),Wo(16,16384,null,0,Wu,[ri,ii],{ngIf:[0,"ngIf"]},null),(t()(),$r(16777216,null,0,1,null,Ek)),Wo(18,16384,null,0,Wu,[ri,ii],{ngIf:[0,"ngIf"]},null),(t()(),$r(16777216,null,0,1,null,Tk)),Wo(20,16384,null,0,Wu,[ri,ii],{ngIf:[0,"ngIf"]},null),(t()(),$r(16777216,null,0,1,null,Ok)),Wo(22,16384,null,0,Wu,[ri,ii],{ngIf:[0,"ngIf"]},null),(t()(),$r(16777216,null,0,1,null,Ik)),Wo(24,16384,null,0,Wu,[ri,ii],{ngIf:[0,"ngIf"]},null),(t()(),$r(16777216,null,0,1,null,Ak)),Wo(26,16384,null,0,Wu,[ri,ii],{ngIf:[0,"ngIf"]},null),(t()(),$r(16777216,null,0,1,null,Pk)),Wo(28,16384,null,0,Wu,[ri,ii],{ngIf:[0,"ngIf"]},null),(t()(),$r(16777216,null,0,1,null,Dk)),Wo(30,16384,null,0,Wu,[ri,ii],{ngIf:[0,"ngIf"]},null),(t()(),$r(16777216,null,null,1,null,jk)),Wo(32,16384,null,0,Wu,[ri,ii],{ngIf:[0,"ngIf"]},null)],function(t,e){var n=e.component;t(e,1,0,"top"===n.getControlsPosition()),t(e,3,0,"bottom"===n.getControlsPosition()),t(e,8,0,n.controls.panelIsOpen("filter")),t(e,10,0,n.controls.panelIsOpen("resize")),t(e,12,0,n.controls.panelIsOpen("rotate")),t(e,14,0,n.controls.panelIsOpen("crop")),t(e,16,0,n.controls.panelIsOpen("draw")),t(e,18,0,n.controls.panelIsOpen("text")),t(e,20,0,n.controls.panelIsOpen("shapes")),t(e,22,0,n.controls.panelIsOpen("stickers")),t(e,24,0,n.controls.panelIsOpen("round")),t(e,26,0,n.controls.panelIsOpen("frame")),t(e,28,0,n.controls.panelIsOpen("background")),t(e,30,0,n.controls.panelIsOpen("objectSettings")),t(e,32,0,n.activeObject.getId())},function(t,e){t(e,4,0,!e.component.controls.panelIsVisible("navigation"))})}var Rk=function(){function t(t,e,n){this.domSanitizer=t,this.el=e,this.config=n}return t.prototype.ngAfterViewInit=function(){this.el.nativeElement.style.backgroundImage=this.getStyle()},t.prototype.getStyle=function(){return"url("+this.config.getAssetUrl(this.url)+")"},t}();function Fk(t,e){return function(n){return n.lift(new Nk(t,e))}}var Nk=function(){function t(t,e){this.compare=t,this.keySelector=e}return t.prototype.call=function(t,e){return e.subscribe(new Lk(t,this.compare,this.keySelector))},t}(),Lk=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.keySelector=i,r.hasKey=!1,"function"==typeof n&&(r.compare=n),r}return r(e,t),e.prototype.compare=function(t,e){return t===e},e.prototype._next=function(t){var e=t;if(this.keySelector&&(e=x(this.keySelector)(t))===_)return this.destination.error(_.e);var n=!1;if(this.hasKey){if((n=x(this.compare)(this.key,e))===_)return this.destination.error(_.e)}else this.hasKey=!0;!1===Boolean(n)&&(this.key=e,this.destination.next(t))},e}(O),Bk=function(){function t(t,e,n,i,r,o,s,a,l,u,c,h){this.canvas=t,this.history=e,this.controls=n,this.breakpoints=i,this.floatingPanels=r,this.canvasKeybinds=o,this.el=s,this.activeObject=a,this.activeDrawer=l,this.editorUi=u,this.state=c,this.config=h}return t.prototype.ngOnInit=function(){var t=this;this.state.wrapperEl=this.canvasWrapper.nativeElement,this.state.maskWrapperEl=this.canvasMaskWrapper.nativeElement,this.canvas.init().subscribe(function(){t.canvasKeybinds.init(),t.fitCanvasToScreenOnResize(),t.openObjectSettingsOnDoubleClick(),t.closePanelsOnObjectDelete(),t.handleObjectSelection(),t.updateHistoryOnObjectModification(),t.canvasMaskWrapper.nativeElement.classList.remove("not-loaded")})},t.prototype.closePanelsOnObjectDelete=function(){var t=this;this.canvas.fabric().on("object:delete",function(){return t.controls.closeAllPanels()})},t.prototype.openObjectSettingsOnDoubleClick=function(){var t=this;this.canvas.fabric().on("mouse:dblclick",function(){t.activeObject.getId()&&!t.activeDrawer.dirty()&&t.controls.openPanel("objectSettings")})},t.prototype.updateHistoryOnObjectModification=function(){var t=this;this.canvas.fabric().on("object:modified",function(e){e.e&&!t.activeDrawer.dirty()&&t.history.replaceCurrent()})},t.prototype.handleObjectSelection=function(){var t=this;this.canvas.fabric().on("selection:created",function(e){return t.onObjectSelection(e)}),this.canvas.fabric().on("selection:updated",function(e){return t.onObjectSelection(e)}),this.canvas.fabric().on("selection:cleared",function(e){e.e&&!t.activeDrawer.dirty()&&t.controls.closeCurrentPanel()})},t.prototype.onObjectSelection=function(t){t.e&&!this.activeDrawer.dirty()&&this.controls.openObjectDrawer(t.target.name)},t.prototype.fitCanvasToScreenOnResize=function(){var t=this;Kd(window,"resize").pipe(mm(200),Fk()).subscribe(function(e){t.canvas.zoom.fitToScreen()})},t}(),Vk=function(){function t(t,e,n){this.state=t,this.keybinds=e,this.activeObject=n}return t.prototype.init=function(){var t=this;this.state.loaded.subscribe(function(){t.keybinds.listenOn(document),t.keybinds.add("arrow_up",function(){t.activeObject.move("top",-1)}),t.keybinds.add("arrow_right",function(){t.activeObject.move("left",1)}),t.keybinds.add("arrow_down",function(){t.activeObject.move("top",1)}),t.keybinds.add("arrow_left",function(){t.activeObject.move("left",-1)}),t.keybinds.add("delete",function(){t.activeObject.isEditing()||t.activeObject.delete()})})},t}(),zk=Sr({encapsulation:2,styles:[["image-editor{display:flex;flex-direction:column;width:100%;height:100%;overflow:hidden;margin:0 auto;position:relative}image-editor .canvas-wrapper{height:calc(100% - 165px);width:100%;display:flex;align-items:center}image-editor .canvas-wrapper .canvas-mask-wrapper{margin:auto}image-editor .canvas-wrapper .canvas-mask-wrapper.empty,image-editor .canvas-wrapper .canvas-mask-wrapper.not-loaded{visibility:hidden}image-editor .canvas-wrapper .canvas-container{margin:auto;box-shadow:0 2px 1px -1px rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 1px 3px 0 rgba(0,0,0,.12)}"]],data:{}});function Hk(t){return bs(0,[(t()(),to(0,0,null,null,1,"toolbar",[],null,null,null,nx,Ww)),Wo(1,4243456,null,0,Nw,[tg,wu,Lw,Bw,Kf,uw,og,Hw,Fc,_u,Bw],null,null)],null,null)}function Wk(t){return bs(0,[(t()(),to(0,0,[[3,0]],null,1,"editor-controls",[],[[8,"className",0]],null,null,Mk,yk)),Wo(1,49152,[["editorControls",4]],0,vk,[$f,wu,uw,wx],null,null)],null,function(t,e){t(e,0,0,"position-"+e.component.editorUi.getControlsPosition())})}function Uk(t){return bs(0,[(t()(),to(0,0,[[3,0]],null,1,"editor-controls",[],[[8,"className",0]],null,null,Mk,yk)),Wo(1,49152,[["editorControls",4]],0,vk,[$f,wu,uw,wx],null,null)],null,function(t,e){t(e,0,0,"position-"+e.component.editorUi.getControlsPosition())})}function Xk(t){return bs(0,[ss(402653184,1,{canvasWrapper:0}),ss(402653184,2,{canvasMaskWrapper:0}),ss(671088640,3,{editorControls:0}),(t()(),$r(16777216,null,null,1,null,Hk)),Wo(4,16384,null,0,Wu,[ri,ii],{ngIf:[0,"ngIf"]},null),(t()(),$r(16777216,null,null,1,null,Wk)),Wo(6,16384,null,0,Wu,[ri,ii],{ngIf:[0,"ngIf"]},null),(t()(),to(7,0,[[1,0],["canvasWrapper",1]],null,4,"div",[["backgroundImage","images/viewport-bg.png"],["class","canvas-wrapper"]],null,null,null,null,null)),Wo(8,4210688,null,0,Rk,[Nh,ei,wu],{url:[0,"url"]},null),(t()(),to(9,0,[[2,0],["canvasMaskWrapper",1]],null,2,"div",[["backgroundImage","images/canvas-bg.png"],["class","canvas-mask-wrapper not-loaded"]],[[2,"empty",null]],null,null,null,null)),Wo(10,4210688,null,0,Rk,[Nh,ei,wu],{url:[0,"url"]},null),(t()(),to(11,0,null,null,0,"canvas",[["id","pixie-canvas"]],null,null,null,null,null)),(t()(),$r(16777216,null,null,1,null,Uk)),Wo(13,16384,null,0,Wu,[ri,ii],{ngIf:[0,"ngIf"]},null)],function(t,e){var n=e.component;t(e,4,0,!n.editorUi.shouldHideToolbar()),t(e,6,0,"top"===n.editorUi.getControlsPosition()),t(e,8,0,"images/viewport-bg.png"),t(e,10,0,"images/canvas-bg.png"),t(e,13,0,"bottom"===n.editorUi.getControlsPosition())},function(t,e){t(e,9,0,e.component.canvas.state.isEmpty())})}var Yk=Sr({encapsulation:2,styles:[["pixie-editor{display:block;width:100%;height:100%}pixie-editor .overlay{display:none}"]],data:{animation:[{type:7,name:"editorVisible",definitions:[{type:0,name:"true",styles:{type:6,styles:{opacity:"*",display:"block"},offset:null},options:void 0},{type:0,name:"false",styles:{type:6,styles:{opacity:"0",display:"none"},offset:null},options:void 0},{type:1,expr:"true <=> false",animation:{type:4,styles:null,timings:"325ms cubic-bezier(.4,0,.2,1)"},options:null}],options:{}}]}});function qk(t){return bs(0,[ss(402653184,1,{overlay:0}),(t()(),to(1,0,null,null,1,"image-editor",[],null,null,null,Xk,zk)),Wo(2,114688,null,0,Bk,[_u,tg,$f,Kf,Bw,Vk,ei,wx,uw,Fc,Od,wu],null,null),(t()(),to(3,0,[[1,0],["overlay",1]],null,0,"div",[["class","overlay"]],null,null,null,null,null)),(t()(),to(4,0,null,null,1,"div",[["class","loader"]],null,null,null,null,null)),hs(null,0)],function(t,e){t(e,2,0)},null)}var Gk=bo("pixie-editor",sg,function(t){return bs(0,[(t()(),to(0,0,null,null,1,"pixie-editor",[],[[40,"@editorVisible",0],[2,"theme-dark",null],[2,"theme-light",null],[2,"mode-overlay",null],[2,"mode-inline",null],[4,"width",null],[4,"height",null],[2,"ui-compact",null]],null,null,qk,Yk)),Wo(1,114688,null,0,sg,[ei,Fc],null,null)],function(t,e){t(e,1,0)},function(t,e){t(e,0,0,Ao(e,1).animate,Ao(e,1).darkTheme,Ao(e,1).lightTheme,Ao(e,1).overlayMode,Ao(e,1).inlineMode,Ao(e,1).width,Ao(e,1).height,Ao(e,1).compact)})},{},{},["*"]),Kk=function(t){return t[t.ENTER=13]="ENTER",t[t.SPACE=32]="SPACE",t[t.ESCAPE=27]="ESCAPE",t[t.DELETE=46]="DELETE",t[t.ARROW_UP=38]="ARROW_UP",t[t.ARROW_RIGHT=39]="ARROW_RIGHT",t[t.ARROW_DOWN=40]="ARROW_DOWN",t[t.ARROW_LEFT=37]="ARROW_LEFT",t[t.S=83]="S",t[t.N=78]="N",t[t.A=65]="A",t[t.T=84]="T",t[t.B=66]="B",t[t.C=67]="C",t[t.O=79]="O",t[t.P=80]="P",t[t.R=82]="R",t[t.F=70]="F",t[t.Y=89]="Y",t[t.Z=90]="Z",t}({}),Zk=function(){function t(){this.bindings=[]}return t.prototype.add=function(t,e){this.bindings.push({keybind:this.parseKeybindString(t),keybindString:t,callback:e})},t.prototype.addWithPreventDefault=function(t,e){this.bindings.push({keybind:this.parseKeybindString(t),keybindString:t,callback:e,preventDefault:!0})},t.prototype.listenOn=function(t){var e=this;t.addEventListener("keydown",function(t){e.executeBindings(t)})},t.prototype.executeBindings=function(t){var e=this;this.bindings.forEach(function(n){e.bindingMatches(n.keybind,t)&&(n.preventDefault&&t.preventDefault&&t.preventDefault(),n.callback(t))})},t.prototype.bindingMatches=function(t,e){return Kk[t.key.toUpperCase()]===e.keyCode&&e.ctrlKey===t.ctrl&&e.shiftKey===t.shift},t.prototype.parseKeybindString=function(t){var e={ctrl:!1,shift:!1,key:""};return t.trim().split("+").forEach(function(t){"ctrl"===(t=t.trim().toLowerCase())?e.ctrl=!0:"shift"===t?e.shift=!0:e.key=t}),e},t.ngInjectableDef=vt({factory:function(){return new t},token:t,providedIn:"root"}),t}(),Qk=function(){function t(t){this.i18n=t}return t.prototype.handle=function(t,e){var n=this.parseJson(t.error),i={uri:e,messages:n.messages,type:"http",status:t.status,originalError:new Error(t.message)};return 403!==t.status&&401!==t.status||this.handle403Error(n),wd(i)},t.prototype.parseJson=function(t){var e;if("string"!=typeof t)e=t;else try{e=JSON.parse(t)}catch(t){e=this.getEmptyErrorBody()}var n=this.getEmptyErrorBody();return e&&e.messages?(Object.keys(e.messages).forEach(function(t){var i=e.messages[t];n.messages[t]=Array.isArray(i)?i[0]:i}),n):n},t.prototype.getEmptyErrorBody=function(){return{status:"error",messages:{}}},t.ngInjectableDef=vt({factory:function(){return new t(pe(uv))},token:t,providedIn:"root"}),t}(),Jk=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),$k=function(t){function e(e,n){var i=t.call(this,e)||this;return i.i18n=e,i.toast=n,i}return Jk(e,t),e.prototype.handle403Error=function(t){},e.ngInjectableDef=vt({factory:function(){return new e(pe(uv),pe(ox))},token:e,providedIn:"root"}),e}(Qk),tE=function(){function t(t){this.state=t,this.lastPosX=0,this.lastPosY=0,this.isDragging=!1}return t.prototype.set=function(t){if(t||(t=this.lastE),t){var e=this.state.calcWrapperSize(),n=this.state.fabric.getWidth(),i=this.state.fabric.getHeight(),r=this.getClientCoords(t),o=this.state.fabric.viewportTransform[4]+r.clientX-this.lastPosX,s=this.state.fabric.viewportTransform[5]+r.clientY-this.lastPosY;o>0||e.width>n?o=0:o+Math.floor(n)-e.width<0&&(o=e.width-Math.floor(n)),s>0||e.height>i?s=0:s+Math.floor(i)-e.height<0&&(s=e.height-Math.floor(i)),this.state.fabric.viewportTransform[4]=o,this.state.fabric.viewportTransform[5]=s,this.state.fabric.requestRenderAll(),this.lastPosX=r.clientX,this.lastPosY=r.clientY,this.lastE=t}},t.prototype.reset=function(){this.lastPosX=0,this.lastPosY=0,this.lastE=null,this.state.fabric.viewportTransform[4]=0,this.state.fabric.viewportTransform[5]=0},t.prototype.init=function(){var t=this;this.state.fabric.on("mouse:down",function(e){if(e.target)return t.isDragging=!1;var n=t.getClientCoords(e.e);t.isDragging=!0,t.lastPosX=n.clientX,t.lastPosY=n.clientY}),this.state.fabric.on("mouse:move",function(e){t.isDragging&&t.set(e.e)}),this.state.fabric.on("mouse:up",function(){t.isDragging=!1})},t.prototype.getClientCoords=function(t){var e=0,n=0;return(t=t).touches&&t.touches[0]?(e=t.touches[0].clientX,n=t.touches[0].clientY):(e=t.clientX,n=t.clientY),{clientX:e,clientY:n}},t}(),eE=function(){function t(t,e,n){this.config=t,this.activeFrame=e,this.canvas=n}return t.prototype.fillParts=function(t){var e=this;this.patternCache.forEach(function(n){e.fillPartWithPattern(n,t)})},t.prototype.fillPartWithPattern=function(t,e){var n=new yu.fabric.StaticCanvas;n.add(t.img);var i=new yu.fabric.Pattern({source:function(){var e=t.img.getScaledWidth(),i=t.img.getScaledHeight();return e>1&&i>1&&(n.setDimensions({width:e,height:i}),n.renderAll()),n.getElement()},repeat:"repeat"===e?"repeat":"no-repeat"});this.activeFrame[t.name].set("fill",i)},t.prototype.scale=function(t){var e=this,n=this.activeFrame.config.mode;this.patternCache&&(t/=this.canvas.fabric().getRetinaScaling(),this.patternCache.forEach(function(i){"top"===i.name||"bottom"===i.name?"stretch"===n?(e.scalePatternToWidth(i.img,e.canvas.state.original.width-2*t+4),e.scalePatternToHeight(i.img,t)):i.img.scaleToHeight(t):"left"!==i.name&&"right"!==i.name||"stretch"!==n?i.img.scaleToWidth(t):(e.scalePatternToWidth(i.img,t),e.scalePatternToHeight(i.img,e.canvas.state.original.height-2*t+4))}))},t.prototype.scalePatternToWidth=function(t,e){var n=t.getBoundingRect().width/t.getScaledWidth();t.set("scaleX",e/t.width/n),t.setCoords()},t.prototype.scalePatternToHeight=function(t,e){var n=t.getBoundingRect().height/t.getScaledHeight();t.set("scaleY",e/t.height/n),t.setCoords()},t.prototype.load=function(t){var e=this,n=this.activeFrame.getPartNames().map(function(n){return new Promise(function(i){var r=new Image;r.onload=function(){i({name:n,img:new yu.fabric.Image(r,bu)})},r.src=e.getPartUrl(t,n)})});return Promise.all(n).then(function(n){e.patternCache=n,e.fillParts(t.mode)})},t.prototype.getPartUrl=function(t,e){return this.getBaseUrl(t)+"/"+e+".png"},t.prototype.getBaseUrl=function(t){return this.config.getAssetUrl("images/frames/"+t.name)},t}(),nE=function(){function t(t,e,n,i){this.config=t,this.activeFrame=e,this.canvas=n,this.patterns=i}return t.prototype.build=function(t,e){var n=this;if(this.createGroup(t),this.createParts(),this.resize(e),this.activeFrame.config=t,this.canvas.fabric().add(this.activeFrame.group),"basic"===t.mode)return this.canvas.render();this.patterns.load(t).then(function(){n.patterns.scale(e),n.canvas.render()})},t.prototype.createGroup=function(t){this.activeFrame.group=new yu.fabric.Group([],Object.assign({name:"frame.group",excludeFromExport:!0,width:this.canvas.state.original.width,height:this.canvas.state.original.height,data:{frameName:t.name}},bu))},t.prototype.createParts=function(){var t=this;this.activeFrame.getPartNames().forEach(function(e){t.activeFrame[e]=new yu.fabric.Rect(Object.assign({},bu,{name:"frame.rect."+e})),t.activeFrame.group.add(t.activeFrame[e])})},t.prototype.resize=function(t){var e=this.canvas.state.original.width,n=this.canvas.state.original.height,i=this.activeFrame,r=t;this.positionPart("topLeft",{width:r,height:r}),this.positionPart("topRight",{left:e-i.topLeft.getScaledWidth(),width:r,height:r}),this.positionPart("top",{left:i.topLeft.getScaledWidth()-2,width:e-i.topLeft.getScaledWidth()-i.topRight.getScaledWidth()+4,height:r}),this.positionPart("bottomLeft",{top:n-i.topLeft.getScaledHeight(),width:r,height:r}),this.positionPart("left",{top:i.topLeft.getScaledHeight()-2,width:r,height:n-i.topLeft.getScaledHeight()-i.bottomLeft.getScaledHeight()+4}),this.positionPart("bottomRight",{left:e-i.bottomLeft.getScaledWidth(),top:n-i.topRight.getScaledWidth(),width:r,height:r}),this.positionPart("bottom",{left:i.bottomLeft.getScaledWidth()-2,top:n-i.top.getScaledHeight(),width:i.top.getScaledWidth()+4,height:r}),this.positionPart("right",{left:e-i.left.getScaledWidth(),top:i.topRight.getScaledHeight()-2,width:i.left.width,height:n-i.topRight.getScaledHeight()-i.bottomRight.getScaledHeight()+4})},t.prototype.positionPart=function(t,e){e.top=-this.activeFrame.group.height/2+(e.top||0),e.left=-this.activeFrame.group.width/2+(e.left||0),this.activeFrame[t].set(e)},t}(),iE=function(t){function e(e){var n=t.call(this)||this;return n._value=e,n}return r(e,t),Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),e.prototype._subscribe=function(e){var n=t.prototype._subscribe.call(this,e);return n&&!n.closed&&e.next(this._value),n},e.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new rt;return this._value},e.prototype.next=function(e){t.prototype.next.call(this,this._value=e)},e}(at),rE=function(){function t(t){this.config=t,this.original=[],this.filtered=[],this.defaultCategory="handwriting",this.filters=new Gp({search:new qp,category:new qp(this.defaultCategory)}),this.totalPages=0,this.perPage=10,this.currentPage=0,this.current$=new iE([]),this.defaultCategory=this.config.get("pixie.tools.text.defaultCategory"),this.reset(),this.bindToFilters()}return t.prototype.next=function(){this.totalPages>this.currentPage+1&&this.setPage(this.currentPage+1)},t.prototype.previous=function(){this.currentPage-1>0&&this.setPage(this.currentPage-1)},t.prototype.setPage=function(t){this.currentPage=t,this.current$.next(this.filtered[this.currentPage])},t.prototype.filter=function(t,e){var n=[];this.original.forEach(function(i){var r=!e||i.family.toLowerCase().indexOf(e)>-1;i.category.toLowerCase()===t&&r&&n.push(i)}),this.filtered=this.chunkFonts(n),this.totalPages=this.filtered.length,this.setPage(0)},t.prototype.setFonts=function(t){this.original=t,this.filter(this.filters.get("category").value)},t.prototype.reset=function(){this.filters.setValue({search:null,category:this.defaultCategory}),this.original=[],this.totalPages=0,this.currentPage=0,this.current$.next([])},t.prototype.chunkFonts=function(t){for(var e=[];t.length>0;)e.push(t.splice(0,this.perPage));return e},t.prototype.bindToFilters=function(){var t=this;this.filters.valueChanges.pipe(mm(100),Fk()).subscribe(function(e){return t.filter(e.category,e.search)})},t}();function oE(t,e){if(!t.loaded)return 0;var n=new Date-e;return t.loaded/(n/1e3)}var sE,aE=["bytes","KB","MB","GB","TB","PB"];function lE(t,e){if(isNaN(parseFloat(String(t)))||!isFinite(t))return null;for(var n=0;t>=1024;)t/=1024,n++;var i=aE[n];return e||(e=function(t){switch(t){case"MB":return 1;case"GB":case"TB":case"PB":return 2;default:return 0}}(i)),"bytes"===i&&t<2&&(i="byte"),parseFloat(t.toFixed(+e).toString()).toString()+" "+i}!function(t){t.STARTED="uploadStarted",t.PROGRESS="uploadProgress",t.COMPLETED="uploadCompleted",t.OTHER="unrecognizedEvent"}(sE||(sE={}));var uE=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},cE=function(){function t(t,e){this.httpClient=t,this.errorHandler=e}return t.prototype.get=function(t,e,n){var i=this;void 0===e&&(e={}),void 0===n&&(n={});var r=this.generateHttpParams(e);return this.httpClient.get(this.prefixUri(t),uE({params:r},n)).pipe(dv(function(e){return i.errorHandler.handle(e,t)}))},t.prototype.post=function(t,e){var n=this;return void 0===e&&(e=null),this.httpClient.post(this.prefixUri(t),e).pipe(dv(function(e){return n.errorHandler.handle(e,t)}))},t.prototype.put=function(t,e){var n=this;return void 0===e&&(e={}),e=this.spoofHttpMethod(e,"PUT"),this.httpClient.post(this.prefixUri(t),e).pipe(dv(function(e){return n.errorHandler.handle(e,t)}))},t.prototype.delete=function(t,e){var n=this;return void 0===e&&(e={}),e=this.spoofHttpMethod(e,"DELETE"),this.httpClient.post(this.prefixUri(t),e).pipe(dv(function(e){return n.errorHandler.handle(e,t)}))},t.prototype.postWithProgress=function(t,e){var n=this;void 0===e&&(e={});var i=new pc("POST",this.prefixUri(t),e,{reportProgress:!0}),r=Date.now();return this.httpClient.request(i).pipe(dv(function(e){return n.errorHandler.handle(e,t)}),Y(function(t){return function(t,e){switch(t.type){case dc.Sent:return{type:t.type,name:sE.STARTED,time:e};case dc.UploadProgress:return{type:t.type,name:sE.PROGRESS,totalBytes:t.total,completedBytes:t.loaded,progress:function(t){return Math.round(100*t.loaded/t.total)}(t),speed:lE(oE(t,e)),eta:function(n){var i,r=(i=function(t,e){if(!t.loaded)return 0;var n=oE(t,e);return Math.round((t.total-t.loaded)/n*10)/10}(t,e),{hours:Math.floor(i/3600)%24,minutes:Math.floor(i/60)%60,seconds:Math.floor(i%60)});r.seconds||(r.seconds=1);var o=r.hours?r.hours+"h ":"",s=r.hours?("0"+r.minutes).substr(-2):r.minutes;return o+(s?s+"m ":"")+(s?("0"+r.seconds).substr(-2):r.seconds)+"s"}()};case dc.Response:return{type:t.type,name:sE.COMPLETED,fileEntry:t.body.fileEntry};default:return null}}(t,r)}),Tu(function(t){return!!t}))},t.prototype.prefixUri=function(e){return e.indexOf("://")>-1?e:t.prefix+"/"+e},t.prototype.generateHttpParams=function(t){var e=new lc;return t?(Object.keys(t).forEach(function(n){var i=t[n];null==i&&(i=""),e=e.append(n,i)}),e):e},t.prototype.spoofHttpMethod=function(t,e){return t instanceof FormData?t.append("_method",e):t._method=e,t},t.prefix="secure",t.ngInjectableDef=vt({factory:function(){return new t(pe(bc),pe(Qk))},token:t,providedIn:"root"}),t}(),hE=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),pE=function(t){function e(e,n){var i=t.call(this,e,n)||this;return i.http=e,i.errorHandler=n,i.cache={},i}return hE(e,t),e.prototype.getWithCache=function(t,e){var n=this;void 0===e&&(e={});var i=this.makeCacheKey(t,e);if(this.cache[i]instanceof D)return this.cache[i];if(this.cache[i])return Eu(this.cache[i]);var r=this.get(t,e).pipe(mt());return r.subscribe(function(t){return n.cache[i]=t},function(){}),this.cache[i]=r},e.prototype.post=function(e,n,i){return this.clearCache(),t.prototype.post.call(this,e,n)},e.prototype.put=function(e,n,i){return void 0===n&&(n={}),this.clearCache(),t.prototype.put.call(this,e,n)},e.prototype.delete=function(e,n,i){return void 0===n&&(n={}),this.clearCache(),t.prototype.delete.call(this,e,n)},e.prototype.clearCache=function(){this.cache={}},e.prototype.makeCacheKey=function(t,e){return t+JSON.stringify(e)},e.ngInjectableDef=vt({factory:function(){return new e(pe(bc),pe(Qk))},token:e,providedIn:"root"}),e}(cE),dE=function(){function t(t,e){this.canvas=t,this.canvasState=e,this.lineStyle={stroke:"rgba(255,255,255,0.3)",strokeWidth:5,strokeLineCap:"round",strokeLineJoin:"round"}}return t.prototype.add=function(t){this.createGroup(),this.addText(t),this.addLines(),this.canvas.fabric().add(this.watermark),this.canvas.render()},t.prototype.remove=function(){this.watermark&&(this.canvas.fabric().remove(this.watermark),this.watermark=null,this.canvas.render())},t.prototype.createGroup=function(){this.watermark=new yu.fabric.Group(null,Object.assign({},bu,{width:this.canvasState.original.width,height:this.canvasState.original.height,excludeFromExport:!0,top:0,left:0}))},t.prototype.addText=function(t){var e=new yu.fabric.Text(t,{fill:"rgba(255,255,255,0.3)",strokeWidth:2,stroke:"rgba(255,255,255,0.4)",originX:"center",originY:"center",fontWeight:600,fontSize:150,fontFamily:"Courier New"});e.scaleToWidth(this.canvasState.original.width/2),this.watermark.add(e)},t.prototype.addLines=function(){var t=this.watermark.getObjects("text")[0],e=this.canvasState.original.width/2,n=this.canvasState.original.height/2,i=t.width/4,r=new yu.fabric.Line(null,this.lineStyle),o=new yu.fabric.Line(null,this.lineStyle),s=new yu.fabric.Line(null,this.lineStyle),a=new yu.fabric.Line(null,this.lineStyle);this.watermark.add(r,o,s,a),r.set({x1:i,y1:-100,x2:e,y2:-n}),o.set({x1:i,y1:100,x2:e,y2:n}),s.set({x1:-i,y1:-100,x2:-e,y2:-n}),a.set({x1:-i,y1:100,x2:-e,y2:n})},t}(),fE=function(){function t(t,e,n){this.settings=t,this.toast=e,this.i18n=n,this.validations=[]}return t.prototype.validate=function(t){this.validations.length||this.initValidations();var e=this.validations.find(function(e){return e.fails(t)});return e&&this.showToast&&this.openErrorToast(e.errorMessage),{failed:!!e,errorMessage:e?e.errorMessage:null}},t.prototype.validateWithToast=function(t){var e=this.validate(t);return this.openErrorToast(e.errorMessage),e},t.prototype.openErrorToast=function(t){this.toast.open(t)},t}(),gE=function(){function t(){}return t.prototype.passes=function(t){return!this.fails(t)},t}(),mE=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),vE=function(t){function e(e,n){var i=t.call(this)||this;return i.params=e,i.i18n=n,i.errorMessage=i.i18n.t("Maximum file size is :number",{number:lE(i.params.maxSize)}),i}return mE(e,t),e.prototype.fails=function(t){return this.params.maxSize<t.size},e}(gE),yE=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),bE=function(t){function e(e,n){var i=t.call(this)||this;return i.params=e,i.i18n=n,i.errorMessage=i.i18n.t("Only these file types are allowed: :extensions",{extensions:i.params.extensions.join(", ")}),i}return yE(e,t),e.prototype.fails=function(t){return!this.params.extensions.some(function(e){return e===t.extension})},e}(gE),_E=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),wE=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.DEFAULT_MAX_FILE_SIZE_MB=10,e.showToast=!0,e}return _E(e,t),e.prototype.initValidations=function(){this.validations.push(new vE({maxSize:this.getMaxFileSize()},this.i18n));var t=this.getAllowedExtensions();t&&t.length&&this.validations.push(new bE({extensions:t},this.i18n))},e.prototype.getMaxFileSize=function(){return this.settings.get("pixie.tools.import.max_size",this.DEFAULT_MAX_FILE_SIZE_MB*Math.pow(1024,2))},e.prototype.getAllowedExtensions=function(){return this.settings.get("pixie.tools.import.validExtensions")},e.ngInjectableDef=vt({factory:function(){return new e(pe(wu),pe(ox),pe(uv))},token:e,providedIn:"root"}),e}(fE),xE=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),CE=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return xE(e,t),e.prototype._createContainer=function(){var t=document.createElement("div");t.classList.add("editor-overlay-container","cdk-overlay-container"),document.querySelector("image-editor").appendChild(t),this._containerElement=t},e}(Ef),SE=function(){},kE=function(){},EE=function(){},TE=function(){},OE=function(){},IE=function(){},AE=function(){},PE=function(){},DE=function(){},jE=function(){},ME=function(t,e,n){return new Ea(pg,[],function(t){return function(t){for(var e={},n=[],i=!1,r=0;r<t.length;r++){var o=t[r];o.token===ze&&!0===o.value&&(i=!0),1073741824&o.flags&&n.push(o.token),o.index=r,e[_r(o.token)]=o}return{factory:null,providersByKey:e,providers:t,modules:n,isRoot:i}}([uo(512,_n,wn,[[8,[Kg,$g,av,Rv,v_,w_,T_,rw,dw,Gk]],[3,_n],Cn]),uo(5120,Di,Ri,[[3,Di]]),uo(4608,Fu,Nu,[Di,[2,Ru]]),uo(4608,hn,hn,[]),uo(5120,nn,rn,[]),uo(5120,Ei,ji,[]),uo(5120,Ti,Mi,[]),uo(6144,sr,null,[Nh]),uo(4608,Ah,Zm,[[2,qm],[2,Hm]]),uo(5120,ih,function(t,e,n,i,r,o,s,a){return[new Oh(t,e,n),new Fh(i),new jh(r,o,s,a)]},[tc,An,an,tc,tc,Ah,un,[2,Ph]]),uo(4608,rh,rh,[ih,An]),uo(135680,ah,ah,[tc]),uo(4608,fh,fh,[rh,ah]),uo(5120,vy,a_,[]),uo(5120,ab,l_,[]),uo(4608,Fb,s_,[tc,vy,ab]),uo(5120,Jn,u_,[fh,Fb,An]),uo(6144,sh,null,[ah]),uo(4608,Ln,Ln,[An]),uo(4608,cd,cd,[]),uo(4608,pp,pp,[]),uo(4608,Zk,Zk,[]),uo(4608,ox,ox,[wu,uv,Wv]),uo(4608,Qk,$k,[uv,ox]),uo(4608,Od,Od,[wu]),uo(4608,tE,tE,[Od]),uo(4608,Lw,Lw,[Od,tE,wu]),uo(4608,wx,wx,[Od]),uo(4608,_u,_u,[tE,Lw,Od,wx,wu]),uo(4608,Vk,Vk,[Od,Zk,wx]),uo(4608,aw,aw,[_u,wx]),uo(4608,Sx,Sx,[_u]),uo(4608,Jx,Jx,[_u]),uo(4608,iS,iS,[_u]),uo(4608,eE,eE,[wu,iS,_u]),uo(4608,nE,nE,[wu,iS,_u,eE]),uo(4608,nS,nS,[wu,_u,eE,iS,nE]),uo(4608,rE,rE,[wu]),uo(4608,Av,Av,[pE,wu,rE]),uo(4608,IC,IC,[_u,wx,aw]),uo(4608,tg,tg,[_u,wx,aw,nS,Av,IC]),uo(4608,iC,iC,[_u]),uo(4608,lC,lC,[_u,Od]),uo(4608,kc,kc,[]),uo(6144,Sc,null,[kc]),uo(4608,Ec,Ec,[Sc]),uo(6144,rc,null,[Ec]),uo(4608,ic,Dc,[rc,Zt]),uo(4608,bc,bc,[ic]),uo(4608,dE,dE,[_u,Od]),uo(4608,Hw,Hw,[_u,lC,tg,wu,bc,dE,ox]),uo(4608,rx,rx,[wx,_u,Hw,aw,iS]),uo(4608,uC,uC,[_u,rx]),uo(4608,bC,bC,[Od]),uo(4608,MC,MC,[_u,wu]),uo(4608,og,og,[tg,_u,ox,wu,nS,lC,wE]),uo(4608,OS,OS,[wx,_u]),uo(4608,QC,QC,[wx,_u,Od,Hw]),uo(4608,Fc,Fc,[wu,Kf,uv]),uo(4608,$f,$f,[wu,Fc]),uo(4608,xu,xu,[Sx,Jx,uC,iC,bC,IC,MC,nS,QC,Hw,og,_u,dE,tg,wx,aw,$f,lC,rx,Av]),uo(4608,xg,xg,[]),uo(4608,Ef,CE,[tc]),uo(4608,Mf,Mf,[Sf,Ef,_n,Df,kf,Zt,An,tc,km]),uo(5120,Rf,Ff,[Mf]),uo(4608,Ic,Ac,[tc,an,Tc]),uo(4608,Pc,Pc,[Ic,Oc]),uo(5120,wc,function(t){return[t]},[Pc]),uo(4608,_m,_m,[]),uo(5120,cm,hm,[Mf]),uo(5120,Ow,Iw,[Mf]),uo(4608,Qf,Qf,[Mf,Kf,Zt]),uo(4608,Bw,Bw,[Qf,Od,Jf,Kf]),uo(4608,uw,uw,[$f]),uo(4608,tm,$b,[Jn,Gc]),uo(1073742336,$u,$u,[]),uo(512,wu,wu,[]),uo(1024,xe,hg,[wu]),uo(512,Nh,Lh,[tc]),uo(1024,tn,function(t,e,n,i,r){return[(s=t,th("probe",nh),th("coreTokens",o({},eh,(s||[]).reduce(function(t,e){return t[e.name]=e.token,t},{}))),function(){return nh}),(a=e,l=n,u=i,c=r,function(){var t={baseUrl:null,version:uu,logging:{sentry_public:null},vebto:{environment:"production",assetsUrl:null,assetsPrefix:null}};l.urls&&l.urls.base&&(t.baseUrl=l.urls.base),l.urls&&l.urls.assets&&(t.vebto.assetsUrl=l.urls.assets),l.sentry_public&&(t.logging.sentry_public=l.sentry_public),a.setMultiple(Object.assign({},t,{pixie:l}));var e=a.getAssetUrl("icons/merged.svg");return u.addSvgIconSet(c.bypassSecurityTrustResourceUrl(e)),new Promise(function(t){return t()})})];var s,a,l,u,c},[[2,Xn],wu,lu,_v,Nh]),uo(512,en,en,[[2,tn]]),uo(131584,Zn,Zn,[An,un,Zt,xe,_n,en]),uo(1073742336,Fi,Fi,[Zn]),uo(1073742336,Yh,Yh,[[3,Yh]]),uo(1073742336,pd,pd,[]),uo(1073742336,fd,fd,[]),uo(1073742336,SE,SE,[]),uo(1073742336,kE,kE,[]),uo(1073742336,dd,dd,[]),uo(1073742336,kg,kg,[]),uo(1073742336,Em,Em,[]),uo(1073742336,Fd,Fd,[]),uo(1073742336,Gd,Gd,[]),uo(1073742336,of,of,[]),uo(1073742336,Nf,Nf,[]),uo(1073742336,EE,EE,[]),uo(1073742336,jc,jc,[]),uo(1073742336,Mc,Mc,[]),uo(1073742336,Hm,Hm,[[2,zm]]),uo(1073742336,kv,kv,[]),uo(1073742336,Cm,Cm,[]),uo(1073742336,Vm,Vm,[]),uo(1073742336,gm,gm,[]),uo(1073742336,TE,TE,[]),uo(1073742336,OE,OE,[]),uo(1073742336,IE,IE,[]),uo(1073742336,vx,vx,[]),uo(1073742336,rv,rv,[]),uo(1073742336,Gv,Gv,[]),uo(1073742336,qx,qx,[]),uo(1073742336,AE,AE,[]),uo(1073742336,zv,zv,[]),uo(1073742336,PE,PE,[]),uo(1073742336,Pw,Pw,[]),uo(1073742336,DE,DE,[]),uo(1073742336,jE,jE,[]),uo(1073742336,h_,h_,[]),uo(1073742336,pg,pg,[Zt]),uo(256,ze,!0,[]),uo(256,Tc,"XSRF-TOKEN",[]),uo(256,Oc,"X-XSRF-TOKEN",[]),uo(256,c_,"BrowserAnimations",[])])})}(),RE=function(){function t(t){this.version=uu,this.initPixie(t)}return t.prototype.openEditorWithImage=function(t,e){var n=this;void 0===e&&(e=!0),this.openFile(t,"png",e).then(function(){return n.open()})},t.prototype.openMainImage=function(t){this.openFile(t,"png",!0)},t.prototype.openFile=function(t,e,n){void 0===e&&(e="png"),void 0===n&&(n=!1);var i,r=this.getTool("import");return i=n?r.openBackgroundImage(t):r.openFile(t,e),this.injector.get(Zn).tick(),i},t.prototype.newFile=function(t,e){return this.getTool("canvas").openNew(t,e)},t.prototype.loadState=function(t){var e=this;this.get(An).run(function(){return t="string"!=typeof t?JSON.stringify(t):t,e.getTool("history").addFromJson(t)})},t.prototype.getState=function(){return JSON.stringify(this.getTool("history").getCurrentCanvasState())},t.prototype.open=function(t){var e=this;this.get(An).run(function(){t&&e.mergeConfig(t),e.get(Fc).open().then(function(){e.getTool("canvas").zoom.fitToScreen(),e.get(Jf).open();var t=e.get(tg);t.isEmpty()&&!e.get(Od).isEmpty()&&t.addInitial()})})},t.prototype.close=function(){var t=this;this.get(An).run(function(){return t.get(Fc).close()})},t.prototype.resetEditor=function(t,e){var n=this;return new Promise(function(i){n.get(An).run(function(){n.get(og).resetEditor(),t&&n.setConfig(t,e),n.getTool("canvas").initContent().then(function(){n.get($f).closeAllPanels(),n.get(Jf).open(),t&&n.get(tg).addInitial(),i()})})})},t.prototype.resetAndOpenEditor=function(t,e){var n=this;this.resetEditor(t,e).then(function(){return n.open()})},t.prototype.setConfig=function(t,e){var n=this.get(wu);"string"==typeof t&&void 0!==e?this.get(An).run(function(){var i=t.indexOf("vebto.")>-1?t:"pixie."+t;n.set(i,e)}):"object"==typeof t&&this.get(An).run(function(){var e={pixie:t};e.pixie.sentry_public&&n.set("logging.sentry_public",e.pixie.sentry_public),n.merge(e)})},t.prototype.getDefaultConfig=function(t){return vu.pick(t,cu)},t.prototype.http=function(){return this.get(bc)},t.prototype.getTool=function(t){if(!this.injector)throw'Pixie is not loaded yet. Are you using "onLoad" callback?';return this.get(xu).get(t)},t.prototype.get=function(t){return this.injector.get(t)},t.prototype.initPixie=function(t){var e=this.mergeConfig(t);Xh([{provide:lu,useValue:e}]).bootstrapModuleFactory(ME).then(this.onAngularReady.bind(this)).catch(function(t){return console.log(t)})},t.prototype.mergeConfig=function(t){var e=mu(cu,t||{});return this.replaceDefaultConfigItems(e,t)},t.prototype.replaceDefaultConfigItems=function(t,e){for(var n in t)"replaceDefault"===n&&t[n]?t.items=e?e.items:[]:"object"==typeof t[n]&&this.replaceDefaultConfigItems(t[n],e&&e[n]);return t},t.prototype.onAngularReady=function(t){var e=this;this.appModule=t,this.injector=t.injector,this.get(_u).state.loaded.subscribe(function(){var t=e.get(wu).get("pixie.onLoad");t&&t()})},t.prototype.destroyEditor=function(){this.appModule.destroy(),this.appModule=null},t}();n("yLV6"),function(){if(Hn)throw new Error("Cannot enable prod mode after platform setup.");zn=!1}(),window.Pixie=RE}},[[7,0]]]); //# sourceMappingURL=main.c33b62aa10caf01dd96e.js.map