/** vim: et:ts=4:sw=4:sts=4
 * @license RequireJS 2.3.2 Copyright jQuery Foundation and other contributors.
 * Released under MIT license, https://github.com/requirejs/requirejs/blob/master/LICENSE
 */

/*! jQuery v2.2.3 | (c) jQuery Foundation | jquery.org/license */

/*!
 * jQuery mmenu v7.0.5
 * @requires jQuery 1.7.0 or later
 *
 * mmenu.frebsite.nl
 *
 * Copyright (c) Fred Heusschen
 * www.frebsite.nl
 *
 * License: CC-BY-NC-4.0
 * http://creativecommons.org/licenses/by-nc/4.0/
 */

/*! mailcheck v1.1.1 @licence MIT */

/*! echo.js v1.7.0 | (c) 2015 @toddmotto | https://github.com/toddmotto/echo */

/*!
 * clipboard.js v1.7.1
 * https://zenorocha.github.io/clipboard.js
 *
 * Licensed MIT © Zeno Rocha
 */

function resizeCanvasIfNeeded(t){var e=t.targetCanvas,i=e.width,n=e.height,r=t.destinationWidth,o=t.destinationHeight;i===r&&n===o||(e.width=r,e.height=o)}function copyGLTo2DDrawImage(t,e){var i=t.canvas,n=e.targetCanvas,r=n.getContext("2d");r.translate(0,n.height),r.scale(1,-1);var o=i.height-n.height;r.drawImage(i,0,o,n.width,n.height,0,0,n.width,n.height)}function copyGLTo2DPutImageData(t,e){var i=e.targetCanvas.getContext("2d"),n=e.destinationWidth,r=e.destinationHeight,o=n*r*4,s=new Uint8Array(this.imageBuffer,0,o),a=new Uint8ClampedArray(this.imageBuffer,0,o);t.readPixels(0,0,n,r,t.RGBA,t.UNSIGNED_BYTE,s);var l=new ImageData(a,n,r);i.putImageData(l,0,0)}function _possibleConstructorReturn(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function __guard__(t,e){return void 0!==t&&null!==t?e(t):void 0}function __guardMethod__(t,e,i){return void 0!==t&&null!==t&&"function"==typeof t[e]?i(t,e):void 0}var requirejs,require,define;!function(global,setTimeout){function commentReplace(t,e){return e||""}function isFunction(t){return"[object Function]"===ostring.call(t)}function isArray(t){return"[object Array]"===ostring.call(t)}function each(t,e){if(t){var i;for(i=0;i<t.length&&(!t[i]||!e(t[i],i,t));i+=1);}}function eachReverse(t,e){if(t){var i;for(i=t.length-1;i>-1&&(!t[i]||!e(t[i],i,t));i-=1);}}function hasProp(t,e){return hasOwn.call(t,e)}function getOwn(t,e){return hasProp(t,e)&&t[e]}function eachProp(t,e){var i;for(i in t)if(hasProp(t,i)&&e(t[i],i))break}function mixin(t,e,i,n){return e&&eachProp(e,function(e,r){!i&&hasProp(t,r)||(!n||"object"!=typeof e||!e||isArray(e)||isFunction(e)||e instanceof RegExp?t[r]=e:(t[r]||(t[r]={}),mixin(t[r],e,i,n)))}),t}function bind(t,e){return function(){return e.apply(t,arguments)}}function scripts(){return document.getElementsByTagName("script")}function defaultOnError(t){throw t}function getGlobal(t){if(!t)return t;var e=global;return each(t.split("."),function(t){e=e[t]}),e}function makeError(t,e,i,n){var r=new Error(e+"\nhttp://requirejs.org/docs/errors.html#"+t);return r.requireType=t,r.requireModules=n,i&&(r.originalError=i),r}function newContext(t){function e(t){var e,i;for(e=0;e<t.length;e++)if(i=t[e],"."===i)t.splice(e,1),e-=1;else if(".."===i){if(0===e||1===e&&".."===t[2]||".."===t[e-1])continue;e>0&&(t.splice(e-1,2),e-=2)}}function i(t,i,n){var r,o,s,a,l,c,u,d,h,f,p,g,m=i&&i.split("/"),v=C.map,y=v&&v["*"];if(t&&(t=t.split("/"),u=t.length-1,C.nodeIdCompat&&jsSuffixRegExp.test(t[u])&&(t[u]=t[u].replace(jsSuffixRegExp,"")),"."===t[0].charAt(0)&&m&&(g=m.slice(0,m.length-1),t=g.concat(t)),e(t),t=t.join("/")),n&&v&&(m||y)){s=t.split("/");t:for(a=s.length;a>0;a-=1){if(c=s.slice(0,a).join("/"),m)for(l=m.length;l>0;l-=1)if(o=getOwn(v,m.slice(0,l).join("/")),o&&(o=getOwn(o,c))){d=o,h=a;break t}!f&&y&&getOwn(y,c)&&(f=getOwn(y,c),p=a)}!d&&f&&(d=f,h=p),d&&(s.splice(0,h,d),t=s.join("/"))}return r=getOwn(C.pkgs,t),r?r:t}function n(t){isBrowser&&each(scripts(),function(e){if(e.getAttribute("data-requiremodule")===t&&e.getAttribute("data-requirecontext")===w.contextName)return e.parentNode.removeChild(e),!0})}function r(t){var e=getOwn(C.paths,t);if(e&&isArray(e)&&e.length>1)return e.shift(),w.require.undef(t),w.makeRequire(null,{skipMap:!0})([t]),!0}function o(t){var e,i=t?t.indexOf("!"):-1;return i>-1&&(e=t.substring(0,i),t=t.substring(i+1,t.length)),[e,t]}function s(t,e,n,r){var s,a,l,c,u=null,d=e?e.name:null,h=t,f=!0,p="";return t||(f=!1,t="_@r"+(D+=1)),c=o(t),u=c[0],t=c[1],u&&(u=i(u,d,r),a=getOwn(j,u)),t&&(u?p=a&&a.normalize?a.normalize(t,function(t){return i(t,d,r)}):t.indexOf("!")===-1?i(t,d,r):t:(p=i(t,d,r),c=o(p),u=c[0],p=c[1],n=!0,s=w.nameToUrl(p))),l=!u||a||n?"":"_unnormalized"+(P+=1),{prefix:u,name:p,parentMap:e,unnormalized:!!l,url:s,originalName:h,isDefine:f,id:(u?u+"!"+p:p)+l}}function a(t){var e=t.id,i=getOwn(k,e);return i||(i=k[e]=new w.Module(t)),i}function l(t,e,i){var n=t.id,r=getOwn(k,n);!hasProp(j,n)||r&&!r.defineEmitComplete?(r=a(t),r.error&&"error"===e?i(r.error):r.on(e,i)):"defined"===e&&i(j[n])}function c(t,e){var i=t.requireModules,n=!1;e?e(t):(each(i,function(e){var i=getOwn(k,e);i&&(i.error=t,i.events.error&&(n=!0,i.emit("error",t)))}),n||req.onError(t))}function u(){globalDefQueue.length&&(each(globalDefQueue,function(t){var e=t[0];"string"==typeof e&&(w.defQueueMap[e]=!0),O.push(t)}),globalDefQueue=[])}function d(t){delete k[t],delete S[t]}function h(t,e,i){var n=t.map.id;t.error?t.emit("error",t.error):(e[n]=!0,each(t.depMaps,function(n,r){var o=n.id,s=getOwn(k,o);!s||t.depMatched[r]||i[o]||(getOwn(e,o)?(t.defineDep(r,j[o]),t.check()):h(s,e,i))}),i[n]=!0)}function f(){var t,e,i=1e3*C.waitSeconds,o=i&&w.startTime+i<(new Date).getTime(),s=[],a=[],l=!1,u=!0;if(!y){if(y=!0,eachProp(S,function(t){var i=t.map,c=i.id;if(t.enabled&&(i.isDefine||a.push(t),!t.error))if(!t.inited&&o)r(c)?(e=!0,l=!0):(s.push(c),n(c));else if(!t.inited&&t.fetched&&i.isDefine&&(l=!0,!i.prefix))return u=!1}),o&&s.length)return t=makeError("timeout","Load timeout for modules: "+s,null,s),t.contextName=w.contextName,c(t);u&&each(a,function(t){h(t,{},{})}),o&&!e||!l||!isBrowser&&!isWebWorker||_||(_=setTimeout(function(){_=0,f()},50)),y=!1}}function p(t){hasProp(j,t[0])||a(s(t[0],null,!0)).init(t[1],t[2])}function g(t,e,i,n){t.detachEvent&&!isOpera?n&&t.detachEvent(n,e):t.removeEventListener(i,e,!1)}function m(t){var e=t.currentTarget||t.srcElement;return g(e,w.onScriptLoad,"load","onreadystatechange"),g(e,w.onScriptError,"error"),{node:e,id:e&&e.getAttribute("data-requiremodule")}}function v(){var t;for(u();O.length;){if(t=O.shift(),null===t[0])return c(makeError("mismatch","Mismatched anonymous define() module: "+t[t.length-1]));p(t)}w.defQueueMap={}}var y,b,w,x,_,C={waitSeconds:7,baseUrl:"./",paths:{},bundles:{},pkgs:{},shim:{},config:{}},k={},S={},T={},O=[],j={},E={},A={},D=1,P=1;return x={require:function(t){return t.require?t.require:t.require=w.makeRequire(t.map)},exports:function(t){if(t.usingExports=!0,t.map.isDefine)return t.exports?j[t.map.id]=t.exports:t.exports=j[t.map.id]={}},module:function(t){return t.module?t.module:t.module={id:t.map.id,uri:t.map.url,config:function(){return getOwn(C.config,t.map.id)||{}},exports:t.exports||(t.exports={})}}},b=function(t){this.events=getOwn(T,t.id)||{},this.map=t,this.shim=getOwn(C.shim,t.id),this.depExports=[],this.depMaps=[],this.depMatched=[],this.pluginMaps={},this.depCount=0},b.prototype={init:function(t,e,i,n){n=n||{},this.inited||(this.factory=e,i?this.on("error",i):this.events.error&&(i=bind(this,function(t){this.emit("error",t)})),this.depMaps=t&&t.slice(0),this.errback=i,this.inited=!0,this.ignore=n.ignore,n.enabled||this.enabled?this.enable():this.check())},defineDep:function(t,e){this.depMatched[t]||(this.depMatched[t]=!0,this.depCount-=1,this.depExports[t]=e)},fetch:function(){if(!this.fetched){this.fetched=!0,w.startTime=(new Date).getTime();var t=this.map;return this.shim?void w.makeRequire(this.map,{enableBuildCallback:!0})(this.shim.deps||[],bind(this,function(){return t.prefix?this.callPlugin():this.load()})):t.prefix?this.callPlugin():this.load()}},load:function(){var t=this.map.url;E[t]||(E[t]=!0,w.load(this.map.id,t))},check:function(){if(this.enabled&&!this.enabling){var t,e,i=this.map.id,n=this.depExports,r=this.exports,o=this.factory;if(this.inited){if(this.error)this.emit("error",this.error);else if(!this.defining){if(this.defining=!0,this.depCount<1&&!this.defined){if(isFunction(o)){if(this.events.error&&this.map.isDefine||req.onError!==defaultOnError)try{r=w.execCb(i,o,n,r)}catch(e){t=e}else r=w.execCb(i,o,n,r);if(this.map.isDefine&&void 0===r&&(e=this.module,e?r=e.exports:this.usingExports&&(r=this.exports)),t)return t.requireMap=this.map,t.requireModules=this.map.isDefine?[this.map.id]:null,t.requireType=this.map.isDefine?"define":"require",c(this.error=t)}else r=o;if(this.exports=r,this.map.isDefine&&!this.ignore&&(j[i]=r,req.onResourceLoad)){var s=[];each(this.depMaps,function(t){s.push(t.normalizedMap||t)}),req.onResourceLoad(w,this.map,s)}d(i),this.defined=!0}this.defining=!1,this.defined&&!this.defineEmitted&&(this.defineEmitted=!0,this.emit("defined",this.exports),this.defineEmitComplete=!0)}}else hasProp(w.defQueueMap,i)||this.fetch()}},callPlugin:function(){var t=this.map,e=t.id,n=s(t.prefix);this.depMaps.push(n),l(n,"defined",bind(this,function(n){var r,o,u,h=getOwn(A,this.map.id),f=this.map.name,p=this.map.parentMap?this.map.parentMap.name:null,g=w.makeRequire(t.parentMap,{enableBuildCallback:!0});return this.map.unnormalized?(n.normalize&&(f=n.normalize(f,function(t){return i(t,p,!0)})||""),o=s(t.prefix+"!"+f,this.map.parentMap),l(o,"defined",bind(this,function(t){this.map.normalizedMap=o,this.init([],function(){return t},null,{enabled:!0,ignore:!0})})),u=getOwn(k,o.id),void(u&&(this.depMaps.push(o),this.events.error&&u.on("error",bind(this,function(t){this.emit("error",t)})),u.enable()))):h?(this.map.url=w.nameToUrl(h),void this.load()):(r=bind(this,function(t){this.init([],function(){return t},null,{enabled:!0})}),r.error=bind(this,function(t){this.inited=!0,this.error=t,t.requireModules=[e],eachProp(k,function(t){0===t.map.id.indexOf(e+"_unnormalized")&&d(t.map.id)}),c(t)}),r.fromText=bind(this,function(i,n){var o=t.name,l=s(o),u=useInteractive;n&&(i=n),u&&(useInteractive=!1),a(l),hasProp(C.config,e)&&(C.config[o]=C.config[e]);try{req.exec(i)}catch(t){return c(makeError("fromtexteval","fromText eval for "+e+" failed: "+t,t,[e]))}u&&(useInteractive=!0),this.depMaps.push(l),w.completeLoad(o),g([o],r)}),void n.load(t.name,g,r,C))})),w.enable(n,this),this.pluginMaps[n.id]=n},enable:function(){S[this.map.id]=this,this.enabled=!0,this.enabling=!0,each(this.depMaps,bind(this,function(t,e){var i,n,r;if("string"==typeof t){if(t=s(t,this.map.isDefine?this.map:this.map.parentMap,!1,!this.skipMap),this.depMaps[e]=t,r=getOwn(x,t.id))return void(this.depExports[e]=r(this));this.depCount+=1,l(t,"defined",bind(this,function(t){this.undefed||(this.defineDep(e,t),this.check())})),this.errback?l(t,"error",bind(this,this.errback)):this.events.error&&l(t,"error",bind(this,function(t){this.emit("error",t)}))}i=t.id,n=k[i],hasProp(x,i)||!n||n.enabled||w.enable(t,this)})),eachProp(this.pluginMaps,bind(this,function(t){var e=getOwn(k,t.id);e&&!e.enabled&&w.enable(t,this)})),this.enabling=!1,this.check()},on:function(t,e){var i=this.events[t];i||(i=this.events[t]=[]),i.push(e)},emit:function(t,e){each(this.events[t],function(t){t(e)}),"error"===t&&delete this.events[t]}},w={config:C,contextName:t,registry:k,defined:j,urlFetched:E,defQueue:O,defQueueMap:{},Module:b,makeModuleMap:s,nextTick:req.nextTick,onError:c,configure:function(t){if(t.baseUrl&&"/"!==t.baseUrl.charAt(t.baseUrl.length-1)&&(t.baseUrl+="/"),"string"==typeof t.urlArgs){var e=t.urlArgs;t.urlArgs=function(t,i){return(i.indexOf("?")===-1?"?":"&")+e}}var i=C.shim,n={paths:!0,bundles:!0,config:!0,map:!0};eachProp(t,function(t,e){n[e]?(C[e]||(C[e]={}),mixin(C[e],t,!0,!0)):C[e]=t}),t.bundles&&eachProp(t.bundles,function(t,e){each(t,function(t){t!==e&&(A[t]=e)})}),t.shim&&(eachProp(t.shim,function(t,e){isArray(t)&&(t={deps:t}),!t.exports&&!t.init||t.exportsFn||(t.exportsFn=w.makeShimExports(t)),i[e]=t}),C.shim=i),t.packages&&each(t.packages,function(t){var e,i;t="string"==typeof t?{name:t}:t,i=t.name,e=t.location,e&&(C.paths[i]=t.location),C.pkgs[i]=t.name+"/"+(t.main||"main").replace(currDirRegExp,"").replace(jsSuffixRegExp,"")}),eachProp(k,function(t,e){t.inited||t.map.unnormalized||(t.map=s(e,null,!0))}),(t.deps||t.callback)&&w.require(t.deps||[],t.callback)},makeShimExports:function(t){function e(){var e;return t.init&&(e=t.init.apply(global,arguments)),e||t.exports&&getGlobal(t.exports)}return e},makeRequire:function(e,r){function o(i,n,l){var u,d,h;return r.enableBuildCallback&&n&&isFunction(n)&&(n.__requireJsBuild=!0),"string"==typeof i?isFunction(n)?c(makeError("requireargs","Invalid require call"),l):e&&hasProp(x,i)?x[i](k[e.id]):req.get?req.get(w,i,e,o):(d=s(i,e,!1,!0),u=d.id,hasProp(j,u)?j[u]:c(makeError("notloaded",'Module name "'+u+'" has not been loaded yet for context: '+t+(e?"":". Use require([])")))):(v(),w.nextTick(function(){v(),h=a(s(null,e)),h.skipMap=r.skipMap,h.init(i,n,l,{enabled:!0}),f()}),o)}return r=r||{},mixin(o,{isBrowser:isBrowser,toUrl:function(t){var n,r=t.lastIndexOf("."),o=t.split("/")[0],s="."===o||".."===o;return r!==-1&&(!s||r>1)&&(n=t.substring(r,t.length),t=t.substring(0,r)),w.nameToUrl(i(t,e&&e.id,!0),n,!0)},defined:function(t){return hasProp(j,s(t,e,!1,!0).id)},specified:function(t){return t=s(t,e,!1,!0).id,hasProp(j,t)||hasProp(k,t)}}),e||(o.undef=function(t){u();var i=s(t,e,!0),r=getOwn(k,t);r.undefed=!0,n(t),delete j[t],delete E[i.url],delete T[t],eachReverse(O,function(e,i){e[0]===t&&O.splice(i,1)}),delete w.defQueueMap[t],r&&(r.events.defined&&(T[t]=r.events),d(t))}),o},enable:function(t){var e=getOwn(k,t.id);e&&a(t).enable()},completeLoad:function(t){var e,i,n,o=getOwn(C.shim,t)||{},s=o.exports;for(u();O.length;){if(i=O.shift(),null===i[0]){if(i[0]=t,e)break;e=!0}else i[0]===t&&(e=!0);p(i)}if(w.defQueueMap={},n=getOwn(k,t),!e&&!hasProp(j,t)&&n&&!n.inited){if(!(!C.enforceDefine||s&&getGlobal(s)))return r(t)?void 0:c(makeError("nodefine","No define call for "+t,null,[t]));p([t,o.deps||[],o.exportsFn])}f()},nameToUrl:function(t,e,i){var n,r,o,s,a,l,c,u=getOwn(C.pkgs,t);if(u&&(t=u),c=getOwn(A,t))return w.nameToUrl(c,e,i);if(req.jsExtRegExp.test(t))a=t+(e||"");else{for(n=C.paths,r=t.split("/"),o=r.length;o>0;o-=1)if(s=r.slice(0,o).join("/"),l=getOwn(n,s)){isArray(l)&&(l=l[0]),r.splice(0,o,l);break}a=r.join("/"),a+=e||(/^data\:|^blob\:|\?/.test(a)||i?"":".js"),a=("/"===a.charAt(0)||a.match(/^[\w\+\.\-]+:/)?"":C.baseUrl)+a}return C.urlArgs&&!/^blob\:/.test(a)?a+C.urlArgs(t,a):a},load:function(t,e){req.load(w,t,e)},execCb:function(t,e,i,n){return e.apply(n,i)},onScriptLoad:function(t){if("load"===t.type||readyRegExp.test((t.currentTarget||t.srcElement).readyState)){interactiveScript=null;var e=m(t);w.completeLoad(e.id)}},onScriptError:function(t){var e=m(t);if(!r(e.id)){var i=[];return eachProp(k,function(t,n){0!==n.indexOf("_@r")&&each(t.depMaps,function(t){if(t.id===e.id)return i.push(n),!0})}),c(makeError("scripterror",'Script error for "'+e.id+(i.length?'", needed by: '+i.join(", "):'"'),t,[e.id]))}}},w.require=w.makeRequire(),w}function getInteractiveScript(){return interactiveScript&&"interactive"===interactiveScript.readyState?interactiveScript:(eachReverse(scripts(),function(t){if("interactive"===t.readyState)return interactiveScript=t}),interactiveScript)}var req,s,head,baseElement,dataMain,src,interactiveScript,currentlyAddingScript,mainScript,subPath,version="2.3.2",commentRegExp=/\/\*[\s\S]*?\*\/|([^:"'=]|^)\/\/.*$/gm,cjsRequireRegExp=/[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,jsSuffixRegExp=/\.js$/,currDirRegExp=/^\.\//,op=Object.prototype,ostring=op.toString,hasOwn=op.hasOwnProperty,isBrowser=!("undefined"==typeof window||"undefined"==typeof navigator||!window.document),isWebWorker=!isBrowser&&"undefined"!=typeof importScripts,readyRegExp=isBrowser&&"PLAYSTATION 3"===navigator.platform?/^complete$/:/^(complete|loaded)$/,defContextName="_",isOpera="undefined"!=typeof opera&&"[object Opera]"===opera.toString(),contexts={},cfg={},globalDefQueue=[],useInteractive=!1;if("undefined"==typeof define){if("undefined"!=typeof requirejs){if(isFunction(requirejs))return;cfg=requirejs,requirejs=void 0}"undefined"==typeof require||isFunction(require)||(cfg=require,require=void 0),req=requirejs=function(t,e,i,n){var r,o,s=defContextName;return isArray(t)||"string"==typeof t||(o=t,isArray(e)?(t=e,e=i,i=n):t=[]),o&&o.context&&(s=o.context),r=getOwn(contexts,s),r||(r=contexts[s]=req.s.newContext(s)),o&&r.configure(o),r.require(t,e,i)},req.config=function(t){return req(t)},req.nextTick="undefined"!=typeof setTimeout?function(t){setTimeout(t,4)}:function(t){t()},require||(require=req),req.version=version,req.jsExtRegExp=/^\/|:|\?|\.js$/,req.isBrowser=isBrowser,s=req.s={contexts:contexts,newContext:newContext},req({}),each(["toUrl","undef","defined","specified"],function(t){req[t]=function(){var e=contexts[defContextName];return e.require[t].apply(e,arguments)}}),isBrowser&&(head=s.head=document.getElementsByTagName("head")[0],baseElement=document.getElementsByTagName("base")[0],baseElement&&(head=s.head=baseElement.parentNode)),req.onError=defaultOnError,req.createNode=function(t,e,i){var n=t.xhtml?document.createElementNS("http://www.w3.org/1999/xhtml","html:script"):document.createElement("script");return n.charset="utf-8",n.async=!0,n},req.load=function(t,e,i){var n,r=t&&t.config||{};if(isBrowser)return n=req.createNode(r,e,i),n.setAttribute("data-requirecontext",t.contextName),n.setAttribute("data-requiremodule",e),!n.attachEvent||n.attachEvent.toString&&n.attachEvent.toString().indexOf("[native code")<0||isOpera?(n.addEventListener("load",t.onScriptLoad,!1),n.addEventListener("error",t.onScriptError,!1)):(useInteractive=!0,n.attachEvent("onreadystatechange",t.onScriptLoad)),n.src=i,r.onNodeCreated&&r.onNodeCreated(n,r,e,i),currentlyAddingScript=n,baseElement?head.insertBefore(n,baseElement):head.appendChild(n),currentlyAddingScript=null,n;if(isWebWorker)try{setTimeout(function(){},0),importScripts(i),t.completeLoad(e)}catch(n){t.onError(makeError("importscripts","importScripts failed for "+e+" at "+i,n,[e]))}},isBrowser&&!cfg.skipDataMain&&eachReverse(scripts(),function(t){if(head||(head=t.parentNode),dataMain=t.getAttribute("data-main"))return mainScript=dataMain,cfg.baseUrl||mainScript.indexOf("!")!==-1||(src=mainScript.split("/"),mainScript=src.pop(),subPath=src.length?src.join("/")+"/":"./",cfg.baseUrl=subPath),mainScript=mainScript.replace(jsSuffixRegExp,""),req.jsExtRegExp.test(mainScript)&&(mainScript=dataMain),cfg.deps=cfg.deps?cfg.deps.concat(mainScript):[mainScript],!0}),define=function(t,e,i){var n,r;"string"!=typeof t&&(i=e,e=t,t=null),isArray(e)||(i=e,e=null),!e&&isFunction(i)&&(e=[],i.length&&(i.toString().replace(commentRegExp,commentReplace).replace(cjsRequireRegExp,function(t,i){e.push(i)}),e=(1===i.length?["require"]:["require","exports","module"]).concat(e))),useInteractive&&(n=currentlyAddingScript||getInteractiveScript(),n&&(t||(t=n.getAttribute("data-requiremodule")),r=contexts[n.getAttribute("data-requirecontext")])),r?(r.defQueue.push([t,e,i]),r.defQueueMap[t]=!0):globalDefQueue.push([t,e,i])},define.amd={jQuery:!0},req.exec=function(text){return eval(text)},req(cfg)}}(this,"undefined"==typeof setTimeout?void 0:setTimeout),define("requireLib",function(){}),requirejs.config({waitSeconds:0,baseUrl:"/content2/scripts",paths:{jquery:"//www.designcrowd.local/assets/src/javascript/vendor/jquery.min",foundation:"//www.designcrowd.local/assets/src/javascript/vendor/foundation.min",mmenu:"//www.designcrowd.local/assets/src/javascript/vendor/jquery.mmenu",clipboard:"//www.designcrowd.local/assets/src/javascript/vendor/clipboard.min",echo:"//www.designcrowd.local/assets/src/javascript/vendor/echo.min",fabric:"//www.designcrowd.local/assets/src/javascript/vendor/fabric.min",dropzone:"//www.designcrowd.local/assets/src/javascript/vendor/dropzone.min",slick:"//www.designcrowd.local/assets/src/javascript/vendor/slick.min",facebook:"//connect.facebook.net/en_US/sdk",google:"//apis.google.com/js/platform"},shim:{facebook:{exports:"FB"},google:{exports:"gapi"}}}),define("www",function(){}),!function(t,e){"object"==typeof module&&"object"==typeof module.exports?module.exports=t.document?e(t,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return e(t)}:e(t)}("undefined"!=typeof window?window:this,function(t,e){function i(t){var e=!!t&&"length"in t&&t.length,i=ot.type(t);return"function"!==i&&!ot.isWindow(t)&&("array"===i||0===e||"number"==typeof e&&e>0&&e-1 in t)}function n(t,e,i){if(ot.isFunction(e))return ot.grep(t,function(t,n){return!!e.call(t,n,t)!==i});if(e.nodeType)return ot.grep(t,function(t){return t===e!==i});if("string"==typeof e){if(gt.test(e))return ot.filter(e,t,i);e=ot.filter(e,t)}return ot.grep(t,function(t){return Z.call(e,t)>-1!==i})}function r(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}function o(t){var e={};return ot.each(t.match(xt)||[],function(t,i){e[i]=!0}),e}function s(){V.removeEventListener("DOMContentLoaded",s),t.removeEventListener("load",s),ot.ready()}function a(){this.expando=ot.expando+a.uid++}function l(t,e,i){var n;if(void 0===i&&1===t.nodeType)if(n="data-"+e.replace(jt,"-$&").toLowerCase(),i=t.getAttribute(n),"string"==typeof i){try{i="true"===i||"false"!==i&&("null"===i?null:+i+""===i?+i:Ot.test(i)?ot.parseJSON(i):i)}catch(t){}Tt.set(t,e,i)}else i=void 0;return i}function c(t,e,i,n){var r,o=1,s=20,a=n?function(){return n.cur()}:function(){return ot.css(t,e,"")},l=a(),c=i&&i[3]||(ot.cssNumber[e]?"":"px"),u=(ot.cssNumber[e]||"px"!==c&&+l)&&At.exec(ot.css(t,e));if(u&&u[3]!==c){c=c||u[3],i=i||[],u=+l||1;do o=o||".5",u/=o,ot.style(t,e,u+c);while(o!==(o=a()/l)&&1!==o&&--s)}return i&&(u=+u||+l||0,r=i[1]?u+(i[1]+1)*i[2]:+i[2],n&&(n.unit=c,n.start=u,n.end=r)),r}function u(t,e){var i="undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e||"*"):"undefined"!=typeof t.querySelectorAll?t.querySelectorAll(e||"*"):[];return void 0===e||e&&ot.nodeName(t,e)?ot.merge([t],i):i}function d(t,e){for(var i=0,n=t.length;n>i;i++)St.set(t[i],"globalEval",!e||St.get(e[i],"globalEval"))}function h(t,e,i,n,r){for(var o,s,a,l,c,h,f=e.createDocumentFragment(),p=[],g=0,m=t.length;m>g;g++)if(o=t[g],o||0===o)if("object"===ot.type(o))ot.merge(p,o.nodeType?[o]:o);else if($t.test(o)){for(s=s||f.appendChild(e.createElement("div")),a=(Mt.exec(o)||["",""])[1].toLowerCase(),l=It[a]||It._default,s.innerHTML=l[1]+ot.htmlPrefilter(o)+l[2],h=l[0];h--;)s=s.lastChild;ot.merge(p,s.childNodes),s=f.firstChild,s.textContent=""}else p.push(e.createTextNode(o));for(f.textContent="",g=0;o=p[g++];)if(n&&ot.inArray(o,n)>-1)r&&r.push(o);else if(c=ot.contains(o.ownerDocument,o),s=u(f.appendChild(o),"script"),c&&d(s),i)for(h=0;o=s[h++];)Lt.test(o.type||"")&&i.push(o);return f}function f(){return!0}function p(){return!1}function g(){try{return V.activeElement}catch(t){}}function m(t,e,i,n,r,o){var s,a;if("object"==typeof e){"string"!=typeof i&&(n=n||i,i=void 0);for(a in e)m(t,a,i,n,e[a],o);return t}if(null==n&&null==r?(r=i,n=i=void 0):null==r&&("string"==typeof i?(r=n,n=void 0):(r=n,n=i,i=void 0)),r===!1)r=p;else if(!r)return t;return 1===o&&(s=r,r=function(t){return ot().off(t),s.apply(this,arguments)},r.guid=s.guid||(s.guid=ot.guid++)),t.each(function(){ot.event.add(this,e,r,n,i)})}function v(t,e){return ot.nodeName(t,"table")&&ot.nodeName(11!==e.nodeType?e:e.firstChild,"tr")?t.getElementsByTagName("tbody")[0]||t.appendChild(t.ownerDocument.createElement("tbody")):t}function y(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function b(t){var e=Ut.exec(t.type);return e?t.type=e[1]:t.removeAttribute("type"),t}function w(t,e){var i,n,r,o,s,a,l,c;if(1===e.nodeType){if(St.hasData(t)&&(o=St.access(t),s=St.set(e,o),c=o.events)){delete s.handle,s.events={};for(r in c)for(i=0,n=c[r].length;n>i;i++)ot.event.add(e,r,c[r][i])}Tt.hasData(t)&&(a=Tt.access(t),l=ot.extend({},a),Tt.set(e,l))}}function x(t,e){var i=e.nodeName.toLowerCase();"input"===i&&Ft.test(t.type)?e.checked=t.checked:"input"!==i&&"textarea"!==i||(e.defaultValue=t.defaultValue)}function _(t,e,i,n){e=Q.apply([],e);var r,o,s,a,l,c,d=0,f=t.length,p=f-1,g=e[0],m=ot.isFunction(g);if(m||f>1&&"string"==typeof g&&!nt.checkClone&&Ht.test(g))return t.each(function(r){var o=t.eq(r);m&&(e[0]=g.call(this,r,o.html())),_(o,e,i,n)});if(f&&(r=h(e,t[0].ownerDocument,!1,t,n),o=r.firstChild,1===r.childNodes.length&&(r=o),o||n)){for(s=ot.map(u(r,"script"),y),a=s.length;f>d;d++)l=r,d!==p&&(l=ot.clone(l,!0,!0),a&&ot.merge(s,u(l,"script"))),i.call(t[d],l,d);if(a)for(c=s[s.length-1].ownerDocument,ot.map(s,b),d=0;a>d;d++)l=s[d],Lt.test(l.type||"")&&!St.access(l,"globalEval")&&ot.contains(c,l)&&(l.src?ot._evalUrl&&ot._evalUrl(l.src):ot.globalEval(l.textContent.replace(Wt,"")))}return t}function C(t,e,i){for(var n,r=e?ot.filter(e,t):t,o=0;null!=(n=r[o]);o++)i||1!==n.nodeType||ot.cleanData(u(n)),n.parentNode&&(i&&ot.contains(n.ownerDocument,n)&&d(u(n,"script")),n.parentNode.removeChild(n));return t}function k(t,e){var i=ot(e.createElement(t)).appendTo(e.body),n=ot.css(i[0],"display");return i.detach(),n}function S(t){var e=V,i=Xt[t];return i||(i=k(t,e),"none"!==i&&i||(Yt=(Yt||ot("<iframe frameborder='0' width='0' height='0'/>")).appendTo(e.documentElement),e=Yt[0].contentDocument,e.write(),e.close(),i=k(t,e),Yt.detach()),Xt[t]=i),i}function T(t,e,i){var n,r,o,s,a=t.style;return i=i||Kt(t),s=i?i.getPropertyValue(e)||i[e]:void 0,""!==s&&void 0!==s||ot.contains(t.ownerDocument,t)||(s=ot.style(t,e)),i&&!nt.pixelMarginRight()&&Vt.test(s)&&Gt.test(e)&&(n=a.width,r=a.minWidth,o=a.maxWidth,a.minWidth=a.maxWidth=a.width=s,s=i.width,a.width=n,a.minWidth=r,a.maxWidth=o),void 0!==s?s+"":s}function O(t,e){return{get:function(){return t()?void delete this.get:(this.get=e).apply(this,arguments)}}}function j(t){if(t in ne)return t;for(var e=t[0].toUpperCase()+t.slice(1),i=ie.length;i--;)if(t=ie[i]+e,t in ne)return t}function E(t,e,i){var n=At.exec(e);return n?Math.max(0,n[2]-(i||0))+(n[3]||"px"):e}function A(t,e,i,n,r){for(var o=i===(n?"border":"content")?4:"width"===e?1:0,s=0;4>o;o+=2)"margin"===i&&(s+=ot.css(t,i+Dt[o],!0,r)),n?("content"===i&&(s-=ot.css(t,"padding"+Dt[o],!0,r)),"margin"!==i&&(s-=ot.css(t,"border"+Dt[o]+"Width",!0,r))):(s+=ot.css(t,"padding"+Dt[o],!0,r),"padding"!==i&&(s+=ot.css(t,"border"+Dt[o]+"Width",!0,r)));return s}function D(e,i,n){var r=!0,o="width"===i?e.offsetWidth:e.offsetHeight,s=Kt(e),a="border-box"===ot.css(e,"boxSizing",!1,s);if(V.msFullscreenElement&&t.top!==t&&e.getClientRects().length&&(o=Math.round(100*e.getBoundingClientRect()[i])),0>=o||null==o){if(o=T(e,i,s),(0>o||null==o)&&(o=e.style[i]),Vt.test(o))return o;r=a&&(nt.boxSizingReliable()||o===e.style[i]),o=parseFloat(o)||0}return o+A(e,i,n||(a?"border":"content"),r,s)+"px"}function P(t,e){for(var i,n,r,o=[],s=0,a=t.length;a>s;s++)n=t[s],n.style&&(o[s]=St.get(n,"olddisplay"),i=n.style.display,e?(o[s]||"none"!==i||(n.style.display=""),""===n.style.display&&Pt(n)&&(o[s]=St.access(n,"olddisplay",S(n.nodeName)))):(r=Pt(n),"none"===i&&r||St.set(n,"olddisplay",r?i:ot.css(n,"display"))));for(s=0;a>s;s++)n=t[s],n.style&&(e&&"none"!==n.style.display&&""!==n.style.display||(n.style.display=e?o[s]||"":"none"));return t}function F(t,e,i,n,r){return new F.prototype.init(t,e,i,n,r)}function M(){return t.setTimeout(function(){re=void 0}),re=ot.now()}function L(t,e){var i,n=0,r={height:t};for(e=e?1:0;4>n;n+=2-e)i=Dt[n],r["margin"+i]=r["padding"+i]=t;return e&&(r.opacity=r.width=t),r}function I(t,e,i){for(var n,r=(R.tweeners[e]||[]).concat(R.tweeners["*"]),o=0,s=r.length;s>o;o++)if(n=r[o].call(i,e,t))return n}function $(t,e,i){var n,r,o,s,a,l,c,u,d=this,h={},f=t.style,p=t.nodeType&&Pt(t),g=St.get(t,"fxshow");i.queue||(a=ot._queueHooks(t,"fx"),null==a.unqueued&&(a.unqueued=0,l=a.empty.fire,a.empty.fire=function(){a.unqueued||l()}),a.unqueued++,d.always(function(){d.always(function(){a.unqueued--,ot.queue(t,"fx").length||a.empty.fire()})})),1===t.nodeType&&("height"in e||"width"in e)&&(i.overflow=[f.overflow,f.overflowX,f.overflowY],c=ot.css(t,"display"),u="none"===c?St.get(t,"olddisplay")||S(t.nodeName):c,"inline"===u&&"none"===ot.css(t,"float")&&(f.display="inline-block")),i.overflow&&(f.overflow="hidden",d.always(function(){f.overflow=i.overflow[0],f.overflowX=i.overflow[1],f.overflowY=i.overflow[2]}));for(n in e)if(r=e[n],se.exec(r)){if(delete e[n],o=o||"toggle"===r,r===(p?"hide":"show")){if("show"!==r||!g||void 0===g[n])continue;p=!0}h[n]=g&&g[n]||ot.style(t,n)}else c=void 0;if(ot.isEmptyObject(h))"inline"===("none"===c?S(t.nodeName):c)&&(f.display=c);else{g?"hidden"in g&&(p=g.hidden):g=St.access(t,"fxshow",{}),o&&(g.hidden=!p),p?ot(t).show():d.done(function(){ot(t).hide()}),d.done(function(){var e;St.remove(t,"fxshow");for(e in h)ot.style(t,e,h[e])});for(n in h)s=I(p?g[n]:0,n,d),n in g||(g[n]=s.start,p&&(s.end=s.start,s.start="width"===n||"height"===n?1:0))}}function z(t,e){var i,n,r,o,s;for(i in t)if(n=ot.camelCase(i),r=e[n],o=t[i],ot.isArray(o)&&(r=o[1],o=t[i]=o[0]),i!==n&&(t[n]=o,delete t[i]),s=ot.cssHooks[n],s&&"expand"in s){o=s.expand(o),delete t[n];for(i in o)i in t||(t[i]=o[i],e[i]=r)}else e[n]=r}function R(t,e,i){var n,r,o=0,s=R.prefilters.length,a=ot.Deferred().always(function(){delete l.elem}),l=function(){if(r)return!1;for(var e=re||M(),i=Math.max(0,c.startTime+c.duration-e),n=i/c.duration||0,o=1-n,s=0,l=c.tweens.length;l>s;s++)c.tweens[s].run(o);return a.notifyWith(t,[c,o,i]),1>o&&l?i:(a.resolveWith(t,[c]),!1)},c=a.promise({elem:t,props:ot.extend({},e),opts:ot.extend(!0,{specialEasing:{},easing:ot.easing._default},i),originalProperties:e,originalOptions:i,startTime:re||M(),duration:i.duration,tweens:[],createTween:function(e,i){var n=ot.Tween(t,c.opts,e,i,c.opts.specialEasing[e]||c.opts.easing);return c.tweens.push(n),n},stop:function(e){var i=0,n=e?c.tweens.length:0;if(r)return this;for(r=!0;n>i;i++)c.tweens[i].run(1);return e?(a.notifyWith(t,[c,1,0]),a.resolveWith(t,[c,e])):a.rejectWith(t,[c,e]),this}}),u=c.props;for(z(u,c.opts.specialEasing);s>o;o++)if(n=R.prefilters[o].call(c,t,u,c.opts))return ot.isFunction(n.stop)&&(ot._queueHooks(c.elem,c.opts.queue).stop=ot.proxy(n.stop,n)),n;return ot.map(u,I,c),ot.isFunction(c.opts.start)&&c.opts.start.call(t,c),ot.fx.timer(ot.extend(l,{elem:t,anim:c,queue:c.opts.queue})),c.progress(c.opts.progress).done(c.opts.done,c.opts.complete).fail(c.opts.fail).always(c.opts.always)}function q(t){return t.getAttribute&&t.getAttribute("class")||""}function B(t){return function(e,i){"string"!=typeof e&&(i=e,e="*");var n,r=0,o=e.toLowerCase().match(xt)||[];if(ot.isFunction(i))for(;n=o[r++];)"+"===n[0]?(n=n.slice(1)||"*",(t[n]=t[n]||[]).unshift(i)):(t[n]=t[n]||[]).push(i)}}function N(t,e,i,n){function r(a){var l;return o[a]=!0,ot.each(t[a]||[],function(t,a){var c=a(e,i,n);return"string"!=typeof c||s||o[c]?s?!(l=c):void 0:(e.dataTypes.unshift(c),r(c),!1)}),l}var o={},s=t===Te;return r(e.dataTypes[0])||!o["*"]&&r("*")}function H(t,e){var i,n,r=ot.ajaxSettings.flatOptions||{};for(i in e)void 0!==e[i]&&((r[i]?t:n||(n={}))[i]=e[i]);return n&&ot.extend(!0,t,n),t}function U(t,e,i){for(var n,r,o,s,a=t.contents,l=t.dataTypes;"*"===l[0];)l.shift(),void 0===n&&(n=t.mimeType||e.getResponseHeader("Content-Type"));if(n)for(r in a)if(a[r]&&a[r].test(n)){l.unshift(r);break}if(l[0]in i)o=l[0];else{for(r in i){if(!l[0]||t.converters[r+" "+l[0]]){o=r;break}s||(s=r)}o=o||s}return o?(o!==l[0]&&l.unshift(o),i[o]):void 0}function W(t,e,i,n){var r,o,s,a,l,c={},u=t.dataTypes.slice();if(u[1])for(s in t.converters)c[s.toLowerCase()]=t.converters[s];for(o=u.shift();o;)if(t.responseFields[o]&&(i[t.responseFields[o]]=e),!l&&n&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),l=o,o=u.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(s=c[l+" "+o]||c["* "+o],!s)for(r in c)if(a=r.split(" "),a[1]===o&&(s=c[l+" "+a[0]]||c["* "+a[0]])){s===!0?s=c[r]:c[r]!==!0&&(o=a[0],u.unshift(a[1]));break}if(s!==!0)if(s&&t.throws)e=s(e);else try{e=s(e)}catch(t){return{state:"parsererror",error:s?t:"No conversion from "+l+" to "+o}}}return{state:"success",data:e}}function Y(t,e,i,n){var r;if(ot.isArray(e))ot.each(e,function(e,r){i||Ae.test(t)?n(t,r):Y(t+"["+("object"==typeof r&&null!=r?e:"")+"]",r,i,n)});else if(i||"object"!==ot.type(e))n(t,e);else for(r in e)Y(t+"["+r+"]",e[r],i,n);
}function X(t){return ot.isWindow(t)?t:9===t.nodeType&&t.defaultView}var G=[],V=t.document,K=G.slice,Q=G.concat,J=G.push,Z=G.indexOf,tt={},et=tt.toString,it=tt.hasOwnProperty,nt={},rt="2.2.3",ot=function(t,e){return new ot.fn.init(t,e)},st=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,at=/^-ms-/,lt=/-([\da-z])/gi,ct=function(t,e){return e.toUpperCase()};ot.fn=ot.prototype={jquery:rt,constructor:ot,selector:"",length:0,toArray:function(){return K.call(this)},get:function(t){return null!=t?0>t?this[t+this.length]:this[t]:K.call(this)},pushStack:function(t){var e=ot.merge(this.constructor(),t);return e.prevObject=this,e.context=this.context,e},each:function(t){return ot.each(this,t)},map:function(t){return this.pushStack(ot.map(this,function(e,i){return t.call(e,i,e)}))},slice:function(){return this.pushStack(K.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(t){var e=this.length,i=+t+(0>t?e:0);return this.pushStack(i>=0&&e>i?[this[i]]:[])},end:function(){return this.prevObject||this.constructor()},push:J,sort:G.sort,splice:G.splice},ot.extend=ot.fn.extend=function(){var t,e,i,n,r,o,s=arguments[0]||{},a=1,l=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[a]||{},a++),"object"==typeof s||ot.isFunction(s)||(s={}),a===l&&(s=this,a--);l>a;a++)if(null!=(t=arguments[a]))for(e in t)i=s[e],n=t[e],s!==n&&(c&&n&&(ot.isPlainObject(n)||(r=ot.isArray(n)))?(r?(r=!1,o=i&&ot.isArray(i)?i:[]):o=i&&ot.isPlainObject(i)?i:{},s[e]=ot.extend(c,o,n)):void 0!==n&&(s[e]=n));return s},ot.extend({expando:"jQuery"+(rt+Math.random()).replace(/\D/g,""),isReady:!0,error:function(t){throw new Error(t)},noop:function(){},isFunction:function(t){return"function"===ot.type(t)},isArray:Array.isArray,isWindow:function(t){return null!=t&&t===t.window},isNumeric:function(t){var e=t&&t.toString();return!ot.isArray(t)&&e-parseFloat(e)+1>=0},isPlainObject:function(t){var e;if("object"!==ot.type(t)||t.nodeType||ot.isWindow(t))return!1;if(t.constructor&&!it.call(t,"constructor")&&!it.call(t.constructor.prototype||{},"isPrototypeOf"))return!1;for(e in t);return void 0===e||it.call(t,e)},isEmptyObject:function(t){var e;for(e in t)return!1;return!0},type:function(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?tt[et.call(t)]||"object":typeof t},globalEval:function(t){var e,i=eval;t=ot.trim(t),t&&(1===t.indexOf("use strict")?(e=V.createElement("script"),e.text=t,V.head.appendChild(e).parentNode.removeChild(e)):i(t))},camelCase:function(t){return t.replace(at,"ms-").replace(lt,ct)},nodeName:function(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()},each:function(t,e){var n,r=0;if(i(t))for(n=t.length;n>r&&e.call(t[r],r,t[r])!==!1;r++);else for(r in t)if(e.call(t[r],r,t[r])===!1)break;return t},trim:function(t){return null==t?"":(t+"").replace(st,"")},makeArray:function(t,e){var n=e||[];return null!=t&&(i(Object(t))?ot.merge(n,"string"==typeof t?[t]:t):J.call(n,t)),n},inArray:function(t,e,i){return null==e?-1:Z.call(e,t,i)},merge:function(t,e){for(var i=+e.length,n=0,r=t.length;i>n;n++)t[r++]=e[n];return t.length=r,t},grep:function(t,e,i){for(var n,r=[],o=0,s=t.length,a=!i;s>o;o++)n=!e(t[o],o),n!==a&&r.push(t[o]);return r},map:function(t,e,n){var r,o,s=0,a=[];if(i(t))for(r=t.length;r>s;s++)o=e(t[s],s,n),null!=o&&a.push(o);else for(s in t)o=e(t[s],s,n),null!=o&&a.push(o);return Q.apply([],a)},guid:1,proxy:function(t,e){var i,n,r;return"string"==typeof e&&(i=t[e],e=t,t=i),ot.isFunction(t)?(n=K.call(arguments,2),r=function(){return t.apply(e||this,n.concat(K.call(arguments)))},r.guid=t.guid=t.guid||ot.guid++,r):void 0},now:Date.now,support:nt}),"function"==typeof Symbol&&(ot.fn[Symbol.iterator]=G[Symbol.iterator]),ot.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(t,e){tt["[object "+e+"]"]=e.toLowerCase()});var ut=function(t){function e(t,e,i,n){var r,o,s,a,l,c,d,f,p=e&&e.ownerDocument,g=e?e.nodeType:9;if(i=i||[],"string"!=typeof t||!t||1!==g&&9!==g&&11!==g)return i;if(!n&&((e?e.ownerDocument||e:q)!==P&&D(e),e=e||P,M)){if(11!==g&&(c=vt.exec(t)))if(r=c[1]){if(9===g){if(!(s=e.getElementById(r)))return i;if(s.id===r)return i.push(s),i}else if(p&&(s=p.getElementById(r))&&z(e,s)&&s.id===r)return i.push(s),i}else{if(c[2])return J.apply(i,e.getElementsByTagName(t)),i;if((r=c[3])&&x.getElementsByClassName&&e.getElementsByClassName)return J.apply(i,e.getElementsByClassName(r)),i}if(x.qsa&&!W[t+" "]&&(!L||!L.test(t))){if(1!==g)p=e,f=t;else if("object"!==e.nodeName.toLowerCase()){for((a=e.getAttribute("id"))?a=a.replace(bt,"\\$&"):e.setAttribute("id",a=R),d=S(t),o=d.length,l=ht.test(a)?"#"+a:"[id='"+a+"']";o--;)d[o]=l+" "+h(d[o]);f=d.join(","),p=yt.test(t)&&u(e.parentNode)||e}if(f)try{return J.apply(i,p.querySelectorAll(f)),i}catch(t){}finally{a===R&&e.removeAttribute("id")}}}return O(t.replace(at,"$1"),e,i,n)}function i(){function t(i,n){return e.push(i+" ")>_.cacheLength&&delete t[e.shift()],t[i+" "]=n}var e=[];return t}function n(t){return t[R]=!0,t}function r(t){var e=P.createElement("div");try{return!!t(e)}catch(t){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function o(t,e){for(var i=t.split("|"),n=i.length;n--;)_.attrHandle[i[n]]=e}function s(t,e){var i=e&&t,n=i&&1===t.nodeType&&1===e.nodeType&&(~e.sourceIndex||X)-(~t.sourceIndex||X);if(n)return n;if(i)for(;i=i.nextSibling;)if(i===e)return-1;return t?1:-1}function a(t){return function(e){var i=e.nodeName.toLowerCase();return"input"===i&&e.type===t}}function l(t){return function(e){var i=e.nodeName.toLowerCase();return("input"===i||"button"===i)&&e.type===t}}function c(t){return n(function(e){return e=+e,n(function(i,n){for(var r,o=t([],i.length,e),s=o.length;s--;)i[r=o[s]]&&(i[r]=!(n[r]=i[r]))})})}function u(t){return t&&"undefined"!=typeof t.getElementsByTagName&&t}function d(){}function h(t){for(var e=0,i=t.length,n="";i>e;e++)n+=t[e].value;return n}function f(t,e,i){var n=e.dir,r=i&&"parentNode"===n,o=N++;return e.first?function(e,i,o){for(;e=e[n];)if(1===e.nodeType||r)return t(e,i,o)}:function(e,i,s){var a,l,c,u=[B,o];if(s){for(;e=e[n];)if((1===e.nodeType||r)&&t(e,i,s))return!0}else for(;e=e[n];)if(1===e.nodeType||r){if(c=e[R]||(e[R]={}),l=c[e.uniqueID]||(c[e.uniqueID]={}),(a=l[n])&&a[0]===B&&a[1]===o)return u[2]=a[2];if(l[n]=u,u[2]=t(e,i,s))return!0}}}function p(t){return t.length>1?function(e,i,n){for(var r=t.length;r--;)if(!t[r](e,i,n))return!1;return!0}:t[0]}function g(t,i,n){for(var r=0,o=i.length;o>r;r++)e(t,i[r],n);return n}function m(t,e,i,n,r){for(var o,s=[],a=0,l=t.length,c=null!=e;l>a;a++)(o=t[a])&&(i&&!i(o,n,r)||(s.push(o),c&&e.push(a)));return s}function v(t,e,i,r,o,s){return r&&!r[R]&&(r=v(r)),o&&!o[R]&&(o=v(o,s)),n(function(n,s,a,l){var c,u,d,h=[],f=[],p=s.length,v=n||g(e||"*",a.nodeType?[a]:a,[]),y=!t||!n&&e?v:m(v,h,t,a,l),b=i?o||(n?t:p||r)?[]:s:y;if(i&&i(y,b,a,l),r)for(c=m(b,f),r(c,[],a,l),u=c.length;u--;)(d=c[u])&&(b[f[u]]=!(y[f[u]]=d));if(n){if(o||t){if(o){for(c=[],u=b.length;u--;)(d=b[u])&&c.push(y[u]=d);o(null,b=[],c,l)}for(u=b.length;u--;)(d=b[u])&&(c=o?tt(n,d):h[u])>-1&&(n[c]=!(s[c]=d))}}else b=m(b===s?b.splice(p,b.length):b),o?o(null,s,b,l):J.apply(s,b)})}function y(t){for(var e,i,n,r=t.length,o=_.relative[t[0].type],s=o||_.relative[" "],a=o?1:0,l=f(function(t){return t===e},s,!0),c=f(function(t){return tt(e,t)>-1},s,!0),u=[function(t,i,n){var r=!o&&(n||i!==j)||((e=i).nodeType?l(t,i,n):c(t,i,n));return e=null,r}];r>a;a++)if(i=_.relative[t[a].type])u=[f(p(u),i)];else{if(i=_.filter[t[a].type].apply(null,t[a].matches),i[R]){for(n=++a;r>n&&!_.relative[t[n].type];n++);return v(a>1&&p(u),a>1&&h(t.slice(0,a-1).concat({value:" "===t[a-2].type?"*":""})).replace(at,"$1"),i,n>a&&y(t.slice(a,n)),r>n&&y(t=t.slice(n)),r>n&&h(t))}u.push(i)}return p(u)}function b(t,i){var r=i.length>0,o=t.length>0,s=function(n,s,a,l,c){var u,d,h,f=0,p="0",g=n&&[],v=[],y=j,b=n||o&&_.find.TAG("*",c),w=B+=null==y?1:Math.random()||.1,x=b.length;for(c&&(j=s===P||s||c);p!==x&&null!=(u=b[p]);p++){if(o&&u){for(d=0,s||u.ownerDocument===P||(D(u),a=!M);h=t[d++];)if(h(u,s||P,a)){l.push(u);break}c&&(B=w)}r&&((u=!h&&u)&&f--,n&&g.push(u))}if(f+=p,r&&p!==f){for(d=0;h=i[d++];)h(g,v,s,a);if(n){if(f>0)for(;p--;)g[p]||v[p]||(v[p]=K.call(l));v=m(v)}J.apply(l,v),c&&!n&&v.length>0&&f+i.length>1&&e.uniqueSort(l)}return c&&(B=w,j=y),g};return r?n(s):s}var w,x,_,C,k,S,T,O,j,E,A,D,P,F,M,L,I,$,z,R="sizzle"+1*new Date,q=t.document,B=0,N=0,H=i(),U=i(),W=i(),Y=function(t,e){return t===e&&(A=!0),0},X=1<<31,G={}.hasOwnProperty,V=[],K=V.pop,Q=V.push,J=V.push,Z=V.slice,tt=function(t,e){for(var i=0,n=t.length;n>i;i++)if(t[i]===e)return i;return-1},et="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",it="[\\x20\\t\\r\\n\\f]",nt="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",rt="\\["+it+"*("+nt+")(?:"+it+"*([*^$|!~]?=)"+it+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+nt+"))|)"+it+"*\\]",ot=":("+nt+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+rt+")*)|.*)\\)|)",st=new RegExp(it+"+","g"),at=new RegExp("^"+it+"+|((?:^|[^\\\\])(?:\\\\.)*)"+it+"+$","g"),lt=new RegExp("^"+it+"*,"+it+"*"),ct=new RegExp("^"+it+"*([>+~]|"+it+")"+it+"*"),ut=new RegExp("="+it+"*([^\\]'\"]*?)"+it+"*\\]","g"),dt=new RegExp(ot),ht=new RegExp("^"+nt+"$"),ft={ID:new RegExp("^#("+nt+")"),CLASS:new RegExp("^\\.("+nt+")"),TAG:new RegExp("^("+nt+"|[*])"),ATTR:new RegExp("^"+rt),PSEUDO:new RegExp("^"+ot),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+it+"*(even|odd|(([+-]|)(\\d*)n|)"+it+"*(?:([+-]|)"+it+"*(\\d+)|))"+it+"*\\)|)","i"),bool:new RegExp("^(?:"+et+")$","i"),needsContext:new RegExp("^"+it+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+it+"*((?:-\\d)?\\d*)"+it+"*\\)|)(?=[^-]|$)","i")},pt=/^(?:input|select|textarea|button)$/i,gt=/^h\d$/i,mt=/^[^{]+\{\s*\[native \w/,vt=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,yt=/[+~]/,bt=/'|\\/g,wt=new RegExp("\\\\([\\da-f]{1,6}"+it+"?|("+it+")|.)","ig"),xt=function(t,e,i){var n="0x"+e-65536;return n!==n||i?e:0>n?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320)},_t=function(){D()};try{J.apply(V=Z.call(q.childNodes),q.childNodes),V[q.childNodes.length].nodeType}catch(t){J={apply:V.length?function(t,e){Q.apply(t,Z.call(e))}:function(t,e){for(var i=t.length,n=0;t[i++]=e[n++];);t.length=i-1}}}x=e.support={},k=e.isXML=function(t){var e=t&&(t.ownerDocument||t).documentElement;return!!e&&"HTML"!==e.nodeName},D=e.setDocument=function(t){var e,i,n=t?t.ownerDocument||t:q;return n!==P&&9===n.nodeType&&n.documentElement?(P=n,F=P.documentElement,M=!k(P),(i=P.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",_t,!1):i.attachEvent&&i.attachEvent("onunload",_t)),x.attributes=r(function(t){return t.className="i",!t.getAttribute("className")}),x.getElementsByTagName=r(function(t){return t.appendChild(P.createComment("")),!t.getElementsByTagName("*").length}),x.getElementsByClassName=mt.test(P.getElementsByClassName),x.getById=r(function(t){return F.appendChild(t).id=R,!P.getElementsByName||!P.getElementsByName(R).length}),x.getById?(_.find.ID=function(t,e){if("undefined"!=typeof e.getElementById&&M){var i=e.getElementById(t);return i?[i]:[]}},_.filter.ID=function(t){var e=t.replace(wt,xt);return function(t){return t.getAttribute("id")===e}}):(delete _.find.ID,_.filter.ID=function(t){var e=t.replace(wt,xt);return function(t){var i="undefined"!=typeof t.getAttributeNode&&t.getAttributeNode("id");return i&&i.value===e}}),_.find.TAG=x.getElementsByTagName?function(t,e){return"undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t):x.qsa?e.querySelectorAll(t):void 0}:function(t,e){var i,n=[],r=0,o=e.getElementsByTagName(t);if("*"===t){for(;i=o[r++];)1===i.nodeType&&n.push(i);return n}return o},_.find.CLASS=x.getElementsByClassName&&function(t,e){return"undefined"!=typeof e.getElementsByClassName&&M?e.getElementsByClassName(t):void 0},I=[],L=[],(x.qsa=mt.test(P.querySelectorAll))&&(r(function(t){F.appendChild(t).innerHTML="<a id='"+R+"'></a><select id='"+R+"-\r\\' msallowcapture=''><option selected=''></option></select>",t.querySelectorAll("[msallowcapture^='']").length&&L.push("[*^$]="+it+"*(?:''|\"\")"),t.querySelectorAll("[selected]").length||L.push("\\["+it+"*(?:value|"+et+")"),t.querySelectorAll("[id~="+R+"-]").length||L.push("~="),t.querySelectorAll(":checked").length||L.push(":checked"),t.querySelectorAll("a#"+R+"+*").length||L.push(".#.+[+~]")}),r(function(t){var e=P.createElement("input");e.setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),t.querySelectorAll("[name=d]").length&&L.push("name"+it+"*[*^$|!~]?="),t.querySelectorAll(":enabled").length||L.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),L.push(",.*:")})),(x.matchesSelector=mt.test($=F.matches||F.webkitMatchesSelector||F.mozMatchesSelector||F.oMatchesSelector||F.msMatchesSelector))&&r(function(t){x.disconnectedMatch=$.call(t,"div"),$.call(t,"[s!='']:x"),I.push("!=",ot)}),L=L.length&&new RegExp(L.join("|")),I=I.length&&new RegExp(I.join("|")),e=mt.test(F.compareDocumentPosition),z=e||mt.test(F.contains)?function(t,e){var i=9===t.nodeType?t.documentElement:t,n=e&&e.parentNode;return t===n||!(!n||1!==n.nodeType||!(i.contains?i.contains(n):t.compareDocumentPosition&&16&t.compareDocumentPosition(n)))}:function(t,e){if(e)for(;e=e.parentNode;)if(e===t)return!0;return!1},Y=e?function(t,e){if(t===e)return A=!0,0;var i=!t.compareDocumentPosition-!e.compareDocumentPosition;return i?i:(i=(t.ownerDocument||t)===(e.ownerDocument||e)?t.compareDocumentPosition(e):1,1&i||!x.sortDetached&&e.compareDocumentPosition(t)===i?t===P||t.ownerDocument===q&&z(q,t)?-1:e===P||e.ownerDocument===q&&z(q,e)?1:E?tt(E,t)-tt(E,e):0:4&i?-1:1)}:function(t,e){if(t===e)return A=!0,0;var i,n=0,r=t.parentNode,o=e.parentNode,a=[t],l=[e];if(!r||!o)return t===P?-1:e===P?1:r?-1:o?1:E?tt(E,t)-tt(E,e):0;if(r===o)return s(t,e);for(i=t;i=i.parentNode;)a.unshift(i);for(i=e;i=i.parentNode;)l.unshift(i);for(;a[n]===l[n];)n++;return n?s(a[n],l[n]):a[n]===q?-1:l[n]===q?1:0},P):P},e.matches=function(t,i){return e(t,null,null,i)},e.matchesSelector=function(t,i){if((t.ownerDocument||t)!==P&&D(t),i=i.replace(ut,"='$1']"),x.matchesSelector&&M&&!W[i+" "]&&(!I||!I.test(i))&&(!L||!L.test(i)))try{var n=$.call(t,i);if(n||x.disconnectedMatch||t.document&&11!==t.document.nodeType)return n}catch(t){}return e(i,P,null,[t]).length>0},e.contains=function(t,e){return(t.ownerDocument||t)!==P&&D(t),z(t,e)},e.attr=function(t,e){(t.ownerDocument||t)!==P&&D(t);var i=_.attrHandle[e.toLowerCase()],n=i&&G.call(_.attrHandle,e.toLowerCase())?i(t,e,!M):void 0;return void 0!==n?n:x.attributes||!M?t.getAttribute(e):(n=t.getAttributeNode(e))&&n.specified?n.value:null},e.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},e.uniqueSort=function(t){var e,i=[],n=0,r=0;if(A=!x.detectDuplicates,E=!x.sortStable&&t.slice(0),t.sort(Y),A){for(;e=t[r++];)e===t[r]&&(n=i.push(r));for(;n--;)t.splice(i[n],1)}return E=null,t},C=e.getText=function(t){var e,i="",n=0,r=t.nodeType;if(r){if(1===r||9===r||11===r){if("string"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)i+=C(t)}else if(3===r||4===r)return t.nodeValue}else for(;e=t[n++];)i+=C(e);return i},_=e.selectors={cacheLength:50,createPseudo:n,match:ft,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(wt,xt),t[3]=(t[3]||t[4]||t[5]||"").replace(wt,xt),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||e.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&e.error(t[0]),t},PSEUDO:function(t){var e,i=!t[6]&&t[2];return ft.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":i&&dt.test(i)&&(e=S(i,!0))&&(e=i.indexOf(")",i.length-e)-i.length)&&(t[0]=t[0].slice(0,e),t[2]=i.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(wt,xt).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=H[t+" "];return e||(e=new RegExp("(^|"+it+")"+t+"("+it+"|$)"))&&H(t,function(t){return e.test("string"==typeof t.className&&t.className||"undefined"!=typeof t.getAttribute&&t.getAttribute("class")||"")})},ATTR:function(t,i,n){return function(r){var o=e.attr(r,t);return null==o?"!="===i:!i||(o+="","="===i?o===n:"!="===i?o!==n:"^="===i?n&&0===o.indexOf(n):"*="===i?n&&o.indexOf(n)>-1:"$="===i?n&&o.slice(-n.length)===n:"~="===i?(" "+o.replace(st," ")+" ").indexOf(n)>-1:"|="===i&&(o===n||o.slice(0,n.length+1)===n+"-"))}},CHILD:function(t,e,i,n,r){var o="nth"!==t.slice(0,3),s="last"!==t.slice(-4),a="of-type"===e;return 1===n&&0===r?function(t){return!!t.parentNode}:function(e,i,l){var c,u,d,h,f,p,g=o!==s?"nextSibling":"previousSibling",m=e.parentNode,v=a&&e.nodeName.toLowerCase(),y=!l&&!a,b=!1;if(m){if(o){for(;g;){for(h=e;h=h[g];)if(a?h.nodeName.toLowerCase()===v:1===h.nodeType)return!1;p=g="only"===t&&!p&&"nextSibling"}return!0}if(p=[s?m.firstChild:m.lastChild],s&&y){for(h=m,d=h[R]||(h[R]={}),u=d[h.uniqueID]||(d[h.uniqueID]={}),c=u[t]||[],f=c[0]===B&&c[1],b=f&&c[2],h=f&&m.childNodes[f];h=++f&&h&&h[g]||(b=f=0)||p.pop();)if(1===h.nodeType&&++b&&h===e){u[t]=[B,f,b];break}}else if(y&&(h=e,d=h[R]||(h[R]={}),u=d[h.uniqueID]||(d[h.uniqueID]={}),c=u[t]||[],f=c[0]===B&&c[1],b=f),b===!1)for(;(h=++f&&h&&h[g]||(b=f=0)||p.pop())&&((a?h.nodeName.toLowerCase()!==v:1!==h.nodeType)||!++b||(y&&(d=h[R]||(h[R]={}),u=d[h.uniqueID]||(d[h.uniqueID]={}),u[t]=[B,b]),h!==e)););return b-=r,b===n||b%n===0&&b/n>=0}}},PSEUDO:function(t,i){var r,o=_.pseudos[t]||_.setFilters[t.toLowerCase()]||e.error("unsupported pseudo: "+t);return o[R]?o(i):o.length>1?(r=[t,t,"",i],_.setFilters.hasOwnProperty(t.toLowerCase())?n(function(t,e){for(var n,r=o(t,i),s=r.length;s--;)n=tt(t,r[s]),t[n]=!(e[n]=r[s])}):function(t){return o(t,0,r)}):o}},pseudos:{not:n(function(t){var e=[],i=[],r=T(t.replace(at,"$1"));return r[R]?n(function(t,e,i,n){for(var o,s=r(t,null,n,[]),a=t.length;a--;)(o=s[a])&&(t[a]=!(e[a]=o))}):function(t,n,o){return e[0]=t,r(e,null,o,i),e[0]=null,!i.pop()}}),has:n(function(t){return function(i){return e(t,i).length>0}}),contains:n(function(t){return t=t.replace(wt,xt),function(e){return(e.textContent||e.innerText||C(e)).indexOf(t)>-1}}),lang:n(function(t){return ht.test(t||"")||e.error("unsupported lang: "+t),t=t.replace(wt,xt).toLowerCase(),function(e){var i;do if(i=M?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return i=i.toLowerCase(),i===t||0===i.indexOf(t+"-");while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var i=t.location&&t.location.hash;return i&&i.slice(1)===e.id},root:function(t){return t===F},focus:function(t){return t===P.activeElement&&(!P.hasFocus||P.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:function(t){return t.disabled===!1},disabled:function(t){return t.disabled===!0},checked:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&!!t.checked||"option"===e&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,t.selected===!0},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!_.pseudos.empty(t)},header:function(t){return gt.test(t.nodeName)},input:function(t){return pt.test(t.nodeName)},button:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&"button"===t.type||"button"===e},text:function(t){var e;return"input"===t.nodeName.toLowerCase()&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:c(function(){return[0]}),last:c(function(t,e){return[e-1]}),eq:c(function(t,e,i){return[0>i?i+e:i]}),even:c(function(t,e){for(var i=0;e>i;i+=2)t.push(i);return t}),odd:c(function(t,e){for(var i=1;e>i;i+=2)t.push(i);return t}),lt:c(function(t,e,i){for(var n=0>i?i+e:i;--n>=0;)t.push(n);return t}),gt:c(function(t,e,i){for(var n=0>i?i+e:i;++n<e;)t.push(n);return t})}},_.pseudos.nth=_.pseudos.eq;for(w in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})_.pseudos[w]=a(w);for(w in{submit:!0,reset:!0})_.pseudos[w]=l(w);return d.prototype=_.filters=_.pseudos,_.setFilters=new d,S=e.tokenize=function(t,i){var n,r,o,s,a,l,c,u=U[t+" "];if(u)return i?0:u.slice(0);for(a=t,l=[],c=_.preFilter;a;){n&&!(r=lt.exec(a))||(r&&(a=a.slice(r[0].length)||a),l.push(o=[])),n=!1,(r=ct.exec(a))&&(n=r.shift(),o.push({value:n,type:r[0].replace(at," ")}),a=a.slice(n.length));for(s in _.filter)!(r=ft[s].exec(a))||c[s]&&!(r=c[s](r))||(n=r.shift(),o.push({value:n,type:s,matches:r}),a=a.slice(n.length));if(!n)break}return i?a.length:a?e.error(t):U(t,l).slice(0)},T=e.compile=function(t,e){var i,n=[],r=[],o=W[t+" "];if(!o){for(e||(e=S(t)),i=e.length;i--;)o=y(e[i]),o[R]?n.push(o):r.push(o);o=W(t,b(r,n)),o.selector=t}return o},O=e.select=function(t,e,i,n){var r,o,s,a,l,c="function"==typeof t&&t,d=!n&&S(t=c.selector||t);if(i=i||[],1===d.length){if(o=d[0]=d[0].slice(0),o.length>2&&"ID"===(s=o[0]).type&&x.getById&&9===e.nodeType&&M&&_.relative[o[1].type]){if(e=(_.find.ID(s.matches[0].replace(wt,xt),e)||[])[0],!e)return i;c&&(e=e.parentNode),t=t.slice(o.shift().value.length)}for(r=ft.needsContext.test(t)?0:o.length;r--&&(s=o[r],!_.relative[a=s.type]);)if((l=_.find[a])&&(n=l(s.matches[0].replace(wt,xt),yt.test(o[0].type)&&u(e.parentNode)||e))){if(o.splice(r,1),t=n.length&&h(o),!t)return J.apply(i,n),i;break}}return(c||T(t,d))(n,e,!M,i,!e||yt.test(t)&&u(e.parentNode)||e),i},x.sortStable=R.split("").sort(Y).join("")===R,x.detectDuplicates=!!A,D(),x.sortDetached=r(function(t){return 1&t.compareDocumentPosition(P.createElement("div"))}),r(function(t){return t.innerHTML="<a href='#'></a>","#"===t.firstChild.getAttribute("href")})||o("type|href|height|width",function(t,e,i){return i?void 0:t.getAttribute(e,"type"===e.toLowerCase()?1:2)}),x.attributes&&r(function(t){return t.innerHTML="<input/>",t.firstChild.setAttribute("value",""),""===t.firstChild.getAttribute("value")})||o("value",function(t,e,i){return i||"input"!==t.nodeName.toLowerCase()?void 0:t.defaultValue}),r(function(t){return null==t.getAttribute("disabled")})||o(et,function(t,e,i){var n;return i?void 0:t[e]===!0?e.toLowerCase():(n=t.getAttributeNode(e))&&n.specified?n.value:null}),e}(t);ot.find=ut,ot.expr=ut.selectors,ot.expr[":"]=ot.expr.pseudos,ot.uniqueSort=ot.unique=ut.uniqueSort,ot.text=ut.getText,ot.isXMLDoc=ut.isXML,ot.contains=ut.contains;var dt=function(t,e,i){for(var n=[],r=void 0!==i;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(r&&ot(t).is(i))break;n.push(t)}return n},ht=function(t,e){for(var i=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&i.push(t);return i},ft=ot.expr.match.needsContext,pt=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,gt=/^.[^:#\[\.,]*$/;ot.filter=function(t,e,i){var n=e[0];return i&&(t=":not("+t+")"),1===e.length&&1===n.nodeType?ot.find.matchesSelector(n,t)?[n]:[]:ot.find.matches(t,ot.grep(e,function(t){return 1===t.nodeType}))},ot.fn.extend({find:function(t){var e,i=this.length,n=[],r=this;if("string"!=typeof t)return this.pushStack(ot(t).filter(function(){for(e=0;i>e;e++)if(ot.contains(r[e],this))return!0}));for(e=0;i>e;e++)ot.find(t,r[e],n);return n=this.pushStack(i>1?ot.unique(n):n),n.selector=this.selector?this.selector+" "+t:t,n},filter:function(t){return this.pushStack(n(this,t||[],!1))},not:function(t){return this.pushStack(n(this,t||[],!0))},is:function(t){return!!n(this,"string"==typeof t&&ft.test(t)?ot(t):t||[],!1).length}});var mt,vt=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,yt=ot.fn.init=function(t,e,i){var n,r;if(!t)return this;if(i=i||mt,"string"==typeof t){if(n="<"===t[0]&&">"===t[t.length-1]&&t.length>=3?[null,t,null]:vt.exec(t),!n||!n[1]&&e)return!e||e.jquery?(e||i).find(t):this.constructor(e).find(t);if(n[1]){if(e=e instanceof ot?e[0]:e,ot.merge(this,ot.parseHTML(n[1],e&&e.nodeType?e.ownerDocument||e:V,!0)),pt.test(n[1])&&ot.isPlainObject(e))for(n in e)ot.isFunction(this[n])?this[n](e[n]):this.attr(n,e[n]);return this}return r=V.getElementById(n[2]),r&&r.parentNode&&(this.length=1,this[0]=r),this.context=V,this.selector=t,this}return t.nodeType?(this.context=this[0]=t,this.length=1,this):ot.isFunction(t)?void 0!==i.ready?i.ready(t):t(ot):(void 0!==t.selector&&(this.selector=t.selector,this.context=t.context),ot.makeArray(t,this))};yt.prototype=ot.fn,mt=ot(V);var bt=/^(?:parents|prev(?:Until|All))/,wt={children:!0,contents:!0,next:!0,prev:!0};ot.fn.extend({has:function(t){var e=ot(t,this),i=e.length;return this.filter(function(){for(var t=0;i>t;t++)if(ot.contains(this,e[t]))return!0})},closest:function(t,e){for(var i,n=0,r=this.length,o=[],s=ft.test(t)||"string"!=typeof t?ot(t,e||this.context):0;r>n;n++)for(i=this[n];i&&i!==e;i=i.parentNode)if(i.nodeType<11&&(s?s.index(i)>-1:1===i.nodeType&&ot.find.matchesSelector(i,t))){o.push(i);break}return this.pushStack(o.length>1?ot.uniqueSort(o):o)},index:function(t){return t?"string"==typeof t?Z.call(ot(t),this[0]):Z.call(this,t.jquery?t[0]:t):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(ot.uniqueSort(ot.merge(this.get(),ot(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),ot.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return dt(t,"parentNode")},parentsUntil:function(t,e,i){return dt(t,"parentNode",i)},next:function(t){return r(t,"nextSibling")},prev:function(t){return r(t,"previousSibling")},nextAll:function(t){return dt(t,"nextSibling")},prevAll:function(t){return dt(t,"previousSibling")},nextUntil:function(t,e,i){return dt(t,"nextSibling",i)},prevUntil:function(t,e,i){return dt(t,"previousSibling",i)},siblings:function(t){return ht((t.parentNode||{}).firstChild,t)},children:function(t){return ht(t.firstChild)},contents:function(t){return t.contentDocument||ot.merge([],t.childNodes)}},function(t,e){ot.fn[t]=function(i,n){var r=ot.map(this,e,i);return"Until"!==t.slice(-5)&&(n=i),n&&"string"==typeof n&&(r=ot.filter(n,r)),this.length>1&&(wt[t]||ot.uniqueSort(r),bt.test(t)&&r.reverse()),this.pushStack(r)}});var xt=/\S+/g;ot.Callbacks=function(t){t="string"==typeof t?o(t):ot.extend({},t);var e,i,n,r,s=[],a=[],l=-1,c=function(){for(r=t.once,n=e=!0;a.length;l=-1)for(i=a.shift();++l<s.length;)s[l].apply(i[0],i[1])===!1&&t.stopOnFalse&&(l=s.length,i=!1);t.memory||(i=!1),e=!1,r&&(s=i?[]:"")},u={add:function(){return s&&(i&&!e&&(l=s.length-1,a.push(i)),function e(i){ot.each(i,function(i,n){ot.isFunction(n)?t.unique&&u.has(n)||s.push(n):n&&n.length&&"string"!==ot.type(n)&&e(n)})}(arguments),i&&!e&&c()),this},remove:function(){return ot.each(arguments,function(t,e){for(var i;(i=ot.inArray(e,s,i))>-1;)s.splice(i,1),l>=i&&l--}),this},has:function(t){return t?ot.inArray(t,s)>-1:s.length>0},empty:function(){return s&&(s=[]),this},disable:function(){return r=a=[],s=i="",this},disabled:function(){return!s},lock:function(){return r=a=[],i||(s=i=""),this},locked:function(){return!!r},fireWith:function(t,i){return r||(i=i||[],i=[t,i.slice?i.slice():i],a.push(i),e||c()),this},fire:function(){return u.fireWith(this,arguments),this},fired:function(){return!!n}};return u},ot.extend({Deferred:function(t){var e=[["resolve","done",ot.Callbacks("once memory"),"resolved"],["reject","fail",ot.Callbacks("once memory"),"rejected"],["notify","progress",ot.Callbacks("memory")]],i="pending",n={state:function(){return i},always:function(){return r.done(arguments).fail(arguments),this},then:function(){var t=arguments;return ot.Deferred(function(i){ot.each(e,function(e,o){var s=ot.isFunction(t[e])&&t[e];r[o[1]](function(){var t=s&&s.apply(this,arguments);t&&ot.isFunction(t.promise)?t.promise().progress(i.notify).done(i.resolve).fail(i.reject):i[o[0]+"With"](this===n?i.promise():this,s?[t]:arguments)})}),t=null}).promise()},promise:function(t){return null!=t?ot.extend(t,n):n}},r={};return n.pipe=n.then,ot.each(e,function(t,o){var s=o[2],a=o[3];n[o[1]]=s.add,a&&s.add(function(){i=a},e[1^t][2].disable,e[2][2].lock),r[o[0]]=function(){return r[o[0]+"With"](this===r?n:this,arguments),this},r[o[0]+"With"]=s.fireWith}),n.promise(r),t&&t.call(r,r),r},when:function(t){var e,i,n,r=0,o=K.call(arguments),s=o.length,a=1!==s||t&&ot.isFunction(t.promise)?s:0,l=1===a?t:ot.Deferred(),c=function(t,i,n){return function(r){i[t]=this,n[t]=arguments.length>1?K.call(arguments):r,n===e?l.notifyWith(i,n):--a||l.resolveWith(i,n)}};if(s>1)for(e=new Array(s),i=new Array(s),n=new Array(s);s>r;r++)o[r]&&ot.isFunction(o[r].promise)?o[r].promise().progress(c(r,i,e)).done(c(r,n,o)).fail(l.reject):--a;return a||l.resolveWith(n,o),l.promise()}});var _t;ot.fn.ready=function(t){return ot.ready.promise().done(t),this},ot.extend({isReady:!1,readyWait:1,holdReady:function(t){t?ot.readyWait++:ot.ready(!0)},ready:function(t){(t===!0?--ot.readyWait:ot.isReady)||(ot.isReady=!0,t!==!0&&--ot.readyWait>0||(_t.resolveWith(V,[ot]),ot.fn.triggerHandler&&(ot(V).triggerHandler("ready"),ot(V).off("ready"))))}}),ot.ready.promise=function(e){return _t||(_t=ot.Deferred(),"complete"===V.readyState||"loading"!==V.readyState&&!V.documentElement.doScroll?t.setTimeout(ot.ready):(V.addEventListener("DOMContentLoaded",s),t.addEventListener("load",s))),_t.promise(e)},ot.ready.promise();var Ct=function(t,e,i,n,r,o,s){var a=0,l=t.length,c=null==i;if("object"===ot.type(i)){r=!0;for(a in i)Ct(t,e,a,i[a],!0,o,s)}else if(void 0!==n&&(r=!0,ot.isFunction(n)||(s=!0),c&&(s?(e.call(t,n),e=null):(c=e,e=function(t,e,i){return c.call(ot(t),i)})),e))for(;l>a;a++)e(t[a],i,s?n:n.call(t[a],a,e(t[a],i)));return r?t:c?e.call(t):l?e(t[0],i):o},kt=function(t){return 1===t.nodeType||9===t.nodeType||!+t.nodeType};a.uid=1,a.prototype={register:function(t,e){var i=e||{};return t.nodeType?t[this.expando]=i:Object.defineProperty(t,this.expando,{value:i,writable:!0,configurable:!0}),t[this.expando]},cache:function(t){if(!kt(t))return{};var e=t[this.expando];return e||(e={},kt(t)&&(t.nodeType?t[this.expando]=e:Object.defineProperty(t,this.expando,{value:e,configurable:!0}))),e},set:function(t,e,i){var n,r=this.cache(t);if("string"==typeof e)r[e]=i;else for(n in e)r[n]=e[n];return r},get:function(t,e){return void 0===e?this.cache(t):t[this.expando]&&t[this.expando][e]},access:function(t,e,i){var n;return void 0===e||e&&"string"==typeof e&&void 0===i?(n=this.get(t,e),void 0!==n?n:this.get(t,ot.camelCase(e))):(this.set(t,e,i),void 0!==i?i:e)},remove:function(t,e){var i,n,r,o=t[this.expando];if(void 0!==o){if(void 0===e)this.register(t);else{ot.isArray(e)?n=e.concat(e.map(ot.camelCase)):(r=ot.camelCase(e),e in o?n=[e,r]:(n=r,n=n in o?[n]:n.match(xt)||[])),i=n.length;for(;i--;)delete o[n[i]]}(void 0===e||ot.isEmptyObject(o))&&(t.nodeType?t[this.expando]=void 0:delete t[this.expando])}},hasData:function(t){var e=t[this.expando];return void 0!==e&&!ot.isEmptyObject(e)}};var St=new a,Tt=new a,Ot=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,jt=/[A-Z]/g;ot.extend({hasData:function(t){return Tt.hasData(t)||St.hasData(t)},data:function(t,e,i){return Tt.access(t,e,i)},removeData:function(t,e){Tt.remove(t,e)},_data:function(t,e,i){return St.access(t,e,i)},_removeData:function(t,e){St.remove(t,e)}}),ot.fn.extend({data:function(t,e){var i,n,r,o=this[0],s=o&&o.attributes;if(void 0===t){if(this.length&&(r=Tt.get(o),1===o.nodeType&&!St.get(o,"hasDataAttrs"))){for(i=s.length;i--;)s[i]&&(n=s[i].name,0===n.indexOf("data-")&&(n=ot.camelCase(n.slice(5)),l(o,n,r[n])));St.set(o,"hasDataAttrs",!0)}return r}return"object"==typeof t?this.each(function(){Tt.set(this,t)}):Ct(this,function(e){var i,n;if(o&&void 0===e){if(i=Tt.get(o,t)||Tt.get(o,t.replace(jt,"-$&").toLowerCase()),void 0!==i)return i;if(n=ot.camelCase(t),i=Tt.get(o,n),void 0!==i)return i;if(i=l(o,n,void 0),void 0!==i)return i}else n=ot.camelCase(t),this.each(function(){var i=Tt.get(this,n);Tt.set(this,n,e),t.indexOf("-")>-1&&void 0!==i&&Tt.set(this,t,e);
})},null,e,arguments.length>1,null,!0)},removeData:function(t){return this.each(function(){Tt.remove(this,t)})}}),ot.extend({queue:function(t,e,i){var n;return t?(e=(e||"fx")+"queue",n=St.get(t,e),i&&(!n||ot.isArray(i)?n=St.access(t,e,ot.makeArray(i)):n.push(i)),n||[]):void 0},dequeue:function(t,e){e=e||"fx";var i=ot.queue(t,e),n=i.length,r=i.shift(),o=ot._queueHooks(t,e),s=function(){ot.dequeue(t,e)};"inprogress"===r&&(r=i.shift(),n--),r&&("fx"===e&&i.unshift("inprogress"),delete o.stop,r.call(t,s,o)),!n&&o&&o.empty.fire()},_queueHooks:function(t,e){var i=e+"queueHooks";return St.get(t,i)||St.access(t,i,{empty:ot.Callbacks("once memory").add(function(){St.remove(t,[e+"queue",i])})})}}),ot.fn.extend({queue:function(t,e){var i=2;return"string"!=typeof t&&(e=t,t="fx",i--),arguments.length<i?ot.queue(this[0],t):void 0===e?this:this.each(function(){var i=ot.queue(this,t,e);ot._queueHooks(this,t),"fx"===t&&"inprogress"!==i[0]&&ot.dequeue(this,t)})},dequeue:function(t){return this.each(function(){ot.dequeue(this,t)})},clearQueue:function(t){return this.queue(t||"fx",[])},promise:function(t,e){var i,n=1,r=ot.Deferred(),o=this,s=this.length,a=function(){--n||r.resolveWith(o,[o])};for("string"!=typeof t&&(e=t,t=void 0),t=t||"fx";s--;)i=St.get(o[s],t+"queueHooks"),i&&i.empty&&(n++,i.empty.add(a));return a(),r.promise(e)}});var Et=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,At=new RegExp("^(?:([+-])=|)("+Et+")([a-z%]*)$","i"),Dt=["Top","Right","Bottom","Left"],Pt=function(t,e){return t=e||t,"none"===ot.css(t,"display")||!ot.contains(t.ownerDocument,t)},Ft=/^(?:checkbox|radio)$/i,Mt=/<([\w:-]+)/,Lt=/^$|\/(?:java|ecma)script/i,It={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};It.optgroup=It.option,It.tbody=It.tfoot=It.colgroup=It.caption=It.thead,It.th=It.td;var $t=/<|&#?\w+;/;!function(){var t=V.createDocumentFragment(),e=t.appendChild(V.createElement("div")),i=V.createElement("input");i.setAttribute("type","radio"),i.setAttribute("checked","checked"),i.setAttribute("name","t"),e.appendChild(i),nt.checkClone=e.cloneNode(!0).cloneNode(!0).lastChild.checked,e.innerHTML="<textarea>x</textarea>",nt.noCloneChecked=!!e.cloneNode(!0).lastChild.defaultValue}();var zt=/^key/,Rt=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,qt=/^([^.]*)(?:\.(.+)|)/;ot.event={global:{},add:function(t,e,i,n,r){var o,s,a,l,c,u,d,h,f,p,g,m=St.get(t);if(m)for(i.handler&&(o=i,i=o.handler,r=o.selector),i.guid||(i.guid=ot.guid++),(l=m.events)||(l=m.events={}),(s=m.handle)||(s=m.handle=function(e){return"undefined"!=typeof ot&&ot.event.triggered!==e.type?ot.event.dispatch.apply(t,arguments):void 0}),e=(e||"").match(xt)||[""],c=e.length;c--;)a=qt.exec(e[c])||[],f=g=a[1],p=(a[2]||"").split(".").sort(),f&&(d=ot.event.special[f]||{},f=(r?d.delegateType:d.bindType)||f,d=ot.event.special[f]||{},u=ot.extend({type:f,origType:g,data:n,handler:i,guid:i.guid,selector:r,needsContext:r&&ot.expr.match.needsContext.test(r),namespace:p.join(".")},o),(h=l[f])||(h=l[f]=[],h.delegateCount=0,d.setup&&d.setup.call(t,n,p,s)!==!1||t.addEventListener&&t.addEventListener(f,s)),d.add&&(d.add.call(t,u),u.handler.guid||(u.handler.guid=i.guid)),r?h.splice(h.delegateCount++,0,u):h.push(u),ot.event.global[f]=!0)},remove:function(t,e,i,n,r){var o,s,a,l,c,u,d,h,f,p,g,m=St.hasData(t)&&St.get(t);if(m&&(l=m.events)){for(e=(e||"").match(xt)||[""],c=e.length;c--;)if(a=qt.exec(e[c])||[],f=g=a[1],p=(a[2]||"").split(".").sort(),f){for(d=ot.event.special[f]||{},f=(n?d.delegateType:d.bindType)||f,h=l[f]||[],a=a[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=o=h.length;o--;)u=h[o],!r&&g!==u.origType||i&&i.guid!==u.guid||a&&!a.test(u.namespace)||n&&n!==u.selector&&("**"!==n||!u.selector)||(h.splice(o,1),u.selector&&h.delegateCount--,d.remove&&d.remove.call(t,u));s&&!h.length&&(d.teardown&&d.teardown.call(t,p,m.handle)!==!1||ot.removeEvent(t,f,m.handle),delete l[f])}else for(f in l)ot.event.remove(t,f+e[c],i,n,!0);ot.isEmptyObject(l)&&St.remove(t,"handle events")}},dispatch:function(t){t=ot.event.fix(t);var e,i,n,r,o,s=[],a=K.call(arguments),l=(St.get(this,"events")||{})[t.type]||[],c=ot.event.special[t.type]||{};if(a[0]=t,t.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,t)!==!1){for(s=ot.event.handlers.call(this,t,l),e=0;(r=s[e++])&&!t.isPropagationStopped();)for(t.currentTarget=r.elem,i=0;(o=r.handlers[i++])&&!t.isImmediatePropagationStopped();)t.rnamespace&&!t.rnamespace.test(o.namespace)||(t.handleObj=o,t.data=o.data,n=((ot.event.special[o.origType]||{}).handle||o.handler).apply(r.elem,a),void 0!==n&&(t.result=n)===!1&&(t.preventDefault(),t.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,t),t.result}},handlers:function(t,e){var i,n,r,o,s=[],a=e.delegateCount,l=t.target;if(a&&l.nodeType&&("click"!==t.type||isNaN(t.button)||t.button<1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&(l.disabled!==!0||"click"!==t.type)){for(n=[],i=0;a>i;i++)o=e[i],r=o.selector+" ",void 0===n[r]&&(n[r]=o.needsContext?ot(r,this).index(l)>-1:ot.find(r,this,null,[l]).length),n[r]&&n.push(o);n.length&&s.push({elem:l,handlers:n})}return a<e.length&&s.push({elem:this,handlers:e.slice(a)}),s},props:"altKey bubbles cancelable ctrlKey currentTarget detail eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(t,e){return null==t.which&&(t.which=null!=e.charCode?e.charCode:e.keyCode),t}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(t,e){var i,n,r,o=e.button;return null==t.pageX&&null!=e.clientX&&(i=t.target.ownerDocument||V,n=i.documentElement,r=i.body,t.pageX=e.clientX+(n&&n.scrollLeft||r&&r.scrollLeft||0)-(n&&n.clientLeft||r&&r.clientLeft||0),t.pageY=e.clientY+(n&&n.scrollTop||r&&r.scrollTop||0)-(n&&n.clientTop||r&&r.clientTop||0)),t.which||void 0===o||(t.which=1&o?1:2&o?3:4&o?2:0),t}},fix:function(t){if(t[ot.expando])return t;var e,i,n,r=t.type,o=t,s=this.fixHooks[r];for(s||(this.fixHooks[r]=s=Rt.test(r)?this.mouseHooks:zt.test(r)?this.keyHooks:{}),n=s.props?this.props.concat(s.props):this.props,t=new ot.Event(o),e=n.length;e--;)i=n[e],t[i]=o[i];return t.target||(t.target=V),3===t.target.nodeType&&(t.target=t.target.parentNode),s.filter?s.filter(t,o):t},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==g()&&this.focus?(this.focus(),!1):void 0},delegateType:"focusin"},blur:{trigger:function(){return this===g()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&ot.nodeName(this,"input")?(this.click(),!1):void 0},_default:function(t){return ot.nodeName(t.target,"a")}},beforeunload:{postDispatch:function(t){void 0!==t.result&&t.originalEvent&&(t.originalEvent.returnValue=t.result)}}}},ot.removeEvent=function(t,e,i){t.removeEventListener&&t.removeEventListener(e,i)},ot.Event=function(t,e){return this instanceof ot.Event?(t&&t.type?(this.originalEvent=t,this.type=t.type,this.isDefaultPrevented=t.defaultPrevented||void 0===t.defaultPrevented&&t.returnValue===!1?f:p):this.type=t,e&&ot.extend(this,e),this.timeStamp=t&&t.timeStamp||ot.now(),void(this[ot.expando]=!0)):new ot.Event(t,e)},ot.Event.prototype={constructor:ot.Event,isDefaultPrevented:p,isPropagationStopped:p,isImmediatePropagationStopped:p,preventDefault:function(){var t=this.originalEvent;this.isDefaultPrevented=f,t&&t.preventDefault()},stopPropagation:function(){var t=this.originalEvent;this.isPropagationStopped=f,t&&t.stopPropagation()},stopImmediatePropagation:function(){var t=this.originalEvent;this.isImmediatePropagationStopped=f,t&&t.stopImmediatePropagation(),this.stopPropagation()}},ot.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(t,e){ot.event.special[t]={delegateType:e,bindType:e,handle:function(t){var i,n=this,r=t.relatedTarget,o=t.handleObj;return r&&(r===n||ot.contains(n,r))||(t.type=o.origType,i=o.handler.apply(this,arguments),t.type=e),i}}}),ot.fn.extend({on:function(t,e,i,n){return m(this,t,e,i,n)},one:function(t,e,i,n){return m(this,t,e,i,n,1)},off:function(t,e,i){var n,r;if(t&&t.preventDefault&&t.handleObj)return n=t.handleObj,ot(t.delegateTarget).off(n.namespace?n.origType+"."+n.namespace:n.origType,n.selector,n.handler),this;if("object"==typeof t){for(r in t)this.off(r,e,t[r]);return this}return e!==!1&&"function"!=typeof e||(i=e,e=void 0),i===!1&&(i=p),this.each(function(){ot.event.remove(this,t,i,e)})}});var Bt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,Nt=/<script|<style|<link/i,Ht=/checked\s*(?:[^=]|=\s*.checked.)/i,Ut=/^true\/(.*)/,Wt=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;ot.extend({htmlPrefilter:function(t){return t.replace(Bt,"<$1></$2>")},clone:function(t,e,i){var n,r,o,s,a=t.cloneNode(!0),l=ot.contains(t.ownerDocument,t);if(!(nt.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||ot.isXMLDoc(t)))for(s=u(a),o=u(t),n=0,r=o.length;r>n;n++)x(o[n],s[n]);if(e)if(i)for(o=o||u(t),s=s||u(a),n=0,r=o.length;r>n;n++)w(o[n],s[n]);else w(t,a);return s=u(a,"script"),s.length>0&&d(s,!l&&u(t,"script")),a},cleanData:function(t){for(var e,i,n,r=ot.event.special,o=0;void 0!==(i=t[o]);o++)if(kt(i)){if(e=i[St.expando]){if(e.events)for(n in e.events)r[n]?ot.event.remove(i,n):ot.removeEvent(i,n,e.handle);i[St.expando]=void 0}i[Tt.expando]&&(i[Tt.expando]=void 0)}}}),ot.fn.extend({domManip:_,detach:function(t){return C(this,t,!0)},remove:function(t){return C(this,t)},text:function(t){return Ct(this,function(t){return void 0===t?ot.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=t)})},null,t,arguments.length)},append:function(){return _(this,arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=v(this,t);e.appendChild(t)}})},prepend:function(){return _(this,arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=v(this,t);e.insertBefore(t,e.firstChild)}})},before:function(){return _(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this)})},after:function(){return _(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)})},empty:function(){for(var t,e=0;null!=(t=this[e]);e++)1===t.nodeType&&(ot.cleanData(u(t,!1)),t.textContent="");return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map(function(){return ot.clone(this,t,e)})},html:function(t){return Ct(this,function(t){var e=this[0]||{},i=0,n=this.length;if(void 0===t&&1===e.nodeType)return e.innerHTML;if("string"==typeof t&&!Nt.test(t)&&!It[(Mt.exec(t)||["",""])[1].toLowerCase()]){t=ot.htmlPrefilter(t);try{for(;n>i;i++)e=this[i]||{},1===e.nodeType&&(ot.cleanData(u(e,!1)),e.innerHTML=t);e=0}catch(t){}}e&&this.empty().append(t)},null,t,arguments.length)},replaceWith:function(){var t=[];return _(this,arguments,function(e){var i=this.parentNode;ot.inArray(this,t)<0&&(ot.cleanData(u(this)),i&&i.replaceChild(e,this))},t)}}),ot.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(t,e){ot.fn[t]=function(t){for(var i,n=[],r=ot(t),o=r.length-1,s=0;o>=s;s++)i=s===o?this:this.clone(!0),ot(r[s])[e](i),J.apply(n,i.get());return this.pushStack(n)}});var Yt,Xt={HTML:"block",BODY:"block"},Gt=/^margin/,Vt=new RegExp("^("+Et+")(?!px)[a-z%]+$","i"),Kt=function(e){var i=e.ownerDocument.defaultView;return i&&i.opener||(i=t),i.getComputedStyle(e)},Qt=function(t,e,i,n){var r,o,s={};for(o in e)s[o]=t.style[o],t.style[o]=e[o];r=i.apply(t,n||[]);for(o in e)t.style[o]=s[o];return r},Jt=V.documentElement;!function(){function e(){a.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",a.innerHTML="",Jt.appendChild(s);var e=t.getComputedStyle(a);i="1%"!==e.top,o="2px"===e.marginLeft,n="4px"===e.width,a.style.marginRight="50%",r="4px"===e.marginRight,Jt.removeChild(s)}var i,n,r,o,s=V.createElement("div"),a=V.createElement("div");a.style&&(a.style.backgroundClip="content-box",a.cloneNode(!0).style.backgroundClip="",nt.clearCloneStyle="content-box"===a.style.backgroundClip,s.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",s.appendChild(a),ot.extend(nt,{pixelPosition:function(){return e(),i},boxSizingReliable:function(){return null==n&&e(),n},pixelMarginRight:function(){return null==n&&e(),r},reliableMarginLeft:function(){return null==n&&e(),o},reliableMarginRight:function(){var e,i=a.appendChild(V.createElement("div"));return i.style.cssText=a.style.cssText="-webkit-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",i.style.marginRight=i.style.width="0",a.style.width="1px",Jt.appendChild(s),e=!parseFloat(t.getComputedStyle(i).marginRight),Jt.removeChild(s),a.removeChild(i),e}}))}();var Zt=/^(none|table(?!-c[ea]).+)/,te={position:"absolute",visibility:"hidden",display:"block"},ee={letterSpacing:"0",fontWeight:"400"},ie=["Webkit","O","Moz","ms"],ne=V.createElement("div").style;ot.extend({cssHooks:{opacity:{get:function(t,e){if(e){var i=T(t,"opacity");return""===i?"1":i}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:"cssFloat"},style:function(t,e,i,n){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var r,o,s,a=ot.camelCase(e),l=t.style;return e=ot.cssProps[a]||(ot.cssProps[a]=j(a)||a),s=ot.cssHooks[e]||ot.cssHooks[a],void 0===i?s&&"get"in s&&void 0!==(r=s.get(t,!1,n))?r:l[e]:(o=typeof i,"string"===o&&(r=At.exec(i))&&r[1]&&(i=c(t,e,r),o="number"),void(null!=i&&i===i&&("number"===o&&(i+=r&&r[3]||(ot.cssNumber[a]?"":"px")),nt.clearCloneStyle||""!==i||0!==e.indexOf("background")||(l[e]="inherit"),s&&"set"in s&&void 0===(i=s.set(t,i,n))||(l[e]=i))))}},css:function(t,e,i,n){var r,o,s,a=ot.camelCase(e);return e=ot.cssProps[a]||(ot.cssProps[a]=j(a)||a),s=ot.cssHooks[e]||ot.cssHooks[a],s&&"get"in s&&(r=s.get(t,!0,i)),void 0===r&&(r=T(t,e,n)),"normal"===r&&e in ee&&(r=ee[e]),""===i||i?(o=parseFloat(r),i===!0||isFinite(o)?o||0:r):r}}),ot.each(["height","width"],function(t,e){ot.cssHooks[e]={get:function(t,i,n){return i?Zt.test(ot.css(t,"display"))&&0===t.offsetWidth?Qt(t,te,function(){return D(t,e,n)}):D(t,e,n):void 0},set:function(t,i,n){var r,o=n&&Kt(t),s=n&&A(t,e,n,"border-box"===ot.css(t,"boxSizing",!1,o),o);return s&&(r=At.exec(i))&&"px"!==(r[3]||"px")&&(t.style[e]=i,i=ot.css(t,e)),E(t,i,s)}}}),ot.cssHooks.marginLeft=O(nt.reliableMarginLeft,function(t,e){return e?(parseFloat(T(t,"marginLeft"))||t.getBoundingClientRect().left-Qt(t,{marginLeft:0},function(){return t.getBoundingClientRect().left}))+"px":void 0}),ot.cssHooks.marginRight=O(nt.reliableMarginRight,function(t,e){return e?Qt(t,{display:"inline-block"},T,[t,"marginRight"]):void 0}),ot.each({margin:"",padding:"",border:"Width"},function(t,e){ot.cssHooks[t+e]={expand:function(i){for(var n=0,r={},o="string"==typeof i?i.split(" "):[i];4>n;n++)r[t+Dt[n]+e]=o[n]||o[n-2]||o[0];return r}},Gt.test(t)||(ot.cssHooks[t+e].set=E)}),ot.fn.extend({css:function(t,e){return Ct(this,function(t,e,i){var n,r,o={},s=0;if(ot.isArray(e)){for(n=Kt(t),r=e.length;r>s;s++)o[e[s]]=ot.css(t,e[s],!1,n);return o}return void 0!==i?ot.style(t,e,i):ot.css(t,e)},t,e,arguments.length>1)},show:function(){return P(this,!0)},hide:function(){return P(this)},toggle:function(t){return"boolean"==typeof t?t?this.show():this.hide():this.each(function(){Pt(this)?ot(this).show():ot(this).hide()})}}),ot.Tween=F,F.prototype={constructor:F,init:function(t,e,i,n,r,o){this.elem=t,this.prop=i,this.easing=r||ot.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=n,this.unit=o||(ot.cssNumber[i]?"":"px")},cur:function(){var t=F.propHooks[this.prop];return t&&t.get?t.get(this):F.propHooks._default.get(this)},run:function(t){var e,i=F.propHooks[this.prop];return this.options.duration?this.pos=e=ot.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),i&&i.set?i.set(this):F.propHooks._default.set(this),this}},F.prototype.init.prototype=F.prototype,F.propHooks={_default:{get:function(t){var e;return 1!==t.elem.nodeType||null!=t.elem[t.prop]&&null==t.elem.style[t.prop]?t.elem[t.prop]:(e=ot.css(t.elem,t.prop,""),e&&"auto"!==e?e:0)},set:function(t){ot.fx.step[t.prop]?ot.fx.step[t.prop](t):1!==t.elem.nodeType||null==t.elem.style[ot.cssProps[t.prop]]&&!ot.cssHooks[t.prop]?t.elem[t.prop]=t.now:ot.style(t.elem,t.prop,t.now+t.unit)}}},F.propHooks.scrollTop=F.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},ot.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},ot.fx=F.prototype.init,ot.fx.step={};var re,oe,se=/^(?:toggle|show|hide)$/,ae=/queueHooks$/;ot.Animation=ot.extend(R,{tweeners:{"*":[function(t,e){var i=this.createTween(t,e);return c(i.elem,t,At.exec(e),i),i}]},tweener:function(t,e){ot.isFunction(t)?(e=t,t=["*"]):t=t.match(xt);for(var i,n=0,r=t.length;r>n;n++)i=t[n],R.tweeners[i]=R.tweeners[i]||[],R.tweeners[i].unshift(e)},prefilters:[$],prefilter:function(t,e){e?R.prefilters.unshift(t):R.prefilters.push(t)}}),ot.speed=function(t,e,i){var n=t&&"object"==typeof t?ot.extend({},t):{complete:i||!i&&e||ot.isFunction(t)&&t,duration:t,easing:i&&e||e&&!ot.isFunction(e)&&e};return n.duration=ot.fx.off?0:"number"==typeof n.duration?n.duration:n.duration in ot.fx.speeds?ot.fx.speeds[n.duration]:ot.fx.speeds._default,null!=n.queue&&n.queue!==!0||(n.queue="fx"),n.old=n.complete,n.complete=function(){ot.isFunction(n.old)&&n.old.call(this),n.queue&&ot.dequeue(this,n.queue)},n},ot.fn.extend({fadeTo:function(t,e,i,n){return this.filter(Pt).css("opacity",0).show().end().animate({opacity:e},t,i,n)},animate:function(t,e,i,n){var r=ot.isEmptyObject(t),o=ot.speed(e,i,n),s=function(){var e=R(this,ot.extend({},t),o);(r||St.get(this,"finish"))&&e.stop(!0)};return s.finish=s,r||o.queue===!1?this.each(s):this.queue(o.queue,s)},stop:function(t,e,i){var n=function(t){var e=t.stop;delete t.stop,e(i)};return"string"!=typeof t&&(i=e,e=t,t=void 0),e&&t!==!1&&this.queue(t||"fx",[]),this.each(function(){var e=!0,r=null!=t&&t+"queueHooks",o=ot.timers,s=St.get(this);if(r)s[r]&&s[r].stop&&n(s[r]);else for(r in s)s[r]&&s[r].stop&&ae.test(r)&&n(s[r]);for(r=o.length;r--;)o[r].elem!==this||null!=t&&o[r].queue!==t||(o[r].anim.stop(i),e=!1,o.splice(r,1));!e&&i||ot.dequeue(this,t)})},finish:function(t){return t!==!1&&(t=t||"fx"),this.each(function(){var e,i=St.get(this),n=i[t+"queue"],r=i[t+"queueHooks"],o=ot.timers,s=n?n.length:0;for(i.finish=!0,ot.queue(this,t,[]),r&&r.stop&&r.stop.call(this,!0),e=o.length;e--;)o[e].elem===this&&o[e].queue===t&&(o[e].anim.stop(!0),o.splice(e,1));for(e=0;s>e;e++)n[e]&&n[e].finish&&n[e].finish.call(this);delete i.finish})}}),ot.each(["toggle","show","hide"],function(t,e){var i=ot.fn[e];ot.fn[e]=function(t,n,r){return null==t||"boolean"==typeof t?i.apply(this,arguments):this.animate(L(e,!0),t,n,r)}}),ot.each({slideDown:L("show"),slideUp:L("hide"),slideToggle:L("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(t,e){ot.fn[t]=function(t,i,n){return this.animate(e,t,i,n)}}),ot.timers=[],ot.fx.tick=function(){var t,e=0,i=ot.timers;for(re=ot.now();e<i.length;e++)t=i[e],t()||i[e]!==t||i.splice(e--,1);i.length||ot.fx.stop(),re=void 0},ot.fx.timer=function(t){ot.timers.push(t),t()?ot.fx.start():ot.timers.pop()},ot.fx.interval=13,ot.fx.start=function(){oe||(oe=t.setInterval(ot.fx.tick,ot.fx.interval))},ot.fx.stop=function(){t.clearInterval(oe),oe=null},ot.fx.speeds={slow:600,fast:200,_default:400},ot.fn.delay=function(e,i){return e=ot.fx?ot.fx.speeds[e]||e:e,i=i||"fx",this.queue(i,function(i,n){var r=t.setTimeout(i,e);n.stop=function(){t.clearTimeout(r)}})},function(){var t=V.createElement("input"),e=V.createElement("select"),i=e.appendChild(V.createElement("option"));t.type="checkbox",nt.checkOn=""!==t.value,nt.optSelected=i.selected,e.disabled=!0,nt.optDisabled=!i.disabled,t=V.createElement("input"),t.value="t",t.type="radio",nt.radioValue="t"===t.value}();var le,ce=ot.expr.attrHandle;ot.fn.extend({attr:function(t,e){return Ct(this,ot.attr,t,e,arguments.length>1)},removeAttr:function(t){return this.each(function(){ot.removeAttr(this,t)})}}),ot.extend({attr:function(t,e,i){var n,r,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof t.getAttribute?ot.prop(t,e,i):(1===o&&ot.isXMLDoc(t)||(e=e.toLowerCase(),r=ot.attrHooks[e]||(ot.expr.match.bool.test(e)?le:void 0)),void 0!==i?null===i?void ot.removeAttr(t,e):r&&"set"in r&&void 0!==(n=r.set(t,i,e))?n:(t.setAttribute(e,i+""),i):r&&"get"in r&&null!==(n=r.get(t,e))?n:(n=ot.find.attr(t,e),null==n?void 0:n))},attrHooks:{type:{set:function(t,e){if(!nt.radioValue&&"radio"===e&&ot.nodeName(t,"input")){var i=t.value;return t.setAttribute("type",e),i&&(t.value=i),e}}}},removeAttr:function(t,e){var i,n,r=0,o=e&&e.match(xt);if(o&&1===t.nodeType)for(;i=o[r++];)n=ot.propFix[i]||i,ot.expr.match.bool.test(i)&&(t[n]=!1),t.removeAttribute(i)}}),le={set:function(t,e,i){return e===!1?ot.removeAttr(t,i):t.setAttribute(i,i),i}},ot.each(ot.expr.match.bool.source.match(/\w+/g),function(t,e){var i=ce[e]||ot.find.attr;ce[e]=function(t,e,n){var r,o;return n||(o=ce[e],ce[e]=r,r=null!=i(t,e,n)?e.toLowerCase():null,ce[e]=o),r}});var ue=/^(?:input|select|textarea|button)$/i,de=/^(?:a|area)$/i;ot.fn.extend({prop:function(t,e){return Ct(this,ot.prop,t,e,arguments.length>1)},removeProp:function(t){return this.each(function(){delete this[ot.propFix[t]||t]})}}),ot.extend({prop:function(t,e,i){var n,r,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&ot.isXMLDoc(t)||(e=ot.propFix[e]||e,r=ot.propHooks[e]),void 0!==i?r&&"set"in r&&void 0!==(n=r.set(t,i,e))?n:t[e]=i:r&&"get"in r&&null!==(n=r.get(t,e))?n:t[e]},propHooks:{tabIndex:{get:function(t){var e=ot.find.attr(t,"tabindex");return e?parseInt(e,10):ue.test(t.nodeName)||de.test(t.nodeName)&&t.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),nt.optSelected||(ot.propHooks.selected={get:function(t){var e=t.parentNode;return e&&e.parentNode&&e.parentNode.selectedIndex,null},set:function(t){var e=t.parentNode;e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex)}}),ot.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){ot.propFix[this.toLowerCase()]=this});var he=/[\t\r\n\f]/g;ot.fn.extend({addClass:function(t){var e,i,n,r,o,s,a,l=0;if(ot.isFunction(t))return this.each(function(e){ot(this).addClass(t.call(this,e,q(this)))});if("string"==typeof t&&t)for(e=t.match(xt)||[];i=this[l++];)if(r=q(i),n=1===i.nodeType&&(" "+r+" ").replace(he," ")){for(s=0;o=e[s++];)n.indexOf(" "+o+" ")<0&&(n+=o+" ");a=ot.trim(n),r!==a&&i.setAttribute("class",a)}return this},removeClass:function(t){var e,i,n,r,o,s,a,l=0;if(ot.isFunction(t))return this.each(function(e){ot(this).removeClass(t.call(this,e,q(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof t&&t)for(e=t.match(xt)||[];i=this[l++];)if(r=q(i),n=1===i.nodeType&&(" "+r+" ").replace(he," ")){for(s=0;o=e[s++];)for(;n.indexOf(" "+o+" ")>-1;)n=n.replace(" "+o+" "," ");a=ot.trim(n),r!==a&&i.setAttribute("class",a)}return this},toggleClass:function(t,e){var i=typeof t;return"boolean"==typeof e&&"string"===i?e?this.addClass(t):this.removeClass(t):ot.isFunction(t)?this.each(function(i){ot(this).toggleClass(t.call(this,i,q(this),e),e)}):this.each(function(){var e,n,r,o;if("string"===i)for(n=0,r=ot(this),o=t.match(xt)||[];e=o[n++];)r.hasClass(e)?r.removeClass(e):r.addClass(e);else void 0!==t&&"boolean"!==i||(e=q(this),e&&St.set(this,"__className__",e),this.setAttribute&&this.setAttribute("class",e||t===!1?"":St.get(this,"__className__")||""))})},hasClass:function(t){var e,i,n=0;for(e=" "+t+" ";i=this[n++];)if(1===i.nodeType&&(" "+q(i)+" ").replace(he," ").indexOf(e)>-1)return!0;return!1}});var fe=/\r/g,pe=/[\x20\t\r\n\f]+/g;ot.fn.extend({val:function(t){var e,i,n,r=this[0];return arguments.length?(n=ot.isFunction(t),this.each(function(i){var r;1===this.nodeType&&(r=n?t.call(this,i,ot(this).val()):t,null==r?r="":"number"==typeof r?r+="":ot.isArray(r)&&(r=ot.map(r,function(t){return null==t?"":t+""})),e=ot.valHooks[this.type]||ot.valHooks[this.nodeName.toLowerCase()],e&&"set"in e&&void 0!==e.set(this,r,"value")||(this.value=r))})):r?(e=ot.valHooks[r.type]||ot.valHooks[r.nodeName.toLowerCase()],e&&"get"in e&&void 0!==(i=e.get(r,"value"))?i:(i=r.value,"string"==typeof i?i.replace(fe,""):null==i?"":i)):void 0}}),ot.extend({valHooks:{option:{get:function(t){var e=ot.find.attr(t,"value");return null!=e?e:ot.trim(ot.text(t)).replace(pe," ")}},select:{get:function(t){for(var e,i,n=t.options,r=t.selectedIndex,o="select-one"===t.type||0>r,s=o?null:[],a=o?r+1:n.length,l=0>r?a:o?r:0;a>l;l++)if(i=n[l],(i.selected||l===r)&&(nt.optDisabled?!i.disabled:null===i.getAttribute("disabled"))&&(!i.parentNode.disabled||!ot.nodeName(i.parentNode,"optgroup"))){if(e=ot(i).val(),o)return e;s.push(e)}return s},set:function(t,e){for(var i,n,r=t.options,o=ot.makeArray(e),s=r.length;s--;)n=r[s],(n.selected=ot.inArray(ot.valHooks.option.get(n),o)>-1)&&(i=!0);return i||(t.selectedIndex=-1),o}}}}),ot.each(["radio","checkbox"],function(){ot.valHooks[this]={set:function(t,e){return ot.isArray(e)?t.checked=ot.inArray(ot(t).val(),e)>-1:void 0}},nt.checkOn||(ot.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})});var ge=/^(?:focusinfocus|focusoutblur)$/;ot.extend(ot.event,{trigger:function(e,i,n,r){var o,s,a,l,c,u,d,h=[n||V],f=it.call(e,"type")?e.type:e,p=it.call(e,"namespace")?e.namespace.split("."):[];if(s=a=n=n||V,3!==n.nodeType&&8!==n.nodeType&&!ge.test(f+ot.event.triggered)&&(f.indexOf(".")>-1&&(p=f.split("."),f=p.shift(),p.sort()),c=f.indexOf(":")<0&&"on"+f,e=e[ot.expando]?e:new ot.Event(f,"object"==typeof e&&e),e.isTrigger=r?2:3,e.namespace=p.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),i=null==i?[e]:ot.makeArray(i,[e]),d=ot.event.special[f]||{},r||!d.trigger||d.trigger.apply(n,i)!==!1)){if(!r&&!d.noBubble&&!ot.isWindow(n)){for(l=d.delegateType||f,ge.test(l+f)||(s=s.parentNode);s;s=s.parentNode)h.push(s),a=s;a===(n.ownerDocument||V)&&h.push(a.defaultView||a.parentWindow||t)}for(o=0;(s=h[o++])&&!e.isPropagationStopped();)e.type=o>1?l:d.bindType||f,u=(St.get(s,"events")||{})[e.type]&&St.get(s,"handle"),u&&u.apply(s,i),u=c&&s[c],u&&u.apply&&kt(s)&&(e.result=u.apply(s,i),e.result===!1&&e.preventDefault());return e.type=f,r||e.isDefaultPrevented()||d._default&&d._default.apply(h.pop(),i)!==!1||!kt(n)||c&&ot.isFunction(n[f])&&!ot.isWindow(n)&&(a=n[c],a&&(n[c]=null),ot.event.triggered=f,n[f](),ot.event.triggered=void 0,a&&(n[c]=a)),e.result}},simulate:function(t,e,i){var n=ot.extend(new ot.Event,i,{type:t,isSimulated:!0});ot.event.trigger(n,null,e),n.isDefaultPrevented()&&i.preventDefault()}}),ot.fn.extend({trigger:function(t,e){return this.each(function(){ot.event.trigger(t,e,this)})},triggerHandler:function(t,e){var i=this[0];return i?ot.event.trigger(t,e,i,!0):void 0}}),ot.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(t,e){ot.fn[e]=function(t,i){return arguments.length>0?this.on(e,null,t,i):this.trigger(e)}}),ot.fn.extend({hover:function(t,e){return this.mouseenter(t).mouseleave(e||t)}}),nt.focusin="onfocusin"in t,nt.focusin||ot.each({focus:"focusin",blur:"focusout"},function(t,e){var i=function(t){ot.event.simulate(e,t.target,ot.event.fix(t))};ot.event.special[e]={setup:function(){var n=this.ownerDocument||this,r=St.access(n,e);r||n.addEventListener(t,i,!0),St.access(n,e,(r||0)+1)},teardown:function(){var n=this.ownerDocument||this,r=St.access(n,e)-1;r?St.access(n,e,r):(n.removeEventListener(t,i,!0),St.remove(n,e))}}});var me=t.location,ve=ot.now(),ye=/\?/;ot.parseJSON=function(t){return JSON.parse(t+"")},ot.parseXML=function(e){var i;if(!e||"string"!=typeof e)return null;try{i=(new t.DOMParser).parseFromString(e,"text/xml")}catch(t){i=void 0}return i&&!i.getElementsByTagName("parsererror").length||ot.error("Invalid XML: "+e),i};var be=/#.*$/,we=/([?&])_=[^&]*/,xe=/^(.*?):[ \t]*([^\r\n]*)$/gm,_e=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Ce=/^(?:GET|HEAD)$/,ke=/^\/\//,Se={},Te={},Oe="*/".concat("*"),je=V.createElement("a");je.href=me.href,ot.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:me.href,type:"GET",isLocal:_e.test(me.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Oe,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":ot.parseJSON,"text xml":ot.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?H(H(t,ot.ajaxSettings),e):H(ot.ajaxSettings,t)},ajaxPrefilter:B(Se),ajaxTransport:B(Te),ajax:function(e,i){function n(e,i,n,a){var c,d,y,b,x,C=i;2!==w&&(w=2,l&&t.clearTimeout(l),r=void 0,s=a||"",_.readyState=e>0?4:0,c=e>=200&&300>e||304===e,n&&(b=U(h,_,n)),b=W(h,b,_,c),c?(h.ifModified&&(x=_.getResponseHeader("Last-Modified"),x&&(ot.lastModified[o]=x),x=_.getResponseHeader("etag"),x&&(ot.etag[o]=x)),204===e||"HEAD"===h.type?C="nocontent":304===e?C="notmodified":(C=b.state,d=b.data,y=b.error,c=!y)):(y=C,!e&&C||(C="error",0>e&&(e=0))),_.status=e,_.statusText=(i||C)+"",c?g.resolveWith(f,[d,C,_]):g.rejectWith(f,[_,C,y]),_.statusCode(v),v=void 0,u&&p.trigger(c?"ajaxSuccess":"ajaxError",[_,h,c?d:y]),m.fireWith(f,[_,C]),u&&(p.trigger("ajaxComplete",[_,h]),--ot.active||ot.event.trigger("ajaxStop")))}"object"==typeof e&&(i=e,e=void 0),i=i||{};var r,o,s,a,l,c,u,d,h=ot.ajaxSetup({},i),f=h.context||h,p=h.context&&(f.nodeType||f.jquery)?ot(f):ot.event,g=ot.Deferred(),m=ot.Callbacks("once memory"),v=h.statusCode||{},y={},b={},w=0,x="canceled",_={readyState:0,getResponseHeader:function(t){var e;if(2===w){if(!a)for(a={};e=xe.exec(s);)a[e[1].toLowerCase()]=e[2];e=a[t.toLowerCase()]}return null==e?null:e},getAllResponseHeaders:function(){return 2===w?s:null},setRequestHeader:function(t,e){var i=t.toLowerCase();return w||(t=b[i]=b[i]||t,y[t]=e),this},overrideMimeType:function(t){return w||(h.mimeType=t),this},statusCode:function(t){var e;if(t)if(2>w)for(e in t)v[e]=[v[e],t[e]];else _.always(t[_.status]);return this},abort:function(t){var e=t||x;return r&&r.abort(e),n(0,e),this}};if(g.promise(_).complete=m.add,_.success=_.done,_.error=_.fail,h.url=((e||h.url||me.href)+"").replace(be,"").replace(ke,me.protocol+"//"),h.type=i.method||i.type||h.method||h.type,h.dataTypes=ot.trim(h.dataType||"*").toLowerCase().match(xt)||[""],null==h.crossDomain){c=V.createElement("a");try{c.href=h.url,c.href=c.href,h.crossDomain=je.protocol+"//"+je.host!=c.protocol+"//"+c.host}catch(t){h.crossDomain=!0}}if(h.data&&h.processData&&"string"!=typeof h.data&&(h.data=ot.param(h.data,h.traditional)),N(Se,h,i,_),2===w)return _;u=ot.event&&h.global,u&&0===ot.active++&&ot.event.trigger("ajaxStart"),h.type=h.type.toUpperCase(),h.hasContent=!Ce.test(h.type),o=h.url,h.hasContent||(h.data&&(o=h.url+=(ye.test(o)?"&":"?")+h.data,
delete h.data),h.cache===!1&&(h.url=we.test(o)?o.replace(we,"$1_="+ve++):o+(ye.test(o)?"&":"?")+"_="+ve++)),h.ifModified&&(ot.lastModified[o]&&_.setRequestHeader("If-Modified-Since",ot.lastModified[o]),ot.etag[o]&&_.setRequestHeader("If-None-Match",ot.etag[o])),(h.data&&h.hasContent&&h.contentType!==!1||i.contentType)&&_.setRequestHeader("Content-Type",h.contentType),_.setRequestHeader("Accept",h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+("*"!==h.dataTypes[0]?", "+Oe+"; q=0.01":""):h.accepts["*"]);for(d in h.headers)_.setRequestHeader(d,h.headers[d]);if(h.beforeSend&&(h.beforeSend.call(f,_,h)===!1||2===w))return _.abort();x="abort";for(d in{success:1,error:1,complete:1})_[d](h[d]);if(r=N(Te,h,i,_)){if(_.readyState=1,u&&p.trigger("ajaxSend",[_,h]),2===w)return _;h.async&&h.timeout>0&&(l=t.setTimeout(function(){_.abort("timeout")},h.timeout));try{w=1,r.send(y,n)}catch(t){if(!(2>w))throw t;n(-1,t)}}else n(-1,"No Transport");return _},getJSON:function(t,e,i){return ot.get(t,e,i,"json")},getScript:function(t,e){return ot.get(t,void 0,e,"script")}}),ot.each(["get","post"],function(t,e){ot[e]=function(t,i,n,r){return ot.isFunction(i)&&(r=r||n,n=i,i=void 0),ot.ajax(ot.extend({url:t,type:e,dataType:r,data:i,success:n},ot.isPlainObject(t)&&t))}}),ot._evalUrl=function(t){return ot.ajax({url:t,type:"GET",dataType:"script",async:!1,global:!1,throws:!0})},ot.fn.extend({wrapAll:function(t){var e;return ot.isFunction(t)?this.each(function(e){ot(this).wrapAll(t.call(this,e))}):(this[0]&&(e=ot(t,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&e.insertBefore(this[0]),e.map(function(){for(var t=this;t.firstElementChild;)t=t.firstElementChild;return t}).append(this)),this)},wrapInner:function(t){return ot.isFunction(t)?this.each(function(e){ot(this).wrapInner(t.call(this,e))}):this.each(function(){var e=ot(this),i=e.contents();i.length?i.wrapAll(t):e.append(t)})},wrap:function(t){var e=ot.isFunction(t);return this.each(function(i){ot(this).wrapAll(e?t.call(this,i):t)})},unwrap:function(){return this.parent().each(function(){ot.nodeName(this,"body")||ot(this).replaceWith(this.childNodes)}).end()}}),ot.expr.filters.hidden=function(t){return!ot.expr.filters.visible(t)},ot.expr.filters.visible=function(t){return t.offsetWidth>0||t.offsetHeight>0||t.getClientRects().length>0};var Ee=/%20/g,Ae=/\[\]$/,De=/\r?\n/g,Pe=/^(?:submit|button|image|reset|file)$/i,Fe=/^(?:input|select|textarea|keygen)/i;ot.param=function(t,e){var i,n=[],r=function(t,e){e=ot.isFunction(e)?e():null==e?"":e,n[n.length]=encodeURIComponent(t)+"="+encodeURIComponent(e)};if(void 0===e&&(e=ot.ajaxSettings&&ot.ajaxSettings.traditional),ot.isArray(t)||t.jquery&&!ot.isPlainObject(t))ot.each(t,function(){r(this.name,this.value)});else for(i in t)Y(i,t[i],e,r);return n.join("&").replace(Ee,"+")},ot.fn.extend({serialize:function(){return ot.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var t=ot.prop(this,"elements");return t?ot.makeArray(t):this}).filter(function(){var t=this.type;return this.name&&!ot(this).is(":disabled")&&Fe.test(this.nodeName)&&!Pe.test(t)&&(this.checked||!Ft.test(t))}).map(function(t,e){var i=ot(this).val();return null==i?null:ot.isArray(i)?ot.map(i,function(t){return{name:e.name,value:t.replace(De,"\r\n")}}):{name:e.name,value:i.replace(De,"\r\n")}}).get()}}),ot.ajaxSettings.xhr=function(){try{return new t.XMLHttpRequest}catch(t){}};var Me={0:200,1223:204},Le=ot.ajaxSettings.xhr();nt.cors=!!Le&&"withCredentials"in Le,nt.ajax=Le=!!Le,ot.ajaxTransport(function(e){var i,n;return nt.cors||Le&&!e.crossDomain?{send:function(r,o){var s,a=e.xhr();if(a.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(s in e.xhrFields)a[s]=e.xhrFields[s];e.mimeType&&a.overrideMimeType&&a.overrideMimeType(e.mimeType),e.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest");for(s in r)a.setRequestHeader(s,r[s]);i=function(t){return function(){i&&(i=n=a.onload=a.onerror=a.onabort=a.onreadystatechange=null,"abort"===t?a.abort():"error"===t?"number"!=typeof a.status?o(0,"error"):o(a.status,a.statusText):o(Me[a.status]||a.status,a.statusText,"text"!==(a.responseType||"text")||"string"!=typeof a.responseText?{binary:a.response}:{text:a.responseText},a.getAllResponseHeaders()))}},a.onload=i(),n=a.onerror=i("error"),void 0!==a.onabort?a.onabort=n:a.onreadystatechange=function(){4===a.readyState&&t.setTimeout(function(){i&&n()})},i=i("abort");try{a.send(e.hasContent&&e.data||null)}catch(t){if(i)throw t}},abort:function(){i&&i()}}:void 0}),ot.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(t){return ot.globalEval(t),t}}}),ot.ajaxPrefilter("script",function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET")}),ot.ajaxTransport("script",function(t){if(t.crossDomain){var e,i;return{send:function(n,r){e=ot("<script>").prop({charset:t.scriptCharset,src:t.url}).on("load error",i=function(t){e.remove(),i=null,t&&r("error"===t.type?404:200,t.type)}),V.head.appendChild(e[0])},abort:function(){i&&i()}}}});var Ie=[],$e=/(=)\?(?=&|$)|\?\?/;ot.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=Ie.pop()||ot.expando+"_"+ve++;return this[t]=!0,t}}),ot.ajaxPrefilter("json jsonp",function(e,i,n){var r,o,s,a=e.jsonp!==!1&&($e.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&$e.test(e.data)&&"data");return a||"jsonp"===e.dataTypes[0]?(r=e.jsonpCallback=ot.isFunction(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace($e,"$1"+r):e.jsonp!==!1&&(e.url+=(ye.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return s||ot.error(r+" was not called"),s[0]},e.dataTypes[0]="json",o=t[r],t[r]=function(){s=arguments},n.always(function(){void 0===o?ot(t).removeProp(r):t[r]=o,e[r]&&(e.jsonpCallback=i.jsonpCallback,Ie.push(r)),s&&ot.isFunction(o)&&o(s[0]),s=o=void 0}),"script"):void 0}),ot.parseHTML=function(t,e,i){if(!t||"string"!=typeof t)return null;"boolean"==typeof e&&(i=e,e=!1),e=e||V;var n=pt.exec(t),r=!i&&[];return n?[e.createElement(n[1])]:(n=h([t],e,r),r&&r.length&&ot(r).remove(),ot.merge([],n.childNodes))};var ze=ot.fn.load;ot.fn.load=function(t,e,i){if("string"!=typeof t&&ze)return ze.apply(this,arguments);var n,r,o,s=this,a=t.indexOf(" ");return a>-1&&(n=ot.trim(t.slice(a)),t=t.slice(0,a)),ot.isFunction(e)?(i=e,e=void 0):e&&"object"==typeof e&&(r="POST"),s.length>0&&ot.ajax({url:t,type:r||"GET",dataType:"html",data:e}).done(function(t){o=arguments,s.html(n?ot("<div>").append(ot.parseHTML(t)).find(n):t)}).always(i&&function(t,e){s.each(function(){i.apply(this,o||[t.responseText,e,t])})}),this},ot.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(t,e){ot.fn[e]=function(t){return this.on(e,t)}}),ot.expr.filters.animated=function(t){return ot.grep(ot.timers,function(e){return t===e.elem}).length},ot.offset={setOffset:function(t,e,i){var n,r,o,s,a,l,c,u=ot.css(t,"position"),d=ot(t),h={};"static"===u&&(t.style.position="relative"),a=d.offset(),o=ot.css(t,"top"),l=ot.css(t,"left"),c=("absolute"===u||"fixed"===u)&&(o+l).indexOf("auto")>-1,c?(n=d.position(),s=n.top,r=n.left):(s=parseFloat(o)||0,r=parseFloat(l)||0),ot.isFunction(e)&&(e=e.call(t,i,ot.extend({},a))),null!=e.top&&(h.top=e.top-a.top+s),null!=e.left&&(h.left=e.left-a.left+r),"using"in e?e.using.call(t,h):d.css(h)}},ot.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){ot.offset.setOffset(this,t,e)});var e,i,n=this[0],r={top:0,left:0},o=n&&n.ownerDocument;return o?(e=o.documentElement,ot.contains(e,n)?(r=n.getBoundingClientRect(),i=X(o),{top:r.top+i.pageYOffset-e.clientTop,left:r.left+i.pageXOffset-e.clientLeft}):r):void 0},position:function(){if(this[0]){var t,e,i=this[0],n={top:0,left:0};return"fixed"===ot.css(i,"position")?e=i.getBoundingClientRect():(t=this.offsetParent(),e=this.offset(),ot.nodeName(t[0],"html")||(n=t.offset()),n.top+=ot.css(t[0],"borderTopWidth",!0),n.left+=ot.css(t[0],"borderLeftWidth",!0)),{top:e.top-n.top-ot.css(i,"marginTop",!0),left:e.left-n.left-ot.css(i,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent;t&&"static"===ot.css(t,"position");)t=t.offsetParent;return t||Jt})}}),ot.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,e){var i="pageYOffset"===e;ot.fn[t]=function(n){return Ct(this,function(t,n,r){var o=X(t);return void 0===r?o?o[e]:t[n]:void(o?o.scrollTo(i?o.pageXOffset:r,i?r:o.pageYOffset):t[n]=r)},t,n,arguments.length)}}),ot.each(["top","left"],function(t,e){ot.cssHooks[e]=O(nt.pixelPosition,function(t,i){return i?(i=T(t,e),Vt.test(i)?ot(t).position()[e]+"px":i):void 0})}),ot.each({Height:"height",Width:"width"},function(t,e){ot.each({padding:"inner"+t,content:e,"":"outer"+t},function(i,n){ot.fn[n]=function(n,r){var o=arguments.length&&(i||"boolean"!=typeof n),s=i||(n===!0||r===!0?"margin":"border");return Ct(this,function(e,i,n){var r;return ot.isWindow(e)?e.document.documentElement["client"+t]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+t],r["scroll"+t],e.body["offset"+t],r["offset"+t],r["client"+t])):void 0===n?ot.css(e,i,s):ot.style(e,i,n,s)},e,o?n:void 0,o,null)}})}),ot.fn.extend({bind:function(t,e,i){return this.on(t,null,e,i)},unbind:function(t,e){return this.off(t,null,e)},delegate:function(t,e,i,n){return this.on(e,t,i,n)},undelegate:function(t,e,i){return 1===arguments.length?this.off(t,"**"):this.off(e,t||"**",i)},size:function(){return this.length}}),ot.fn.andSelf=ot.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return ot});var Re=t.jQuery,qe=t.$;return ot.noConflict=function(e){return t.$===ot&&(t.$=qe),e&&t.jQuery===ot&&(t.jQuery=Re),ot},e||(t.jQuery=t.$=ot),ot}),!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e(require("jquery"));else if("function"==typeof define&&define.amd)define("foundation",["jquery"],e);else{var i=e("object"==typeof exports?require("jquery"):t.jQuery);for(var n in i)("object"==typeof exports?exports:t)[n]=i[n]}}(window,function(t){return function(t){function e(n){if(i[n])return i[n].exports;var r=i[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,e),r.l=!0,r.exports}var i={};return e.m=t,e.c=i,e.d=function(t,i,n){e.o(t,i)||Object.defineProperty(t,i,{enumerable:!0,get:n})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,i){if(1&i&&(t=e(t)),8&i)return t;if(4&i&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(e.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&i&&"string"!=typeof t)for(var r in t)e.d(n,r,function(e){return t[e]}.bind(null,r));return n},e.n=function(t){var i=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(i,"a",i),i},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=0)}({"./js/entries/foundation.js":function(t,e,i){"use strict";i.r(e);var n=i("jquery"),r=i.n(n),o=i("./js/foundation.core.js");i.d(e,"Foundation",function(){return o.Foundation});var s=i("./js/foundation.core.utils.js");i.d(e,"CoreUtils",function(){return s});var a=i("./js/foundation.util.box.js");i.d(e,"Box",function(){return a.Box});var l=i("./js/foundation.util.imageLoader.js");i.d(e,"onImagesLoaded",function(){return l.onImagesLoaded});var c=i("./js/foundation.util.keyboard.js");i.d(e,"Keyboard",function(){return c.Keyboard});var u=i("./js/foundation.util.mediaQuery.js");i.d(e,"MediaQuery",function(){return u.MediaQuery});var d=i("./js/foundation.util.motion.js");i.d(e,"Motion",function(){return d.Motion});var h=i("./js/foundation.util.nest.js");i.d(e,"Nest",function(){return h.Nest});var f=i("./js/foundation.util.timer.js");i.d(e,"Timer",function(){return f.Timer});var p=i("./js/foundation.util.touch.js");i.d(e,"Touch",function(){return p.Touch});var g=i("./js/foundation.util.triggers.js");i.d(e,"Triggers",function(){return g.Triggers});var m=i("./js/foundation.abide.js");i.d(e,"Abide",function(){return m.Abide});var v=i("./js/foundation.accordion.js");i.d(e,"Accordion",function(){return v.Accordion});var y=i("./js/foundation.accordionMenu.js");i.d(e,"AccordionMenu",function(){return y.AccordionMenu});var b=i("./js/foundation.drilldown.js");i.d(e,"Drilldown",function(){return b.Drilldown});var w=i("./js/foundation.dropdown.js");i.d(e,"Dropdown",function(){return w.Dropdown});var x=i("./js/foundation.dropdownMenu.js");i.d(e,"DropdownMenu",function(){return x.DropdownMenu});var _=i("./js/foundation.equalizer.js");i.d(e,"Equalizer",function(){return _.Equalizer});var C=i("./js/foundation.interchange.js");i.d(e,"Interchange",function(){return C.Interchange});var k=i("./js/foundation.magellan.js");i.d(e,"Magellan",function(){return k.Magellan});var S=i("./js/foundation.offcanvas.js");i.d(e,"OffCanvas",function(){return S.OffCanvas});var T=i("./js/foundation.orbit.js");i.d(e,"Orbit",function(){return T.Orbit});var O=i("./js/foundation.responsiveMenu.js");i.d(e,"ResponsiveMenu",function(){return O.ResponsiveMenu});var j=i("./js/foundation.responsiveToggle.js");i.d(e,"ResponsiveToggle",function(){return j.ResponsiveToggle});var E=i("./js/foundation.reveal.js");i.d(e,"Reveal",function(){return E.Reveal});var A=i("./js/foundation.slider.js");i.d(e,"Slider",function(){return A.Slider});var D=i("./js/foundation.smoothScroll.js");i.d(e,"SmoothScroll",function(){return D.SmoothScroll});var P=i("./js/foundation.sticky.js");i.d(e,"Sticky",function(){return P.Sticky});var F=i("./js/foundation.tabs.js");i.d(e,"Tabs",function(){return F.Tabs});var M=i("./js/foundation.toggler.js");i.d(e,"Toggler",function(){return M.Toggler});var L=i("./js/foundation.tooltip.js");i.d(e,"Tooltip",function(){return L.Tooltip});var I=i("./js/foundation.responsiveAccordionTabs.js");i.d(e,"ResponsiveAccordionTabs",function(){return I.ResponsiveAccordionTabs}),o.Foundation.addToJquery(r.a),o.Foundation.rtl=s.rtl,o.Foundation.GetYoDigits=s.GetYoDigits,o.Foundation.transitionend=s.transitionend,o.Foundation.RegExpEscape=s.RegExpEscape,o.Foundation.onLoad=s.onLoad,o.Foundation.Box=a.Box,o.Foundation.onImagesLoaded=l.onImagesLoaded,o.Foundation.Keyboard=c.Keyboard,o.Foundation.MediaQuery=u.MediaQuery,o.Foundation.Motion=d.Motion,o.Foundation.Move=d.Move,o.Foundation.Nest=h.Nest,o.Foundation.Timer=f.Timer,p.Touch.init(r.a),g.Triggers.init(r.a,o.Foundation),u.MediaQuery._init(),o.Foundation.plugin(m.Abide,"Abide"),o.Foundation.plugin(v.Accordion,"Accordion"),o.Foundation.plugin(y.AccordionMenu,"AccordionMenu"),o.Foundation.plugin(b.Drilldown,"Drilldown"),o.Foundation.plugin(w.Dropdown,"Dropdown"),o.Foundation.plugin(x.DropdownMenu,"DropdownMenu"),o.Foundation.plugin(_.Equalizer,"Equalizer"),o.Foundation.plugin(C.Interchange,"Interchange"),o.Foundation.plugin(k.Magellan,"Magellan"),o.Foundation.plugin(S.OffCanvas,"OffCanvas"),o.Foundation.plugin(T.Orbit,"Orbit"),o.Foundation.plugin(O.ResponsiveMenu,"ResponsiveMenu"),o.Foundation.plugin(j.ResponsiveToggle,"ResponsiveToggle"),o.Foundation.plugin(E.Reveal,"Reveal"),o.Foundation.plugin(A.Slider,"Slider"),o.Foundation.plugin(D.SmoothScroll,"SmoothScroll"),o.Foundation.plugin(P.Sticky,"Sticky"),o.Foundation.plugin(F.Tabs,"Tabs"),o.Foundation.plugin(M.Toggler,"Toggler"),o.Foundation.plugin(L.Tooltip,"Tooltip"),o.Foundation.plugin(I.ResponsiveAccordionTabs,"ResponsiveAccordionTabs"),e.default=o.Foundation},"./js/foundation.abide.js":function(t,e,i){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function o(t,e){return!e||"object"!==n(e)&&"function"!=typeof e?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t):e}function s(t){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}i.r(e),i.d(e,"Abide",function(){return h});var l=i("jquery"),c=i.n(l),u=i("./js/foundation.core.plugin.js"),d=i("./js/foundation.core.utils.js"),h=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),o(this,s(e).apply(this,arguments))}var i,n,l;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&a(t,e)}(e,u.Plugin),i=e,(n=[{key:"_setup",value:function(t){var i=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};this.$element=t,this.options=c.a.extend(!0,{},e.defaults,this.$element.data(),i),this.className="Abide",this._init()}},{key:"_init",value:function(){var t=this;this.$inputs=c.a.merge(this.$element.find("input").not("[type=submit]"),this.$element.find("textarea, select"));var e=this.$element.find("[data-abide-error]");this.options.a11yAttributes&&(this.$inputs.each(function(e,i){return t.addA11yAttributes(c()(i))}),e.each(function(e,i){return t.addGlobalErrorA11yAttributes(c()(i))})),this._events()}},{key:"_events",value:function(){var t=this;this.$element.off(".abide").on("reset.zf.abide",function(){t.resetForm()}).on("submit.zf.abide",function(){return t.validateForm()}),"fieldChange"===this.options.validateOn&&this.$inputs.off("change.zf.abide").on("change.zf.abide",function(e){t.validateInput(c()(e.target))}),this.options.liveValidate&&this.$inputs.off("input.zf.abide").on("input.zf.abide",function(e){t.validateInput(c()(e.target))}),this.options.validateOnBlur&&this.$inputs.off("blur.zf.abide").on("blur.zf.abide",function(e){t.validateInput(c()(e.target))})}},{key:"_reflow",value:function(){this._init()}},{key:"requiredCheck",value:function(t){if(!t.attr("required"))return!0;var e=!0;switch(t[0].type){case"checkbox":e=t[0].checked;break;case"select":case"select-one":case"select-multiple":var i=t.find("option:selected");i.length&&i.val()||(e=!1);break;default:t.val()&&t.val().length||(e=!1)}return e}},{key:"findFormError",value:function(t){var e=t[0].id,i=t.siblings(this.options.formErrorSelector);return i.length||(i=t.parent().find(this.options.formErrorSelector)),e&&(i=i.add(this.$element.find('[data-form-error-for="'.concat(e,'"]')))),i}},{key:"findLabel",value:function(t){var e=t[0].id,i=this.$element.find('label[for="'.concat(e,'"]'));return i.length?i:t.closest("label")}},{key:"findRadioLabels",value:function(t){var e=this,i=t.map(function(t,i){var n=i.id,r=e.$element.find('label[for="'.concat(n,'"]'));return r.length||(r=c()(i).closest("label")),r[0]});return c()(i)}},{key:"addErrorClasses",value:function(t){var e=this.findLabel(t),i=this.findFormError(t);e.length&&e.addClass(this.options.labelErrorClass),i.length&&i.addClass(this.options.formErrorClass),t.addClass(this.options.inputErrorClass).attr({"data-invalid":"","aria-invalid":!0})}},{key:"addA11yAttributes",value:function(t){var e=this.findFormError(t),i=e.filter("label"),n=e.first();if(e.length){if(void 0===t.attr("aria-describedby")){var r=n.attr("id");void 0===r&&(r=Object(d.GetYoDigits)(6,"abide-error"),n.attr("id",r)),t.attr("aria-describedby",r)}if(i.filter("[for]").length<i.length){var o=t.attr("id");void 0===o&&(o=Object(d.GetYoDigits)(6,"abide-input"),t.attr("id",o)),i.each(function(t,e){var i=c()(e);void 0===i.attr("for")&&i.attr("for",o)})}e.each(function(t,e){var i=c()(e);void 0===i.attr("role")&&i.attr("role","alert")}).end()}}},{key:"addGlobalErrorA11yAttributes",value:function(t){void 0===t.attr("aria-live")&&t.attr("aria-live",this.options.a11yErrorLevel)}},{key:"removeRadioErrorClasses",value:function(t){var e=this.$element.find(':radio[name="'.concat(t,'"]')),i=this.findRadioLabels(e),n=this.findFormError(e);i.length&&i.removeClass(this.options.labelErrorClass),n.length&&n.removeClass(this.options.formErrorClass),e.removeClass(this.options.inputErrorClass).attr({"data-invalid":null,"aria-invalid":null})}},{key:"removeErrorClasses",value:function(t){if("radio"==t[0].type)return this.removeRadioErrorClasses(t.attr("name"));var e=this.findLabel(t),i=this.findFormError(t);e.length&&e.removeClass(this.options.labelErrorClass),i.length&&i.removeClass(this.options.formErrorClass),t.removeClass(this.options.inputErrorClass).attr({"data-invalid":null,"aria-invalid":null})}},{key:"validateInput",value:function(t){var e=this.requiredCheck(t),i=!1,n=!0,r=t.attr("data-validator"),o=!0;if(t.is("[data-abide-ignore]")||t.is('[type="hidden"]')||t.is("[disabled]"))return!0;switch(t[0].type){case"radio":i=this.validateRadio(t.attr("name"));break;case"checkbox":i=e;break;case"select":case"select-one":case"select-multiple":i=e;break;default:i=this.validateText(t)}r&&(n=this.matchValidation(t,r,t.attr("required"))),t.attr("data-equalto")&&(o=this.options.validators.equalTo(t));var s=-1===[e,i,n,o].indexOf(!1),a=(s?"valid":"invalid")+".zf.abide";if(s){var l=this.$element.find('[data-equalto="'.concat(t.attr("id"),'"]'));if(l.length){var u=this;l.each(function(){c()(this).val()&&u.validateInput(c()(this))})}}return this[s?"removeErrorClasses":"addErrorClasses"](t),t.trigger(a,[t]),s}},{key:"validateForm",value:function(){var t=this,e=[],i=this;this.$inputs.each(function(){e.push(i.validateInput(c()(this)))});var n=-1===e.indexOf(!1);return this.$element.find("[data-abide-error]").each(function(e,i){var r=c()(i);t.options.a11yAttributes&&t.addGlobalErrorA11yAttributes(r),r.css("display",n?"none":"block")}),this.$element.trigger((n?"formvalid":"forminvalid")+".zf.abide",[this.$element]),n}},{key:"validateText",value:function(t,e){e=e||t.attr("pattern")||t.attr("type");var i=t.val(),n=!1;return i.length?n=this.options.patterns.hasOwnProperty(e)?this.options.patterns[e].test(i):e===t.attr("type")||new RegExp(e).test(i):t.prop("required")||(n=!0),n}},{key:"validateRadio",value:function(t){var e=this.$element.find(':radio[name="'.concat(t,'"]')),i=!1,n=!1;return e.each(function(t,e){c()(e).attr("required")&&(n=!0)}),n||(i=!0),i||e.each(function(t,e){c()(e).prop("checked")&&(i=!0)}),i}},{key:"matchValidation",value:function(t,e,i){var n=this;return i=!!i,-1===e.split(" ").map(function(e){return n.options.validators[e](t,i,t.parent())}).indexOf(!1)}},{key:"resetForm",value:function(){var t=this.$element,e=this.options;c()(".".concat(e.labelErrorClass),t).not("small").removeClass(e.labelErrorClass),c()(".".concat(e.inputErrorClass),t).not("small").removeClass(e.inputErrorClass),c()("".concat(e.formErrorSelector,".").concat(e.formErrorClass)).removeClass(e.formErrorClass),t.find("[data-abide-error]").css("display","none"),c()(":input",t).not(":button, :submit, :reset, :hidden, :radio, :checkbox, [data-abide-ignore]").val("").attr({"data-invalid":null,"aria-invalid":null}),c()(":input:radio",t).not("[data-abide-ignore]").prop("checked",!1).attr({"data-invalid":null,"aria-invalid":null}),c()(":input:checkbox",t).not("[data-abide-ignore]").prop("checked",!1).attr({"data-invalid":null,"aria-invalid":null}),t.trigger("formreset.zf.abide",[t])}},{key:"_destroy",value:function(){var t=this;this.$element.off(".abide").find("[data-abide-error]").css("display","none"),this.$inputs.off(".abide").each(function(){t.removeErrorClasses(c()(this))})}}])&&r(i.prototype,n),l&&r(i,l),e}();h.defaults={validateOn:"fieldChange",labelErrorClass:"is-invalid-label",inputErrorClass:"is-invalid-input",formErrorSelector:".form-error",formErrorClass:"is-visible",a11yAttributes:!0,a11yErrorLevel:"assertive",liveValidate:!1,validateOnBlur:!1,patterns:{alpha:/^[a-zA-Z]+$/,alpha_numeric:/^[a-zA-Z0-9]+$/,integer:/^[-+]?\d+$/,number:/^[-+]?\d*(?:[\.\,]\d+)?$/,card:/^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|(?:222[1-9]|2[3-6][0-9]{2}|27[0-1][0-9]|2720)[0-9]{12}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\d{3})\d{11})$/,cvv:/^([0-9]){3,4}$/,email:/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[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])?)+$/,url:/^((?:(https?|ftps?|file|ssh|sftp):\/\/|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\((?:[^\s()<>]+|(?:\([^\s()<>]+\)))*\))+(?:\((?:[^\s()<>]+|(?:\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:\'".,<>?\xab\xbb\u201c\u201d\u2018\u2019]))$/,domain:/^([a-zA-Z0-9]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,8}$/,datetime:/^([0-2][0-9]{3})\-([0-1][0-9])\-([0-3][0-9])T([0-5][0-9])\:([0-5][0-9])\:([0-5][0-9])(Z|([\-\+]([0-1][0-9])\:00))$/,date:/(?:19|20)[0-9]{2}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1[0-9]|2[0-9])|(?:(?!02)(?:0[1-9]|1[0-2])-(?:30))|(?:(?:0[13578]|1[02])-31))$/,time:/^(0[0-9]|1[0-9]|2[0-3])(:[0-5][0-9]){2}$/,dateISO:/^\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}$/,month_day_year:/^(0[1-9]|1[012])[- \/.](0[1-9]|[12][0-9]|3[01])[- \/.]\d{4}$/,day_month_year:/^(0[1-9]|[12][0-9]|3[01])[- \/.](0[1-9]|1[012])[- \/.]\d{4}$/,color:/^#?([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$/,website:{test:function(t){return h.defaults.patterns.domain.test(t)||h.defaults.patterns.url.test(t)}}},validators:{equalTo:function(t,e,i){return c()("#".concat(t.attr("data-equalto"))).val()===t.val()}}}},"./js/foundation.accordion.js":function(t,e,i){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function o(t,e){return!e||"object"!==n(e)&&"function"!=typeof e?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t):e}function s(t){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}i.r(e),i.d(e,"Accordion",function(){return f});var l=i("jquery"),c=i.n(l),u=i("./js/foundation.core.utils.js"),d=i("./js/foundation.util.keyboard.js"),h=i("./js/foundation.core.plugin.js"),f=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),o(this,s(e).apply(this,arguments))}var i,n,l;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&a(t,e)}(e,h.Plugin),i=e,(n=[{key:"_setup",value:function(t,i){this.$element=t,this.options=c.a.extend({},e.defaults,this.$element.data(),i),this.className="Accordion",this._init(),d.Keyboard.register("Accordion",{ENTER:"toggle",SPACE:"toggle",ARROW_DOWN:"next",ARROW_UP:"previous"})}},{key:"_init",value:function(){var t=this;this._isInitializing=!0,this.$element.attr("role","tablist"),this.$tabs=this.$element.children("[data-accordion-item]"),this.$tabs.each(function(t,e){var i=c()(e),n=i.children("[data-tab-content]"),r=n[0].id||Object(u.GetYoDigits)(6,"accordion"),o=e.id?"".concat(e.id,"-label"):"".concat(r,"-label");i.find("a:first").attr({"aria-controls":r,role:"tab",id:o,"aria-expanded":!1,"aria-selected":!1}),n.attr({role:"tabpanel","aria-labelledby":o,"aria-hidden":!0,id:r})});var e=this.$element.find(".is-active").children("[data-tab-content]");e.length&&(this._initialAnchor=e.prev("a").attr("href"),this._openSingleTab(e)),this._checkDeepLink=function(){var e=window.location.hash;if(!e.length){if(t._isInitializing)return;t._initialAnchor&&(e=t._initialAnchor)}var i=e&&c()(e),n=e&&t.$element.find('[href$="'.concat(e,'"]')),r=!(!i.length||!n.length);i&&n&&n.length?n.parent("[data-accordion-item]").hasClass("is-active")||t._openSingleTab(i):t._closeAllTabs(),r&&(t.options.deepLinkSmudge&&Object(u.onLoad)(c()(window),function(){var e=t.$element.offset();c()("html, body").animate({scrollTop:e.top},t.options.deepLinkSmudgeDelay)}),t.$element.trigger("deeplink.zf.accordion",[n,i]))},this.options.deepLink&&this._checkDeepLink(),this._events(),this._isInitializing=!1}},{key:"_events",value:function(){var t=this;this.$tabs.each(function(){var e=c()(this),i=e.children("[data-tab-content]");i.length&&e.children("a").off("click.zf.accordion keydown.zf.accordion").on("click.zf.accordion",function(e){e.preventDefault(),t.toggle(i)}).on("keydown.zf.accordion",function(n){d.Keyboard.handleKey(n,"Accordion",{toggle:function(){t.toggle(i)},next:function(){var i=e.next().find("a").focus();t.options.multiExpand||i.trigger("click.zf.accordion")},previous:function(){var i=e.prev().find("a").focus();t.options.multiExpand||i.trigger("click.zf.accordion")},handled:function(){n.preventDefault(),n.stopPropagation()}})})}),this.options.deepLink&&c()(window).on("hashchange",this._checkDeepLink)}},{key:"toggle",value:function(t){if(t.closest("[data-accordion]").is("[disabled]"))console.info("Cannot toggle an accordion that is disabled.");else if(t.parent().hasClass("is-active")?this.up(t):this.down(t),this.options.deepLink){var e=t.prev("a").attr("href");this.options.updateHistory?history.pushState({},"",e):history.replaceState({},"",e)}}},{key:"down",value:function(t){t.closest("[data-accordion]").is("[disabled]")?console.info("Cannot call down on an accordion that is disabled."):this.options.multiExpand?this._openTab(t):this._openSingleTab(t)}},{key:"up",value:function(t){if(this.$element.is("[disabled]"))console.info("Cannot call up on an accordion that is disabled.");else{var e=t.parent();if(e.hasClass("is-active")){var i=e.siblings();(this.options.allowAllClosed||i.hasClass("is-active"))&&this._closeTab(t)}}}},{key:"_openSingleTab",value:function(t){var e=this.$element.children(".is-active").children("[data-tab-content]");e.length&&this._closeTab(e.not(t)),this._openTab(t)}},{key:"_openTab",value:function(t){var e=this,i=t.parent(),n=t.attr("aria-labelledby");t.attr("aria-hidden",!1),i.addClass("is-active"),c()("#".concat(n)).attr({"aria-expanded":!0,"aria-selected":!0}),t.slideDown(this.options.slideSpeed,function(){e.$element.trigger("down.zf.accordion",[t])})}},{key:"_closeTab",value:function(t){var e=this,i=t.parent(),n=t.attr("aria-labelledby");t.attr("aria-hidden",!0),i.removeClass("is-active"),c()("#".concat(n)).attr({"aria-expanded":!1,"aria-selected":!1}),t.slideUp(this.options.slideSpeed,function(){e.$element.trigger("up.zf.accordion",[t])})}},{key:"_closeAllTabs",value:function(){var t=this.$element.children(".is-active").children("[data-tab-content]");t.length&&this._closeTab(t)}},{key:"_destroy",value:function(){this.$element.find("[data-tab-content]").stop(!0).slideUp(0).css("display",""),this.$element.find("a").off(".zf.accordion"),this.options.deepLink&&c()(window).off("hashchange",this._checkDeepLink)}}])&&r(i.prototype,n),l&&r(i,l),e}();f.defaults={slideSpeed:250,multiExpand:!1,allowAllClosed:!1,deepLink:!1,deepLinkSmudge:!1,deepLinkSmudgeDelay:300,updateHistory:!1}},"./js/foundation.accordionMenu.js":function(t,e,i){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),
Object.defineProperty(t,n.key,n)}}function o(t,e){return!e||"object"!==n(e)&&"function"!=typeof e?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t):e}function s(t){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}i.r(e),i.d(e,"AccordionMenu",function(){return p});var l=i("jquery"),c=i.n(l),u=i("./js/foundation.util.keyboard.js"),d=i("./js/foundation.util.nest.js"),h=i("./js/foundation.core.utils.js"),f=i("./js/foundation.core.plugin.js"),p=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),o(this,s(e).apply(this,arguments))}var i,n,l;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&a(t,e)}(e,f.Plugin),i=e,(n=[{key:"_setup",value:function(t,i){this.$element=t,this.options=c.a.extend({},e.defaults,this.$element.data(),i),this.className="AccordionMenu",this._init(),u.Keyboard.register("AccordionMenu",{ENTER:"toggle",SPACE:"toggle",ARROW_RIGHT:"open",ARROW_UP:"up",ARROW_DOWN:"down",ARROW_LEFT:"close",ESCAPE:"closeAll"})}},{key:"_init",value:function(){d.Nest.Feather(this.$element,"accordion");var t=this;this.$element.find("[data-submenu]").not(".is-active").slideUp(0),this.$element.attr({role:"tree","aria-multiselectable":this.options.multiOpen}),this.$menuLinks=this.$element.find(".is-accordion-submenu-parent"),this.$menuLinks.each(function(){var e=this.id||Object(h.GetYoDigits)(6,"acc-menu-link"),i=c()(this),n=i.children("[data-submenu]"),r=n[0].id||Object(h.GetYoDigits)(6,"acc-menu"),o=n.hasClass("is-active");t.options.parentLink&&i.children("a").clone().prependTo(n).wrap('<li data-is-parent-link class="is-submenu-parent-item is-submenu-item is-accordion-submenu-item"></li>'),t.options.submenuToggle?(i.addClass("has-submenu-toggle"),i.children("a").after('<button id="'+e+'" class="submenu-toggle" aria-controls="'+r+'" aria-expanded="'+o+'" title="'+t.options.submenuToggleText+'"><span class="submenu-toggle-text">'+t.options.submenuToggleText+"</span></button>")):i.attr({"aria-controls":r,"aria-expanded":o,id:e}),n.attr({"aria-labelledby":e,"aria-hidden":!o,role:"group",id:r})}),this.$element.find("li").attr({role:"treeitem"});var e=this.$element.find(".is-active");e.length&&(t=this,e.each(function(){t.down(c()(this))})),this._events()}},{key:"_events",value:function(){var t=this;this.$element.find("li").each(function(){var e=c()(this).children("[data-submenu]");e.length&&(t.options.submenuToggle?c()(this).children(".submenu-toggle").off("click.zf.accordionMenu").on("click.zf.accordionMenu",function(i){t.toggle(e)}):c()(this).children("a").off("click.zf.accordionMenu").on("click.zf.accordionMenu",function(i){i.preventDefault(),t.toggle(e)}))}).on("keydown.zf.accordionmenu",function(e){var i,n,r=c()(this),o=r.parent("ul").children("li"),s=r.children("[data-submenu]");o.each(function(t){if(c()(this).is(r))return i=o.eq(Math.max(0,t-1)).find("a").first(),n=o.eq(Math.min(t+1,o.length-1)).find("a").first(),c()(this).children("[data-submenu]:visible").length&&(n=r.find("li:first-child").find("a").first()),c()(this).is(":first-child")?i=r.parents("li").first().find("a").first():i.parents("li").first().children("[data-submenu]:visible").length&&(i=i.parents("li").find("li:last-child").find("a").first()),void(c()(this).is(":last-child")&&(n=r.parents("li").first().next("li").find("a").first()))}),u.Keyboard.handleKey(e,"AccordionMenu",{open:function(){s.is(":hidden")&&(t.down(s),s.find("li").first().find("a").first().focus())},close:function(){s.length&&!s.is(":hidden")?t.up(s):r.parent("[data-submenu]").length&&(t.up(r.parent("[data-submenu]")),r.parents("li").first().find("a").first().focus())},up:function(){return i.focus(),!0},down:function(){return n.focus(),!0},toggle:function(){return!t.options.submenuToggle&&(r.children("[data-submenu]").length?(t.toggle(r.children("[data-submenu]")),!0):void 0)},closeAll:function(){t.hideAll()},handled:function(t){t&&e.preventDefault(),e.stopImmediatePropagation()}})})}},{key:"hideAll",value:function(){this.up(this.$element.find("[data-submenu]"))}},{key:"showAll",value:function(){this.down(this.$element.find("[data-submenu]"))}},{key:"toggle",value:function(t){t.is(":animated")||(t.is(":hidden")?this.down(t):this.up(t))}},{key:"down",value:function(t){var e=this;this.options.multiOpen||this.up(this.$element.find(".is-active").not(t.parentsUntil(this.$element).add(t))),t.addClass("is-active").attr({"aria-hidden":!1}),this.options.submenuToggle?t.prev(".submenu-toggle").attr({"aria-expanded":!0}):t.parent(".is-accordion-submenu-parent").attr({"aria-expanded":!0}),t.slideDown(this.options.slideSpeed,function(){e.$element.trigger("down.zf.accordionMenu",[t])})}},{key:"up",value:function(t){var e=this,i=t.find("[data-submenu]"),n=t.add(i);i.slideUp(0),n.removeClass("is-active").attr("aria-hidden",!0),this.options.submenuToggle?n.prev(".submenu-toggle").attr("aria-expanded",!1):n.parent(".is-accordion-submenu-parent").attr("aria-expanded",!1),t.slideUp(this.options.slideSpeed,function(){e.$element.trigger("up.zf.accordionMenu",[t])})}},{key:"_destroy",value:function(){this.$element.find("[data-submenu]").slideDown(0).css("display",""),this.$element.find("a").off("click.zf.accordionMenu"),this.$element.find("[data-is-parent-link]").detach(),this.options.submenuToggle&&(this.$element.find(".has-submenu-toggle").removeClass("has-submenu-toggle"),this.$element.find(".submenu-toggle").remove()),d.Nest.Burn(this.$element,"accordion")}}])&&r(i.prototype,n),l&&r(i,l),e}();p.defaults={parentLink:!1,slideSpeed:250,submenuToggle:!1,submenuToggleText:"Toggle menu",multiOpen:!0}},"./js/foundation.core.js":function(t,e,i){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(t){if(void 0!==Function.prototype.name)return void 0===t.prototype?t.constructor.name:t.prototype.constructor.name;var e=/function\s([^(]{1,})\(/.exec(t.toString());return e&&1<e.length?e[1].trim():""}function o(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}i.r(e),i.d(e,"Foundation",function(){return u});var s=i("jquery"),a=i.n(s),l=i("./js/foundation.core.utils.js"),c=i("./js/foundation.util.mediaQuery.js"),u={version:"6.5.1",_plugins:{},_uuids:[],plugin:function(t,e){var i=e||r(t),n=o(i);this._plugins[n]=this[i]=t},registerPlugin:function(t,e){var i=e?o(e):r(t.constructor).toLowerCase();t.uuid=Object(l.GetYoDigits)(6,i),t.$element.attr("data-".concat(i))||t.$element.attr("data-".concat(i),t.uuid),t.$element.data("zfPlugin")||t.$element.data("zfPlugin",t),t.$element.trigger("init.zf.".concat(i)),this._uuids.push(t.uuid)},unregisterPlugin:function(t){var e=o(r(t.$element.data("zfPlugin").constructor));for(var i in this._uuids.splice(this._uuids.indexOf(t.uuid),1),t.$element.removeAttr("data-".concat(e)).removeData("zfPlugin").trigger("destroyed.zf.".concat(e)),t)t[i]=null},reInit:function(t){var e=t instanceof a.a;try{if(e)t.each(function(){a()(this).data("zfPlugin")._init()});else{var i=n(t),r=this;({object:function(t){t.forEach(function(t){t=o(t),a()("[data-"+t+"]").foundation("_init")})},string:function(){t=o(t),a()("[data-"+t+"]").foundation("_init")},undefined:function(){this.object(Object.keys(r._plugins))}})[i](t)}}catch(t){console.error(t)}finally{return t}},reflow:function(t,e){void 0===e?e=Object.keys(this._plugins):"string"==typeof e&&(e=[e]);var i=this;a.a.each(e,function(e,n){var r=i._plugins[n];a()(t).find("[data-"+n+"]").addBack("[data-"+n+"]").each(function(){var t=a()(this),e={};if(t.data("zfPlugin"))console.warn("Tried to initialize "+n+" on an element that already has a Foundation plugin.");else{t.attr("data-options")&&t.attr("data-options").split(";").forEach(function(t,i){var n=t.split(":").map(function(t){return t.trim()});n[0]&&(e[n[0]]=function(t){return"true"===t||"false"!==t&&(isNaN(1*t)?t:parseFloat(t))}(n[1]))});try{t.data("zfPlugin",new r(a()(this),e))}catch(t){console.error(t)}finally{return}}})})},getFnName:r,addToJquery:function(t){return t.fn.foundation=function(e){var i=n(e),o=t(".no-js");if(o.length&&o.removeClass("no-js"),"undefined"===i)c.MediaQuery._init(),u.reflow(this);else{if("string"!==i)throw new TypeError("We're sorry, ".concat(i," is not a valid parameter. You must use a string representing the method you wish to invoke."));var s=Array.prototype.slice.call(arguments,1),a=this.data("zfPlugin");if(void 0===a||void 0===a[e])throw new ReferenceError("We're sorry, '"+e+"' is not an available method for "+(a?r(a):"this element")+".");1===this.length?a[e].apply(a,s):this.each(function(i,n){a[e].apply(t(n).data("zfPlugin"),s)})}return this},t}};u.util={throttle:function(t,e){var i=null;return function(){var n=this,r=arguments;null===i&&(i=setTimeout(function(){t.apply(n,r),i=null},e))}}},window.Foundation=u,function(){Date.now&&window.Date.now||(window.Date.now=Date.now=function(){return(new Date).getTime()});for(var t=["webkit","moz"],e=0;e<t.length&&!window.requestAnimationFrame;++e){var i=t[e];window.requestAnimationFrame=window[i+"RequestAnimationFrame"],window.cancelAnimationFrame=window[i+"CancelAnimationFrame"]||window[i+"CancelRequestAnimationFrame"]}if(/iP(ad|hone|od).*OS 6/.test(window.navigator.userAgent)||!window.requestAnimationFrame||!window.cancelAnimationFrame){var n=0;window.requestAnimationFrame=function(t){var e=Date.now(),i=Math.max(n+16,e);return setTimeout(function(){t(n=i)},i-e)},window.cancelAnimationFrame=clearTimeout}window.performance&&window.performance.now||(window.performance={start:Date.now(),now:function(){return Date.now()-this.start}})}(),Function.prototype.bind||(Function.prototype.bind=function(t){if("function"!=typeof this)throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");var e=Array.prototype.slice.call(arguments,1),i=this,n=function(){},r=function(){return i.apply(this instanceof n?this:t,e.concat(Array.prototype.slice.call(arguments)))};return this.prototype&&(n.prototype=this.prototype),r.prototype=new n,r})},"./js/foundation.core.plugin.js":function(t,e,i){"use strict";function n(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function r(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function o(t){return r(void 0!==t.constructor.name?t.constructor.name:t.className)}i.r(e),i.d(e,"Plugin",function(){return a}),i("jquery");var s=i("./js/foundation.core.utils.js"),a=function(){function t(e,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._setup(e,i);var n=o(this);this.uuid=Object(s.GetYoDigits)(6,n),this.$element.attr("data-".concat(n))||this.$element.attr("data-".concat(n),this.uuid),this.$element.data("zfPlugin")||this.$element.data("zfPlugin",this),this.$element.trigger("init.zf.".concat(n))}var e,i,r;return e=t,(i=[{key:"destroy",value:function(){this._destroy();var t=o(this);for(var e in this.$element.removeAttr("data-".concat(t)).removeData("zfPlugin").trigger("destroyed.zf.".concat(t)),this)this[e]=null}}])&&n(e.prototype,i),r&&n(e,r),t}()},"./js/foundation.core.utils.js":function(t,e,i){"use strict";function n(){return"rtl"===u()("html").attr("dir")}function r(t,e){return t=t||6,Math.round(Math.pow(36,t+1)-Math.random()*Math.pow(36,t)).toString(36).slice(1)+(e?"-".concat(e):"")}function o(t){return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}function s(t){var e,i={transition:"transitionend",WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"otransitionend"},n=document.createElement("div");for(var r in i)void 0!==n.style[r]&&(e=i[r]);return e||(e=setTimeout(function(){t.triggerHandler("transitionend",[t])},1),"transitionend")}function a(t,e){var i="complete"===document.readyState,n=(i?"_didLoad":"load")+".zf.util.onLoad",r=function(){return t.triggerHandler(n)};return t&&(e&&t.one(n,e),i?setTimeout(r):u()(window).one("load",r)),n}function l(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},i=e.ignoreLeaveWindow,n=void 0!==i&&i,r=e.ignoreReappear,o=void 0!==r&&r;return function(e){for(var i=arguments.length,r=new Array(1<i?i-1:0),s=1;s<i;s++)r[s-1]=arguments[s];var a=t.bind.apply(t,[this,e].concat(r));return null!==e.relatedTarget?a():void setTimeout(function(){return n||!document.hasFocus||document.hasFocus()?void(o||u()(document).one("mouseenter",function(t){u()(e.currentTarget).has(t.target).length||(e.relatedTarget=t.target,a())})):a()},0)}}i.r(e),i.d(e,"rtl",function(){return n}),i.d(e,"GetYoDigits",function(){return r}),i.d(e,"RegExpEscape",function(){return o}),i.d(e,"transitionend",function(){return s}),i.d(e,"onLoad",function(){return a}),i.d(e,"ignoreMousedisappear",function(){return l});var c=i("jquery"),u=i.n(c)},"./js/foundation.drilldown.js":function(t,e,i){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function o(t,e){return!e||"object"!==n(e)&&"function"!=typeof e?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t):e}function s(t){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}i.r(e),i.d(e,"Drilldown",function(){return g});var l=i("jquery"),c=i.n(l),u=i("./js/foundation.util.keyboard.js"),d=i("./js/foundation.util.nest.js"),h=i("./js/foundation.core.utils.js"),f=i("./js/foundation.util.box.js"),p=i("./js/foundation.core.plugin.js"),g=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),o(this,s(e).apply(this,arguments))}var i,n,l;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&a(t,e)}(e,p.Plugin),i=e,(n=[{key:"_setup",value:function(t,i){this.$element=t,this.options=c.a.extend({},e.defaults,this.$element.data(),i),this.className="Drilldown",this._init(),u.Keyboard.register("Drilldown",{ENTER:"open",SPACE:"open",ARROW_RIGHT:"next",ARROW_UP:"up",ARROW_DOWN:"down",ARROW_LEFT:"previous",ESCAPE:"close",TAB:"down",SHIFT_TAB:"up"})}},{key:"_init",value:function(){d.Nest.Feather(this.$element,"drilldown"),this.options.autoApplyClass&&this.$element.addClass("drilldown"),this.$element.attr({role:"tree","aria-multiselectable":!1}),this.$submenuAnchors=this.$element.find("li.is-drilldown-submenu-parent").children("a"),this.$submenus=this.$submenuAnchors.parent("li").children("[data-submenu]").attr("role","group"),this.$menuItems=this.$element.find("li").not(".js-drilldown-back").attr("role","treeitem").find("a"),this.$currentMenu=this.$element,this.$element.attr("data-mutate",this.$element.attr("data-drilldown")||Object(h.GetYoDigits)(6,"drilldown")),this._prepareMenu(),this._registerEvents(),this._keyboardEvents()}},{key:"_prepareMenu",value:function(){var t=this;this.$submenuAnchors.each(function(){var e=c()(this),i=e.parent();t.options.parentLink&&e.clone().prependTo(i.children("[data-submenu]")).wrap('<li data-is-parent-link class="is-submenu-parent-item is-submenu-item is-drilldown-submenu-item" role="menuitem"></li>'),e.data("savedHref",e.attr("href")).removeAttr("href").attr("tabindex",0),e.children("[data-submenu]").attr({"aria-hidden":!0,tabindex:0,role:"group"}),t._events(e)}),this.$submenus.each(function(){var e=c()(this);if(!e.find(".js-drilldown-back").length)switch(t.options.backButtonPosition){case"bottom":e.append(t.options.backButton);break;case"top":e.prepend(t.options.backButton);break;default:console.error("Unsupported backButtonPosition value '"+t.options.backButtonPosition+"'")}t._back(e)}),this.$submenus.addClass("invisible"),this.options.autoHeight||this.$submenus.addClass("drilldown-submenu-cover-previous"),this.$element.parent().hasClass("is-drilldown")||(this.$wrapper=c()(this.options.wrapper).addClass("is-drilldown"),this.options.animateHeight&&this.$wrapper.addClass("animate-height"),this.$element.wrap(this.$wrapper)),this.$wrapper=this.$element.parent(),this.$wrapper.css(this._getMaxDims())}},{key:"_resize",value:function(){this.$wrapper.css({"max-width":"none","min-height":"none"}),this.$wrapper.css(this._getMaxDims())}},{key:"_events",value:function(t){var e=this;t.off("click.zf.drilldown").on("click.zf.drilldown",function(i){if(c()(i.target).parentsUntil("ul","li").hasClass("is-drilldown-submenu-parent")&&(i.stopImmediatePropagation(),i.preventDefault()),e._show(t.parent("li")),e.options.closeOnClick){var n=c()("body");n.off(".zf.drilldown").on("click.zf.drilldown",function(t){t.target===e.$element[0]||c.a.contains(e.$element[0],t.target)||(t.preventDefault(),e._hideAll(),n.off(".zf.drilldown"))})}})}},{key:"_registerEvents",value:function(){this.options.scrollTop&&(this._bindHandler=this._scrollTop.bind(this),this.$element.on("open.zf.drilldown hide.zf.drilldown closed.zf.drilldown",this._bindHandler)),this.$element.on("mutateme.zf.trigger",this._resize.bind(this))}},{key:"_scrollTop",value:function(){var t=this,e=""!=t.options.scrollTopElement?c()(t.options.scrollTopElement):t.$element,i=parseInt(e.offset().top+t.options.scrollTopOffset,10);c()("html, body").stop(!0).animate({scrollTop:i},t.options.animationDuration,t.options.animationEasing,function(){this===c()("html")[0]&&t.$element.trigger("scrollme.zf.drilldown")})}},{key:"_keyboardEvents",value:function(){var t=this;this.$menuItems.add(this.$element.find(".js-drilldown-back > a, .is-submenu-parent-item > a")).on("keydown.zf.drilldown",function(e){var i,n,r=c()(this),o=r.parent("li").parent("ul").children("li").children("a");o.each(function(t){if(c()(this).is(r))return i=o.eq(Math.max(0,t-1)),void(n=o.eq(Math.min(t+1,o.length-1)))}),u.Keyboard.handleKey(e,"Drilldown",{next:function(){if(r.is(t.$submenuAnchors))return t._show(r.parent("li")),r.parent("li").one(Object(h.transitionend)(r),function(){r.parent("li").find("ul li a").not(".js-drilldown-back a").first().focus()}),!0},previous:function(){return t._hide(r.parent("li").parent("ul")),r.parent("li").parent("ul").one(Object(h.transitionend)(r),function(){setTimeout(function(){r.parent("li").parent("ul").parent("li").children("a").first().focus()},1)}),!0},up:function(){return i.focus(),!r.is(t.$element.find("> li:first-child > a"))},down:function(){return n.focus(),!r.is(t.$element.find("> li:last-child > a"))},close:function(){r.is(t.$element.find("> li > a"))||(t._hide(r.parent().parent()),r.parent().parent().siblings("a").focus())},open:function(){return(!t.options.parentLink||!r.attr("href"))&&(r.is(t.$menuItems)?r.is(t.$submenuAnchors)?(t._show(r.parent("li")),r.parent("li").one(Object(h.transitionend)(r),function(){r.parent("li").find("ul li a").not(".js-drilldown-back a").first().focus()}),!0):void 0:(t._hide(r.parent("li").parent("ul")),r.parent("li").parent("ul").one(Object(h.transitionend)(r),function(){setTimeout(function(){r.parent("li").parent("ul").parent("li").children("a").first().focus()},1)}),!0))},handled:function(t){t&&e.preventDefault(),e.stopImmediatePropagation()}})})}},{key:"_hideAll",value:function(){var t=this.$element.find(".is-drilldown-submenu.is-active").addClass("is-closing");this.options.autoHeight&&this.$wrapper.css({height:t.parent().closest("ul").data("calcHeight")}),t.one(Object(h.transitionend)(t),function(e){t.removeClass("is-active is-closing")}),this.$element.trigger("closed.zf.drilldown")}},{key:"_back",value:function(t){var e=this;t.off("click.zf.drilldown"),t.children(".js-drilldown-back").on("click.zf.drilldown",function(i){i.stopImmediatePropagation(),e._hide(t);var n=t.parent("li").parent("ul").parent("li");n.length&&e._show(n)})}},{key:"_menuLinkEvents",value:function(){var t=this;this.$menuItems.not(".is-drilldown-submenu-parent").off("click.zf.drilldown").on("click.zf.drilldown",function(e){setTimeout(function(){t._hideAll()},0)})}},{key:"_setShowSubMenuClasses",value:function(t,e){t.addClass("is-active").removeClass("invisible").attr("aria-hidden",!1),t.parent("li").attr("aria-expanded",!0),!0===e&&this.$element.trigger("open.zf.drilldown",[t])}},{key:"_setHideSubMenuClasses",value:function(t,e){t.removeClass("is-active").addClass("invisible").attr("aria-hidden",!0),t.parent("li").attr("aria-expanded",!1),!0===e&&t.trigger("hide.zf.drilldown",[t])}},{key:"_showMenu",value:function(t,e){var i=this;if(this.$element.find('li[aria-expanded="true"] > ul[data-submenu]').each(function(t){i._setHideSubMenuClasses(c()(this))}),(this.$currentMenu=t).is("[data-drilldown]"))return!0===e&&t.find('li[role="treeitem"] > a').first().focus(),void(this.options.autoHeight&&this.$wrapper.css("height",t.data("calcHeight")));var n=t.children().first().parentsUntil("[data-drilldown]","[data-submenu]");n.each(function(r){0===r&&i.options.autoHeight&&i.$wrapper.css("height",c()(this).data("calcHeight"));var o=r==n.length-1;!0===o&&c()(this).one(Object(h.transitionend)(c()(this)),function(){!0===e&&t.find('li[role="treeitem"] > a').first().focus()}),i._setShowSubMenuClasses(c()(this),o)})}},{key:"_show",value:function(t){var e=t.children("[data-submenu]");t.attr("aria-expanded",!0),(this.$currentMenu=e).addClass("is-active").removeClass("invisible").attr("aria-hidden",!1),this.options.autoHeight&&this.$wrapper.css({height:e.data("calcHeight")}),this.$element.trigger("open.zf.drilldown",[t])}},{key:"_hide",value:function(t){this.options.autoHeight&&this.$wrapper.css({height:t.parent().closest("ul").data("calcHeight")}),t.parent("li").attr("aria-expanded",!1),t.attr("aria-hidden",!0),t.addClass("is-closing").one(Object(h.transitionend)(t),function(){t.removeClass("is-active is-closing"),t.blur().addClass("invisible")}),t.trigger("hide.zf.drilldown",[t])}},{key:"_getMaxDims",value:function(){var t=0,e={},i=this;return this.$submenus.add(this.$element).each(function(){c()(this).children("li").length;var e=f.Box.GetDimensions(this).height;t=t<e?e:t,i.options.autoHeight&&c()(this).data("calcHeight",e)}),this.options.autoHeight?e.height=this.$currentMenu.data("calcHeight"):e["min-height"]="".concat(t,"px"),e["max-width"]="".concat(this.$element[0].getBoundingClientRect().width,"px"),e}},{key:"_destroy",value:function(){this.options.scrollTop&&this.$element.off(".zf.drilldown",this._bindHandler),this._hideAll(),this.$element.off("mutateme.zf.trigger"),d.Nest.Burn(this.$element,"drilldown"),this.$element.unwrap().find(".js-drilldown-back, .is-submenu-parent-item").remove().end().find(".is-active, .is-closing, .is-drilldown-submenu").removeClass("is-active is-closing is-drilldown-submenu").end().find("[data-submenu]").removeAttr("aria-hidden tabindex role"),this.$submenuAnchors.each(function(){c()(this).off(".zf.drilldown")}),this.$element.find("[data-is-parent-link]").detach(),this.$submenus.removeClass("drilldown-submenu-cover-previous invisible"),this.$element.find("a").each(function(){var t=c()(this);t.removeAttr("tabindex"),t.data("savedHref")&&t.attr("href",t.data("savedHref")).removeData("savedHref")})}}])&&r(i.prototype,n),l&&r(i,l),e}();g.defaults={autoApplyClass:!0,backButton:'<li class="js-drilldown-back"><a tabindex="0">Back</a></li>',backButtonPosition:"top",wrapper:"<div></div>",parentLink:!1,closeOnClick:!1,autoHeight:!1,animateHeight:!1,scrollTop:!1,scrollTopElement:"",scrollTopOffset:0,animationDuration:500,animationEasing:"swing"}},"./js/foundation.dropdown.js":function(t,e,i){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function o(t,e){return!e||"object"!==n(e)&&"function"!=typeof e?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t):e}function s(t,e,i){return(s="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,i){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=a(t)););return t}(t,e);if(n){var r=Object.getOwnPropertyDescriptor(n,e);return r.get?r.get.call(i):r.value}})(t,e,i||t)}function a(t){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function l(t,e){return(l=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}i.r(e),i.d(e,"Dropdown",function(){return g});var c=i("jquery"),u=i.n(c),d=i("./js/foundation.util.keyboard.js"),h=i("./js/foundation.core.utils.js"),f=i("./js/foundation.positionable.js"),p=i("./js/foundation.util.triggers.js"),g=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),o(this,a(e).apply(this,arguments))}var i,n,c;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&l(t,e)}(e,f.Positionable),i=e,(n=[{key:"_setup",value:function(t,i){this.$element=t,this.options=u.a.extend({},e.defaults,this.$element.data(),i),this.className="Dropdown",p.Triggers.init(u.a),this._init(),d.Keyboard.register("Dropdown",{ENTER:"toggle",SPACE:"toggle",ESCAPE:"close"})}},{key:"_init",value:function(){var t=this.$element.attr("id");this.$anchors=u()('[data-toggle="'.concat(t,'"]')).length?u()('[data-toggle="'.concat(t,'"]')):u()('[data-open="'.concat(t,'"]')),this.$anchors.attr({"aria-controls":t,"data-is-focus":!1,"data-yeti-box":t,"aria-haspopup":!0,"aria-expanded":!1}),this._setCurrentAnchor(this.$anchors.first()),this.options.parentClass?this.$parent=this.$element.parents("."+this.options.parentClass):this.$parent=null,void 0===this.$element.attr("aria-labelledby")&&(void 0===this.$currentAnchor.attr("id")&&this.$currentAnchor.attr("id",Object(h.GetYoDigits)(6,"dd-anchor")),this.$element.attr("aria-labelledby",this.$currentAnchor.attr("id"))),this.$element.attr({"aria-hidden":"true","data-yeti-box":t,"data-resize":t}),s(a(e.prototype),"_init",this).call(this),this._events()}},{key:"_getDefaultPosition",value:function(){var t=this.$element[0].className.match(/(top|left|right|bottom)/g);return t?t[0]:"bottom"}},{key:"_getDefaultAlignment",value:function(){var t=/float-(\S+)/.exec(this.$currentAnchor.attr("class"));return t?t[1]:s(a(e.prototype),"_getDefaultAlignment",this).call(this)}},{key:"_setPosition",value:function(){this.$element.removeClass("has-position-".concat(this.position," has-alignment-").concat(this.alignment)),s(a(e.prototype),"_setPosition",this).call(this,this.$currentAnchor,this.$element,this.$parent),this.$element.addClass("has-position-".concat(this.position," has-alignment-").concat(this.alignment))}},{key:"_setCurrentAnchor",value:function(t){this.$currentAnchor=u()(t)}},{key:"_events",value:function(){var t=this;this.$element.on({"open.zf.trigger":this.open.bind(this),"close.zf.trigger":this.close.bind(this),"toggle.zf.trigger":this.toggle.bind(this),"resizeme.zf.trigger":this._setPosition.bind(this)}),this.$anchors.off("click.zf.trigger").on("click.zf.trigger",function(){t._setCurrentAnchor(this)}),this.options.hover&&(this.$anchors.off("mouseenter.zf.dropdown mouseleave.zf.dropdown").on("mouseenter.zf.dropdown",function(){t._setCurrentAnchor(this);var e=u()("body").data();void 0!==e.whatinput&&"mouse"!==e.whatinput||(clearTimeout(t.timeout),t.timeout=setTimeout(function(){t.open(),t.$anchors.data("hover",!0)},t.options.hoverDelay))}).on("mouseleave.zf.dropdown",Object(h.ignoreMousedisappear)(function(){clearTimeout(t.timeout),t.timeout=setTimeout(function(){t.close(),t.$anchors.data("hover",!1)},t.options.hoverDelay)})),this.options.hoverPane&&this.$element.off("mouseenter.zf.dropdown mouseleave.zf.dropdown").on("mouseenter.zf.dropdown",function(){clearTimeout(t.timeout)}).on("mouseleave.zf.dropdown",Object(h.ignoreMousedisappear)(function(){clearTimeout(t.timeout),t.timeout=setTimeout(function(){t.close(),t.$anchors.data("hover",!1)},t.options.hoverDelay)}))),this.$anchors.add(this.$element).on("keydown.zf.dropdown",function(e){var i=u()(this);d.Keyboard.findFocusable(t.$element),d.Keyboard.handleKey(e,"Dropdown",{open:function(){i.is(t.$anchors)&&!i.is("input, textarea")&&(t.open(),t.$element.attr("tabindex",-1).focus(),e.preventDefault())},close:function(){t.close(),t.$anchors.focus()}})})}},{key:"_addBodyHandler",value:function(){var t=u()(document.body).not(this.$element),e=this;t.off("click.zf.dropdown").on("click.zf.dropdown",function(i){e.$anchors.is(i.target)||e.$anchors.find(i.target).length||e.$element.is(i.target)||e.$element.find(i.target).length||(e.close(),t.off("click.zf.dropdown"))})}},{key:"open",value:function(){if(this.$element.trigger("closeme.zf.dropdown",this.$element.attr("id")),this.$anchors.addClass("hover").attr({"aria-expanded":!0}),this.$element.addClass("is-opening"),this._setPosition(),this.$element.removeClass("is-opening").addClass("is-open").attr({"aria-hidden":!1}),this.options.autoFocus){var t=d.Keyboard.findFocusable(this.$element);t.length&&t.eq(0).focus()}this.options.closeOnClick&&this._addBodyHandler(),this.options.trapFocus&&d.Keyboard.trapFocus(this.$element),this.$element.trigger("show.zf.dropdown",[this.$element])}},{key:"close",value:function(){return!!this.$element.hasClass("is-open")&&(this.$element.removeClass("is-open").attr({"aria-hidden":!0}),this.$anchors.removeClass("hover").attr("aria-expanded",!1),this.$element.trigger("hide.zf.dropdown",[this.$element]),this.options.trapFocus&&d.Keyboard.releaseFocus(this.$element),void 0)}},{key:"toggle",value:function(){if(this.$element.hasClass("is-open")){if(this.$anchors.data("hover"))return;this.close()}else this.open()}},{key:"_destroy",value:function(){this.$element.off(".zf.trigger").hide(),this.$anchors.off(".zf.dropdown"),u()(document.body).off("click.zf.dropdown")}}])&&r(i.prototype,n),c&&r(i,c),e}();g.defaults={parentClass:null,hoverDelay:250,hover:!1,hoverPane:!1,vOffset:0,hOffset:0,position:"auto",alignment:"auto",allowOverlap:!1,allowBottomOverlap:!0,trapFocus:!1,autoFocus:!1,closeOnClick:!1}},"./js/foundation.dropdownMenu.js":function(t,e,i){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function o(t,e){return!e||"object"!==n(e)&&"function"!=typeof e?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t):e}function s(t){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t);
})(t)}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}i.r(e),i.d(e,"DropdownMenu",function(){return g});var l=i("jquery"),c=i.n(l),u=i("./js/foundation.core.plugin.js"),d=i("./js/foundation.core.utils.js"),h=i("./js/foundation.util.keyboard.js"),f=i("./js/foundation.util.nest.js"),p=i("./js/foundation.util.box.js"),g=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),o(this,s(e).apply(this,arguments))}var i,n,l;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&a(t,e)}(e,u.Plugin),i=e,(n=[{key:"_setup",value:function(t,i){this.$element=t,this.options=c.a.extend({},e.defaults,this.$element.data(),i),this.className="DropdownMenu",this._init(),h.Keyboard.register("DropdownMenu",{ENTER:"open",SPACE:"open",ARROW_RIGHT:"next",ARROW_UP:"up",ARROW_DOWN:"down",ARROW_LEFT:"previous",ESCAPE:"close"})}},{key:"_init",value:function(){f.Nest.Feather(this.$element,"dropdown");var t=this.$element.find("li.is-dropdown-submenu-parent");this.$element.children(".is-dropdown-submenu-parent").children(".is-dropdown-submenu").addClass("first-sub"),this.$menuItems=this.$element.find('[role="menuitem"]'),this.$tabs=this.$element.children('[role="menuitem"]'),this.$tabs.find("ul.is-dropdown-submenu").addClass(this.options.verticalClass),"auto"===this.options.alignment?this.$element.hasClass(this.options.rightClass)||Object(d.rtl)()||this.$element.parents(".top-bar-right").is("*")?(this.options.alignment="right",t.addClass("opens-left")):(this.options.alignment="left",t.addClass("opens-right")):"right"===this.options.alignment?t.addClass("opens-left"):t.addClass("opens-right"),this.changed=!1,this._events()}},{key:"_isVertical",value:function(){return"block"===this.$tabs.css("display")||"column"===this.$element.css("flex-direction")}},{key:"_isRtl",value:function(){return this.$element.hasClass("align-right")||Object(d.rtl)()&&!this.$element.hasClass("align-left")}},{key:"_events",value:function(){var t=this,e="ontouchstart"in window||void 0!==window.ontouchstart,i="is-dropdown-submenu-parent";(this.options.clickOpen||e)&&this.$menuItems.on("click.zf.dropdownmenu touchstart.zf.dropdownmenu",function(n){var r=c()(n.target).parentsUntil("ul",".".concat(i)),o=r.hasClass(i),s="true"===r.attr("data-is-click"),a=r.children(".is-dropdown-submenu");if(o)if(s){if(!t.options.closeOnClick||!t.options.clickOpen&&!e||t.options.forceFollow&&e)return;n.stopImmediatePropagation(),n.preventDefault(),t._hide(r)}else n.preventDefault(),n.stopImmediatePropagation(),t._show(a),r.add(r.parentsUntil(t.$element,".".concat(i))).attr("data-is-click",!0)}),t.options.closeOnClickInside&&this.$menuItems.on("click.zf.dropdownmenu",function(e){c()(this).hasClass(i)||t._hide()}),this.options.disableHover||this.$menuItems.on("mouseenter.zf.dropdownmenu",function(e){var n=c()(this);n.hasClass(i)&&(clearTimeout(n.data("_delay")),n.data("_delay",setTimeout(function(){t._show(n.children(".is-dropdown-submenu"))},t.options.hoverDelay)))}).on("mouseleave.zf.dropdownMenu",Object(d.ignoreMousedisappear)(function(e){var n=c()(this);if(n.hasClass(i)&&t.options.autoclose){if("true"===n.attr("data-is-click")&&t.options.clickOpen)return!1;clearTimeout(n.data("_delay")),n.data("_delay",setTimeout(function(){t._hide(n)},t.options.closingTime))}})),this.$menuItems.on("keydown.zf.dropdownmenu",function(e){var i,n,r=c()(e.target).parentsUntil("ul",'[role="menuitem"]'),o=-1<t.$tabs.index(r),s=o?t.$tabs:r.siblings("li").add(r);s.each(function(t){if(c()(this).is(r))return i=s.eq(t-1),void(n=s.eq(t+1))});var a=function(){n.children("a:first").focus(),e.preventDefault()},l=function(){i.children("a:first").focus(),e.preventDefault()},u=function(){var i=r.children("ul.is-dropdown-submenu");i.length&&(t._show(i),r.find("li > a:first").focus(),e.preventDefault())},d=function(){var i=r.parent("ul").parent("li");i.children("a:first").focus(),t._hide(i),e.preventDefault()},f={open:u,close:function(){t._hide(t.$element),t.$menuItems.eq(0).children("a").focus(),e.preventDefault()},handled:function(){e.stopImmediatePropagation()}};o?t._isVertical()?t._isRtl()?c.a.extend(f,{down:a,up:l,next:d,previous:u}):c.a.extend(f,{down:a,up:l,next:u,previous:d}):t._isRtl()?c.a.extend(f,{next:l,previous:a,down:u,up:d}):c.a.extend(f,{next:a,previous:l,down:u,up:d}):t._isRtl()?c.a.extend(f,{next:d,previous:u,down:a,up:l}):c.a.extend(f,{next:u,previous:d,down:a,up:l}),h.Keyboard.handleKey(e,"DropdownMenu",f)})}},{key:"_addBodyHandler",value:function(){var t=c()(document.body),e=this;t.off("mouseup.zf.dropdownmenu touchend.zf.dropdownmenu").on("mouseup.zf.dropdownmenu touchend.zf.dropdownmenu",function(i){e.$element.find(i.target).length||(e._hide(),t.off("mouseup.zf.dropdownmenu touchend.zf.dropdownmenu"))})}},{key:"_show",value:function(t){var e=this.$tabs.index(this.$tabs.filter(function(e,i){return 0<c()(i).find(t).length})),i=t.parent("li.is-dropdown-submenu-parent").siblings("li.is-dropdown-submenu-parent");this._hide(i,e),t.css("visibility","hidden").addClass("js-dropdown-active").parent("li.is-dropdown-submenu-parent").addClass("is-active");var n=p.Box.ImNotTouchingYou(t,null,!0);if(!n){var r="left"===this.options.alignment?"-right":"-left",o=t.parent(".is-dropdown-submenu-parent");o.removeClass("opens".concat(r)).addClass("opens-".concat(this.options.alignment)),(n=p.Box.ImNotTouchingYou(t,null,!0))||o.removeClass("opens-".concat(this.options.alignment)).addClass("opens-inner"),this.changed=!0}t.css("visibility",""),this.options.closeOnClick&&this._addBodyHandler(),this.$element.trigger("show.zf.dropdownmenu",[t])}},{key:"_hide",value:function(t,e){var i;if((i=t&&t.length?t:void 0!==e?this.$tabs.not(function(t,i){return t===e}):this.$element).hasClass("is-active")||0<i.find(".is-active").length){if(i.find("li.is-active").add(i).attr({"data-is-click":!1}).removeClass("is-active"),i.find("ul.js-dropdown-active").removeClass("js-dropdown-active"),this.changed||i.find("opens-inner").length){var n="left"===this.options.alignment?"right":"left";i.find("li.is-dropdown-submenu-parent").add(i).removeClass("opens-inner opens-".concat(this.options.alignment)).addClass("opens-".concat(n)),this.changed=!1}this.$element.trigger("hide.zf.dropdownmenu",[i])}}},{key:"_destroy",value:function(){this.$menuItems.off(".zf.dropdownmenu").removeAttr("data-is-click").removeClass("is-right-arrow is-left-arrow is-down-arrow opens-right opens-left opens-inner"),c()(document.body).off(".zf.dropdownmenu"),f.Nest.Burn(this.$element,"dropdown")}}])&&r(i.prototype,n),l&&r(i,l),e}();g.defaults={disableHover:!1,autoclose:!0,hoverDelay:50,clickOpen:!1,closingTime:500,alignment:"auto",closeOnClick:!0,closeOnClickInside:!0,verticalClass:"vertical",rightClass:"align-right",forceFollow:!0}},"./js/foundation.equalizer.js":function(t,e,i){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function o(t,e){return!e||"object"!==n(e)&&"function"!=typeof e?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t):e}function s(t){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}i.r(e),i.d(e,"Equalizer",function(){return p});var l=i("jquery"),c=i.n(l),u=i("./js/foundation.util.mediaQuery.js"),d=i("./js/foundation.util.imageLoader.js"),h=i("./js/foundation.core.utils.js"),f=i("./js/foundation.core.plugin.js"),p=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),o(this,s(e).apply(this,arguments))}var i,n,l;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&a(t,e)}(e,f.Plugin),i=e,(n=[{key:"_setup",value:function(t,i){this.$element=t,this.options=c.a.extend({},e.defaults,this.$element.data(),i),this.className="Equalizer",this._init()}},{key:"_init",value:function(){var t=this.$element.attr("data-equalizer")||"",e=this.$element.find('[data-equalizer-watch="'.concat(t,'"]'));u.MediaQuery._init(),this.$watched=e.length?e:this.$element.find("[data-equalizer-watch]"),this.$element.attr("data-resize",t||Object(h.GetYoDigits)(6,"eq")),this.$element.attr("data-mutate",t||Object(h.GetYoDigits)(6,"eq")),this.hasNested=0<this.$element.find("[data-equalizer]").length,this.isNested=0<this.$element.parentsUntil(document.body,"[data-equalizer]").length,this.isOn=!1,this._bindHandler={onResizeMeBound:this._onResizeMe.bind(this),onPostEqualizedBound:this._onPostEqualized.bind(this)};var i,n=this.$element.find("img");this.options.equalizeOn?(i=this._checkMQ(),c()(window).on("changed.zf.mediaquery",this._checkMQ.bind(this))):this._events(),(void 0!==i&&!1===i||void 0===i)&&(n.length?Object(d.onImagesLoaded)(n,this._reflow.bind(this)):this._reflow())}},{key:"_pauseEvents",value:function(){this.isOn=!1,this.$element.off({".zf.equalizer":this._bindHandler.onPostEqualizedBound,"resizeme.zf.trigger":this._bindHandler.onResizeMeBound,"mutateme.zf.trigger":this._bindHandler.onResizeMeBound})}},{key:"_onResizeMe",value:function(t){this._reflow()}},{key:"_onPostEqualized",value:function(t){t.target!==this.$element[0]&&this._reflow()}},{key:"_events",value:function(){this._pauseEvents(),this.hasNested?this.$element.on("postequalized.zf.equalizer",this._bindHandler.onPostEqualizedBound):(this.$element.on("resizeme.zf.trigger",this._bindHandler.onResizeMeBound),this.$element.on("mutateme.zf.trigger",this._bindHandler.onResizeMeBound)),this.isOn=!0}},{key:"_checkMQ",value:function(){var t=!u.MediaQuery.is(this.options.equalizeOn);return t?this.isOn&&(this._pauseEvents(),this.$watched.css("height","auto")):this.isOn||this._events(),t}},{key:"_killswitch",value:function(){}},{key:"_reflow",value:function(){return!this.options.equalizeOnStack&&this._isStacked()?(this.$watched.css("height","auto"),!1):void(this.options.equalizeByRow?this.getHeightsByRow(this.applyHeightByRow.bind(this)):this.getHeights(this.applyHeight.bind(this)))}},{key:"_isStacked",value:function(){return!this.$watched[0]||!this.$watched[1]||this.$watched[0].getBoundingClientRect().top!==this.$watched[1].getBoundingClientRect().top}},{key:"getHeights",value:function(t){for(var e=[],i=0,n=this.$watched.length;i<n;i++)this.$watched[i].style.height="auto",e.push(this.$watched[i].offsetHeight);t(e)}},{key:"getHeightsByRow",value:function(t){var e=this.$watched.length?this.$watched.first().offset().top:0,i=[],n=0;i[n]=[];for(var r=0,o=this.$watched.length;r<o;r++){this.$watched[r].style.height="auto";var s=c()(this.$watched[r]).offset().top;s!=e&&(i[++n]=[],e=s),i[n].push([this.$watched[r],this.$watched[r].offsetHeight])}for(var a=0,l=i.length;a<l;a++){var u=c()(i[a]).map(function(){return this[1]}).get(),d=Math.max.apply(null,u);i[a].push(d)}t(i)}},{key:"applyHeight",value:function(t){var e=Math.max.apply(null,t);this.$element.trigger("preequalized.zf.equalizer"),this.$watched.css("height",e),this.$element.trigger("postequalized.zf.equalizer")}},{key:"applyHeightByRow",value:function(t){this.$element.trigger("preequalized.zf.equalizer");for(var e=0,i=t.length;e<i;e++){var n=t[e].length,r=t[e][n-1];if(n<=2)c()(t[e][0][0]).css({height:"auto"});else{this.$element.trigger("preequalizedrow.zf.equalizer");for(var o=0,s=n-1;o<s;o++)c()(t[e][o][0]).css({height:r});this.$element.trigger("postequalizedrow.zf.equalizer")}}this.$element.trigger("postequalized.zf.equalizer")}},{key:"_destroy",value:function(){this._pauseEvents(),this.$watched.css("height","auto")}}])&&r(i.prototype,n),l&&r(i,l),e}();p.defaults={equalizeOnStack:!1,equalizeByRow:!1,equalizeOn:""}},"./js/foundation.interchange.js":function(t,e,i){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function o(t,e){return!e||"object"!==n(e)&&"function"!=typeof e?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t):e}function s(t){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}i.r(e),i.d(e,"Interchange",function(){return f});var l=i("jquery"),c=i.n(l),u=i("./js/foundation.util.mediaQuery.js"),d=i("./js/foundation.core.plugin.js"),h=i("./js/foundation.core.utils.js"),f=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),o(this,s(e).apply(this,arguments))}var i,n,l;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&a(t,e)}(e,d.Plugin),i=e,(n=[{key:"_setup",value:function(t,i){this.$element=t,this.options=c.a.extend({},e.defaults,i),this.rules=[],this.currentPath="",this.className="Interchange",this._init(),this._events()}},{key:"_init",value:function(){u.MediaQuery._init();var t=this.$element[0].id||Object(h.GetYoDigits)(6,"interchange");this.$element.attr({"data-resize":t,id:t}),this._addBreakpoints(),this._generateRules(),this._reflow()}},{key:"_events",value:function(){var t=this;this.$element.off("resizeme.zf.trigger").on("resizeme.zf.trigger",function(){return t._reflow()})}},{key:"_reflow",value:function(){var t;for(var e in this.rules)if(this.rules.hasOwnProperty(e)){var i=this.rules[e];window.matchMedia(i.query).matches&&(t=i)}t&&this.replace(t.path)}},{key:"_addBreakpoints",value:function(){for(var t in u.MediaQuery.queries)if(u.MediaQuery.queries.hasOwnProperty(t)){var i=u.MediaQuery.queries[t];e.SPECIAL_QUERIES[i.name]=i.value}}},{key:"_generateRules",value:function(t){var i,n=[];for(var r in i="string"==typeof(i=this.options.rules?this.options.rules:this.$element.data("interchange"))?i.match(/\[.*?, .*?\]/g):i)if(i.hasOwnProperty(r)){var o=i[r].slice(1,-1).split(", "),s=o.slice(0,-1).join(""),a=o[o.length-1];e.SPECIAL_QUERIES[a]&&(a=e.SPECIAL_QUERIES[a]),n.push({path:s,query:a})}this.rules=n}},{key:"replace",value:function(t){if(this.currentPath!==t){var e=this,i="replaced.zf.interchange";"IMG"===this.$element[0].nodeName?this.$element.attr("src",t).on("load",function(){e.currentPath=t}).trigger(i):t.match(/\.(gif|jpg|jpeg|png|svg|tiff)([?#].*)?/i)?(t=t.replace(/\(/g,"%28").replace(/\)/g,"%29"),this.$element.css({"background-image":"url("+t+")"}).trigger(i)):c.a.get(t,function(n){e.$element.html(n).trigger(i),c()(n).foundation(),e.currentPath=t})}}},{key:"_destroy",value:function(){this.$element.off("resizeme.zf.trigger")}}])&&r(i.prototype,n),l&&r(i,l),e}();f.defaults={rules:null},f.SPECIAL_QUERIES={landscape:"screen and (orientation: landscape)",portrait:"screen and (orientation: portrait)",retina:"only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min--moz-device-pixel-ratio: 2), only screen and (-o-min-device-pixel-ratio: 2/1), only screen and (min-device-pixel-ratio: 2), only screen and (min-resolution: 192dpi), only screen and (min-resolution: 2dppx)"}},"./js/foundation.magellan.js":function(t,e,i){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function o(t,e){return!e||"object"!==n(e)&&"function"!=typeof e?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t):e}function s(t){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}i.r(e),i.d(e,"Magellan",function(){return f});var l=i("jquery"),c=i.n(l),u=i("./js/foundation.core.utils.js"),d=i("./js/foundation.core.plugin.js"),h=i("./js/foundation.smoothScroll.js"),f=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),o(this,s(e).apply(this,arguments))}var i,n,l;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&a(t,e)}(e,d.Plugin),i=e,(n=[{key:"_setup",value:function(t,i){this.$element=t,this.options=c.a.extend({},e.defaults,this.$element.data(),i),this.className="Magellan",this._init(),this.calcPoints()}},{key:"_init",value:function(){var t=this.$element[0].id||Object(u.GetYoDigits)(6,"magellan");this.$targets=c()("[data-magellan-target]"),this.$links=this.$element.find("a"),this.$element.attr({"data-resize":t,"data-scroll":t,id:t}),this.$active=c()(),this.scrollPos=parseInt(window.pageYOffset,10),this._events()}},{key:"calcPoints",value:function(){var t=this,e=document.body,i=document.documentElement;this.points=[],this.winHeight=Math.round(Math.max(window.innerHeight,i.clientHeight)),this.docHeight=Math.round(Math.max(e.scrollHeight,e.offsetHeight,i.clientHeight,i.scrollHeight,i.offsetHeight)),this.$targets.each(function(){var e=c()(this),i=Math.round(e.offset().top-t.options.threshold);e.targetPoint=i,t.points.push(i)})}},{key:"_events",value:function(){var t=this;c()("html, body"),t.options.animationDuration,t.options.animationEasing,c()(window).one("load",function(){t.options.deepLinking&&location.hash&&t.scrollToLoc(location.hash),t.calcPoints(),t._updateActive()}),t.onLoadListener=Object(u.onLoad)(c()(window),function(){t.$element.on({"resizeme.zf.trigger":t.reflow.bind(t),"scrollme.zf.trigger":t._updateActive.bind(t)}).on("click.zf.magellan",'a[href^="#"]',function(e){e.preventDefault();var i=this.getAttribute("href");t.scrollToLoc(i)})}),this._deepLinkScroll=function(e){t.options.deepLinking&&t.scrollToLoc(window.location.hash)},c()(window).on("hashchange",this._deepLinkScroll)}},{key:"scrollToLoc",value:function(t){this._inTransition=!0;var e=this,i={animationEasing:this.options.animationEasing,animationDuration:this.options.animationDuration,threshold:this.options.threshold,offset:this.options.offset};h.SmoothScroll.scrollToLoc(t,i,function(){e._inTransition=!1})}},{key:"reflow",value:function(){this.calcPoints(),this._updateActive()}},{key:"_updateActive",value:function(){var t=this;if(!this._inTransition){var e,i=parseInt(window.pageYOffset,10),n=this.scrollPos>i;if((this.scrollPos=i)<this.points[0]);else if(i+this.winHeight===this.docHeight)e=this.points.length-1;else{var r=this.points.filter(function(e,r){return e-t.options.offset-(n?t.options.threshold:0)<=i});e=r.length?r.length-1:0}var o=this.$active,s="";void 0!==e?(this.$active=this.$links.filter('[href="#'+this.$targets.eq(e).data("magellan-target")+'"]'),this.$active.length&&(s=this.$active[0].getAttribute("href"))):this.$active=c()();var a=!(!this.$active.length&&!o.length||this.$active.is(o)),l=s!==window.location.hash;if(a&&(o.removeClass(this.options.activeClass),this.$active.addClass(this.options.activeClass)),this.options.deepLinking&&l)if(window.history.pushState){var u=s||window.location.pathname+window.location.search;window.history.pushState(null,null,u)}else window.location.hash=s;a&&this.$element.trigger("update.zf.magellan",[this.$active])}}},{key:"_destroy",value:function(){if(this.$element.off(".zf.trigger .zf.magellan").find(".".concat(this.options.activeClass)).removeClass(this.options.activeClass),this.options.deepLinking){var t=this.$active[0].getAttribute("href");window.location.hash.replace(t,"")}c()(window).off("hashchange",this._deepLinkScroll),this.onLoadListener&&c()(window).off(this.onLoadListener)}}])&&r(i.prototype,n),l&&r(i,l),e}();f.defaults={animationDuration:500,animationEasing:"linear",threshold:50,activeClass:"is-active",deepLinking:!1,offset:0}},"./js/foundation.offcanvas.js":function(t,e,i){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function o(t,e){return!e||"object"!==n(e)&&"function"!=typeof e?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t):e}function s(t){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}i.r(e),i.d(e,"OffCanvas",function(){return g});var l=i("jquery"),c=i.n(l),u=i("./js/foundation.core.utils.js"),d=i("./js/foundation.util.keyboard.js"),h=i("./js/foundation.util.mediaQuery.js"),f=i("./js/foundation.core.plugin.js"),p=i("./js/foundation.util.triggers.js"),g=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),o(this,s(e).apply(this,arguments))}var i,n,l;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&a(t,e)}(e,f.Plugin),i=e,(n=[{key:"_setup",value:function(t,i){var n=this;this.className="OffCanvas",this.$element=t,this.options=c.a.extend({},e.defaults,this.$element.data(),i),this.contentClasses={base:[],reveal:[]},this.$lastTrigger=c()(),this.$triggers=c()(),this.position="left",this.$content=c()(),this.nested=!!this.options.nested,c()(["push","overlap"]).each(function(t,e){n.contentClasses.base.push("has-transition-"+e)}),c()(["left","right","top","bottom"]).each(function(t,e){n.contentClasses.base.push("has-position-"+e),n.contentClasses.reveal.push("has-reveal-"+e)}),p.Triggers.init(c.a),h.MediaQuery._init(),this._init(),this._events(),d.Keyboard.register("OffCanvas",{ESCAPE:"close"})}},{key:"_init",value:function(){var t=this.$element.attr("id");if(this.$element.attr("aria-hidden","true"),this.options.contentId?this.$content=c()("#"+this.options.contentId):this.$element.siblings("[data-off-canvas-content]").length?this.$content=this.$element.siblings("[data-off-canvas-content]").first():this.$content=this.$element.closest("[data-off-canvas-content]").first(),this.options.contentId?this.options.contentId&&null===this.options.nested&&console.warn("Remember to use the nested option if using the content ID option!"):this.nested=0===this.$element.siblings("[data-off-canvas-content]").length,!0===this.nested&&(this.options.transition="overlap",this.$element.removeClass("is-transition-push")),this.$element.addClass("is-transition-".concat(this.options.transition," is-closed")),this.$triggers=c()(document).find('[data-open="'+t+'"], [data-close="'+t+'"], [data-toggle="'+t+'"]').attr("aria-expanded","false").attr("aria-controls",t),this.position=this.$element.is(".position-left, .position-top, .position-right, .position-bottom")?this.$element.attr("class").match(/position\-(left|top|right|bottom)/)[1]:this.position,!0===this.options.contentOverlay){var e=document.createElement("div"),i="fixed"===c()(this.$element).css("position")?"is-overlay-fixed":"is-overlay-absolute";e.setAttribute("class","js-off-canvas-overlay "+i),this.$overlay=c()(e),"is-overlay-fixed"===i?c()(this.$overlay).insertAfter(this.$element):this.$content.append(this.$overlay)}var n=new RegExp(Object(u.RegExpEscape)(this.options.revealClass)+"([^\\s]+)","g").exec(this.$element[0].className);n&&(this.options.isRevealed=!0,this.options.revealOn=this.options.revealOn||n[1]),!0===this.options.isRevealed&&this.options.revealOn&&(this.$element.first().addClass("".concat(this.options.revealClass).concat(this.options.revealOn)),this._setMQChecker()),this.options.transitionTime&&this.$element.css("transition-duration",this.options.transitionTime),this._removeContentClasses()}},{key:"_events",value:function(){this.$element.off(".zf.trigger .zf.offcanvas").on({"open.zf.trigger":this.open.bind(this),"close.zf.trigger":this.close.bind(this),"toggle.zf.trigger":this.toggle.bind(this),"keydown.zf.offcanvas":this._handleKeyboard.bind(this)}),!0===this.options.closeOnClick&&(this.options.contentOverlay?this.$overlay:this.$content).on({"click.zf.offcanvas":this.close.bind(this)})}},{key:"_setMQChecker",value:function(){var t=this;this.onLoadListener=Object(u.onLoad)(c()(window),function(){h.MediaQuery.atLeast(t.options.revealOn)&&t.reveal(!0)}),c()(window).on("changed.zf.mediaquery",function(){h.MediaQuery.atLeast(t.options.revealOn)?t.reveal(!0):t.reveal(!1)})}},{key:"_removeContentClasses",value:function(t){"boolean"!=typeof t?this.$content.removeClass(this.contentClasses.base.join(" ")):!1===t&&this.$content.removeClass("has-reveal-".concat(this.position))}},{key:"_addContentClasses",value:function(t){this._removeContentClasses(t),"boolean"!=typeof t?this.$content.addClass("has-transition-".concat(this.options.transition," has-position-").concat(this.position)):!0===t&&this.$content.addClass("has-reveal-".concat(this.position))}},{key:"reveal",value:function(t){t?(this.close(),this.isRevealed=!0,this.$element.attr("aria-hidden","false"),this.$element.off("open.zf.trigger toggle.zf.trigger"),this.$element.removeClass("is-closed")):(this.isRevealed=!1,this.$element.attr("aria-hidden","true"),this.$element.off("open.zf.trigger toggle.zf.trigger").on({"open.zf.trigger":this.open.bind(this),"toggle.zf.trigger":this.toggle.bind(this)}),this.$element.addClass("is-closed")),this._addContentClasses(t)}},{key:"_stopScrolling",value:function(t){return!1}},{key:"_recordScrollable",value:function(t){var e=this;e.scrollHeight!==e.clientHeight&&(0===e.scrollTop&&(e.scrollTop=1),e.scrollTop===e.scrollHeight-e.clientHeight&&(e.scrollTop=e.scrollHeight-e.clientHeight-1)),e.allowUp=0<e.scrollTop,e.allowDown=e.scrollTop<e.scrollHeight-e.clientHeight,e.lastY=t.originalEvent.pageY}},{key:"_stopScrollPropagation",value:function(t){var e=t.pageY<this.lastY,i=!e;this.lastY=t.pageY,e&&this.allowUp||i&&this.allowDown?t.stopPropagation():t.preventDefault()}},{key:"open",value:function(t,e){if(!this.$element.hasClass("is-open")&&!this.isRevealed){var i=this;e&&(this.$lastTrigger=e),"top"===this.options.forceTo?window.scrollTo(0,0):"bottom"===this.options.forceTo&&window.scrollTo(0,document.body.scrollHeight),this.options.transitionTime&&"overlap"!==this.options.transition?this.$element.siblings("[data-off-canvas-content]").css("transition-duration",this.options.transitionTime):this.$element.siblings("[data-off-canvas-content]").css("transition-duration",""),this.$element.addClass("is-open").removeClass("is-closed"),this.$triggers.attr("aria-expanded","true"),this.$element.attr("aria-hidden","false"),this.$content.addClass("is-open-"+this.position),!1===this.options.contentScroll&&(c()("body").addClass("is-off-canvas-open").on("touchmove",this._stopScrolling),this.$element.on("touchstart",this._recordScrollable),this.$element.on("touchmove",this._stopScrollPropagation)),!0===this.options.contentOverlay&&this.$overlay.addClass("is-visible"),!0===this.options.closeOnClick&&!0===this.options.contentOverlay&&this.$overlay.addClass("is-closable"),!0===this.options.autoFocus&&this.$element.one(Object(u.transitionend)(this.$element),function(){if(i.$element.hasClass("is-open")){var t=i.$element.find("[data-autofocus]");t.length?t.eq(0).focus():i.$element.find("a, button").eq(0).focus()}}),!0===this.options.trapFocus&&(this.$content.attr("tabindex","-1"),d.Keyboard.trapFocus(this.$element)),this._addContentClasses(),this.$element.trigger("opened.zf.offcanvas")}}},{key:"close",value:function(t){if(this.$element.hasClass("is-open")&&!this.isRevealed){var e=this;this.$element.removeClass("is-open"),this.$element.attr("aria-hidden","true").trigger("closed.zf.offcanvas"),this.$content.removeClass("is-open-left is-open-top is-open-right is-open-bottom"),!1===this.options.contentScroll&&(c()("body").removeClass("is-off-canvas-open").off("touchmove",this._stopScrolling),this.$element.off("touchstart",this._recordScrollable),this.$element.off("touchmove",this._stopScrollPropagation)),!0===this.options.contentOverlay&&this.$overlay.removeClass("is-visible"),!0===this.options.closeOnClick&&!0===this.options.contentOverlay&&this.$overlay.removeClass("is-closable"),this.$triggers.attr("aria-expanded","false"),!0===this.options.trapFocus&&(this.$content.removeAttr("tabindex"),d.Keyboard.releaseFocus(this.$element)),this.$element.one(Object(u.transitionend)(this.$element),function(t){e.$element.addClass("is-closed"),e._removeContentClasses()})}}},{key:"toggle",value:function(t,e){this.$element.hasClass("is-open")?this.close(t,e):this.open(t,e)}},{key:"_handleKeyboard",value:function(t){var e=this;d.Keyboard.handleKey(t,"OffCanvas",{close:function(){return e.close(),e.$lastTrigger.focus(),!0},handled:function(){t.stopPropagation(),t.preventDefault()}})}},{key:"_destroy",value:function(){this.close(),this.$element.off(".zf.trigger .zf.offcanvas"),this.$overlay.off(".zf.offcanvas"),this.onLoadListener&&c()(window).off(this.onLoadListener)}}])&&r(i.prototype,n),l&&r(i,l),e}();g.defaults={closeOnClick:!0,contentOverlay:!0,contentId:null,nested:null,contentScroll:!0,transitionTime:null,transition:"push",forceTo:null,isRevealed:!1,revealOn:null,autoFocus:!0,revealClass:"reveal-for-",trapFocus:!1}},"./js/foundation.orbit.js":function(t,e,i){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function o(t,e){return!e||"object"!==n(e)&&"function"!=typeof e?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t):e}function s(t){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}i.r(e),i.d(e,"Orbit",function(){return v});var l=i("jquery"),c=i.n(l),u=i("./js/foundation.util.keyboard.js"),d=i("./js/foundation.util.motion.js"),h=i("./js/foundation.util.timer.js"),f=i("./js/foundation.util.imageLoader.js"),p=i("./js/foundation.core.utils.js"),g=i("./js/foundation.core.plugin.js"),m=i("./js/foundation.util.touch.js"),v=function(t){
function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),o(this,s(e).apply(this,arguments))}var i,n,l;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&a(t,e)}(e,g.Plugin),i=e,(n=[{key:"_setup",value:function(t,i){this.$element=t,this.options=c.a.extend({},e.defaults,this.$element.data(),i),this.className="Orbit",m.Touch.init(c.a),this._init(),u.Keyboard.register("Orbit",{ltr:{ARROW_RIGHT:"next",ARROW_LEFT:"previous"},rtl:{ARROW_LEFT:"next",ARROW_RIGHT:"previous"}})}},{key:"_init",value:function(){this._reset(),this.$wrapper=this.$element.find(".".concat(this.options.containerClass)),this.$slides=this.$element.find(".".concat(this.options.slideClass));var t=this.$element.find("img"),e=this.$slides.filter(".is-active"),i=this.$element[0].id||Object(p.GetYoDigits)(6,"orbit");this.$element.attr({"data-resize":i,id:i}),e.length||this.$slides.eq(0).addClass("is-active"),this.options.useMUI||this.$slides.addClass("no-motionui"),t.length?Object(f.onImagesLoaded)(t,this._prepareForOrbit.bind(this)):this._prepareForOrbit(),this.options.bullets&&this._loadBullets(),this._events(),this.options.autoPlay&&1<this.$slides.length&&this.geoSync(),this.options.accessible&&this.$wrapper.attr("tabindex",0)}},{key:"_loadBullets",value:function(){this.$bullets=this.$element.find(".".concat(this.options.boxOfBullets)).find("button")}},{key:"geoSync",value:function(){var t=this;this.timer=new h.Timer(this.$element,{duration:this.options.timerDelay,infinite:!1},function(){t.changeSlide(!0)}),this.timer.start()}},{key:"_prepareForOrbit",value:function(){this._setWrapperHeight()}},{key:"_setWrapperHeight",value:function(t){var e,i=0,n=0,r=this;this.$slides.each(function(){e=this.getBoundingClientRect().height,c()(this).attr("data-slide",n),/mui/g.test(c()(this)[0].className)||r.$slides.filter(".is-active")[0]===r.$slides.eq(n)[0]||c()(this).css({display:"none"}),i=i<e?e:i,n++}),n===this.$slides.length&&(this.$wrapper.css({height:i}),t&&t(i))}},{key:"_setSlideHeight",value:function(t){this.$slides.each(function(){c()(this).css("max-height",t)})}},{key:"_events",value:function(){var t=this;this.$element.off(".resizeme.zf.trigger").on({"resizeme.zf.trigger":this._prepareForOrbit.bind(this)}),1<this.$slides.length&&(this.options.swipe&&this.$slides.off("swipeleft.zf.orbit swiperight.zf.orbit").on("swipeleft.zf.orbit",function(e){e.preventDefault(),t.changeSlide(!0)}).on("swiperight.zf.orbit",function(e){e.preventDefault(),t.changeSlide(!1)}),this.options.autoPlay&&(this.$slides.on("click.zf.orbit",function(){t.$element.data("clickedOn",!t.$element.data("clickedOn")),t.timer[t.$element.data("clickedOn")?"pause":"start"]()}),this.options.pauseOnHover&&this.$element.on("mouseenter.zf.orbit",function(){t.timer.pause()}).on("mouseleave.zf.orbit",function(){t.$element.data("clickedOn")||t.timer.start()})),this.options.navButtons&&this.$element.find(".".concat(this.options.nextClass,", .").concat(this.options.prevClass)).attr("tabindex",0).on("click.zf.orbit touchend.zf.orbit",function(e){e.preventDefault(),t.changeSlide(c()(this).hasClass(t.options.nextClass))}),this.options.bullets&&this.$bullets.on("click.zf.orbit touchend.zf.orbit",function(){if(/is-active/g.test(this.className))return!1;var e=c()(this).data("slide"),i=e>t.$slides.filter(".is-active").data("slide"),n=t.$slides.eq(e);t.changeSlide(i,n,e)}),this.options.accessible&&this.$wrapper.add(this.$bullets).on("keydown.zf.orbit",function(e){u.Keyboard.handleKey(e,"Orbit",{next:function(){t.changeSlide(!0)},previous:function(){t.changeSlide(!1)},handled:function(){c()(e.target).is(t.$bullets)&&t.$bullets.filter(".is-active").focus()}})}))}},{key:"_reset",value:function(){void 0!==this.$slides&&1<this.$slides.length&&(this.$element.off(".zf.orbit").find("*").off(".zf.orbit"),this.options.autoPlay&&this.timer.restart(),this.$slides.each(function(t){c()(t).removeClass("is-active is-active is-in").removeAttr("aria-live").hide()}),this.$slides.first().addClass("is-active").show(),this.$element.trigger("slidechange.zf.orbit",[this.$slides.first()]),this.options.bullets&&this._updateBullets(0))}},{key:"changeSlide",value:function(t,e,i){if(this.$slides){var n=this.$slides.filter(".is-active").eq(0);if(/mui/g.test(n[0].className))return!1;var r,o=this.$slides.first(),s=this.$slides.last(),a=t?"Right":"Left",l=t?"Left":"Right",c=this;(r=e||(t?this.options.infiniteWrap?n.next(".".concat(this.options.slideClass)).length?n.next(".".concat(this.options.slideClass)):o:n.next(".".concat(this.options.slideClass)):this.options.infiniteWrap?n.prev(".".concat(this.options.slideClass)).length?n.prev(".".concat(this.options.slideClass)):s:n.prev(".".concat(this.options.slideClass)))).length&&(this.$element.trigger("beforeslidechange.zf.orbit",[n,r]),this.options.bullets&&(i=i||this.$slides.index(r),this._updateBullets(i)),this.options.useMUI&&!this.$element.is(":hidden")?(d.Motion.animateIn(r.addClass("is-active"),this.options["animInFrom".concat(a)],function(){r.css({display:"block"}).attr("aria-live","polite")}),d.Motion.animateOut(n.removeClass("is-active"),this.options["animOutTo".concat(l)],function(){n.removeAttr("aria-live"),c.options.autoPlay&&!c.timer.isPaused&&c.timer.restart()})):(n.removeClass("is-active is-in").removeAttr("aria-live").hide(),r.addClass("is-active is-in").attr("aria-live","polite").show(),this.options.autoPlay&&!this.timer.isPaused&&this.timer.restart()),this.$element.trigger("slidechange.zf.orbit",[r]))}}},{key:"_updateBullets",value:function(t){var e=this.$element.find(".".concat(this.options.boxOfBullets)).find(".is-active").removeClass("is-active").blur().find("span:last").detach();this.$bullets.eq(t).addClass("is-active").append(e)}},{key:"_destroy",value:function(){this.$element.off(".zf.orbit").find("*").off(".zf.orbit").end().hide()}}])&&r(i.prototype,n),l&&r(i,l),e}();v.defaults={bullets:!0,navButtons:!0,animInFromRight:"slide-in-right",animOutToRight:"slide-out-right",animInFromLeft:"slide-in-left",animOutToLeft:"slide-out-left",autoPlay:!0,timerDelay:5e3,infiniteWrap:!0,swipe:!0,pauseOnHover:!0,accessible:!0,containerClass:"orbit-container",slideClass:"orbit-slide",boxOfBullets:"orbit-bullets",nextClass:"orbit-next",prevClass:"orbit-previous",useMUI:!0}},"./js/foundation.positionable.js":function(t,e,i){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function o(t,e){return!e||"object"!==n(e)&&"function"!=typeof e?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t):e}function s(t){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function l(t,e){var i=e.indexOf(t);return i===e.length-1?e[0]:e[i+1]}i.r(e),i.d(e,"Positionable",function(){return m});var c=i("./js/foundation.util.box.js"),u=i("./js/foundation.core.plugin.js"),d=i("./js/foundation.core.utils.js"),h=["left","right","top","bottom"],f=["top","bottom","center"],p=["left","right","center"],g={left:f,right:f,top:p,bottom:p},m=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),o(this,s(e).apply(this,arguments))}var i,n,f;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&a(t,e)}(e,u.Plugin),i=e,(n=[{key:"_init",value:function(){this.triedPositions={},this.position="auto"===this.options.position?this._getDefaultPosition():this.options.position,this.alignment="auto"===this.options.alignment?this._getDefaultAlignment():this.options.alignment,this.originalPosition=this.position,this.originalAlignment=this.alignment}},{key:"_getDefaultPosition",value:function(){return"bottom"}},{key:"_getDefaultAlignment",value:function(){switch(this.position){case"bottom":case"top":return Object(d.rtl)()?"right":"left";case"left":case"right":return"bottom"}}},{key:"_reposition",value:function(){this._alignmentsExhausted(this.position)?(this.position=l(this.position,h),this.alignment=g[this.position][0]):this._realign()}},{key:"_realign",value:function(){this._addTriedPosition(this.position,this.alignment),this.alignment=l(this.alignment,g[this.position])}},{key:"_addTriedPosition",value:function(t,e){this.triedPositions[t]=this.triedPositions[t]||[],this.triedPositions[t].push(e)}},{key:"_positionsExhausted",value:function(){for(var t=!0,e=0;e<h.length;e++)t=t&&this._alignmentsExhausted(h[e]);return t}},{key:"_alignmentsExhausted",value:function(t){return this.triedPositions[t]&&this.triedPositions[t].length==g[t].length}},{key:"_getVOffset",value:function(){return this.options.vOffset}},{key:"_getHOffset",value:function(){return this.options.hOffset}},{key:"_setPosition",value:function(t,e,i){if("false"===t.attr("aria-expanded"))return!1;if(c.Box.GetDimensions(e),c.Box.GetDimensions(t),this.options.allowOverlap||(this.position=this.originalPosition,this.alignment=this.originalAlignment),e.offset(c.Box.GetExplicitOffsets(e,t,this.position,this.alignment,this._getVOffset(),this._getHOffset())),!this.options.allowOverlap){for(var n=1e8,r={position:this.position,alignment:this.alignment};!this._positionsExhausted();){var o=c.Box.OverlapArea(e,i,!1,!1,this.options.allowBottomOverlap);if(0===o)return;o<n&&(n=o,r={position:this.position,alignment:this.alignment}),this._reposition(),e.offset(c.Box.GetExplicitOffsets(e,t,this.position,this.alignment,this._getVOffset(),this._getHOffset()))}this.position=r.position,this.alignment=r.alignment,e.offset(c.Box.GetExplicitOffsets(e,t,this.position,this.alignment,this._getVOffset(),this._getHOffset()))}}}])&&r(i.prototype,n),f&&r(i,f),e}();m.defaults={position:"auto",alignment:"auto",allowOverlap:!1,allowBottomOverlap:!0,vOffset:0,hOffset:0}},"./js/foundation.responsiveAccordionTabs.js":function(t,e,i){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function o(t,e){return!e||"object"!==n(e)&&"function"!=typeof e?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t):e}function s(t){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}i.r(e),i.d(e,"ResponsiveAccordionTabs",function(){return g});var l=i("jquery"),c=i.n(l),u=i("./js/foundation.util.mediaQuery.js"),d=i("./js/foundation.core.utils.js"),h=i("./js/foundation.core.plugin.js"),f=i("./js/foundation.accordion.js"),p={tabs:{cssClass:"tabs",plugin:i("./js/foundation.tabs.js").Tabs},accordion:{cssClass:"accordion",plugin:f.Accordion}},g=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),o(this,s(e).apply(this,arguments))}var i,n,l;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&a(t,e)}(e,h.Plugin),i=e,(n=[{key:"_setup",value:function(t,e){this.$element=c()(t),this.options=c.a.extend({},this.$element.data(),e),this.rules=this.$element.data("responsive-accordion-tabs"),this.currentMq=null,this.currentPlugin=null,this.className="ResponsiveAccordionTabs",this.$element.attr("id")||this.$element.attr("id",Object(d.GetYoDigits)(6,"responsiveaccordiontabs")),this._init(),this._events()}},{key:"_init",value:function(){if(u.MediaQuery._init(),"string"==typeof this.rules){for(var t={},e=this.rules.split(" "),i=0;i<e.length;i++){var n=e[i].split("-"),r=1<n.length?n[0]:"small",o=1<n.length?n[1]:n[0];null!==p[o]&&(t[r]=p[o])}this.rules=t}this._getAllOptions(),c.a.isEmptyObject(this.rules)||this._checkMediaQueries()}},{key:"_getAllOptions",value:function(){for(var t in this.allOptions={},p)if(p.hasOwnProperty(t)){var e=p[t];try{var i=c()("<ul></ul>"),n=new e.plugin(i,this.options);for(var r in n.options)if(n.options.hasOwnProperty(r)&&"zfPlugin"!==r){var o=n.options[r];this.allOptions[r]=o}n.destroy()}catch(t){}}}},{key:"_events",value:function(){this._changedZfMediaQueryHandler=this._checkMediaQueries.bind(this),c()(window).on("changed.zf.mediaquery",this._changedZfMediaQueryHandler)}},{key:"_checkMediaQueries",value:function(){var t,e=this;c.a.each(this.rules,function(e){u.MediaQuery.atLeast(e)&&(t=e)}),t&&(this.currentPlugin instanceof this.rules[t].plugin||(c.a.each(p,function(t,i){e.$element.removeClass(i.cssClass)}),this.$element.addClass(this.rules[t].cssClass),this.currentPlugin&&(!this.currentPlugin.$element.data("zfPlugin")&&this.storezfData&&this.currentPlugin.$element.data("zfPlugin",this.storezfData),this.currentPlugin.destroy()),this._handleMarkup(this.rules[t].cssClass),this.currentPlugin=new this.rules[t].plugin(this.$element,{}),this.storezfData=this.currentPlugin.$element.data("zfPlugin")))}},{key:"_handleMarkup",value:function(t){var e=this,i="accordion",n=c()("[data-tabs-content="+this.$element.attr("id")+"]");if(n.length&&(i="tabs"),i!==t){var r=e.allOptions.linkClass?e.allOptions.linkClass:"tabs-title",o=e.allOptions.panelClass?e.allOptions.panelClass:"tabs-panel";this.$element.removeAttr("role");var s=this.$element.children("."+r+",[data-accordion-item]").removeClass(r).removeClass("accordion-item").removeAttr("data-accordion-item"),a=s.children("a").removeClass("accordion-title");if("tabs"===i?(n=n.children("."+o).removeClass(o).removeAttr("role").removeAttr("aria-hidden").removeAttr("aria-labelledby")).children("a").removeAttr("role").removeAttr("aria-controls").removeAttr("aria-selected"):n=s.children("[data-tab-content]").removeClass("accordion-content"),n.css({display:"",visibility:""}),s.css({display:"",visibility:""}),"accordion"===t)n.each(function(t,i){c()(i).appendTo(s.get(t)).addClass("accordion-content").attr("data-tab-content","").removeClass("is-active").css({height:""}),c()("[data-tabs-content="+e.$element.attr("id")+"]").after('<div id="tabs-placeholder-'+e.$element.attr("id")+'"></div>').detach(),s.addClass("accordion-item").attr("data-accordion-item",""),a.addClass("accordion-title")});else if("tabs"===t){var l=c()("[data-tabs-content="+e.$element.attr("id")+"]"),u=c()("#tabs-placeholder-"+e.$element.attr("id"));u.length?(l=c()('<div class="tabs-content"></div>').insertAfter(u).attr("data-tabs-content",e.$element.attr("id")),u.remove()):l=c()('<div class="tabs-content"></div>').insertAfter(e.$element).attr("data-tabs-content",e.$element.attr("id")),n.each(function(t,e){var i=c()(e).appendTo(l).addClass(o),n=a.get(t).hash.slice(1),r=c()(e).attr("id")||Object(d.GetYoDigits)(6,"accordion");n!==r&&(""!==n?c()(e).attr("id",n):(n=r,c()(e).attr("id",n),c()(a.get(t)).attr("href",c()(a.get(t)).attr("href").replace("#","")+"#"+n))),c()(s.get(t)).hasClass("is-active")&&i.addClass("is-active")}),s.addClass(r)}}}},{key:"_destroy",value:function(){this.currentPlugin&&this.currentPlugin.destroy(),c()(window).off("changed.zf.mediaquery",this._changedZfMediaQueryHandler)}}])&&r(i.prototype,n),l&&r(i,l),e}();g.defaults={}},"./js/foundation.responsiveMenu.js":function(t,e,i){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function o(t,e){return!e||"object"!==n(e)&&"function"!=typeof e?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t):e}function s(t){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}i.r(e),i.d(e,"ResponsiveMenu",function(){return v});var l=i("jquery"),c=i.n(l),u=i("./js/foundation.util.mediaQuery.js"),d=i("./js/foundation.core.utils.js"),h=i("./js/foundation.core.plugin.js"),f=i("./js/foundation.dropdownMenu.js"),p=i("./js/foundation.drilldown.js"),g=i("./js/foundation.accordionMenu.js"),m={dropdown:{cssClass:"dropdown",plugin:f.DropdownMenu},drilldown:{cssClass:"drilldown",plugin:p.Drilldown},accordion:{cssClass:"accordion-menu",plugin:g.AccordionMenu}},v=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),o(this,s(e).apply(this,arguments))}var i,n,l;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&a(t,e)}(e,h.Plugin),i=e,(n=[{key:"_setup",value:function(t,e){this.$element=c()(t),this.rules=this.$element.data("responsive-menu"),this.currentMq=null,this.currentPlugin=null,this.className="ResponsiveMenu",this._init(),this._events()}},{key:"_init",value:function(){if(u.MediaQuery._init(),"string"==typeof this.rules){for(var t={},e=this.rules.split(" "),i=0;i<e.length;i++){var n=e[i].split("-"),r=1<n.length?n[0]:"small",o=1<n.length?n[1]:n[0];null!==m[o]&&(t[r]=m[o])}this.rules=t}c.a.isEmptyObject(this.rules)||this._checkMediaQueries(),this.$element.attr("data-mutate",this.$element.attr("data-mutate")||Object(d.GetYoDigits)(6,"responsive-menu"))}},{key:"_events",value:function(){var t=this;c()(window).on("changed.zf.mediaquery",function(){t._checkMediaQueries()})}},{key:"_checkMediaQueries",value:function(){var t,e=this;c.a.each(this.rules,function(e){u.MediaQuery.atLeast(e)&&(t=e)}),t&&(this.currentPlugin instanceof this.rules[t].plugin||(c.a.each(m,function(t,i){e.$element.removeClass(i.cssClass)}),this.$element.addClass(this.rules[t].cssClass),this.currentPlugin&&this.currentPlugin.destroy(),this.currentPlugin=new this.rules[t].plugin(this.$element,{})))}},{key:"_destroy",value:function(){this.currentPlugin.destroy(),c()(window).off(".zf.ResponsiveMenu")}}])&&r(i.prototype,n),l&&r(i,l),e}();v.defaults={}},"./js/foundation.responsiveToggle.js":function(t,e,i){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function o(t,e){return!e||"object"!==n(e)&&"function"!=typeof e?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t):e}function s(t){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}i.r(e),i.d(e,"ResponsiveToggle",function(){return f});var l=i("jquery"),c=i.n(l),u=i("./js/foundation.util.mediaQuery.js"),d=i("./js/foundation.util.motion.js"),h=i("./js/foundation.core.plugin.js"),f=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),o(this,s(e).apply(this,arguments))}var i,n,l;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&a(t,e)}(e,h.Plugin),i=e,(n=[{key:"_setup",value:function(t,i){this.$element=c()(t),this.options=c.a.extend({},e.defaults,this.$element.data(),i),this.className="ResponsiveToggle",this._init(),this._events()}},{key:"_init",value:function(){u.MediaQuery._init();var t=this.$element.data("responsive-toggle");if(t||console.error("Your tab bar needs an ID of a Menu as the value of data-tab-bar."),this.$targetMenu=c()("#".concat(t)),this.$toggler=this.$element.find("[data-toggle]").filter(function(){var e=c()(this).data("toggle");return e===t||""===e}),this.options=c.a.extend({},this.options,this.$targetMenu.data()),this.options.animate){var e=this.options.animate.split(" ");this.animationIn=e[0],this.animationOut=e[1]||null}this._update()}},{key:"_events",value:function(){this._updateMqHandler=this._update.bind(this),c()(window).on("changed.zf.mediaquery",this._updateMqHandler),this.$toggler.on("click.zf.responsiveToggle",this.toggleMenu.bind(this))}},{key:"_update",value:function(){u.MediaQuery.atLeast(this.options.hideFor)?(this.$element.hide(),this.$targetMenu.show()):(this.$element.show(),this.$targetMenu.hide())}},{key:"toggleMenu",value:function(){var t=this;u.MediaQuery.atLeast(this.options.hideFor)||(this.options.animate?this.$targetMenu.is(":hidden")?d.Motion.animateIn(this.$targetMenu,this.animationIn,function(){t.$element.trigger("toggled.zf.responsiveToggle"),t.$targetMenu.find("[data-mutate]").triggerHandler("mutateme.zf.trigger")}):d.Motion.animateOut(this.$targetMenu,this.animationOut,function(){t.$element.trigger("toggled.zf.responsiveToggle")}):(this.$targetMenu.toggle(0),this.$targetMenu.find("[data-mutate]").trigger("mutateme.zf.trigger"),this.$element.trigger("toggled.zf.responsiveToggle")))}},{key:"_destroy",value:function(){this.$element.off(".zf.responsiveToggle"),this.$toggler.off(".zf.responsiveToggle"),c()(window).off("changed.zf.mediaquery",this._updateMqHandler)}}])&&r(i.prototype,n),l&&r(i,l),e}();f.defaults={hideFor:"medium",animate:!1}},"./js/foundation.reveal.js":function(t,e,i){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function o(t,e){return!e||"object"!==n(e)&&"function"!=typeof e?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t):e}function s(t){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}i.r(e),i.d(e,"Reveal",function(){return m});var l=i("jquery"),c=i.n(l),u=i("./js/foundation.core.utils.js"),d=i("./js/foundation.util.keyboard.js"),h=i("./js/foundation.util.mediaQuery.js"),f=i("./js/foundation.util.motion.js"),p=i("./js/foundation.core.plugin.js"),g=i("./js/foundation.util.triggers.js"),m=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),o(this,s(e).apply(this,arguments))}var i,n,l;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&a(t,e)}(e,p.Plugin),i=e,(n=[{key:"_setup",value:function(t,i){this.$element=t,this.options=c.a.extend({},e.defaults,this.$element.data(),i),this.className="Reveal",this._init(),g.Triggers.init(c.a),d.Keyboard.register("Reveal",{ESCAPE:"close"})}},{key:"_init",value:function(){var t=this;h.MediaQuery._init(),this.id=this.$element.attr("id"),this.isActive=!1,this.cached={mq:h.MediaQuery.current},this.$anchor=c()('[data-open="'.concat(this.id,'"]')).length?c()('[data-open="'.concat(this.id,'"]')):c()('[data-toggle="'.concat(this.id,'"]')),this.$anchor.attr({"aria-controls":this.id,"aria-haspopup":!0,tabindex:0}),(this.options.fullScreen||this.$element.hasClass("full"))&&(this.options.fullScreen=!0,this.options.overlay=!1),this.options.overlay&&!this.$overlay&&(this.$overlay=this._makeOverlay(this.id)),this.$element.attr({role:"dialog","aria-hidden":!0,"data-yeti-box":this.id,"data-resize":this.id}),this.$overlay?this.$element.detach().appendTo(this.$overlay):(this.$element.detach().appendTo(c()(this.options.appendTo)),this.$element.addClass("without-overlay")),this._events(),this.options.deepLink&&window.location.hash==="#".concat(this.id)&&(this.onLoadListener=Object(u.onLoad)(c()(window),function(){return t.open()}))}},{key:"_makeOverlay",value:function(){var t="";return this.options.additionalOverlayClasses&&(t=" "+this.options.additionalOverlayClasses),c()("<div></div>").addClass("reveal-overlay"+t).appendTo(this.options.appendTo)}},{key:"_updatePosition",value:function(){var t,e=this.$element.outerWidth(),i=c()(window).width(),n=this.$element.outerHeight(),r=c()(window).height(),o=null;t="auto"===this.options.hOffset?parseInt((i-e)/2,10):parseInt(this.options.hOffset,10),"auto"===this.options.vOffset?o=r<n?parseInt(Math.min(100,r/10),10):parseInt((r-n)/4,10):null!==this.options.vOffset&&(o=parseInt(this.options.vOffset,10)),null!==o&&this.$element.css({top:o+"px"}),this.$overlay&&"auto"===this.options.hOffset||(this.$element.css({left:t+"px"}),this.$element.css({margin:"0px"}))}},{key:"_events",value:function(){var t=this,e=this;this.$element.on({"open.zf.trigger":this.open.bind(this),"close.zf.trigger":function(i,n){if(i.target===e.$element[0]||c()(i.target).parents("[data-closable]")[0]===n)return t.close.apply(t)},"toggle.zf.trigger":this.toggle.bind(this),"resizeme.zf.trigger":function(){e._updatePosition()}}),this.options.closeOnClick&&this.options.overlay&&this.$overlay.off(".zf.reveal").on("click.zf.reveal",function(t){t.target!==e.$element[0]&&!c.a.contains(e.$element[0],t.target)&&c.a.contains(document,t.target)&&e.close()}),this.options.deepLink&&c()(window).on("hashchange.zf.reveal:".concat(this.id),this._handleState.bind(this))}},{key:"_handleState",value:function(t){window.location.hash!=="#"+this.id||this.isActive?this.close():this.open()}},{key:"_disableScroll",value:function(t){t=t||c()(window).scrollTop(),c()(document).height()>c()(window).height()&&c()("html").css("top",-t)}},{key:"_enableScroll",value:function(t){t=t||parseInt(c()("html").css("top")),c()(document).height()>c()(window).height()&&(c()("html").css("top",""),c()(window).scrollTop(-t))}},{key:"open",value:function(){var t=this,e="#".concat(this.id);this.options.deepLink&&window.location.hash!==e&&(window.history.pushState?this.options.updateHistory?window.history.pushState({},"",e):window.history.replaceState({},"",e):window.location.hash=e),this.$activeAnchor=c()(document.activeElement).is(this.$anchor)?c()(document.activeElement):this.$anchor,this.isActive=!0,this.$element.css({visibility:"hidden"}).show().scrollTop(0),this.options.overlay&&this.$overlay.css({visibility:"hidden"}).show(),this._updatePosition(),this.$element.hide().css({visibility:""}),this.$overlay&&(this.$overlay.css({visibility:""}).hide(),this.$element.hasClass("fast")?this.$overlay.addClass("fast"):this.$element.hasClass("slow")&&this.$overlay.addClass("slow")),this.options.multipleOpened||this.$element.trigger("closeme.zf.reveal",this.id),this._disableScroll();var i=this;this.options.animationIn?(this.options.overlay&&f.Motion.animateIn(this.$overlay,"fade-in"),f.Motion.animateIn(this.$element,this.options.animationIn,function(){t.$element&&(t.focusableElements=d.Keyboard.findFocusable(t.$element),i.$element.attr({"aria-hidden":!1,tabindex:-1}).focus(),i._addGlobalClasses(),d.Keyboard.trapFocus(i.$element))})):(this.options.overlay&&this.$overlay.show(0),this.$element.show(this.options.showDelay)),this.$element.attr({"aria-hidden":!1,tabindex:-1}).focus(),d.Keyboard.trapFocus(this.$element),this._addGlobalClasses(),this._addGlobalListeners(),this.$element.trigger("open.zf.reveal")}},{key:"_addGlobalClasses",value:function(){var t=function(){c()("html").toggleClass("zf-has-scroll",!!(c()(document).height()>c()(window).height()))};this.$element.on("resizeme.zf.trigger.revealScrollbarListener",function(){return t()}),t(),c()("html").addClass("is-reveal-open")}},{key:"_removeGlobalClasses",value:function(){this.$element.off("resizeme.zf.trigger.revealScrollbarListener"),c()("html").removeClass("is-reveal-open"),c()("html").removeClass("zf-has-scroll")}},{key:"_addGlobalListeners",value:function(){var t=this;this.$element&&(this.focusableElements=d.Keyboard.findFocusable(this.$element),this.options.overlay||!this.options.closeOnClick||this.options.fullScreen||c()("body").on("click.zf.reveal",function(e){e.target!==t.$element[0]&&!c.a.contains(t.$element[0],e.target)&&c.a.contains(document,e.target)&&t.close()}),this.options.closeOnEsc&&c()(window).on("keydown.zf.reveal",function(e){d.Keyboard.handleKey(e,"Reveal",{close:function(){t.options.closeOnEsc&&t.close()}})}))}},{key:"close",value:function(){function t(){var t=parseInt(c()("html").css("top"));0===c()(".reveal:visible").length&&e._removeGlobalClasses(),d.Keyboard.releaseFocus(e.$element),e.$element.attr("aria-hidden",!0),e._enableScroll(t),e.$element.trigger("closed.zf.reveal")}if(!this.isActive||!this.$element.is(":visible"))return!1;var e=this;if(this.options.animationOut?(this.options.overlay&&f.Motion.animateOut(this.$overlay,"fade-out"),f.Motion.animateOut(this.$element,this.options.animationOut,t)):(this.$element.hide(this.options.hideDelay),this.options.overlay?this.$overlay.hide(0,t):t()),this.options.closeOnEsc&&c()(window).off("keydown.zf.reveal"),!this.options.overlay&&this.options.closeOnClick&&c()("body").off("click.zf.reveal"),this.$element.off("keydown.zf.reveal"),this.options.resetOnClose&&this.$element.html(this.$element.html()),this.isActive=!1,e.options.deepLink&&window.location.hash==="#".concat(this.id))if(window.history.replaceState){var i=window.location.pathname+window.location.search;this.options.updateHistory?window.history.pushState({},"",i):window.history.replaceState("",document.title,i)}else window.location.hash="";this.$activeAnchor.focus()}},{key:"toggle",value:function(){this.isActive?this.close():this.open()}},{key:"_destroy",value:function(){this.options.overlay&&(this.$element.appendTo(c()(this.options.appendTo)),this.$overlay.hide().off().remove()),this.$element.hide().off(),this.$anchor.off(".zf"),c()(window).off(".zf.reveal:".concat(this.id)),this.onLoadListener&&c()(window).off(this.onLoadListener),0===c()(".reveal:visible").length&&this._removeGlobalClasses()}}])&&r(i.prototype,n),l&&r(i,l),e}();m.defaults={animationIn:"",animationOut:"",showDelay:0,hideDelay:0,closeOnClick:!0,closeOnEsc:!0,multipleOpened:!1,vOffset:"auto",hOffset:"auto",fullScreen:!1,overlay:!0,resetOnClose:!1,deepLink:!1,updateHistory:!1,appendTo:"body",additionalOverlayClasses:""}},"./js/foundation.slider.js":function(t,e,i){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){
return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function o(t,e){return!e||"object"!==n(e)&&"function"!=typeof e?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t):e}function s(t){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function l(t,e){return t/e}function c(t,e,i,n){return Math.abs(t.position()[e]+t[n]()/2-i)}i.r(e),i.d(e,"Slider",function(){return y});var u=i("jquery"),d=i.n(u),h=i("./js/foundation.util.keyboard.js"),f=i("./js/foundation.util.motion.js"),p=i("./js/foundation.core.utils.js"),g=i("./js/foundation.core.plugin.js"),m=i("./js/foundation.util.touch.js"),v=i("./js/foundation.util.triggers.js"),y=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),o(this,s(e).apply(this,arguments))}var i,n,u;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&a(t,e)}(e,g.Plugin),i=e,(n=[{key:"_setup",value:function(t,i){this.$element=t,this.options=d.a.extend({},e.defaults,this.$element.data(),i),this.className="Slider",m.Touch.init(d.a),v.Triggers.init(d.a),this._init(),h.Keyboard.register("Slider",{ltr:{ARROW_RIGHT:"increase",ARROW_UP:"increase",ARROW_DOWN:"decrease",ARROW_LEFT:"decrease",SHIFT_ARROW_RIGHT:"increase_fast",SHIFT_ARROW_UP:"increase_fast",SHIFT_ARROW_DOWN:"decrease_fast",SHIFT_ARROW_LEFT:"decrease_fast",HOME:"min",END:"max"},rtl:{ARROW_LEFT:"increase",ARROW_RIGHT:"decrease",SHIFT_ARROW_LEFT:"increase_fast",SHIFT_ARROW_RIGHT:"decrease_fast"}})}},{key:"_init",value:function(){this.inputs=this.$element.find("input"),this.handles=this.$element.find("[data-slider-handle]"),this.$handle=this.handles.eq(0),this.$input=this.inputs.length?this.inputs.eq(0):d()("#".concat(this.$handle.attr("aria-controls"))),this.$fill=this.$element.find("[data-slider-fill]").css(this.options.vertical?"height":"width",0),(this.options.disabled||this.$element.hasClass(this.options.disabledClass))&&(this.options.disabled=!0,this.$element.addClass(this.options.disabledClass)),this.inputs.length||(this.inputs=d()().add(this.$input),this.options.binding=!0),this._setInitAttr(0),this.handles[1]&&(this.options.doubleSided=!0,this.$handle2=this.handles.eq(1),this.$input2=1<this.inputs.length?this.inputs.eq(1):d()("#".concat(this.$handle2.attr("aria-controls"))),this.inputs[1]||(this.inputs=this.inputs.add(this.$input2)),this._setInitAttr(1)),this.setHandles(),this._events()}},{key:"setHandles",value:function(){var t=this;this.handles[1]?this._setHandlePos(this.$handle,this.inputs.eq(0).val(),!0,function(){t._setHandlePos(t.$handle2,t.inputs.eq(1).val(),!0)}):this._setHandlePos(this.$handle,this.inputs.eq(0).val(),!0)}},{key:"_reflow",value:function(){this.setHandles()}},{key:"_pctOfBar",value:function(t){var e=l(t-this.options.start,this.options.end-this.options.start);switch(this.options.positionValueFunction){case"pow":e=this._logTransform(e);break;case"log":e=this._powTransform(e)}return e.toFixed(2)}},{key:"_value",value:function(t){switch(this.options.positionValueFunction){case"pow":t=this._powTransform(t);break;case"log":t=this._logTransform(t)}return(this.options.end-this.options.start)*t+parseFloat(this.options.start)}},{key:"_logTransform",value:function(t){return e=this.options.nonLinearBase,i=t*(this.options.nonLinearBase-1)+1,Math.log(i)/Math.log(e);var e,i}},{key:"_powTransform",value:function(t){return(Math.pow(this.options.nonLinearBase,t)-1)/(this.options.nonLinearBase-1)}},{key:"_setHandlePos",value:function(t,e,i,n){if(!this.$element.hasClass(this.options.disabledClass)){(e=parseFloat(e))<this.options.start?e=this.options.start:e>this.options.end&&(e=this.options.end);var r=this.options.doubleSided;if(this.options.vertical&&!i&&(e=this.options.end-e),r)if(0===this.handles.index(t)){var o=parseFloat(this.$handle2.attr("aria-valuenow"));e=o<=e?o-this.options.step:e}else{var s=parseFloat(this.$handle.attr("aria-valuenow"));e=e<=s?s+this.options.step:e}var a=this,c=this.options.vertical,u=c?"height":"width",d=c?"top":"left",h=t[0].getBoundingClientRect()[u],p=this.$element[0].getBoundingClientRect()[u],g=this._pctOfBar(e),m=(100*l((p-h)*g,p)).toFixed(this.options.decimal);e=parseFloat(e.toFixed(this.options.decimal));var v={};if(this._setValues(t,e),r){var y,b=0===this.handles.index(t),w=~~(100*l(h,p));if(b)v[d]="".concat(m,"%"),y=parseFloat(this.$handle2[0].style[d])-m+w,n&&"function"==typeof n&&n();else{var x=parseFloat(this.$handle[0].style[d]);y=m-(isNaN(x)?(this.options.initialStart-this.options.start)/((this.options.end-this.options.start)/100):x)+w}v["min-".concat(u)]="".concat(y,"%")}this.$element.one("finished.zf.animate",function(){a.$element.trigger("moved.zf.slider",[t])});var _=this.$element.data("dragging")?1e3/60:this.options.moveTime;Object(f.Move)(_,t,function(){isNaN(m)?t.css(d,"".concat(100*g,"%")):t.css(d,"".concat(m,"%")),a.options.doubleSided?a.$fill.css(v):a.$fill.css(u,"".concat(100*g,"%"))}),clearTimeout(a.timeout),a.timeout=setTimeout(function(){a.$element.trigger("changed.zf.slider",[t])},a.options.changedDelay)}}},{key:"_setInitAttr",value:function(t){var e=0===t?this.options.initialStart:this.options.initialEnd,i=this.inputs.eq(t).attr("id")||Object(p.GetYoDigits)(6,"slider");this.inputs.eq(t).attr({id:i,max:this.options.end,min:this.options.start,step:this.options.step}),this.inputs.eq(t).val(e),this.handles.eq(t).attr({role:"slider","aria-controls":i,"aria-valuemax":this.options.end,"aria-valuemin":this.options.start,"aria-valuenow":e,"aria-orientation":this.options.vertical?"vertical":"horizontal",tabindex:0})}},{key:"_setValues",value:function(t,e){var i=this.options.doubleSided?this.handles.index(t):0;this.inputs.eq(i).val(e),t.attr("aria-valuenow",e)}},{key:"_handleEvent",value:function(t,e,i){var n,r;if(i)n=this._adjustValue(null,i),r=!0;else{t.preventDefault();var o=this.options.vertical,s=o?"height":"width",a=o?"top":"left",u=o?t.pageY:t.pageX,h=(this.$handle[0].getBoundingClientRect()[s],this.$element[0].getBoundingClientRect()[s]),f=o?d()(window).scrollTop():d()(window).scrollLeft(),g=this.$element.offset()[a];t.clientY===t.pageY&&(u+=f);var m,v=u-g,y=l(m=v<0?0:h<v?h:v,h);n=this._value(y),Object(p.rtl)()&&!this.options.vertical&&(n=this.options.end-n),n=this._adjustValue(null,n),r=!1,e||(e=c(this.$handle,a,m,s)<=c(this.$handle2,a,m,s)?this.$handle:this.$handle2)}this._setHandlePos(e,n,r)}},{key:"_adjustValue",value:function(t,e){var i,n,r,o=this.options.step,s=parseFloat(o/2);return 0===(n=0<=(i=t?parseFloat(t.attr("aria-valuenow")):e)?i%o:o+i%o)?i:i=(r=i-n)+s<=i?r+o:r}},{key:"_events",value:function(){this._eventsForHandle(this.$handle),this.handles[1]&&this._eventsForHandle(this.$handle2)}},{key:"_eventsForHandle",value:function(t){var e,i=this,n=function(t){var e=i.inputs.index(d()(this));i._handleEvent(t,i.handles.eq(e),d()(this).val())};if(this.inputs.off("keyup.zf.slider").on("keyup.zf.slider",function(t){13==t.keyCode&&n.call(this,t)}),this.inputs.off("change.zf.slider").on("change.zf.slider",n),this.options.clickSelect&&this.$element.off("click.zf.slider").on("click.zf.slider",function(t){return!i.$element.data("dragging")&&void(d()(t.target).is("[data-slider-handle]")||(i.options.doubleSided?i._handleEvent(t):i._handleEvent(t,i.$handle)))}),this.options.draggable){this.handles.addTouch();var r=d()("body");t.off("mousedown.zf.slider").on("mousedown.zf.slider",function(n){t.addClass("is-dragging"),i.$fill.addClass("is-dragging"),i.$element.data("dragging",!0),e=d()(n.currentTarget),r.on("mousemove.zf.slider",function(t){t.preventDefault(),i._handleEvent(t,e)}).on("mouseup.zf.slider",function(n){i._handleEvent(n,e),t.removeClass("is-dragging"),i.$fill.removeClass("is-dragging"),i.$element.data("dragging",!1),r.off("mousemove.zf.slider mouseup.zf.slider")})}).on("selectstart.zf.slider touchmove.zf.slider",function(t){t.preventDefault()})}t.off("keydown.zf.slider").on("keydown.zf.slider",function(t){var e,n=d()(this),r=i.options.doubleSided?i.handles.index(n):0,o=parseFloat(i.inputs.eq(r).val());h.Keyboard.handleKey(t,"Slider",{decrease:function(){e=o-i.options.step},increase:function(){e=o+i.options.step},decrease_fast:function(){e=o-10*i.options.step},increase_fast:function(){e=o+10*i.options.step},min:function(){e=i.options.start},max:function(){e=i.options.end},handled:function(){t.preventDefault(),i._setHandlePos(n,e,!0)}})})}},{key:"_destroy",value:function(){this.handles.off(".zf.slider"),this.inputs.off(".zf.slider"),this.$element.off(".zf.slider"),clearTimeout(this.timeout)}}])&&r(i.prototype,n),u&&r(i,u),e}();y.defaults={start:0,end:100,step:1,initialStart:0,initialEnd:100,binding:!1,clickSelect:!0,vertical:!1,draggable:!0,disabled:!1,doubleSided:!1,decimal:2,moveTime:200,disabledClass:"disabled",invertVertical:!1,changedDelay:500,nonLinearBase:5,positionValueFunction:"linear"}},"./js/foundation.smoothScroll.js":function(t,e,i){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function o(t,e){return!e||"object"!==n(e)&&"function"!=typeof e?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t):e}function s(t){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}i.r(e),i.d(e,"SmoothScroll",function(){return h});var l=i("jquery"),c=i.n(l),u=i("./js/foundation.core.utils.js"),d=i("./js/foundation.core.plugin.js"),h=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),o(this,s(e).apply(this,arguments))}var i,n,l;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&a(t,e)}(e,d.Plugin),i=e,l=[{key:"scrollToLoc",value:function(t){var i=1<arguments.length&&void 0!==arguments[1]?arguments[1]:e.defaults,n=2<arguments.length?arguments[2]:void 0,r=c()(t);if(!r.length)return!1;var o=Math.round(r.offset().top-i.threshold/2-i.offset);c()("html, body").stop(!0).animate({scrollTop:o},i.animationDuration,i.animationEasing,function(){"function"==typeof n&&n()})}}],(n=[{key:"_setup",value:function(t,i){this.$element=t,this.options=c.a.extend({},e.defaults,this.$element.data(),i),this.className="SmoothScroll",this._init()}},{key:"_init",value:function(){var t=this.$element[0].id||Object(u.GetYoDigits)(6,"smooth-scroll");this.$element.attr({id:t}),this._events()}},{key:"_events",value:function(){this.$element.on("click.zf.smoothScroll",this._handleLinkClick),this.$element.on("click.zf.smoothScroll",'a[href^="#"]',this._handleLinkClick)}},{key:"_handleLinkClick",value:function(t){var i=this;if(c()(t.currentTarget).is('a[href^="#"]')){var n=t.currentTarget.getAttribute("href");this._inTransition=!0,e.scrollToLoc(n,this.options,function(){i._inTransition=!1}),t.preventDefault()}}},{key:"_destroy",value:function(){this.$element.off("click.zf.smoothScroll",this._handleLinkClick),this.$element.off("click.zf.smoothScroll",'a[href^="#"]',this._handleLinkClick)}}])&&r(i.prototype,n),l&&r(i,l),e}();h.defaults={animationDuration:500,animationEasing:"linear",threshold:50,offset:0}},"./js/foundation.sticky.js":function(t,e,i){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function o(t,e){return!e||"object"!==n(e)&&"function"!=typeof e?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t):e}function s(t){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function l(t){return parseInt(window.getComputedStyle(document.body,null).fontSize,10)*t}i.r(e),i.d(e,"Sticky",function(){return g});var c=i("jquery"),u=i.n(c),d=i("./js/foundation.core.utils.js"),h=i("./js/foundation.util.mediaQuery.js"),f=i("./js/foundation.core.plugin.js"),p=i("./js/foundation.util.triggers.js"),g=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),o(this,s(e).apply(this,arguments))}var i,n,c;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&a(t,e)}(e,f.Plugin),i=e,(n=[{key:"_setup",value:function(t,i){this.$element=t,this.options=u.a.extend({},e.defaults,this.$element.data(),i),this.className="Sticky",p.Triggers.init(u.a),this._init()}},{key:"_init",value:function(){h.MediaQuery._init();var t=this.$element.parent("[data-sticky-container]"),e=this.$element[0].id||Object(d.GetYoDigits)(6,"sticky"),i=this;t.length?this.$container=t:(this.wasWrapped=!0,this.$element.wrap(this.options.container),this.$container=this.$element.parent()),this.$container.addClass(this.options.containerClass),this.$element.addClass(this.options.stickyClass).attr({"data-resize":e,"data-mutate":e}),""!==this.options.anchor&&u()("#"+i.options.anchor).attr({"data-mutate":e}),this.scrollCount=this.options.checkEvery,this.isStuck=!1,this.onLoadListener=Object(d.onLoad)(u()(window),function(){i.containerHeight="none"==i.$element.css("display")?0:i.$element[0].getBoundingClientRect().height,i.$container.css("height",i.containerHeight),i.elemHeight=i.containerHeight,""!==i.options.anchor?i.$anchor=u()("#"+i.options.anchor):i._parsePoints(),i._setSizes(function(){var t=window.pageYOffset;i._calc(!1,t),i.isStuck||i._removeSticky(!(t>=i.topPoint))}),i._events(e.split("-").reverse().join("-"))})}},{key:"_parsePoints",value:function(){for(var t=[""==this.options.topAnchor?1:this.options.topAnchor,""==this.options.btmAnchor?document.documentElement.scrollHeight:this.options.btmAnchor],e={},i=0,n=t.length;i<n&&t[i];i++){var r;if("number"==typeof t[i])r=t[i];else{var o=t[i].split(":"),s=u()("#".concat(o[0]));r=s.offset().top,o[1]&&"bottom"===o[1].toLowerCase()&&(r+=s[0].getBoundingClientRect().height)}e[i]=r}this.points=e}},{key:"_events",value:function(t){var e=this,i=this.scrollListener="scroll.zf.".concat(t);this.isOn||(this.canStick&&(this.isOn=!0,u()(window).off(i).on(i,function(t){0===e.scrollCount?(e.scrollCount=e.options.checkEvery,e._setSizes(function(){e._calc(!1,window.pageYOffset)})):(e.scrollCount--,e._calc(!1,window.pageYOffset))})),this.$element.off("resizeme.zf.trigger").on("resizeme.zf.trigger",function(i,n){e._eventsHandler(t)}),this.$element.on("mutateme.zf.trigger",function(i,n){e._eventsHandler(t)}),this.$anchor&&this.$anchor.on("mutateme.zf.trigger",function(i,n){e._eventsHandler(t)}))}},{key:"_eventsHandler",value:function(t){var e=this,i=this.scrollListener="scroll.zf.".concat(t);e._setSizes(function(){e._calc(!1),e.canStick?e.isOn||e._events(t):e.isOn&&e._pauseListeners(i)})}},{key:"_pauseListeners",value:function(t){this.isOn=!1,u()(window).off(t),this.$element.trigger("pause.zf.sticky")}},{key:"_calc",value:function(t,e){return t&&this._setSizes(),this.canStick?(e||(e=window.pageYOffset),void(e>=this.topPoint?e<=this.bottomPoint?this.isStuck||this._setSticky():this.isStuck&&this._removeSticky(!1):this.isStuck&&this._removeSticky(!0))):(this.isStuck&&this._removeSticky(!0),!1)}},{key:"_setSticky",value:function(){var t=this,e=this.options.stickTo,i="top"===e?"marginTop":"marginBottom",n="top"===e?"bottom":"top",r={};r[i]="".concat(this.options[i],"em"),r[e]=0,r[n]="auto",this.isStuck=!0,this.$element.removeClass("is-anchored is-at-".concat(n)).addClass("is-stuck is-at-".concat(e)).css(r).trigger("sticky.zf.stuckto:".concat(e)),this.$element.on("transitionend webkitTransitionEnd oTransitionEnd otransitionend MSTransitionEnd",function(){t._setSizes()})}},{key:"_removeSticky",value:function(t){var e=this.options.stickTo,i="top"===e,n={},r=(this.points?this.points[1]-this.points[0]:this.anchorHeight)-this.elemHeight,o=t?"top":"bottom";n[i?"marginTop":"marginBottom"]=0,n.bottom="auto",n.top=t?0:r,this.isStuck=!1,this.$element.removeClass("is-stuck is-at-".concat(e)).addClass("is-anchored is-at-".concat(o)).css(n).trigger("sticky.zf.unstuckfrom:".concat(o))}},{key:"_setSizes",value:function(t){this.canStick=h.MediaQuery.is(this.options.stickyOn),this.canStick||t&&"function"==typeof t&&t();var e=this.$container[0].getBoundingClientRect().width,i=window.getComputedStyle(this.$container[0]),n=parseInt(i["padding-left"],10),r=parseInt(i["padding-right"],10);this.$anchor&&this.$anchor.length?this.anchorHeight=this.$anchor[0].getBoundingClientRect().height:this._parsePoints(),this.$element.css({"max-width":"".concat(e-n-r,"px")});var o=this.$element[0].getBoundingClientRect().height||this.containerHeight;if("none"==this.$element.css("display")&&(o=0),this.containerHeight=o,this.$container.css({height:o}),this.elemHeight=o,!this.isStuck&&this.$element.hasClass("is-at-bottom")){var s=(this.points?this.points[1]-this.$container.offset().top:this.anchorHeight)-this.elemHeight;this.$element.css("top",s)}this._setBreakPoints(o,function(){t&&"function"==typeof t&&t()})}},{key:"_setBreakPoints",value:function(t,e){if(!this.canStick){if(!e||"function"!=typeof e)return!1;e()}var i=l(this.options.marginTop),n=l(this.options.marginBottom),r=this.points?this.points[0]:this.$anchor.offset().top,o=this.points?this.points[1]:r+this.anchorHeight,s=window.innerHeight;"top"===this.options.stickTo?(r-=i,o-=t+i):"bottom"===this.options.stickTo&&(r-=s-(t+n),o-=s-n),this.topPoint=r,this.bottomPoint=o,e&&"function"==typeof e&&e()}},{key:"_destroy",value:function(){this._removeSticky(!0),this.$element.removeClass("".concat(this.options.stickyClass," is-anchored is-at-top")).css({height:"",top:"",bottom:"","max-width":""}).off("resizeme.zf.trigger").off("mutateme.zf.trigger"),this.$anchor&&this.$anchor.length&&this.$anchor.off("change.zf.sticky"),this.scrollListener&&u()(window).off(this.scrollListener),this.onLoadListener&&u()(window).off(this.onLoadListener),this.wasWrapped?this.$element.unwrap():this.$container.removeClass(this.options.containerClass).css({height:""})}}])&&r(i.prototype,n),c&&r(i,c),e}();g.defaults={container:"<div data-sticky-container></div>",stickTo:"top",anchor:"",topAnchor:"",btmAnchor:"",marginTop:1,marginBottom:1,stickyOn:"medium",stickyClass:"sticky",containerClass:"sticky-container",checkEvery:-1}},"./js/foundation.tabs.js":function(t,e,i){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function o(t,e){return!e||"object"!==n(e)&&"function"!=typeof e?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t):e}function s(t){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}i.r(e),i.d(e,"Tabs",function(){return p});var l=i("jquery"),c=i.n(l),u=i("./js/foundation.core.utils.js"),d=i("./js/foundation.util.keyboard.js"),h=i("./js/foundation.util.imageLoader.js"),f=i("./js/foundation.core.plugin.js"),p=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),o(this,s(e).apply(this,arguments))}var i,l,p;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&a(t,e)}(e,f.Plugin),i=e,(l=[{key:"_setup",value:function(t,i){this.$element=t,this.options=c.a.extend({},e.defaults,this.$element.data(),i),this.className="Tabs",this._init(),d.Keyboard.register("Tabs",{ENTER:"open",SPACE:"open",ARROW_RIGHT:"next",ARROW_UP:"previous",ARROW_DOWN:"next",ARROW_LEFT:"previous"})}},{key:"_init",value:function(){var t=this,e=this;if(this._isInitializing=!0,this.$element.attr({role:"tablist"}),this.$tabTitles=this.$element.find(".".concat(this.options.linkClass)),this.$tabContent=c()('[data-tabs-content="'.concat(this.$element[0].id,'"]')),this.$tabTitles.each(function(){var t=c()(this),i=t.find("a"),n=t.hasClass("".concat(e.options.linkActiveClass)),r=i.attr("data-tabs-target")||i[0].hash.slice(1),o=i[0].id?i[0].id:"".concat(r,"-label"),s=c()("#".concat(r));t.attr({role:"presentation"}),i.attr({role:"tab","aria-controls":r,"aria-selected":n,id:o,tabindex:n?"0":"-1"}),s.attr({role:"tabpanel","aria-labelledby":o}),n&&(e._initialAnchor="#".concat(r)),n||s.attr("aria-hidden","true"),n&&e.options.autoFocus&&(e.onLoadListener=Object(u.onLoad)(c()(window),function(){c()("html, body").animate({scrollTop:t.offset().top},e.options.deepLinkSmudgeDelay,function(){i.focus()})}))}),this.options.matchHeight){var i=this.$tabContent.find("img");i.length?Object(h.onImagesLoaded)(i,this._setHeight.bind(this)):this._setHeight()}this._checkDeepLink=function(){var e=window.location.hash;if(!e.length){if(t._isInitializing)return;t._initialAnchor&&(e=t._initialAnchor)}var i=e&&c()(e),n=e&&t.$element.find('[href$="'+e+'"]'),r=!(!i.length||!n.length);if(i&&i.length&&n&&n.length?t.selectTab(i,!0):t._collapse(),r){if(t.options.deepLinkSmudge){var o=t.$element.offset();c()("html, body").animate({scrollTop:o.top},t.options.deepLinkSmudgeDelay)}t.$element.trigger("deeplink.zf.tabs",[n,i])}},this.options.deepLink&&this._checkDeepLink(),this._events(),this._isInitializing=!1}},{key:"_events",value:function(){this._addKeyHandler(),this._addClickHandler(),this._setHeightMqHandler=null,this.options.matchHeight&&(this._setHeightMqHandler=this._setHeight.bind(this),c()(window).on("changed.zf.mediaquery",this._setHeightMqHandler)),this.options.deepLink&&c()(window).on("hashchange",this._checkDeepLink)}},{key:"_addClickHandler",value:function(){var t=this;this.$element.off("click.zf.tabs").on("click.zf.tabs",".".concat(this.options.linkClass),function(e){e.preventDefault(),e.stopPropagation(),t._handleTabChange(c()(this))})}},{key:"_addKeyHandler",value:function(){var t=this;this.$tabTitles.off("keydown.zf.tabs").on("keydown.zf.tabs",function(e){if(9!==e.which){var i,n,r=c()(this),o=r.parent("ul").children("li");o.each(function(e){c()(this).is(r)&&(n=t.options.wrapOnKeys?(i=0===e?o.last():o.eq(e-1),e===o.length-1?o.first():o.eq(e+1)):(i=o.eq(Math.max(0,e-1)),o.eq(Math.min(e+1,o.length-1))))}),d.Keyboard.handleKey(e,"Tabs",{open:function(){r.find('[role="tab"]').focus(),t._handleTabChange(r)},previous:function(){i.find('[role="tab"]').focus(),t._handleTabChange(i)},next:function(){n.find('[role="tab"]').focus(),t._handleTabChange(n)},handled:function(){e.stopPropagation(),e.preventDefault()}})}})}},{key:"_handleTabChange",value:function(t,e){if(t.hasClass("".concat(this.options.linkActiveClass)))this.options.activeCollapse&&this._collapse();else{var i=this.$element.find(".".concat(this.options.linkClass,".").concat(this.options.linkActiveClass)),n=t.find('[role="tab"]'),r=n.attr("data-tabs-target"),o=r&&r.length?"#".concat(r):n[0].hash,s=this.$tabContent.find(o);this._collapseTab(i),this._openTab(t),this.options.deepLink&&!e&&(this.options.updateHistory?history.pushState({},"",o):history.replaceState({},"",o)),this.$element.trigger("change.zf.tabs",[t,s]),s.find("[data-mutate]").trigger("mutateme.zf.trigger")}}},{key:"_openTab",value:function(t){var e=t.find('[role="tab"]'),i=e.attr("data-tabs-target")||e[0].hash.slice(1),n=this.$tabContent.find("#".concat(i));t.addClass("".concat(this.options.linkActiveClass)),e.attr({"aria-selected":"true",tabindex:"0"}),n.addClass("".concat(this.options.panelActiveClass)).removeAttr("aria-hidden")}},{key:"_collapseTab",value:function(t){var e=t.removeClass("".concat(this.options.linkActiveClass)).find('[role="tab"]').attr({"aria-selected":"false",tabindex:-1});c()("#".concat(e.attr("aria-controls"))).removeClass("".concat(this.options.panelActiveClass)).attr({"aria-hidden":"true"})}},{key:"_collapse",value:function(){var t=this.$element.find(".".concat(this.options.linkClass,".").concat(this.options.linkActiveClass));t.length&&(this._collapseTab(t),this.$element.trigger("collapse.zf.tabs",[t]))}},{key:"selectTab",value:function(t,e){var i;(i="object"===n(t)?t[0].id:t).indexOf("#")<0&&(i="#".concat(i));var r=this.$tabTitles.has('[href$="'.concat(i,'"]'));this._handleTabChange(r,e)}},{key:"_setHeight",value:function(){var t=0,e=this;this.$tabContent.find(".".concat(this.options.panelClass)).css("height","").each(function(){var i=c()(this),n=i.hasClass("".concat(e.options.panelActiveClass));n||i.css({visibility:"hidden",display:"block"});var r=this.getBoundingClientRect().height;n||i.css({visibility:"",display:""}),t=t<r?r:t}).css("height","".concat(t,"px"))}},{key:"_destroy",value:function(){this.$element.find(".".concat(this.options.linkClass)).off(".zf.tabs").hide().end().find(".".concat(this.options.panelClass)).hide(),this.options.matchHeight&&null!=this._setHeightMqHandler&&c()(window).off("changed.zf.mediaquery",this._setHeightMqHandler),this.options.deepLink&&c()(window).off("hashchange",this._checkDeepLink),this.onLoadListener&&c()(window).off(this.onLoadListener)}}])&&r(i.prototype,l),p&&r(i,p),e}();p.defaults={deepLink:!1,deepLinkSmudge:!1,deepLinkSmudgeDelay:300,updateHistory:!1,autoFocus:!1,wrapOnKeys:!0,matchHeight:!1,activeCollapse:!1,linkClass:"tabs-title",linkActiveClass:"is-active",panelClass:"tabs-panel",panelActiveClass:"is-active"}},"./js/foundation.toggler.js":function(t,e,i){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function o(t,e){return!e||"object"!==n(e)&&"function"!=typeof e?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t):e}function s(t){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}i.r(e),i.d(e,"Toggler",function(){return p});var l=i("jquery"),c=i.n(l),u=i("./js/foundation.util.motion.js"),d=i("./js/foundation.core.plugin.js"),h=i("./js/foundation.core.utils.js"),f=i("./js/foundation.util.triggers.js"),p=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),o(this,s(e).apply(this,arguments))}var i,n,l;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&a(t,e)}(e,d.Plugin),i=e,(n=[{key:"_setup",value:function(t,i){this.$element=t,this.options=c.a.extend({},e.defaults,t.data(),i),this.className="",this.className="Toggler",f.Triggers.init(c.a),this._init(),this._events()}},{key:"_init",value:function(){var t;this.options.animate?(t=this.options.animate.split(" "),this.animationIn=t[0],this.animationOut=t[1]||null):(t=this.$element.data("toggler"),this.className="."===t[0]?t.slice(1):t);var e=this.$element[0].id,i=c()('[data-open~="'.concat(e,'"], [data-close~="').concat(e,'"], [data-toggle~="').concat(e,'"]'));i.attr("aria-expanded",!this.$element.is(":hidden")),i.each(function(t,i){var n=c()(i),r=n.attr("aria-controls")||"";new RegExp("\\b".concat(Object(h.RegExpEscape)(e),"\\b")).test(r)||n.attr("aria-controls",r?"".concat(r," ").concat(e):e)})}},{key:"_events",value:function(){this.$element.off("toggle.zf.trigger").on("toggle.zf.trigger",this.toggle.bind(this))}},{key:"toggle",value:function(){this[this.options.animate?"_toggleAnimate":"_toggleClass"]()}},{key:"_toggleClass",value:function(){this.$element.toggleClass(this.className);var t=this.$element.hasClass(this.className);t?this.$element.trigger("on.zf.toggler"):this.$element.trigger("off.zf.toggler"),this._updateARIA(t),this.$element.find("[data-mutate]").trigger("mutateme.zf.trigger")}},{key:"_toggleAnimate",value:function(){var t=this;this.$element.is(":hidden")?u.Motion.animateIn(this.$element,this.animationIn,function(){t._updateARIA(!0),this.trigger("on.zf.toggler"),this.find("[data-mutate]").trigger("mutateme.zf.trigger")}):u.Motion.animateOut(this.$element,this.animationOut,function(){t._updateARIA(!1),this.trigger("off.zf.toggler"),this.find("[data-mutate]").trigger("mutateme.zf.trigger")})}},{key:"_updateARIA",value:function(t){var e=this.$element[0].id;c()('[data-open="'.concat(e,'"], [data-close="').concat(e,'"], [data-toggle="').concat(e,'"]')).attr({"aria-expanded":!!t})}},{key:"_destroy",value:function(){this.$element.off(".zf.toggler")}}])&&r(i.prototype,n),l&&r(i,l),e}();p.defaults={animate:!1}},"./js/foundation.tooltip.js":function(t,e,i){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function o(t,e){return!e||"object"!==n(e)&&"function"!=typeof e?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t):e}function s(t,e,i){return(s="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,i){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=a(t)););return t}(t,e);if(n){var r=Object.getOwnPropertyDescriptor(n,e);return r.get?r.get.call(i):r.value}})(t,e,i||t)}function a(t){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function l(t,e){return(l=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}i.r(e),i.d(e,"Tooltip",function(){return g});var c=i("jquery"),u=i.n(c),d=i("./js/foundation.core.utils.js"),h=i("./js/foundation.util.mediaQuery.js"),f=i("./js/foundation.util.triggers.js"),p=i("./js/foundation.positionable.js"),g=function(t){
function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),o(this,a(e).apply(this,arguments))}var i,n,c;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&l(t,e)}(e,p.Positionable),i=e,(n=[{key:"_setup",value:function(t,i){this.$element=t,this.options=u.a.extend({},e.defaults,this.$element.data(),i),this.className="Tooltip",this.isActive=!1,this.isClick=!1,f.Triggers.init(u.a),this._init()}},{key:"_init",value:function(){h.MediaQuery._init();var t=this.$element.attr("aria-describedby")||Object(d.GetYoDigits)(6,"tooltip");this.options.tipText=this.options.tipText||this.$element.attr("title"),this.template=this.options.template?u()(this.options.template):this._buildTemplate(t),this.options.allowHtml?this.template.appendTo(document.body).html(this.options.tipText).hide():this.template.appendTo(document.body).text(this.options.tipText).hide(),this.$element.attr({title:"","aria-describedby":t,"data-yeti-box":t,"data-toggle":t,"data-resize":t}).addClass(this.options.triggerClass),s(a(e.prototype),"_init",this).call(this),this._events()}},{key:"_getDefaultPosition",value:function(){var t=this.$element[0].className.match(/\b(top|left|right|bottom)\b/g);return t?t[0]:"top"}},{key:"_getDefaultAlignment",value:function(){return"center"}},{key:"_getHOffset",value:function(){return"left"===this.position||"right"===this.position?this.options.hOffset+this.options.tooltipWidth:this.options.hOffset}},{key:"_getVOffset",value:function(){return"top"===this.position||"bottom"===this.position?this.options.vOffset+this.options.tooltipHeight:this.options.vOffset}},{key:"_buildTemplate",value:function(t){var e="".concat(this.options.tooltipClass," ").concat(this.options.templateClasses).trim();return u()("<div></div>").addClass(e).attr({role:"tooltip","aria-hidden":!0,"data-is-active":!1,"data-is-focus":!1,id:t})}},{key:"_setPosition",value:function(){s(a(e.prototype),"_setPosition",this).call(this,this.$element,this.template)}},{key:"show",value:function(){return!("all"!==this.options.showOn&&!h.MediaQuery.is(this.options.showOn))&&(this.template.css("visibility","hidden").show(),this._setPosition(),this.template.removeClass("top bottom left right").addClass(this.position),this.template.removeClass("align-top align-bottom align-left align-right align-center").addClass("align-"+this.alignment),this.$element.trigger("closeme.zf.tooltip",this.template.attr("id")),this.template.attr({"data-is-active":!0,"aria-hidden":!1}),this.isActive=!0,this.template.stop().hide().css("visibility","").fadeIn(this.options.fadeInDuration,function(){}),this.$element.trigger("show.zf.tooltip"),void 0)}},{key:"hide",value:function(){var t=this;this.template.stop().attr({"aria-hidden":!0,"data-is-active":!1}).fadeOut(this.options.fadeOutDuration,function(){t.isActive=!1,t.isClick=!1}),this.$element.trigger("hide.zf.tooltip")}},{key:"_events",value:function(){var t=this,e=(this.template,!1);this.options.disableHover||this.$element.on("mouseenter.zf.tooltip",function(e){t.isActive||(t.timeout=setTimeout(function(){t.show()},t.options.hoverDelay))}).on("mouseleave.zf.tooltip",Object(d.ignoreMousedisappear)(function(i){clearTimeout(t.timeout),(!e||t.isClick&&!t.options.clickOpen)&&t.hide()})),this.options.clickOpen?this.$element.on("mousedown.zf.tooltip",function(e){e.stopImmediatePropagation(),t.isClick||(t.isClick=!0,!t.options.disableHover&&t.$element.attr("tabindex")||t.isActive||t.show())}):this.$element.on("mousedown.zf.tooltip",function(e){e.stopImmediatePropagation(),t.isClick=!0}),this.options.disableForTouch||this.$element.on("tap.zf.tooltip touchend.zf.tooltip",function(e){t.isActive?t.hide():t.show()}),this.$element.on({"close.zf.trigger":this.hide.bind(this)}),this.$element.on("focus.zf.tooltip",function(i){return e=!0,t.isClick?(t.options.clickOpen||(e=!1),!1):void t.show()}).on("focusout.zf.tooltip",function(i){e=!1,t.isClick=!1,t.hide()}).on("resizeme.zf.trigger",function(){t.isActive&&t._setPosition()})}},{key:"toggle",value:function(){this.isActive?this.hide():this.show()}},{key:"_destroy",value:function(){this.$element.attr("title",this.template.text()).off(".zf.trigger .zf.tooltip").removeClass(this.options.triggerClass).removeClass("top right left bottom").removeAttr("aria-describedby data-disable-hover data-resize data-toggle data-tooltip data-yeti-box"),this.template.remove()}}])&&r(i.prototype,n),c&&r(i,c),e}();g.defaults={disableForTouch:!1,hoverDelay:200,fadeInDuration:150,fadeOutDuration:150,disableHover:!1,templateClasses:"",tooltipClass:"tooltip",triggerClass:"has-tip",showOn:"small",template:"",tipText:"",touchCloseText:"Tap to close.",clickOpen:!0,position:"auto",alignment:"auto",allowOverlap:!1,allowBottomOverlap:!1,vOffset:0,hOffset:0,tooltipHeight:14,tooltipWidth:12,allowHtml:!1}},"./js/foundation.util.box.js":function(t,e,i){"use strict";function n(t,e,i,n,o){var s,a,l,c,u=r(t);if(e){var d=r(e);a=d.height+d.offset.top-(u.offset.top+u.height),s=u.offset.top-d.offset.top,l=u.offset.left-d.offset.left,c=d.width+d.offset.left-(u.offset.left+u.width)}else a=u.windowDims.height+u.windowDims.offset.top-(u.offset.top+u.height),s=u.offset.top-u.windowDims.offset.top,l=u.offset.left-u.windowDims.offset.left,c=u.windowDims.width-(u.offset.left+u.width);return a=o?0:Math.min(a,0),s=Math.min(s,0),l=Math.min(l,0),c=Math.min(c,0),i?l+c:n?s+a:Math.sqrt(s*s+a*a+l*l+c*c)}function r(t){if((t=t.length?t[0]:t)===window||t===document)throw new Error("I'm sorry, Dave. I'm afraid I can't do that.");var e=t.getBoundingClientRect(),i=t.parentNode.getBoundingClientRect(),n=document.body.getBoundingClientRect(),r=window.pageYOffset,o=window.pageXOffset;return{width:e.width,height:e.height,offset:{top:e.top+r,left:e.left+o},parentDims:{width:i.width,height:i.height,offset:{top:i.top+r,left:i.left+o}},windowDims:{width:n.width,height:n.height,offset:{top:r,left:o}}}}function o(t,e,i,n,o,s,a){var l,c,u=r(t),d=e?r(e):null;switch(i){case"top":l=d.offset.top-(u.height+o);break;case"bottom":l=d.offset.top+d.height+o;break;case"left":c=d.offset.left-(u.width+s);break;case"right":c=d.offset.left+d.width+s}switch(i){case"top":case"bottom":switch(n){case"left":c=d.offset.left+s;break;case"right":c=d.offset.left-u.width+d.width-s;break;case"center":c=a?s:d.offset.left+d.width/2-u.width/2+s}break;case"right":case"left":switch(n){case"bottom":l=d.offset.top-o+d.height-u.height;break;case"top":l=d.offset.top+o;break;case"center":l=d.offset.top+o+d.height/2-u.height/2}}return{top:l,left:c}}i.r(e),i.d(e,"Box",function(){return a});var s=i("./js/foundation.core.utils.js"),a={ImNotTouchingYou:function(t,e,i,r,o){return 0===n(t,e,i,r,o)},OverlapArea:n,GetDimensions:r,GetOffsets:function(t,e,i,n,r,a){switch(console.log("NOTE: GetOffsets is deprecated in favor of GetExplicitOffsets and will be removed in 6.5"),i){case"top":return Object(s.rtl)()?o(t,e,"top","left",n,r,a):o(t,e,"top","right",n,r,a);case"bottom":return Object(s.rtl)()?o(t,e,"bottom","left",n,r,a):o(t,e,"bottom","right",n,r,a);case"center top":return o(t,e,"top","center",n,r,a);case"center bottom":return o(t,e,"bottom","center",n,r,a);case"center left":return o(t,e,"left","center",n,r,a);case"center right":return o(t,e,"right","center",n,r,a);case"left bottom":return o(t,e,"bottom","left",n,r,a);case"right bottom":return o(t,e,"bottom","right",n,r,a);case"center":return{left:$eleDims.windowDims.offset.left+$eleDims.windowDims.width/2-$eleDims.width/2+r,top:$eleDims.windowDims.offset.top+$eleDims.windowDims.height/2-($eleDims.height/2+n)};case"reveal":return{left:($eleDims.windowDims.width-$eleDims.width)/2+r,top:$eleDims.windowDims.offset.top+n};case"reveal full":return{left:$eleDims.windowDims.offset.left,top:$eleDims.windowDims.offset.top};default:return{left:Object(s.rtl)()?$anchorDims.offset.left-$eleDims.width+$anchorDims.width-r:$anchorDims.offset.left+r,top:$anchorDims.offset.top+$anchorDims.height+n}}},GetExplicitOffsets:o}},"./js/foundation.util.imageLoader.js":function(t,e,i){"use strict";function n(t,e){function i(){0===--n&&e()}var n=t.length;0===n&&e(),t.each(function(){if(this.complete&&void 0!==this.naturalWidth)i();else{var t=new Image,e="load.zf.images error.zf.images";o()(t).one(e,function t(n){o()(this).off(e,t),i()}),t.src=o()(this).attr("src")}})}i.r(e),i.d(e,"onImagesLoaded",function(){return n});var r=i("jquery"),o=i.n(r)},"./js/foundation.util.keyboard.js":function(t,e,i){"use strict";function n(t){return!!t&&t.find("a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable]").filter(function(){return!(!s()(this).is(":visible")||s()(this).attr("tabindex")<0)})}function r(t){var e=l[t.which||t.keyCode]||String.fromCharCode(t.which).toUpperCase();return e=e.replace(/\W+/,""),t.shiftKey&&(e="SHIFT_".concat(e)),t.ctrlKey&&(e="CTRL_".concat(e)),t.altKey&&(e="ALT_".concat(e)),e=e.replace(/_$/,"")}i.r(e),i.d(e,"Keyboard",function(){return u});var o=i("jquery"),s=i.n(o),a=i("./js/foundation.core.utils.js"),l={9:"TAB",13:"ENTER",27:"ESCAPE",32:"SPACE",35:"END",36:"HOME",37:"ARROW_LEFT",38:"ARROW_UP",39:"ARROW_RIGHT",40:"ARROW_DOWN"},c={},u={keys:function(t){var e={};for(var i in t)e[t[i]]=t[i];return e}(l),parseKey:r,handleKey:function(t,e,i){var n,r=c[e],o=this.parseKey(t);if(!r)return console.warn("Component not defined!");if((n=i[(void 0===r.ltr?r:Object(a.rtl)()?s.a.extend({},r.ltr,r.rtl):s.a.extend({},r.rtl,r.ltr))[o]])&&"function"==typeof n){var l=n.apply();(i.handled||"function"==typeof i.handled)&&i.handled(l)}else(i.unhandled||"function"==typeof i.unhandled)&&i.unhandled()},findFocusable:n,register:function(t,e){c[t]=e},trapFocus:function(t){var e=n(t),i=e.eq(0),o=e.eq(-1);t.on("keydown.zf.trapfocus",function(t){t.target===o[0]&&"TAB"===r(t)?(t.preventDefault(),i.focus()):t.target===i[0]&&"SHIFT_TAB"===r(t)&&(t.preventDefault(),o.focus())})},releaseFocus:function(t){t.off("keydown.zf.trapfocus")}}},"./js/foundation.util.mediaQuery.js":function(t,e,i){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}i.r(e),i.d(e,"MediaQuery",function(){return s});var r=i("jquery"),o=i.n(r);window.matchMedia||(window.matchMedia=function(){var t=window.styleMedia||window.media;if(!t){var e,i=document.createElement("style"),n=document.getElementsByTagName("script")[0];i.type="text/css",i.id="matchmediajs-test",n?n.parentNode.insertBefore(i,n):document.head.appendChild(i),e="getComputedStyle"in window&&window.getComputedStyle(i,null)||i.currentStyle,t={matchMedium:function(t){var n="@media "+t+"{ #matchmediajs-test { width: 1px; } }";return i.styleSheet?i.styleSheet.cssText=n:i.textContent=n,"1px"===e.width}}}return function(e){return{matches:t.matchMedium(e||"all"),media:e||"all"}}}());var s={queries:[],current:"",_init:function(){o()("meta.foundation-mq").length||o()('<meta class="foundation-mq">').appendTo(document.head);var t,e,i,n=o()(".foundation-mq").css("font-family");for(var r in i={},t="string"==typeof(e=n)&&(e=e.trim().slice(1,-1))?i=e.split("&").reduce(function(t,e){var i=e.replace(/\+/g," ").split("="),n=i[0],r=i[1];return n=decodeURIComponent(n),r=void 0===r?null:decodeURIComponent(r),t.hasOwnProperty(n)?Array.isArray(t[n])?t[n].push(r):t[n]=[t[n],r]:t[n]=r,t},{}):i)t.hasOwnProperty(r)&&this.queries.push({name:r,value:"only screen and (min-width: ".concat(t[r],")")});this.current=this._getCurrentSize(),this._watcher()},atLeast:function(t){var e=this.get(t);return!!e&&window.matchMedia(e).matches},is:function(t){return 1<(t=t.trim().split(" ")).length&&"only"===t[1]?t[0]===this._getCurrentSize():this.atLeast(t[0])},get:function(t){for(var e in this.queries)if(this.queries.hasOwnProperty(e)){var i=this.queries[e];if(t===i.name)return i.value}return null},_getCurrentSize:function(){for(var t,e=0;e<this.queries.length;e++){var i=this.queries[e];window.matchMedia(i.value).matches&&(t=i)}return"object"===n(t)?t.name:t},_watcher:function(){var t=this;o()(window).off("resize.zf.mediaquery").on("resize.zf.mediaquery",function(){var e=t._getCurrentSize(),i=t.current;e!==i&&(t.current=e,o()(window).trigger("changed.zf.mediaquery",[e,i]))})}}},"./js/foundation.util.motion.js":function(t,e,i){"use strict";function n(t,e,i){var n,r,o=null;return 0===t?(i.apply(e),void e.trigger("finished.zf.animate",[e]).triggerHandler("finished.zf.animate",[e])):void(n=window.requestAnimationFrame(function s(a){o||(o=a),r=a-o,i.apply(e),r<t?n=window.requestAnimationFrame(s,e):(window.cancelAnimationFrame(n),e.trigger("finished.zf.animate",[e]).triggerHandler("finished.zf.animate",[e]))}))}function r(t,e,i,n){function r(){e[0].style.transitionDuration=0,e.removeClass("".concat(o," ").concat(u," ").concat(i))}if((e=s()(e).eq(0)).length){var o=t?l[0]:l[1],u=t?c[0]:c[1];r(),e.addClass(i).css("transition","none"),requestAnimationFrame(function(){e.addClass(o),t&&e.show()}),requestAnimationFrame(function(){e[0].offsetWidth,e.css("transition","").addClass(u)}),e.one(Object(a.transitionend)(e),function(){t||e.hide(),r(),n&&n.apply(e)})}}i.r(e),i.d(e,"Move",function(){return n}),i.d(e,"Motion",function(){return u});var o=i("jquery"),s=i.n(o),a=i("./js/foundation.core.utils.js"),l=["mui-enter","mui-leave"],c=["mui-enter-active","mui-leave-active"],u={animateIn:function(t,e,i){r(!0,t,e,i)},animateOut:function(t,e,i){r(!1,t,e,i)}}},"./js/foundation.util.nest.js":function(t,e,i){"use strict";i.r(e),i.d(e,"Nest",function(){return o});var n=i("jquery"),r=i.n(n),o={Feather:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"zf";t.attr("role","menubar");var i=t.find("li").attr({role:"menuitem"}),n="is-".concat(e,"-submenu"),o="".concat(n,"-item"),s="is-".concat(e,"-submenu-parent"),a="accordion"!==e;i.each(function(){var t=r()(this),i=t.children("ul");i.length&&(t.addClass(s),i.addClass("submenu ".concat(n)).attr({"data-submenu":""}),a&&(t.attr({"aria-haspopup":!0,"aria-label":t.children("a:first").text()}),"drilldown"===e&&t.attr({"aria-expanded":!1})),i.addClass("submenu ".concat(n)).attr({"data-submenu":"",role:"menubar"}),"drilldown"===e&&i.attr({"aria-hidden":!0})),t.parent("[data-submenu]").length&&t.addClass("is-submenu-item ".concat(o))})},Burn:function(t,e){var i="is-".concat(e,"-submenu"),n="".concat(i,"-item"),r="is-".concat(e,"-submenu-parent");t.find(">li, > li > ul, .menu, .menu > li, [data-submenu] > li").removeClass("".concat(i," ").concat(n," ").concat(r," is-submenu-item submenu is-active")).removeAttr("data-submenu").css("display","")}}},"./js/foundation.util.timer.js":function(t,e,i){"use strict";function n(t,e,i){var n,r,o=this,s=e.duration,a=Object.keys(t.data())[0]||"timer",l=-1;this.isPaused=!1,this.restart=function(){l=-1,clearTimeout(r),this.start()},this.start=function(){this.isPaused=!1,clearTimeout(r),l=l<=0?s:l,t.data("paused",!1),n=Date.now(),r=setTimeout(function(){e.infinite&&o.restart(),i&&"function"==typeof i&&i()},l),t.trigger("timerstart.zf.".concat(a))},this.pause=function(){this.isPaused=!0,clearTimeout(r),t.data("paused",!0);var e=Date.now();l-=e-n,t.trigger("timerpaused.zf.".concat(a))}}i.r(e),i.d(e,"Timer",function(){return n}),i("jquery")},"./js/foundation.util.touch.js":function(t,e,i){"use strict";function n(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function r(t){if(this.removeEventListener("touchmove",o),this.removeEventListener("touchend",r),!m){var e=f.a.Event("tap",d||t);f()(this).trigger(e)}d=null,m=g=!1}function o(t){if(f.a.spotSwipe.preventDefault&&t.preventDefault(),g){var e,i=t.touches[0].pageX,n=(t.touches[0].pageY,l-i);m=!0,u=(new Date).getTime()-c,Math.abs(n)>=f.a.spotSwipe.moveThreshold&&u<=f.a.spotSwipe.timeThreshold&&(e=0<n?"left":"right"),e&&(t.preventDefault(),r.apply(this,arguments),f()(this).trigger(f.a.Event("swipe",t),e).trigger(f.a.Event("swipe".concat(e),t)))}}function s(t){1==t.touches.length&&(l=t.touches[0].pageX,t.touches[0].pageY,d=t,m=!(g=!0),c=(new Date).getTime(),this.addEventListener("touchmove",o,!1),this.addEventListener("touchend",r,!1))}function a(){this.addEventListener&&this.addEventListener("touchstart",s,!1)}i.r(e),i.d(e,"Touch",function(){return p});var l,c,u,d,h=i("jquery"),f=i.n(h),p={},g=!1,m=!1,v=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.version="1.0.0",this.enabled="ontouchstart"in document.documentElement,this.preventDefault=!1,this.moveThreshold=75,this.timeThreshold=200,this.$=e,this._init()}var e,i,r;return e=t,(i=[{key:"_init",value:function(){var t=this.$;t.event.special.swipe={setup:a},t.event.special.tap={setup:a},t.each(["left","up","down","right"],function(){t.event.special["swipe".concat(this)]={setup:function(){t(this).on("swipe",t.noop)}}})}}])&&n(e.prototype,i),r&&n(e,r),t}();p.setupSpotSwipe=function(t){t.spotSwipe=new v(t)},p.setupTouchHandler=function(t){t.fn.addTouch=function(){this.each(function(i,n){t(n).bind("touchstart touchmove touchend touchcancel",function(t){e(t)})});var e=function(t){var e,i=t.changedTouches[0],n={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup"}[t.type];"MouseEvent"in window&&"function"==typeof window.MouseEvent?e=new window.MouseEvent(n,{bubbles:!0,cancelable:!0,screenX:i.screenX,screenY:i.screenY,clientX:i.clientX,clientY:i.clientY}):(e=document.createEvent("MouseEvent")).initMouseEvent(n,!0,!0,window,1,i.screenX,i.screenY,i.clientX,i.clientY,!1,!1,!1,!1,0,null),i.target.dispatchEvent(e)}}},p.init=function(t){void 0===t.spotSwipe&&(p.setupSpotSwipe(t),p.setupTouchHandler(t))}},"./js/foundation.util.triggers.js":function(t,e,i){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(t,e,i){var n,r=Array.prototype.slice.call(arguments,3);s()(window).off(e).on(e,function(e){n&&clearTimeout(n),n=setTimeout(function(){i.apply(null,r)},t||10)})}i.r(e),i.d(e,"Triggers",function(){return d});var o=i("jquery"),s=i.n(o),a=i("./js/foundation.core.utils.js"),l=i("./js/foundation.util.motion.js"),c=function(){for(var t=["WebKit","Moz","O","Ms",""],e=0;e<t.length;e++)if("".concat(t[e],"MutationObserver")in window)return window["".concat(t[e],"MutationObserver")];return!1}(),u=function(t,e){t.data(e).split(" ").forEach(function(i){s()("#".concat(i))["close"===e?"trigger":"triggerHandler"]("".concat(e,".zf.trigger"),[t])})},d={Listeners:{Basic:{},Global:{}},Initializers:{}};d.Listeners.Basic={openListener:function(){u(s()(this),"open")},closeListener:function(){s()(this).data("close")?u(s()(this),"close"):s()(this).trigger("close.zf.trigger")},toggleListener:function(){s()(this).data("toggle")?u(s()(this),"toggle"):s()(this).trigger("toggle.zf.trigger")},closeableListener:function(t){t.stopPropagation();var e=s()(this).data("closable");""!==e?l.Motion.animateOut(s()(this),e,function(){s()(this).trigger("closed.zf")}):s()(this).fadeOut().trigger("closed.zf")},toggleFocusListener:function(){var t=s()(this).data("toggle-focus");s()("#".concat(t)).triggerHandler("toggle.zf.trigger",[s()(this)])}},d.Initializers.addOpenListener=function(t){t.off("click.zf.trigger",d.Listeners.Basic.openListener),t.on("click.zf.trigger","[data-open]",d.Listeners.Basic.openListener)},d.Initializers.addCloseListener=function(t){t.off("click.zf.trigger",d.Listeners.Basic.closeListener),t.on("click.zf.trigger","[data-close]",d.Listeners.Basic.closeListener)},d.Initializers.addToggleListener=function(t){t.off("click.zf.trigger",d.Listeners.Basic.toggleListener),t.on("click.zf.trigger","[data-toggle]",d.Listeners.Basic.toggleListener)},d.Initializers.addCloseableListener=function(t){t.off("close.zf.trigger",d.Listeners.Basic.closeableListener),t.on("close.zf.trigger","[data-closeable], [data-closable]",d.Listeners.Basic.closeableListener)},d.Initializers.addToggleFocusListener=function(t){t.off("focus.zf.trigger blur.zf.trigger",d.Listeners.Basic.toggleFocusListener),t.on("focus.zf.trigger blur.zf.trigger","[data-toggle-focus]",d.Listeners.Basic.toggleFocusListener)},d.Listeners.Global={resizeListener:function(t){c||t.each(function(){s()(this).triggerHandler("resizeme.zf.trigger")}),t.attr("data-events","resize")},scrollListener:function(t){c||t.each(function(){s()(this).triggerHandler("scrollme.zf.trigger")}),t.attr("data-events","scroll")},closeMeListener:function(t,e){var i=t.namespace.split(".")[0];s()("[data-".concat(i,"]")).not('[data-yeti-box="'.concat(e,'"]')).each(function(){var t=s()(this);t.triggerHandler("close.zf.trigger",[t])})}},d.Initializers.addClosemeListener=function(t){var e=s()("[data-yeti-box]"),i=["dropdown","tooltip","reveal"];if(t&&("string"==typeof t?i.push(t):"object"===n(t)&&"string"==typeof t[0]?i.concat(t):console.error("Plugin names must be strings")),e.length){var r=i.map(function(t){return"closeme.zf.".concat(t)}).join(" ");s()(window).off(r).on(r,d.Listeners.Global.closeMeListener)}},d.Initializers.addResizeListener=function(t){var e=s()("[data-resize]");e.length&&r(t,"resize.zf.trigger",d.Listeners.Global.resizeListener,e)},d.Initializers.addScrollListener=function(t){var e=s()("[data-scroll]");e.length&&r(t,"scroll.zf.trigger",d.Listeners.Global.scrollListener,e)},d.Initializers.addMutationEventsListener=function(t){if(!c)return!1;var e=t.find("[data-resize], [data-scroll], [data-mutate]"),i=function(t){var e=s()(t[0].target);switch(t[0].type){case"attributes":"scroll"===e.attr("data-events")&&"data-events"===t[0].attributeName&&e.triggerHandler("scrollme.zf.trigger",[e,window.pageYOffset]),"resize"===e.attr("data-events")&&"data-events"===t[0].attributeName&&e.triggerHandler("resizeme.zf.trigger",[e]),"style"===t[0].attributeName&&(e.closest("[data-mutate]").attr("data-events","mutate"),e.closest("[data-mutate]").triggerHandler("mutateme.zf.trigger",[e.closest("[data-mutate]")]));break;case"childList":e.closest("[data-mutate]").attr("data-events","mutate"),e.closest("[data-mutate]").triggerHandler("mutateme.zf.trigger",[e.closest("[data-mutate]")]);break;default:return!1}};if(e.length)for(var n=0;n<=e.length-1;n++)new c(i).observe(e[n],{attributes:!0,childList:!0,characterData:!1,subtree:!0,attributeFilter:["data-events","style"]})},d.Initializers.addSimpleListeners=function(){var t=s()(document);d.Initializers.addOpenListener(t),d.Initializers.addCloseListener(t),d.Initializers.addToggleListener(t),d.Initializers.addCloseableListener(t),d.Initializers.addToggleFocusListener(t)},d.Initializers.addGlobalListeners=function(){var t=s()(document);d.Initializers.addMutationEventsListener(t),d.Initializers.addResizeListener(),d.Initializers.addScrollListener(),d.Initializers.addClosemeListener()},d.init=function(t,e){Object(a.onLoad)(t(window),function(){!0!==t.triggersInitialized&&(d.Initializers.addSimpleListeners(),d.Initializers.addGlobalListeners(),t.triggersInitialized=!0)}),e&&(e.Triggers=d,e.IHearYou=d.Initializers.addGlobalListeners)}},0:function(t,e,i){t.exports=i("./js/entries/foundation.js")},jquery:function(e,i){e.exports=t}})}),function(t,e){"function"==typeof define&&define.amd?define("mmenu",["jquery"],e):"object"==typeof exports?module.exports=e(require("jquery")):t.jquery_mmenu_js=e(t.jQuery)}(this,function(t){return!function(t){function e(){t[i].glbl||(a={$wndw:t(window),$docu:t(document),$html:t("html"),$body:t("body")},r={},o={},s={},t.each([r,o,s],function(t,e){e.add=function(t){t=t.split(" ");for(var i=0,n=t.length;i<n;i++)e[t[i]]=e.mm(t[i])}}),r.mm=function(t){return"mm-"+t},r.add("wrapper menu panels panel nopanel navbar listview nolistview listitem btn hidden"),r.umm=function(t){return"mm-"==t.slice(0,3)&&(t=t.slice(3)),t},o.mm=function(t){return"mm-"+t},o.add("parent child title"),s.mm=function(t){return t+".mm"},s.add("transitionend webkitTransitionEnd click scroll resize keydown mousedown mouseup touchstart touchmove touchend orientationchange"),t[i]._c=r,t[i]._d=o,t[i]._e=s,t[i].glbl=a)}var i="mmenu",n="7.0.5";if(!(t[i]&&t[i].version>n)){t[i]=function(t,e,i){return this.$menu=t,this._api=["bind","getInstance","initPanels","openPanel","closePanel","closeAllPanels","setSelected"],this.opts=e,this.conf=i,this.vars={},this.cbck={},this.mtch={},"function"==typeof this.___deprecated&&this.___deprecated(),this._initHooks(),this._initWrappers(),this._initAddons(),this._initExtensions(),this._initMenu(),this._initPanels(),this._initOpened(),this._initAnchors(),this._initMatchMedia(),"function"==typeof this.___debug&&this.___debug(),this},t[i].version=n,t[i].uniqueId=0,t[i].wrappers={},t[i].addons={},t[i].defaults={hooks:{},extensions:[],wrappers:[],navbar:{add:!0,title:"Menu",titleLink:"parent"},onClick:{setSelected:!0},slidingSubmenus:!0},t[i].configuration={classNames:{divider:"Divider",inset:"Inset",nolistview:"NoListview",nopanel:"NoPanel",panel:"Panel",selected:"Selected",spacer:"Spacer",vertical:"Vertical"},clone:!1,openingInterval:25,panelNodetype:"ul, ol, div",transitionDuration:400},t[i].prototype={getInstance:function(){return this},initPanels:function(t){this._initPanels(t)},openPanel:function(e,n){if(this.trigger("openPanel:before",e),e&&e.length&&(e.is("."+r.panel)||(e=e.closest("."+r.panel)),e.is("."+r.panel))){var s=this;if("boolean"!=typeof n&&(n=!0),e.parent("."+r.listitem+"_vertical").length)e.parents("."+r.listitem+"_vertical").addClass(r.listitem+"_opened").children("."+r.panel).removeClass(r.hidden),this.openPanel(e.parents("."+r.panel).not(function(){return t(this).parent("."+r.listitem+"_vertical").length}).first()),this.trigger("openPanel:start",e),this.trigger("openPanel:finish",e);else{if(e.hasClass(r.panel+"_opened"))return;var a=this.$pnls.children("."+r.panel),l=this.$pnls.children("."+r.panel+"_opened");if(!t[i].support.csstransitions)return l.addClass(r.hidden).removeClass(r.panel+"_opened"),e.removeClass(r.hidden).addClass(r.panel+"_opened"),this.trigger("openPanel:start",e),void this.trigger("openPanel:finish",e);a.not(e).removeClass(r.panel+"_opened-parent");for(var c=e.data(o.parent);c;)c=c.closest("."+r.panel),c.parent("."+r.listitem+"_vertical").length||c.addClass(r.panel+"_opened-parent"),c=c.data(o.parent);a.removeClass(r.panel+"_highest").not(l).not(e).addClass(r.hidden),e.removeClass(r.hidden);var u=function(){l.removeClass(r.panel+"_opened"),e.addClass(r.panel+"_opened"),e.hasClass(r.panel+"_opened-parent")?(l.addClass(r.panel+"_highest"),e.removeClass(r.panel+"_opened-parent")):(l.addClass(r.panel+"_opened-parent"),e.addClass(r.panel+"_highest")),s.trigger("openPanel:start",e)},d=function(){l.removeClass(r.panel+"_highest").addClass(r.hidden),e.removeClass(r.panel+"_highest"),s.trigger("openPanel:finish",e)};n&&!e.hasClass(r.panel+"_noanimation")?setTimeout(function(){s.__transitionend(e,function(){d()},s.conf.transitionDuration),u()},s.conf.openingInterval):(u(),d())}this.trigger("openPanel:after",e)}},closePanel:function(t){this.trigger("closePanel:before",t);var e=t.parent();e.hasClass(r.listitem+"_vertical")&&(e.removeClass(r.listitem+"_opened"),t.addClass(r.hidden),this.trigger("closePanel",t)),this.trigger("closePanel:after",t)},closeAllPanels:function(t){this.trigger("closeAllPanels:before"),this.$pnls.find("."+r.listview).children().removeClass(r.listitem+"_selected").filter("."+r.listitem+"_vertical").removeClass(r.listitem+"_opened");var e=this.$pnls.children("."+r.panel),i=t&&t.length?t:e.first();this.$pnls.children("."+r.panel).not(i).removeClass(r.panel+"_opened").removeClass(r.panel+"_opened-parent").removeClass(r.panel+"_highest").addClass(r.hidden),this.openPanel(i,!1),this.trigger("closeAllPanels:after")},togglePanel:function(t){var e=t.parent();e.hasClass(r.listitem+"_vertical")&&this[e.hasClass(r.listitem+"_opened")?"closePanel":"openPanel"](t)},setSelected:function(t){this.trigger("setSelected:before",t),this.$menu.find("."+r.listitem+"_selected").removeClass(r.listitem+"_selected"),t.addClass(r.listitem+"_selected"),this.trigger("setSelected:after",t)},bind:function(t,e){this.cbck[t]=this.cbck[t]||[],this.cbck[t].push(e)},trigger:function(){var t=this,e=Array.prototype.slice.call(arguments),i=e.shift();if(this.cbck[i])for(var n=0,r=this.cbck[i].length;n<r;n++)this.cbck[i][n].apply(t,e)},matchMedia:function(t,e,i){var n={yes:e,no:i};this.mtch[t]=this.mtch[t]||[],this.mtch[t].push(n)},_initHooks:function(){for(var t in this.opts.hooks)this.bind(t,this.opts.hooks[t])},_initWrappers:function(){this.trigger("initWrappers:before");for(var e=0;e<this.opts.wrappers.length;e++){var n=t[i].wrappers[this.opts.wrappers[e]];"function"==typeof n&&n.call(this)}this.trigger("initWrappers:after")},_initAddons:function(){this.trigger("initAddons:before");var e;for(e in t[i].addons)t[i].addons[e].add.call(this),t[i].addons[e].add=function(){};for(e in t[i].addons)t[i].addons[e].setup.call(this);this.trigger("initAddons:after")},_initExtensions:function(){this.trigger("initExtensions:before");var t=this;this.opts.extensions.constructor===Array&&(this.opts.extensions={all:this.opts.extensions});for(var e in this.opts.extensions)this.opts.extensions[e]=this.opts.extensions[e].length?r.menu+"_"+this.opts.extensions[e].join(" "+r.menu+"_"):"",this.opts.extensions[e]&&!function(e){t.matchMedia(e,function(){this.$menu.addClass(this.opts.extensions[e])},function(){this.$menu.removeClass(this.opts.extensions[e])})}(e);this.trigger("initExtensions:after")},_initMenu:function(){this.trigger("initMenu:before"),this.conf.clone&&(this.$orig=this.$menu,this.$menu=this.$orig.clone(),this.$menu.add(this.$menu.find("[id]")).filter("[id]").each(function(){t(this).attr("id",r.mm(t(this).attr("id")))})),this.$menu.attr("id",this.$menu.attr("id")||this.__getUniqueId()),this.$pnls=t('<div class="'+r.panels+'" />').append(this.$menu.children(this.conf.panelNodetype)).prependTo(this.$menu),this.$menu.addClass(r.menu).parent().addClass(r.wrapper),this.trigger("initMenu:after")},_initPanels:function(e){this.trigger("initPanels:before",e),e=e||this.$pnls.children(this.conf.panelNodetype);var i=t(),n=this,o=function(e){e.filter(n.conf.panelNodetype).each(function(e){var s=n._initPanel(t(this));if(s){n._initNavbar(s),n._initListview(s),i=i.add(s);var a=s.children("."+r.listview).children("li").children(n.conf.panelNodetype).add(s.children("."+n.conf.classNames.panel));a.length&&o(a)}})};o(e),this.trigger("initPanels:after",i)},_initPanel:function(t){if(this.trigger("initPanel:before",t),t.hasClass(r.panel))return t;if(this.__refactorClass(t,this.conf.classNames.panel,r.panel),this.__refactorClass(t,this.conf.classNames.nopanel,r.nopanel),this.__refactorClass(t,this.conf.classNames.inset,r.listview+"_inset"),t.filter("."+r.listview+"_inset").addClass(r.nopanel),t.hasClass(r.nopanel))return!1;var e=t.hasClass(this.conf.classNames.vertical)||!this.opts.slidingSubmenus;t.removeClass(this.conf.classNames.vertical);var i=t.attr("id")||this.__getUniqueId();t.is("ul, ol")&&(t.removeAttr("id"),t.wrap("<div />"),t=t.parent()),t.attr("id",i),t.addClass(r.panel+" "+r.hidden);var n=t.parent("li");return e?n.addClass(r.listitem+"_vertical"):t.appendTo(this.$pnls),n.length&&(n.data(o.child,t),t.data(o.parent,n)),this.trigger("initPanel:after",t),t},_initNavbar:function(e){if(this.trigger("initNavbar:before",e),!e.children("."+r.navbar).length){var i=e.data(o.parent),n=t('<div class="'+r.navbar+'" />'),s=this.__getPanelTitle(e,this.opts.navbar.title),a="";if(i&&i.length){if(i.hasClass(r.listitem+"_vertical"))return;if(i.parent().is("."+r.listview))var l=i.children("a, span").not("."+r.btn+"_next");else var l=i.closest("."+r.panel).find('a[href="#'+e.attr("id")+'"]');
l=l.first(),i=l.closest("."+r.panel);var c=i.attr("id");switch(s=this.__getPanelTitle(e,t("<span>"+l.text()+"</span>").text()),this.opts.navbar.titleLink){case"anchor":a=l.attr("href");break;case"parent":a="#"+c}n.append('<a class="'+r.btn+" "+r.btn+"_prev "+r.navbar+'__btn" href="#'+c+'" />')}else if(!this.opts.navbar.title)return;this.opts.navbar.add&&e.addClass(r.panel+"_has-navbar"),n.append('<a class="'+r.navbar+'__title"'+(a.length?' href="'+a+'"':"")+">"+s+"</a>").prependTo(e),this.trigger("initNavbar:after",e)}},_initListview:function(e){this.trigger("initListview:before",e);var i=this.__childAddBack(e,"ul, ol");this.__refactorClass(i,this.conf.classNames.nolistview,r.nolistview);var n=i.not("."+r.nolistview).addClass(r.listview).children().addClass(r.listitem);this.__refactorClass(n,this.conf.classNames.selected,r.listitem+"_selected"),this.__refactorClass(n,this.conf.classNames.divider,r.listitem+"_divider"),this.__refactorClass(n,this.conf.classNames.spacer,r.listitem+"_spacer");var s=e.data(o.parent);if(s&&s.is("."+r.listitem)&&!s.children("."+r.btn+"_next").length){var a=s.children("a, span").first(),l=t('<a class="'+r.btn+'_next" href="#'+e.attr("id")+'" />').insertBefore(a);a.is("span")&&l.addClass(r.btn+"_fullwidth")}this.trigger("initListview:after",e)},_initOpened:function(){this.trigger("initOpened:before");var t=this.$pnls.find("."+r.listitem+"_selected").removeClass(r.listitem+"_selected").last().addClass(r.listitem+"_selected"),e=t.length?t.closest("."+r.panel):this.$pnls.children("."+r.panel).first();this.openPanel(e,!1),this.trigger("initOpened:after")},_initAnchors:function(){this.trigger("initAnchors:before");var e=this;a.$body.on(s.click+"-oncanvas","a[href]",function(n){var o=t(this),s=o.attr("href"),a=e.$menu.find(o).length,l=o.is("."+r.listitem+" > a"),c=o.is('[rel="external"]')||o.is('[target="_blank"]');if(a&&s.length>1&&"#"==s.slice(0,1))try{var u=e.$menu.find(s);if(u.is("."+r.panel))return e[o.parent().hasClass(r.listitem+"_vertical")?"togglePanel":"openPanel"](u),void n.preventDefault()}catch(t){}var d={close:null,setSelected:null,preventDefault:"#"==s.slice(0,1)};for(var h in t[i].addons){var f=t[i].addons[h].clickAnchor.call(e,o,a,l,c);if(f){if("boolean"==typeof f)return void n.preventDefault();"object"==typeof f&&(d=t.extend({},d,f))}}a&&l&&!c&&(e.__valueOrFn(o,e.opts.onClick.setSelected,d.setSelected)&&e.setSelected(t(n.target).parent()),e.__valueOrFn(o,e.opts.onClick.preventDefault,d.preventDefault)&&n.preventDefault(),e.__valueOrFn(o,e.opts.onClick.close,d.close)&&e.opts.offCanvas&&"function"==typeof e.close&&e.close())}),this.trigger("initAnchors:after")},_initMatchMedia:function(){var t=this;for(var e in this.mtch)!function(){var i=e,n=window.matchMedia(i);t._fireMatchMedia(i,n),n.addListener(function(e){t._fireMatchMedia(i,e)})}()},_fireMatchMedia:function(t,e){for(var i=e.matches?"yes":"no",n=0;n<this.mtch[t].length;n++)this.mtch[t][n][i].call(this)},_getOriginalMenuId:function(){var t=this.$menu.attr("id");return this.conf.clone&&t&&t.length&&(t=r.umm(t)),t},__api:function(){var e=this,i={};return t.each(this._api,function(t){var n=this;i[n]=function(){var t=e[n].apply(e,arguments);return"undefined"==typeof t?i:t}}),i},__valueOrFn:function(t,e,i){if("function"==typeof e){var n=e.call(t[0]);if("undefined"!=typeof n)return n}return"function"!=typeof e&&"undefined"!=typeof e||"undefined"==typeof i?e:i},__getPanelTitle:function(e,n){var r;return"function"==typeof this.opts.navbar.title&&(r=this.opts.navbar.title.call(e[0])),"undefined"==typeof r&&(r=e.data(o.title)),"undefined"!=typeof r?r:"string"==typeof n?t[i].i18n(n):t[i].i18n(t[i].defaults.navbar.title)},__refactorClass:function(t,e,i){return t.filter("."+e).removeClass(e).addClass(i)},__findAddBack:function(t,e){return t.find(e).add(t.filter(e))},__childAddBack:function(t,e){return t.children(e).add(t.filter(e))},__filterListItems:function(t){return t.not("."+r.listitem+"_divider").not("."+r.hidden)},__filterListItemAnchors:function(t){return this.__filterListItems(t).children("a").not("."+r.btn+"_next")},__openPanelWoAnimation:function(t){t.hasClass(r.panel+"_noanimation")||(t.addClass(r.panel+"_noanimation"),this.__transitionend(t,function(){t.removeClass(r.panel+"_noanimation")},this.conf.openingInterval),this.openPanel(t))},__transitionend:function(t,e,i){var n=!1,r=function(i){"undefined"!=typeof i&&i.target!=t[0]||(n||(t.off(s.transitionend),t.off(s.webkitTransitionEnd),e.call(t[0])),n=!0)};t.on(s.transitionend,r),t.on(s.webkitTransitionEnd,r),setTimeout(r,1.1*i)},__getUniqueId:function(){return r.mm(t[i].uniqueId++)}},t.fn[i]=function(n,r){e(),n=t.extend(!0,{},t[i].defaults,n),r=t.extend(!0,{},t[i].configuration,r);var o=t();return this.each(function(){var e=t(this);if(!e.data(i)){var s=new t[i](e,n,r);s.$menu.data(i,s.__api()),o=o.add(s.$menu)}}),o},t[i].i18n=function(){var e={};return function(i){switch(typeof i){case"object":return t.extend(e,i),e;case"string":return e[i]||i;case"undefined":default:return e}}}(),t[i].support={touch:"ontouchstart"in window||navigator.msMaxTouchPoints||!1,csstransitions:function(){return"undefined"==typeof Modernizr||"undefined"==typeof Modernizr.csstransitions||Modernizr.csstransitions}(),csstransforms:function(){return"undefined"==typeof Modernizr||"undefined"==typeof Modernizr.csstransforms||Modernizr.csstransforms}(),csstransforms3d:function(){return"undefined"==typeof Modernizr||"undefined"==typeof Modernizr.csstransforms3d||Modernizr.csstransforms3d}()};var r,o,s,a}}(t),!function(t){var e="mmenu",i="offCanvas";t[e].addons[i]={setup:function(){if(this.opts[i]){var r=this.opts[i],o=this.conf[i];s=t[e].glbl,this._api=t.merge(this._api,["open","close","setPage"]),"object"!=typeof r&&(r={}),r=this.opts[i]=t.extend(!0,{},t[e].defaults[i],r),"string"!=typeof o.pageSelector&&(o.pageSelector="> "+o.pageNodetype),this.vars.opened=!1;var a=[n.menu+"_offcanvas"];t[e].support.csstransforms||a.push(n["no-csstransforms"]),t[e].support.csstransforms3d||a.push(n["no-csstransforms3d"]),this.bind("initMenu:after",function(){var t=this;this.setPage(s.$page),this._initBlocker(),this["_initWindow_"+i](),this.$menu.addClass(a.join(" ")).parent("."+n.wrapper).removeClass(n.wrapper),this.$menu[o.menuInsertMethod](o.menuInsertSelector);var e=window.location.hash;if(e){var r=this._getOriginalMenuId();r&&r==e.slice(1)&&setTimeout(function(){t.open()},1e3)}}),this.bind("open:start:sr-aria",function(){this.__sr_aria(this.$menu,"hidden",!1)}),this.bind("close:finish:sr-aria",function(){this.__sr_aria(this.$menu,"hidden",!0)}),this.bind("initMenu:after:sr-aria",function(){this.__sr_aria(this.$menu,"hidden",!0)})}},add:function(){n=t[e]._c,r=t[e]._d,o=t[e]._e,n.add("slideout page no-csstransforms3d"),r.add("style")},clickAnchor:function(t,e){var r=this;if(this.opts[i]){var o=this._getOriginalMenuId();if(o&&t.is('[href="#'+o+'"]')){if(e)return this.open(),!0;var a=t.closest("."+n.menu);if(a.length){var l=a.data("mmenu");if(l&&l.close)return l.close(),r.__transitionend(a,function(){r.open()},r.conf.transitionDuration),!0}return this.open(),!0}if(s.$page)return o=s.$page.first().attr("id"),o&&t.is('[href="#'+o+'"]')?(this.close(),!0):void 0}}},t[e].defaults[i]={blockUI:!0,moveBackground:!0},t[e].configuration[i]={pageNodetype:"div",pageSelector:null,noPageSelector:[],wrapPageIfNeeded:!0,menuInsertMethod:"prependTo",menuInsertSelector:"body"},t[e].prototype.open=function(){if(this.trigger("open:before"),!this.vars.opened){var t=this;this._openSetup(),setTimeout(function(){t._openFinish()},this.conf.openingInterval),this.trigger("open:after")}},t[e].prototype._openSetup=function(){var e=this,a=this.opts[i];this.closeAllOthers(),s.$page.each(function(){t(this).data(r.style,t(this).attr("style")||"")}),s.$wndw.trigger(o.resize+"-"+i,[!0]);var l=[n.wrapper+"_opened"];a.blockUI&&l.push(n.wrapper+"_blocking"),"modal"==a.blockUI&&l.push(n.wrapper+"_modal"),a.moveBackground&&l.push(n.wrapper+"_background"),s.$html.addClass(l.join(" ")),setTimeout(function(){e.vars.opened=!0},this.conf.openingInterval),this.$menu.addClass(n.menu+"_opened")},t[e].prototype._openFinish=function(){var t=this;this.__transitionend(s.$page.first(),function(){t.trigger("open:finish")},this.conf.transitionDuration),this.trigger("open:start"),s.$html.addClass(n.wrapper+"_opening")},t[e].prototype.close=function(){if(this.trigger("close:before"),this.vars.opened){var e=this;this.__transitionend(s.$page.first(),function(){e.$menu.removeClass(n.menu+"_opened");var i=[n.wrapper+"_opened",n.wrapper+"_blocking",n.wrapper+"_modal",n.wrapper+"_background"];s.$html.removeClass(i.join(" ")),s.$page.each(function(){t(this).attr("style",t(this).data(r.style))}),e.vars.opened=!1,e.trigger("close:finish")},this.conf.transitionDuration),this.trigger("close:start"),s.$html.removeClass(n.wrapper+"_opening"),this.trigger("close:after")}},t[e].prototype.closeAllOthers=function(){s.$body.find("."+n.menu+"_offcanvas").not(this.$menu).each(function(){var i=t(this).data(e);i&&i.close&&i.close()})},t[e].prototype.setPage=function(e){this.trigger("setPage:before",e);var r=this,o=this.conf[i];e&&e.length||(e=s.$body.find(o.pageSelector),o.noPageSelector.length&&(e=e.not(o.noPageSelector.join(", "))),e.length>1&&o.wrapPageIfNeeded&&(e=e.wrapAll("<"+this.conf[i].pageNodetype+" />").parent())),e.each(function(){t(this).attr("id",t(this).attr("id")||r.__getUniqueId())}),e.addClass(n.page+" "+n.slideout),s.$page=e,this.trigger("setPage:after",e)},t[e].prototype["_initWindow_"+i]=function(){s.$wndw.off(o.keydown+"-"+i).on(o.keydown+"-"+i,function(t){if(s.$html.hasClass(n.wrapper+"_opened")&&9==t.keyCode)return t.preventDefault(),!1});var t=0;s.$wndw.off(o.resize+"-"+i).on(o.resize+"-"+i,function(e,i){if(1==s.$page.length&&(i||s.$html.hasClass(n.wrapper+"_opened"))){var r=s.$wndw.height();(i||r!=t)&&(t=r,s.$page.css("minHeight",r))}})},t[e].prototype._initBlocker=function(){var e=this;this.opts[i].blockUI&&(s.$blck||(s.$blck=t('<div class="'+n.page+"__blocker "+n.slideout+'" />')),s.$blck.appendTo(s.$body).off(o.touchstart+"-"+i+" "+o.touchmove+"-"+i).on(o.touchstart+"-"+i+" "+o.touchmove+"-"+i,function(t){t.preventDefault(),t.stopPropagation(),s.$blck.trigger(o.mousedown+"-"+i)}).off(o.mousedown+"-"+i).on(o.mousedown+"-"+i,function(t){t.preventDefault(),s.$html.hasClass(n.wrapper+"_modal")||(e.closeAllOthers(),e.close())}))};var n,r,o,s}(t),!function(t){var e="mmenu",i="screenReader";t[e].addons[i]={setup:function(){var o=this,a=this.opts[i],l=this.conf[i];s=t[e].glbl,"boolean"==typeof a&&(a={aria:a,text:a}),"object"!=typeof a&&(a={}),a=this.opts[i]=t.extend(!0,{},t[e].defaults[i],a),a.aria&&(this.bind("initAddons:after",function(){this.bind("initMenu:after",function(){this.trigger("initMenu:after:sr-aria")}),this.bind("initNavbar:after",function(){this.trigger("initNavbar:after:sr-aria",arguments[0])}),this.bind("openPanel:start",function(){this.trigger("openPanel:start:sr-aria",arguments[0])}),this.bind("close:start",function(){this.trigger("close:start:sr-aria")}),this.bind("close:finish",function(){this.trigger("close:finish:sr-aria")}),this.bind("open:start",function(){this.trigger("open:start:sr-aria")}),this.bind("initOpened:after",function(){this.trigger("initOpened:after:sr-aria")})}),this.bind("updateListview",function(){this.$pnls.find("."+n.listview).children().each(function(){o.__sr_aria(t(this),"hidden",t(this).is("."+n.hidden))})}),this.bind("openPanel:start",function(t){var e=this.$menu.find("."+n.panel).not(t).not(t.parents("."+n.panel)),i=t.add(t.find("."+n.listitem+"_vertical ."+n.listitem+"_opened").children("."+n.panel));this.__sr_aria(e,"hidden",!0),this.__sr_aria(i,"hidden",!1)}),this.bind("closePanel",function(t){this.__sr_aria(t,"hidden",!0)}),this.bind("initPanels:after",function(e){var i=e.find("."+n.btn).each(function(){o.__sr_aria(t(this),"owns",t(this).attr("href").replace("#",""))});this.__sr_aria(i,"haspopup",!0)}),this.bind("initNavbar:after",function(t){var e=t.children("."+n.navbar);this.__sr_aria(e,"hidden",!t.hasClass(n.panel+"_has-navbar"))}),a.text&&(this.bind("initlistview:after",function(t){var e=t.find("."+n.listview).find("."+n.btn+"_fullwidth").parent().children("span");this.__sr_aria(e,"hidden",!0)}),"parent"==this.opts.navbar.titleLink&&this.bind("initNavbar:after",function(t){var e=t.children("."+n.navbar),i=!!e.children("."+n.btn+"_prev").length;this.__sr_aria(e.children("."+n.title),"hidden",i)}))),a.text&&(this.bind("initAddons:after",function(){this.bind("setPage:after",function(){this.trigger("setPage:after:sr-text",arguments[0])})}),this.bind("initNavbar:after",function(i){var r=i.children("."+n.navbar),o=r.children("."+n.title).text(),s=t[e].i18n(l.text.closeSubmenu);o&&(s+=" ("+o+")"),r.children("."+n.btn+"_prev").html(this.__sr_text(s))}),this.bind("initListview:after",function(i){var s=i.data(r.parent);if(s&&s.length){var a=s.children("."+n.btn+"_next"),c=a.nextAll("span, a").first().text(),u=t[e].i18n(l.text[a.parent().is("."+n.listitem+"_vertical")?"toggleSubmenu":"openSubmenu"]);c&&(u+=" ("+c+")"),a.html(o.__sr_text(u))}}))},add:function(){n=t[e]._c,r=t[e]._d,o=t[e]._e,n.add("sronly")},clickAnchor:function(t,e){}},t[e].defaults[i]={aria:!0,text:!0},t[e].configuration[i]={text:{closeMenu:"Close menu",closeSubmenu:"Close submenu",openSubmenu:"Open submenu",toggleSubmenu:"Toggle submenu"}},t[e].prototype.__sr_aria=function(t,e,i){t.prop("aria-"+e,i)[i?"attr":"removeAttr"]("aria-"+e,i)},t[e].prototype.__sr_role=function(t,e){t.prop("role",e)[e?"attr":"removeAttr"]("role",e)},t[e].prototype.__sr_text=function(t){return'<span class="'+n.sronly+'">'+t+"</span>"};var n,r,o,s}(t),!function(t){var e="mmenu",i="scrollBugFix";t[e].addons[i]={setup:function(){var r=this.opts[i];this.conf[i],s=t[e].glbl,t[e].support.touch&&this.opts.offCanvas&&this.opts.offCanvas.blockUI&&("boolean"==typeof r&&(r={fix:r}),"object"!=typeof r&&(r={}),r=this.opts[i]=t.extend(!0,{},t[e].defaults[i],r),r.fix&&(this.bind("open:start",function(){this.$pnls.children("."+n.panel+"_opened").scrollTop(0)}),this.bind("initMenu:after",function(){this["_initWindow_"+i]()})))},add:function(){n=t[e]._c,r=t[e]._d,o=t[e]._e},clickAnchor:function(t,e){}},t[e].defaults[i]={fix:!0},t[e].prototype["_initWindow_"+i]=function(){var e=this;s.$docu.off(o.touchmove+"-"+i).on(o.touchmove+"-"+i,function(t){s.$html.hasClass(n.wrapper+"_opened")&&t.preventDefault()});var r=!1;s.$body.off(o.touchstart+"-"+i).on(o.touchstart+"-"+i,"."+n.panels+"> ."+n.panel,function(t){s.$html.hasClass(n.wrapper+"_opened")&&(r||(r=!0,0===t.currentTarget.scrollTop?t.currentTarget.scrollTop=1:t.currentTarget.scrollHeight===t.currentTarget.scrollTop+t.currentTarget.offsetHeight&&(t.currentTarget.scrollTop-=1),r=!1))}).off(o.touchmove+"-"+i).on(o.touchmove+"-"+i,"."+n.panels+"> ."+n.panel,function(e){s.$html.hasClass(n.wrapper+"_opened")&&t(this)[0].scrollHeight>t(this).innerHeight()&&e.stopPropagation()}),s.$wndw.off(o.orientationchange+"-"+i).on(o.orientationchange+"-"+i,function(){e.$pnls.children("."+n.panel+"_opened").scrollTop(0).css({"-webkit-overflow-scrolling":"auto"}).css({"-webkit-overflow-scrolling":"touch"})})};var n,r,o,s}(t),!0});var Mailcheck={domainThreshold:2,secondLevelThreshold:2,topLevelThreshold:2,defaultDomains:["msn.com","bellsouth.net","telus.net","comcast.net","optusnet.com.au","earthlink.net","qq.com","sky.com","icloud.com","mac.com","sympatico.ca","googlemail.com","att.net","xtra.co.nz","web.de","cox.net","gmail.com","ymail.com","aim.com","rogers.com","verizon.net","rocketmail.com","google.com","optonline.net","sbcglobal.net","aol.com","me.com","btinternet.com","charter.net","shaw.ca"],defaultSecondLevelDomains:["yahoo","hotmail","mail","live","outlook","gmx"],defaultTopLevelDomains:["com","com.au","com.tw","ca","co.nz","co.uk","de","fr","it","ru","net","org","edu","gov","jp","nl","kr","se","eu","ie","co.il","us","at","be","dk","hk","es","gr","ch","no","cz","in","net","net.au","info","biz","mil","co.jp","sg","hu"],run:function(t){t.domains=t.domains||Mailcheck.defaultDomains,t.secondLevelDomains=t.secondLevelDomains||Mailcheck.defaultSecondLevelDomains,t.topLevelDomains=t.topLevelDomains||Mailcheck.defaultTopLevelDomains,t.distanceFunction=t.distanceFunction||Mailcheck.sift3Distance;var e=function(t){return t},i=t.suggested||e,n=t.empty||e,r=Mailcheck.suggest(Mailcheck.encodeEmail(t.email),t.domains,t.secondLevelDomains,t.topLevelDomains,t.distanceFunction);return r?i(r):n()},suggest:function(t,e,i,n,r){t=t.toLowerCase();var o=this.splitEmail(t);if(i&&n&&-1!==i.indexOf(o.secondLevelDomain)&&-1!==n.indexOf(o.topLevelDomain))return!1;var s=this.findClosestDomain(o.domain,e,r,this.domainThreshold);if(s)return s!=o.domain&&{address:o.address,domain:s,full:o.address+"@"+s};var a=this.findClosestDomain(o.secondLevelDomain,i,r,this.secondLevelThreshold),l=this.findClosestDomain(o.topLevelDomain,n,r,this.topLevelThreshold);if(o.domain){var s=o.domain,c=!1;if(a&&a!=o.secondLevelDomain&&(s=s.replace(o.secondLevelDomain,a),c=!0),l&&l!=o.topLevelDomain&&(s=s.replace(o.topLevelDomain,l),c=!0),1==c)return{address:o.address,domain:s,full:o.address+"@"+s}}return!1},findClosestDomain:function(t,e,i,n){n=n||this.topLevelThreshold;var r,o=99,s=null;if(!t||!e)return!1;i||(i=this.sift3Distance);for(var a=0;a<e.length;a++){if(t===e[a])return t;r=i(t,e[a]),o>r&&(o=r,s=e[a])}return n>=o&&null!==s&&s},sift3Distance:function(t,e){if(null==t||0===t.length)return null==e||0===e.length?0:e.length;if(null==e||0===e.length)return t.length;for(var i=0,n=0,r=0,o=0,s=5;i+n<t.length&&i+r<e.length;){if(t.charAt(i+n)==e.charAt(i+r))o++;else{n=0,r=0;for(var a=0;s>a;a++){if(i+a<t.length&&t.charAt(i+a)==e.charAt(i)){n=a;break}if(i+a<e.length&&t.charAt(i)==e.charAt(i+a)){r=a;break}}}i++}return(t.length+e.length)/2-o},splitEmail:function(t){var e=t.trim().split("@");if(e.length<2)return!1;for(var i=0;i<e.length;i++)if(""===e[i])return!1;var n=e.pop(),r=n.split("."),o="",s="";if(0==r.length)return!1;if(1==r.length)s=r[0];else{o=r[0];for(var i=1;i<r.length;i++)s+=r[i]+".";s=s.substring(0,s.length-1)}return{topLevelDomain:s,secondLevelDomain:o,domain:n,address:e.join("@")}},encodeEmail:function(t){var e=encodeURI(t);return e=e.replace("%20"," ").replace("%25","%").replace("%5E","^").replace("%60","`").replace("%7B","{").replace("%7C","|").replace("%7D","}")}};"undefined"!=typeof module&&module.exports&&(module.exports=Mailcheck),"function"==typeof define&&define.amd&&define("mailcheck",[],function(){return Mailcheck}),"undefined"!=typeof window&&window.jQuery&&!function(t){t.fn.mailcheck=function(t){var e=this;if(t.suggested){var i=t.suggested;t.suggested=function(t){i(e,t)}}if(t.empty){var n=t.empty;t.empty=function(){n.call(null,e)}}t.email=this.val(),Mailcheck.run(t)}}(jQuery);var fabric=fabric||{version:"2.2.0"};"undefined"!=typeof exports&&(exports.fabric=fabric),"undefined"!=typeof document&&"undefined"!=typeof window?(fabric.document=document,fabric.window=window):(fabric.document=require("jsdom").jsdom(decodeURIComponent("%3C!DOCTYPE%20html%3E%3Chtml%3E%3Chead%3E%3C%2Fhead%3E%3Cbody%3E%3C%2Fbody%3E%3C%2Fhtml%3E"),{features:{FetchExternalResources:["img"]}}),fabric.jsdomImplForWrapper=require("jsdom/lib/jsdom/living/generated/utils").implForWrapper,fabric.nodeCanvas=require("jsdom/lib/jsdom/utils").Canvas,fabric.window=fabric.document.defaultView,DOMParser=require("xmldom").DOMParser),fabric.isTouchSupported="ontouchstart"in fabric.window,fabric.isLikelyNode="undefined"!=typeof Buffer&&"undefined"==typeof window,fabric.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"],fabric.DPI=96,fabric.reNum="(?:[-+]?(?:\\d+|\\d*\\.\\d+)(?:e[-+]?\\d+)?)",fabric.fontPaths={},fabric.iMatrix=[1,0,0,1,0,0],fabric.canvasModule="canvas",fabric.perfLimitSizeTotal=2097152,fabric.maxCacheSideLimit=4096,fabric.minCacheSideLimit=256,fabric.charWidthsCache={},fabric.textureSize=2048,fabric.enableGLFiltering=!0,fabric.devicePixelRatio=fabric.window.devicePixelRatio||fabric.window.webkitDevicePixelRatio||fabric.window.mozDevicePixelRatio||1,fabric.browserShadowBlurConstant=1,fabric.initFilterBackend=function(){return fabric.enableGLFiltering&&fabric.isWebglSupported&&fabric.isWebglSupported(fabric.textureSize)?(console.log("max texture size: "+fabric.maxTextureSize),new fabric.WebglFilterBackend({tileSize:fabric.textureSize})):fabric.Canvas2dFilterBackend?new fabric.Canvas2dFilterBackend:void 0},"undefined"!=typeof document&&"undefined"!=typeof window&&(window.fabric=fabric),function(){function t(t,e){if(this.__eventListeners[t]){var i=this.__eventListeners[t];e?i[i.indexOf(e)]=!1:fabric.util.array.fill(i,!1)}}function e(t,e){if(this.__eventListeners||(this.__eventListeners={}),1===arguments.length)for(var i in t)this.on(i,t[i]);else this.__eventListeners[t]||(this.__eventListeners[t]=[]),this.__eventListeners[t].push(e);return this}function i(e,i){if(this.__eventListeners){if(0===arguments.length)for(e in this.__eventListeners)t.call(this,e);else if(1===arguments.length&&"object"==typeof e)for(var n in e)t.call(this,n,e[n]);else t.call(this,e,i);return this}}function n(t,e){if(this.__eventListeners){var i=this.__eventListeners[t];if(i){for(var n=0,r=i.length;n<r;n++)i[n]&&i[n].call(this,e||{});return this.__eventListeners[t]=i.filter(function(t){return!1!==t}),this}}}fabric.Observable={observe:e,stopObserving:i,fire:n,on:e,off:i,trigger:n}}(),fabric.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,i){var n=this.getObjects();return i?n[e]=t:n.splice(e,0,t),this._onObjectAdded&&this._onObjectAdded(t),this.renderOnAddRemove&&this.requestRenderAll(),this},remove:function(){for(var t,e=this.getObjects(),i=!1,n=0,r=arguments.length;n<r;n++)-1!==(t=e.indexOf(arguments[n]))&&(i=!0,e.splice(t,1),this._onObjectRemoved&&this._onObjectRemoved(arguments[n]));return this.renderOnAddRemove&&i&&this.requestRenderAll(),this},forEachObject:function(t,e){for(var i=this.getObjects(),n=0,r=i.length;n<r;n++)t.call(e,i[n],n,i);return this},getObjects:function(t){return void 0===t?this._objects:this._objects.filter(function(e){return e.type===t})},item:function(t){return this.getObjects()[t]},isEmpty:function(){return 0===this.getObjects().length},size:function(){return this.getObjects().length},contains:function(t){return-1<this.getObjects().indexOf(t)},complexity:function(){return this.getObjects().reduce(function(t,e){return t+=e.complexity?e.complexity():0},0)}},fabric.CommonMethods={_setOptions:function(t){for(var e in t)this.set(e,t[e])},_initGradient:function(t,e){!t||!t.colorStops||t instanceof fabric.Gradient||this.set(e,new fabric.Gradient(t))},_initPattern:function(t,e,i){!t||!t.source||t instanceof fabric.Pattern?i&&i():this.set(e,new fabric.Pattern(t,i))},_initClipping:function(t){if(t.clipTo&&"string"==typeof t.clipTo){var e=fabric.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):"function"==typeof e&&"clipTo"!==t?this._set(t,e(this.get(t))):this._set(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]}},function(t){var e=Math.sqrt,i=Math.atan2,n=Math.pow,r=Math.abs,o=Math.PI/180,s=Math.PI/2;fabric.util={cos:function(t){if(0===t)return 1;switch(t<0&&(t=-t),t/s){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/s){case 1:return e;case 2:return 0;case 3:return-e}return Math.sin(t)},removeFromArray:function(t,e){var i=t.indexOf(e);return-1!==i&&t.splice(i,1),t},getRandomInt:function(t,e){return Math.floor(Math.random()*(e-t+1))+t},degreesToRadians:function(t){return t*o},radiansToDegrees:function(t){return t/o},rotatePoint:function(t,e,i){t.subtractEquals(e);var n=fabric.util.rotateVector(t,i);return new fabric.Point(n.x,n.y).addEquals(e)},rotateVector:function(t,e){var i=fabric.util.sin(e),n=fabric.util.cos(e);return{x:t.x*n-t.y*i,y:t.x*i+t.y*n}},transformPoint:function(t,e,i){return i?new fabric.Point(e[0]*t.x+e[2]*t.y,e[1]*t.x+e[3]*t.y):new fabric.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],i=fabric.util.array.min(e),n=fabric.util.array.max(e)-i,r=[t[0].y,t[1].y,t[2].y,t[3].y],o=fabric.util.array.min(r);return{left:i,top:o,width:n,height:fabric.util.array.max(r)-o}},invertTransform:function(t){var e=1/(t[0]*t[3]-t[1]*t[2]),i=[e*t[3],-e*t[1],-e*t[2],e*t[0]],n=fabric.util.transformPoint({x:t[4],y:t[5]},i,!0);return i[4]=-n.x,i[5]=-n.y,i},toFixed:function(t,e){return parseFloat(Number(t).toFixed(e))},parseUnit:function(t,e){var i=/\D{0,2}$/.exec(t),n=parseFloat(t);switch(e||(e=fabric.Text.DEFAULT_SVG_FONT_SIZE),i[0]){case"mm":return n*fabric.DPI/25.4;case"cm":return n*fabric.DPI/2.54;case"in":return n*fabric.DPI;case"pt":return n*fabric.DPI/72;case"pc":return n*fabric.DPI/72*12;case"em":return n*e;default:return n}},falseFunction:function(){return!1},getKlass:function(t,e){return t=fabric.util.string.camelize(t.charAt(0).toUpperCase()+t.slice(1)),fabric.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(e){if(!e)return fabric;var i,n=e.split("."),r=n.length,o=t||fabric.window;for(i=0;i<r;++i)o=o[n[i]];return o},loadImage:function(t,e,i,n){if(t){var r=fabric.util.createImage(),o=function(){e&&e.call(i,r),r=r.onload=r.onerror=null};r.onload=o,r.onerror=function(){fabric.log("Error loading "+r.src),e&&e.call(i,null,!0),r=r.onload=r.onerror=null},0!==t.indexOf("data")&&n&&(r.crossOrigin=n),"data:image/svg"===t.substring(0,14)&&(r.onload=null,fabric.util.loadImageInDom(r,o)),r.src=t}else e&&e.call(i,t)},loadImageInDom:function(t,e){var i=fabric.document.createElement("div");i.style.width=i.style.height="1px",i.style.left=i.style.top="-100%",i.style.position="absolute",i.appendChild(t),fabric.document.querySelector("body").appendChild(i),t.onload=function(){e(),i.parentNode.removeChild(i),i=null}},enlivenObjects:function(t,e,i,n){function r(){++s===a&&e&&e(o)}var o=[],s=0,a=(t=t||[]).length;a?t.forEach(function(t,e){t&&t.type?fabric.util.getKlass(t.type,i).fromObject(t,function(i,s){s||(o[e]=i),n&&n(t,i,s),r()}):r()}):e&&e(o)},enlivenPatterns:function(t,e){function i(){++r===o&&e&&e(n)}var n=[],r=0,o=(t=t||[]).length;o?t.forEach(function(t,e){t&&t.source?new fabric.Pattern(t,function(t){n[e]=t,i()}):(n[e]=t,i())}):e&&e(n)},groupSVGElements:function(t,e,i){var n;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)),n=new fabric.Group(t,e),void 0!==i&&(n.sourcePath=i),n)},populateWithProperties:function(t,e,i){if(i&&"[object Array]"===Object.prototype.toString.call(i))for(var n=0,r=i.length;n<r;n++)i[n]in t&&(e[i[n]]=t[i[n]])},drawDashedLine:function(t,n,r,o,s,a){var l=o-n,c=s-r,u=e(l*l+c*c),d=i(c,l),h=a.length,f=0,p=!0;for(t.save(),t.translate(n,r),t.moveTo(0,0),t.rotate(d),n=0;n<u;)u<(n+=a[f++%h])&&(n=u),t[p?"lineTo":"moveTo"](n,0),p=!p;t.restore()},createCanvasElement:function(){return fabric.document.createElement("canvas")},createImage:function(){return fabric.document.createElement("img")},clipContext:function(t,e){e.save(),e.beginPath(),t.clipTo(e),e.clip()},multiplyTransformMatrices:function(t,e,i){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],i?0:t[0]*e[4]+t[2]*e[5]+t[4],i?0:t[1]*e[4]+t[3]*e[5]+t[5]]},qrDecompose:function(t){var r=i(t[1],t[0]),s=n(t[0],2)+n(t[1],2),a=e(s),l=(t[0]*t[3]-t[2]*t[1])/a,c=i(t[0]*t[2]+t[1]*t[3],s);return{angle:r/o,scaleX:a,scaleY:l,skewX:c/o,skewY:0,translateX:t[4],translateY:t[5]}},customTransformMatrix:function(t,e,i){var n=[1,0,r(Math.tan(i*o)),1],s=[r(t),0,0,r(e)];return fabric.util.multiplyTransformMatrices(s,n,!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)},getFunctionBody:function(t){return(String(t).match(/function[^{]*\{([\s\S]*)\}/)||{})[1]},isTransparent:function(t,e,i,n){0<n&&(n<e?e-=n:e=0,n<i?i-=n:i=0);var r,o=!0,s=t.getImageData(e,i,2*n||1,2*n||1),a=s.data.length;for(r=3;r<a&&!1!=(o=s.data[r]<=0);r+=4);return s=null,o},parsePreserveAspectRatioAttribute:function(t){var e,i="meet",n=t.split(" ");return n&&n.length&&("meet"!==(i=n.pop())&&"slice"!==i?(e=i,i="meet"):n.length&&(e=n.pop())),{meetOrSlice:i,alignX:"none"!==e?e.slice(1,4):"none",alignY:"none"!==e?e.slice(5,8):"none"}},clearFabricFontCache:function(t){t?fabric.charWidthsCache[t]&&delete fabric.charWidthsCache[t]:fabric.charWidthsCache={}},limitDimsByArea:function(t,e){var i=Math.sqrt(e*t),n=Math.floor(e/i);return{x:Math.floor(i),y:n}},capValue:function(t,e,i){return Math.max(t,Math.min(e,i))},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)}}}("undefined"!=typeof exports?exports:this),function(){function t(t,n,o,s,l,c,u){var d=a.call(arguments);if(r[d])return r[d];var h=Math.PI,f=u*h/180,p=fabric.util.sin(f),g=fabric.util.cos(f),m=0,v=0,y=-g*t*.5-p*n*.5,b=-g*n*.5+p*t*.5,w=(o=Math.abs(o))*o,x=(s=Math.abs(s))*s,_=b*b,C=y*y,k=w*x-w*_-x*C,S=0;if(k<0){var T=Math.sqrt(1-k/(w*x));o*=T,s*=T}else S=(l===c?-1:1)*Math.sqrt(k/(w*_+x*C));var O=S*o*b/s,j=-S*s*y/o,E=g*O-p*j+.5*t,A=p*O+g*j+.5*n,D=i(1,0,(y-O)/o,(b-j)/s),P=i((y-O)/o,(b-j)/s,(-y-O)/o,(-b-j)/s);0===c&&0<P?P-=2*h:1===c&&P<0&&(P+=2*h);for(var F=Math.ceil(Math.abs(P/h*2)),M=[],L=P/F,I=8/3*Math.sin(L/4)*Math.sin(L/4)/Math.sin(L/2),$=D+L,z=0;z<F;z++)M[z]=e(D,$,g,p,o,s,E,A,I,m,v),m=M[z][4],v=M[z][5],D=$,$+=L;return r[d]=M}function e(t,e,i,n,r,s,l,c,u,d,h){var f=a.call(arguments);if(o[f])return o[f];var p=fabric.util.cos(t),g=fabric.util.sin(t),m=fabric.util.cos(e),v=fabric.util.sin(e),y=i*r*m-n*s*v+l,b=n*r*m+i*s*v+c,w=d+u*(-i*r*g-n*s*p),x=h+u*(-n*r*g+i*s*p),_=y+u*(i*r*v+n*s*m),C=b+u*(n*r*v-i*s*m);return o[f]=[w,x,_,C,y,b],o[f]}function i(t,e,i,n){var r=Math.atan2(e,t),o=Math.atan2(n,i);return r<=o?o-r:2*Math.PI-(r-o)}function n(t,e,i,n,r,o,l,c){var u=a.call(arguments);if(s[u])return s[u];var d,h,f,p,g,m,v,y,b=Math.sqrt,w=Math.min,x=Math.max,_=Math.abs,C=[],k=[[],[]];h=6*t-12*i+6*r,d=-3*t+9*i-9*r+3*l,f=3*i-3*t;for(var S=0;S<2;++S)if(0<S&&(h=6*e-12*n+6*o,d=-3*e+9*n-9*o+3*c,f=3*n-3*e),_(d)<1e-12){if(_(h)<1e-12)continue;0<(p=-f/h)&&p<1&&C.push(p)}else(v=h*h-4*f*d)<0||(0<(g=(-h+(y=b(v)))/(2*d))&&g<1&&C.push(g),0<(m=(-h-y)/(2*d))&&m<1&&C.push(m));for(var T,O,j,E=C.length,A=E;E--;)T=(j=1-(p=C[E]))*j*j*t+3*j*j*p*i+3*j*p*p*r+p*p*p*l,k[0][E]=T,O=j*j*j*e+3*j*j*p*n+3*j*p*p*o+p*p*p*c,k[1][E]=O;k[0][A]=t,k[1][A]=e,k[0][A+1]=l,k[1][A+1]=c;var D=[{x:w.apply(null,k[0]),y:w.apply(null,k[1])},{x:x.apply(null,k[0]),y:x.apply(null,k[1])}];return s[u]=D}var r={},o={},s={},a=Array.prototype.join;fabric.util.drawArc=function(e,i,n,r){for(var o=r[0],s=r[1],a=r[2],l=r[3],c=r[4],u=[[],[],[],[]],d=t(r[5]-i,r[6]-n,o,s,l,c,a),h=0,f=d.length;h<f;h++)u[h][0]=d[h][0]+i,u[h][1]=d[h][1]+n,u[h][2]=d[h][2]+i,u[h][3]=d[h][3]+n,u[h][4]=d[h][4]+i,u[h][5]=d[h][5]+n,e.bezierCurveTo.apply(e,u[h])},fabric.util.getBoundsOfArc=function(e,i,r,o,s,a,l,c,u){for(var d,h=0,f=0,p=[],g=t(c-e,u-i,r,o,a,l,s),m=0,v=g.length;m<v;m++)d=n(h,f,g[m][0],g[m][1],g[m][2],g[m][3],g[m][4],g[m][5]),
p.push({x:d[0].x+e,y:d[0].y+i}),p.push({x:d[1].x+e,y:d[1].y+i}),h=g[m][4],f=g[m][5];return p},fabric.util.getBoundsOfCurve=n}(),function(){function t(t,e,i){if(t&&0!==t.length){var n=t.length-1,r=e?t[n][e]:t[n];if(e)for(;n--;)i(t[n][e],r)&&(r=t[n][e]);else for(;n--;)i(t[n],r)&&(r=t[n]);return r}}var e=Array.prototype.slice;fabric.util.array={fill:function(t,e){for(var i=t.length;i--;)t[i]=e;return t},invoke:function(t,i){for(var n=e.call(arguments,2),r=[],o=0,s=t.length;o<s;o++)r[o]=n.length?t[o][i].apply(t[o],n):t[o][i].call(t[o]);return r},min:function(e,i){return t(e,i,function(t,e){return t<e})},max:function(e,i){return t(e,i,function(t,e){return e<=t})}}}(),function(){function t(e,i,n){if(n)if(!fabric.isLikelyNode&&i instanceof Element)e=i;else if(i instanceof Array){e=[];for(var r=0,o=i.length;r<o;r++)e[r]=t({},i[r],n)}else if(i&&"object"==typeof i)for(var s in i)i.hasOwnProperty(s)&&(e[s]=t({},i[s],n));else e=i;else for(var s in i)e[s]=i[s];return e}fabric.util.object={extend:t,clone:function(e,i){return t({},e,i)}},fabric.util.object.extend(fabric.util,fabric.Observable)}(),function(){function t(t,e){var i=t.charCodeAt(e);if(isNaN(i))return"";if(i<55296||57343<i)return t.charAt(e);if(55296<=i&&i<=56319){if(t.length<=e+1)throw"High surrogate without following low surrogate";var n=t.charCodeAt(e+1);if(n<56320||57343<n)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(r<55296||56319<r)throw"Low surrogate without preceding high surrogate";return!1}fabric.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,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&apos;").replace(/</g,"&lt;").replace(/>/g,"&gt;")},graphemeSplit:function(e){var i,n=0,r=[];for(n=0;n<e.length;n++)!1!==(i=t(e,n))&&r.push(i);return r}}}(),function(){function t(){}function e(t){for(var e=null,n=this;n.constructor.superclass;){var r=n.constructor.superclass.prototype[t];if(n[t]!==r){e=r;break}n=n.constructor.superclass.prototype}return e?1<arguments.length?e.apply(this,i.call(arguments,1)):e.call(this):console.log("tried to callSuper "+t+", method not found in prototype chain",this)}var i=Array.prototype.slice,n=function(){},r=function(){for(var t in{toString:1})if("toString"===t)return!1;return!0}(),o=function(t,e,i){for(var n in e)n in t.prototype&&"function"==typeof t.prototype[n]&&-1<(e[n]+"").indexOf("callSuper")?t.prototype[n]=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}}(n):t.prototype[n]=e[n],r&&(e.toString!==Object.prototype.toString&&(t.prototype.toString=e.toString),e.valueOf!==Object.prototype.valueOf&&(t.prototype.valueOf=e.valueOf))};fabric.util.createClass=function(){function r(){this.initialize.apply(this,arguments)}var s=null,a=i.call(arguments,0);"function"==typeof a[0]&&(s=a.shift()),r.superclass=s,r.subclasses=[],s&&(t.prototype=s.prototype,r.prototype=new t,s.subclasses.push(r));for(var l=0,c=a.length;l<c;l++)o(r,a[l],s);return r.prototype.initialize||(r.prototype.initialize=n),(r.prototype.constructor=r).prototype.callSuper=e,r}}(),function(){function t(t){var e,i,n=Array.prototype.slice.call(arguments,1),r=n.length;for(i=0;i<r;i++)if(e=typeof t[n[i]],!/^(?:function|object|unknown)$/.test(e))return!1;return!0}function e(t,e){return{handler:e,wrappedHandler:(i=t,r=e,function(t){r.call(n(i),t||fabric.window.event)})};var i,r}function i(t,e,i){var n="touchend"===t.type?"changedTouches":"touches";return t[n]&&t[n][0]&&t[n][0][e]-(t[n][0][e]-t[n][0][i])||t[i]}var n,r,o,s,a=(o=0,function(t){return t.__uniqueID||(t.__uniqueID="uniqueID__"+o++)});s={},n=function(t){return s[t]},r=function(t,e){s[t]=e};var l,c,u=t(fabric.document.documentElement,"addEventListener","removeEventListener")&&t(fabric.window,"addEventListener","removeEventListener"),d=t(fabric.document.documentElement,"attachEvent","detachEvent")&&t(fabric.window,"attachEvent","detachEvent"),h={},f={};u?(l=function(t,e,i,n){t&&t.addEventListener(e,i,!d&&n)},c=function(t,e,i,n){t&&t.removeEventListener(e,i,!d&&n)}):d?(l=function(t,i,n){if(t){var o=a(t);r(o,t),h[o]||(h[o]={}),h[o][i]||(h[o][i]=[]);var s=e(o,n);h[o][i].push(s),t.attachEvent("on"+i,s.wrappedHandler)}},c=function(t,e,i){if(t){var n,r=a(t);if(h[r]&&h[r][e])for(var o=0,s=h[r][e].length;o<s;o++)(n=h[r][e][o])&&n.handler===i&&(t.detachEvent("on"+e,n.wrappedHandler),h[r][e][o]=null)}}):(l=function(t,e,i){if(t){var n,r,o=a(t);if(f[o]||(f[o]={}),!f[o][e]){f[o][e]=[];var s=t["on"+e];s&&f[o][e].push(s),t["on"+e]=(n=o,r=e,function(t){if(f[n]&&f[n][r])for(var e=f[n][r],i=0,o=e.length;i<o;i++)e[i].call(this,t||fabric.window.event)})}f[o][e].push(i)}},c=function(t,e,i){if(t){var n=a(t);if(f[n]&&f[n][e])for(var r=f[n][e],o=0,s=r.length;o<s;o++)r[o]===i&&r.splice(o,1)}}),fabric.util.addListener=l,fabric.util.removeListener=c;var p=function(t){return t.clientX},g=function(t){return t.clientY};fabric.isTouchSupported&&(p=function(t){return i(t,"pageX","clientX")},g=function(t){return i(t,"pageY","clientY")}),fabric.util.getPointer=function(t){t||(t=fabric.window.event);var e=t.target||("unknown"!=typeof t.srcElement?t.srcElement:null),i=fabric.util.getScrollLeftTop(e);return{x:p(t)+i.left,y:g(t)+i.top}}}(),function(){var t=fabric.document.createElement("div"),e="string"==typeof t.style.opacity,i="string"==typeof t.style.filter,n=/alpha\s*\(\s*opacity\s*=\s*([^\)]+)\)/,r=function(t){return t};e?r=function(t,e){return t.style.opacity=e,t}:i&&(r=function(t,e){var i=t.style;return t.currentStyle&&!t.currentStyle.hasLayout&&(i.zoom=1),n.test(i.filter)?(e=.9999<=e?"":"alpha(opacity="+100*e+")",i.filter=i.filter.replace(n,e)):i.filter+=" alpha(opacity="+100*e+")",t}),fabric.util.setStyle=function(t,e){var i=t.style;if(!i)return t;if("string"==typeof e)return t.style.cssText+=";"+e,-1<e.indexOf("opacity")?r(t,e.match(/opacity:\s*(\d?\.?\d*)/)[1]):t;for(var n in e)"opacity"===n?r(t,e[n]):i["float"===n||"cssFloat"===n?void 0===i.styleFloat?"cssFloat":"styleFloat":n]=e[n];return t}}(),function(){function t(t,e){var i=fabric.document.createElement(t);for(var n in e)"class"===n?i.className=e[n]:"for"===n?i.htmlFor=e[n]:i.setAttribute(n,e[n]);return i}function e(t){for(var e=0,i=0,n=fabric.document.documentElement,r=fabric.document.body||{scrollLeft:0,scrollTop:0};t&&(t.parentNode||t.host)&&((t=t.parentNode||t.host)===fabric.document?(e=r.scrollLeft||n.scrollLeft||0,i=r.scrollTop||n.scrollTop||0):(e+=t.scrollLeft||0,i+=t.scrollTop||0),1!==t.nodeType||"fixed"!==t.style.position););return{left:e,top:i}}var i,n,r,o,s=Array.prototype.slice,a=function(t){return s.call(t,0)};try{i=a(fabric.document.childNodes)instanceof Array}catch(t){}i||(a=function(t){for(var e=new Array(t.length),i=t.length;i--;)e[i]=t[i];return e}),n=fabric.document.defaultView&&fabric.document.defaultView.getComputedStyle?function(t,e){var i=fabric.document.defaultView.getComputedStyle(t,null);return i?i[e]:void 0}:function(t,e){var i=t.style[e];return!i&&t.currentStyle&&(i=t.currentStyle[e]),i},r=fabric.document.documentElement.style,o="userSelect"in r?"userSelect":"MozUserSelect"in r?"MozUserSelect":"WebkitUserSelect"in r?"WebkitUserSelect":"KhtmlUserSelect"in r?"KhtmlUserSelect":"",fabric.util.makeElementUnselectable=function(t){return void 0!==t.onselectstart&&(t.onselectstart=fabric.util.falseFunction),o?t.style[o]="none":"string"==typeof t.unselectable&&(t.unselectable="on"),t},fabric.util.makeElementSelectable=function(t){return void 0!==t.onselectstart&&(t.onselectstart=null),o?t.style[o]="":"string"==typeof t.unselectable&&(t.unselectable=""),t},fabric.util.getScript=function(t,e){var i=fabric.document.getElementsByTagName("head")[0],n=fabric.document.createElement("script"),r=!0;n.onload=n.onreadystatechange=function(t){if(r){if("string"==typeof this.readyState&&"loaded"!==this.readyState&&"complete"!==this.readyState)return;r=!1,e(t||fabric.window.event),n=n.onload=n.onreadystatechange=null}},n.src=t,i.appendChild(n)},fabric.util.getById=function(t){return"string"==typeof t?fabric.document.getElementById(t):t},fabric.util.toArray=a,fabric.util.makeElement=t,fabric.util.addClass=function(t,e){t&&-1===(" "+t.className+" ").indexOf(" "+e+" ")&&(t.className+=(t.className?" ":"")+e)},fabric.util.wrapElement=function(e,i,n){return"string"==typeof i&&(i=t(i,n)),e.parentNode&&e.parentNode.replaceChild(i,e),i.appendChild(e),i},fabric.util.getScrollLeftTop=e,fabric.util.getElementOffset=function(t){var i,r,o=t&&t.ownerDocument,s={left:0,top:0},a={left:0,top:0},l={borderLeftWidth:"left",borderTopWidth:"top",paddingLeft:"left",paddingTop:"top"};if(!o)return a;for(var c in l)a[l[c]]+=parseInt(n(t,c),10)||0;return i=o.documentElement,void 0!==t.getBoundingClientRect&&(s=t.getBoundingClientRect()),r=e(t),{left:s.left+r.left-(i.clientLeft||0)+a.left,top:s.top+r.top-(i.clientTop||0)+a.top}},fabric.util.getElementStyle=n,fabric.util.getNodeCanvas=function(t){var e=fabric.jsdomImplForWrapper(t);return e._canvas||e._image}}(),function(){function t(){}var e=function(){for(var t=[function(){return new ActiveXObject("Microsoft.XMLHTTP")},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Msxml2.XMLHTTP.3.0")},function(){return new XMLHttpRequest}],e=t.length;e--;)try{if(t[e]())return t[e]}catch(t){}}();fabric.util.request=function(i,n){n||(n={});var r,o,s=n.method?n.method.toUpperCase():"GET",a=n.onComplete||function(){},l=e(),c=n.body||n.parameters;return l.onreadystatechange=function(){4===l.readyState&&(a(l),l.onreadystatechange=t)},"GET"===s&&(c=null,"string"==typeof n.parameters&&(r=i,o=n.parameters,i=r+(/\?/.test(r)?"&":"?")+o)),l.open(s,i,!0),"POST"!==s&&"PUT"!==s||l.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),l.send(c),l}}(),fabric.log=function(){},fabric.warn=function(){},"undefined"!=typeof console&&["log","warn"].forEach(function(t){void 0!==console[t]&&"function"==typeof console[t].apply&&(fabric[t]=function(){return console[t].apply(console,arguments)})}),function(){function t(){return!1}function e(){return i.apply(fabric.window,arguments)}var i=fabric.window.requestAnimationFrame||fabric.window.webkitRequestAnimationFrame||fabric.window.mozRequestAnimationFrame||fabric.window.oRequestAnimationFrame||fabric.window.msRequestAnimationFrame||function(t){return fabric.window.setTimeout(t,1e3/60)},n=fabric.window.cancelAnimationFrame||fabric.window.clearTimeout;fabric.util.animate=function(i){e(function(n){i||(i={});var r,o=n||+new Date,s=i.duration||500,a=o+s,l=i.onChange||t,c=i.abort||t,u=i.onComplete||t,d=i.easing||function(t,e,i,n){return-i*Math.cos(t/n*(Math.PI/2))+i+e},h="startValue"in i?i.startValue:0,f="endValue"in i?i.endValue:100,p=i.byValue||f-h;i.onStart&&i.onStart(),function t(n){if(c())u(f,1,1);else{r=n||+new Date;var g=a<r?s:r-o,m=g/s,v=d(g,h,p,s),y=Math.abs((v-h)/p);l(v,y,m),a<r?i.onComplete&&i.onComplete():e(t)}}(o)})},fabric.util.requestAnimFrame=e,fabric.util.cancelAnimFrame=function(){return n.apply(fabric.window,arguments)}}(),fabric.util.animateColor=function(t,e,i,n){var r=new fabric.Color(t).getSource(),o=new fabric.Color(e).getSource();n=n||{},fabric.util.animate(fabric.util.object.extend(n,{duration:i||500,startValue:r,endValue:o,byValue:o,easing:function(t,e,i,r){var o,s,a,l,c=n.colorEasing?n.colorEasing(t,r):1-Math.cos(t/r*(Math.PI/2));return o=e,s=i,a=c,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),l+=")"}}))},function(){function t(t,e,i,n){return t<Math.abs(e)?(t=e,n=i/4):n=0===e&&0===t?i/(2*Math.PI)*Math.asin(1):i/(2*Math.PI)*Math.asin(e/t),{a:t,c:e,p:i,s:n}}function e(t,e,i){return t.a*Math.pow(2,10*(e-=1))*Math.sin((e*i-t.s)*(2*Math.PI)/t.p)}function i(t,e,i,r){return i-n(r-t,0,i,r)+e}function n(t,e,i,n){return(t/=n)<1/2.75?i*(7.5625*t*t)+e:t<2/2.75?i*(7.5625*(t-=1.5/2.75)*t+.75)+e:t<2.5/2.75?i*(7.5625*(t-=2.25/2.75)*t+.9375)+e:i*(7.5625*(t-=2.625/2.75)*t+.984375)+e}fabric.util.ease={easeInQuad:function(t,e,i,n){return i*(t/=n)*t+e},easeOutQuad:function(t,e,i,n){return-i*(t/=n)*(t-2)+e},easeInOutQuad:function(t,e,i,n){return(t/=n/2)<1?i/2*t*t+e:-i/2*(--t*(t-2)-1)+e},easeInCubic:function(t,e,i,n){return i*(t/=n)*t*t+e},easeOutCubic:function(t,e,i,n){return i*((t=t/n-1)*t*t+1)+e},easeInOutCubic:function(t,e,i,n){return(t/=n/2)<1?i/2*t*t*t+e:i/2*((t-=2)*t*t+2)+e},easeInQuart:function(t,e,i,n){return i*(t/=n)*t*t*t+e},easeOutQuart:function(t,e,i,n){return-i*((t=t/n-1)*t*t*t-1)+e},easeInOutQuart:function(t,e,i,n){return(t/=n/2)<1?i/2*t*t*t*t+e:-i/2*((t-=2)*t*t*t-2)+e},easeInQuint:function(t,e,i,n){return i*(t/=n)*t*t*t*t+e},easeOutQuint:function(t,e,i,n){return i*((t=t/n-1)*t*t*t*t+1)+e},easeInOutQuint:function(t,e,i,n){return(t/=n/2)<1?i/2*t*t*t*t*t+e:i/2*((t-=2)*t*t*t*t+2)+e},easeInSine:function(t,e,i,n){return-i*Math.cos(t/n*(Math.PI/2))+i+e},easeOutSine:function(t,e,i,n){return i*Math.sin(t/n*(Math.PI/2))+e},easeInOutSine:function(t,e,i,n){return-i/2*(Math.cos(Math.PI*t/n)-1)+e},easeInExpo:function(t,e,i,n){return 0===t?e:i*Math.pow(2,10*(t/n-1))+e},easeOutExpo:function(t,e,i,n){return t===n?e+i:i*(1-Math.pow(2,-10*t/n))+e},easeInOutExpo:function(t,e,i,n){return 0===t?e:t===n?e+i:(t/=n/2)<1?i/2*Math.pow(2,10*(t-1))+e:i/2*(2-Math.pow(2,-10*--t))+e},easeInCirc:function(t,e,i,n){return-i*(Math.sqrt(1-(t/=n)*t)-1)+e},easeOutCirc:function(t,e,i,n){return i*Math.sqrt(1-(t=t/n-1)*t)+e},easeInOutCirc:function(t,e,i,n){return(t/=n/2)<1?-i/2*(Math.sqrt(1-t*t)-1)+e:i/2*(Math.sqrt(1-(t-=2)*t)+1)+e},easeInElastic:function(i,n,r,o){var s=0;return 0===i?n:1==(i/=o)?n+r:(s||(s=.3*o),-e(t(r,r,s,1.70158),i,o)+n)},easeOutElastic:function(e,i,n,r){var o=0;if(0===e)return i;if(1==(e/=r))return i+n;o||(o=.3*r);var s=t(n,n,o,1.70158);return s.a*Math.pow(2,-10*e)*Math.sin((e*r-s.s)*(2*Math.PI)/s.p)+s.c+i},easeInOutElastic:function(i,n,r,o){var s=0;if(0===i)return n;if(2==(i/=o/2))return n+r;s||(s=o*(.3*1.5));var a=t(r,r,s,1.70158);return i<1?-.5*e(a,i,o)+n:a.a*Math.pow(2,-10*(i-=1))*Math.sin((i*o-a.s)*(2*Math.PI)/a.p)*.5+a.c+n},easeInBack:function(t,e,i,n,r){return void 0===r&&(r=1.70158),i*(t/=n)*t*((r+1)*t-r)+e},easeOutBack:function(t,e,i,n,r){return void 0===r&&(r=1.70158),i*((t=t/n-1)*t*((r+1)*t+r)+1)+e},easeInOutBack:function(t,e,i,n,r){return void 0===r&&(r=1.70158),(t/=n/2)<1?i/2*(t*t*((1+(r*=1.525))*t-r))+e:i/2*((t-=2)*t*((1+(r*=1.525))*t+r)+2)+e},easeInBounce:i,easeOutBounce:n,easeInOutBounce:function(t,e,r,o){return t<o/2?.5*i(2*t,0,r,o)+e:.5*n(2*t-o,0,r,o)+.5*r+e}}}(),function(t){"use strict";function e(t,e,i,n){var r,o="[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?f(i.transformMatrix,l.parseTransformAttribute(e)):l.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("paintFirst"===t){var s=e.indexOf("fill"),a=e.indexOf("stroke");e="fill",-1<s&&-1<a&&a<s?e="stroke":-1===s&&-1<a&&(e="stroke")}else r=o?e.map(h):h(e,n);else e="";return!o&&isNaN(r)?e:r}function i(t){return new RegExp("^("+t.join("|")+")\\b","i")}function n(t,e){var i,n,r,o,s=[];for(r=0,o=e.length;r<o;r++)i=e[r],n=t.getElementsByTagName(i),s=s.concat(Array.prototype.slice.call(n));return s}function r(t,e){var i,n=!0;return(i=o(t,e.pop()))&&e.length&&(n=function(t,e){for(var i,n=!0;t.parentNode&&1===t.parentNode.nodeType&&e.length;)n&&(i=e.pop()),t=t.parentNode,n=o(t,i);return 0===e.length}(t,e)),i&&n&&0===e.length}function o(t,e){var i,n,r=t.nodeName,o=t.getAttribute("class"),s=t.getAttribute("id");if(i=new RegExp("^"+r,"i"),e=e.replace(i,""),s&&e.length&&(i=new RegExp("#"+s+"(?![a-zA-Z\\-]+)","i"),e=e.replace(i,"")),o&&e.length)for(n=(o=o.split(" ")).length;n--;)i=new RegExp("\\."+o[n]+"(?![a-zA-Z\\-]+)","i"),e=e.replace(i,"");return 0===e.length}function s(t,e){var i;if(t.getElementById&&(i=t.getElementById(e)),i)return i;var n,r,o,s=t.getElementsByTagName("*");for(r=0,o=s.length;r<o;r++)if(e===(n=s[r]).getAttribute("id"))return n}function a(t){var e,i,n,r,o,s,a=t.getAttribute("viewBox"),c=1,u=1,d=t.getAttribute("width"),f=t.getAttribute("height"),p=t.getAttribute("x")||0,g=t.getAttribute("y")||0,v=t.getAttribute("preserveAspectRatio")||"",y=!a||!l.svgViewBoxElementsRegEx.test(t.nodeName)||!(a=a.match(m)),b=!d||!f||"100%"===d||"100%"===f,w=y&&b,x={},_="";if(x.width=0,x.height=0,x.toBeParsed=w)return x;if(y)return x.width=h(d),x.height=h(f),x;if(e=-parseFloat(a[1]),i=-parseFloat(a[2]),n=parseFloat(a[3]),r=parseFloat(a[4]),b?(x.width=n,x.height=r):(x.width=h(d),x.height=h(f),c=x.width/n,u=x.height/r),"none"!==(v=l.util.parsePreserveAspectRatioAttribute(v)).alignX&&(u=c=u<c?u:c),1===c&&1===u&&0===e&&0===i&&0===p&&0===g)return x;if((p||g)&&(_=" translate("+h(p)+" "+h(g)+") "),o=_+" matrix("+c+" 0 0 "+u+" "+e*c+" "+i*u+") ","svg"===t.nodeName){for(s=t.ownerDocument.createElement("g");t.firstChild;)s.appendChild(t.firstChild);t.appendChild(s)}else o=(s=t).getAttribute("transform")+o;return s.setAttribute("transform",o),x}var l=t.fabric||(t.fabric={}),c=l.util.object.extend,u=l.util.object.clone,d=l.util.toFixed,h=l.util.parseUnit,f=l.util.multiplyTransformMatrices,p={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","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"},g={stroke:"strokeOpacity",fill:"fillOpacity"};l.svgValidTagNamesRegEx=i(["path","circle","polygon","polyline","ellipse","rect","line","image","text","linearGradient","radialGradient","stop"]),l.svgViewBoxElementsRegEx=i(["symbol","image","marker","pattern","view","svg"]),l.svgInvalidAncestorsRegEx=i(["pattern","defs","symbol","metadata","clipPath","mask","desc"]),l.svgValidParentsRegEx=i(["symbol","g","a","svg"]),l.cssRules={},l.gradientDefs={},l.parseTransformAttribute=function(){function t(t,e,i){t[i]=Math.tan(l.util.degreesToRadians(e[0]))}var e=[1,0,0,1,0,0],i=l.reNum,n="(?:\\s+,?\\s*|,\\s*)",r="(?:"+("(?:(matrix)\\s*\\(\\s*("+i+")"+n+"("+i+")"+n+"("+i+")"+n+"("+i+")"+n+"("+i+")"+n+"("+i+")\\s*\\))")+"|"+("(?:(translate)\\s*\\(\\s*("+i+")(?:"+n+"("+i+"))?\\s*\\))")+"|"+("(?:(scale)\\s*\\(\\s*("+i+")(?:"+n+"("+i+"))?\\s*\\))")+"|"+("(?:(rotate)\\s*\\(\\s*("+i+")(?:"+n+"("+i+")"+n+"("+i+"))?\\s*\\))")+"|"+("(?:(skewX)\\s*\\(\\s*("+i+")\\s*\\))")+"|"+("(?:(skewY)\\s*\\(\\s*("+i+")\\s*\\))")+")",o=new RegExp("^\\s*(?:"+("(?:"+r+"(?:"+n+"*"+r+")*)")+"?)\\s*$"),s=new RegExp(r,"g");return function(i){var n=e.concat(),a=[];if(!i||i&&!o.test(i))return n;i.replace(s,function(i){var o,s,c,u,d,h,f,p,g,m,v,y,b=new RegExp(r).exec(i).filter(function(t){return!!t}),w=b[1],x=b.slice(2).map(parseFloat);switch(w){case"translate":y=x,(v=n)[4]=y[0],2===y.length&&(v[5]=y[1]);break;case"rotate":x[0]=l.util.degreesToRadians(x[0]),d=n,h=x,f=l.util.cos(h[0]),p=l.util.sin(h[0]),m=g=0,3===h.length&&(g=h[1],m=h[2]),d[0]=f,d[1]=p,d[2]=-p,d[3]=f,d[4]=g-(f*g-p*m),d[5]=m-(p*g+f*m);break;case"scale":o=n,c=(s=x)[0],u=2===s.length?s[1]:s[0],o[0]=c,o[3]=u;break;case"skewX":t(n,x,2);break;case"skewY":t(n,x,1);break;case"matrix":n=x}a.push(n.concat()),n=e.concat()});for(var c=a[0];1<a.length;)a.shift(),c=l.util.multiplyTransformMatrices(c,a[0]);return c}}();var m=new RegExp("^\\s*("+l.reNum+"+)\\s*,?\\s*("+l.reNum+"+)\\s*,?\\s*("+l.reNum+"+)\\s*,?\\s*("+l.reNum+"+)\\s*$");l.parseSVGDocument=function(t,e,i,r){if(t){!function(t){for(var e=n(t,["use","svg:use"]),i=0;e.length&&i<e.length;){var r,o,l,c,u=e[i],d=u.getAttribute("xlink:href").substr(1),h=u.getAttribute("x")||0,f=u.getAttribute("y")||0,p=s(t,d).cloneNode(!0),g=(p.getAttribute("transform")||"")+" translate("+h+", "+f+")",m=e.length;if(a(p),/^svg$/i.test(p.nodeName)){var v=p.ownerDocument.createElement("g");for(o=0,c=(l=p.attributes).length;o<c;o++)r=l.item(o),v.setAttribute(r.nodeName,r.nodeValue);for(;p.firstChild;)v.appendChild(p.firstChild);p=v}for(o=0,c=(l=u.attributes).length;o<c;o++)"x"!==(r=l.item(o)).nodeName&&"y"!==r.nodeName&&"xlink:href"!==r.nodeName&&("transform"===r.nodeName?g=r.nodeValue+" "+g:p.setAttribute(r.nodeName,r.nodeValue));p.setAttribute("transform",g),p.setAttribute("instantiated_by_use","1"),p.removeAttribute("id"),u.parentNode.replaceChild(p,u),e.length===m&&i++}}(t);var o,c,d=l.Object.__uid++,h=a(t),f=l.util.toArray(t.getElementsByTagName("*"));if(h.crossOrigin=r&&r.crossOrigin,h.svgUid=d,0===f.length&&l.isLikelyNode){var p=[];for(o=0,c=(f=t.selectNodes('//*[name(.)!="svg"]')).length;o<c;o++)p[o]=f[o];f=p}var g=f.filter(function(t){return a(t),l.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,l.svgInvalidAncestorsRegEx)});!g||g&&!g.length?e&&e([],{}):(l.gradientDefs[d]=l.getGradientDefs(t),l.cssRules[d]=l.getCSSRules(t),l.parseElements(g,function(t,i){e&&e(t,h,i,f)},u(h),i,r))}};var v=new RegExp("(normal|italic)?\\s*(normal|small-caps)?\\s*(normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900)?\\s*("+l.reNum+"(?:px|cm|mm|em|pt|pc|in)*)(?:\\/(normal|"+l.reNum+"))?\\s+(.*)");c(l,{parseFontDeclaration:function(t,e){var i=t.match(v);if(i){var n=i[1],r=i[3],o=i[4],s=i[5],a=i[6];n&&(e.fontStyle=n),r&&(e.fontWeight=isNaN(parseFloat(r))?r:parseFloat(r)),o&&(e.fontSize=h(o)),a&&(e.fontFamily=a),s&&(e.lineHeight="normal"===s?1:s)}},getGradientDefs:function(t){var e,i,r,o=n(t,["linearGradient","radialGradient","svg:linearGradient","svg:radialGradient"]),s=0,a={},l={};for(s=o.length;s--;)r=(e=o[s]).getAttribute("xlink:href"),i=e.getAttribute("id"),r&&(l[i]=r.substr(1)),a[i]=e;for(i in l){var c=a[l[i]].cloneNode(!0);for(e=a[i];c.firstChild;)e.appendChild(c.firstChild)}return a},parseAttributes:function(t,i,n){if(t){var o,s,a={};void 0===n&&(n=t.getAttribute("svgUid")),t.parentNode&&l.svgValidParentsRegEx.test(t.parentNode.nodeName)&&(a=l.parseAttributes(t.parentNode,i,n)),s=a&&a.fontSize||t.getAttribute("font-size")||l.Text.DEFAULT_SVG_FONT_SIZE;var u=i.reduce(function(e,i){return(o=t.getAttribute(i))&&(e[i]=o),e},{});u=c(u,c(function(t,e){var i={};for(var n in l.cssRules[e])if(r(t,n.split(" ")))for(var o in l.cssRules[e][n])i[o]=l.cssRules[e][n][o];return i}(t,n),l.parseStyleAttribute(t)));var h,f,m,v={};for(var y in u)f=e(h=(m=y)in p?p[m]:m,u[y],a,s),v[h]=f;v&&v.font&&l.parseFontDeclaration(v.font,v);var b=c(a,v);return l.svgValidParentsRegEx.test(t.nodeName)?b:function(t){for(var e in g)if(void 0!==t[g[e]]&&""!==t[e]){if(void 0===t[e]){if(!l.Object.prototype[e])continue;t[e]=l.Object.prototype[e]}if(0!==t[e].indexOf("url(")){var i=new l.Color(t[e]);t[e]=i.setAlpha(d(i.getAlpha()*t[g[e]],2)).toRgba()}}return t}(b)}},parseElements:function(t,e,i,n,r){new l.ElementsParser(t,e,i,n,r).parse()},parseStyleAttribute:function(t){var e,i,n,r={},o=t.getAttribute("style");return o&&("string"==typeof o?(e=r,o.replace(/;\s*$/,"").split(";").forEach(function(t){var r=t.split(":");i=r[0].trim().toLowerCase(),n=r[1].trim(),e[i]=n})):function(t,e){var i,n;for(var r in t)void 0!==t[r]&&(i=r.toLowerCase(),n=t[r],e[i]=n)}(o,r)),r},parsePointsAttribute:function(t){if(!t)return null;var e,i,n=[];for(e=0,i=(t=(t=t.replace(/,/g," ").trim()).split(/\s+/)).length;e<i;e+=2)n.push({x:parseFloat(t[e]),y:parseFloat(t[e+1])});return n},getCSSRules:function(t){var e,i,n=t.getElementsByTagName("style"),r={};for(e=0,i=n.length;e<i;e++){var o=n[e].textContent||n[e].text;""!==(o=o.replace(/\/\*[\s\S]*?\*\//g,"")).trim()&&o.match(/[^{]*\{[\s\S]*?\}/g).map(function(t){return t.trim()}).forEach(function(t){var n=t.match(/([\s\S]*?)\s*\{([^}]*)\}/),o={},s=n[2].trim().replace(/;$/,"").split(/\s*;\s*/);for(e=0,i=s.length;e<i;e++){var a=s[e].split(/\s*:\s*/),c=a[0],u=a[1];o[c]=u}(t=n[1]).split(",").forEach(function(t){""!==(t=t.replace(/^svg/i,"").trim())&&(r[t]?l.util.object.extend(r[t],o):r[t]=l.util.object.clone(o))})})}return r},loadSVGFromURL:function(t,e,i,n){t=t.replace(/^\n\s*/,"").trim(),new l.util.request(t,{method:"get",onComplete:function(t){var r=t.responseXML;r&&!r.documentElement&&l.window.ActiveXObject&&t.responseText&&((r=new ActiveXObject("Microsoft.XMLDOM")).async="false",r.loadXML(t.responseText.replace(/<!DOCTYPE[\s\S]*?(\[[\s\S]*\])*?>/i,""))),r&&r.documentElement||e&&e(null),l.parseSVGDocument(r.documentElement,function(t,i,n,r){e&&e(t,i,n,r)},i,n)}})},loadSVGFromString:function(t,e,i,n){var r;if(t=t.trim(),"undefined"!=typeof DOMParser){var o=new DOMParser;o&&o.parseFromString&&(r=o.parseFromString(t,"text/xml"))}else l.window.ActiveXObject&&((r=new ActiveXObject("Microsoft.XMLDOM")).async="false",r.loadXML(t.replace(/<!DOCTYPE[\s\S]*?(\[[\s\S]*\])*?>/i,"")));l.parseSVGDocument(r.documentElement,function(t,i,n,r){e(t,i,n,r)},i,n)}})}("undefined"!=typeof exports?exports:this),fabric.ElementsParser=function(t,e,i,n,r){this.elements=t,this.callback=e,this.options=i,this.reviver=n,this.svgUid=i&&i.svgUid||0,this.parsingOptions=r},fabric.ElementsParser.prototype.parse=function(){this.instances=new Array(this.elements.length),this.numElements=this.elements.length,this.createObjects()},fabric.ElementsParser.prototype.createObjects=function(){for(var t=0,e=this.elements.length;t<e;t++)this.elements[t].setAttribute("svgUid",this.svgUid),function(t,e){setTimeout(function(){t.createObject(t.elements[e],e)},0)}(this,t)},fabric.ElementsParser.prototype.createObject=function(t,e){var i=fabric[fabric.util.string.capitalize(t.tagName.replace("svg:",""))];if(i&&i.fromElement)try{this._createObject(i,t,e)}catch(t){fabric.log(t)}else this.checkIfDone()},fabric.ElementsParser.prototype._createObject=function(t,e,i){t.fromElement(e,this.createCallback(i,e),this.options)},fabric.ElementsParser.prototype.createCallback=function(t,e){var i=this;return function(n){var r;i.resolveGradient(n,"fill"),i.resolveGradient(n,"stroke"),n instanceof fabric.Image&&(r=n.parsePreserveAspectRatioAttribute(e)),n._removeTransformMatrix(r),i.reviver&&i.reviver(e,n),i.instances[t]=n,i.checkIfDone()}},fabric.ElementsParser.prototype.resolveGradient=function(t,e){var i=t.get(e);if(/^url\(/.test(i)){var n=i.slice(5,i.length-1);fabric.gradientDefs[this.svgUid][n]&&t.set(e,fabric.Gradient.fromElement(fabric.gradientDefs[this.svgUid][n],t))}},fabric.ElementsParser.prototype.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";function e(t,e){this.x=t,this.y=e}var i=t.fabric||(t.fabric={});i.Point?i.warn("fabric.Point is already defined"):(i.Point=e).prototype={type:"point",constructor:e,add:function(t){return new e(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 e(this.x+t,this.y+t)},scalarAddEquals:function(t){return this.x+=t,this.y+=t,this},subtract:function(t){return new e(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 e(this.x-t,this.y-t)},scalarSubtractEquals:function(t){return this.x-=t,this.y-=t,this},multiply:function(t){return new e(this.x*t,this.y*t)},multiplyEquals:function(t){return this.x*=t,this.y*=t,this},divide:function(t){return new e(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,i){return void 0===i&&(i=.5),i=Math.max(Math.min(1,i),0),new e(this.x+(t.x-this.x)*i,this.y+(t.y-this.y)*i)},distanceFrom:function(t){var e=this.x-t.x,i=this.y-t.y;return Math.sqrt(e*e+i*i)},midPointFrom:function(t){return this.lerp(t)},min:function(t){return new e(Math.min(this.x,t.x),Math.min(this.y,t.y))},max:function(t){return new e(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,i=this.y;this.x=t.x,this.y=t.y,t.x=e,t.y=i},clone:function(){return new e(this.x,this.y)}}}("undefined"!=typeof exports?exports:this),function(t){"use strict";function e(t){this.status=t,this.points=[]}var i=t.fabric||(t.fabric={});i.Intersection?i.warn("fabric.Intersection is already defined"):(i.Intersection=e,i.Intersection.prototype={constructor:e,appendPoint:function(t){return this.points.push(t),this},appendPoints:function(t){return this.points=this.points.concat(t),this}},i.Intersection.intersectLineLine=function(t,n,r,o){var s,a=(o.x-r.x)*(t.y-r.y)-(o.y-r.y)*(t.x-r.x),l=(n.x-t.x)*(t.y-r.y)-(n.y-t.y)*(t.x-r.x),c=(o.y-r.y)*(n.x-t.x)-(o.x-r.x)*(n.y-t.y);if(0!==c){var u=a/c,d=l/c;0<=u&&u<=1&&0<=d&&d<=1?(s=new e("Intersection")).appendPoint(new i.Point(t.x+u*(n.x-t.x),t.y+u*(n.y-t.y))):s=new e}else s=new e(0===a||0===l?"Coincident":"Parallel");return s},i.Intersection.intersectLinePolygon=function(t,i,n){var r,o,s,a,l=new e,c=n.length;for(a=0;a<c;a++)r=n[a],o=n[(a+1)%c],s=e.intersectLineLine(t,i,r,o),l.appendPoints(s.points);return 0<l.points.length&&(l.status="Intersection"),l},i.Intersection.intersectPolygonPolygon=function(t,i){var n,r=new e,o=t.length;for(n=0;n<o;n++){var s=t[n],a=t[(n+1)%o],l=e.intersectLinePolygon(s,a,i);r.appendPoints(l.points)}return 0<r.points.length&&(r.status="Intersection"),r},i.Intersection.intersectPolygonRectangle=function(t,n,r){var o=n.min(r),s=n.max(r),a=new i.Point(s.x,o.y),l=new i.Point(o.x,s.y),c=e.intersectLinePolygon(o,a,t),u=e.intersectLinePolygon(a,s,t),d=e.intersectLinePolygon(s,l,t),h=e.intersectLinePolygon(l,o,t),f=new e;return f.appendPoints(c.points),f.appendPoints(u.points),f.appendPoints(d.points),f.appendPoints(h.points),0<f.points.length&&(f.status="Intersection"),f})}("undefined"!=typeof exports?exports:this),function(t){"use strict";function e(t){t?this._tryParsingColor(t):this.setSource([0,0,0,1])}function i(t,e,i){return i<0&&(i+=1),1<i&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}var n=t.fabric||(t.fabric={});n.Color?n.warn("fabric.Color is already defined."):(n.Color=e,n.Color.prototype={_tryParsingColor:function(t){var i;t in e.colorNameMap&&(t=e.colorNameMap[t]),"transparent"===t&&(i=[255,255,255,0]),i||(i=e.sourceFromHex(t)),i||(i=e.sourceFromRgb(t)),i||(i=e.sourceFromHsl(t)),i||(i=[0,0,0,1]),i&&this.setSource(i)},_rgbToHsl:function(t,e,i){t/=255,e/=255,i/=255;var r,o,s,a=n.util.array.max([t,e,i]),l=n.util.array.min([t,e,i]);if(s=(a+l)/2,a===l)r=o=0;else{var c=a-l;switch(o=.5<s?c/(2-a-l):c/(a+l),a){case t:r=(e-i)/c+(e<i?6:0);break;case e:r=(i-t)/c+2;break;case i:r=(t-e)/c+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,i,n=this.getSource();return t=1===(t=n[0].toString(16)).length?"0"+t:t,e=1===(e=n[1].toString(16)).length?"0"+e:e,i=1===(i=n[2].toString(16)).length?"0"+i:i,t.toUpperCase()+e.toUpperCase()+i.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),i=t[3];return this.setSource([e,e,e,i]),this},toBlackWhite:function(t){var e=this.getSource(),i=(.3*e[0]+.59*e[1]+.11*e[2]).toFixed(0),n=e[3];return t=t||127,i=Number(i)<Number(t)?0:255,this.setSource([i,i,i,n]),this},overlayWith:function(t){t instanceof e||(t=new e(t));var i,n=[],r=this.getAlpha(),o=this.getSource(),s=t.getSource();for(i=0;i<3;i++)n.push(Math.round(.5*o[i]+.5*s[i]));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*)?\)$/,n.Color.reHSLa=/^hsla?\(\s*(\d{1,3})\s*,\s*(\d{1,3}\%)\s*,\s*(\d{1,3}\%)\s*(?:\s*,\s*(\d+(?:\.\d+)?)\s*)?\)$/,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 e.fromSource(e.sourceFromRgb(t))},n.Color.sourceFromRgb=function(t){var i=t.match(e.reRGBa);if(i){var n=parseInt(i[1],10)/(/%$/.test(i[1])?100:1)*(/%$/.test(i[1])?255:1),r=parseInt(i[2],10)/(/%$/.test(i[2])?100:1)*(/%$/.test(i[2])?255:1),o=parseInt(i[3],10)/(/%$/.test(i[3])?100:1)*(/%$/.test(i[3])?255:1);return[parseInt(n,10),parseInt(r,10),parseInt(o,10),i[4]?parseFloat(i[4]):1]}},n.Color.fromRgba=e.fromRgb,n.Color.fromHsl=function(t){return e.fromSource(e.sourceFromHsl(t))},n.Color.sourceFromHsl=function(t){var n=t.match(e.reHSLa);if(n){var r,o,s,a=(parseFloat(n[1])%360+360)%360/360,l=parseFloat(n[2])/(/%$/.test(n[2])?100:1),c=parseFloat(n[3])/(/%$/.test(n[3])?100:1);if(0===l)r=o=s=c;else{var u=c<=.5?c*(l+1):c+l-c*l,d=2*c-u;r=i(d,u,a+1/3),o=i(d,u,a),s=i(d,u,a-1/3)}return[Math.round(255*r),Math.round(255*o),Math.round(255*s),n[4]?parseFloat(n[4]):1]}},n.Color.fromHsla=e.fromHsl,n.Color.fromHex=function(t){return e.fromSource(e.sourceFromHex(t))},n.Color.sourceFromHex=function(t){if(t.match(e.reHex)){var i=t.slice(t.indexOf("#")+1),n=3===i.length||4===i.length,r=8===i.length||4===i.length,o=n?i.charAt(0)+i.charAt(0):i.substring(0,2),s=n?i.charAt(1)+i.charAt(1):i.substring(2,4),a=n?i.charAt(2)+i.charAt(2):i.substring(4,6),l=r?n?i.charAt(3)+i.charAt(3):i.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 i=new e;return i.setSource(t),i})}("undefined"!=typeof exports?exports:this),function(){function t(t){var e,i,n,r,o=t.getAttribute("style"),s=t.getAttribute("offset")||0;if(s=(s=parseFloat(s)/(/%$/.test(s)?100:1))<0?0:1<s?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*/),c=l[0].trim(),u=l[1].trim();"stop-color"===c?e=u:"stop-opacity"===c&&(n=u)}}return e||(e=t.getAttribute("stop-color")||"rgb(0,0,0)"),n||(n=t.getAttribute("stop-opacity")),i=(e=new fabric.Color(e)).getAlpha(),n=isNaN(parseFloat(n))?1:parseFloat(n),n*=i,{offset:s,color:e.toRgb(),opacity:n}}function e(t,e,i){var n,r=0,o=1,s="";for(var a in e)"Infinity"===e[a]?e[a]=1:"-Infinity"===e[a]&&(e[a]=0),n=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"===i?t.width:1,r="objectBoundingBox"===i&&t.left||0):"y1"!==a&&"y2"!==a||(o*="objectBoundingBox"===i?t.height:1,r="objectBoundingBox"===i&&t.top||0),e[a]=n*o+r;if("ellipse"===t.type&&null!==e.r2&&"objectBoundingBox"===i&&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}var i=fabric.util.object.clone;fabric.Gradient=fabric.util.createClass({offsetX:0,offsetY:0,initialize:function(t){t||(t={});var e={};this.id=fabric.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 i=new fabric.Color(t[e]);this.colorStops.push({offset:parseFloat(e),color:i.toRgb(),opacity:i.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 fabric.util.populateWithProperties(this,e,t),e},toSVG:function(t){var e,n,r,o,s=i(this.coords,!0),a=i(this.colorStops,!0),l=s.r1>s.r2,c=t.width/2,u=t.height/2;for(var d in a.sort(function(t,e){return t.offset-e.offset}),"path"===t.type&&(c-=t.pathOffset.x,u-=t.pathOffset.y),s)"x1"===d||"x2"===d?s[d]+=this.offsetX-c:"y1"!==d&&"y2"!==d||(s[d]+=this.offsetY-u);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(),e=0,n=a.length;e<n;e++)a[e].offset=1-a[e].offset;var h=Math.min(s.r1,s.r2);if(0<h){var f=h/Math.max(s.r1,s.r2);for(e=0,n=a.length;e<n;e++)a[e].offset+=f*(1-a[e].offset)}}for(e=0,n=a.length;e<n;e++){var p=a[e];r.push("<stop ",'offset="',100*p.offset+"%",'" style="stop-color:',p.color,null!==p.opacity?";stop-opacity: "+p.opacity:";",'"/>\n')}return r.push("linear"===this.type?"</linearGradient>\n":"</radialGradient>\n"),r.join("")},toLive:function(t){var e,i,n,r=fabric.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)),i=0,n=this.colorStops.length;i<n;i++){var o=this.colorStops[i].color,s=this.colorStops[i].opacity,a=this.colorStops[i].offset;void 0!==s&&(o=new fabric.Color(o).setAlpha(s).toRgba()),e.addColorStop(a,o)}return e}}}),fabric.util.object.extend(fabric.Gradient,{fromElement:function(i,n){var r,o,s,a,l,c,u=i.getElementsByTagName("stop"),d=i.getAttribute("gradientUnits")||"objectBoundingBox",h=i.getAttribute("gradientTransform"),f=[];for("linear"==(r="linearGradient"===i.nodeName||"LINEARGRADIENT"===i.nodeName?"linear":"radial")?o={x1:(c=i).getAttribute("x1")||0,y1:c.getAttribute("y1")||0,x2:c.getAttribute("x2")||"100%",y2:c.getAttribute("y2")||0}:"radial"===r&&(o={x1:(l=i).getAttribute("fx")||l.getAttribute("cx")||"50%",y1:l.getAttribute("fy")||l.getAttribute("cy")||"50%",r1:0,x2:l.getAttribute("cx")||"50%",y2:l.getAttribute("cy")||"50%",r2:l.getAttribute("r")||"50%"}),a=u.length;a--;)f.push(t(u[a]));s=e(n,o,d);var p=new fabric.Gradient({type:r,coords:o,colorStops:f,offsetX:-n.left,offsetY:-n.top});return(h||""!==s)&&(p.gradientTransform=fabric.parseTransformAttribute((h||"")+s)),p},forObject:function(t,i){return i||(i={}),e(t,i.coords,"userSpaceOnUse"),new fabric.Gradient(i)}})}(),function(){"use strict";var t=fabric.util.toFixed;fabric.Pattern=fabric.util.createClass({repeat:"repeat",offsetX:0,offsetY:0,crossOrigin:"",patternTransform:null,initialize:function(t,e){if(t||(t={}),this.id=fabric.Object.__uid++,this.setOptions(t),!t.source||t.source&&"string"!=typeof t.source)e&&e(this);else if(void 0!==fabric.util.getFunctionBody(t.source))this.source=new Function(fabric.util.getFunctionBody(t.source)),e&&e(this);else{var i=this;this.source=fabric.util.createImage(),fabric.util.loadImage(t.source,function(t){i.source=t,e&&e(i)},null,this.crossOrigin)}},toObject:function(e){var i,n,r=fabric.Object.NUM_FRACTION_DIGITS;return"function"==typeof this.source?i=String(this.source):"string"==typeof this.source.src?i=this.source.src:"object"==typeof this.source&&this.source.toDataURL&&(i=this.source.toDataURL()),n={type:"pattern",source:i,repeat:this.repeat,crossOrigin:this.crossOrigin,offsetX:t(this.offsetX,r),offsetY:t(this.offsetY,r),patternTransform:this.patternTransform?this.patternTransform.concat():null},fabric.util.populateWithProperties(this,n,e),n},toSVG:function(t){var e="function"==typeof this.source?this.source():this.source,i=e.width/t.width,n=e.height/t.height,r=this.offsetX/t.width,o=this.offsetY/t.height,s="";return"repeat-x"!==this.repeat&&"no-repeat"!==this.repeat||(n=1),"repeat-y"!==this.repeat&&"no-repeat"!==this.repeat||(i=1),e.src?s=e.src:e.toDataURL&&(s=e.toDataURL()),'<pattern id="SVGID_'+this.id+'" x="'+r+'" y="'+o+'" width="'+i+'" height="'+n+'">\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 e=t.fabric||(t.fabric={}),i=e.util.toFixed;e.Shadow?e.warn("fabric.Shadow is already defined."):(e.Shadow=e.util.createClass({color:"rgb(0,0,0)",blur:0,offsetX:0,offsetY:0,affectStroke:!1,includeDefaultValues:!0,initialize:function(t){for(var i in"string"==typeof t&&(t=this._parseShadow(t)),t)this[i]=t[i];this.id=e.Object.__uid++},_parseShadow:function(t){var i=t.trim(),n=e.Shadow.reOffsetsAndBlur.exec(i)||[];return{color:(i.replace(e.Shadow.reOffsetsAndBlur,"")||"rgb(0,0,0)").trim(),offsetX:parseInt(n[1],10)||0,offsetY:parseInt(n[2],10)||0,blur:parseInt(n[3],10)||0}},toString:function(){return[this.offsetX,this.offsetY,this.blur,this.color].join("px ")},toSVG:function(t){var n=40,r=40,o=e.Object.NUM_FRACTION_DIGITS,s=e.util.rotateVector({x:this.offsetX,y:this.offsetY},e.util.degreesToRadians(-t.angle));return t.width&&t.height&&(n=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="-'+n+'%" width="'+(100+2*n)+'%" >\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="'+this.color+'"/>\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={},i=e.Shadow.prototype;return["color","blur","offsetX","offsetY","affectStroke"].forEach(function(e){this[e]!==i[e]&&(t[e]=this[e])},this),t}}),e.Shadow.reOffsetsAndBlur=/(?:\s|^)(-?\d+(?:px)?(?:\s?|$))?(-?\d+(?:px)?(?:\s?|$))?(\d+(?:px)?)?(?:\s?|$)(?:$|\s)/)}("undefined"!=typeof exports?exports:this),function(){"use strict";if(fabric.StaticCanvas)fabric.warn("fabric.StaticCanvas is already defined.");else{var t=fabric.util.object.extend,e=fabric.util.getElementOffset,i=fabric.util.removeFromArray,n=fabric.util.toFixed,r=fabric.util.transformPoint,o=fabric.util.invertTransform,s=new Error("Could not initialize `canvas` element");fabric.StaticCanvas=fabric.util.createClass(fabric.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:fabric.iMatrix.concat(),backgroundVpt:!0,overlayVpt:!0,onBeforeScaleRotate:function(){},enableRetinaScaling:!0,vptCoords:{},skipOffscreen:!0,_initStatic:function(t,e){var i=this.requestRenderAllBound;this._objects=[],this._createLowerCanvas(t),this._initOptions(e),this._setImageSmoothing(),this.interactive||this._initRetinaScaling(),e.overlayImage&&this.setOverlayImage(e.overlayImage,i),e.backgroundImage&&this.setBackgroundImage(e.backgroundImage,i),e.backgroundColor&&this.setBackgroundColor(e.backgroundColor,i),e.overlayColor&&this.setOverlayColor(e.overlayColor,i),this.calcOffset()},_isRetinaScaling:function(){return 1!==fabric.devicePixelRatio&&this.enableRetinaScaling},getRetinaScaling:function(){return this._isRetinaScaling()?fabric.devicePixelRatio:1},_initRetinaScaling:function(){this._isRetinaScaling()&&(this.lowerCanvasEl.setAttribute("width",this.width*fabric.devicePixelRatio),this.lowerCanvasEl.setAttribute("height",this.height*fabric.devicePixelRatio),this.contextContainer.scale(fabric.devicePixelRatio,fabric.devicePixelRatio))},calcOffset:function(){return this._offset=e(this.lowerCanvasEl),this},setOverlayImage:function(t,e,i){return this.__setBgOverlayImage("overlayImage",t,e,i)},setBackgroundImage:function(t,e,i){return this.__setBgOverlayImage("backgroundImage",t,e,i)},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,i,n){return"string"==typeof e?fabric.util.loadImage(e,function(e){e&&(this[t]=new fabric.Image(e,n)),i&&i(e)},this,n&&n.crossOrigin):(n&&e.setOptions(n),this[t]=e,i&&i(e)),this},__setBgOverlayColor:function(t,e,i){return this[t]=e,this._initGradient(e,t),this._initPattern(e,t,i),this},_createCanvasElement:function(){var t=fabric.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){t&&t.getContext?this.lowerCanvasEl=t:this.lowerCanvasEl=fabric.util.getById(t)||this._createCanvasElement(),fabric.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 i;for(var n in e=e||{},t)i=t[n],e.cssOnly||(this._setBackstoreDimension(n,t[n]),i+="px"),e.backstoreOnly||this._setCssDimension(n,i);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,i,n,r=this._activeObject;for(this.viewportTransform=t,i=0,n=this._objects.length;i<n;i++)(e=this._objects[i]).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 i=t,n=this.viewportTransform.slice(0);t=r(t,o(this.viewportTransform)),n[0]=e,n[3]=e;var s=r(t,n);return n[4]+=i.x-s.x,n[5]+=i.y-s.y,this.setViewportTransform(n)},setZoom:function(t){return this.zoomToPoint(new fabric.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 fabric.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(){var t=this.contextContainer;return this.renderCanvas(t,this._objects),this},renderAndReset:function(){this.isRendering=0,this.renderAll()},requestRenderAll:function(){return this.isRendering||(this.isRendering=fabric.util.requestAnimFrame(this.renderAndResetBound)),this},calcViewportBoundaries:function(){var t={},e=this.width,i=this.height,n=o(this.viewportTransform);return t.tl=r({x:0,y:0},n),t.br=r({x:e,y:i},n),t.tr=new fabric.Point(t.br.x,t.tl.y),t.bl=new fabric.Point(t.tl.x,t.br.y),this.vptCoords=t},renderCanvas:function(t,e){var i=this.viewportTransform;this.isRendering&&(fabric.util.cancelAnimFrame(this.isRendering),this.isRendering=0),this.calcViewportBoundaries(),this.clearContext(t),this.fire("before:render"),this.clipTo&&fabric.util.clipContext(this,t),this._renderBackground(t),t.save(),t.transform(i[0],i[1],i[2],i[3],i[4],i[5]),this._renderObjects(t,e),t.restore(),!this.controlsAboveOverlay&&this.interactive&&this.drawControls(t),this.clipTo&&t.restore(),this._renderOverlay(t),this.controlsAboveOverlay&&this.interactive&&this.drawControls(t),this.fire("after:render")},_renderObjects:function(t,e){var i,n;for(i=0,n=e.length;i<n;++i)e[i]&&e[i].render(t)},_renderBackgroundOrOverlay:function(t,e){var i,n=this[e+"Color"];n&&(t.fillStyle=n.toLive?n.toLive(t,this):n,t.fillRect(n.offsetX||0,n.offsetY||0,this.width,this.height)),(n=this[e+"Image"])&&(this[e+"Vpt"]&&(i=this.viewportTransform,t.save(),t.transform(i[0],i[1],i[2],i[3],i[4],i[5])),n.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 fabric.Point(this.getCenter().left,t.getCenterPoint().y))},centerObjectV:function(t){return this._centerObject(t,new fabric.Point(t.getCenterPoint().x,this.getCenter().top))},centerObject:function(t){var e=this.getCenter();return this._centerObject(t,new fabric.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 fabric.Point(e.x,t.getCenterPoint().y)),this},viewportCenterObjectV:function(t){var e=this.getVpCenter();return this._centerObject(t,new fabric.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,i){var n={version:fabric.version,objects:this._toObjects(e,i)};return t(n,this.__serializeBgOverlay(e,i)),fabric.util.populateWithProperties(this,n,i),n},_toObjects:function(t,e){return this.getObjects().filter(function(t){return!t.excludeFromExport}).map(function(i){return this._toObject(i,t,e)},this)},_toObject:function(t,e,i){var n;this.includeDefaultValues||(n=t.includeDefaultValues,t.includeDefaultValues=!1);var r=t[e](i);return this.includeDefaultValues||(t.includeDefaultValues=n),r},__serializeBgOverlay:function(t,e){var i={},n=this.backgroundImage,r=this.overlayImage;return this.backgroundColor&&(i.background=this.backgroundColor.toObject?this.backgroundColor.toObject(e):this.backgroundColor),this.overlayColor&&(i.overlay=this.overlayColor.toObject?this.overlayColor.toObject(e):this.overlayColor),n&&!n.excludeFromExport&&(i.backgroundImage=this._toObject(n,t,e)),r&&!r.excludeFromExport&&(i.overlayImage=this._toObject(r,t,e)),i},svgViewportTransformation:!0,toSVG:function(t,e){t||(t={});var i=[];return this._setSVGPreamble(i,t),this._setSVGHeader(i,t),this._setSVGBgOverlayColor(i,"backgroundColor"),this._setSVGBgOverlayImage(i,"backgroundImage",e),this._setSVGObjects(i,e),this._setSVGBgOverlayColor(i,"overlayColor"),this._setSVGBgOverlayImage(i,"overlayImage",e),i.push("</svg>"),i.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 i,r=e.width||this.width,o=e.height||this.height,s='viewBox="0 0 '+this.width+" "+this.height+'" ',a=fabric.Object.NUM_FRACTION_DIGITS;e.viewBox?s='viewBox="'+e.viewBox.x+" "+e.viewBox.y+" "+e.viewBox.width+" "+e.viewBox.height+'" ':this.svgViewportTransformation&&(i=this.viewportTransform,s='viewBox="'+n(-i[4]/i[0],a)+" "+n(-i[5]/i[3],a)+" "+n(this.width/i[0],a)+" "+n(this.height/i[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 ",fabric.version,"</desc>\n","<defs>\n",this.createSVGFontFacesMarkup(),this.createSVGRefElementsMarkup(),"</defs>\n")},createSVGRefElementsMarkup:function(){var t=this;return["backgroundColor","overlayColor"].map(function(e){var i=t[e];if(i&&i.toLive)return i.toSVG(t,!1)}).join("")},createSVGFontFacesMarkup:function(){var t,e,i,n,r,o,s,a,l="",c={},u=fabric.fontPaths,d=this.getObjects();for(s=0,a=d.length;s<a;s++)if(e=(t=d[s]).fontFamily,-1!==t.type.indexOf("text")&&!c[e]&&u[e]&&(c[e]=!0,t.styles))for(r in i=t.styles)for(o in n=i[r])!c[e=n[o].fontFamily]&&u[e]&&(c[e]=!0);for(var h in c)l+=["\t\t@font-face {\n","\t\t\tfont-family: '",h,"';\n","\t\t\tsrc: url('",u[h],"');\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 i,n,r,o=this.getObjects();for(n=0,r=o.length;n<r;n++)(i=o[n]).excludeFromExport||this._setSVGObject(t,i,e)},_setSVGObject:function(t,e,i){t.push(e.toSVG(i))},_setSVGBgOverlayImage:function(t,e,i){this[e]&&this[e].toSVG&&t.push(this[e].toSVG(i))},_setSVGBgOverlayColor:function(t,e){var i=this[e];if(i)if(i.toLive){var n=i.repeat;t.push('<rect transform="translate(',this.width/2,",",this.height/2,')"',' x="',i.offsetX-this.width/2,'" y="',i.offsetY-this.height/2,'" ','width="',"repeat-y"===n||"no-repeat"===n?i.source.width:this.width,'" height="',"repeat-x"===n||"no-repeat"===n?i.source.height:this.height,'" fill="url(#SVGID_'+i.id+')"',"></rect>\n")}else t.push('<rect x="0" y="0" ','width="',this.width,'" height="',this.height,'" fill="',this[e],'"',"></rect>\n")},sendToBack:function(t){if(!t)return this;var e,n,r,o=this._activeObject;if(t===o&&"activeSelection"===t.type)for(e=(r=o._objects).length;e--;)n=r[e],i(this._objects,n),this._objects.unshift(n);else i(this._objects,t),this._objects.unshift(t);return this.renderOnAddRemove&&this.requestRenderAll(),this},bringToFront:function(t){if(!t)return this;var e,n,r,o=this._activeObject;if(t===o&&"activeSelection"===t.type)for(r=o._objects,e=0;e<r.length;e++)n=r[e],i(this._objects,n),this._objects.push(n);else i(this._objects,t),this._objects.push(t);return this.renderOnAddRemove&&this.requestRenderAll(),this},sendBackwards:function(t,e){if(!t)return this;var n,r,o,s,a,l=this._activeObject,c=0;if(t===l&&"activeSelection"===t.type)for(a=l._objects,n=0;n<a.length;n++)r=a[n],0+c<(o=this._objects.indexOf(r))&&(s=o-1,i(this._objects,r),this._objects.splice(s,0,r)),c++;else 0!==(o=this._objects.indexOf(t))&&(s=this._findNewLowerIndex(t,o,e),i(this._objects,t),this._objects.splice(s,0,t));return this.renderOnAddRemove&&this.requestRenderAll(),this},_findNewLowerIndex:function(t,e,i){var n,r;if(i){for(r=(n=e)-1;0<=r;--r)if(t.intersectsWithObject(this._objects[r])||t.isContainedWithinObject(this._objects[r])||this._objects[r].isContainedWithinObject(t)){n=r;break}}else n=e-1;return n},bringForward:function(t,e){if(!t)return this;var n,r,o,s,a,l=this._activeObject,c=0;if(t===l&&"activeSelection"===t.type)for(n=(a=l._objects).length;n--;)r=a[n],(o=this._objects.indexOf(r))<this._objects.length-1-c&&(s=o+1,i(this._objects,r),this._objects.splice(s,0,r)),c++;else(o=this._objects.indexOf(t))!==this._objects.length-1&&(s=this._findNewUpperIndex(t,o,e),i(this._objects,t),this._objects.splice(s,0,t));return this.renderOnAddRemove&&this.requestRenderAll(),this},_findNewUpperIndex:function(t,e,i){var n,r,o;if(i){for(r=(n=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)){n=r;break}}else n=e+1;return n},moveTo:function(t,e){return i(this._objects,t),this._objects.splice(e,0,t),this.renderOnAddRemove&&this.requestRenderAll()},dispose:function(){return this.forEachObject(function(t){t.dispose&&t.dispose()}),this._objects=[],this.backgroundImage=null,this.overlayImage=null,this._iTextInstances=null,this.lowerCanvasEl=null,this.cacheCanvasEl=null,this},toString:function(){return"#<fabric.Canvas ("+this.complexity()+"): { objects: "+this.getObjects().length+" }>"}}),t(fabric.StaticCanvas.prototype,fabric.Observable),t(fabric.StaticCanvas.prototype,fabric.Collection),t(fabric.StaticCanvas.prototype,fabric.DataURLExporter),t(fabric.StaticCanvas,{EMPTY_JSON:'{"objects": [], "background": "white"}',supports:function(t){var e=fabric.util.createCanvasElement();if(!e||!e.getContext)return null;var i=e.getContext("2d");if(!i)return null;switch(t){case"getImageData":return void 0!==i.getImageData;case"setLineDash":return void 0!==i.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}}}),fabric.StaticCanvas.prototype.toJSON=fabric.StaticCanvas.prototype.toObject,fabric.isLikelyNode&&(fabric.StaticCanvas.prototype.createPNGStream=function(){var t=fabric.util.getNodeCanvas(this.lowerCanvasEl);return t&&t.createPNGStream()},fabric.StaticCanvas.prototype.createJPEGStream=function(t){var e=fabric.util.getNodeCanvas(this.lowerCanvasEl);return e&&e.createJPEGStream(t)})}}(),fabric.BaseBrush=fabric.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 fabric.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,this.strokeDashArray&&fabric.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}}),fabric.PencilBrush=fabric.util.createClass(fabric.BaseBrush,{initialize:function(t){this.canvas=t,this._points=[]},_drawSegment:function(t,e,i){var n=e.midPointFrom(i);return t.quadraticCurveTo(e.x,e.y,n.x,n.y),n},onMouseDown:function(t){this._prepareForDrawing(t),this._captureDrawingPath(t),this._render()},onMouseMove:function(t){if(this._captureDrawingPath(t)&&1<this._points.length){var e=this._points,i=e.length,n=this.canvas.contextTop;this._saveAndTransform(n),this.oldEnd&&(n.beginPath(),n.moveTo(this.oldEnd.x,this.oldEnd.y)),this.oldEnd=this._drawSegment(n,e[i-2],e[i-1],!0),n.stroke(),n.restore()}},onMouseUp:function(){this.oldEnd=void 0,this._finalizeAndAddPath()},_prepareForDrawing:function(t){var e=new fabric.Point(t.x,t.y);this._reset(),this._addPoint(e),this.canvas.contextTop.moveTo(e.x,e.y)},_addPoint:function(t){return!(1<this._points.length&&t.eq(this._points[this._points.length-1])||(this._points.push(t),0))},_reset:function(){this._points.length=0,this._setBrushStyles(),this._setShadow()},_captureDrawingPath:function(t){var e=new fabric.Point(t.x,t.y);return this._addPoint(e)},_render:function(){var t,e,i=this.canvas.contextTop,n=this._points[0],r=this._points[1];if(this._saveAndTransform(i),i.beginPath(),2===this._points.length&&n.x===r.x&&n.y===r.y){var o=this.width/1e3;n=new fabric.Point(n.x,n.y),r=new fabric.Point(r.x,r.y),n.x-=o,r.x+=o}for(i.moveTo(n.x,n.y),t=1,e=this._points.length;t<e;t++)this._drawSegment(i,n,r),n=this._points[t],r=this._points[t+1];i.lineTo(n.x,n.y),i.stroke(),i.restore()},convertPointsToSVGPath:function(t){var e,i=[],n=this.width/1e3,r=new fabric.Point(t[0].x,t[0].y),o=new fabric.Point(t[1].x,t[1].y),s=t.length,a=1,l=1,c=2<s;for(c&&(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),i.push("M ",r.x-a*n," ",r.y-l*n," "),e=1;e<s;e++){if(!r.eq(o)){var u=r.midPointFrom(o);i.push("Q ",r.x," ",r.y," ",u.x," ",u.y," ")}r=t[e],e+1<t.length&&(o=t[e+1])}return c&&(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),i.push("L ",r.x+a*n," ",r.y+l*n),i},createPath:function(t){var e=new fabric.Path(t,{fill:null,stroke:this.color,strokeWidth:this.width,strokeLineCap:this.strokeLineCap,strokeMiterLimit:this.strokeMiterLimit,strokeLineJoin:this.strokeLineJoin,strokeDashArray:this.strokeDashArray}),i=new fabric.Point(e.left+e.width/2,e.top+e.height/2);return i=e.translateToGivenOrigin(i,"center","center",e.originX,e.originY),e.top=i.y,e.left=i.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()}}),fabric.CircleBrush=fabric.util.createClass(fabric.BaseBrush,{width:10,initialize:function(t){this.canvas=t,this.points=[]},drawDot:function(t){var e=this.addPoint(t),i=this.canvas.contextTop;this._saveAndTransform(i),i.fillStyle=e.fill,i.beginPath(),i.arc(e.x,e.y,e.radius,0,2*Math.PI,!1),i.closePath(),i.fill(),i.restore()},onMouseDown:function(t){this.points.length=0,this.canvas.clearContext(this.canvas.contextTop),this._setShadow(),this.drawDot(t)},_render:function(){var t,e,i,n=this.canvas.contextTop,r=this.points;for(this._saveAndTransform(n),t=0,e=r.length;t<e;t++)i=r[t],n.fillStyle=i.fill,n.beginPath(),n.arc(i.x,i.y,i.radius,0,2*Math.PI,!1),n.closePath(),n.fill();n.restore()},onMouseMove:function(t){this.drawDot(t)},onMouseUp:function(){var t,e,i=this.canvas.renderOnAddRemove;this.canvas.renderOnAddRemove=!1;var n=[];for(t=0,e=this.points.length;t<e;t++){var r=this.points[t],o=new fabric.Circle({radius:r.radius,left:r.x,top:r.y,originX:"center",originY:"center",fill:r.fill});this.shadow&&o.setShadow(this.shadow),n.push(o)}var s=new fabric.Group(n,{originX:"center",originY:"center"});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=i,this.canvas.requestRenderAll()},addPoint:function(t){var e=new fabric.Point(t.x,t.y),i=fabric.util.getRandomInt(Math.max(0,this.width-20),this.width+20)/2,n=new fabric.Color(this.color).setAlpha(fabric.util.getRandomInt(0,100)/100).toRgba();return e.radius=i,e.fill=n,this.points.push(e),e}}),fabric.SprayBrush=fabric.util.createClass(fabric.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=[],i=0,n=this.sprayChunks.length;i<n;i++)for(var r=this.sprayChunks[i],o=0,s=r.length;o<s;o++){var a=new fabric.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 fabric.Group(e,{originX:"center",originY:"center"});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,i,n,r={};for(i=0,n=t.length;i<n;i++)r[e=t[i].left+""+t[i].top]||(r[e]=t[i]);var o=[];for(e in r)o.push(r[e]);return o},render:function(t){var e,i,n=this.canvas.contextTop;for(n.fillStyle=this.color,this._saveAndTransform(n),e=0,i=t.length;e<i;e++){var r=t[e];void 0!==r.opacity&&(n.globalAlpha=r.opacity),n.fillRect(r.x,r.y,r.width,r.width)}n.restore()},_render:function(){var t,e,i=this.canvas.contextTop;for(i.fillStyle=this.color,this._saveAndTransform(i),t=0,e=this.sprayChunks.length;t<e;t++)this.render(this.sprayChunks[t]);i.restore()},addSprayChunk:function(t){this.sprayChunkPoints=[];var e,i,n,r,o=this.width/2;for(r=0;r<this.density;r++){e=fabric.util.getRandomInt(t.x-o,t.x+o),i=fabric.util.getRandomInt(t.y-o,t.y+o),n=this.dotWidthVariance?fabric.util.getRandomInt(Math.max(1,this.dotWidth-this.dotWidthVariance),this.dotWidth+this.dotWidthVariance):this.dotWidth;var s=new fabric.Point(e,i);s.width=n,this.randomOpacity&&(s.opacity=fabric.util.getRandomInt(0,100)/100),this.sprayChunkPoints.push(s)}this.sprayChunks.push(this.sprayChunkPoints)}}),fabric.PatternBrush=fabric.util.createClass(fabric.PencilBrush,{getPatternSrc:function(){var t=fabric.document.createElement("canvas"),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),i=e._getLeftTopCoords().scalarAdd(e.strokeWidth/2);return e.stroke=new fabric.Pattern({source:this.source||this.getPatternSrcFunction(),offsetX:-i.x,offsetY:-i.y}),e}}),function(){var t=fabric.util.getPointer,e=fabric.util.degreesToRadians,i=fabric.util.radiansToDegrees,n=Math.atan2,r=Math.abs,o=fabric.StaticCanvas.supports("setLineDash");for(var s in fabric.Canvas=fabric.util.createClass(fabric.StaticCanvas,{initialize:function(t,e){e||(e={}),this.renderAndResetBound=this.renderAndReset.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=fabric.PencilBrush&&new fabric.PencilBrush(this),this.calcOffset()},_chooseObjectsToRender:function(){var t,e,i,n=this.getActiveObjects();if(0<n.length&&!this.preserveObjectStacking){e=[],i=[];for(var r=0,o=this._objects.length;r<o;r++)t=this._objects[r],-1===n.indexOf(t)?e.push(t):i.push(t);1<n.length&&(this._activeObject._objects=i),e.push.apply(e,i)}else e=this._objects;return e},renderAll:function(){!this.contextTopDirty||this._groupSelector||this.isDrawingMode||(this.clearContext(this.contextTop),this.contextTopDirty=!1),this.isDrawingMode&&this._isCurrentlyDrawing&&this.freeDrawingBrush&&this.freeDrawingBrush._render();var t=this.contextContainer;return this.renderCanvas(t,this._chooseObjectsToRender()),this},renderTop:function(){var t=this.contextTop;return this.clearContext(t),this.selection&&this._groupSelector&&this._drawSelection(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)?"rotate"===t.action?this._setOriginToCenter(t.target):("center"!==t.originX&&("right"===t.originX?t.mouseXSign=-1:t.mouseXSign=1),"center"!==t.originY&&("bottom"===t.originY?t.mouseYSign=-1:t.mouseYSign=1),t.originX="center",t.originY="center"):(t.originX=t.original.originX,t.originY=t.original.originY)},containsPoint:function(t,e,i){var n,r=i||this.getPointer(t,!0);return n=e.group&&e.group===this._activeObject&&"activeSelection"===e.group.type?this._normalizePointer(e.group,r):{x:r.x,y:r.y},e.containsPoint(n)||e._findTargetCorner(r)},_normalizePointer:function(t,e){var i=t.calcTransformMatrix(),n=fabric.util.invertTransform(i),r=this.restorePointerVpt(e);return fabric.util.transformPoint(r,n)},isTargetTransparent:function(t,e,i){var n=this.contextCache,r=t.selectionBackgroundColor,o=this.viewportTransform;return t.selectionBackgroundColor="",this.clearContext(n),n.save(),n.transform(o[0],o[1],o[2],o[3],o[4],o[5]),t.render(n),n.restore(),t===this._activeObject&&t._renderControls(n,{hasBorders:!1,transparentCorners:!1},{hasBorders:!1}),t.selectionBackgroundColor=r,fabric.util.isTransparent(n,e,i,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 i=this.getActiveObjects(),n=this._activeObject;return!e||e&&n&&1<i.length&&-1===i.indexOf(e)&&n!==e&&!this._isSelectionKeyPressed(t)||e&&!e.evented||e&&!e.selectable&&n&&n!==e},_shouldCenterTransform:function(t){if(t){var e,i=this._currentTransform;return"scale"===i.action||"scaleX"===i.action||"scaleY"===i.action?e=this.centeredScaling||t.centeredScaling:"rotate"===i.action&&(e=this.centeredRotation||t.centeredRotation),e?!i.altKey:i.altKey}},_getOriginFromCorner:function(t,e){var i={x:t.originX,y:t.originY};return"ml"===e||"tl"===e||"bl"===e?i.x="right":"mr"!==e&&"tr"!==e&&"br"!==e||(i.x="left"),"tl"===e||"mt"===e||"tr"===e?i.y="bottom":"bl"!==e&&"mb"!==e&&"br"!==e||(i.y="top"),i},_getActionFromCorner:function(t,e,i){if(!e)return"drag";switch(e){case"mtr":return"rotate";case"ml":case"mr":return i[this.altActionKey]?"skewY":"scaleX";case"mt":case"mb":return i[this.altActionKey]?"skewX":"scaleY";default:return"scale"}},_setupCurrentTransform:function(t,i){if(i){var n=this.getPointer(t),r=i._findTargetCorner(this.getPointer(t,!0)),o=this._getActionFromCorner(i,r,t),s=this._getOriginFromCorner(i,r);this._currentTransform={target:i,action:o,corner:r,scaleX:i.scaleX,scaleY:i.scaleY,skewX:i.skewX,skewY:i.skewY,offsetX:n.x-i.left,offsetY:n.y-i.top,originX:s.x,originY:s.y,ex:n.x,ey:n.y,lastX:n.x,lastY:n.y,left:i.left,top:i.top,theta:e(i.angle),width:i.width*i.scaleX,mouseXSign:1,mouseYSign:1,shiftKey:t.shiftKey,altKey:t[this.centeredKey]},this._currentTransform.original={left:i.left,top:i.top,scaleX:i.scaleX,scaleY:i.scaleY,skewX:i.skewX,skewY:i.skewY,originX:s.x,originY:s.y},this._resetCurrentTransform()}},_translateObject:function(t,e){var i=this._currentTransform,n=i.target,r=t-i.offsetX,o=e-i.offsetY,s=!n.get("lockMovementX")&&n.left!==r,a=!n.get("lockMovementY")&&n.top!==o;return s&&n.set("left",r),a&&n.set("top",o),s||a},_changeSkewTransformOrigin:function(t,e,i){var n="originX",r={0:"center"},o=e.target.skewX,s="left",a="right",l="mt"===e.corner||"ml"===e.corner?1:-1,c=1;t=0<t?1:-1,"y"===i&&(o=e.target.skewY,s="top",a="bottom",n="originY"),r[-1]=s,r[1]=a,e.target.flipX&&(c*=-1),e.target.flipY&&(c*=-1),0===o?(e.skewSign=-l*t*c,e[n]=r[-t]):(o=0<o?1:-1,e.skewSign=o,e[n]=r[o*l*c])},_skewObject:function(t,e,i){var n,r=this._currentTransform,o=r.target,s=o.get("lockSkewingX"),a=o.get("lockSkewingY");if(s&&"x"===i||a&&"y"===i)return!1;var l,c,u=o.getCenterPoint(),d=o.toLocalPoint(new fabric.Point(t,e),"center","center")[i],h=o.toLocalPoint(new fabric.Point(r.lastX,r.lastY),"center","center")[i],f=o._getTransformedDimensions();return this._changeSkewTransformOrigin(d-h,r,i),l=o.toLocalPoint(new fabric.Point(t,e),r.originX,r.originY)[i],c=o.translateToOriginPoint(u,r.originX,r.originY),n=this._setObjectSkew(l,r,i,f),r.lastX=t,r.lastY=e,o.setPositionByOrigin(c,r.originX,r.originY),n},_setObjectSkew:function(t,e,i,n){var r,o,s,a,l,c,u,d,h,f,p=e.target,g=e.skewSign;return"x"===i?(l="y",c="Y",u="X",h=0,f=p.skewY):(l="x",c="X",u="Y",h=p.skewX,f=0),a=p._getTransformedDimensions(h,f),(d=2*Math.abs(t)-a[i])<=2?r=0:(r=g*Math.atan(d/p["scale"+u]/(a[l]/p["scale"+c])),r=fabric.util.radiansToDegrees(r)),o=p["skew"+u]!==r,p.set("skew"+u,r),0!==p["skew"+c]&&(s=p._getTransformedDimensions(),r=n[l]/s[l]*p["scale"+c],p.set("scale"+c,r)),o},_scaleObject:function(t,e,i){var n=this._currentTransform,r=n.target,o=r.get("lockScalingX"),s=r.get("lockScalingY"),a=r.get("lockScalingFlip");if(o&&s)return!1;var l,c=r.translateToOriginPoint(r.getCenterPoint(),n.originX,n.originY),u=r.toLocalPoint(new fabric.Point(t,e),n.originX,n.originY),d=r._getTransformedDimensions();return this._setLocalMouse(u,n),l=this._setObjectScale(u,n,o,s,i,a,d),r.setPositionByOrigin(c,n.originX,n.originY),l},_setObjectScale:function(t,e,i,n,r,o,s){var a,l,c,u,d=e.target,h=!1,f=!1,p=!1;return c=t.x*d.scaleX/s.x,u=t.y*d.scaleY/s.y,a=d.scaleX!==c,l=d.scaleY!==u,o&&c<=0&&c<d.scaleX&&(h=!0,t.x=0),o&&u<=0&&u<d.scaleY&&(f=!0,t.y=0),"equally"!==r||i||n?r?"x"!==r||d.get("lockUniScaling")?"y"!==r||d.get("lockUniScaling")||f||n||d.set("scaleY",u)&&(p=p||l):h||i||d.set("scaleX",c)&&(p=p||a):(h||i||d.set("scaleX",c)&&(p=p||a),f||n||d.set("scaleY",u)&&(p=p||l)):p=this._scaleObjectEqually(t,d,e,s),e.newScaleX=c,e.newScaleY=u,h||f||this._flipObject(e,r),p},_scaleObjectEqually:function(t,e,i,n){var r,o=t.y+t.x,s=n.y*i.original.scaleY/e.scaleY+n.x*i.original.scaleX/e.scaleX,a=t.x<0?-1:1,l=t.y<0?-1:1;return i.newScaleX=a*Math.abs(i.original.scaleX*o/s),i.newScaleY=l*Math.abs(i.original.scaleY*o/s),r=i.newScaleX!==e.scaleX||i.newScaleY!==e.scaleY,e.set("scaleX",i.newScaleX),e.set("scaleY",i.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 i=e.target,n=this.getZoom(),o=i.padding/n;"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;if(r.target.get("lockRotation"))return!1;var o=n(r.ey-r.top,r.ex-r.left),s=n(e-r.top,t-r.left),a=i(s-o+r.theta),l=!0;if(0<r.target.snapAngle){var c=r.target.snapAngle,u=r.target.snapThreshold||c,d=Math.ceil(a/c)*c,h=Math.floor(a/c)*c;Math.abs(a-h)<u?a=h:Math.abs(a-d)<u&&(a=d)}return a<0&&(a=360+a),a%=360,r.target.angle===a?l=!1:r.target.angle=a,l},setCursor:function(t){this.upperCanvasEl.style.cursor=t},_resetObjectTransform:function(t){t.scaleX=1,t.scaleY=1,t.skewX=0,t.skewY=0,t.rotate(0)},_drawSelection:function(t){var e=this._groupSelector,i=e.left,n=e.top,s=r(i),a=r(n);if(this.selectionColor&&(t.fillStyle=this.selectionColor,t.fillRect(e.ex-(0<i?0:-i),e.ey-(0<n?0:-n),s,a)),this.selectionLineWidth&&this.selectionBorderColor)if(t.lineWidth=this.selectionLineWidth,t.strokeStyle=this.selectionBorderColor,1<this.selectionDashArray.length&&!o){var l=e.ex+.5-(0<i?0:s),c=e.ey+.5-(0<n?0:a);t.beginPath(),fabric.util.drawDashedLine(t,l,c,l+s,c,this.selectionDashArray),fabric.util.drawDashedLine(t,l,c+a-1,l+s,c+a-1,this.selectionDashArray),fabric.util.drawDashedLine(t,l,c,l,c+a,this.selectionDashArray),fabric.util.drawDashedLine(t,l+s-1,c,l+s-1,c+a,this.selectionDashArray),t.closePath(),t.stroke()}else fabric.Object.prototype._setLineDash.call(this,t,this.selectionDashArray),t.strokeRect(e.ex+.5-(0<i?0:s),e.ey+.5-(0<n?0:a),s,a)},findTarget:function(t,e){if(!this.skipTargetFind){var i,n,r=this.getPointer(t,!0),o=this._activeObject,s=this.getActiveObjects();if(this.targets=[],1<s.length&&!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;i=o,n=this.targets,this.targets=[]}var a=this._searchPossibleTargets(this._objects,r);return t[this.altSelectionKey]&&a&&i&&a!==i&&(a=i,this.targets=n),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 i,n,r,o=t.length;o--;)if(this._checkTarget(e,t[o])){(i=t[o]).subTargetCheck&&i instanceof fabric.Group&&(n=this._normalizePointer(i,e),(r=this._searchPossibleTargets(i._objects,n))&&this.targets.push(r));break}return i},restorePointerVpt:function(t){return fabric.util.transformPoint(t,fabric.util.invertTransform(this.viewportTransform))},getPointer:function(e,i,n){n||(n=this.upperCanvasEl);var r,o=t(e),s=n.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(),o.x=o.x-this._offset.left,o.y=o.y-this._offset.top,i||(o=this.restorePointerVpt(o)),r=0===a||0===l?{width:1,height:1}:{width:n.width/a,height:n.height/l},{x:o.x*r.width,y:o.y*r.height}},_createUpperCanvas:function(){var t=this.lowerCanvasEl.className.replace(/\s*lower-canvas\s*/,"");this.upperCanvasEl?this.upperCanvasEl.className="":this.upperCanvasEl=this._createCanvasElement(),fabric.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=fabric.util.wrapElement(this.lowerCanvasEl,"div",{class:this.containerClass}),fabric.util.setStyle(this.wrapperEl,{width:this.width+"px",height:this.height+"px",position:"relative"}),fabric.util.makeElementUnselectable(this.wrapperEl)},_applyCanvasStyle:function(t){var e=this.width||t.width,i=this.height||t.height;fabric.util.setStyle(t,{position:"absolute",width:e+"px",height:i+"px",left:0,top:0,"touch-action":"none"}),t.width=e,t.height=i,fabric.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 i=!1,n=this.getActiveObjects(),r=[],o=[],s={e:e};t.forEach(function(t){-1===n.indexOf(t)&&(i=!0,t.fire("deselected",s),o.push(t))}),n.forEach(function(e){-1===t.indexOf(e)&&(i=!0,e.fire("selected",s),r.push(e))}),0<t.length&&0<n.length?(s.selected=r,s.deselected=o,s.updated=r[0]||o[0],s.target=this._activeObject,i&&this.fire("selection:updated",s)):0<n.length?(1===n.length&&(s.target=r[0],this.fire("object:selected",s)),s.selected=r,s.target=this._activeObject,this.fire("selection:created",s)):0<t.length&&(s.deselected=o,this.fire("selection:cleared",s))},setActiveObject:function(t,e){var i=this.getActiveObjects();return this._setActiveObject(t,e),this._fireSelectionEvents(i,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 i=this._activeObject;if(i){if(i.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),delete this.upperCanvasEl,t.parentNode&&t.parentNode.replaceChild(this.lowerCanvasEl,this.wrapperEl),delete this.wrapperEl,fabric.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,i){var n=this._realizeGroupTransformOnObject(t),r=this.callSuper("_toObject",t,e,i);return this._unwindGroupTransformOnObject(t,n),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(i){e[i]=t[i]}),this._activeObject.realizeTransform(t),e}return null},_unwindGroupTransformOnObject:function(t,e){e&&t.set(e)},_setSVGObject:function(t,e,i){var n=this._realizeGroupTransformOnObject(e);this.callSuper("_setSVGObject",t,e,i),this._unwindGroupTransformOnObject(e,n)}}),fabric.StaticCanvas)"prototype"!==s&&(fabric.Canvas[s]=fabric.StaticCanvas[s]);fabric.isTouchSupported&&(fabric.Canvas.prototype._setCursorFromEvent=function(){})}(),function(){function t(t,e){return"which"in t?t.which===e:t.button===e-1}var e={mt:0,tr:1,mr:2,br:3,mb:4,bl:5,ml:6,tl:7},i=fabric.util.addListener,n=fabric.util.removeListener;fabric.util.object.extend(fabric.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(),i(fabric.window,"resize",this._onResize),i(this.upperCanvasEl,"mousedown",this._onMouseDown),i(this.upperCanvasEl,"dblclick",this._onDoubleClick),i(this.upperCanvasEl,"mousemove",this._onMouseMove),i(this.upperCanvasEl,"mouseout",this._onMouseOut),i(this.upperCanvasEl,"mouseenter",this._onMouseEnter),i(this.upperCanvasEl,"wheel",this._onMouseWheel),i(this.upperCanvasEl,"contextmenu",this._onContextMenu),i(this.upperCanvasEl,"dragover",this._onDragOver),i(this.upperCanvasEl,"dragenter",this._onDragEnter),i(this.upperCanvasEl,"dragleave",this._onDragLeave),i(this.upperCanvasEl,"drop",this._onDrop),i(this.upperCanvasEl,"touchstart",this._onMouseDown,{passive:!1}),i(this.upperCanvasEl,"touchmove",this._onMouseMove,{passive:!1}),"undefined"!=typeof eventjs&&"add"in eventjs&&(eventjs.add(this.upperCanvasEl,"gesture",this._onGesture),eventjs.add(this.upperCanvasEl,"drag",this._onDrag),eventjs.add(this.upperCanvasEl,"orientation",this._onOrientationChange),eventjs.add(this.upperCanvasEl,"shake",this._onShake),eventjs.add(this.upperCanvasEl,"longpress",this._onLongPress))},_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)},removeListeners:function(){n(fabric.window,"resize",this._onResize),n(this.upperCanvasEl,"mousedown",this._onMouseDown),n(this.upperCanvasEl,"mousemove",this._onMouseMove),n(this.upperCanvasEl,"mouseout",this._onMouseOut),n(this.upperCanvasEl,"mouseenter",this._onMouseEnter),n(this.upperCanvasEl,"wheel",this._onMouseWheel),n(this.upperCanvasEl,"contextmenu",this._onContextMenu),n(this.upperCanvasEl,"doubleclick",this._onDoubleClick),n(this.upperCanvasEl,"touchstart",this._onMouseDown),n(this.upperCanvasEl,"touchmove",this._onMouseMove),n(this.upperCanvasEl,"dragover",this._onDragOver),n(this.upperCanvasEl,"dragenter",this._onDragEnter),n(this.upperCanvasEl,"dragleave",this._onDragLeave),n(this.upperCanvasEl,"drop",this._onDrop),"undefined"!=typeof eventjs&&"remove"in eventjs&&(eventjs.remove(this.upperCanvasEl,"gesture",this._onGesture),eventjs.remove(this.upperCanvasEl,"drag",this._onDrag),eventjs.remove(this.upperCanvasEl,"orientation",this._onOrientationChange),eventjs.remove(this.upperCanvasEl,"shake",this._onShake),eventjs.remove(this.upperCanvasEl,"longpress",this._onLongPress))},_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._handleEvent(t,"dblclick")},_onMouseDown:function(t){this.__onMouseDown(t),i(fabric.document,"touchend",this._onMouseUp,{passive:!1}),i(fabric.document,"touchmove",this._onMouseMove,{passive:!1}),n(this.upperCanvasEl,"mousemove",this._onMouseMove),n(this.upperCanvasEl,"touchmove",this._onMouseMove),"touchstart"===t.type?n(this.upperCanvasEl,"mousedown",this._onMouseDown):(i(fabric.document,"mouseup",this._onMouseUp),i(fabric.document,"mousemove",this._onMouseMove))},_onMouseUp:function(t){if(this.__onMouseUp(t),n(fabric.document,"mouseup",this._onMouseUp),n(fabric.document,"touchend",this._onMouseUp),n(fabric.document,"mousemove",this._onMouseMove),n(fabric.document,"touchmove",this._onMouseMove),i(this.upperCanvasEl,"mousemove",this._onMouseMove),i(this.upperCanvasEl,"touchmove",this._onMouseMove,{passive:!1}),"touchend"===t.type){var e=this;setTimeout(function(){i(e.upperCanvasEl,"mousedown",e._onMouseDown)},400)}},_onMouseMove:function(t){!this.allowTouchScrolling&&t.preventDefault&&t.preventDefault(),this.__onMouseMove(t)},_onResize:function(){this.calcOffset()},_shouldRender:function(t,e){var i=this._activeObject;return!(i&&i.isEditing&&t===i||!(t&&(t.isMoving||t!==i)||!t&&i||!t&&!i&&!this._groupSelector||e&&this._previousPointer&&this.selection&&(e.x!==this._previousPointer.x||e.y!==this._previousPointer.y)))},__onMouseUp:function(e){var i,n=!0,r=this._currentTransform,o=this._groupSelector,s=!o||0===o.left&&0===o.top;if(t(e,3))this.fireRightClick&&this._handleEvent(e,"up",i,3,s);else if(t(e,2))this.fireMiddleClick&&this._handleEvent(e,"up",i,2,s);else if(this.isDrawingMode&&this._isCurrentlyDrawing)this._onMouseUpInDrawingMode(e);else{r&&(this._finalizeCurrentTransform(e),n=!r.actionPerformed),i=n?this.findTarget(e,!0):r.target;var a=this._shouldRender(i,this.getPointer(e));i||!s?this._maybeGroupObjects(e):(this._groupSelector=null,this._currentTransform=null),i&&(i.isMoving=!1),this._setCursorFromEvent(e,i),this._handleEvent(e,"up",i||null,1,s),i&&(i.__corner=0),a&&this.requestRenderAll()}},_simpleEventHandler:function(t,e){var i=this.findTarget(e),n=this.targets,r={e:e,target:i,subTargets:n};if(this.fire(t,r),i&&i.fire(t,r),!n)return i;for(var o=0;o<n.length;o++)n[o].fire(t,r);return i},_handleEvent:function(t,e,i,n,r){var o=void 0===i?this.findTarget(t):i,s=this.targets||[],a={e:t,target:o,subTargets:s,button:n||1,isClick:r||!1};this.fire("mouse:"+e,a),o&&o.fire("mouse"+e,a);for(var l=0;l<s.length;l++)s[l].fire("mouse"+e,a)},_finalizeCurrentTransform:function(t){var e=this._currentTransform,i=e.target;i._scaling&&(i._scaling=!1),i.setCoords(),this._restoreOriginXY(i),(e.actionPerformed||this.stateful&&i.hasStateChanged())&&(this.fire("object:modified",{target:i,e:t}),i.fire("modified",{e:t}))},_restoreOriginXY:function(t){if(this._previousOriginX&&this._previousOriginY){var e=t.translateToOriginPoint(t.getCenterPoint(),this._previousOriginX,this._previousOriginY);t.originX=this._previousOriginX,
t.originY=this._previousOriginY,t.left=e.x,t.top=e.y,this._previousOriginX=null,this._previousOriginY=null}},_onMouseDownInDrawingMode:function(t){this._isCurrentlyDrawing=!0,this.getActiveObject()&&this.discardActiveObject(t).requestRenderAll(),this.clipTo&&fabric.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(e){var i=this.findTarget(e)||null;if(t(e,3))this.fireRightClick&&this._handleEvent(e,"down",i,3);else if(t(e,2))this.fireMiddleClick&&this._handleEvent(e,"down",i,2);else if(this.isDrawingMode)this._onMouseDownInDrawingMode(e);else if(!this._currentTransform){var n=this.getPointer(e,!0);this._previousPointer=n;var r=this._shouldRender(i,n),o=this._shouldGroup(e,i);this._shouldClearSelection(e,i)?this.discardActiveObject(e):o&&(this._handleGrouping(e,i),i=this._activeObject),!this.selection||i&&(i.selectable||i.isEditing||i===this._activeObject)||(this._groupSelector={ex:n.x,ey:n.y,top:0,left:0}),i&&(i.selectable&&this.setActiveObject(i,e),i!==this._activeObject||!i.__corner&&o||(this._beforeTransform(e,i),this._setupCurrentTransform(e,i))),this._handleEvent(e,"down",i),r&&this.requestRenderAll()}},_beforeTransform:function(t,e){this.stateful&&e.saveState(),e._findTargetCorner(this.getPointer(t,!0))&&this.onBeforeScaleRotate(e)},_setOriginToCenter:function(t){this._previousOriginX=this._currentTransform.target.originX,this._previousOriginY=this._currentTransform.target.originY;var e=t.getCenterPoint();t.originX="center",t.originY="center",t.left=e.x,t.top=e.y,this._currentTransform.left=t.left,this._currentTransform.top=t.top},_setCenterToOrigin:function(t){var e=t.translateToOriginPoint(t.getCenterPoint(),this._previousOriginX,this._previousOriginY);t.originX=this._previousOriginX,t.originY=this._previousOriginY,t.left=e.x,t.top=e.y,this._previousOriginX=null,this._previousOriginY=null},__onMouseMove:function(t){var e,i;if(this.isDrawingMode)this._onMouseMoveInDrawingMode(t);else if(!(void 0!==t.touches&&1<t.touches.length)){var n=this._groupSelector;n?(i=this.getPointer(t,!0),n.left=i.x-n.ex,n.top=i.y-n.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._currentTransform?null:e)}},_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,i){var n,r,o,s=this[i.targetName],a=s!==t,l=i.canvasEvtIn,c=i.canvasEvtOut;a&&(n={e:e,target:t,previousTarget:s},r={e:e,target:s,nextTarget:t},this[i.targetName]=t),o=t&&a,s&&a&&(c&&this.fire(c,r),s.fire(i.evtOut,r)),o&&(l&&this.fire(l,n),t.fire(i.evtIn,n))},__onMouseWheel:function(t){this._handleEvent(t,"wheel")},_transformObject:function(t){var e=this.getPointer(t),i=this._currentTransform;i.reset=!1,i.target.isMoving=!0,i.shiftKey=t.shiftKey,i.altKey=t[this.centeredKey],this._beforeScaleTransform(t,i),this._performTransformAction(t,i,e),i.actionPerformed&&this.requestRenderAll()},_performTransformAction:function(t,e,i){var n=i.x,r=i.y,o=e.target,s=e.action,a=!1;"rotate"===s?(a=this._rotateObject(n,r))&&this._fire("rotating",o,t):"scale"===s?(a=this._onScale(t,e,n,r))&&this._fire("scaling",o,t):"scaleX"===s?(a=this._scaleObject(n,r,"x"))&&this._fire("scaling",o,t):"scaleY"===s?(a=this._scaleObject(n,r,"y"))&&this._fire("scaling",o,t):"skewX"===s?(a=this._skewObject(n,r,"x"))&&this._fire("skewing",o,t):"skewY"===s?(a=this._skewObject(n,r,"y"))&&this._fire("skewing",o,t):(a=this._translateObject(n,r))&&(this._fire("moving",o,t),this.setCursor(o.moveCursor||this.moveCursor)),e.actionPerformed=e.actionPerformed||a},_fire:function(t,e,i){this.fire("object:"+t,{target:e,e:i}),e.fire(t,{e:i})},_beforeScaleTransform:function(t,e){if("scale"===e.action||"scaleX"===e.action||"scaleY"===e.action){var i=this._shouldCenterTransform(e.target);(i&&("center"!==e.originX||"center"!==e.originY)||!i&&"center"===e.originX&&"center"===e.originY)&&(this._resetCurrentTransform(),e.reset=!0)}},_onScale:function(t,e,i,n){return this._isUniscalePossible(t,e.target)?(e.currentAction="scale",this._scaleObject(i,n)):(e.reset||"scale"!==e.currentAction||this._resetCurrentTransform(),e.currentAction="scaleEqually",this._scaleObject(i,n,"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 i=e.hoverCursor||this.hoverCursor,n=this._activeObject&&"activeSelection"===this._activeObject.type?this._activeObject:null,r=(!n||!n.contains(e))&&e._findTargetCorner(this.getPointer(t,!0));r?this.setCursor(this.getCornerCursor(r,e,t)):this.setCursor(i)},getCornerCursor:function(t,i,n){return this.actionIsDisabled(t,i,n)?this.notAllowedCursor:t in e?this._getRotatedCornerCursor(t,i,n):"mtr"===t&&i.hasRotatingPoint?this.rotationCursor:this.defaultCursor},actionIsDisabled:function(t,e,i){return"mt"===t||"mb"===t?i[this.altActionKey]?e.lockSkewingX:e.lockScalingY:"ml"===t||"mr"===t?i[this.altActionKey]?e.lockSkewingY:e.lockScalingX:"mtr"===t?e.lockRotation:this._isUniscalePossible(i,e)?e.lockScalingX&&e.lockScalingY:e.lockScalingX||e.lockScalingY},_getRotatedCornerCursor:function(t,i,n){var r=Math.round(i.angle%360/45);return r<0&&(r+=8),r+=e[t],n[this.altActionKey]&&e[t]%2==0&&(r+=2),r%=8,this.cursorMap[r]}})}(),function(){var t=Math.min,e=Math.max;fabric.util.object.extend(fabric.Canvas.prototype,{_shouldGroup:function(t,e){var i=this._activeObject;return i&&this._isSelectionKeyPressed(t)&&e&&e.selectable&&this.selection&&(i!==e||"activeSelection"===i.type)},_handleGrouping:function(t,e){var i=this._activeObject;i.__corner||(e!==i||(e=this.findTarget(t,!0)))&&(i&&"activeSelection"===i.type?this._updateActiveSelection(e,t):this._createActiveSelection(e,t))},_updateActiveSelection:function(t,e){var i=this._activeObject,n=i._objects.slice(0);i.contains(t)?(i.removeWithUpdate(t),this._hoveredTarget=t,1===i.size()&&this._setActiveObject(i.item(0),e)):(i.addWithUpdate(t),this._hoveredTarget=i),this._fireSelectionEvents(n,e)},_createActiveSelection:function(t,e){var i=this.getActiveObjects(),n=this._createGroup(t);this._hoveredTarget=n,this._setActiveObject(n,e),this._fireSelectionEvents(i,e)},_createGroup:function(t){var e=this.getObjects(),i=e.indexOf(this._activeObject)<e.indexOf(t)?[this._activeObject,t]:[t,this._activeObject];return this._activeObject.isEditing&&this._activeObject.exitEditing(),new fabric.ActiveSelection(i,{canvas:this})},_groupSelectedObjects:function(t){var e,i=this._collectObjects();1===i.length?this.setActiveObject(i[0],t):1<i.length&&(e=new fabric.ActiveSelection(i.reverse(),{canvas:this}),this.setActiveObject(e,t))},_collectObjects:function(){for(var i,n=[],r=this._groupSelector.ex,o=this._groupSelector.ey,s=r+this._groupSelector.left,a=o+this._groupSelector.top,l=new fabric.Point(t(r,s),t(o,a)),c=new fabric.Point(e(r,s),e(o,a)),u=!this.selectionFullyContained,d=r===s&&o===a,h=this._objects.length;h--&&!((i=this._objects[h])&&i.selectable&&i.visible&&(u&&i.intersectsWithRect(l,c)||i.isContainedWithinRect(l,c)||u&&i.containsPoint(l)||u&&i.containsPoint(c))&&(n.push(i),d)););return n},_maybeGroupObjects:function(t){this.selection&&this._groupSelector&&this._groupSelectedObjects(t),this.setCursor(this.defaultCursor),this._groupSelector=null,this._currentTransform=null}})}(),function(){var t=fabric.StaticCanvas.supports("toDataURLWithQuality");fabric.util.object.extend(fabric.StaticCanvas.prototype,{toDataURL:function(t){t||(t={});var e=t.format||"png",i=t.quality||1,n=(t.multiplier||1)*(t.enableRetinaScaling?1:1/this.getRetinaScaling()),r={left:t.left||0,top:t.top||0,width:t.width||0,height:t.height||0};return this.__toDataURLWithMultiplier(e,i,r,n)},__toDataURLWithMultiplier:function(t,e,i,n){var r=this.width,o=this.height,s=(i.width||this.width)*n,a=(i.height||this.height)*n,l=this.getZoom()*n,c=this.viewportTransform,u=[l,0,0,l,(c[4]-i.left)*n,(c[5]-i.top)*n],d=this.interactive,h=this.skipOffscreen,f=r!==s||o!==a;this.viewportTransform=u,this.skipOffscreen=!1,this.interactive=!1,f&&this.setDimensions({width:s,height:a},{backstoreOnly:!0}),this.renderAll();var p=this.__toDataURL(t,e,i);return this.interactive=d,this.skipOffscreen=h,this.viewportTransform=c,f&&this.setDimensions({width:r,height:o},{backstoreOnly:!0}),this.renderAll(),p},__toDataURL:function(e,i){var n=this.contextContainer.canvas;return"jpg"===e&&(e="jpeg"),t?n.toDataURL("image/"+e,i):n.toDataURL("image/"+e)}})}(),fabric.util.object.extend(fabric.StaticCanvas.prototype,{loadFromDatalessJSON:function(t,e,i){return this.loadFromJSON(t,e,i)},loadFromJSON:function(t,e,i){if(t){var n="string"==typeof t?JSON.parse(t):fabric.util.object.clone(t),r=this,o=this.renderOnAddRemove;return this.renderOnAddRemove=!1,this._enlivenObjects(n.objects,function(t){r.clear(),r._setBgOverlay(n,function(){t.forEach(function(t,e){r.insertAt(t,e)}),r.renderOnAddRemove=o,delete n.objects,delete n.backgroundImage,delete n.overlayImage,delete n.background,delete n.overlay,r._setOptions(n),r.renderAll(),e&&e()})},i),this}},_setBgOverlay:function(t,e){var i={backgroundColor:!1,overlayColor:!1,backgroundImage:!1,overlayImage:!1};if(t.backgroundImage||t.overlayImage||t.background||t.overlay){var n=function(){i.backgroundImage&&i.overlayImage&&i.backgroundColor&&i.overlayColor&&e&&e()};this.__setBgOverlay("backgroundImage",t.backgroundImage,i,n),this.__setBgOverlay("overlayImage",t.overlayImage,i,n),this.__setBgOverlay("backgroundColor",t.background,i,n),this.__setBgOverlay("overlayColor",t.overlay,i,n)}else e&&e()},__setBgOverlay:function(t,e,i,n){var r=this;return e?void("backgroundImage"===t||"overlayImage"===t?fabric.util.enlivenObjects([e],function(e){r[t]=e[0],i[t]=!0,n&&n()}):this["set"+fabric.util.string.capitalize(t,!0)](e,function(){i[t]=!0,n&&n()})):(i[t]=!0,void(n&&n()))},_enlivenObjects:function(t,e,i){t&&0!==t.length?fabric.util.enlivenObjects(t,function(t){e&&e(t)},null,i):e&&e([])},_toDataURL:function(t,e){this.clone(function(i){e(i.toDataURL(t))})},_toDataURLWithMultiplier:function(t,e,i){this.clone(function(n){i(n.toDataURLWithMultiplier(t,e))})},clone:function(t,e){var i=JSON.stringify(this.toJSON(e));this.cloneWithoutData(function(e){e.loadFromJSON(i,function(){t&&t(e)})})},cloneWithoutData:function(t){var e=fabric.document.createElement("canvas");e.width=this.width,e.height=this.height;var i=new fabric.Canvas(e);i.clipTo=this.clipTo,this.backgroundImage?(i.setBackgroundImage(this.backgroundImage.src,function(){i.renderAll(),t&&t(i)}),i.backgroundImageOpacity=this.backgroundImageOpacity,i.backgroundImageStretch=this.backgroundImageStretch):t&&t(i)}}),function(t){"use strict";var e=t.fabric||(t.fabric={}),i=e.util.object.extend,n=e.util.object.clone,r=e.util.toFixed,o=e.util.string.capitalize,s=e.util.degreesToRadians,a=e.StaticCanvas.supports("setLineDash"),l=!e.isLikelyNode;e.Object||(e.Object=e.util.createClass(e.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:10,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:l,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(" "),initialize:function(t){t&&this.setOptions(t)},_createCacheCanvas:function(){this._cacheProperties={},this._cacheCanvas=e.document.createElement("canvas"),this._cacheContext=this._cacheCanvas.getContext("2d"),this._updateCacheCanvas()},_limitCacheSize:function(t){var i=e.perfLimitSizeTotal,n=t.width,r=t.height,o=e.maxCacheSideLimit,s=e.minCacheSideLimit;if(n<=o&&r<=o&&n*r<=i)return n<s&&(t.width=s),r<s&&(t.height=s),t;var a=n/r,l=e.util.limitDimsByArea(a,i),c=e.util.capValue,u=c(s,l.x,o),d=c(s,l.y,o);return u<n&&(t.zoomX/=n/u,t.width=u,t.capped=!0),d<r&&(t.zoomY/=r/d,t.height=d,t.capped=!0),t},_getCacheCanvasDimensions:function(){var t=this.canvas&&this.canvas.getZoom()||1,i=this.getObjectScaling(),n=this.canvas&&this.canvas._isRetinaScaling()?e.devicePixelRatio:1,r=this._getNonTransformedDimensions(),o=i.scaleX*t*n,s=i.scaleY*t*n;return{width:r.x*o+2,height:r.y*s+2,zoomX:o,zoomY:s,x:r.x,y:r.y}},_updateCacheCanvas:function(){if(this.noScaleCache&&this.canvas&&this.canvas._currentTransform){var t=this.canvas._currentTransform.target,i=this.canvas._currentTransform.action;if(this===t&&i.slice&&"scale"===i.slice(0,5))return!1}var n,r,o=this._cacheCanvas,s=this._limitCacheSize(this._getCacheCanvasDimensions()),a=e.minCacheSideLimit,l=s.width,c=s.height,u=s.zoomX,d=s.zoomY,h=l!==this.cacheWidth||c!==this.cacheHeight,f=this.zoomX!==u||this.zoomY!==d,p=h||f,g=0,m=0,v=!1;if(h){var y=this._cacheCanvas.width,b=this._cacheCanvas.height,w=y<l||b<c;v=w||(l<.9*y||c<.9*b)&&a<y&&a<b,w&&!s.capped&&(a<l||a<c)&&(g=.1*l,m=.1*c)}return!!p&&(v?(o.width=Math.ceil(l+g),o.height=Math.ceil(c+m)):(this._cacheContext.setTransform(1,0,0,1,0,0),this._cacheContext.clearRect(0,0,o.width,o.height)),n=s.x*u/2,r=s.y*d/2,this.cacheTranslationX=Math.round(o.width/2-n)+n,this.cacheTranslationY=Math.round(o.height/2-r)+r,this.cacheWidth=l,this.cacheHeight=c,this._cacheContext.translate(this.cacheTranslationX,this.cacheTranslationY),this._cacheContext.scale(u,d),this.zoomX=u,this.zoomY=d,!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 i=e.Object.NUM_FRACTION_DIGITS,n={type:this.type,version:e.version,originX:this.originX,originY:this.originY,left:r(this.left,i),top:r(this.top,i),width:r(this.width,i),height:r(this.height,i),fill:this.fill&&this.fill.toObject?this.fill.toObject():this.fill,stroke:this.stroke&&this.stroke.toObject?this.stroke.toObject():this.stroke,strokeWidth:r(this.strokeWidth,i),strokeDashArray:this.strokeDashArray?this.strokeDashArray.concat():this.strokeDashArray,strokeLineCap:this.strokeLineCap,strokeLineJoin:this.strokeLineJoin,strokeMiterLimit:r(this.strokeMiterLimit,i),scaleX:r(this.scaleX,i),scaleY:r(this.scaleY,i),angle:r(this.angle,i),flipX:this.flipX,flipY:this.flipY,opacity:r(this.opacity,i),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:r(this.skewX,i),skewY:r(this.skewY,i)};return e.util.populateWithProperties(this,n,t),this.includeDefaultValues||(n=this._removeDefaultValues(n)),n},toDatalessObject:function(t){return this.toObject(t)},_removeDefaultValues:function(t){var i=e.util.getKlass(t.type).prototype;return i.stateProperties.forEach(function(e){t[e]===i[e]&&delete t[e],"[object Array]"===Object.prototype.toString.call(t[e])&&"[object Array]"===Object.prototype.toString.call(i[e])&&0===t[e].length&&0===i[e].length&&delete t[e]}),t},toString:function(){return"#<fabric."+o(this.type)+">"},getObjectScaling:function(){var t=this.scaleX,e=this.scaleY;if(this.group){var i=this.group.getObjectScaling();t*=i.scaleX,e*=i.scaleY}return{scaleX:t,scaleY:e}},getObjectOpacity:function(){var t=this.opacity;return this.group&&(t*=this.group.getObjectOpacity()),t},_set:function(t,i){var n="scaleX"===t||"scaleY"===t,r=this[t]!==i,o=!1;return n&&(i=this._constrainScale(i)),"scaleX"===t&&i<0?(this.flipX=!this.flipX,i*=-1):"scaleY"===t&&i<0?(this.flipY=!this.flipY,i*=-1):"shadow"!==t||!i||i instanceof e.Shadow?"dirty"===t&&this.group&&this.group.set("dirty",i):i=new e.Shadow(i),this[t]=i,r&&(o=this.group&&this.group.isOnACache(),-1<this.cacheProperties.indexOf(t)?(this.dirty=!0,o&&this.group.set("dirty",!0)):o&&-1<this.stateProperties.indexOf(t)&&this.group.set("dirty",!0)),this},setOnGroup:function(){},getViewportTransform:function(){return this.canvas&&this.canvas.viewportTransform?this.canvas.viewportTransform:e.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&&e.util.clipContext(this,t),this.shouldCache()?(this._cacheCanvas||this._createCacheCanvas(),this.isCacheDirty()&&(this.statefullCache&&this.saveState({propertySet:"cacheProperties"}),this.drawObject(this._cacheContext),this.dirty=!1),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())},_removeCacheCanvas:function(){this._cacheCanvas=null,this.cacheWidth=0,this.cacheHeight=0},needsItsOwnCache:function(){return"stroke"===this.paintFirst&&"object"==typeof this.shadow},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)},drawObject:function(t){this._renderBackground(t),this._setStrokeStyles(t,this),this._setFillStyles(t,this),this._render(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.statefullCache&&this.hasStateChanged("cacheProperties")){if(this._cacheCanvas&&!t){var e=this.cacheWidth/this.zoomX,i=this.cacheHeight/this.zoomY;this._cacheContext.clearRect(-e/2,-i/2,e,i)}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)},_setLineDash:function(t,e,i){e&&(1&e.length&&e.push.apply(e,e),a?t.setLineDash(e):i&&i(t))},_renderControls:function(t,i){var n,r,o,a=this.getViewportTransform(),l=this.calcTransformMatrix();r=void 0!==(i=i||{}).hasBorders?i.hasBorders:this.hasBorders,o=void 0!==i.hasControls?i.hasControls:this.hasControls,l=e.util.multiplyTransformMatrices(a,l),n=e.util.qrDecompose(l),t.save(),t.translate(n.translateX,n.translateY),t.lineWidth=1*this.borderScaleFactor,this.group||(t.globalAlpha=this.isMoving?this.borderOpacityWhenMoving:1),i.forActiveSelection?(t.rotate(s(n.angle)),r&&this.drawBordersInGroup(t,n,i)):(t.rotate(s(this.angle)),r&&this.drawBorders(t,i)),o&&this.drawControls(t,i),t.restore()},_setShadow:function(t){if(this.shadow){var i=this.canvas&&this.canvas.viewportTransform[0]||1,n=this.canvas&&this.canvas.viewportTransform[3]||1,r=this.getObjectScaling();this.canvas&&this.canvas._isRetinaScaling()&&(i*=e.devicePixelRatio,n*=e.devicePixelRatio),t.shadowColor=this.shadow.color,t.shadowBlur=this.shadow.blur*e.browserShadowBlurConstant*(i+n)*(r.scaleX+r.scaleY)/4,t.shadowOffsetX=this.shadow.offsetX*i*r.scaleX,t.shadowOffsetY=this.shadow.offsetY*n*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 i=e.gradientTransform||e.patternTransform,n=-this.width/2+e.offsetX||0,r=-this.height/2+e.offsetY||0;return t.translate(n,r),i&&t.transform(i[0],i[1],i[2],i[3],i[4],i[5]),{offsetX:n,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=e.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 i=this._findCenterFromElement();this.transformMatrix&&(this._assignTransformMatrixProps(),i=e.util.transformPoint(i,this.transformMatrix)),this.transformMatrix=null,t&&(this.scaleX*=t.scaleX,this.scaleY*=t.scaleY,this.cropX=t.cropX,this.cropY=t.cropY,i.x+=t.offsetLeft,i.y+=t.offsetTop,this.width=t.width,this.height=t.height),this.setPositionByOrigin(i,"center","center")},clone:function(t,i){var n=this.toObject(i);this.constructor.fromObject?this.constructor.fromObject(n,t):e.Object._fromObject("Object",n,t)},cloneAsImage:function(t,i){var n=this.toDataURL(i);return e.util.loadImage(n,function(i){t&&t(new e.Image(i))}),this},toDataURL:function(t){t||(t={});var i=e.util.createCanvasElement(),n=this.getBoundingRect();i.width=n.width,i.height=n.height,e.util.wrapElement(i,"div");var r=new e.StaticCanvas(i,{enableRetinaScaling:t.enableRetinaScaling,renderOnAddRemove:!1,skipOffscreen:!1});"jpg"===t.format&&(t.format="jpeg"),"jpeg"===t.format&&(r.backgroundColor="#fff");var o={left:this.left,top:this.top};this.setPositionByOrigin(new e.Point(r.width/2,r.height/2),"center","center");var s=this.canvas;r.add(this);var a=r.toDataURL(t);return this.set(o).setCoords(),this.canvas=s,r._objects=[],r.dispose(),r=null,a},isType:function(t){return this.type===t},complexity:function(){return 1},toJSON:function(t){return this.toObject(t)},setGradient:function(t,i){i||(i={});var n={colorStops:[]};return n.type=i.type||(i.r1||i.r2?"radial":"linear"),n.coords={x1:i.x1,y1:i.y1,x2:i.x2,y2:i.y2},(i.r1||i.r2)&&(n.coords.r1=i.r1,n.coords.r2=i.r2),n.gradientTransform=i.gradientTransform,e.Gradient.prototype.addColorStop.call(n,i.colorStops),this.set(t,e.Gradient.forObject(this,n))},setPatternFill:function(t){return this.set("fill",new e.Pattern(t))},setShadow:function(t){return this.set("shadow",t?new e.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,i){i=i||this.canvas.getPointer(t);var n=new e.Point(i.x,i.y),r=this._getLeftTopCoords();return this.angle&&(n=e.util.rotatePoint(n,r,s(-this.angle))),{x:n.x-r.x,y:n.y-r.y}},_setupCompositeOperation:function(t){this.globalCompositeOperation&&(t.globalCompositeOperation=this.globalCompositeOperation)}}),e.util.createAccessors&&e.util.createAccessors(e.Object),i(e.Object.prototype,e.Observable),e.Object.NUM_FRACTION_DIGITS=2,e.Object._fromObject=function(t,i,r,o){var s=e[t];i=n(i,!0),e.util.enlivenPatterns([i.fill,i.stroke],function(t){void 0!==t[0]&&(i.fill=t[0]),void 0!==t[1]&&(i.stroke=t[1]);var e=o?new s(i[o],i):new s(i);r&&r(e)})},e.Object.__uid=0)}("undefined"!=typeof exports?exports:this),function(){var t=fabric.util.degreesToRadians,e={left:-.5,center:0,right:.5},i={top:-.5,center:0,bottom:.5};fabric.util.object.extend(fabric.Object.prototype,{translateToGivenOrigin:function(t,n,r,o,s){var a,l,c,u=t.x,d=t.y;return"string"==typeof n?n=e[n]:n-=.5,"string"==typeof o?o=e[o]:o-=.5,"string"==typeof r?r=i[r]:r-=.5,"string"==typeof s?s=i[s]:s-=.5,l=s-r,((a=o-n)||l)&&(c=this._getTransformedDimensions(),u=t.x+a*c.x,d=t.y+l*c.y),new fabric.Point(u,d)},translateToCenterPoint:function(e,i,n){var r=this.translateToGivenOrigin(e,i,n,"center","center");return this.angle?fabric.util.rotatePoint(r,e,t(this.angle)):r},translateToOriginPoint:function(e,i,n){var r=this.translateToGivenOrigin(e,"center","center",i,n);return this.angle?fabric.util.rotatePoint(r,e,t(this.angle)):r},getCenterPoint:function(){var t=new fabric.Point(this.left,this.top);return this.translateToCenterPoint(t,this.originX,this.originY)},getPointByOrigin:function(t,e){var i=this.getCenterPoint();return this.translateToOriginPoint(i,t,e)},toLocalPoint:function(e,i,n){var r,o,s=this.getCenterPoint();return r=void 0!==i&&void 0!==n?this.translateToGivenOrigin(s,"center","center",i,n):new fabric.Point(this.left,this.top),o=new fabric.Point(e.x,e.y),this.angle&&(o=fabric.util.rotatePoint(o,s,-t(this.angle))),o.subtractEquals(r)},setPositionByOrigin:function(t,e,i){var n=this.translateToCenterPoint(t,e,i),r=this.translateToOriginPoint(n,this.originX,this.originY);this.set("left",r.x),this.set("top",r.y)},adjustPosition:function(i){var n,r,o=t(this.angle),s=this.getScaledWidth(),a=fabric.util.cos(o)*s,l=fabric.util.sin(o)*s;n="string"==typeof this.originX?e[this.originX]:this.originX-.5,r="string"==typeof i?e[i]:i-.5,this.left+=a*(r-n),this.top+=l*(r-n),this.setCoords(),this.originX=i},_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")},onDeselect:function(){}})}(),function(){var t=fabric.util.degreesToRadians,e=fabric.util.multiplyTransformMatrices,i=fabric.util.transformPoint;fabric.util.object.extend(fabric.Object.prototype,{oCoords:null,aCoords:null,ownMatrixCache:null,matrixCache:null,getCoords:function(t,e){this.oCoords||this.setCoords();var i,n=t?this.aCoords:this.oCoords;return i=e?this.calcCoords(t):n,[new fabric.Point(i.tl.x,i.tl.y),new fabric.Point(i.tr.x,i.tr.y),new fabric.Point(i.br.x,i.br.y),new fabric.Point(i.bl.x,i.bl.y)]},intersectsWithRect:function(t,e,i,n){var r=this.getCoords(i,n);return"Intersection"===fabric.Intersection.intersectPolygonRectangle(r,t,e).status},intersectsWithObject:function(t,e,i){return"Intersection"===fabric.Intersection.intersectPolygonPolygon(this.getCoords(e,i),t.getCoords(e,i)).status||t.isContainedWithinObject(this,e,i)||this.isContainedWithinObject(t,e,i)},isContainedWithinObject:function(t,e,i){for(var n=this.getCoords(e,i),r=0,o=t._getImageLines(i?t.calcCoords(e):e?t.aCoords:t.oCoords);r<4;r++)if(!t.containsPoint(n[r],o))return!1;return!0},isContainedWithinRect:function(t,e,i,n){var r=this.getBoundingRect(i,n);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,i,n){e=e||this._getImageLines(n?this.calcCoords(i):i?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,i=this.canvas.vptCoords.tl,n=this.canvas.vptCoords.br,r=this.getCoords(!0,t),o=0;o<4;o++)if((e=r[o]).x<=n.x&&e.x>=i.x&&e.y<=n.y&&e.y>=i.y)return!0;if(this.intersectsWithRect(i,n,!0,t))return!0;var s={x:(i.x+n.x)/2,y:(i.y+n.y)/2};return!!this.containsPoint(s,null,!0,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 i,n,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?n=r.o.x:(i=(r.d.y-r.o.y)/(r.d.x-r.o.x),n=-(t.y-0*t.x-(r.o.y-i*r.o.x))/(0-i)),n>=t.x&&(o+=1),2!==o)))break;return o},getBoundingRect:function(t,e){var i=this.getCoords(t,e);return fabric.util.makeBoundingBoxFromPoints(i)},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 i=this.getBoundingRect(e).width/this.getScaledWidth();return this.scale(t/this.width/i)},scaleToHeight:function(t,e){var i=this.getBoundingRect(e).height/this.getScaledHeight();return this.scale(t/this.height/i)},calcCoords:function(n){var r=this._calcRotateMatrix(),o=this._calcTranslateMatrix(),s=e(o,r),a=this.getViewportTransform(),l=n?s:e(a,s),c=this._getTransformedDimensions(),u=c.x/2,d=c.y/2,h=i({x:-u,y:-d},l),f=i({
x:u,y:-d},l),p=i({x:-u,y:d},l),g=i({x:u,y:d},l);if(!n){var m=this.padding,v=t(this.angle),y=fabric.util.cos(v),b=fabric.util.sin(v),w=y*m,x=b*m,_=w+x,C=w-x;m&&(h.x-=C,h.y-=_,f.x+=_,f.y-=C,p.x-=_,p.y+=C,g.x+=C,g.y+=_);var k=new fabric.Point((h.x+p.x)/2,(h.y+p.y)/2),S=new fabric.Point((f.x+h.x)/2,(f.y+h.y)/2),T=new fabric.Point((g.x+f.x)/2,(g.y+f.y)/2),O=new fabric.Point((g.x+p.x)/2,(g.y+p.y)/2),j=new fabric.Point(S.x+b*this.rotatingPointOffset,S.y-y*this.rotatingPointOffset)}var E={tl:h,tr:f,br:g,bl:p};return n||(E.ml=k,E.mt=S,E.mr=T,E.mb=O,E.mtr=j),E},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),i=fabric.util.cos(e),n=fabric.util.sin(e);return[i,n,-n,i,0,0]}return fabric.iMatrix.concat()},_calcTranslateMatrix:function(){var t=this.getCenterPoint();return[1,0,0,1,t.x,t.y]},transformMatrixKey:function(t){var e="_",i="";return!t&&this.group&&(i=this.group.transformMatrixKey(t)+e),i+this.top+e+this.left+e+this.scaleX+e+this.scaleY+e+this.skewX+e+this.skewY+e+this.angle+e+this.originX+e+this.originY+e+this.width+e+this.height+e+this.strokeWidth+this.flipX+this.flipY},calcTransformMatrix:function(t){if(t)return this.calcOwnMatrix();var i=this.transformMatrixKey(),n=this.matrixCache||(this.matrixCache={});if(n.key===i)return n.value;var r=this.calcOwnMatrix();return this.group&&(r=e(this.group.calcTransformMatrix(),r)),n.key=i,n.value=r},calcOwnMatrix:function(){var t=this.transformMatrixKey(!0),i=this.ownMatrixCache||(this.ownMatrixCache={});if(i.key===t)return i.value;var n,r=this._calcTranslateMatrix(),o=this._calcDimensionsTransformMatrix(this.skewX,this.skewY,!0);return this.angle&&(n=this._calcRotateMatrix(),r=e(r,n)),r=e(r,o),i.key=t,i.value=r},_calcDimensionsTransformMatrix:function(i,n,r){var o,s=[this.scaleX*(r&&this.flipX?-1:1),0,0,this.scaleY*(r&&this.flipY?-1:1),0,0];return i&&(o=[1,0,Math.tan(t(i)),1],s=e(s,o,!0)),n&&(o=[1,Math.tan(t(n)),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 i=this._getNonTransformedDimensions();if(0===t&&0===e)return{x:i.x*this.scaleX,y:i.y*this.scaleY};var n,r,o=i.x/2,s=i.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(n=0;n<a.length;n++)a[n]=fabric.util.transformPoint(a[n],l);return{x:(r=fabric.util.makeBoundingBoxFromPoints(a)).width,y:r.height}},_calculateCurrentDimensions:function(){var t=this.getViewportTransform(),e=this._getTransformedDimensions();return fabric.util.transformPoint(e,t,!0).scalarAdd(2*this.padding)}})}(),fabric.util.object.extend(fabric.Object.prototype,{sendToBack:function(){return this.group?fabric.StaticCanvas.prototype.sendToBack.call(this.group,this):this.canvas.sendToBack(this),this},bringToFront:function(){return this.group?fabric.StaticCanvas.prototype.bringToFront.call(this.group,this):this.canvas.bringToFront(this),this},sendBackwards:function(t){return this.group?fabric.StaticCanvas.prototype.sendBackwards.call(this.group,this,t):this.canvas.sendBackwards(this,t),this},bringForward:function(t){return this.group?fabric.StaticCanvas.prototype.bringForward.call(this.group,this,t):this.canvas.bringForward(this,t),this},moveTo:function(t){return this.group&&"activeSelection"!==this.group.type?fabric.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 i=new fabric.Color(e),n=t+": "+i.toRgb()+"; ",r=i.getAlpha();return 1!==r&&(n+=t+"-opacity: "+r.toString()+"; "),n}return t+": none; "}var e=fabric.util.toFixed;fabric.util.object.extend(fabric.Object.prototype,{getSvgStyles:function(e){var i=this.fillRule,n=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",c=this.visible?"":" visibility: hidden;",u=e?"":this.getSvgFilter(),d=t("fill",this.fill);return[t("stroke",this.stroke),"stroke-width: ",n,"; ","stroke-dasharray: ",r,"; ","stroke-linecap: ",o,"; ","stroke-linejoin: ",s,"; ","stroke-miterlimit: ",a,"; ",d,"fill-rule: ",i,"; ","opacity: ",l,";",u,c].join("")},getSvgSpanStyles:function(e,i){var n="; ",r=e.strokeWidth?"stroke-width: "+e.strokeWidth+n:"",o=e.fontFamily?"font-family: "+e.fontFamily.replace(/"/g,"'")+n:"",s=e.fontSize?"font-size: "+e.fontSize+"px"+n:"",a=e.fontStyle?"font-style: "+e.fontStyle+n:"",l=e.fontWeight?"font-weight: "+e.fontWeight+n:"",c=e.fill?t("fill",e.fill):"",u=e.stroke?t("stroke",e.stroke):"",d=this.getSvgTextDecoration(e);return d&&(d="text-decoration: "+d+n),[u,r,o,s,a,l,d,c,e.deltaY?"baseline-shift: "+-e.deltaY+"; ":"",i?"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+");":""},getSvgId:function(){return this.id?'id="'+this.id+'" ':""},getSvgTransform:function(){var t=this.angle,i=this.skewX%360,n=this.skewY%360,r=this.getCenterPoint(),o=fabric.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)+")",c=0!==i?" skewX("+e(i,o)+")":"",u=0!==n?" skewY("+e(n,o)+")":"";return[s,a,l,this.flipX?" matrix(-1 0 0 1 0 0) ":"",this.flipY?" matrix(1 0 0 -1 0 0)":"",c,u].join("")},getSvgTransformMatrix:function(){return this.transformMatrix?" matrix("+this.transformMatrix.join(" ")+") ":""},_setSVGBg:function(t){if(this.backgroundColor){var i=fabric.Object.NUM_FRACTION_DIGITS;t.push("\t\t<rect ",this._getFillAttributes(this.backgroundColor),' x="',e(-this.width/2,i),'" y="',e(-this.height/2,i),'" width="',e(this.width,i),'" height="',e(this.height,i),'"></rect>\n')}},_createBaseSVGMarkup:function(){var t=[];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)),t},addPaintOrder:function(){return"fill"!==this.paintFirst?' paint-order="'+this.paintFirst+'" ':""}})}(),function(){function t(t,i,n){var r={};n.forEach(function(e){r[e]=t[e]}),e(t[i],r,!0)}var e=fabric.util.object.extend,i="stateProperties";fabric.util.object.extend(fabric.Object.prototype,{hasStateChanged:function(t){var e="_"+(t=t||i);return Object.keys(this[e]).length<this[t].length||!function t(e,i,n){if(e===i)return!0;if(Array.isArray(e)){if(e.length!==i.length)return!1;for(var r=0,o=e.length;r<o;r++)if(!t(e[r],i[r]))return!1;return!0}if(e&&"object"==typeof e){var s,a=Object.keys(e);if(!n&&a.length!==Object.keys(i).length)return!1;for(r=0,o=a.length;r<o;r++)if(!t(e[s=a[r]],i[s]))return!1;return!0}}(this[e],this,!0)},saveState:function(e){var n=e&&e.propertySet||i,r="_"+n;return this[r]?(t(this,r,this[n]),e&&e.stateProperties&&t(this,r,e.stateProperties),this):this.setupState(e)},setupState:function(t){var e=(t=t||{}).propertySet||i;return this["_"+(t.propertySet=e)]={},this.saveState(t),this}})}(),function(){var t=fabric.util.degreesToRadians;fabric.util.object.extend(fabric.Object.prototype,{_controlsVisibility:null,_findTargetCorner:function(t){if(!this.hasControls||this.group||!this.canvas||this.canvas._activeObject!==this)return!1;var e,i,n=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)&&(i=this._getImageLines(this.oCoords[o].corner),0!==(e=this._findCrossPoints({x:n,y:r},i))&&e%2==1))return this.__corner=o;return!1},_setCornerCoords:function(){var e,i,n=this.oCoords,r=t(45-this.angle),o=.707106*this.cornerSize,s=o*fabric.util.cos(r),a=o*fabric.util.sin(r);for(var l in n)e=n[l].x,i=n[l].y,n[l].corner={tl:{x:e-a,y:i-s},tr:{x:e+s,y:i-a},bl:{x:e-s,y:i+a},br:{x:e+a,y:i+s}}},drawSelectionBackground:function(e){if(!this.selectionBackgroundColor||this.canvas&&!this.canvas.interactive||this.canvas&&this.canvas._activeObject!==this)return this;e.save();var i=this.getCenterPoint(),n=this._calculateCurrentDimensions(),r=this.canvas.viewportTransform;return e.translate(i.x,i.y),e.scale(1/r[0],1/r[3]),e.rotate(t(this.angle)),e.fillStyle=this.selectionBackgroundColor,e.fillRect(-n.x/2,-n.y/2,n.x,n.y),e.restore(),this},drawBorders:function(t,e){e=e||{};var i=this._calculateCurrentDimensions(),n=1/this.borderScaleFactor,r=i.x+n,o=i.y+n,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 c=-o/2;t.beginPath(),t.moveTo(0,c),t.lineTo(0,c-l),t.stroke()}return t.restore(),this},drawBordersInGroup:function(t,e,i){i=i||{};var n=this._getNonTransformedDimensions(),r=fabric.util.customTransformMatrix(e.scaleX,e.scaleY,e.skewX),o=fabric.util.transformPoint(n,r),s=1/this.borderScaleFactor,a=o.x+s,l=o.y+s;return t.save(),this._setLineDash(t,i.borderDashArray||this.borderDashArray,null),t.strokeStyle=i.borderColor||this.borderColor,t.strokeRect(-a/2,-l/2,a,l),t.restore(),this},drawControls:function(t,e){e=e||{};var i=this._calculateCurrentDimensions(),n=i.x,r=i.y,o=e.cornerSize||this.cornerSize,s=-(n+o)/2,a=-(r+o)/2,l=void 0!==e.transparentCorners?e.transparentCorners:this.transparentCorners,c=void 0!==e.hasRotatingPoint?e.hasRotatingPoint:this.hasRotatingPoint,u=l?"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+n,a,e),this._drawControl("bl",t,u,s,a+r,e),this._drawControl("br",t,u,s+n,a+r,e),this.get("lockUniScaling")||(this._drawControl("mt",t,u,s+n/2,a,e),this._drawControl("mb",t,u,s+n/2,a+r,e),this._drawControl("mr",t,u,s+n,a+r/2,e),this._drawControl("ml",t,u,s,a+r/2,e)),c&&this._drawControl("mtr",t,u,s+n/2,a-this.rotatingPointOffset,e),t.restore(),this},_drawControl:function(t,e,i,n,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(n+s/2,r+s/2,s/2,0,2*Math.PI,!1),e[i](),a&&e.stroke();break;default:this.transparentCorners||e.clearRect(n,r,s,s),e[i+"Rect"](n,r,s,s),a&&e.strokeRect(n,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(){}})}(),fabric.util.object.extend(fabric.StaticCanvas.prototype,{FX_DURATION:500,fxCenterObjectH:function(t,e){var i=function(){},n=(e=e||{}).onComplete||i,r=e.onChange||i,o=this;return fabric.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(),n()}}),this},fxCenterObjectV:function(t,e){var i=function(){},n=(e=e||{}).onComplete||i,r=e.onChange||i,o=this;return fabric.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(),n()}}),this},fxRemove:function(t,e){var i=function(){},n=(e=e||{}).onComplete||i,r=e.onChange||i,o=this;return fabric.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),n()}}),this}}),fabric.util.object.extend(fabric.Object.prototype,{animate:function(){if(arguments[0]&&"object"==typeof arguments[0]){var t,e,i=[];for(t in arguments[0])i.push(t);for(var n=0,r=i.length;n<r;n++)t=i[n],e=n!==r-1,this._animate(t,arguments[0][t],arguments[1],e)}else this._animate.apply(this,arguments);return this},_animate:function(t,e,i,n){var r,o=this;e=e.toString(),i=i?fabric.util.object.clone(i):{},~t.indexOf(".")&&(r=t.split("."));var s=r?this.get(r[0])[r[1]]:this.get(t);"from"in i||(i.from=s),e=~e.indexOf("=")?s+parseFloat(e.replace("=","")):parseFloat(e),fabric.util.animate({startValue:i.from,endValue:e,byValue:i.by,easing:i.easing,duration:i.duration,abort:i.abort&&function(){return i.abort.call(o)},onChange:function(e,s,a){r?o[r[0]][r[1]]=e:o.set(t,e),n||i.onChange&&i.onChange(e,s,a)},onComplete:function(t,e,r){n||(o.setCoords(),i.onComplete&&i.onComplete(t,e,r))}})}}),function(t){"use strict";function e(t,e){var i=t.origin,n=t.axis1,r=t.axis2,o=t.dimension,s=e.nearest,a=e.center,l=e.farthest;return function(){switch(this.get(i)){case s:return Math.min(this.get(n),this.get(r));case a:return Math.min(this.get(n),this.get(r))+.5*this.get(o);case l:return Math.max(this.get(n),this.get(r))}}}var i=t.fabric||(t.fabric={}),n=i.util.object.extend,r=i.util.object.clone,o={x1:1,x2:1,y1:1,y2:1},s=i.StaticCanvas.supports("setLineDash");i.Line?i.warn("fabric.Line is already defined"):(i.Line=i.util.createClass(i.Object,{type:"line",x1:0,y1:0,x2:0,y2:0,cacheProperties:i.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:e({origin:"originX",axis1:"x1",axis2:"x2",dimension:"width"},{nearest:"left",center:"center",farthest:"right"}),_getTopToOriginY:e({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 i=t.strokeStyle;t.strokeStyle=this.stroke||t.fillStyle,this.stroke&&this._renderStroke(t),t.strokeStyle=i},_renderDashedStroke:function(t){var e=this.calcLinePoints();t.beginPath(),i.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 n(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,i=t*this.width*.5,n=e*this.height*.5;return{x1:i,x2:t*this.width*-.5,y1:n,y2:e*this.height*-.5}},toSVG:function(t){var e=this._createBaseSVGMarkup(),i=this.calcLinePoints();return e.push("<line ",this.getSvgId(),'x1="',i.x1,'" y1="',i.y1,'" x2="',i.x2,'" y2="',i.y2,'" style="',this.getSvgStyles(),'" transform="',this.getSvgTransform(),this.getSvgTransformMatrix(),'"/>\n'),t?t(e.join("")):e.join("")}}),i.Line.ATTRIBUTE_NAMES=i.SHARED_ATTRIBUTES.concat("x1 y1 x2 y2".split(" ")),i.Line.fromElement=function(t,e,r){r=r||{};var o=i.parseAttributes(t,i.Line.ATTRIBUTE_NAMES),s=[o.x1||0,o.y1||0,o.x2||0,o.y2||0];e(new i.Line(s,n(o,r)))},i.Line.fromObject=function(t,e){var n=r(t,!0);n.points=[t.x1,t.y1,t.x2,t.y2],i.Object._fromObject("Line",n,function(t){delete t.points,e&&e(t)},"points")})}("undefined"!=typeof exports?exports:this),function(t){"use strict";var e=t.fabric||(t.fabric={}),i=Math.PI;e.Circle?e.warn("fabric.Circle is already defined."):(e.Circle=e.util.createClass(e.Object,{type:"circle",radius:0,startAngle:0,endAngle:2*i,cacheProperties:e.Object.prototype.cacheProperties.concat("radius"),_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 n=this._createBaseSVGMarkup(),r=(this.endAngle-this.startAngle)%(2*i);if(0===r)n.push("<circle ",this.getSvgId(),'cx="0" cy="0" ','r="',this.radius,'" style="',this.getSvgStyles(),'" transform="',this.getSvgTransform()," ",this.getSvgTransformMatrix(),'"',this.addPaintOrder(),"/>\n");else{var o=e.util.cos(this.startAngle)*this.radius,s=e.util.sin(this.startAngle)*this.radius,a=e.util.cos(this.endAngle)*this.radius,l=e.util.sin(this.endAngle)*this.radius,c=i<r?"1":"0";n.push('<path d="M '+o+" "+s," A "+this.radius+" "+this.radius," 0 ",+c+" 1"," "+a+" "+l,'" style="',this.getSvgStyles(),'" transform="',this.getSvgTransform()," ",this.getSvgTransformMatrix(),'"',this.addPaintOrder(),'"/>\n')}return t?t(n.join("")):n.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)}}),e.Circle.ATTRIBUTE_NAMES=e.SHARED_ATTRIBUTES.concat("cx cy r".split(" ")),e.Circle.fromElement=function(t,i){var n,r=e.parseAttributes(t,e.Circle.ATTRIBUTE_NAMES);if(!("radius"in(n=r)&&0<=n.radius))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,i(new e.Circle(r))},e.Circle.fromObject=function(t,i){return e.Object._fromObject("Circle",t,i)})}("undefined"!=typeof exports?exports:this),function(t){"use strict";var e=t.fabric||(t.fabric={});e.Triangle?e.warn("fabric.Triangle is already defined"):(e.Triangle=e.util.createClass(e.Object,{type:"triangle",width:100,height:100,_render:function(t){var e=this.width/2,i=this.height/2;t.beginPath(),t.moveTo(-e,i),t.lineTo(0,-i),t.lineTo(e,i),t.closePath(),this._renderPaintInOrder(t)},_renderDashedStroke:function(t){var i=this.width/2,n=this.height/2;t.beginPath(),e.util.drawDashedLine(t,-i,n,0,-n,this.strokeDashArray),e.util.drawDashedLine(t,0,-n,i,n,this.strokeDashArray),e.util.drawDashedLine(t,i,n,-i,n,this.strokeDashArray),t.closePath()},toSVG:function(t){var e=this._createBaseSVGMarkup(),i=this.width/2,n=this.height/2,r=[-i+" "+n,"0 "+-n,i+" "+n].join(",");return e.push("<polygon ",this.getSvgId(),'points="',r,'" style="',this.getSvgStyles(),'" transform="',this.getSvgTransform(),'"',this.addPaintOrder(),"/>"),t?t(e.join("")):e.join("")}}),e.Triangle.fromObject=function(t,i){return e.Object._fromObject("Triangle",t,i)})}("undefined"!=typeof exports?exports:this),function(t){"use strict";var e=t.fabric||(t.fabric={}),i=2*Math.PI;e.Ellipse?e.warn("fabric.Ellipse is already defined."):(e.Ellipse=e.util.createClass(e.Object,{type:"ellipse",rx:0,ry:0,cacheProperties:e.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.getSvgId(),'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)}}),e.Ellipse.ATTRIBUTE_NAMES=e.SHARED_ATTRIBUTES.concat("cx cy rx ry".split(" ")),e.Ellipse.fromElement=function(t,i){var n=e.parseAttributes(t,e.Ellipse.ATTRIBUTE_NAMES);n.left=(n.left||0)-n.rx,n.top=(n.top||0)-n.ry,i(new e.Ellipse(n))},e.Ellipse.fromObject=function(t,i){return e.Object._fromObject("Ellipse",t,i)})}("undefined"!=typeof exports?exports:this),function(t){"use strict";var e=t.fabric||(t.fabric={}),i=e.util.object.extend;e.Rect?e.warn("fabric.Rect is already defined"):(e.Rect=e.util.createClass(e.Object,{stateProperties:e.Object.prototype.stateProperties.concat("rx","ry"),type:"rect",rx:0,ry:0,cacheProperties:e.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,i=this.ry?Math.min(this.ry,this.height/2):0,n=this.width,r=this.height,o=-this.width/2,s=-this.height/2,a=0!==e||0!==i,l=.4477152502;t.beginPath(),t.moveTo(o+e,s),t.lineTo(o+n-e,s),a&&t.bezierCurveTo(o+n-l*e,s,o+n,s+l*i,o+n,s+i),t.lineTo(o+n,s+r-i),a&&t.bezierCurveTo(o+n,s+r-l*i,o+n-l*e,s+r,o+n-e,s+r),t.lineTo(o+e,s+r),a&&t.bezierCurveTo(o+l*e,s+r,o,s+r-l*i,o,s+r-i),t.lineTo(o,s+i),a&&t.bezierCurveTo(o,s+l*i,o+l*e,s,o+e,s),t.closePath(),this._renderPaintInOrder(t)}else t.fillRect(-.5,-.5,1,1)},_renderDashedStroke:function(t){var i=-this.width/2,n=-this.height/2,r=this.width,o=this.height;t.beginPath(),e.util.drawDashedLine(t,i,n,i+r,n,this.strokeDashArray),e.util.drawDashedLine(t,i+r,n,i+r,n+o,this.strokeDashArray),e.util.drawDashedLine(t,i+r,n+o,i,n+o,this.strokeDashArray),e.util.drawDashedLine(t,i,n+o,i,n,this.strokeDashArray),t.closePath()},toObject:function(t){return this.callSuper("toObject",["rx","ry"].concat(t))},toSVG:function(t){var e=this._createBaseSVGMarkup(),i=-this.width/2,n=-this.height/2;return e.push("<rect ",this.getSvgId(),'x="',i,'" y="',n,'" 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("")}}),e.Rect.ATTRIBUTE_NAMES=e.SHARED_ATTRIBUTES.concat("x y rx ry width height".split(" ")),e.Rect.fromElement=function(t,n,r){if(!t)return n(null);r=r||{};var o=e.parseAttributes(t,e.Rect.ATTRIBUTE_NAMES);o.left=o.left||0,o.top=o.top||0;var s=new e.Rect(i(r?e.util.object.clone(r):{},o));s.visible=s.visible&&0<s.width&&0<s.height,n(s)},e.Rect.fromObject=function(t,i){return e.Object._fromObject("Rect",t,i)})}("undefined"!=typeof exports?exports:this),function(t){"use strict";var e=t.fabric||(t.fabric={}),i=e.util.object.extend,n=e.util.array.min,r=e.util.array.max,o=e.util.toFixed;e.Polyline?e.warn("fabric.Polyline is already defined"):(e.Polyline=e.util.createClass(e.Object,{type:"polyline",points:null,cacheProperties:e.Object.prototype.cacheProperties.concat("points"),initialize:function(t,e){e=e||{},this.points=t||[],this.callSuper("initialize",e);var i=this._calcDimensions();void 0===e.left&&(this.left=i.left),void 0===e.top&&(this.top=i.top),this.width=i.width,this.height=i.height,this.pathOffset={x:i.left+this.width/2,y:i.top+this.height/2}},_calcDimensions:function(){var t=this.points,e=n(t,"x")||0,i=n(t,"y")||0;return{left:e,top:i,width:(r(t,"x")||0)-e,height:(r(t,"y")||0)-i}},toObject:function(t){return i(this.callSuper("toObject",t),{points:this.points.concat()})},toSVG:function(t){for(var i=[],n=this.pathOffset.x,r=this.pathOffset.y,s=this._createBaseSVGMarkup(),a=e.Object.NUM_FRACTION_DIGITS,l=0,c=this.points.length;l<c;l++)i.push(o(this.points[l].x-n,a),",",o(this.points[l].y-r,a)," ");return s.push("<",this.type," ",this.getSvgId(),'points="',i.join(""),'" style="',this.getSvgStyles(),'" transform="',this.getSvgTransform()," ",this.getSvgTransformMatrix(),'"',this.addPaintOrder(),"/>\n"),t?t(s.join("")):s.join("")},commonRender:function(t){var e,i=this.points.length,n=this.pathOffset.x,r=this.pathOffset.y;if(!i||isNaN(this.points[i-1].y))return!1;t.beginPath(),t.moveTo(this.points[0].x-n,this.points[0].y-r);for(var o=0;o<i;o++)e=this.points[o],t.lineTo(e.x-n,e.y-r);return!0},_render:function(t){this.commonRender(t)&&this._renderPaintInOrder(t)},_renderDashedStroke:function(t){var i,n;t.beginPath();for(var r=0,o=this.points.length;r<o;r++)i=this.points[r],n=this.points[r+1]||i,e.util.drawDashedLine(t,i.x,i.y,n.x,n.y,this.strokeDashArray)},complexity:function(){return this.get("points").length}}),e.Polyline.ATTRIBUTE_NAMES=e.SHARED_ATTRIBUTES.concat(),e.Polyline.fromElement=function(t,i,n){if(!t)return i(null);n||(n={});var r=e.parsePointsAttribute(t.getAttribute("points")),o=e.parseAttributes(t,e.Polyline.ATTRIBUTE_NAMES);i(new e.Polyline(r,e.util.object.extend(o,n)))},e.Polyline.fromObject=function(t,i){return e.Object._fromObject("Polyline",t,i,"points")})}("undefined"!=typeof exports?exports:this),function(t){"use strict";var e=t.fabric||(t.fabric={}),i=e.util.object.extend;e.Polygon?e.warn("fabric.Polygon is already defined"):(e.Polygon=e.util.createClass(e.Polyline,{type:"polygon",_render:function(t){this.commonRender(t)&&(t.closePath(),this._renderPaintInOrder(t))},_renderDashedStroke:function(t){this.callSuper("_renderDashedStroke",t),t.closePath()}}),e.Polygon.ATTRIBUTE_NAMES=e.SHARED_ATTRIBUTES.concat(),e.Polygon.fromElement=function(t,n,r){if(!t)return n(null);r||(r={});var o=e.parsePointsAttribute(t.getAttribute("points")),s=e.parseAttributes(t,e.Polygon.ATTRIBUTE_NAMES);n(new e.Polygon(o,i(s,r)))},e.Polygon.fromObject=function(t,i){return e.Object._fromObject("Polygon",t,i,"points")})}("undefined"!=typeof exports?exports:this),function(t){"use strict";var e=t.fabric||(t.fabric={}),i=e.util.array.min,n=e.util.array.max,r=e.util.object.extend,o=Object.prototype.toString,s=e.util.drawArc,a={m:2,l:2,h:1,v:1,c:6,s:4,q:4,t:2,a:7},l={m:"l",M:"L"};e.Path?e.warn("fabric.Path is already defined"):(e.Path=e.util.createClass(e.Object,{type:"path",path:null,cacheProperties:e.Object.prototype.cacheProperties.concat("path","fillRule"),stateProperties:e.Object.prototype.stateProperties.concat("path"),initialize:function(t,e){e=e||{},this.callSuper("initialize",e),t||(t=[]);var i="[object Array]"===o.call(t);this.path=i?t:t.match&&t.match(/[mzlhvcsqta][^mzlhvcsqta]*/gi),this.path&&(i||(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,i,n,r=null,o=0,a=0,l=0,c=0,u=0,d=0,h=-this.pathOffset.x,f=-this.pathOffset.y;t.beginPath();for(var p=0,g=this.path.length;p<g;++p){switch((e=this.path[p])[0]){case"l":l+=e[1],c+=e[2],t.lineTo(l+h,c+f);break;case"L":l=e[1],c=e[2],t.lineTo(l+h,c+f);break;case"h":l+=e[1],t.lineTo(l+h,c+f);break;case"H":l=e[1],t.lineTo(l+h,c+f);break;case"v":c+=e[1],t.lineTo(l+h,c+f);break;case"V":c=e[1],t.lineTo(l+h,c+f);break;case"m":o=l+=e[1],a=c+=e[2],t.moveTo(l+h,c+f);break;case"M":o=l=e[1],a=c=e[2],t.moveTo(l+h,c+f);break;case"c":i=l+e[5],n=c+e[6],u=l+e[3],d=c+e[4],t.bezierCurveTo(l+e[1]+h,c+e[2]+f,u+h,d+f,i+h,n+f),l=i,c=n;break;case"C":l=e[5],c=e[6],u=e[3],d=e[4],t.bezierCurveTo(e[1]+h,e[2]+f,u+h,d+f,l+h,c+f);break;case"s":i=l+e[3],n=c+e[4],null===r[0].match(/[CcSs]/)?(u=l,d=c):(u=2*l-u,d=2*c-d),t.bezierCurveTo(u+h,d+f,l+e[1]+h,c+e[2]+f,i+h,n+f),u=l+e[1],d=c+e[2],l=i,c=n;break;case"S":i=e[3],n=e[4],null===r[0].match(/[CcSs]/)?(u=l,d=c):(u=2*l-u,d=2*c-d),t.bezierCurveTo(u+h,d+f,e[1]+h,e[2]+f,i+h,n+f),l=i,c=n,u=e[1],d=e[2];break;case"q":i=l+e[3],n=c+e[4],u=l+e[1],d=c+e[2],t.quadraticCurveTo(u+h,d+f,i+h,n+f),l=i,c=n;break;case"Q":i=e[3],n=e[4],t.quadraticCurveTo(e[1]+h,e[2]+f,i+h,n+f),l=i,c=n,u=e[1],d=e[2];break;case"t":i=l+e[1],n=c+e[2],null===r[0].match(/[QqTt]/)?(u=l,d=c):(u=2*l-u,d=2*c-d),t.quadraticCurveTo(u+h,d+f,i+h,n+f),l=i,c=n;break;case"T":i=e[1],n=e[2],null===r[0].match(/[QqTt]/)?(u=l,d=c):(u=2*l-u,d=2*c-d),t.quadraticCurveTo(u+h,d+f,i+h,n+f),l=i,c=n;break;case"a":s(t,l+h,c+f,[e[1],e[2],e[3],e[4],e[5],e[6]+l+h,e[7]+c+f]),l+=e[6],c+=e[7];break;case"A":s(t,l+h,c+f,[e[1],e[2],e[3],e[4],e[5],e[6]+h,e[7]+f]),l=e[6],c=e[7];break;case"z":case"Z":l=o,c=a,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 r(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,i=[],n=this._createBaseSVGMarkup(),r=0,o=this.path.length;r<o;r++)i.push(this.path[r].join(" "));var s=i.join(" ");return e=" translate("+-this.pathOffset.x+", "+-this.pathOffset.y+") ",n.push("<path ",this.getSvgId(),'d="',s,'" style="',this.getSvgStyles(),'" transform="',this.getSvgTransform(),e,this.getSvgTransformMatrix(),'" stroke-linecap="round" ',this.addPaintOrder(),"/>\n"),t?t(n.join("")):n.join("")},complexity:function(){return this.path.length},_parsePath:function(){for(var t,e,i,n,r,o=[],s=[],c=/([-+]?((\d+\.\d+)|((\d+)|(\.\d+)))(?:e[-+]?\d+)?)/gi,u=0,d=this.path.length;u<d;u++){for(n=(t=this.path[u]).slice(1).trim(),s.length=0;i=c.exec(n);)s.push(i[0]);r=[t.charAt(0)];for(var h=0,f=s.length;h<f;h++)e=parseFloat(s[h]),isNaN(e)||r.push(e);var p=r[0],g=a[p.toLowerCase()],m=l[p]||p;if(r.length-1>g)for(var v=1,y=r.length;v<y;v+=g)o.push([p].concat(r.slice(v,v+g))),p=m;else o.push(r)}return o},_parseDimensions:function(){for(var t,r,o,s,a=[],l=[],c=null,u=0,d=0,h=0,f=0,p=0,g=0,m=0,v=this.path.length;m<v;++m){switch((t=this.path[m])[0]){case"l":h+=t[1],f+=t[2],s=[];break;case"L":h=t[1],f=t[2],s=[];break;case"h":h+=t[1],s=[];break;case"H":h=t[1],s=[];break;case"v":f+=t[1],s=[];break;case"V":f=t[1],s=[];break;case"m":u=h+=t[1],d=f+=t[2],s=[];break;case"M":u=h=t[1],d=f=t[2],s=[];break;case"c":r=h+t[5],o=f+t[6],p=h+t[3],g=f+t[4],s=e.util.getBoundsOfCurve(h,f,h+t[1],f+t[2],p,g,r,o),h=r,f=o;break;case"C":p=t[3],g=t[4],s=e.util.getBoundsOfCurve(h,f,t[1],t[2],p,g,t[5],t[6]),h=t[5],f=t[6];break;case"s":r=h+t[3],o=f+t[4],null===c[0].match(/[CcSs]/)?(p=h,g=f):(p=2*h-p,g=2*f-g),s=e.util.getBoundsOfCurve(h,f,p,g,h+t[1],f+t[2],r,o),p=h+t[1],g=f+t[2],h=r,f=o;break;case"S":r=t[3],o=t[4],null===c[0].match(/[CcSs]/)?(p=h,g=f):(p=2*h-p,g=2*f-g),s=e.util.getBoundsOfCurve(h,f,p,g,t[1],t[2],r,o),h=r,f=o,p=t[1],g=t[2];break;case"q":r=h+t[3],o=f+t[4],p=h+t[1],g=f+t[2],s=e.util.getBoundsOfCurve(h,f,p,g,p,g,r,o),h=r,f=o;break;case"Q":p=t[1],g=t[2],s=e.util.getBoundsOfCurve(h,f,p,g,p,g,t[3],t[4]),h=t[3],f=t[4];break;case"t":r=h+t[1],o=f+t[2],null===c[0].match(/[QqTt]/)?(p=h,g=f):(p=2*h-p,g=2*f-g),s=e.util.getBoundsOfCurve(h,f,p,g,p,g,r,o),
h=r,f=o;break;case"T":r=t[1],o=t[2],null===c[0].match(/[QqTt]/)?(p=h,g=f):(p=2*h-p,g=2*f-g),s=e.util.getBoundsOfCurve(h,f,p,g,p,g,r,o),h=r,f=o;break;case"a":s=e.util.getBoundsOfArc(h,f,t[1],t[2],t[3],t[4],t[5],t[6]+h,t[7]+f),h+=t[6],f+=t[7];break;case"A":s=e.util.getBoundsOfArc(h,f,t[1],t[2],t[3],t[4],t[5],t[6],t[7]),h=t[6],f=t[7];break;case"z":case"Z":h=u,f=d}c=t,s.forEach(function(t){a.push(t.x),l.push(t.y)}),a.push(h),l.push(f)}var y=i(a)||0,b=i(l)||0;return{left:y,top:b,width:(n(a)||0)-y,height:(n(l)||0)-b}}}),e.Path.fromObject=function(t,i){if("string"==typeof t.sourcePath){var n=t.sourcePath;e.loadSVGFromURL(n,function(e){var n=e[0];n.setOptions(t),i&&i(n)})}else e.Object._fromObject("Path",t,i,"path")},e.Path.ATTRIBUTE_NAMES=e.SHARED_ATTRIBUTES.concat(["d"]),e.Path.fromElement=function(t,i,n){var o=e.parseAttributes(t,e.Path.ATTRIBUTE_NAMES);i(new e.Path(o.d,r(o,n)))})}("undefined"!=typeof exports?exports:this),function(t){"use strict";var e=t.fabric||(t.fabric={}),i=e.util.object.extend,n=e.util.array.min,r=e.util.array.max;e.Group||(e.Group=e.util.createClass(e.Object,e.Collection,{type:"group",strokeWidth:0,subTargetCheck:!1,cacheProperties:[],useSetOnGroup:!1,initialize:function(t,e,i){e=e||{},this._objects=[],i&&this.callSuper("initialize",e),this._objects=t||[];for(var n=this._objects.length;n--;)this._objects[n].group=this;if(e.originX&&(this.originX=e.originX),e.originY&&(this.originY=e.originY),i)this._updateObjectsACoords();else{var r=e&&e.centerPoint;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){var i=t.left,n=t.top;t.set({left:i-e.x,top:n-e.y}),t.group=this,t.setCoords(!0,!0)},toString:function(){return"#<fabric.Group: ("+this.complexity()+")>"},addWithUpdate:function(t){return this._restoreObjectsState(),e.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(),e.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.length;i--;)this._objects[i]._set(t,e);this.callSuper("_set",t,e)},toObject:function(t){var e=this.getObjects().map(function(e){var i=e.includeDefaultValues;e.includeDefaultValues=e.group.includeDefaultValues;var n=e.toObject(t);return e.includeDefaultValues=i,n});return i(this.callSuper("toObject",t),{objects:e})},toDatalessObject:function(t){var e,n=this.sourcePath;return e=n||this.getObjects().map(function(e){var i=e.includeDefaultValues;e.includeDefaultValues=e.group.includeDefaultValues;var n=e.toDatalessObject(t);return e.includeDefaultValues=i,n}),i(this.callSuper("toDatalessObject",t),{objects:e})},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)for(var e=0,i=this._objects.length;e<i;e++)if(this._objects[e].willDrawShadow())return this.ownCaching=!1;return t},willDrawShadow:function(){if(this.shadow)return this.callSuper("willDrawShadow");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,i=this._objects.length;e<i;e++)this._objects[e].render(t)},isCacheDirty:function(){if(this.callSuper("isCacheDirty"))return!0;if(!this.statefullCache)return!1;for(var t=0,e=this._objects.length;t<e;t++)if(this._objects[t].isCacheDirty(!0)){if(this._cacheCanvas){var i=this.cacheWidth/this.zoomX,n=this.cacheHeight/this.zoomY;this._cacheContext.clearRect(-i/2,-n/2,i,n)}return!0}return!1},_restoreObjectsState:function(){return this._objects.forEach(this._restoreObjectState,this),this},realizeTransform:function(t){var i=t.calcTransformMatrix(),n=e.util.qrDecompose(i),r=new e.Point(n.translateX,n.translateY);return t.flipX=!1,t.flipY=!1,t.set("scaleX",n.scaleX),t.set("scaleY",n.scaleY),t.skewX=n.skewX,t.skewY=n.skewY,t.angle=n.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,i=this.canvas;this._objects=[];var n=this.toObject();delete n.objects;var r=new e.ActiveSelection([]);return r.set(n),r.type="activeSelection",i.remove(this),t.forEach(function(t){t.group=r,t.dirty=!0,i.add(t)}),r.canvas=i,r._objects=t,(i._activeObject=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,i,n,r=[],o=[],s=["tr","br","bl","tl"],a=0,l=this._objects.length,c=s.length;a<l;++a)for((e=this._objects[a]).setCoords(!0),n=0;n<c;n++)i=s[n],r.push(e.oCoords[i].x),o.push(e.oCoords[i].y);this.set(this._getBounds(r,o,t))},_getBounds:function(t,i,o){var s=new e.Point(n(t),n(i)),a=new e.Point(r(t),r(i)),l={width:a.x-s.x||0,height:a.y-s.y||0};return o||(l.left=s.x||0,l.top=s.y||0,"center"===this.originX&&(l.left+=l.width/2),"right"===this.originX&&(l.left+=l.width),"center"===this.originY&&(l.top+=l.height/2),"bottom"===this.originY&&(l.top+=l.height)),l},toSVG:function(t){var e=this._createBaseSVGMarkup();e.push("<g ",this.getSvgId(),'transform="',this.getSvgTransform(),this.getSvgTransformMatrix(),'" style="',this.getSvgFilter(),'">\n');for(var i=0,n=this._objects.length;i<n;i++)e.push("\t",this._objects[i].toSVG(t));return e.push("</g>\n"),t?t(e.join("")):e.join("")}}),e.Group.fromObject=function(t,i){e.util.enlivenObjects(t.objects,function(n){var r=e.util.object.clone(t,!0);delete r.objects,i&&i(new e.Group(n,r,!0))})})}("undefined"!=typeof exports?exports:this),function(t){"use strict";var e=t.fabric||(t.fabric={});e.ActiveSelection||(e.ActiveSelection=e.util.createClass(e.Group,{type:"activeSelection",initialize:function(t,i){i=i||{},this._objects=t||[];for(var n=this._objects.length;n--;)this._objects[n].group=this;i.originX&&(this.originX=i.originX),i.originY&&(this.originY=i.originY),this._calcBounds(),this._updateObjectsCoords(),e.Object.prototype.initialize.call(this,i),this.setCoords()},toGroup:function(){var t=this._objects;this._objects=[];var i=this.toObject(),n=new e.Group([]);if(delete i.objects,n.set(i),n.type="group",t.forEach(function(t){t.group=n,t.canvas.remove(t)}),n._objects=t,!this.canvas)return n;var r=this.canvas;return r.add(n),(r._activeObject=n).setCoords(),n},onDeselect:function(){return this.destroy(),!1},toString:function(){return"#<fabric.ActiveSelection: ("+this.complexity()+")>"},_set:function(t,i){var n=this._objects.length;if("canvas"===t)for(;n--;)this._objects[n].set(t,i);if(this.useSetOnGroup)for(;n--;)this._objects[n].setOnGroup(t,i);e.Object.prototype._set.call(this,t,i)},shouldCache:function(){return!1},willDrawShadow:function(){if(this.shadow)return this.callSuper("willDrawShadow");for(var t=0,e=this._objects.length;t<e;t++)if(this._objects[t].willDrawShadow())return!0;return!1},isOnACache:function(){return!1},_renderControls:function(t,e,i){t.save(),t.globalAlpha=this.isMoving?this.borderOpacityWhenMoving:1,this.callSuper("_renderControls",t,e),void 0===(i=i||{}).hasControls&&(i.hasControls=!1),void 0===i.hasRotatingPoint&&(i.hasRotatingPoint=!1),i.forActiveSelection=!0;for(var n=0,r=this._objects.length;n<r;n++)this._objects[n]._renderControls(t,i);t.restore()}}),e.ActiveSelection.fromObject=function(t,i){e.util.enlivenObjects(t.objects,function(n){delete t.objects,i&&i(new e.ActiveSelection(n,t,!0))})})}("undefined"!=typeof exports?exports:this),function(t){"use strict";var e=fabric.util.object.extend;t.fabric||(t.fabric={}),t.fabric.Image?fabric.warn("fabric.Image is already defined."):(fabric.Image=fabric.util.createClass(fabric.Object,{type:"image",crossOrigin:"",strokeWidth:0,_lastScaleX:1,_lastScaleY:1,_filterScalingX:1,_filterScalingY:1,minimumScaleTrigger:.5,stateProperties:fabric.Object.prototype.stateProperties.concat("cropX","cropY"),objectCaching:!1,cacheKey:"",cropX:0,cropY:0,initialize:function(t,e){e||(e={}),this.filters=[],this.cacheKey="texture"+fabric.Object.__uid++,this.callSuper("initialize",e),this._initElement(t,e)},getElement:function(){return this._element},setElement:function(t,e){var i=fabric.filterBackend;return i&&i.evictCachesForKey&&(i.evictCachesForKey(this.cacheKey),i.evictCachesForKey(this.cacheKey+"_filtered")),this._element=t,this._originalElement=t,this._initConfig(e),this.resizeFilter&&this.applyResizeFilters(),0!==this.filters.length&&this.applyFilters(),this},dispose:function(){var t=fabric.filterBackend;t&&t.evictCachesForKey&&(t.evictCachesForKey(this.cacheKey),t.evictCachesForKey(this.cacheKey+"_filtered")),this._originalElement=void 0,this._element=void 0,this._filteredEl=void 0},setCrossOrigin:function(t){return this.crossOrigin=t,this._element.crossOrigin=t,this},getOriginalSize:function(){var t=this.getElement();return{width:t.width,height:t.height}},_stroke:function(t){if(this.stroke&&0!==this.strokeWidth){var e=this.width/2,i=this.height/2;t.beginPath(),t.moveTo(-e,-i),t.lineTo(e,-i),t.lineTo(e,i),t.lineTo(-e,i),t.lineTo(-e,-i),t.closePath()}},_renderDashedStroke:function(t){var e=-this.width/2,i=-this.height/2,n=this.width,r=this.height;t.save(),this._setStrokeStyles(t,this),t.beginPath(),fabric.util.drawDashedLine(t,e,i,e+n,i,this.strokeDashArray),fabric.util.drawDashedLine(t,e+n,i,e+n,i+r,this.strokeDashArray),fabric.util.drawDashedLine(t,e+n,i+r,e,i+r,this.strokeDashArray),fabric.util.drawDashedLine(t,e,i+r,e,i,this.strokeDashArray),t.closePath(),t.restore()},toObject:function(t){var i=[];this.filters.forEach(function(t){t&&i.push(t.toObject())});var n=e(this.callSuper("toObject",["crossOrigin","cropX","cropY"].concat(t)),{src:this.getSrc(),filters:i});return this.resizeFilter&&(n.resizeFilter=this.resizeFilter.toObject()),n},hasCrop:function(){return this.cropX||this.cropY||this.width<this._element.width||this.height<this._element.height},toSVG:function(t){var e=this._createBaseSVGMarkup(),i=-this.width/2,n=-this.height/2,r="";if(this.hasCrop()){var o=fabric.Object.__uid++;e.push('<clipPath id="imageCrop_'+o+'">\n','\t<rect x="'+i+'" y="'+n+'" 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.getSvgId(),'xlink:href="',this.getSvgSrc(!0),'" x="',i-this.cropX,'" y="',n-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="',i,'" y="',n,'" 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,i){return fabric.util.loadImage(t,function(t){this.setElement(t,i),e(this)},this,i&&i.crossOrigin),this},toString:function(){return'#<fabric.Image: { src: "'+this.getSrc()+'" }>'},applyResizeFilters:function(){var t=this.resizeFilter,e=this.canvas?this.canvas.getRetinaScaling():1,i=this.minimumScaleTrigger,n=this.scaleX*e,r=this.scaleY*e,o=this._filteredEl||this._originalElement;if(!t||i<n&&i<r)return this._element=o,this._filterScalingX=1,void(this._filterScalingY=1);fabric.filterBackend||(fabric.filterBackend=fabric.initFilterBackend());var s=fabric.util.createCanvasElement(),a=this._filteredEl?this.cacheKey:this.cacheKey+"_filtered",l=o.width,c=o.height;s.width=l,s.height=c,this._element=s,t.scaleX=n,t.scaleY=r,fabric.filterBackend.applyFilters([t],o,l,c,this._element,a),this._filterScalingX=s.width/this._originalElement.width,this._filterScalingY=s.height/this._originalElement.height},applyFilters:function(t){if(0===(t=(t=t||this.filters||[]).filter(function(t){return t})).length)return this._element=this._originalElement,this._filteredEl=null,this._filterScalingX=1,this._filterScalingY=1,this;var e=this._originalElement,i=e.naturalWidth||e.width,n=e.naturalHeight||e.height;if(this._element===this._originalElement){var r=fabric.util.createCanvasElement();r.width=i,r.height=n,this._element=r,this._filteredEl=r}else this._element.getContext("2d").clearRect(0,0,i,n);return fabric.filterBackend||(fabric.filterBackend=fabric.initFilterBackend()),fabric.filterBackend.applyFilters(t,this._originalElement,i,n,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){!1===this.isMoving&&this.resizeFilter&&this._needsResize()&&(this._lastScaleX=this.scaleX,this._lastScaleY=this.scaleY,this.applyResizeFilters()),this._stroke(t),this._renderPaintInOrder(t)},_renderFill:function(t){var e=this.width,i=this.height,n=e*this._filterScalingX,r=i*this._filterScalingY,o=-e/2,s=-i/2,a=this._element;a&&t.drawImage(a,this.cropX*this._filterScalingX,this.cropY*this._filterScalingY,n,r,o,s,e,i)},_needsResize:function(){return this.scaleX!==this._lastScaleX||this.scaleY!==this._lastScaleY},_resetWidthHeight:function(){var t=this.getElement();this.set("width",t.width),this.set("height",t.height)},_initElement:function(t,e){this.setElement(fabric.util.getById(t),e),fabric.util.addClass(this.getElement(),fabric.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?fabric.util.enlivenObjects(t,function(t){e&&e(t)},"fabric.Image.filters"):e&&e()},_setWidthHeight:function(t){this.width="width"in t?t.width:this.getElement()&&this.getElement().width||0,this.height="height"in t?t.height:this.getElement()&&this.getElement().height||0},parsePreserveAspectRatioAttribute:function(){var t,e=fabric.util.parsePreserveAspectRatioAttribute(this.preserveAspectRatio||""),i=this._element.width,n=this._element.height,r=1,o=1,s=0,a=0,l=0,c=0,u=this.width,d=this.height,h={width:u,height:d};return!e||"none"===e.alignX&&"none"===e.alignY?(r=u/i,o=d/n):("meet"===e.meetOrSlice&&(t=(u-i*(r=o=fabric.util.findScaleToFit(this._element,h)))/2,"Min"===e.alignX&&(s=-t),"Max"===e.alignX&&(s=t),t=(d-n*o)/2,"Min"===e.alignY&&(a=-t),"Max"===e.alignY&&(a=t)),"slice"===e.meetOrSlice&&(t=i-u/(r=o=fabric.util.findScaleToCover(this._element,h)),"Mid"===e.alignX&&(l=t/2),"Max"===e.alignX&&(l=t),t=n-d/o,"Mid"===e.alignY&&(c=t/2),"Max"===e.alignY&&(c=t),i=u/r,n=d/o)),{width:i,height:n,scaleX:r,scaleY:o,offsetLeft:s,offsetTop:a,cropX:l,cropY:c}}}),fabric.Image.CSS_CANVAS="canvas-img",fabric.Image.prototype.getSvgSrc=fabric.Image.prototype.getSrc,fabric.Image.fromObject=function(t,e){var i=fabric.util.object.clone(t);fabric.util.loadImage(i.src,function(t,n){n?e&&e(null,n):fabric.Image.prototype._initFilters.call(i,i.filters,function(n){i.filters=n||[],fabric.Image.prototype._initFilters.call(i,[i.resizeFilter],function(n){i.resizeFilter=n[0];var r=new fabric.Image(t,i);e(r)})})},null,i.crossOrigin)},fabric.Image.fromURL=function(t,e,i){fabric.util.loadImage(t,function(t){e&&e(new fabric.Image(t,i))},null,i&&i.crossOrigin)},fabric.Image.ATTRIBUTE_NAMES=fabric.SHARED_ATTRIBUTES.concat("x y width height preserveAspectRatio xlink:href crossOrigin".split(" ")),fabric.Image.fromElement=function(t,i,n){var r=fabric.parseAttributes(t,fabric.Image.ATTRIBUTE_NAMES);fabric.Image.fromURL(r["xlink:href"],i,e(n?fabric.util.object.clone(n):{},r))})}("undefined"!=typeof exports?exports:this),fabric.util.object.extend(fabric.Object.prototype,{_getAngleValueForStraighten:function(){var t=this.angle%360;return 0<t?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(){},i=(t=t||{}).onComplete||e,n=t.onChange||e,r=this;return fabric.util.animate({startValue:this.get("angle"),endValue:this._getAngleValueForStraighten(),duration:this.FX_DURATION,onChange:function(t){r.rotate(t),n()},onComplete:function(){r.setCoords(),i()}}),this}}),fabric.util.object.extend(fabric.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){t&&t.tileSize&&(this.tileSize=t.tileSize),this.setupGLContext(this.tileSize,this.tileSize),this.captureGPUInfo()}fabric.isWebglSupported=function(t){if(fabric.isLikelyNode)return!1;t=t||fabric.WebglFilterBackend.prototype.tileSize;var e,i,n,r=document.createElement("canvas"),o=r.getContext("webgl")||r.getContext("experimental-webgl"),s=!1;if(o){fabric.maxTextureSize=o.getParameter(o.MAX_TEXTURE_SIZE),s=fabric.maxTextureSize>=t;for(var a=["highp","mediump","lowp"],l=0;l<3;l++)if(i="precision "+a[l]+" float;\nvoid main(){}",n=(e=o).createShader(e.FRAGMENT_SHADER),e.shaderSource(n,i),e.compileShader(n),e.getShaderParameter(n,e.COMPILE_STATUS)){fabric.webGlPrecision=a[l];break}}return this.isSupported=s},(fabric.WebglFilterBackend=t).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 i,n=void 0!==window.performance;try{new ImageData(1,1),i=!0}catch(t){i=!1}var r="undefined"!=typeof ArrayBuffer,o="undefined"!=typeof Uint8ClampedArray;if(n&&i&&r&&o){var s,a,l=fabric.util.createCanvasElement(),c=new ArrayBuffer(t*e*4),u={imageBuffer:c,destinationWidth:t,destinationHeight:e,targetCanvas:l};l.width=t,l.height=e,s=window.performance.now(),copyGLTo2DDrawImage.call(u,this.gl,u),a=window.performance.now()-s,s=window.performance.now(),copyGLTo2DPutImageData.call(u,this.gl,u),window.performance.now()-s<a?(this.imageBuffer=c,this.copyGLTo2D=copyGLTo2DPutImageData):this.copyGLTo2D=copyGLTo2DDrawImage}},createWebGLCanvas:function(t,e){var i=fabric.util.createCanvasElement();i.width=t,i.height=e;var n={premultipliedAlpha:!1},r=i.getContext("webgl",n);r||(r=i.getContext("experimental-webgl",n)),r&&(r.clearColor(0,0,0,0),this.canvas=i,this.gl=r)},applyFilters:function(t,e,i,n,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:i,sourceHeight:n,destinationWidth:i,destinationHeight:n,context:a,sourceTexture:this.createTexture(a,i,n,!s&&e),targetTexture:this.createTexture(a,i,n),originalTexture:s||this.createTexture(a,i,n,!s&&e),passes:t.length,webgl:!0,aPosition:this.aPosition,programCache:this.programCache,pass:0,filterBackend:this,targetCanvas:r},c=a.createFramebuffer();return a.bindFramebuffer(a.FRAMEBUFFER,c),t.forEach(function(t){t&&t.applyTo(l)}),resizeCanvasIfNeeded(l),this.copyGLTo2D(a,l),a.bindTexture(a.TEXTURE_2D,null),a.deleteTexture(l.sourceTexture),a.deleteTexture(l.targetTexture),a.deleteFramebuffer(c),r.getContext("2d").setTransform(1,0,0,1,0,0),l},applyFiltersDebug:function(t,e,i,n,r,o){var s=this.gl,a=this.applyFilters(t,e,i,n,r,o),l=s.getError();if(l!==s.NO_ERROR){var c=this.glErrorToString(s,l),u=new Error("WebGL Error "+c);throw u.glErrorCode=l,u}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,i,n){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),n?t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,n):t.texImage2D(t.TEXTURE_2D,0,t.RGBA,e,i,0,t.RGBA,t.UNSIGNED_BYTE,null),r},getCachedTexture:function(t,e){if(this.textureCache[t])return this.textureCache[t];var i=this.createTexture(this.gl,e.width,e.height,e);return this.textureCache[t]=i},evictCachesForKey:function(t){this.textureCache[t]&&(this.gl.deleteTexture(this.textureCache[t]),delete this.textureCache[t])},copyGLTo2D:copyGLTo2DDrawImage,captureGPUInfo:function(){if(this.gpuInfo)return this.gpuInfo;var t=this.gl,e=t.getExtension("WEBGL_debug_renderer_info"),i={renderer:"",vendor:""};if(e){var n=t.getParameter(e.UNMASKED_RENDERER_WEBGL),r=t.getParameter(e.UNMASKED_VENDOR_WEBGL);n&&(i.renderer=n.toLowerCase()),r&&(i.vendor=r.toLowerCase())}return this.gpuInfo=i}}}(),function(){"use strict";function t(){}var e=function(){};(fabric.Canvas2dFilterBackend=t).prototype={evictCachesForKey:e,dispose:e,clearWebGLCaches:e,resources:{},applyFilters:function(t,e,i,n,r){var o=r.getContext("2d");o.drawImage(e,0,0,i,n);var s={sourceWidth:i,sourceHeight:n,imageData:o.getImageData(0,0,i,n),originalEl:e,originalImageData:o.getImageData(0,0,i,n),canvasEl:r,ctx:o,filterBackend:this};return t.forEach(function(t){t.applyTo(s)}),s.imageData.width===i&&s.imageData.height===n||(r.width=s.imageData.width,r.height=s.imageData.height),o.putImageData(s.imageData,0,0),s}}}(),fabric.Image.filters=fabric.Image.filters||{},fabric.Image.filters.BaseFilter=fabric.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,i){e=e||this.fragmentSource,i=i||this.vertexSource,"highp"!==fabric.webGlPrecision&&(e=e.replace(/precision highp float/g,"precision "+fabric.webGlPrecision+" float"));var n=t.createShader(t.VERTEX_SHADER);if(t.shaderSource(n,i),t.compileShader(n),!t.getShaderParameter(n,t.COMPILE_STATUS))throw new Error("Vertex shader compile error for "+this.type+": "+t.getShaderInfoLog(n));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,n),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,i){var n=e.aPostion,r=t.createBuffer();t.bindBuffer(t.ARRAY_BUFFER,r),t.enableVertexAttribArray(n),t.vertexAttribPointer(n,2,t.FLOAT,!1,0,0),t.bufferData(t.ARRAY_BUFFER,i,t.STATIC_DRAW)},_setupFrameBuffer:function(t){var e,i,n=t.context;1<t.passes?(e=t.destinationWidth,i=t.destinationHeight,t.sourceWidth===e&&t.sourceHeight===i||(n.deleteTexture(t.targetTexture),t.targetTexture=t.filterBackend.createTexture(n,e,i)),n.framebufferTexture2D(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.TEXTURE_2D,t.targetTexture,0)):(n.bindFramebuffer(n.FRAMEBUFFER,null),n.finish())},_swapTextures:function(t){t.passes--,t.pass++;var e=t.targetTexture;t.targetTexture=t.sourceTexture,t.sourceTexture=e},isNeutralState:function(){return!1},applyTo:function(t){if(t.webgl){if(1<t.passes&&this.isNeutralState(t))return;this._setupFrameBuffer(t),this.applyToWebGL(t),this._swapTextures(t)}else this.isNeutralState()||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,i=this.retrieveShader(t);0===t.pass&&t.originalTexture?e.bindTexture(e.TEXTURE_2D,t.originalTexture):e.bindTexture(e.TEXTURE_2D,t.sourceTexture),e.useProgram(i.program),this.sendAttributeData(e,i.attributeLocations,t.aPosition),e.uniform1f(i.uniformLocations.uStepW,1/t.sourceWidth),e.uniform1f(i.uniformLocations.uStepH,1/t.sourceHeight),this.sendUniformData(e,i.uniformLocations),e.viewport(0,0,t.destinationWidth,t.destinationHeight),e.drawArrays(e.TRIANGLE_STRIP,0,4)},bindAdditionalTexture:function(t,e,i){t.activeTexture(i),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()}}),fabric.Image.filters.BaseFilter.fromObject=function(t,e){var i=new fabric.Image.filters[t.type](t);return e&&e(i),i},function(t){"use strict";var e=t.fabric||(t.fabric={}),i=e.Image.filters,n=e.util.createClass;i.ColorMatrix=n(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)},isNeutralState:function(){for(var t=i.ColorMatrix,e=20;e--;)if(this.matrix[e]!==t.prototype.matrix[e])return!1;return!0},applyTo2d:function(t){var e,i,n,r,o,s=t.imageData.data,a=s.length,l=this.matrix,c=this.colorsOnly;for(o=0;o<a;o+=4)e=s[o],i=s[o+1],n=s[o+2],c?(s[o]=e*l[0]+i*l[1]+n*l[2]+255*l[4],s[o+1]=e*l[5]+i*l[6]+n*l[7]+255*l[9],s[o+2]=e*l[10]+i*l[11]+n*l[12]+255*l[14]):(r=s[o+3],s[o]=e*l[0]+i*l[1]+n*l[2]+r*l[3]+255*l[4],s[o+1]=e*l[5]+i*l[6]+n*l[7]+r*l[8]+255*l[9],s[o+2]=e*l[10]+i*l[11]+n*l[12]+r*l[13]+255*l[14],s[o+3]=e*l[15]+i*l[16]+n*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 i=this.matrix,n=[i[0],i[1],i[2],i[3],i[5],i[6],i[7],i[8],i[10],i[11],i[12],i[13],i[15],i[16],i[17],i[18]],r=[i[4],i[9],i[14],i[19]];t.uniformMatrix4fv(e.uColorMatrix,!1,n),t.uniform4fv(e.uConstants,r)}}),e.Image.filters.ColorMatrix.fromObject=e.Image.filters.BaseFilter.fromObject}("undefined"!=typeof exports?exports:this),function(t){"use strict";var e=t.fabric||(t.fabric={}),i=e.Image.filters,n=e.util.createClass;i.Brightness=n(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,i=t.imageData.data,n=i.length,r=Math.round(255*this.brightness);for(e=0;e<n;e+=4)i[e]=i[e]+r,i[e+1]=i[e+1]+r,i[e+2]=i[e+2]+r}},getUniformLocations:function(t,e){return{uBrightness:t.getUniformLocation(e,"uBrightness")}},sendUniformData:function(t,e){t.uniform1f(e.uBrightness,this.brightness)}}),e.Image.filters.Brightness.fromObject=e.Image.filters.BaseFilter.fromObject}("undefined"!=typeof exports?exports:this),function(t){"use strict";var e=t.fabric||(t.fabric={}),i=e.util.object.extend,n=e.Image.filters,r=e.util.createClass;n.Convolute=r(n.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),i=this.type+"_"+e+"_"+(this.opaque?1:0),n=this.fragmentSource[i];return t.programCache.hasOwnProperty(i)||(t.programCache[i]=this.createProgram(t.context,n)),t.programCache[i]},applyTo2d:function(t){var e,i,n,r,o,s,a,l,c,u,d,h,f,p=t.imageData,g=p.data,m=this.matrix,v=Math.round(Math.sqrt(m.length)),y=Math.floor(v/2),b=p.width,w=p.height,x=t.ctx.createImageData(b,w),_=x.data,C=this.opaque?1:0;for(d=0;d<w;d++)for(u=0;u<b;u++){for(o=4*(d*b+u),f=r=n=i=e=0;f<v;f++)for(h=0;h<v;h++)s=u+h-y,(a=d+f-y)<0||w<a||s<0||b<s||(l=4*(a*b+s),c=m[f*v+h],e+=g[l]*c,i+=g[l+1]*c,n+=g[l+2]*c,C||(r+=g[l+3]*c));_[o]=e,_[o+1]=i,_[o+2]=n,_[o+3]=C?g[o+3]:r}t.imageData=x},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})}}),e.Image.filters.Convolute.fromObject=e.Image.filters.BaseFilter.fromObject}("undefined"!=typeof exports?exports:this),function(t){"use strict";var e=t.fabric||(t.fabric={}),i=e.Image.filters,n=e.util.createClass;i.Grayscale=n(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,i,n=t.imageData.data,r=n.length,o=this.mode;for(e=0;e<r;e+=4)"average"===o?i=(n[e]+n[e+1]+n[e+2])/3:"lightness"===o?i=(Math.min(n[e],n[e+1],n[e+2])+Math.max(n[e],n[e+1],n[e+2]))/2:"luminosity"===o&&(i=.21*n[e]+.72*n[e+1]+.07*n[e+2]),n[e]=i,n[e+1]=i,n[e+2]=i},retrieveShader:function(t){var e=this.type+"_"+this.mode;if(!t.programCache.hasOwnProperty(e)){var i=this.fragmentSource[this.mode];t.programCache[e]=this.createProgram(t.context,i)}return t.programCache[e]},getUniformLocations:function(t,e){return{uMode:t.getUniformLocation(e,"uMode")}},sendUniformData:function(t,e){t.uniform1i(e.uMode,1)}}),e.Image.filters.Grayscale.fromObject=e.Image.filters.BaseFilter.fromObject}("undefined"!=typeof exports?exports:this),function(t){"use strict";var e=t.fabric||(t.fabric={}),i=e.Image.filters,n=e.util.createClass;i.Invert=n(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){if(this.invert){var e,i=t.imageData.data,n=i.length;for(e=0;e<n;e+=4)i[e]=255-i[e],i[e+1]=255-i[e+1],i[e+2]=255-i[e+2]}},getUniformLocations:function(t,e){return{uInvert:t.getUniformLocation(e,"uInvert")}},sendUniformData:function(t,e){t.uniform1i(e.uInvert,this.invert)}}),e.Image.filters.Invert.fromObject=e.Image.filters.BaseFilter.fromObject}("undefined"!=typeof exports?exports:this),function(t){"use strict";var e=t.fabric||(t.fabric={}),i=e.util.object.extend,n=e.Image.filters,r=e.util.createClass;n.Noise=r(n.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,i,n=t.imageData.data,r=n.length,o=this.noise;for(e=0,r=n.length;e<r;e+=4)i=(.5-Math.random())*o,n[e]+=i,n[e+1]+=i,n[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})}}),e.Image.filters.Noise.fromObject=e.Image.filters.BaseFilter.fromObject}("undefined"!=typeof exports?exports:this),function(t){"use strict";var e=t.fabric||(t.fabric={}),i=e.Image.filters,n=e.util.createClass;i.Pixelate=n(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){if(1!==this.blocksize){var e,i,n,r,o,s,a,l,c,u,d,h=t.imageData,f=h.data,p=h.height,g=h.width;for(i=0;i<p;i+=this.blocksize)for(n=0;n<g;n+=this.blocksize)for(r=f[e=4*i*g+4*n],o=f[e+1],s=f[e+2],a=f[e+3],u=Math.min(i+this.blocksize,p),d=Math.min(n+this.blocksize,g),l=i;l<u;l++)for(c=n;c<d;c++)f[e=4*l*g+4*c]=r,f[e+1]=o,f[e+2]=s,f[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)}}),e.Image.filters.Pixelate.fromObject=e.Image.filters.BaseFilter.fromObject}("undefined"!=typeof exports?exports:this),function(t){"use strict";var e=t.fabric||(t.fabric={}),i=e.util.object.extend,n=e.Image.filters,r=e.util.createClass;n.RemoveColor=r(n.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 i,n,r,o,s=t.imageData.data,a=255*this.distance,l=new e.Color(this.color).getSource(),c=[l[0]-a,l[1]-a,l[2]-a],u=[l[0]+a,l[1]+a,l[2]+a];for(i=0;i<s.length;i+=4)n=s[i],r=s[i+1],o=s[i+2],c[0]<n&&c[1]<r&&c[2]<o&&n<u[0]&&r<u[1]&&o<u[2]&&(s[i+3]=0)},getUniformLocations:function(t,e){return{uLow:t.getUniformLocation(e,"uLow"),uHigh:t.getUniformLocation(e,"uHigh")}},sendUniformData:function(t,i){var n=new e.Color(this.color).getSource(),r=parseFloat(this.distance),o=[0+n[0]/255-r,0+n[1]/255-r,0+n[2]/255-r,1],s=[n[0]/255+r,n[1]/255+r,n[2]/255+r,1];t.uniform4fv(i.uLow,o),t.uniform4fv(i.uHigh,s)},toObject:function(){return i(this.callSuper("toObject"),{color:this.color,distance:this.distance})}}),e.Image.filters.RemoveColor.fromObject=e.Image.filters.BaseFilter.fromObject}("undefined"!=typeof exports?exports:this),function(t){"use strict";var e=t.fabric||(t.fabric={}),i=e.Image.filters,n=e.util.createClass,r={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 o in r)i[o]=n(i.ColorMatrix,{type:o,matrix:r[o],mainParameter:!1,colorsOnly:!0}),e.Image.filters[o].fromObject=e.Image.filters.BaseFilter.fromObject}("undefined"!=typeof exports?exports:this),function(t){"use strict";var e=t.fabric,i=e.Image.filters,n=e.util.createClass;i.BlendColor=n(i.BaseFilter,{type:"BlendColor",color:"#F95C63",mode:"multiply",alpha:1,fragmentSource:{multiply:"precision highp float;\nuniform sampler2D uTexture;\nuniform vec4 uColor;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = texture2D(uTexture, vTexCoord);\ncolor.rgb *= uColor.rgb;\ngl_FragColor = color;\n}",screen:"precision highp float;\nuniform sampler2D uTexture;\nuniform vec4 uColor;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = texture2D(uTexture, vTexCoord);\ncolor.rgb = 1.0 - (1.0 - color.rgb) * (1.0 - uColor.rgb);\ngl_FragColor = color;\n}",add:"precision highp float;\nuniform sampler2D uTexture;\nuniform vec4 uColor;\nvarying vec2 vTexCoord;\nvoid main() {\ngl_FragColor = texture2D(uTexture, vTexCoord);\ngl_FragColor.rgb += uColor.rgb;\n}",diff:"precision highp float;\nuniform sampler2D uTexture;\nuniform vec4 uColor;\nvarying vec2 vTexCoord;\nvoid main() {\ngl_FragColor = texture2D(uTexture, vTexCoord);\ngl_FragColor.rgb = abs(gl_FragColor.rgb - uColor.rgb);\n}",subtract:"precision highp float;\nuniform sampler2D uTexture;\nuniform vec4 uColor;\nvarying vec2 vTexCoord;\nvoid main() {\ngl_FragColor = texture2D(uTexture, vTexCoord);\ngl_FragColor.rgb -= uColor.rgb;\n}",lighten:"precision highp float;\nuniform sampler2D uTexture;\nuniform vec4 uColor;\nvarying vec2 vTexCoord;\nvoid main() {\ngl_FragColor = texture2D(uTexture, vTexCoord);\ngl_FragColor.rgb = max(gl_FragColor.rgb, uColor.rgb);\n}",darken:"precision highp float;\nuniform sampler2D uTexture;\nuniform vec4 uColor;\nvarying vec2 vTexCoord;\nvoid main() {\ngl_FragColor = texture2D(uTexture, vTexCoord);\ngl_FragColor.rgb = min(gl_FragColor.rgb, uColor.rgb);\n}",exclusion:"precision highp float;\nuniform sampler2D uTexture;\nuniform vec4 uColor;\nvarying vec2 vTexCoord;\nvoid main() {\ngl_FragColor = texture2D(uTexture, vTexCoord);\ngl_FragColor.rgb += uColor.rgb - 2.0 * (uColor.rgb * gl_FragColor.rgb);\n}",overlay:"precision highp float;\nuniform sampler2D uTexture;\nuniform vec4 uColor;\nvarying vec2 vTexCoord;\nvoid main() {\ngl_FragColor = texture2D(uTexture, vTexCoord);\nif (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:"precision highp float;\nuniform sampler2D uTexture;\nuniform vec4 uColor;\nvarying vec2 vTexCoord;\nvoid main() {\ngl_FragColor = texture2D(uTexture, vTexCoord);\ngl_FragColor.rgb *= (1.0 - uColor.a);\ngl_FragColor.rgb += uColor.rgb;\n}"},retrieveShader:function(t){var e=this.type+"_"+this.mode,i=this.fragmentSource[this.mode];return t.programCache.hasOwnProperty(e)||(t.programCache[e]=this.createProgram(t.context,i)),t.programCache[e]},applyTo2d:function(t){var i,n,r,o,s,a,l,c=t.imageData.data,u=c.length,d=1-this.alpha;i=(l=new e.Color(this.color).getSource())[0]*this.alpha,n=l[1]*this.alpha,r=l[2]*this.alpha;for(var h=0;h<u;h+=4)switch(o=c[h],s=c[h+1],a=c[h+2],this.mode){case"multiply":c[h]=o*i/255,c[h+1]=s*n/255,c[h+2]=a*r/255;break;case"screen":c[h]=255-(255-o)*(255-i)/255,c[h+1]=255-(255-s)*(255-n)/255,c[h+2]=255-(255-a)*(255-r)/255;break;case"add":c[h]=o+i,c[h+1]=s+n,c[h+2]=a+r;break;case"diff":case"difference":c[h]=Math.abs(o-i),c[h+1]=Math.abs(s-n),c[h+2]=Math.abs(a-r);break;case"subtract":c[h]=o-i,c[h+1]=s-n,c[h+2]=a-r;break;case"darken":c[h]=Math.min(o,i),c[h+1]=Math.min(s,n),c[h+2]=Math.min(a,r);break;case"lighten":c[h]=Math.max(o,i),c[h+1]=Math.max(s,n),c[h+2]=Math.max(a,r);break;case"overlay":c[h]=i<128?2*o*i/255:255-2*(255-o)*(255-i)/255,c[h+1]=n<128?2*s*n/255:255-2*(255-s)*(255-n)/255,c[h+2]=r<128?2*a*r/255:255-2*(255-a)*(255-r)/255;break;case"exclusion":c[h]=i+o-2*i*o/255,c[h+1]=n+s-2*n*s/255,c[h+2]=r+a-2*r*a/255;break;case"tint":c[h]=i+o*d,c[h+1]=n+s*d,c[h+2]=r+a*d}},getUniformLocations:function(t,e){return{uColor:t.getUniformLocation(e,"uColor")}},sendUniformData:function(t,i){var n=new e.Color(this.color).getSource();n[0]=this.alpha*n[0]/255,n[1]=this.alpha*n[1]/255,n[2]=this.alpha*n[2]/255,n[3]=this.alpha,t.uniform4fv(i.uColor,n)},toObject:function(){return{type:this.type,color:this.color,mode:this.mode,alpha:this.alpha}}}),e.Image.filters.BlendColor.fromObject=e.Image.filters.BaseFilter.fromObject}("undefined"!=typeof exports?exports:this),function(t){"use strict";var e=t.fabric,i=e.Image.filters,n=e.util.createClass;i.BlendImage=n(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,i=this.fragmentSource[this.mode];return t.programCache.hasOwnProperty(e)||(t.programCache[e]=this.createProgram(t.context,i)),t.programCache[e]},applyToWebGL:function(t){var e=t.context,i=this.createTexture(t.filterBackend,this.image);this.bindAdditionalTexture(e,i,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,e=t._element.width,i=t._element.height;return[1/t.scaleX,0,0,0,1/t.scaleY,0,-t.left/e,-t.top/i,1]},applyTo2d:function(t){var e,i,n,r,o,s,a,l,c,u,d,h=t.imageData,f=t.filterBackend.resources,p=h.data,g=p.length,m=t.imageData.width,v=t.imageData.height,y=this.image;f.blendImage||(f.blendImage=document.createElement("canvas")),(c=f.blendImage).width===m&&c.height===v||(c.width=m,c.height=v),(u=c.getContext("2d")).setTransform(y.scaleX,0,0,y.scaleY,y.left,y.top),u.drawImage(y._element,0,0,m,v),d=u.getImageData(0,0,m,v).data;for(var b=0;b<g;b+=4)switch(o=p[b],s=p[b+1],a=p[b+2],l=p[b+3],e=d[b],i=d[b+1],n=d[b+2],r=d[b+3],this.mode){case"multiply":p[b]=o*e/255,p[b+1]=s*i/255,p[b+2]=a*n/255,p[b+3]=l*r/255;break;case"mask":p[b+3]=r}},getUniformLocations:function(t,e){return{uTransformMatrix:t.getUniformLocation(e,"uTransformMatrix"),uImage:t.getUniformLocation(e,"uImage")}},sendUniformData:function(t,e){var i=this.calculateMatrix();t.uniform1i(e.uImage,1),t.uniformMatrix3fv(e.uTransformMatrix,!1,i)},toObject:function(){return{type:this.type,image:this.image&&this.image.toObject(),mode:this.mode,alpha:this.alpha}}}),e.Image.filters.BlendImage.fromObject=function(t,i){e.Image.fromObject(t.image,function(n){var r=e.util.object.clone(t);r.image=n,i(new e.Image.filters.BlendImage(r))})}}("undefined"!=typeof exports?exports:this),function(t){"use strict";var e=t.fabric||(t.fabric={}),i=Math.pow,n=Math.floor,r=Math.sqrt,o=Math.abs,s=Math.round,a=Math.sin,l=Math.ceil,c=e.Image.filters,u=e.util.createClass;c.Resize=u(c.BaseFilter,{type:"Resize",resizeType:"hermite",scaleX:0,scaleY:0,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(),i=this.type+"_"+e;if(!t.programCache.hasOwnProperty(i)){var n=this.generateShader(e);t.programCache[i]=this.createProgram(t.context,n)}return t.programCache[i]},getFilterWindow:function(){var t=this.tempScale;return Math.ceil(this.lanczosLobes/t)},getTaps:function(){for(var t=this.lanczosCreate(this.lanczosLobes),e=this.tempScale,i=this.getFilterWindow(),n=new Array(i),r=1;r<=i;r++)n[r-1]=t(r*e);return n},generateShader:function(t){for(var e=new Array(t),i=this.fragmentSourceTOP,n=1;n<=t;n++)e[n-1]=n+".0 * uDelta";return i+="uniform float uTaps["+t+"];\n",i+="void main() {\n",i+="  vec4 color = texture2D(uTexture, vTexCoord);\n",i+="  float sum = 1.0;\n",e.forEach(function(t,e){i+="  color += texture2D(uTexture, vTexCoord + "+t+") * uTaps["+e+"];\n",i+="  color += texture2D(uTexture, vTexCoord - "+t+") * uTaps["+e+"];\n",i+="  sum += 2.0 * uTaps["+e+"];\n"}),i+="  gl_FragColor = color / sum;\n",i+="}"},fragmentSourceTOP:"precision highp float;\nuniform sampler2D uTexture;\nuniform vec2 uDelta;\nvarying vec2 vTexCoord;\n",applyTo:function(t){if(t.webgl){if(1<t.passes&&this.isNeutralState(t))return;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}else this.isNeutralState(t)||this.applyTo2d(t)},isNeutralState:function(t){var e=t.scaleX||this.scaleX,i=t.scaleY||this.scaleY;return 1===e&&1===i},lanczosCreate:function(t){return function(e){if(t<=e||e<=-t)return 0;if(e<1.1920929e-7&&-1.1920929e-7<e)return 1;var i=(e*=Math.PI)/t;return a(e)/e*a(i)/i}},applyTo2d:function(t){var e=t.imageData,i=this.scaleX,n=this.scaleY;this.rcpScaleX=1/i,this.rcpScaleY=1/n;var r,o=e.width,a=e.height,l=s(o*i),c=s(a*n);"sliceHack"===this.resizeType?r=this.sliceByTwo(t,o,a,l,c):"hermite"===this.resizeType?r=this.hermiteFastResize(t,o,a,l,c):"bilinear"===this.resizeType?r=this.bilinearFiltering(t,o,a,l,c):"lanczos"===this.resizeType&&(r=this.lanczosResize(t,o,a,l,c)),t.imageData=r},sliceByTwo:function(t,i,r,o,s){var a,l,c=t.imageData,u=!1,d=!1,h=.5*i,f=.5*r,p=e.filterBackend.resources,g=0,m=0,v=i,y=0;for(p.sliceByTwo||(p.sliceByTwo=document.createElement("canvas")),((a=p.sliceByTwo).width<1.5*i||a.height<r)&&(a.width=1.5*i,a.height=r),(l=a.getContext("2d")).clearRect(0,0,1.5*i,r),l.putImageData(c,0,0),o=n(o),s=n(s);!u||!d;)r=f,o<n(.5*(i=h))?h=n(.5*h):(h=o,u=!0),s<n(.5*f)?f=n(.5*f):(f=s,d=!0),l.drawImage(a,g,m,i,r,v,y,h,f),g=v,m=y,y+=f;return l.getImageData(g,m,o,s)},lanczosResize:function(t,e,s,a,c){var u=t.imageData.data,d=t.ctx.createImageData(a,c),h=d.data,f=this.lanczosCreate(this.lanczosLobes),p=this.rcpScaleX,g=this.rcpScaleY,m=2/this.rcpScaleX,v=2/this.rcpScaleY,y=l(p*this.lanczosLobes/2),b=l(g*this.lanczosLobes/2),w={},x={},_={};return function t(l){var C,k,S,T,O,j,E,A,D,P,F;for(x.x=(l+.5)*p,_.x=n(x.x),C=0;C<c;C++){for(x.y=(C+.5)*g,_.y=n(x.y),D=A=E=j=O=0,k=_.x-y;k<=_.x+y;k++)if(!(k<0||e<=k)){P=n(1e3*o(k-x.x)),w[P]||(w[P]={});for(var M=_.y-b;M<=_.y+b;M++)M<0||s<=M||(F=n(1e3*o(M-x.y)),w[P][F]||(w[P][F]=f(r(i(P*m,2)+i(F*v,2))/1e3)),0<(S=w[P][F])&&(O+=S,j+=S*u[T=4*(M*e+k)],E+=S*u[T+1],A+=S*u[T+2],D+=S*u[T+3]))}h[T=4*(C*a+l)]=j/O,h[T+1]=E/O,h[T+2]=A/O,h[T+3]=D/O}return++l<a?t(l):d}(0)},bilinearFiltering:function(t,e,i,r,o){var s,a,l,c,u,d,h,f,p,g=0,m=this.rcpScaleX,v=this.rcpScaleY,y=4*(e-1),b=t.imageData.data,w=t.ctx.createImageData(r,o),x=w.data;for(l=0;l<o;l++)for(c=0;c<r;c++)for(u=m*c-(s=n(m*c)),d=v*l-(a=n(v*l)),p=4*(a*e+s),h=0;h<4;h++)f=b[p+h]*(1-u)*(1-d)+b[p+4+h]*u*(1-d)+b[p+y+h]*d*(1-u)+b[p+y+4+h]*u*d,x[g++]=f;return w},hermiteFastResize:function(t,e,i,s,a){for(var c=this.rcpScaleX,u=this.rcpScaleY,d=l(c/2),h=l(u/2),f=t.imageData.data,p=t.ctx.createImageData(s,a),g=p.data,m=0;m<a;m++)for(var v=0;v<s;v++){for(var y=4*(v+m*s),b=0,w=0,x=0,_=0,C=0,k=0,S=0,T=(m+.5)*u,O=n(m*u);O<(m+1)*u;O++)for(var j=o(T-(O+.5))/h,E=(v+.5)*c,A=j*j,D=n(v*c);D<(v+1)*c;D++){var P=o(E-(D+.5))/d,F=r(A+P*P);1<F&&F<-1||0<(b=2*F*F*F-3*F*F+1)&&(S+=b*f[(P=4*(D+O*e))+3],x+=b,f[P+3]<255&&(b=b*f[P+3]/250),_+=b*f[P],C+=b*f[P+1],k+=b*f[P+2],w+=b)}g[y]=_/w,g[y+1]=C/w,g[y+2]=k/w,g[y+3]=S/x}return p},toObject:function(){return{type:this.type,scaleX:this.scaleX,scaleY:this.scaleY,resizeType:this.resizeType,lanczosLobes:this.lanczosLobes}}}),e.Image.filters.Resize.fromObject=e.Image.filters.BaseFilter.fromObject}("undefined"!=typeof exports?exports:this),function(t){"use strict";var e=t.fabric||(t.fabric={}),i=e.Image.filters,n=e.util.createClass;i.Contrast=n(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,i=t.imageData.data,n=i.length,r=Math.floor(255*this.contrast),o=259*(r+255)/(255*(259-r));for(e=0;e<n;e+=4)i[e]=o*(i[e]-128)+128,i[e+1]=o*(i[e+1]-128)+128,i[e+2]=o*(i[e+2]-128)+128}},getUniformLocations:function(t,e){return{uContrast:t.getUniformLocation(e,"uContrast")}},sendUniformData:function(t,e){t.uniform1f(e.uContrast,this.contrast)}}),e.Image.filters.Contrast.fromObject=e.Image.filters.BaseFilter.fromObject}("undefined"!=typeof exports?exports:this),function(t){"use strict";var e=t.fabric||(t.fabric={}),i=e.Image.filters,n=e.util.createClass;i.Saturation=n(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,i,n=t.imageData.data,r=n.length,o=-this.saturation;for(e=0;e<r;e+=4)i=Math.max(n[e],n[e+1],n[e+2]),n[e]+=i!==n[e]?(i-n[e])*o:0,n[e+1]+=i!==n[e+1]?(i-n[e+1])*o:0,n[e+2]+=i!==n[e+2]?(i-n[e+2])*o:0}},getUniformLocations:function(t,e){return{uSaturation:t.getUniformLocation(e,"uSaturation")}},sendUniformData:function(t,e){t.uniform1f(e.uSaturation,-this.saturation)}}),e.Image.filters.Saturation.fromObject=e.Image.filters.BaseFilter.fromObject}("undefined"!=typeof exports?exports:this),function(t){"use strict";var e=t.fabric||(t.fabric={}),i=e.Image.filters,n=e.util.createClass;i.Blur=n(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,n=t.filterBackend.resources,r=t.imageData.width,o=t.imageData.height;n.blurLayer1||(n.blurLayer1=document.createElement("canvas"),n.blurLayer2=document.createElement("canvas")),e=n.blurLayer1,i=n.blurLayer2,e.width===r&&e.height===o||(i.width=e.width=r,i.height=e.height=o);var s,a,l,c,u=e.getContext("2d"),d=i.getContext("2d"),h=.06*this.blur*.5;for(u.putImageData(t.imageData,0,0),d.clearRect(0,0,r,o),c=-15;c<=15;c++)l=h*(a=c/15)*r+(s=(Math.random()-.5)/4),d.globalAlpha=1-Math.abs(a),d.drawImage(e,l,s),u.drawImage(i,0,0),d.globalAlpha=1,d.clearRect(0,0,i.width,i.height);for(c=-15;c<=15;c++)l=h*(a=c/15)*o+(s=(Math.random()-.5)/4),d.globalAlpha=1-Math.abs(a),d.drawImage(e,s,l),u.drawImage(i,0,0),d.globalAlpha=1,d.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 u.globalAlpha=1,u.clearRect(0,0,e.width,e.height),f},getUniformLocations:function(t,e){return{delta:t.getUniformLocation(e,"uDelta")}},sendUniformData:function(t,e){var i=this.chooseRightDelta();t.uniform2fv(e.delta,i)},chooseRightDelta:function(){var t,e=1,i=[0,0];return this.horizontal?1<this.aspectRatio&&(e=1/this.aspectRatio):this.aspectRatio<1&&(e=this.aspectRatio),t=e*this.blur*.12,this.horizontal?i[0]=t:i[1]=t,i}}),i.Blur.fromObject=e.Image.filters.BaseFilter.fromObject}("undefined"!=typeof exports?exports:this),function(t){"use strict";var e=t.fabric||(t.fabric={}),i=e.Image.filters,n=e.util.createClass;i.Gamma=n(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",applyTo2d:function(t){var e,i=t.imageData.data,n=this.gamma,r=i.length,o=1/n[0],s=1/n[1],a=1/n[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=i.length;e<r;e+=4)i[e]=this.rVals[i[e]],i[e+1]=this.gVals[i[e+1]],i[e+2]=this.bVals[i[e+2]]},getUniformLocations:function(t,e){return{uGamma:t.getUniformLocation(e,"uGamma")}},sendUniformData:function(t,e){t.uniform3fv(e.uGamma,this.gamma)}}),e.Image.filters.Gamma.fromObject=e.Image.filters.BaseFilter.fromObject}("undefined"!=typeof exports?exports:this),function(t){"use strict";var e=t.fabric||(t.fabric={}),i=e.Image.filters,n=e.util.createClass;i.Composed=n(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 e.util.object.extend(this.callSuper("toObject"),{subFilters:this.subFilters.map(function(t){return t.toObject()})})}}),e.Image.filters.Composed.fromObject=function(t,i){var n=(t.subFilters||[]).map(function(t){return new e.Image.filters[t.type](t)}),r=new e.Image.filters.Composed({subFilters:n});return i&&i(r),r}}("undefined"!=typeof exports?exports:this),function(t){"use strict";var e=t.fabric||(t.fabric={}),i=e.Image.filters,n=e.util.createClass;i.HueRotation=n(i.ColorMatrix,{type:"HueRotation",rotation:0,mainParameter:"rotation",calculateMatrix:function(){var t=this.rotation*Math.PI,i=e.util.cos(t),n=e.util.sin(t),r=Math.sqrt(1/3)*n,o=1-i;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]=i+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]=i+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]=i+1/3*o},applyTo:function(t){this.calculateMatrix(),e.Image.filters.BaseFilter.prototype.applyTo.call(this,t)}}),e.Image.filters.HueRotation.fromObject=e.Image.filters.BaseFilter.fromObject}("undefined"!=typeof exports?exports:this),function(t){"use strict";var e=t.fabric||(t.fabric={}),i=e.util.object.clone;e.Text?e.warn("fabric.Text is already defined"):(e.Text=e.util.createClass(e.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:e.Object.prototype.stateProperties.concat("fontFamily","fontWeight","fontSize","text","underline","overline","linethrough","textAlign","fontStyle","lineHeight","textBackgroundColor","charSpacing","styles"),cacheProperties:e.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 e._measuringContext||(e._measuringContext=this.canvas&&this.canvas.contextCache||e.util.createCanvasElement().getContext("2d")),e._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,i,n,r,o,s,a=0,l=this._textLines.length;a<l;a++)if(("justify"===this.textAlign||a!==l-1&&!this.isEndOfWrapping(a))&&(n=0,r=this._textLines[a],(e=this.getLineWidth(a))<this.width&&(s=this.textLines[a].match(this._reSpacesAndTabs)))){i=s.length,t=(this.width-e)/i;for(var c=0,u=r.length;c<=u;c++)o=this.__charBounds[a][c],this._reSpaceAndTab.test(r[c])?(o.width+=t,o.kernedWidth+=t,o.left+=n,n+=t):o.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,i){t.textBaseline="alphabetic",t.font=this._getFontDeclaration(e,i)},calcTextWidth:function(){for(var t=this.getLineWidth(0),e=1,i=this._textLines.length;e<i;e++){var n=this.getLineWidth(e);t<n&&(t=n)}return t},_renderTextLine:function(t,e,i,n,r,o){this._renderChars(t,e,i,n,r,o)},_renderTextLinesBackground:function(t){if(this.textBackgroundColor||this.styleHas("textBackgroundColor")){for(var e,i,n,r,o,s,a=0,l=t.fillStyle,c=this._getLeftOffset(),u=this._getTopOffset(),d=0,h=0,f=0,p=this._textLines.length;f<p;f++)if(e=this.getHeightOfLine(f),this.textBackgroundColor||this.styleHas("textBackgroundColor",f)){n=this._textLines[f],i=this._getLineLeftOffset(f),d=h=0,r=this.getValueOfPropertyAt(f,0,"textBackgroundColor");for(var g=0,m=n.length;g<m;g++)o=this.__charBounds[f][g],(s=this.getValueOfPropertyAt(f,g,"textBackgroundColor"))!==r?((t.fillStyle=r)&&t.fillRect(c+i+d,u+a,h,e/this.lineHeight),d=o.left,h=o.width,r=s):h+=o.kernedWidth;s&&(t.fillStyle=s,t.fillRect(c+i+d,u+a,h,e/this.lineHeight)),a+=e}else a+=e;t.fillStyle=l,this._removeShadow(t)}},getFontCache:function(t){var i=t.fontFamily.toLowerCase();e.charWidthsCache[i]||(e.charWidthsCache[i]={});var n=e.charWidthsCache[i],r=t.fontStyle.toLowerCase()+"_"+(t.fontWeight+"").toLowerCase();return n[r]||(n[r]={}),n[r]},_applyCharStyles:function(t,e,i,n,r){this._setFillStyles(e,r),this._setStrokeStyles(e,r),e.font=this._getFontDeclaration(r)},_measureChar:function(t,e,i,n){var r,o,s,a,l=this.getFontCache(e),c=i+t,u=this._getFontDeclaration(e)===this._getFontDeclaration(n),d=e.fontSize/this.CACHE_FONT_SIZE;if(i&&l[i]&&(s=l[i]),l[t]&&(a=r=l[t]),u&&l[c]&&(a=(o=l[c])-s),!r||!s||!o){var h=this.getMeasuringContext();this._setTextStyles(h,e,!0)}return r||(a=r=h.measureText(t).width,l[t]=r),!s&&u&&i&&(s=h.measureText(i).width,l[i]=s),u&&!o&&(o=h.measureText(c).width,a=(l[c]=o)-s),{width:r*d,kernedWidth:a*d}},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,i,n,r,o=0,s=this._textLines[t],a=new Array(s.length);for(this.__charBounds[t]=a,e=0;e<s.length;e++)i=s[e],r=this._getGraphemeBox(i,t,e,n),o+=(a[e]=r).kernedWidth,n=i;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,i,n,r){var o=this.getCompleteStyleDeclaration(e,i),s=n?this.getCompleteStyleDeclaration(e,i-1):{},a=this._measureChar(t,o,n,s),l=a.kernedWidth,c=a.width;0!==this.charSpacing&&(c+=this._getWidthOfCharSpacing(),l+=this._getWidthOfCharSpacing());var u={width:c,left:0,height:o.fontSize,kernedWidth:l,deltaY:o.deltaY};if(0<i&&!r){var d=this.__charBounds[e][i-1];u.left=d.left+d.width+a.kernedWidth-a.width}return u},getHeightOfLine:function(t){if(this.__lineHeights[t])return this.__lineHeights[t];for(var e=0,i=0,n=this._textLines[t].length;i<n;i++)e=Math.max(this.getHeightOfChar(t,i),e);return this.__lineHeights[t]=e*this.lineHeight*this._fontSizeMult},calcTextHeight:function(){for(var t,e=0,i=0,n=this._textLines.length;i<n;i++)t=this.getHeightOfLine(i),e+=i===n-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 i=0,n=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),c=l/this.lineHeight,u=this._getLineLeftOffset(s);this._renderTextLine(e,t,this._textLines[s],n+u-o.offsetX,r+i+c-o.offsetY,s),i+=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,i,n,r,o){var s,a,l,c,u=this.getHeightOfLine(o),d=-1!==this.textAlign.indexOf("justify"),h="",f=0,p=!d&&0===this.charSpacing&&this.isEmptyStyles(o);if(e.save(),r-=u*this._fontSizeFraction/this.lineHeight,p)return this._renderChar(t,e,o,0,this.textLines[o],n,r,u),void e.restore();for(var g=0,m=i.length-1;g<=m;g++)c=g===m||this.charSpacing,h+=i[g],l=this.__charBounds[o][g],0===f?(n+=l.kernedWidth-l.width,f+=l.width):f+=l.kernedWidth,d&&!c&&this._reSpaceAndTab.test(i[g])&&(c=!0),c||(s=s||this.getCompleteStyleDeclaration(o,g),a=this.getCompleteStyleDeclaration(o,g+1),c=this._hasStyleChanged(s,a)),c&&(this._renderChar(t,e,o,g,h,n,r,u),h="",s=a,n+=f,f=0);e.restore()},_renderChar:function(t,e,i,n,r,o,s){var a=this._getStyleDeclaration(i,n),l=this.getCompleteStyleDeclaration(i,n),c="fillText"===t&&l.fill,u="strokeText"===t&&l.stroke&&l.strokeWidth;(u||c)&&(a&&e.save(),this._applyCharStyles(t,e,i,n,l),a&&a.textBackgroundColor&&this._removeShadow(e),a&&a.deltaY&&(s+=a.deltaY),c&&e.fillText(r,o,s),u&&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,i){var n=this.get2DCursorLocation(t,!0),r=this.getValueOfPropertyAt(n.lineIndex,n.charIndex,"fontSize"),o=this.getValueOfPropertyAt(n.lineIndex,n.charIndex,"deltaY"),s={fontSize:r*i.size,deltaY:o+r*i.baseline};return this.setSelectionStyles(s,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);var e},_getWidthOfCharSpacing:function(){return 0!==this.charSpacing?this.fontSize*this.charSpacing/1e3:0},getValueOfPropertyAt:function(t,e,i){var n=this._getStyleDeclaration(t,e);return n&&void 0!==n[i]?n[i]:this[i]},_renderTextDecoration:function(t,e){if(this[e]||this.styleHas(e)){for(var i,n,r,o,s,a,l,c,u,d,h,f,p,g,m,v,y=this._getLeftOffset(),b=this._getTopOffset(),w=0,x=this._textLines.length;w<x;w++)if(i=this.getHeightOfLine(w),this[e]||this.styleHas(e,w)){l=this._textLines[w],g=i/this.lineHeight,o=this._getLineLeftOffset(w),h=d=0,c=this.getValueOfPropertyAt(w,0,e),v=this.getValueOfPropertyAt(w,0,"fill"),u=b+g*(1-this._fontSizeFraction),n=this.getHeightOfChar(w,0),s=this.getValueOfPropertyAt(w,0,"deltaY");for(var _=0,C=l.length;_<C;_++)f=this.__charBounds[w][_],p=this.getValueOfPropertyAt(w,_,e),m=this.getValueOfPropertyAt(w,_,"fill"),r=this.getHeightOfChar(w,_),a=this.getValueOfPropertyAt(w,_,"deltaY"),(p!==c||m!==v||r!==n||a!==s)&&0<h?(t.fillStyle=v,c&&v&&t.fillRect(y+o+d,u+this.offsets[e]*n+s,h,this.fontSize/15),d=f.left,h=f.width,c=p,v=m,n=r,s=a):h+=f.kernedWidth;t.fillStyle=m,p&&m&&t.fillRect(y+o+d,u+this.offsets[e]*n+s,h,this.fontSize/15),b+=i}else b+=i;this._removeShadow(t)}},_getFontDeclaration:function(t,i){var n=t||this;return[e.isLikelyNode?n.fontWeight:n.fontStyle,e.isLikelyNode?n.fontStyle:n.fontWeight,i?this.CACHE_FONT_SIZE+"px":n.fontSize+"px",e.isLikelyNode?'"'+n.fontFamily+'"':n.fontFamily].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 i=t.split(this._reNewline),n=new Array(i.length),r=["\n"],o=[],s=0;s<i.length;s++)n[s]=e.util.string.graphemeSplit(i[s]),o=o.concat(n[s],r);return o.pop(),{_unwrappedLines:n,lines:i,graphemeText:o,graphemeLines:n}},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 i=!1;if("object"==typeof t)for(var n in t)i=i||-1!==this._dimensionAffectingProps.indexOf(n);else i=-1!==this._dimensionAffectingProps.indexOf(t);return i&&(this.initDimensions(),this.setCoords()),this},complexity:function(){return 1}}),e.Text.ATTRIBUTE_NAMES=e.SHARED_ATTRIBUTES.concat("x y dx dy font-family font-style font-weight font-size text-decoration text-anchor".split(" ")),e.Text.DEFAULT_SVG_FONT_SIZE=16,e.Text.fromElement=function(t,n,r){if(!t)return n(null);var o=e.parseAttributes(t,e.Text.ATTRIBUTE_NAMES),s=o.textAnchor||"left";if((r=e.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=e.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 c=new e.Text(l,r),u=c.getScaledHeight()/c.height,d=((c.height+c.strokeWidth)*c.lineHeight-c.height)*u,h=c.getScaledHeight()+d,f=0;"center"===s&&(f=c.getScaledWidth()/2),"right"===s&&(f=c.getScaledWidth()),c.set({left:c.left-f,top:c.top-(h-c.fontSize*(.18+c._fontSizeFraction))/c.lineHeight}),n(c)},e.Text.fromObject=function(t,i){return e.Object._fromObject("Text",t,i,"text")},e.util.createAccessors&&e.util.createAccessors(e.Text))}("undefined"!=typeof exports?exports:this),fabric.util.object.extend(fabric.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 i in e)for(var n in e[i])for(var r in e[i][n])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 i=void 0===e?this.styles:{line:this.styles[e]};for(var n in i)for(var r in i[n])if(void 0!==i[n][r][t])return!0;return!1},cleanStyle:function(t){if(!this.styles||!t||""===t)return!1;var e,i,n=this.styles,r=0,o=!0,s=0;for(var a in n){for(var l in e=0,n[a]){var c;r++,(c=n[a][l]).hasOwnProperty(t)?(i?c[t]!==i&&(o=!1):i=c[t],c[t]===this[t]&&delete c[t]):o=!1,0!==Object.keys(c).length?e++:delete n[a][l]}0===e&&delete n[a]}for(var u=0;u<this._textLines.length;u++)s+=this._textLines[u].length;o&&r===s&&(this[t]=i,this.removeStyle(t))},removeStyle:function(t){if(this.styles&&t&&""!==t){var e,i,n,r=this.styles;for(i in r){for(n in e=r[i])delete e[n][t],0===Object.keys(e[n]).length&&delete e[n];0===Object.keys(e).length&&delete r[i]}}},_extendStyles:function(t,e){var i=this.get2DCursorLocation(t);this._getLineStyle(i.lineIndex)||this._setLineStyle(i.lineIndex,{}),this._getStyleDeclaration(i.lineIndex,i.charIndex)||this._setStyleDeclaration(i.lineIndex,i.charIndex,{}),fabric.util.object.extend(this._getStyleDeclaration(i.lineIndex,i.charIndex),e)},get2DCursorLocation:function(t,e){void 0===t&&(t=this.selectionStart);for(var i=e?this._unwrappedTextLines:this._textLines,n=i.length,r=0;r<n;r++){if(t<=i[r].length)return{lineIndex:r,charIndex:t};t-=i[r].length+1}return{lineIndex:r-1,charIndex:i[r-1].length<t?i[r-1].length:t}},getSelectionStyles:function(t,e,i){void 0===t&&(t=this.selectionStart||0),void 0===e&&(e=this.selectionEnd||t);for(var n=[],r=t;r<e;r++)n.push(this.getStyleAtPosition(r,i));return n},getStyleAtPosition:function(t,e){var i=this.get2DCursorLocation(t);return(e?this.getCompleteStyleDeclaration(i.lineIndex,i.charIndex):this._getStyleDeclaration(i.lineIndex,i.charIndex))||{}},setSelectionStyles:function(t,e,i){void 0===e&&(e=this.selectionStart||0),void 0===i&&(i=this.selectionEnd||e);for(var n=e;n<i;n++)this._extendStyles(n,t);return this._forceClearCache=!0,this},_getStyleDeclaration:function(t,e){var i=this.styles&&this.styles[t];return i?i[e]:null},getCompleteStyleDeclaration:function(t,e){for(var i,n=this._getStyleDeclaration(t,e)||{},r={},o=0;o<this._styleProperties.length;o++)r[i=this._styleProperties[o]]=void 0===n[i]?this[i]:n[i];return r},_setStyleDeclaration:function(t,e,i){this.styles[t][e]=i},_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&&(-1<t.textDecoration.indexOf("underline")&&(t.underline=!0),-1<t.textDecoration.indexOf("line-through")&&(t.linethrough=!0),-1<t.textDecoration.indexOf("overline")&&(t.overline=!0),delete t.textDecoration)}fabric.IText=fabric.util.createClass(fabric.Text,fabric.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,i=this.canvas.viewportTransform;e.save(),e.transform(i[0],i[1],i[2],i[3],i[4],i[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,i=this.height+4;t.clearRect(-e/2,-i/2,e,i)},_getCursorBoundaries:function(t){void 0===t&&(t=this.selectionStart);var e=this._getLeftOffset(),i=this._getTopOffset(),n=this._getCursorBoundariesOffsets(t);return{left:e,top:i,leftOffset:n.left,topOffset:n.top}},_getCursorBoundariesOffsets:function(t){if(this.cursorOffsetCache&&"top"in this.cursorOffsetCache)return this.cursorOffsetCache;for(var e,i,n=0,r=0,o=this.get2DCursorLocation(t),s=0;s<o.lineIndex;s++)n+=this.getHeightOfLine(s);e=this._getLineLeftOffset(o.lineIndex);var a=this.__charBounds[o.lineIndex][o.charIndex];return a&&(r=a.left),0!==this.charSpacing&&0===this._textLines[0].length&&(r-=this._getWidthOfCharSpacing()),i={top:n,left:e+(0<r?r:0)},this.cursorOffsetCache=i,this.cursorOffsetCache},renderCursor:function(t,e){var i=this.get2DCursorLocation(),n=i.lineIndex,r=0<i.charIndex?i.charIndex-1:0,o=this.getValueOfPropertyAt(n,r,"fontSize"),s=this.scaleX*this.canvas.getZoom(),a=this.cursorWidth/s,l=t.topOffset,c=this.getValueOfPropertyAt(n,r,"deltaY");l+=(1-this._fontSizeFraction)*this.getHeightOfLine(n)/this.lineHeight-o*(1-this._fontSizeFraction),this.inCompositionMode&&this.renderSelection(t,e),e.fillStyle=this.getValueOfPropertyAt(n,r,"fill"),e.globalAlpha=this.__isMousedown?1:this._currentCursorOpacity,e.fillRect(t.left+t.leftOffset-a/2,l+t.top+c,a,o)},renderSelection:function(t,e){for(var i=this.inCompositionMode?this.hiddenTextarea.selectionStart:this.selectionStart,n=this.inCompositionMode?this.hiddenTextarea.selectionEnd:this.selectionEnd,r=-1!==this.textAlign.indexOf("justify"),o=this.get2DCursorLocation(i),s=this.get2DCursorLocation(n),a=o.lineIndex,l=s.lineIndex,c=o.charIndex<0?0:o.charIndex,u=s.charIndex<0?0:s.charIndex,d=a;d<=l;d++){var h,f=this._getLineLeftOffset(d)||0,p=this.getHeightOfLine(d),g=0,m=0;d===a&&(g=this.__charBounds[a][c].left),a<=d&&d<l?m=r&&!this.isEndOfWrapping(d)?this.width:this.getLineWidth(d)||5:d===l&&(m=0===u?this.__charBounds[l][u].left:this.__charBounds[l][u-1].left+this.__charBounds[l][u-1].width),h=p,(this.lineHeight<1||d===l&&1<this.lineHeight)&&(p/=this.lineHeight),this.inCompositionMode?(e.fillStyle=this.compositionColor||"black",e.fillRect(t.left+f+g,t.top+t.topOffset+p,m-g,1)):(e.fillStyle=this.selectionColor,e.fillRect(t.left+f+g,t.top+t.topOffset,m-g,p)),t.topOffset+=h}},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),e=0<t.charIndex?t.charIndex-1:0;return{l:t.lineIndex,c:e}}}),fabric.IText.fromObject=function(e,i){if(t(e),e.styles)for(var n in e.styles)for(var r in e.styles[n])t(e.styles[n][r]);fabric.Object._fromObject("IText",e,i,"text")}}(),function(){var t=fabric.util.object.clone;fabric.util.object.extend(fabric.IText.prototype,{initBehavior:function(){this.initAddedHandler(),this.initRemovedHandler(),this.initCursorSelectionHandlers(),this.initDoubleClickSimulation(),this.mouseMoveHandler=this.mouseMoveHandler.bind(this)},onDeselect:function(t){this.isEditing&&this.exitEditing(),this.selected=!1,fabric.Object.prototype.onDeselect.call(this,t)},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||[],fabric.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})}.bind(this),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,i,n){var r;return r={isAborted:!1,abort:function(){this.isAborted=!0}},t.animate("_currentCursorOpacity",e,{duration:i,onComplete:function(){r.isAborted||t[n]()},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,i=t?0:this.cursorDelay;this.abortCursorAnimation(),this._currentCursorOpacity=1,this._cursorTimeout2=setTimeout(function(){e._tick()},i)},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,i=t-1;if(this._reSpace.test(this._text[i]))for(;this._reSpace.test(this._text[i]);)e++,i--;for(;/\S/.test(this._text[i])&&-1<i;)e++,i--;return t-e},findWordBoundaryRight:function(t){var e=0,i=t;if(this._reSpace.test(this._text[i]))for(;this._reSpace.test(this._text[i]);)e++,i++;for(;/\S/.test(this._text[i])&&i<this.text.length;)e++,i++;return t+e},findLineBoundaryLeft:function(t){for(var e=0,i=t-1;!/\n/.test(this._text[i])&&-1<i;)e++,i--;return t-e},findLineBoundaryRight:function(t){for(var e=0,i=t;!/\n/.test(this._text[i])&&i<this.text.length;)e++,i++;return t+e},searchWordBoundary:function(t,e){for(var i=this._reSpace.test(this.text.charAt(t))?t-1:t,n=this.text.charAt(i),r=/[ \n\.,;!\?\-]/;!r.test(n)&&0<i&&i<this.text.length;)i+=e,n=this.text.charAt(i);return r.test(n)&&"\n"!==n&&(i+=1===e?0:1),i},selectWord:function(t){t=t||this.selectionStart;var e=this.searchWordBoundary(t,-1),i=this.searchWordBoundary(t,1);this.selectionStart=e,this.selectionEnd=i,this._fireSelectionChanged(),this._updateTextarea(),this.renderCursorOrSelection()},selectLine:function(t){t=t||this.selectionStart;var e=this.findLineBoundaryLeft(t),i=this.findLineBoundaryRight(t);return this.selectionStart=e,this.selectionEnd=i,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},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),i=this.selectionStart,n=this.selectionEnd;(e===this.__selectionStartOnMouseDown&&i!==n||i!==e&&n!==e)&&(e>this.__selectionStartOnMouseDown?(this.selectionStart=this.__selectionStartOnMouseDown,this.selectionEnd=e):(this.selectionStart=e,this.selectionEnd=this.__selectionStartOnMouseDown),this.selectionStart===i&&this.selectionEnd===n||(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,i){var n=i.slice(0,t),r=fabric.util.string.graphemeSplit(n).length;if(t===e)return{selectionStart:r,selectionEnd:r};var o=i.slice(t,e);return{selectionStart:r,selectionEnd:r+fabric.util.string.graphemeSplit(o).length}},fromGraphemeToStringSelection:function(t,e,i){var n=i.slice(0,t).join("").length;return t===e?{selectionStart:n,selectionEnd:n}:{selectionStart:n,selectionEnd:n+i.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),i=this.get2DCursorLocation(t),n=i.lineIndex,r=i.charIndex,o=this.getValueOfPropertyAt(n,r,"fontSize")*this.lineHeight,s=e.leftOffset,a=this.calcTransformMatrix(),l={x:e.left+s,y:e.top+e.topOffset+o},c=this.canvas.upperCanvasEl,u=c.width-o,d=c.height-o;return l=fabric.util.transformPoint(l,a),(l=fabric.util.transformPoint(l,this.canvas.viewportTransform)).x<0&&(l.x=0),l.x>u&&(l.x=u),l.y<0&&(l.y=0),l.y>d&&(l.y=d),l.x+=this.canvas._offset.left,l.y+=this.canvas._offset.top,{left:l.x+"px",top:l.y+"px",fontSize:o+"px",charHeight:o}},_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 i,n,r=this.get2DCursorLocation(t,!0),o=this.get2DCursorLocation(e,!0),s=r.lineIndex,a=r.charIndex,l=o.lineIndex,c=o.charIndex;if(s!==l){if(this.styles[s])for(i=a;i<this._unwrappedTextLines[s].length;i++)delete this.styles[s][i];if(this.styles[l])for(i=c;i<this._unwrappedTextLines[l].length;i++)(n=this.styles[l][i])&&(this.styles[s]||(this.styles[s]={}),this.styles[s][a+i-c]=n);for(i=s+1;i<=l;i++)delete this.styles[i];this.shiftLineStyles(l,s-l)}else if(this.styles[s]){n=this.styles[s];var u,d,h=c-a;for(i=a;i<c;i++)delete n[i];for(d in this.styles[s])c<=(u=parseInt(d,10))&&(n[u-h]=n[d],delete n[d])}},shiftLineStyles:function(e,i){var n=t(this.styles);for(var r in this.styles){var o=parseInt(r,10);e<o&&(this.styles[o+i]=n[o],n[o-i]||delete this.styles[o])}},restartCursorIfNeeded:function(){this._currentTickState&&!this._currentTickState.isAborted&&this._currentTickCompleteState&&!this._currentTickCompleteState.isAborted||this.initDelayedCursor()},insertNewlineStyleObject:function(e,i,n,r){var o,s={},a=!1;for(var l in n||(n=1),this.shiftLineStyles(e,n),this.styles[e]&&(o=this.styles[e][0===i?i:i-1]),this.styles[e]){var c=parseInt(l,10);i<=c&&(a=!0,s[c-i]=this.styles[e][l],delete this.styles[e][l])}for(a?this.styles[e+n]=s:delete this.styles[e+n];1<n;)n--,r&&r[n]?this.styles[e+n]={0:t(r[n])}:o?this.styles[e+n]={0:t(o)}:delete this.styles[e+n];this._forceClearCache=!0},insertCharStyleObject:function(e,i,n,r){this.styles||(this.styles={});var o=this.styles[e],s=o?t(o):{};for(var a in n||(n=1),s){var l=parseInt(a,10);i<=l&&(o[l+n]=s[l],s[l-n]||delete o[l])}if(this._forceClearCache=!0,r)for(;n--;)Object.keys(r[n]).length&&(this.styles[e]||(this.styles[e]={}),this.styles[e][i+n]=t(r[n]));else if(o)for(var c=o[i?i-1:1];c&&n--;)this.styles[e][i+n]=t(c)},insertNewStyleBlock:function(t,e,i){
for(var n=this.get2DCursorLocation(e,!0),r=[0],o=0,s=0;s<t.length;s++)"\n"===t[s]?r[++o]=0:r[o]++;for(0<r[0]&&(this.insertCharStyleObject(n.lineIndex,n.charIndex,r[0],i),i=i&&i.slice(r[0]+1)),o&&this.insertNewlineStyleObject(n.lineIndex,n.charIndex+r[0],o),s=1;s<o;s++)0<r[s]?this.insertCharStyleObject(n.lineIndex+s,0,r[s],i):i&&(this.styles[n.lineIndex+s][0]=i[0]),i=i&&i.slice(r[s]+1);0<r[s]&&this.insertCharStyleObject(n.lineIndex+s,0,r[s],i)},setSelectionStartEndWithShift:function(t,e,i){i<=t?(e===t?this._selectionDirection="left":"right"===this._selectionDirection&&(this._selectionDirection="left",this.selectionEnd=t),this.selectionStart=i):t<i&&i<e?"right"===this._selectionDirection?this.selectionEnd=i:this.selectionStart=i:(e===t?this._selectionDirection="right":"left"===this._selectionDirection&&(this._selectionDirection="right",this.selectionStart=e),this.selectionEnd=i)},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)}})}(),fabric.util.object.extend(fabric.IText.prototype,{initDoubleClickSimulation:function(){this.__lastClickTime=+new Date,this.__lastLastClickTime=+new Date,this.__lastPointer={},this.on("mousedown",this.onMouseDown.bind(this))},onMouseDown:function(t){if(this.canvas){this.__newClickTime=+new Date;var e=this.canvas.getPointer(t.e);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){if(this.canvas&&this.editable&&(!t.e.button||1===t.e.button)){var e=this.canvas.getPointer(t.e);this.__mousedownX=e.x,this.__mousedownY=e.y,this.__isMousedown=!0,this.selected&&this.setCursorByClick(t.e),this.isEditing&&(this.__selectionStartOnMouseDown=this.selectionStart,this.selectionStart===this.selectionEnd&&this.abortCursorAnimation(),this.renderCursorOrSelection())}},initMousedownHandler:function(){this.on("mousedown",this._mouseDownHandler)},_isObjectMoved:function(t){var e=this.canvas.getPointer(t);return this.__mousedownX!==e.x||this.__mousedownY!==e.y},initMouseupHandler:function(){this.on("mouseup",this.mouseUpHandler)},mouseUpHandler:function(t){this.__isMousedown=!1,!this.editable||this._isObjectMoved(t.e)||t.e.button&&1!==t.e.button||(this.__lastSelected&&!this.__corner&&(this.enterEditing(t.e),this.selectionStart===this.selectionEnd?this.initDelayedCursor(!0):this.renderCursorOrSelection()),this.selected=!0)},setCursorByClick:function(t){var e=this.getSelectionStartFromPointer(t),i=this.selectionStart,n=this.selectionEnd;t.shiftKey?this.setSelectionStartEndWithShift(i,n,e):(this.selectionStart=e,this.selectionEnd=e),this.isEditing&&(this._fireSelectionChanged(),this._updateTextarea())},getSelectionStartFromPointer:function(t){for(var e=this.getLocalPointer(t),i=0,n=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,0<(s=a)&&(o+=this._textLines[a-1].length+1);n=this._getLineLeftOffset(s)*this.scaleX;for(var c=0,u=this._textLines[s].length;c<u&&(i=n,(n+=this.__charBounds[s][c].kernedWidth*this.scaleX)<=e.x);c++)o++;return this._getNewSelectionStartFromOffset(e,i,n,o,u)},_getNewSelectionStartFromOffset:function(t,e,i,n,r){var o=t.x-e,s=i-t.x,a=n+(o<s||s<0?0:1);return this.flipX&&(a=r-a),a>this._text.length&&(a=this._text.length),a}}),fabric.util.object.extend(fabric.IText.prototype,{initHiddenTextarea:function(){this.hiddenTextarea=fabric.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; line-height: 1px; paddingｰtop: "+t.fontSize+";",fabric.document.body.appendChild(this.hiddenTextarea),fabric.util.addListener(this.hiddenTextarea,"keydown",this.onKeyDown.bind(this)),fabric.util.addListener(this.hiddenTextarea,"keyup",this.onKeyUp.bind(this)),fabric.util.addListener(this.hiddenTextarea,"input",this.onInput.bind(this)),fabric.util.addListener(this.hiddenTextarea,"copy",this.copy.bind(this)),fabric.util.addListener(this.hiddenTextarea,"cut",this.copy.bind(this)),fabric.util.addListener(this.hiddenTextarea,"paste",this.paste.bind(this)),fabric.util.addListener(this.hiddenTextarea,"compositionstart",this.onCompositionStart.bind(this)),fabric.util.addListener(this.hiddenTextarea,"compositionupdate",this.onCompositionUpdate.bind(this)),fabric.util.addListener(this.hiddenTextarea,"compositionend",this.onCompositionEnd.bind(this)),!this._clickHandlerInitialized&&this.canvas&&(fabric.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(),33<=t.keyCode&&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 i,n,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),c=this.selectionStart>l.selectionStart;this.selectionStart!==this.selectionEnd?(i=this._text.slice(this.selectionStart,this.selectionEnd),a+=this.selectionEnd-this.selectionStart):s<o&&(i=c?this._text.slice(this.selectionEnd+a,this.selectionEnd):this._text.slice(this.selectionStart,this.selectionStart-a)),n=r.slice(l.selectionEnd-a,l.selectionEnd),i&&i.length&&(this.selectionStart!==this.selectionEnd?this.removeStyleFromTo(this.selectionStart,this.selectionEnd):c?this.removeStyleFromTo(this.selectionEnd-i.length,this.selectionEnd):this.removeStyleFromTo(this.selectionEnd,this.selectionEnd+i.length)),n.length&&(e&&n.join("")===fabric.copiedText?this.insertNewStyleBlock(n,this.selectionStart,fabric.copiedTextStyle):this.insertNewStyleBlock(n,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&&(fabric.copiedText=this.getSelectedText(),fabric.copiedTextStyle=this.getSelectionStyles(this.selectionStart,this.selectionEnd,!0),this._copyDone=!0)},paste:function(){this.fromPaste=!0},_getClipboardData:function(t){return t&&t.clipboardData||fabric.window.clipboardData},_getWidthBeforeCursor:function(t,e){var i,n=this._getLineLeftOffset(t);return 0<e&&(n+=(i=this.__charBounds[t][e-1]).left+i.width),n},getDownCursorOffset:function(t,e){var i=this._getSelectionForOffset(t,e),n=this.get2DCursorLocation(i),r=n.lineIndex;if(r===this._textLines.length-1||t.metaKey||34===t.keyCode)return this._text.length-i;var o=n.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 i=this._getSelectionForOffset(t,e),n=this.get2DCursorLocation(i),r=n.lineIndex;if(0===r||t.metaKey||33===t.keyCode)return-i;var o=n.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 i,n,r=this._textLines[t],o=this._getLineLeftOffset(t),s=0,a=0,l=r.length;a<l;a++)if(e<(o+=i=this.__charBounds[t][a].width)){n=!0;var c=o-i,u=o,d=Math.abs(c-e);s=Math.abs(u-e)<d?a:a-1;break}return n||(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 i=this["get"+t+"CursorOffset"](e,"right"===this._selectionDirection);e.shiftKey?this.moveCursorWithShift(i):this.moveCursorWithoutShift(i),0!==i&&(this.setSelectionInBoundaries(),this.abortCursorAnimation(),this._currentCursorOpacity=1,this.initDelayedCursor(),this._fireSelectionChanged(),this._updateTextarea())},moveCursorWithShift:function(t){var e="left"===this._selectionDirection?this.selectionStart+t:this.selectionEnd+t;return this.setSelectionStartEndWithShift(this.selectionStart,this.selectionEnd,e),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,i){var n;if(t.altKey)n=this["findWordBoundary"+i](this[e]);else{if(!t.metaKey&&35!==t.keyCode&&36!==t.keyCode)return this[e]+="Left"===i?-1:1,!0;n=this["findLineBoundary"+i](this[e])}if(void 0!==typeof n&&this[e]!==n)return this[e]=n,!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 i="moveCursor"+t+"With";this._currentCursorOpacity=1,i+=e.shiftKey?"Shift":"outShift",this[i](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,i,n){void 0===n&&(n=i),i<n&&this.removeStyleFromTo(i,n);var r=fabric.util.string.graphemeSplit(t);this.insertNewStyleBlock(r,i,e),this._text=[].concat(this._text.slice(0,i),r,this._text.slice(n)),this.text=this._text.join(""),this.set("dirty",!0),this._shouldClearDimensionCache()&&(this.initDimensions(),this.setCoords()),this._removeExtraneousStyles()}}),function(){var t=fabric.util.toFixed;fabric.util.object.extend(fabric.Text.prototype,{toSVG:function(t){var e=this._createBaseSVGMarkup(),i=this._getSVGLeftTopOffsets(),n=this._getSVGTextAndBg(i.textTop,i.textLeft);return this._wrapSVGTextAndBg(e,n),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 i=this.getSvgFilter(),n=""===i?"":' style="'+i+'"',r=this.getSvgTextDecoration(this);t.push("\t<g ",this.getSvgId(),'transform="',this.getSvgTransform(),this.getSvgTransformMatrix(),'"',n,">\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 i,n=[],r=[],o=t;this._setSVGBg(r);for(var s=0,a=this._textLines.length;s<a;s++)i=this._getLineLeftOffset(s),(this.textBackgroundColor||this.styleHas("textBackgroundColor",s))&&this._setSVGTextLineBg(r,s,e+i,o),this._setSVGTextLineText(n,s,e+i,o),o+=this.getHeightOfLine(s);return{textSpans:n,textBgRects:r}},_createTextCharSpan:function(e,i,n,r){var o=this.getSvgSpanStyles(i,e!==e.trim()),s=o?'style="'+o+'"':"",a=i.deltaY,l="",c=fabric.Object.NUM_FRACTION_DIGITS;return a&&(l=' dy="'+t(a,c)+'" '),['<tspan x="',t(n,c),'" y="',t(r,c),'" ',l,s,">",fabric.util.string.escapeXml(e),"</tspan>"].join("")},_setSVGTextLineText:function(t,e,i,n){var r,o,s,a,l,c=this.getHeightOfLine(e),u=-1!==this.textAlign.indexOf("justify"),d="",h=0,f=this._textLines[e];n+=c*(1-this._fontSizeFraction)/this.lineHeight;for(var p=0,g=f.length-1;p<=g;p++)l=p===g||this.charSpacing,d+=f[p],s=this.__charBounds[e][p],0===h?(i+=s.kernedWidth-s.width,h+=s.width):h+=s.kernedWidth,u&&!l&&this._reSpaceAndTab.test(f[p])&&(l=!0),l||(r=r||this.getCompleteStyleDeclaration(e,p),o=this.getCompleteStyleDeclaration(e,p+1),l=this._hasStyleChangedForSvg(r,o)),l&&(a=this._getStyleDeclaration(e,p)||{},t.push(this._createTextCharSpan(d,a,i,n)),d="",r=o,i+=h,h=0)},_pushTextBgRect:function(e,i,n,r,o,s){var a=fabric.Object.NUM_FRACTION_DIGITS;e.push("\t\t<rect ",this._getFillAttributes(i),' x="',t(n,a),'" y="',t(r,a),'" width="',t(o,a),'" height="',t(s,a),'"></rect>\n')},_setSVGTextLineBg:function(t,e,i,n){for(var r,o,s=this._textLines[e],a=this.getHeightOfLine(e)/this.lineHeight,l=0,c=0,u=this.getValueOfPropertyAt(e,0,"textBackgroundColor"),d=0,h=s.length;d<h;d++)r=this.__charBounds[e][d],(o=this.getValueOfPropertyAt(e,d,"textBackgroundColor"))!==u?(u&&this._pushTextBgRect(t,u,i+c,n,l,a),c=r.left,l=r.width,u=o):l+=r.kernedWidth;o&&this._pushTextBgRect(t,o,i+c,n,l,a)},_getFillAttributes:function(t){var e=t&&"string"==typeof t?new fabric.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,i=0,n=0;n<t;n++)i+=this.getHeightOfLine(n);return e=this.getHeightOfLine(n),{lineTop:i,offset:(this._fontSizeMult-this._fontSizeFraction)*e/(this.lineHeight*this._fontSizeMult)}},getSvgStyles:function(t){return fabric.Object.prototype.getSvgStyles.call(this,t)+" white-space: pre;"}})}(),function(t){"use strict";var e=t.fabric||(t.fabric={});e.Textbox=e.util.createClass(e.IText,e.Observable,{type:"textbox",minWidth:20,dynamicMinWidth:2,__cachedLines:null,lockScalingFlip:!0,noScaleCache:!1,_dimensionAffectingProps:e.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,i=0,n=0,r={},o=0;o<t.graphemeLines.length;o++)"\n"===t.graphemeText[n]&&0<o?(i=0,n++,e++):this._reSpaceAndTab.test(t.graphemeText[n])&&0<o&&(i++,n++),r[o]={line:e,offset:i},n+=t.graphemeLines[o].length,i+=t.graphemeLines[o].length;return r},styleHas:function(t,i){if(this._styleMap&&!this.isWrapping){var n=this._styleMap[i];n&&(i=n.line)}return e.Text.prototype.styleHas.call(this,t,i)},isEmptyStyles:function(t){var e,i,n=0,r=!1,o=this._styleMap[t],s=this._styleMap[t+1];for(var a in o&&(t=o.line,n=o.offset),s&&(r=s.line===t,e=s.offset),i=void 0===t?this.styles:{line:this.styles[t]})for(var l in i[a])if(n<=l&&(!r||l<e))for(var c in i[a][l])return!1;return!0},_getStyleDeclaration:function(t,e){if(this._styleMap&&!this.isWrapping){var i=this._styleMap[t];if(!i)return null;t=i.line,e=i.offset+e}return this.callSuper("_getStyleDeclaration",t,e)},_setStyleDeclaration:function(t,e,i){var n=this._styleMap[t];t=n.line,e=n.offset+e,this.styles[t][e]=i},_deleteStyleDeclaration:function(t,e){var i=this._styleMap[t];t=i.line,e=i.offset+e,delete this.styles[t][e]},_getLineStyle:function(t){var e=this._styleMap[t];return this.styles[e.line]},_setLineStyle:function(t,e){var i=this._styleMap[t];this.styles[i.line]=e},_deleteLineStyle:function(t){var e=this._styleMap[t];delete this.styles[e.line]},_wrapText:function(t,e){var i,n=[];for(this.isWrapping=!0,i=0;i<t.length;i++)n=n.concat(this._wrapLine(t[i],i,e));return this.isWrapping=!1,n},_measureWord:function(t,e,i){var n,r=0;i=i||0;for(var o=0,s=t.length;o<s;o++)r+=this._getGraphemeBox(t[o],e,o+i,n,!0).kernedWidth,n=t[o];return r},_wrapLine:function(t,i,n){for(var r=0,o=[],s=[],a=t.split(this._reSpaceAndTab),l="",c=0,u=0,d=0,h=0,f=!0,p=this._getWidthOfCharSpacing(),g=0;g<a.length;g++)l=e.util.string.graphemeSplit(a[g]),u=this._measureWord(l,i,c),c+=l.length,n<=(r+=d+u-p)&&!f&&(o.push(s),s=[],r=u,f=!0),f||s.push(" "),s=s.concat(l),d=this._measureWord([" "],i,c),c++,f=!1,h<u&&(h=u);return g&&o.push(s),h>this.dynamicMinWidth&&(this.dynamicMinWidth=h-p),o},isEndOfWrapping:function(t){return!this._styleMap[t+1]||this._styleMap[t+1].line!==this._styleMap[t].line},_splitTextIntoLines:function(t){for(var i=e.Text.prototype._splitTextIntoLines.call(this,t),n=this._wrapText(i.lines,this.width),r=new Array(n.length),o=0;o<n.length;o++)r[o]=n[o].join("");return i.lines=r,i.graphemeLines=n,i},getMinWidth:function(){return Math.max(this.minWidth,this.dynamicMinWidth)},toObject:function(t){return this.callSuper("toObject",["minWidth"].concat(t))}}),e.Textbox.fromObject=function(t,i){return e.Object._fromObject("Textbox",t,i,"text")}}("undefined"!=typeof exports?exports:this),function(){var t=fabric.Canvas.prototype._setObjectScale;fabric.Canvas.prototype._setObjectScale=function(e,i,n,r,o,s,a){var l=i.target;if(!("x"===o&&l instanceof fabric.Textbox))return t.call(fabric.Canvas.prototype,e,i,n,r,o,s,a);var c=l._getTransformedDimensions().x,u=l.width*(e.x/c);return u>=l.getMinWidth()?(l.set("width",u),!0):void 0},fabric.util.object.extend(fabric.Textbox.prototype,{_removeExtraneousStyles:function(){for(var t in this._styleMap)this._textLines[t]||delete this.styles[this._styleMap[t].line]}})}(),"function"==typeof define&&define.amd&&define("fabric",[],function(){return fabric}),define("app/ajaxForm",["jquery","foundation"],function(t){var e="form[data-ajax-form]",i="input, select, button, textarea",n="button[data-loading-image][data-loading-text]",r=".form-error[data-form-error-name=general]",o=[],s=function(t,e,i){var n=t.siblings(".form-error");return 0===n.length&&(n=i.find(".form-error[data-form-error-for="+e+"]")),0===n.length&&(n=i.find(".form-error[data-form-error-name="+e+"]")),0===n.length&&(n=i.find(r)),n},a=function(t,e,i){var n=t.html();e.on("invalid.zf.abide",function(){t.html(n)});var r=t.is("[data-form-err-show-as-single-line]"),o=r?" ":"<br/>",s=i.reduce(function(t,e,i,n){return t+o+e});t.html(s)},l=function(e,i,n){var r=t("[name="+i+"]",n);if(r.length){var o=s(r,i,n);if(0!==o.length){var l=e.FormErrors[i];0!==l.length&&(a(o,r,l),"email"===i&&o.on("click","a[data-did-you-mean]",r,function(e){e.preventDefault();var i=t(this).data("did-you-mean");r.val(i)}),n.foundation("addErrorClasses",r))}}},c=function(e,i){t("[data-abide-error]",i).show();for(var n in e.FormErrors)e.FormErrors.hasOwnProperty(n)&&l(e,n,i)},u=function(t,e){var i=e.prev("div[data-server-error]");i.length&&(t&&i.find("p[data-server-error-message]").text(t),e.hide(),i.removeClass("is-hidden"))},d=function(e,i){var n=t(i),r=n.data().loadingImage,o=n.data().loadingText,s='<img src="'+r+'" alt="'+o+'"> '+o;n.data().original=n.clone(),n.removeClass("button-cta").removeClass("button-next").addClass("button-processing").html(s)},h=function(e){t("button[data-is-clicked]",e).each(d),e.addClass("is-disabled"),t(i,e).prop("disabled",!0)},f=function(e,i){var n=t(i);n.removeAttr("data-is-clicked");var r=n.data().original;r&&n.replaceWith(r)},p=function(e){t(n,e).each(f),e.removeClass("is-disabled"),t(i,e).prop("disabled",!1)},g=function(){var e=!0;return t(o).each(function(){var t=this;if(t.test()){if(!confirm(t.message))return e=!1,!1;t.callback&&t.callback()}return!0}),e},m=function(){var e=this,i=t(e);if(i.is(".is-disabled")){"Form submitted again while form is already being submitted. Form Action: "+e.target}else if(g()){var n=t(".form-error.is-visible",i);n.length&&i.foundation("removeErrorClasses",n);var r=function(t){var e=((t||{}).responseJSON||{}).ErrorEvent;e&&i.trigger(e,t),300===t.status?i.trigger("ambiguous"):400===t.status?c(t.responseJSON,i):u((t.responseJSON||{}).ServerError,i),p(i)},o=function(t){t.enableForm=function(){p(i)},i.trigger("success",t)},s={url:i.attr("data-action"),method:"POST",success:o,error:r};if(!s.url)return void u(null,i);if(e.hasOwnProperty("prepareFormData")){s.data=e.prepareFormData();var a=t("input[name=__RequestVerificationToken]");s.data.__RequestVerificationToken=a.val()}else s.data=i.serializeArray();if(i.is("[data-html-encode-input]")){var l=t("<div />");t(s.data).each(function(t,e){"__RequestVerificationToken"!==e.Name&&(e.value=l.text(e.value).html())})}h(i),t.ajax(s)}};t("body").on("click",e+" "+n,function(e){t(this).attr("data-is-clicked","clicked")}).on("submit",e,function(t){t.preventDefault()}).on("formvalid.zf.abide",e,m);var v=function(t,e,i){var n={test:t,message:e,callback:i};o.push(n)},y=function(t,e){t.attr("data-action",e),t.data().action=e};return{addConfirmation:v,setDataAction:y}}),define("app/Modal/registerCustomerAlternateInit",["jquery"],function(t){var e="registration-alternate",i="/modal/register/Customer/Alternate?subDomain="+window.location.host.split(".")[0],n="modal--split";window.dc_registerCustomerAlternateInit=function(){t(document).ready(function(){delete window.dc_registerCustomerAlternateInit,t('[data-reveal-ajax="/modal/register/Customer"]').each(function(e,r){var o=t(r);if(window.location.search.length>1){var s=o.data().success;s+=(s.indexOf("?")===-1?"?":"&")+window.location.search.slice(1),o.attr("data-success",s).data().success=s}o.attr("data-reveal-ajax",i).data().revealAjax=i,o.attr("data-reveal-classes",n).data().revealClasses=n,delete o.removeAttr("data-reveal-size").data().revealSize})})},window.location.href.indexOf("registration=alternate")>-1&&sessionStorage.setItem(e,"true"),1===window.dc_registerCustomerAlternateInitRequested&&sessionStorage.setItem(e,"true"),null!==sessionStorage.getItem(e)&&window.dc_registerCustomerAlternateInit()}),define("app/ajaxModal",["jquery","foundation","app/Modal/registerCustomerAlternateInit"],function(t){function e(e,i,n,o,s){var a=r.clone(),l=new Foundation.Reveal(a,{closeOnClick:!1});(e||[]).length&&a.attr("id",e),(i||[]).length&&a.addClass(i),(n||[]).length&&a.addClass(n);var c=t(".reveal-overlay:visible,.modal.without-overlay:visible").detach();return a.on("closed.zf.reveal",function(){o&&t("body").append(c).addClass("is-reveal-open"),a.foundation("_destroy"),a.closest(".reveal-overlay").remove(),a.remove(),s&&s()}),l.open(),a}function i(t,e){t.html(e).removeClass("modal--loading").find("[autofocus]").focus(),t.foundation(),t.trigger("modal-initialised")}function n(n,r,s,a,l,c,u,d){var h=e(s,a,l,c,d),f={successUrl:r};t.extend(f,u),t.ajax({url:n,data:f,success:function(t){i(h,t)},error:function(){h.removeClass("modal--loading").html(o)}})}var r,o;t(function(){r=t("#modalTemplate"),o=t("[data-ajax-modal-error-markup]").children()});var s=function(t,e,i){var r=t.data().revealId||"",o=t.data().revealSize||"",s=t.data().revealClasses||"",a=t.is("[data-multiple-opened]"),l=t.data().success,c=t.data().revealAjax;n(c,l,r,o,s,a,e,i)};t(function(){t("body").on("click","[data-reveal-ajax]",function(e){e.preventDefault(),s(t(this))})});var a={new:function(t){var n=e();i(n,t)},reveal:n,modalize:s};return a}),define("app/discountTimer",["jquery"],function(t){t(function(){var e=t("[data-discount-timer]");e.each(function(){var i=t(this),n=i.data("discount-timer"),r=setInterval(function(){if(n--,r&&n<0)return void clearInterval(r);var i=n%60,o=Math.floor(n%3600/60),s=Math.floor(n%216e3/3600);t("[data-hrs]",e).html(s+"h"),t("[data-mins]",e).html(o+"m"),t("[data-secs]",e).html(i+"s")},1e3)})})}),!function(t,e){"function"==typeof define&&define.amd?define("echo",[],function(){return e(t)}):"object"==typeof exports?module.exports=e:t.echo=e(t)}(this,function(t){"use strict";var e,i,n,r,o,s={},a=function(){},l=function(t){return null===t.offsetParent},c=function(t,e){if(l(t))return!1;var i=t.getBoundingClientRect();return i.right>=e.l&&i.bottom>=e.t&&i.left<=e.r&&i.top<=e.b},u=function(){(r||!i)&&(clearTimeout(i),i=setTimeout(function(){s.render(),i=null},n))};return s.init=function(i){i=i||{};var l=i.offset||0,c=i.offsetVertical||l,d=i.offsetHorizontal||l,h=function(t,e){return parseInt(t||e,10)};e={t:h(i.offsetTop,c),b:h(i.offsetBottom,c),l:h(i.offsetLeft,d),r:h(i.offsetRight,d)},n=h(i.throttle,250),r=i.debounce!==!1,o=!!i.unload,a=i.callback||a,s.render(),document.addEventListener?(t.addEventListener("scroll",u,!1),t.addEventListener("load",u,!1)):(t.attachEvent("onscroll",u),t.attachEvent("onload",u))},s.render=function(){for(var i,n,r=document.querySelectorAll("img[data-echo], [data-echo-background]"),l=r.length,u={l:0-e.l,t:0-e.t,b:(t.innerHeight||document.documentElement.clientHeight)+e.b,r:(t.innerWidth||document.documentElement.clientWidth)+e.r},d=0;l>d;d++)n=r[d],c(n,u)?(o&&n.setAttribute("data-echo-placeholder",n.src),null!==n.getAttribute("data-echo-background")?n.style.backgroundImage="url("+n.getAttribute("data-echo-background")+")":n.src=n.getAttribute("data-echo"),o||(n.removeAttribute("data-echo"),n.removeAttribute("data-echo-background")),a(n,"load")):o&&(i=n.getAttribute("data-echo-placeholder"))&&(null!==n.getAttribute("data-echo-background")?n.style.backgroundImage="url("+i+")":n.src=i,n.removeAttribute("data-echo-placeholder"),a(n,"unload"));l||s.detach()},s.detach=function(){document.removeEventListener?t.removeEventListener("scroll",u):t.detachEvent("onscroll",u),clearTimeout(i)},s}),define("app/echoInit",["jquery","echo"],function(t,e){e.init({offset:0,throttle:250,unload:!1,debounce:!1})});var _createClass=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}(),Emitter=function(){function t(){_classCallCheck(this,t)}return _createClass(t,[{key:"on",value:function(t,e){return this._callbacks=this._callbacks||{},this._callbacks[t]||(this._callbacks[t]=[]),this._callbacks[t].push(e),this}},{key:"emit",value:function(t){this._callbacks=this._callbacks||{};var e=this._callbacks[t];if(e){for(var i=arguments.length,n=Array(i>1?i-1:0),r=1;r<i;r++)n[r-1]=arguments[r];for(var o=e,s=0,o=o;;){var a;if(s>=o.length)break;a=o[s++],a.apply(this,n)}}return this}},{key:"off",value:function(t,e){if(!this._callbacks||0===arguments.length)return this._callbacks={},this;var i=this._callbacks[t];if(!i)return this;if(1===arguments.length)return delete this._callbacks[t],this;for(var n=0;n<i.length;n++)if(i[n]===e){i.splice(n,1);break}return this}}]),t}(),Dropzone=function(t){function e(t,i){_classCallCheck(this,e);var n=_possibleConstructorReturn(this,(e.__proto__||Object.getPrototypeOf(e)).call(this)),r=void 0,o=void 0;if(n.element=t,n.version=e.version,n.defaultOptions.previewTemplate=n.defaultOptions.previewTemplate.replace(/\n*/g,""),n.clickableElements=[],n.listeners=[],n.files=[],"string"==typeof n.element&&(n.element=document.querySelector(n.element)),!n.element||null==n.element.nodeType)throw new Error("Invalid dropzone element.");if(n.element.dropzone)throw new Error("Dropzone already attached.");e.instances.push(n),n.element.dropzone=n;var s=null!=(o=e.optionsForElement(n.element))?o:{};if(n.options=e.extend({},n.defaultOptions,s,null!=i?i:{}),n.options.forceFallback||!e.isBrowserSupported()){var a;return a=n.options.fallback.call(n),_possibleConstructorReturn(n,a)}if(null==n.options.url&&(n.options.url=n.element.getAttribute("action")),!n.options.url)throw new Error("No URL provided.");if(n.options.acceptedFiles&&n.options.acceptedMimeTypes)throw new Error("You can't provide both 'acceptedFiles' and 'acceptedMimeTypes'. 'acceptedMimeTypes' is deprecated.");if(n.options.uploadMultiple&&n.options.chunking)throw new Error("You cannot set both: uploadMultiple and chunking.");return n.options.acceptedMimeTypes&&(n.options.acceptedFiles=n.options.acceptedMimeTypes,delete n.options.acceptedMimeTypes),null!=n.options.renameFilename&&(n.options.renameFile=function(t){return n.options.renameFilename.call(n,t.name,t)}),n.options.method=n.options.method.toUpperCase(),(r=n.getExistingFallback())&&r.parentNode&&r.parentNode.removeChild(r),!1!==n.options.previewsContainer&&(n.options.previewsContainer?n.previewsContainer=e.getElement(n.options.previewsContainer,"previewsContainer"):n.previewsContainer=n.element),n.options.clickable&&(!0===n.options.clickable?n.clickableElements=[n.element]:n.clickableElements=e.getElements(n.options.clickable,"clickable")),n.init(),n}return _inherits(e,t),
_createClass(e,null,[{key:"initClass",value:function(){this.prototype.Emitter=Emitter,this.prototype.events=["drop","dragstart","dragend","dragenter","dragover","dragleave","addedfile","addedfiles","removedfile","thumbnail","error","errormultiple","processing","processingmultiple","uploadprogress","totaluploadprogress","sending","sendingmultiple","success","successmultiple","canceled","canceledmultiple","complete","completemultiple","reset","maxfilesexceeded","maxfilesreached","queuecomplete"],this.prototype.defaultOptions={url:null,method:"post",withCredentials:!1,timeout:3e4,parallelUploads:2,uploadMultiple:!1,chunking:!1,forceChunking:!1,chunkSize:2e6,parallelChunkUploads:!1,retryChunks:!1,retryChunksLimit:3,maxFilesize:256,paramName:"file",createImageThumbnails:!0,maxThumbnailFilesize:10,thumbnailWidth:120,thumbnailHeight:120,thumbnailMethod:"crop",resizeWidth:null,resizeHeight:null,resizeMimeType:null,resizeQuality:.8,resizeMethod:"contain",filesizeBase:1e3,maxFiles:null,headers:null,clickable:!0,ignoreHiddenFiles:!0,acceptedFiles:null,acceptedMimeTypes:null,autoProcessQueue:!0,autoQueue:!0,addRemoveLinks:!1,previewsContainer:null,hiddenInputContainer:"body",capture:null,renameFilename:null,renameFile:null,forceFallback:!1,dictDefaultMessage:"Drop files here to upload",dictFallbackMessage:"Your browser does not support drag'n'drop file uploads.",dictFallbackText:"Please use the fallback form below to upload your files like in the olden days.",dictFileTooBig:"File is too big ({{filesize}}MiB). Max filesize: {{maxFilesize}}MiB.",dictInvalidFileType:"You can't upload files of this type.",dictResponseError:"Server responded with {{statusCode}} code.",dictCancelUpload:"Cancel upload",dictCancelUploadConfirmation:"Are you sure you want to cancel this upload?",dictRemoveFile:"Remove file",dictRemoveFileConfirmation:null,dictMaxFilesExceeded:"You can not upload any more files.",dictFileSizeUnits:{tb:"TB",gb:"GB",mb:"MB",kb:"KB",b:"b"},init:function(){},params:function(t,e,i){if(i)return{dzuuid:i.file.upload.uuid,dzchunkindex:i.index,dztotalfilesize:i.file.size,dzchunksize:this.options.chunkSize,dztotalchunkcount:i.file.upload.totalChunkCount,dzchunkbyteoffset:i.index*this.options.chunkSize}},accept:function(t,e){return e()},chunksUploaded:function(t,e){e()},fallback:function(){var t=void 0;this.element.className=this.element.className+" dz-browser-not-supported";for(var i=this.element.getElementsByTagName("div"),n=0,i=i;;){var r;if(n>=i.length)break;r=i[n++];var o=r;if(/(^| )dz-message($| )/.test(o.className)){t=o,o.className="dz-message";break}}t||(t=e.createElement('<div class="dz-message"><span></span></div>'),this.element.appendChild(t));var s=t.getElementsByTagName("span")[0];return s&&(null!=s.textContent?s.textContent=this.options.dictFallbackMessage:null!=s.innerText&&(s.innerText=this.options.dictFallbackMessage)),this.element.appendChild(this.getFallbackForm())},resize:function(t,e,i,n){var r={srcX:0,srcY:0,srcWidth:t.width,srcHeight:t.height},o=t.width/t.height;null==e&&null==i?(e=r.srcWidth,i=r.srcHeight):null==e?e=i*o:null==i&&(i=e/o),e=Math.min(e,r.srcWidth),i=Math.min(i,r.srcHeight);var s=e/i;if(r.srcWidth>e||r.srcHeight>i)if("crop"===n)o>s?(r.srcHeight=t.height,r.srcWidth=r.srcHeight*s):(r.srcWidth=t.width,r.srcHeight=r.srcWidth/s);else{if("contain"!==n)throw new Error("Unknown resizeMethod '"+n+"'");o>s?i=e/o:e=i*o}return r.srcX=(t.width-r.srcWidth)/2,r.srcY=(t.height-r.srcHeight)/2,r.trgWidth=e,r.trgHeight=i,r},transformFile:function(t,e){return(this.options.resizeWidth||this.options.resizeHeight)&&t.type.match(/image.*/)?this.resizeImage(t,this.options.resizeWidth,this.options.resizeHeight,this.options.resizeMethod,e):e(t)},previewTemplate:'<div class="dz-preview dz-file-preview">\n  <div class="dz-image"><img data-dz-thumbnail /></div>\n  <div class="dz-details">\n    <div class="dz-size"><span data-dz-size></span></div>\n    <div class="dz-filename"><span data-dz-name></span></div>\n  </div>\n  <div class="dz-progress"><span class="dz-upload" data-dz-uploadprogress></span></div>\n  <div class="dz-error-message"><span data-dz-errormessage></span></div>\n  <div class="dz-success-mark">\n    <svg width="54px" height="54px" viewBox="0 0 54 54" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">\n      <title>Check</title>\n      <defs></defs>\n      <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">\n        <path d="M23.5,31.8431458 L17.5852419,25.9283877 C16.0248253,24.3679711 13.4910294,24.366835 11.9289322,25.9289322 C10.3700136,27.4878508 10.3665912,30.0234455 11.9283877,31.5852419 L20.4147581,40.0716123 C20.5133999,40.1702541 20.6159315,40.2626649 20.7218615,40.3488435 C22.2835669,41.8725651 24.794234,41.8626202 26.3461564,40.3106978 L43.3106978,23.3461564 C44.8771021,21.7797521 44.8758057,19.2483887 43.3137085,17.6862915 C41.7547899,16.1273729 39.2176035,16.1255422 37.6538436,17.6893022 L23.5,31.8431458 Z M27,53 C41.3594035,53 53,41.3594035 53,27 C53,12.6405965 41.3594035,1 27,1 C12.6405965,1 1,12.6405965 1,27 C1,41.3594035 12.6405965,53 27,53 Z" id="Oval-2" stroke-opacity="0.198794158" stroke="#747474" fill-opacity="0.816519475" fill="#FFFFFF" sketch:type="MSShapeGroup"></path>\n      </g>\n    </svg>\n  </div>\n  <div class="dz-error-mark">\n    <svg width="54px" height="54px" viewBox="0 0 54 54" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">\n      <title>Error</title>\n      <defs></defs>\n      <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">\n        <g id="Check-+-Oval-2" sketch:type="MSLayerGroup" stroke="#747474" stroke-opacity="0.198794158" fill="#FFFFFF" fill-opacity="0.816519475">\n          <path d="M32.6568542,29 L38.3106978,23.3461564 C39.8771021,21.7797521 39.8758057,19.2483887 38.3137085,17.6862915 C36.7547899,16.1273729 34.2176035,16.1255422 32.6538436,17.6893022 L27,23.3431458 L21.3461564,17.6893022 C19.7823965,16.1255422 17.2452101,16.1273729 15.6862915,17.6862915 C14.1241943,19.2483887 14.1228979,21.7797521 15.6893022,23.3461564 L21.3431458,29 L15.6893022,34.6538436 C14.1228979,36.2202479 14.1241943,38.7516113 15.6862915,40.3137085 C17.2452101,41.8726271 19.7823965,41.8744578 21.3461564,40.3106978 L27,34.6568542 L32.6538436,40.3106978 C34.2176035,41.8744578 36.7547899,41.8726271 38.3137085,40.3137085 C39.8758057,38.7516113 39.8771021,36.2202479 38.3106978,34.6538436 L32.6568542,29 Z M27,53 C41.3594035,53 53,41.3594035 53,27 C53,12.6405965 41.3594035,1 27,1 C12.6405965,1 1,12.6405965 1,27 C1,41.3594035 12.6405965,53 27,53 Z" id="Oval-2" sketch:type="MSShapeGroup"></path>\n        </g>\n      </g>\n    </svg>\n  </div>\n</div>',drop:function(t){return this.element.classList.remove("dz-drag-hover")},dragstart:function(t){},dragend:function(t){return this.element.classList.remove("dz-drag-hover")},dragenter:function(t){return this.element.classList.add("dz-drag-hover")},dragover:function(t){return this.element.classList.add("dz-drag-hover")},dragleave:function(t){return this.element.classList.remove("dz-drag-hover")},paste:function(t){},reset:function(){return this.element.classList.remove("dz-started")},addedfile:function(t){var i=this;if(this.element===this.previewsContainer&&this.element.classList.add("dz-started"),this.previewsContainer){t.previewElement=e.createElement(this.options.previewTemplate.trim()),t.previewTemplate=t.previewElement,this.previewsContainer.appendChild(t.previewElement);for(var n=t.previewElement.querySelectorAll("[data-dz-name]"),r=0,n=n;;){var o;if(r>=n.length)break;o=n[r++];var s=o;s.textContent=t.name}for(var a=t.previewElement.querySelectorAll("[data-dz-size]"),l=0,a=a;!(l>=a.length);)s=a[l++],s.innerHTML=this.filesize(t.size);this.options.addRemoveLinks&&(t._removeLink=e.createElement('<a class="dz-remove" href="javascript:undefined;" data-dz-remove>'+this.options.dictRemoveFile+"</a>"),t.previewElement.appendChild(t._removeLink));for(var c=function(n){return n.preventDefault(),n.stopPropagation(),t.status===e.UPLOADING?e.confirm(i.options.dictCancelUploadConfirmation,function(){return i.removeFile(t)}):i.options.dictRemoveFileConfirmation?e.confirm(i.options.dictRemoveFileConfirmation,function(){return i.removeFile(t)}):i.removeFile(t)},u=t.previewElement.querySelectorAll("[data-dz-remove]"),d=0,u=u;;){var h;if(d>=u.length)break;h=u[d++],h.addEventListener("click",c)}}},removedfile:function(t){return null!=t.previewElement&&null!=t.previewElement.parentNode&&t.previewElement.parentNode.removeChild(t.previewElement),this._updateMaxFilesReachedClass()},thumbnail:function(t,e){if(t.previewElement){t.previewElement.classList.remove("dz-file-preview");for(var i=t.previewElement.querySelectorAll("[data-dz-thumbnail]"),n=0,i=i;;){var r;if(n>=i.length)break;r=i[n++];var o=r;o.alt=t.name,o.src=e}return setTimeout(function(){return t.previewElement.classList.add("dz-image-preview")},1)}},error:function(t,e){if(t.previewElement){t.previewElement.classList.add("dz-error"),"String"!=typeof e&&e.error&&(e=e.error);for(var i=t.previewElement.querySelectorAll("[data-dz-errormessage]"),n=0,i=i;;){var r;if(n>=i.length)break;r=i[n++],r.textContent=e}}},errormultiple:function(){},processing:function(t){if(t.previewElement&&(t.previewElement.classList.add("dz-processing"),t._removeLink))return t._removeLink.textContent=this.options.dictCancelUpload},processingmultiple:function(){},uploadprogress:function(t,e,i){if(t.previewElement)for(var n=t.previewElement.querySelectorAll("[data-dz-uploadprogress]"),r=0,n=n;;){var o;if(r>=n.length)break;o=n[r++];var s=o;"PROGRESS"===s.nodeName?s.value=e:s.style.width=e+"%"}},totaluploadprogress:function(){},sending:function(){},sendingmultiple:function(){},success:function(t){if(t.previewElement)return t.previewElement.classList.add("dz-success")},successmultiple:function(){},canceled:function(t){return this.emit("error",t,"Upload canceled.")},canceledmultiple:function(){},complete:function(t){if(t._removeLink&&(t._removeLink.textContent=this.options.dictRemoveFile),t.previewElement)return t.previewElement.classList.add("dz-complete")},completemultiple:function(){},maxfilesexceeded:function(){},maxfilesreached:function(){},queuecomplete:function(){},addedfiles:function(){}},this.prototype._thumbnailQueue=[],this.prototype._processingThumbnail=!1}},{key:"extend",value:function(t){for(var e=arguments.length,i=Array(e>1?e-1:0),n=1;n<e;n++)i[n-1]=arguments[n];for(var r=i,o=0,r=r;;){var s;if(o>=r.length)break;s=r[o++];var a=s;for(var l in a){var c=a[l];t[l]=c}}return t}}]),_createClass(e,[{key:"getAcceptedFiles",value:function(){return this.files.filter(function(t){return t.accepted}).map(function(t){return t})}},{key:"getRejectedFiles",value:function(){return this.files.filter(function(t){return!t.accepted}).map(function(t){return t})}},{key:"getFilesWithStatus",value:function(t){return this.files.filter(function(e){return e.status===t}).map(function(t){return t})}},{key:"getQueuedFiles",value:function(){return this.getFilesWithStatus(e.QUEUED)}},{key:"getUploadingFiles",value:function(){return this.getFilesWithStatus(e.UPLOADING)}},{key:"getAddedFiles",value:function(){return this.getFilesWithStatus(e.ADDED)}},{key:"getActiveFiles",value:function(){return this.files.filter(function(t){return t.status===e.UPLOADING||t.status===e.QUEUED}).map(function(t){return t})}},{key:"init",value:function(){var t=this;"form"===this.element.tagName&&this.element.setAttribute("enctype","multipart/form-data"),this.element.classList.contains("dropzone")&&!this.element.querySelector(".dz-message")&&this.element.appendChild(e.createElement('<div class="dz-default dz-message"><span>'+this.options.dictDefaultMessage+"</span></div>")),this.clickableElements.length&&!function e(){return t.hiddenFileInput&&t.hiddenFileInput.parentNode.removeChild(t.hiddenFileInput),t.hiddenFileInput=document.createElement("input"),t.hiddenFileInput.setAttribute("type","file"),(null===t.options.maxFiles||t.options.maxFiles>1)&&t.hiddenFileInput.setAttribute("multiple","multiple"),t.hiddenFileInput.className="dz-hidden-input",null!==t.options.acceptedFiles&&t.hiddenFileInput.setAttribute("accept",t.options.acceptedFiles),null!==t.options.capture&&t.hiddenFileInput.setAttribute("capture",t.options.capture),t.hiddenFileInput.style.visibility="hidden",t.hiddenFileInput.style.position="absolute",t.hiddenFileInput.style.top="0",t.hiddenFileInput.style.left="0",t.hiddenFileInput.style.height="0",t.hiddenFileInput.style.width="0",document.querySelector(t.options.hiddenInputContainer).appendChild(t.hiddenFileInput),t.hiddenFileInput.addEventListener("change",function(){var i=t.hiddenFileInput.files;if(i.length)for(var n=i,r=0,n=n;;){var o;if(r>=n.length)break;o=n[r++];var s=o;t.addFile(s)}return t.emit("addedfiles",i),e()})}(),this.URL=null!==window.URL?window.URL:window.webkitURL;for(var i=this.events,n=0,i=i;;){var r;if(n>=i.length)break;r=i[n++];var o=r;this.on(o,this.options[o])}this.on("uploadprogress",function(){return t.updateTotalUploadProgress()}),this.on("removedfile",function(){return t.updateTotalUploadProgress()}),this.on("canceled",function(e){return t.emit("complete",e)}),this.on("complete",function(e){if(0===t.getAddedFiles().length&&0===t.getUploadingFiles().length&&0===t.getQueuedFiles().length)return setTimeout(function(){return t.emit("queuecomplete")},0)});var s=function(t){return t.stopPropagation(),t.preventDefault?t.preventDefault():t.returnValue=!1};return this.listeners=[{element:this.element,events:{dragstart:function(e){return t.emit("dragstart",e)},dragenter:function(e){return s(e),t.emit("dragenter",e)},dragover:function(e){var i=void 0;try{i=e.dataTransfer.effectAllowed}catch(t){}return e.dataTransfer.dropEffect="move"===i||"linkMove"===i?"move":"copy",s(e),t.emit("dragover",e)},dragleave:function(e){return t.emit("dragleave",e)},drop:function(e){return s(e),t.drop(e)},dragend:function(e){return t.emit("dragend",e)}}}],this.clickableElements.forEach(function(i){return t.listeners.push({element:i,events:{click:function(n){return(i!==t.element||n.target===t.element||e.elementInside(n.target,t.element.querySelector(".dz-message")))&&t.hiddenFileInput.click(),!0}}})}),this.enable(),this.options.init.call(this)}},{key:"destroy",value:function(){return this.disable(),this.removeAllFiles(!0),(null!=this.hiddenFileInput?this.hiddenFileInput.parentNode:void 0)&&(this.hiddenFileInput.parentNode.removeChild(this.hiddenFileInput),this.hiddenFileInput=null),delete this.element.dropzone,e.instances.splice(e.instances.indexOf(this),1)}},{key:"updateTotalUploadProgress",value:function(){var t=void 0,e=0,i=0;if(this.getActiveFiles().length){for(var n=this.getActiveFiles(),r=0,n=n;;){var o;if(r>=n.length)break;o=n[r++];var s=o;e+=s.upload.bytesSent,i+=s.upload.total}t=100*e/i}else t=100;return this.emit("totaluploadprogress",t,i,e)}},{key:"_getParamName",value:function(t){return"function"==typeof this.options.paramName?this.options.paramName(t):this.options.paramName+(this.options.uploadMultiple?"["+t+"]":"")}},{key:"_renameFile",value:function(t){return"function"!=typeof this.options.renameFile?t.name:this.options.renameFile(t)}},{key:"getFallbackForm",value:function(){var t=void 0,i=void 0;if(t=this.getExistingFallback())return t;var n='<div class="dz-fallback">';this.options.dictFallbackText&&(n+="<p>"+this.options.dictFallbackText+"</p>"),n+='<input type="file" name="'+this._getParamName(0)+'" '+(this.options.uploadMultiple?'multiple="multiple"':void 0)+' /><input type="submit" value="Upload!"></div>';var r=e.createElement(n);return"FORM"!==this.element.tagName?(i=e.createElement('<form action="'+this.options.url+'" enctype="multipart/form-data" method="'+this.options.method+'"></form>'),i.appendChild(r)):(this.element.setAttribute("enctype","multipart/form-data"),this.element.setAttribute("method",this.options.method)),null!=i?i:r}},{key:"getExistingFallback",value:function(){for(var t=["div","form"],e=0;e<t.length;e++){var i,n=t[e];if(i=function(t){for(var e=t,i=0,e=e;;){var n;if(i>=e.length)break;n=e[i++];var r=n;if(/(^| )fallback($| )/.test(r.className))return r}}(this.element.getElementsByTagName(n)))return i}}},{key:"setupEventListeners",value:function(){return this.listeners.map(function(t){return function(){var e=[];for(var i in t.events){var n=t.events[i];e.push(t.element.addEventListener(i,n,!1))}return e}()})}},{key:"removeEventListeners",value:function(){return this.listeners.map(function(t){return function(){var e=[];for(var i in t.events){var n=t.events[i];e.push(t.element.removeEventListener(i,n,!1))}return e}()})}},{key:"disable",value:function(){var t=this;return this.clickableElements.forEach(function(t){return t.classList.remove("dz-clickable")}),this.removeEventListeners(),this.files.map(function(e){return t.cancelUpload(e)})}},{key:"enable",value:function(){return this.clickableElements.forEach(function(t){return t.classList.add("dz-clickable")}),this.setupEventListeners()}},{key:"filesize",value:function(t){var e=0,i="b";if(t>0){for(var n=["tb","gb","mb","kb","b"],r=0;r<n.length;r++){var o=n[r];if(t>=Math.pow(this.options.filesizeBase,4-r)/10){e=t/Math.pow(this.options.filesizeBase,4-r),i=o;break}}e=Math.round(10*e)/10}return"<strong>"+e+"</strong> "+this.options.dictFileSizeUnits[i]}},{key:"_updateMaxFilesReachedClass",value:function(){return null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(this.getAcceptedFiles().length===this.options.maxFiles&&this.emit("maxfilesreached",this.files),this.element.classList.add("dz-max-files-reached")):this.element.classList.remove("dz-max-files-reached")}},{key:"drop",value:function(t){if(t.dataTransfer){this.emit("drop",t);var e=t.dataTransfer.files;if(this.emit("addedfiles",e),e.length){var i=t.dataTransfer.items;i&&i.length&&null!=i[0].webkitGetAsEntry?this._addFilesFromItems(i):this.handleFiles(e)}}}},{key:"paste",value:function(t){if(null!=__guard__(null!=t?t.clipboardData:void 0,function(t){return t.items})){this.emit("paste",t);var e=t.clipboardData.items;return e.length?this._addFilesFromItems(e):void 0}}},{key:"handleFiles",value:function(t){var e=this;return t.map(function(t){return e.addFile(t)})}},{key:"_addFilesFromItems",value:function(t){var e=this;return function(){for(var i=[],n=t,r=0,n=n;;){var o;if(r>=n.length)break;o=n[r++];var s,a=o;null!=a.webkitGetAsEntry&&(s=a.webkitGetAsEntry())?s.isFile?i.push(e.addFile(a.getAsFile())):s.isDirectory?i.push(e._addFilesFromDirectory(s,s.name)):i.push(void 0):null==a.getAsFile||null!=a.kind&&"file"!==a.kind?i.push(void 0):i.push(e.addFile(a.getAsFile()))}return i}()}},{key:"_addFilesFromDirectory",value:function(t,e){var i=this,n=t.createReader(),r=function(t){return __guardMethod__(console,"log",function(e){return e.log(t)})};return function t(){return n.readEntries(function(n){if(n.length>0){for(var r=n,o=0,r=r;;){var s;if(o>=r.length)break;s=r[o++];var a=s;a.isFile?a.file(function(t){if(!i.options.ignoreHiddenFiles||"."!==t.name.substring(0,1))return t.fullPath=e+"/"+t.name,i.addFile(t)}):a.isDirectory&&i._addFilesFromDirectory(a,e+"/"+a.name)}t()}return null},r)}()}},{key:"accept",value:function(t,i){return t.size>1024*this.options.maxFilesize*1024?i(this.options.dictFileTooBig.replace("{{filesize}}",Math.round(t.size/1024/10.24)/100).replace("{{maxFilesize}}",this.options.maxFilesize)):e.isValidFile(t,this.options.acceptedFiles)?null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(i(this.options.dictMaxFilesExceeded.replace("{{maxFiles}}",this.options.maxFiles)),this.emit("maxfilesexceeded",t)):this.options.accept.call(this,t,i):i(this.options.dictInvalidFileType)}},{key:"addFile",value:function(t){var i=this;return t.upload={uuid:e.uuidv4(),progress:0,total:t.size,bytesSent:0,filename:this._renameFile(t),chunked:this.options.chunking&&(this.options.forceChunking||t.size>this.options.chunkSize),totalChunkCount:Math.ceil(t.size/this.options.chunkSize)},this.files.push(t),t.status=e.ADDED,this.emit("addedfile",t),this._enqueueThumbnail(t),this.accept(t,function(e){return e?(t.accepted=!1,i._errorProcessing([t],e)):(t.accepted=!0,i.options.autoQueue&&i.enqueueFile(t)),i._updateMaxFilesReachedClass()})}},{key:"enqueueFiles",value:function(t){for(var e=t,i=0,e=e;;){var n;if(i>=e.length)break;n=e[i++];var r=n;this.enqueueFile(r)}return null}},{key:"enqueueFile",value:function(t){var i=this;if(t.status!==e.ADDED||!0!==t.accepted)throw new Error("This file can't be queued because it has already been processed or was rejected.");if(t.status=e.QUEUED,this.options.autoProcessQueue)return setTimeout(function(){return i.processQueue()},0)}},{key:"_enqueueThumbnail",value:function(t){var e=this;if(this.options.createImageThumbnails&&t.type.match(/image.*/)&&t.size<=1024*this.options.maxThumbnailFilesize*1024)return this._thumbnailQueue.push(t),setTimeout(function(){return e._processThumbnailQueue()},0)}},{key:"_processThumbnailQueue",value:function(){var t=this;if(!this._processingThumbnail&&0!==this._thumbnailQueue.length){this._processingThumbnail=!0;var e=this._thumbnailQueue.shift();return this.createThumbnail(e,this.options.thumbnailWidth,this.options.thumbnailHeight,this.options.thumbnailMethod,!0,function(i){return t.emit("thumbnail",e,i),t._processingThumbnail=!1,t._processThumbnailQueue()})}}},{key:"removeFile",value:function(t){if(t.status===e.UPLOADING&&this.cancelUpload(t),this.files=without(this.files,t),this.emit("removedfile",t),0===this.files.length)return this.emit("reset")}},{key:"removeAllFiles",value:function(t){null==t&&(t=!1);for(var i=this.files.slice(),n=0,i=i;;){var r;if(n>=i.length)break;r=i[n++];var o=r;(o.status!==e.UPLOADING||t)&&this.removeFile(o)}return null}},{key:"resizeImage",value:function(t,i,n,r,o){var s=this;return this.createThumbnail(t,i,n,r,!1,function(i,n){if(null===n)return o(t);var r=s.options.resizeMimeType;null==r&&(r=t.type);var a=n.toDataURL(r,s.options.resizeQuality);return"image/jpeg"!==r&&"image/jpg"!==r||(a=ExifRestore.restore(t.dataURL,a)),o(e.dataURItoBlob(a))})}},{key:"createThumbnail",value:function(t,e,i,n,r,o){var s=this,a=new FileReader;return a.onload=function(){return t.dataURL=a.result,"image/svg+xml"===t.type?void(null!=o&&o(a.result)):s.createThumbnailFromUrl(t,e,i,n,r,o)},a.readAsDataURL(t)}},{key:"createThumbnailFromUrl",value:function(t,e,i,n,r,o,s){var a=this,l=document.createElement("img");return s&&(l.crossOrigin=s),l.onload=function(){var s=function(t){return t(1)};return"undefined"!=typeof EXIF&&null!==EXIF&&r&&(s=function(t){return EXIF.getData(l,function(){return t(EXIF.getTag(this,"Orientation"))})}),s(function(r){t.width=l.width,t.height=l.height;var s=a.options.resize.call(a,t,e,i,n),c=document.createElement("canvas"),u=c.getContext("2d");switch(c.width=s.trgWidth,c.height=s.trgHeight,r>4&&(c.width=s.trgHeight,c.height=s.trgWidth),r){case 2:u.translate(c.width,0),u.scale(-1,1);break;case 3:u.translate(c.width,c.height),u.rotate(Math.PI);break;case 4:u.translate(0,c.height),u.scale(1,-1);break;case 5:u.rotate(.5*Math.PI),u.scale(1,-1);break;case 6:u.rotate(.5*Math.PI),u.translate(0,-c.height);break;case 7:u.rotate(.5*Math.PI),u.translate(c.width,-c.height),u.scale(-1,1);break;case 8:u.rotate(-.5*Math.PI),u.translate(-c.width,0)}drawImageIOSFix(u,l,null!=s.srcX?s.srcX:0,null!=s.srcY?s.srcY:0,s.srcWidth,s.srcHeight,null!=s.trgX?s.trgX:0,null!=s.trgY?s.trgY:0,s.trgWidth,s.trgHeight);var d=c.toDataURL("image/png");if(null!=o)return o(d,c)})},null!=o&&(l.onerror=o),l.src=t.dataURL}},{key:"processQueue",value:function(){var t=this.options.parallelUploads,e=this.getUploadingFiles().length,i=e;if(!(e>=t)){var n=this.getQueuedFiles();if(n.length>0){if(this.options.uploadMultiple)return this.processFiles(n.slice(0,t-e));for(;i<t;){if(!n.length)return;this.processFile(n.shift()),i++}}}}},{key:"processFile",value:function(t){return this.processFiles([t])}},{key:"processFiles",value:function(t){for(var i=t,n=0,i=i;;){var r;if(n>=i.length)break;r=i[n++];var o=r;o.processing=!0,o.status=e.UPLOADING,this.emit("processing",o)}return this.options.uploadMultiple&&this.emit("processingmultiple",t),this.uploadFiles(t)}},{key:"_getFilesWithXhr",value:function(t){return this.files.filter(function(e){return e.xhr===t}).map(function(t){return t})}},{key:"cancelUpload",value:function(t){if(t.status===e.UPLOADING){for(var i=this._getFilesWithXhr(t.xhr),n=i,r=0,n=n;;){var o;if(r>=n.length)break;o=n[r++],o.status=e.CANCELED}void 0!==t.xhr&&t.xhr.abort();for(var s=i,a=0,s=s;;){var l;if(a>=s.length)break;l=s[a++];var c=l;this.emit("canceled",c)}this.options.uploadMultiple&&this.emit("canceledmultiple",i)}else t.status!==e.ADDED&&t.status!==e.QUEUED||(t.status=e.CANCELED,this.emit("canceled",t),this.options.uploadMultiple&&this.emit("canceledmultiple",[t]));if(this.options.autoProcessQueue)return this.processQueue()}},{key:"resolveOption",value:function(t){if("function"==typeof t){for(var e=arguments.length,i=Array(e>1?e-1:0),n=1;n<e;n++)i[n-1]=arguments[n];return t.apply(this,i)}return t}},{key:"uploadFile",value:function(t){return this.uploadFiles([t])}},{key:"uploadFiles",value:function(t){var i=this;this._transformFiles(t,function(n){if(t[0].upload.chunked){var r=t[0],o=n[0],s=0;r.upload.chunks=[];var a=function(){for(var n=0;void 0!==r.upload.chunks[n];)n++;if(!(n>=r.upload.totalChunkCount)){s++;var a=n*i.options.chunkSize,l=Math.min(a+i.options.chunkSize,r.size),c={name:i._getParamName(0),data:o.webkitSlice?o.webkitSlice(a,l):o.slice(a,l),filename:r.upload.filename,chunkIndex:n};r.upload.chunks[n]={file:r,index:n,dataBlock:c,status:e.UPLOADING,progress:0,retries:0},i._uploadData(t,[c])}};if(r.upload.finishedChunkUpload=function(n){var o=!0;n.status=e.SUCCESS,n.dataBlock=null;for(var s=0;s<r.upload.totalChunkCount;s++){if(void 0===r.upload.chunks[s])return a();r.upload.chunks[s].status!==e.SUCCESS&&(o=!1)}o&&i.options.chunksUploaded(r,function(){i._finished(t,"",null)})},i.options.parallelChunkUploads)for(var l=0;l<r.upload.totalChunkCount;l++)a();else a()}else{for(var c=[],u=0;u<t.length;u++)c[u]={name:i._getParamName(u),data:n[u],filename:t[u].upload.filename};i._uploadData(t,c)}})}},{key:"_getChunk",value:function(t,e){for(var i=0;i<t.upload.totalChunkCount;i++)if(void 0!==t.upload.chunks[i]&&t.upload.chunks[i].xhr===e)return t.upload.chunks[i]}},{key:"_uploadData",value:function(t,i){for(var n=this,r=new XMLHttpRequest,o=t,s=0,o=o;;){var a;if(s>=o.length)break;a=o[s++],a.xhr=r}t[0].upload.chunked&&(t[0].upload.chunks[i[0].chunkIndex].xhr=r);var l=this.resolveOption(this.options.method,t),c=this.resolveOption(this.options.url,t);r.open(l,c,!0),r.timeout=this.resolveOption(this.options.timeout,t),r.withCredentials=!!this.options.withCredentials,r.onload=function(e){n._finishedUploading(t,r,e)},r.onerror=function(){n._handleUploadError(t,r)},(null!=r.upload?r.upload:r).onprogress=function(e){return n._updateFilesUploadProgress(t,r,e)};var u={Accept:"application/json","Cache-Control":"no-cache","X-Requested-With":"XMLHttpRequest"};this.options.headers&&e.extend(u,this.options.headers);for(var d in u){var h=u[d];h&&r.setRequestHeader(d,h)}var f=new FormData;if(this.options.params){var p=this.options.params;"function"==typeof p&&(p=p.call(this,t,r,t[0].upload.chunked?this._getChunk(t[0],r):null));for(var g in p){var m=p[g];f.append(g,m)}}for(var v=t,y=0,v=v;;){var b;if(y>=v.length)break;b=v[y++];var w=b;this.emit("sending",w,r,f)}this.options.uploadMultiple&&this.emit("sendingmultiple",t,r,f),this._addFormElementData(f);for(var x=0;x<i.length;x++){var _=i[x];f.append(_.name,_.data,_.filename)}this.submitRequest(r,f,t)}},{key:"_transformFiles",value:function(t,e){for(var i=this,n=[],r=0,o=0;o<t.length;o++)!function(o){i.options.transformFile.call(i,t[o],function(i){n[o]=i,++r===t.length&&e(n)})}(o)}},{key:"_addFormElementData",value:function(t){if("FORM"===this.element.tagName)for(var e=this.element.querySelectorAll("input, textarea, select, button"),i=0,e=e;;){var n;if(i>=e.length)break;n=e[i++];var r=n,o=r.getAttribute("name"),s=r.getAttribute("type");if(s&&(s=s.toLowerCase()),void 0!==o&&null!==o)if("SELECT"===r.tagName&&r.hasAttribute("multiple"))for(var a=r.options,l=0,a=a;;){var c;if(l>=a.length)break;c=a[l++];var u=c;u.selected&&t.append(o,u.value)}else(!s||"checkbox"!==s&&"radio"!==s||r.checked)&&t.append(o,r.value)}}},{key:"_updateFilesUploadProgress",value:function(t,e,i){var n=void 0;if(void 0!==i){if(n=100*i.loaded/i.total,t[0].upload.chunked){var r=t[0],o=this._getChunk(r,e);o.progress=n,o.total=i.total,o.bytesSent=i.loaded,r.upload.progress=0,r.upload.total=0,r.upload.bytesSent=0;for(var s=0;s<r.upload.totalChunkCount;s++)void 0!==r.upload.chunks[s]&&void 0!==r.upload.chunks[s].progress&&(r.upload.progress+=r.upload.chunks[s].progress,r.upload.total+=r.upload.chunks[s].total,r.upload.bytesSent+=r.upload.chunks[s].bytesSent);r.upload.progress=r.upload.progress/r.upload.totalChunkCount}else for(var a=t,l=0,a=a;;){var c;if(l>=a.length)break;c=a[l++];var u=c;u.upload.progress=n,u.upload.total=i.total,u.upload.bytesSent=i.loaded}for(var d=t,h=0,d=d;;){var f;if(h>=d.length)break;f=d[h++];var p=f;this.emit("uploadprogress",p,p.upload.progress,p.upload.bytesSent)}}else{var g=!0;n=100;for(var m=t,v=0,m=m;;){var y;if(v>=m.length)break;y=m[v++];var b=y;100===b.upload.progress&&b.upload.bytesSent===b.upload.total||(g=!1),b.upload.progress=n,b.upload.bytesSent=b.upload.total}if(g)return;for(var w=t,x=0,w=w;;){var _;if(x>=w.length)break;_=w[x++];var C=_;this.emit("uploadprogress",C,n,C.upload.bytesSent)}}}},{key:"_finishedUploading",value:function(t,i,n){var r=void 0;if(t[0].status!==e.CANCELED&&4===i.readyState){if("arraybuffer"!==i.responseType&&"blob"!==i.responseType&&(r=i.responseText,i.getResponseHeader("content-type")&&~i.getResponseHeader("content-type").indexOf("application/json")))try{r=JSON.parse(r)}catch(t){n=t,r="Invalid JSON response from server."}this._updateFilesUploadProgress(t),200<=i.status&&i.status<300?t[0].upload.chunked?t[0].upload.finishedChunkUpload(this._getChunk(t[0],i)):this._finished(t,r,n):this._handleUploadError(t,i,r)}}},{key:"_handleUploadError",value:function(t,i,n){if(t[0].status!==e.CANCELED){if(t[0].upload.chunked&&this.options.retryChunks){var r=this._getChunk(t[0],i);if(r.retries++<this.options.retryChunksLimit)return void this._uploadData(t,[r.dataBlock]);console.warn("Retried this chunk too often. Giving up.")}for(var o=t,s=0,o=o;!(s>=o.length);)o[s++],this._errorProcessing(t,n||this.options.dictResponseError.replace("{{statusCode}}",i.status),i)}}},{key:"submitRequest",value:function(t,e,i){t.send(e)}},{key:"_finished",value:function(t,i,n){for(var r=t,o=0,r=r;;){var s;if(o>=r.length)break;s=r[o++];var a=s;a.status=e.SUCCESS,this.emit("success",a,i,n),this.emit("complete",a)}if(this.options.uploadMultiple&&(this.emit("successmultiple",t,i,n),this.emit("completemultiple",t)),this.options.autoProcessQueue)return this.processQueue()}},{key:"_errorProcessing",value:function(t,i,n){for(var r=t,o=0,r=r;;){var s;if(o>=r.length)break;s=r[o++];var a=s;a.status=e.ERROR,this.emit("error",a,i,n),this.emit("complete",a)}if(this.options.uploadMultiple&&(this.emit("errormultiple",t,i,n),this.emit("completemultiple",t)),this.options.autoProcessQueue)return this.processQueue()}}],[{key:"uuidv4",value:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)})}}]),e}(Emitter);Dropzone.initClass(),Dropzone.version="5.2.0",Dropzone.options={},Dropzone.optionsForElement=function(t){return t.getAttribute("id")?Dropzone.options[camelize(t.getAttribute("id"))]:void 0},Dropzone.instances=[],Dropzone.forElement=function(t){if("string"==typeof t&&(t=document.querySelector(t)),null==(null!=t?t.dropzone:void 0))throw new Error("No Dropzone found for given element. This is probably because you're trying to access it before Dropzone had the time to initialize. Use the `init` option to setup any additional observers on your Dropzone.");
return t.dropzone},Dropzone.autoDiscover=!0,Dropzone.discover=function(){var t=void 0;if(document.querySelectorAll)t=document.querySelectorAll(".dropzone");else{t=[];var e=function(e){return function(){for(var i=[],n=e,r=0,n=n;;){var o;if(r>=n.length)break;o=n[r++];var s=o;/(^| )dropzone($| )/.test(s.className)?i.push(t.push(s)):i.push(void 0)}return i}()};e(document.getElementsByTagName("div")),e(document.getElementsByTagName("form"))}return function(){for(var e=[],i=t,n=0,i=i;;){var r;if(n>=i.length)break;r=i[n++];var o=r;!1!==Dropzone.optionsForElement(o)?e.push(new Dropzone(o)):e.push(void 0)}return e}()},Dropzone.blacklistedBrowsers=[/opera.*(Macintosh|Windows Phone).*version\/12/i],Dropzone.isBrowserSupported=function(){var t=!0;if(window.File&&window.FileReader&&window.FileList&&window.Blob&&window.FormData&&document.querySelector)if("classList"in document.createElement("a"))for(var e=Dropzone.blacklistedBrowsers,i=0,e=e;;){var n;if(i>=e.length)break;n=e[i++];var r=n;r.test(navigator.userAgent)&&(t=!1)}else t=!1;else t=!1;return t},Dropzone.dataURItoBlob=function(t){for(var e=atob(t.split(",")[1]),i=t.split(",")[0].split(":")[1].split(";")[0],n=new ArrayBuffer(e.length),r=new Uint8Array(n),o=0,s=e.length,a=0<=s;a?o<=s:o>=s;a?o++:o--)r[o]=e.charCodeAt(o);return new Blob([n],{type:i})};var without=function(t,e){return t.filter(function(t){return t!==e}).map(function(t){return t})},camelize=function(t){return t.replace(/[\-_](\w)/g,function(t){return t.charAt(1).toUpperCase()})};Dropzone.createElement=function(t){var e=document.createElement("div");return e.innerHTML=t,e.childNodes[0]},Dropzone.elementInside=function(t,e){if(t===e)return!0;for(;t=t.parentNode;)if(t===e)return!0;return!1},Dropzone.getElement=function(t,e){var i=void 0;if("string"==typeof t?i=document.querySelector(t):null!=t.nodeType&&(i=t),null==i)throw new Error("Invalid `"+e+"` option provided. Please provide a CSS selector or a plain HTML element.");return i},Dropzone.getElements=function(t,e){var i=void 0,n=void 0;if(t instanceof Array){n=[];try{for(var r=t,o=0,r=r;!(o>=r.length);)i=r[o++],n.push(this.getElement(i,e))}catch(t){n=null}}else if("string"==typeof t){n=[];for(var s=document.querySelectorAll(t),a=0,s=s;!(a>=s.length);)i=s[a++],n.push(i)}else null!=t.nodeType&&(n=[t]);if(null==n||!n.length)throw new Error("Invalid `"+e+"` option provided. Please provide a CSS selector, a plain HTML element or a list of those.");return n},Dropzone.confirm=function(t,e,i){return window.confirm(t)?e():null!=i?i():void 0},Dropzone.isValidFile=function(t,e){if(!e)return!0;e=e.split(",");for(var i=t.type,n=i.replace(/\/.*$/,""),r=e,o=0,r=r;;){var s;if(o>=r.length)break;s=r[o++];var a=s;if(a=a.trim(),"."===a.charAt(0)){if(-1!==t.name.toLowerCase().indexOf(a.toLowerCase(),t.name.length-a.length))return!0}else if(/\/\*$/.test(a)){if(n===a.replace(/\/.*$/,""))return!0}else if(i===a)return!0}return!1},"undefined"!=typeof jQuery&&null!==jQuery&&(jQuery.fn.dropzone=function(t){return this.each(function(){return new Dropzone(this,t)})}),"undefined"!=typeof module&&null!==module?module.exports=Dropzone:window.Dropzone=Dropzone,Dropzone.ADDED="added",Dropzone.QUEUED="queued",Dropzone.ACCEPTED=Dropzone.QUEUED,Dropzone.UPLOADING="uploading",Dropzone.PROCESSING=Dropzone.UPLOADING,Dropzone.CANCELED="canceled",Dropzone.ERROR="error",Dropzone.SUCCESS="success";var detectVerticalSquash=function(t){var e=(t.naturalWidth,t.naturalHeight),i=document.createElement("canvas");i.width=1,i.height=e;var n=i.getContext("2d");n.drawImage(t,0,0);for(var r=n.getImageData(1,0,1,e),o=r.data,s=0,a=e,l=e;l>s;)0===o[4*(l-1)+3]?a=l:s=l,l=a+s>>1;var c=l/e;return 0===c?1:c},drawImageIOSFix=function(t,e,i,n,r,o,s,a,l,c){var u=detectVerticalSquash(e);return t.drawImage(e,i,n,r,o,s,a,l,c/u)},ExifRestore=function(){function t(){_classCallCheck(this,t)}return _createClass(t,null,[{key:"initClass",value:function(){this.KEY_STR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}},{key:"encode64",value:function(t){for(var e="",i=void 0,n=void 0,r="",o=void 0,s=void 0,a=void 0,l="",c=0;i=t[c++],n=t[c++],r=t[c++],o=i>>2,s=(3&i)<<4|n>>4,a=(15&n)<<2|r>>6,l=63&r,isNaN(n)?a=l=64:isNaN(r)&&(l=64),e=e+this.KEY_STR.charAt(o)+this.KEY_STR.charAt(s)+this.KEY_STR.charAt(a)+this.KEY_STR.charAt(l),i=n=r="",o=s=a=l="",c<t.length;);return e}},{key:"restore",value:function(t,e){if(!t.match("data:image/jpeg;base64,"))return e;var i=this.decode64(t.replace("data:image/jpeg;base64,","")),n=this.slice2Segments(i),r=this.exifManipulation(e,n);return"data:image/jpeg;base64,"+this.encode64(r)}},{key:"exifManipulation",value:function(t,e){var i=this.getExifArray(e),n=this.insertExif(t,i);return new Uint8Array(n)}},{key:"getExifArray",value:function(t){for(var e=void 0,i=0;i<t.length;){if(e=t[i],255===e[0]&225===e[1])return e;i++}return[]}},{key:"insertExif",value:function(t,e){var i=t.replace("data:image/jpeg;base64,",""),n=this.decode64(i),r=n.indexOf(255,3),o=n.slice(0,r),s=n.slice(r),a=o;return a=a.concat(e),a=a.concat(s)}},{key:"slice2Segments",value:function(t){for(var e=0,i=[];;){var n;if(255===t[e]&218===t[e+1])break;if(255===t[e]&216===t[e+1])e+=2;else{n=256*t[e+2]+t[e+3];var r=e+n+2,o=t.slice(e,r);i.push(o),e=r}if(e>t.length)break}return i}},{key:"decode64",value:function(t){var e=void 0,i=void 0,n="",r=void 0,o=void 0,s=void 0,a="",l=0,c=[],u=/[^A-Za-z0-9\+\/\=]/g;for(u.exec(t)&&console.warn("There were invalid base64 characters in the input text.\nValid base64 characters are A-Z, a-z, 0-9, '+', '/',and '='\nExpect errors in decoding."),t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"");r=this.KEY_STR.indexOf(t.charAt(l++)),o=this.KEY_STR.indexOf(t.charAt(l++)),s=this.KEY_STR.indexOf(t.charAt(l++)),a=this.KEY_STR.indexOf(t.charAt(l++)),e=r<<2|o>>4,i=(15&o)<<4|s>>2,n=(3&s)<<6|a,c.push(e),64!==s&&c.push(i),64!==a&&c.push(n),e=i=n="",r=o=s=a="",l<t.length;);return c}}]),t}();ExifRestore.initClass();var contentLoaded=function(t,e){var i=!1,n=!0,r=t.document,o=r.documentElement,s=r.addEventListener?"addEventListener":"attachEvent",a=r.addEventListener?"removeEventListener":"detachEvent",l=r.addEventListener?"":"on",c=function n(o){if("readystatechange"!==o.type||"complete"===r.readyState)return("load"===o.type?t:r)[a](l+o.type,n,!1),!i&&(i=!0)?e.call(t,o.type||o):void 0};if("complete"!==r.readyState){if(r.createEventObject&&o.doScroll){try{n=!t.frameElement}catch(t){}n&&function t(){try{o.doScroll("left")}catch(e){return void setTimeout(t,50)}return c("poll")}()}return r[s](l+"DOMContentLoaded",c,!1),r[s](l+"readystatechange",c,!1),t[s](l+"load",c,!1)}};Dropzone._autoDiscoverFunction=function(){if(Dropzone.autoDiscover)return Dropzone.discover()},contentLoaded(window,Dropzone._autoDiscoverFunction),define("dropzone",function(){}),define("app/fileUploader",["jquery","app/ajaxForm","dropzone"],function(t,e){function i(){var t=new Uint8Array(32);(window.crypto||window.msCrypto).getRandomValues(t);var e=function(t){return"00".slice(t.length)+t},i=Array.prototype.map.call(t,function(t){return e(t.toString(16))});return i.join("").toUpperCase()}t(function(){function n(e){function n(){function e(){var e=[];t("div[data-file-upload]").each(function(){var t=this;"undefined"===t.dataset.briefFileId&&e.push({key:t.dataset.key,hash:t.dataset.hash,fileName:t.dataset.fileName,size:t.dataset.size})}),l.checked=e.length>0,t(l).change();var i=JSON.stringify(e);c.value=i}function i(t){return"file_"+t}function n(t){var n=document.createElement("div");n.id=i(t.key),n.dataset.fileUpload=null,n.dataset.key=t.key,n.dataset.hash=t.hash,n.dataset.fileName=t.name,n.dataset.size=t.size,n.dataset.briefFileId=t.briefFileId,a.appendChild(n),e()}function r(n){var r=document.getElementById(i(n.key));if(r&&r.remove(),e(),n.briefFileId){var o={url:s.BriefFileRemoveAction,method:"POST",data:{briefFileId:n.briefFileId}};t.ajax(o)}}return{addFile:n,removeFile:r}}function r(t){var e={name:t.FileName,briefFileId:t.BriefFileId};p.emit("addedfile",e),p.emit("complete",e)}window.Dropzone.autoDiscover=!1,e.classList.add("dropzone");var o=e.querySelector("div[data-upload-options]"),s=JSON.parse(t(o).html()),a=e.querySelector("div[data-uploads]"),l=e.querySelector("#"+s.HasFileCheckboxId),c=e.querySelector("input[name=filesJson]"),u=new n,d=function(){this.on("addedfile",function(t){t.hash=i(),t.key=s.PolicyData.keyPrefix+t.hash}),this.on("sending",function(t,e,i){i.append("key",t.key),i.append("acl",s.PolicyData.acl),i.append("policy",s.PolicyData.policy),i.append("x-amz-algorithm",s.PolicyData.xAmzAlgorithim),i.append("x-amz-credential",s.PolicyData.xAmzCredential),i.append("x-amz-date",s.PolicyData.xAmzDate),i.append("x-amz-signature",s.PolicyData.xAmzSignature)}),this.on("complete",function(t){t.briefFileId&&"success"!==t.status||u.addFile(t)}),this.on("removedfile",function(t){u.removeFile(t)}),this.on("error",function(t,e){if((!e.length||e.indexOf("<Error>")>-1||0===e.indexOf("Server"))&&(e=s.Errors.UploadFailed),t.previewElement){t.previewElement.classList.add("dz-error");var i=Array.from(t.previewElement.querySelectorAll("[data-dz-errormessage]"));i.forEach(function(t){t.textContent=e})}})},h=function(t,e){if(!s.PixelLimits||!t.name.match(/\.(jpg|jpeg|png|gif)$/))return void e();t.accepted=!0;var i=new FileReader;i.onload=function(){var n=new Image;n.onload=function(){t.img=n;var i=s.PixelLimits,r=i.MaxWidth>0&&n.width>i.MaxWidth,o=i.MinWidth>0&&n.width<i.MinWidth,a=i.MaxHeight>0&&n.height>i.MaxHeight,l=i.MinHeight>0&&n.height<i.MinHeight,c=!(r||o||a||l);c?e():e(s.Errors.OutsidePixelLimit)},n.src=i.result},i.readAsDataURL(t)},f={init:d,accept:h,url:s.PolicyData.formAction,parallelUploads:s.ParallelUploads,maxFilesize:s.MaxFileSize,dictFileTooBig:s.Errors.MaxFileSize,maxFiles:s.MaxFiles,dictMaxFilesExceeded:s.Errors.MaxFiles,clickable:"div.dropzone",previewTemplate:document.querySelector("div[data-preview-template]").innerHTML};s.AcceptedFileExtensions&&(f.acceptedFiles=s.AcceptedFileExtensions,f.dictInvalidFileType=s.Errors.AcceptedFileExtensions);var p=new window.Dropzone(e,f);if(s.Files)for(var g=0;g<s.Files.length;g++)r(s.Files[g]);return{dz:p}}t("[data-upload-target]").each(function(){function t(){return o.dz.getUploadingFiles().length>0}function i(){o.dz.removeAllFiles(!0)}var r=this,o=n(r);e.addConfirmation(t,"Please wait! Your files are uploading... You can continue but some of your uploads may be cancelled. Would you still like to continue?",i)})})}),define("app/foundationInit",["jquery","foundation"],function(t){var e=!1,i=[],n=function(n,r){var o=function(){window.Foundation.Abide.defaults.validators[n]=r,t("[data-abide]").each(function(e,i){t(i).data().zfPlugin.options.validators[n]=r})};e?o():i.push(o)},r={addValidator:n};return t(function(){t(document).foundation(),t(i).each(function(t,e){e()}),e=!0}),r}),!function(t){"use strict";"function"==typeof define&&define.amd?define("slick",["jquery"],t):"undefined"!=typeof exports?module.exports=t(require("jquery")):t(jQuery)}(function(t){"use strict";var e=window.Slick||{};(e=function(){var e=0;return function(i,n){var r,o=this;o.defaults={accessibility:!0,adaptiveHeight:!1,appendArrows:t(i),appendDots:t(i),arrows:!0,asNavFor:null,prevArrow:'<button class="slick-prev" aria-label="Previous" type="button">Previous</button>',nextArrow:'<button class="slick-next" aria-label="Next" type="button">Next</button>',autoplay:!1,autoplaySpeed:3e3,centerMode:!1,centerPadding:"50px",cssEase:"ease",customPaging:function(e,i){return t('<button type="button" />').text(i+1)},dots:!1,dotsClass:"slick-dots",draggable:!0,easing:"linear",edgeFriction:.35,fade:!1,focusOnSelect:!1,focusOnChange:!1,infinite:!0,initialSlide:0,lazyLoad:"ondemand",mobileFirst:!1,pauseOnHover:!0,pauseOnFocus:!0,pauseOnDotsHover:!1,respondTo:"window",responsive:null,rows:1,rtl:!1,slide:"",slidesPerRow:1,slidesToShow:1,slidesToScroll:1,speed:500,swipe:!0,swipeToSlide:!1,touchMove:!0,touchThreshold:5,useCSS:!0,useTransform:!0,variableWidth:!1,vertical:!1,verticalSwiping:!1,waitForAnimate:!0,zIndex:1e3},o.initials={animating:!1,dragging:!1,autoPlayTimer:null,currentDirection:0,currentLeft:null,currentSlide:0,direction:1,$dots:null,listWidth:null,listHeight:null,loadIndex:0,$nextArrow:null,$prevArrow:null,scrolling:!1,slideCount:null,slideWidth:null,$slideTrack:null,$slides:null,sliding:!1,slideOffset:0,swipeLeft:null,swiping:!1,$list:null,touchObject:{},transformsEnabled:!1,unslicked:!1},t.extend(o,o.initials),o.activeBreakpoint=null,o.animType=null,o.animProp=null,o.breakpoints=[],o.breakpointSettings=[],o.cssTransitions=!1,o.focussed=!1,o.interrupted=!1,o.hidden="hidden",o.paused=!0,o.positionProp=null,o.respondTo=null,o.rowCount=1,o.shouldClick=!0,o.$slider=t(i),o.$slidesCache=null,o.transformType=null,o.transitionType=null,o.visibilityChange="visibilitychange",o.windowWidth=0,o.windowTimer=null,r=t(i).data("slick")||{},o.options=t.extend({},o.defaults,n,r),o.currentSlide=o.options.initialSlide,o.originalSettings=o.options,void 0!==document.mozHidden?(o.hidden="mozHidden",o.visibilityChange="mozvisibilitychange"):void 0!==document.webkitHidden&&(o.hidden="webkitHidden",o.visibilityChange="webkitvisibilitychange"),o.autoPlay=t.proxy(o.autoPlay,o),o.autoPlayClear=t.proxy(o.autoPlayClear,o),o.autoPlayIterator=t.proxy(o.autoPlayIterator,o),o.changeSlide=t.proxy(o.changeSlide,o),o.clickHandler=t.proxy(o.clickHandler,o),o.selectHandler=t.proxy(o.selectHandler,o),o.setPosition=t.proxy(o.setPosition,o),o.swipeHandler=t.proxy(o.swipeHandler,o),o.dragHandler=t.proxy(o.dragHandler,o),o.keyHandler=t.proxy(o.keyHandler,o),o.instanceUid=e++,o.htmlExpr=/^(?:\s*(<[\w\W]+>)[^>]*)$/,o.registerBreakpoints(),o.init(!0)}}()).prototype.activateADA=function(){this.$slideTrack.find(".slick-active").attr({"aria-hidden":"false"}).find("a, input, button, select").attr({tabindex:"0"})},e.prototype.addSlide=e.prototype.slickAdd=function(e,i,n){var r=this;if("boolean"==typeof i)n=i,i=null;else if(i<0||i>=r.slideCount)return!1;r.unload(),"number"==typeof i?0===i&&0===r.$slides.length?t(e).appendTo(r.$slideTrack):n?t(e).insertBefore(r.$slides.eq(i)):t(e).insertAfter(r.$slides.eq(i)):!0===n?t(e).prependTo(r.$slideTrack):t(e).appendTo(r.$slideTrack),r.$slides=r.$slideTrack.children(this.options.slide),r.$slideTrack.children(this.options.slide).detach(),r.$slideTrack.append(r.$slides),r.$slides.each(function(e,i){t(i).attr("data-slick-index",e)}),r.$slidesCache=r.$slides,r.reinit()},e.prototype.animateHeight=function(){var t=this;if(1===t.options.slidesToShow&&!0===t.options.adaptiveHeight&&!1===t.options.vertical){var e=t.$slides.eq(t.currentSlide).outerHeight(!0);t.$list.animate({height:e},t.options.speed)}},e.prototype.animateSlide=function(e,i){var n={},r=this;r.animateHeight(),!0===r.options.rtl&&!1===r.options.vertical&&(e=-e),!1===r.transformsEnabled?!1===r.options.vertical?r.$slideTrack.animate({left:e},r.options.speed,r.options.easing,i):r.$slideTrack.animate({top:e},r.options.speed,r.options.easing,i):!1===r.cssTransitions?(!0===r.options.rtl&&(r.currentLeft=-r.currentLeft),t({animStart:r.currentLeft}).animate({animStart:e},{duration:r.options.speed,easing:r.options.easing,step:function(t){t=Math.ceil(t),!1===r.options.vertical?(n[r.animType]="translate("+t+"px, 0px)",r.$slideTrack.css(n)):(n[r.animType]="translate(0px,"+t+"px)",r.$slideTrack.css(n))},complete:function(){i&&i.call()}})):(r.applyTransition(),e=Math.ceil(e),!1===r.options.vertical?n[r.animType]="translate3d("+e+"px, 0px, 0px)":n[r.animType]="translate3d(0px,"+e+"px, 0px)",r.$slideTrack.css(n),i&&setTimeout(function(){r.disableTransition(),i.call()},r.options.speed))},e.prototype.getNavTarget=function(){var e=this,i=e.options.asNavFor;return i&&null!==i&&(i=t(i).not(e.$slider)),i},e.prototype.asNavFor=function(e){var i=this.getNavTarget();null!==i&&"object"==typeof i&&i.each(function(){var i=t(this).slick("getSlick");i.unslicked||i.slideHandler(e,!0)})},e.prototype.applyTransition=function(t){var e=this,i={};!1===e.options.fade?i[e.transitionType]=e.transformType+" "+e.options.speed+"ms "+e.options.cssEase:i[e.transitionType]="opacity "+e.options.speed+"ms "+e.options.cssEase,!1===e.options.fade?e.$slideTrack.css(i):e.$slides.eq(t).css(i)},e.prototype.autoPlay=function(){var t=this;t.autoPlayClear(),t.slideCount>t.options.slidesToShow&&(t.autoPlayTimer=setInterval(t.autoPlayIterator,t.options.autoplaySpeed))},e.prototype.autoPlayClear=function(){var t=this;t.autoPlayTimer&&clearInterval(t.autoPlayTimer)},e.prototype.autoPlayIterator=function(){var t=this,e=t.currentSlide+t.options.slidesToScroll;t.paused||t.interrupted||t.focussed||(!1===t.options.infinite&&(1===t.direction&&t.currentSlide+1===t.slideCount-1?t.direction=0:0===t.direction&&(e=t.currentSlide-t.options.slidesToScroll,t.currentSlide-1==0&&(t.direction=1))),t.slideHandler(e))},e.prototype.buildArrows=function(){var e=this;!0===e.options.arrows&&(e.$prevArrow=t(e.options.prevArrow).addClass("slick-arrow"),e.$nextArrow=t(e.options.nextArrow).addClass("slick-arrow"),e.slideCount>e.options.slidesToShow?(e.$prevArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"),e.$nextArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"),e.htmlExpr.test(e.options.prevArrow)&&e.$prevArrow.prependTo(e.options.appendArrows),e.htmlExpr.test(e.options.nextArrow)&&e.$nextArrow.appendTo(e.options.appendArrows),!0!==e.options.infinite&&e.$prevArrow.addClass("slick-disabled").attr("aria-disabled","true")):e.$prevArrow.add(e.$nextArrow).addClass("slick-hidden").attr({"aria-disabled":"true",tabindex:"-1"}))},e.prototype.buildDots=function(){var e,i,n=this;if(!0===n.options.dots){for(n.$slider.addClass("slick-dotted"),i=t("<ul />").addClass(n.options.dotsClass),e=0;e<=n.getDotCount();e+=1)i.append(t("<li />").append(n.options.customPaging.call(this,n,e)));n.$dots=i.appendTo(n.options.appendDots),n.$dots.find("li").first().addClass("slick-active")}},e.prototype.buildOut=function(){var e=this;e.$slides=e.$slider.children(e.options.slide+":not(.slick-cloned)").addClass("slick-slide"),e.slideCount=e.$slides.length,e.$slides.each(function(e,i){t(i).attr("data-slick-index",e).data("originalStyling",t(i).attr("style")||"")}),e.$slider.addClass("slick-slider"),e.$slideTrack=0===e.slideCount?t('<div class="slick-track"/>').appendTo(e.$slider):e.$slides.wrapAll('<div class="slick-track"/>').parent(),e.$list=e.$slideTrack.wrap('<div class="slick-list"/>').parent(),e.$slideTrack.css("opacity",0),!0!==e.options.centerMode&&!0!==e.options.swipeToSlide||(e.options.slidesToScroll=1),t("img[data-lazy]",e.$slider).not("[src]").addClass("slick-loading"),e.setupInfinite(),e.buildArrows(),e.buildDots(),e.updateDots(),e.setSlideClasses("number"==typeof e.currentSlide?e.currentSlide:0),!0===e.options.draggable&&e.$list.addClass("draggable")},e.prototype.buildRows=function(){var t,e,i,n,r,o,s,a=this;if(n=document.createDocumentFragment(),o=a.$slider.children(),a.options.rows>1){for(s=a.options.slidesPerRow*a.options.rows,r=Math.ceil(o.length/s),t=0;t<r;t++){var l=document.createElement("div");for(e=0;e<a.options.rows;e++){var c=document.createElement("div");for(i=0;i<a.options.slidesPerRow;i++){var u=t*s+(e*a.options.slidesPerRow+i);o.get(u)&&c.appendChild(o.get(u))}l.appendChild(c)}n.appendChild(l)}a.$slider.empty().append(n),a.$slider.children().children().children().css({width:100/a.options.slidesPerRow+"%",display:"inline-block"})}},e.prototype.checkResponsive=function(e,i){var n,r,o,s=this,a=!1,l=s.$slider.width(),c=window.innerWidth||t(window).width();if("window"===s.respondTo?o=c:"slider"===s.respondTo?o=l:"min"===s.respondTo&&(o=Math.min(c,l)),s.options.responsive&&s.options.responsive.length&&null!==s.options.responsive){r=null;for(n in s.breakpoints)s.breakpoints.hasOwnProperty(n)&&(!1===s.originalSettings.mobileFirst?o<s.breakpoints[n]&&(r=s.breakpoints[n]):o>s.breakpoints[n]&&(r=s.breakpoints[n]));null!==r?null!==s.activeBreakpoint?(r!==s.activeBreakpoint||i)&&(s.activeBreakpoint=r,"unslick"===s.breakpointSettings[r]?s.unslick(r):(s.options=t.extend({},s.originalSettings,s.breakpointSettings[r]),!0===e&&(s.currentSlide=s.options.initialSlide),s.refresh(e)),a=r):(s.activeBreakpoint=r,"unslick"===s.breakpointSettings[r]?s.unslick(r):(s.options=t.extend({},s.originalSettings,s.breakpointSettings[r]),!0===e&&(s.currentSlide=s.options.initialSlide),s.refresh(e)),a=r):null!==s.activeBreakpoint&&(s.activeBreakpoint=null,s.options=s.originalSettings,!0===e&&(s.currentSlide=s.options.initialSlide),s.refresh(e),a=r),e||!1===a||s.$slider.trigger("breakpoint",[s,a])}},e.prototype.changeSlide=function(e,i){var n,r,o,s=this,a=t(e.currentTarget);switch(a.is("a")&&e.preventDefault(),a.is("li")||(a=a.closest("li")),o=s.slideCount%s.options.slidesToScroll!=0,n=o?0:(s.slideCount-s.currentSlide)%s.options.slidesToScroll,e.data.message){case"previous":r=0===n?s.options.slidesToScroll:s.options.slidesToShow-n,s.slideCount>s.options.slidesToShow&&s.slideHandler(s.currentSlide-r,!1,i);break;case"next":r=0===n?s.options.slidesToScroll:n,s.slideCount>s.options.slidesToShow&&s.slideHandler(s.currentSlide+r,!1,i);break;case"index":var l=0===e.data.index?0:e.data.index||a.index()*s.options.slidesToScroll;s.slideHandler(s.checkNavigable(l),!1,i),a.children().trigger("focus");break;default:return}},e.prototype.checkNavigable=function(t){var e,i;if(e=this.getNavigableIndexes(),i=0,t>e[e.length-1])t=e[e.length-1];else for(var n in e){if(t<e[n]){t=i;break}i=e[n]}return t},e.prototype.cleanUpEvents=function(){var e=this;e.options.dots&&null!==e.$dots&&(t("li",e.$dots).off("click.slick",e.changeSlide).off("mouseenter.slick",t.proxy(e.interrupt,e,!0)).off("mouseleave.slick",t.proxy(e.interrupt,e,!1)),!0===e.options.accessibility&&e.$dots.off("keydown.slick",e.keyHandler)),e.$slider.off("focus.slick blur.slick"),!0===e.options.arrows&&e.slideCount>e.options.slidesToShow&&(e.$prevArrow&&e.$prevArrow.off("click.slick",e.changeSlide),e.$nextArrow&&e.$nextArrow.off("click.slick",e.changeSlide),!0===e.options.accessibility&&(e.$prevArrow&&e.$prevArrow.off("keydown.slick",e.keyHandler),e.$nextArrow&&e.$nextArrow.off("keydown.slick",e.keyHandler))),e.$list.off("touchstart.slick mousedown.slick",e.swipeHandler),e.$list.off("touchmove.slick mousemove.slick",e.swipeHandler),e.$list.off("touchend.slick mouseup.slick",e.swipeHandler),e.$list.off("touchcancel.slick mouseleave.slick",e.swipeHandler),e.$list.off("click.slick",e.clickHandler),t(document).off(e.visibilityChange,e.visibility),e.cleanUpSlideEvents(),!0===e.options.accessibility&&e.$list.off("keydown.slick",e.keyHandler),!0===e.options.focusOnSelect&&t(e.$slideTrack).children().off("click.slick",e.selectHandler),t(window).off("orientationchange.slick.slick-"+e.instanceUid,e.orientationChange),t(window).off("resize.slick.slick-"+e.instanceUid,e.resize),t("[draggable!=true]",e.$slideTrack).off("dragstart",e.preventDefault),t(window).off("load.slick.slick-"+e.instanceUid,e.setPosition)},e.prototype.cleanUpSlideEvents=function(){var e=this;e.$list.off("mouseenter.slick",t.proxy(e.interrupt,e,!0)),e.$list.off("mouseleave.slick",t.proxy(e.interrupt,e,!1))},e.prototype.cleanUpRows=function(){var t,e=this;e.options.rows>1&&((t=e.$slides.children().children()).removeAttr("style"),e.$slider.empty().append(t))},e.prototype.clickHandler=function(t){!1===this.shouldClick&&(t.stopImmediatePropagation(),t.stopPropagation(),t.preventDefault())},e.prototype.destroy=function(e){var i=this;i.autoPlayClear(),i.touchObject={},i.cleanUpEvents(),t(".slick-cloned",i.$slider).detach(),i.$dots&&i.$dots.remove(),i.$prevArrow&&i.$prevArrow.length&&(i.$prevArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display",""),i.htmlExpr.test(i.options.prevArrow)&&i.$prevArrow.remove()),i.$nextArrow&&i.$nextArrow.length&&(i.$nextArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display",""),i.htmlExpr.test(i.options.nextArrow)&&i.$nextArrow.remove()),i.$slides&&(i.$slides.removeClass("slick-slide slick-active slick-center slick-visible slick-current").removeAttr("aria-hidden").removeAttr("data-slick-index").each(function(){t(this).attr("style",t(this).data("originalStyling"))}),i.$slideTrack.children(this.options.slide).detach(),i.$slideTrack.detach(),i.$list.detach(),i.$slider.append(i.$slides)),i.cleanUpRows(),i.$slider.removeClass("slick-slider"),i.$slider.removeClass("slick-initialized"),i.$slider.removeClass("slick-dotted"),i.unslicked=!0,e||i.$slider.trigger("destroy",[i])},e.prototype.disableTransition=function(t){var e=this,i={};i[e.transitionType]="",!1===e.options.fade?e.$slideTrack.css(i):e.$slides.eq(t).css(i)},e.prototype.fadeSlide=function(t,e){var i=this;!1===i.cssTransitions?(i.$slides.eq(t).css({zIndex:i.options.zIndex}),i.$slides.eq(t).animate({opacity:1},i.options.speed,i.options.easing,e)):(i.applyTransition(t),i.$slides.eq(t).css({opacity:1,zIndex:i.options.zIndex}),e&&setTimeout(function(){i.disableTransition(t),e.call()},i.options.speed))},e.prototype.fadeSlideOut=function(t){var e=this;!1===e.cssTransitions?e.$slides.eq(t).animate({opacity:0,zIndex:e.options.zIndex-2},e.options.speed,e.options.easing):(e.applyTransition(t),e.$slides.eq(t).css({opacity:0,zIndex:e.options.zIndex-2}))},e.prototype.filterSlides=e.prototype.slickFilter=function(t){var e=this;null!==t&&(e.$slidesCache=e.$slides,e.unload(),e.$slideTrack.children(this.options.slide).detach(),e.$slidesCache.filter(t).appendTo(e.$slideTrack),e.reinit())},e.prototype.focusHandler=function(){var e=this;e.$slider.off("focus.slick blur.slick").on("focus.slick blur.slick","*",function(i){i.stopImmediatePropagation();var n=t(this);setTimeout(function(){e.options.pauseOnFocus&&(e.focussed=n.is(":focus"),e.autoPlay())},0)})},e.prototype.getCurrent=e.prototype.slickCurrentSlide=function(){return this.currentSlide},e.prototype.getDotCount=function(){var t=this,e=0,i=0,n=0;if(!0===t.options.infinite)if(t.slideCount<=t.options.slidesToShow)++n;else for(;e<t.slideCount;)++n,e=i+t.options.slidesToScroll,i+=t.options.slidesToScroll<=t.options.slidesToShow?t.options.slidesToScroll:t.options.slidesToShow;else if(!0===t.options.centerMode)n=t.slideCount;else if(t.options.asNavFor)for(;e<t.slideCount;)++n,e=i+t.options.slidesToScroll,i+=t.options.slidesToScroll<=t.options.slidesToShow?t.options.slidesToScroll:t.options.slidesToShow;else n=1+Math.ceil((t.slideCount-t.options.slidesToShow)/t.options.slidesToScroll);return n-1},e.prototype.getLeft=function(t){var e,i,n,r,o=this,s=0;return o.slideOffset=0,i=o.$slides.first().outerHeight(!0),!0===o.options.infinite?(o.slideCount>o.options.slidesToShow&&(o.slideOffset=o.slideWidth*o.options.slidesToShow*-1,r=-1,!0===o.options.vertical&&!0===o.options.centerMode&&(2===o.options.slidesToShow?r=-1.5:1===o.options.slidesToShow&&(r=-2)),s=i*o.options.slidesToShow*r),o.slideCount%o.options.slidesToScroll!=0&&t+o.options.slidesToScroll>o.slideCount&&o.slideCount>o.options.slidesToShow&&(t>o.slideCount?(o.slideOffset=(o.options.slidesToShow-(t-o.slideCount))*o.slideWidth*-1,s=(o.options.slidesToShow-(t-o.slideCount))*i*-1):(o.slideOffset=o.slideCount%o.options.slidesToScroll*o.slideWidth*-1,s=o.slideCount%o.options.slidesToScroll*i*-1))):t+o.options.slidesToShow>o.slideCount&&(o.slideOffset=(t+o.options.slidesToShow-o.slideCount)*o.slideWidth,s=(t+o.options.slidesToShow-o.slideCount)*i),o.slideCount<=o.options.slidesToShow&&(o.slideOffset=0,s=0),!0===o.options.centerMode&&o.slideCount<=o.options.slidesToShow?o.slideOffset=o.slideWidth*Math.floor(o.options.slidesToShow)/2-o.slideWidth*o.slideCount/2:!0===o.options.centerMode&&!0===o.options.infinite?o.slideOffset+=o.slideWidth*Math.floor(o.options.slidesToShow/2)-o.slideWidth:!0===o.options.centerMode&&(o.slideOffset=0,o.slideOffset+=o.slideWidth*Math.floor(o.options.slidesToShow/2)),e=!1===o.options.vertical?t*o.slideWidth*-1+o.slideOffset:t*i*-1+s,!0===o.options.variableWidth&&(n=o.slideCount<=o.options.slidesToShow||!1===o.options.infinite?o.$slideTrack.children(".slick-slide").eq(t):o.$slideTrack.children(".slick-slide").eq(t+o.options.slidesToShow),e=!0===o.options.rtl?n[0]?-1*(o.$slideTrack.width()-n[0].offsetLeft-n.width()):0:n[0]?-1*n[0].offsetLeft:0,!0===o.options.centerMode&&(n=o.slideCount<=o.options.slidesToShow||!1===o.options.infinite?o.$slideTrack.children(".slick-slide").eq(t):o.$slideTrack.children(".slick-slide").eq(t+o.options.slidesToShow+1),e=!0===o.options.rtl?n[0]?-1*(o.$slideTrack.width()-n[0].offsetLeft-n.width()):0:n[0]?-1*n[0].offsetLeft:0,e+=(o.$list.width()-n.outerWidth())/2)),e},e.prototype.getOption=e.prototype.slickGetOption=function(t){return this.options[t]},e.prototype.getNavigableIndexes=function(){var t,e=this,i=0,n=0,r=[];for(!1===e.options.infinite?t=e.slideCount:(i=-1*e.options.slidesToScroll,n=-1*e.options.slidesToScroll,t=2*e.slideCount);i<t;)r.push(i),i=n+e.options.slidesToScroll,n+=e.options.slidesToScroll<=e.options.slidesToShow?e.options.slidesToScroll:e.options.slidesToShow;return r},e.prototype.getSlick=function(){return this},e.prototype.getSlideCount=function(){var e,i,n=this;return i=!0===n.options.centerMode?n.slideWidth*Math.floor(n.options.slidesToShow/2):0,!0===n.options.swipeToSlide?(n.$slideTrack.find(".slick-slide").each(function(r,o){if(o.offsetLeft-i+t(o).outerWidth()/2>-1*n.swipeLeft)return e=o,!1}),Math.abs(t(e).attr("data-slick-index")-n.currentSlide)||1):n.options.slidesToScroll},e.prototype.goTo=e.prototype.slickGoTo=function(t,e){this.changeSlide({data:{message:"index",index:parseInt(t)}},e)},e.prototype.init=function(e){var i=this;t(i.$slider).hasClass("slick-initialized")||(t(i.$slider).addClass("slick-initialized"),i.buildRows(),i.buildOut(),i.setProps(),i.startLoad(),i.loadSlider(),i.initializeEvents(),i.updateArrows(),i.updateDots(),i.checkResponsive(!0),i.focusHandler()),e&&i.$slider.trigger("init",[i]),!0===i.options.accessibility&&i.initADA(),i.options.autoplay&&(i.paused=!1,i.autoPlay())},e.prototype.initADA=function(){var e=this,i=Math.ceil(e.slideCount/e.options.slidesToShow),n=e.getNavigableIndexes().filter(function(t){return t>=0&&t<e.slideCount});e.$slides.add(e.$slideTrack.find(".slick-cloned")).attr({"aria-hidden":"true",tabindex:"-1"}).find("a, input, button, select").attr({tabindex:"-1"}),null!==e.$dots&&(e.$slides.not(e.$slideTrack.find(".slick-cloned")).each(function(i){var r=n.indexOf(i);t(this).attr({role:"tabpanel",id:"slick-slide"+e.instanceUid+i,tabindex:-1}),-1!==r&&t(this).attr({"aria-describedby":"slick-slide-control"+e.instanceUid+r})}),e.$dots.attr("role","tablist").find("li").each(function(r){var o=n[r];t(this).attr({role:"presentation"}),t(this).find("button").first().attr({role:"tab",id:"slick-slide-control"+e.instanceUid+r,"aria-controls":"slick-slide"+e.instanceUid+o,"aria-label":r+1+" of "+i,"aria-selected":null,tabindex:"-1"})}).eq(e.currentSlide).find("button").attr({"aria-selected":"true",tabindex:"0"}).end());for(var r=e.currentSlide,o=r+e.options.slidesToShow;r<o;r++)e.$slides.eq(r).attr("tabindex",0);e.activateADA()},e.prototype.initArrowEvents=function(){var t=this;!0===t.options.arrows&&t.slideCount>t.options.slidesToShow&&(t.$prevArrow.off("click.slick").on("click.slick",{message:"previous"},t.changeSlide),t.$nextArrow.off("click.slick").on("click.slick",{message:"next"},t.changeSlide),!0===t.options.accessibility&&(t.$prevArrow.on("keydown.slick",t.keyHandler),t.$nextArrow.on("keydown.slick",t.keyHandler)))},e.prototype.initDotEvents=function(){var e=this;!0===e.options.dots&&(t("li",e.$dots).on("click.slick",{message:"index"},e.changeSlide),!0===e.options.accessibility&&e.$dots.on("keydown.slick",e.keyHandler)),!0===e.options.dots&&!0===e.options.pauseOnDotsHover&&t("li",e.$dots).on("mouseenter.slick",t.proxy(e.interrupt,e,!0)).on("mouseleave.slick",t.proxy(e.interrupt,e,!1))},e.prototype.initSlideEvents=function(){var e=this;e.options.pauseOnHover&&(e.$list.on("mouseenter.slick",t.proxy(e.interrupt,e,!0)),e.$list.on("mouseleave.slick",t.proxy(e.interrupt,e,!1)));
},e.prototype.initializeEvents=function(){var e=this;e.initArrowEvents(),e.initDotEvents(),e.initSlideEvents(),e.$list.on("touchstart.slick mousedown.slick",{action:"start"},e.swipeHandler),e.$list.on("touchmove.slick mousemove.slick",{action:"move"},e.swipeHandler),e.$list.on("touchend.slick mouseup.slick",{action:"end"},e.swipeHandler),e.$list.on("touchcancel.slick mouseleave.slick",{action:"end"},e.swipeHandler),e.$list.on("click.slick",e.clickHandler),t(document).on(e.visibilityChange,t.proxy(e.visibility,e)),!0===e.options.accessibility&&e.$list.on("keydown.slick",e.keyHandler),!0===e.options.focusOnSelect&&t(e.$slideTrack).children().on("click.slick",e.selectHandler),t(window).on("orientationchange.slick.slick-"+e.instanceUid,t.proxy(e.orientationChange,e)),t(window).on("resize.slick.slick-"+e.instanceUid,t.proxy(e.resize,e)),t("[draggable!=true]",e.$slideTrack).on("dragstart",e.preventDefault),t(window).on("load.slick.slick-"+e.instanceUid,e.setPosition),t(e.setPosition)},e.prototype.initUI=function(){var t=this;!0===t.options.arrows&&t.slideCount>t.options.slidesToShow&&(t.$prevArrow.show(),t.$nextArrow.show()),!0===t.options.dots&&t.slideCount>t.options.slidesToShow&&t.$dots.show()},e.prototype.keyHandler=function(t){var e=this;t.target.tagName.match("TEXTAREA|INPUT|SELECT")||(37===t.keyCode&&!0===e.options.accessibility?e.changeSlide({data:{message:!0===e.options.rtl?"next":"previous"}}):39===t.keyCode&&!0===e.options.accessibility&&e.changeSlide({data:{message:!0===e.options.rtl?"previous":"next"}}))},e.prototype.lazyLoad=function(){function e(e){t("img[data-lazy]",e).each(function(){var e=t(this),i=t(this).attr("data-lazy"),n=t(this).attr("data-srcset"),r=t(this).attr("data-sizes")||o.$slider.attr("data-sizes"),s=document.createElement("img");s.onload=function(){e.animate({opacity:0},100,function(){n&&(e.attr("srcset",n),r&&e.attr("sizes",r)),e.attr("src",i).animate({opacity:1},200,function(){e.removeAttr("data-lazy data-srcset data-sizes").removeClass("slick-loading")}),o.$slider.trigger("lazyLoaded",[o,e,i])})},s.onerror=function(){e.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error"),o.$slider.trigger("lazyLoadError",[o,e,i])},s.src=i})}var i,n,r,o=this;if(!0===o.options.centerMode?!0===o.options.infinite?r=(n=o.currentSlide+(o.options.slidesToShow/2+1))+o.options.slidesToShow+2:(n=Math.max(0,o.currentSlide-(o.options.slidesToShow/2+1)),r=o.options.slidesToShow/2+1+2+o.currentSlide):(n=o.options.infinite?o.options.slidesToShow+o.currentSlide:o.currentSlide,r=Math.ceil(n+o.options.slidesToShow),!0===o.options.fade&&(n>0&&n--,r<=o.slideCount&&r++)),i=o.$slider.find(".slick-slide").slice(n,r),"anticipated"===o.options.lazyLoad)for(var s=n-1,a=r,l=o.$slider.find(".slick-slide"),c=0;c<o.options.slidesToScroll;c++)s<0&&(s=o.slideCount-1),i=(i=i.add(l.eq(s))).add(l.eq(a)),s--,a++;e(i),o.slideCount<=o.options.slidesToShow?e(o.$slider.find(".slick-slide")):o.currentSlide>=o.slideCount-o.options.slidesToShow?e(o.$slider.find(".slick-cloned").slice(0,o.options.slidesToShow)):0===o.currentSlide&&e(o.$slider.find(".slick-cloned").slice(-1*o.options.slidesToShow))},e.prototype.loadSlider=function(){var t=this;t.setPosition(),t.$slideTrack.css({opacity:1}),t.$slider.removeClass("slick-loading"),t.initUI(),"progressive"===t.options.lazyLoad&&t.progressiveLazyLoad()},e.prototype.next=e.prototype.slickNext=function(){this.changeSlide({data:{message:"next"}})},e.prototype.orientationChange=function(){var t=this;t.checkResponsive(),t.setPosition()},e.prototype.pause=e.prototype.slickPause=function(){var t=this;t.autoPlayClear(),t.paused=!0},e.prototype.play=e.prototype.slickPlay=function(){var t=this;t.autoPlay(),t.options.autoplay=!0,t.paused=!1,t.focussed=!1,t.interrupted=!1},e.prototype.postSlide=function(e){var i=this;i.unslicked||(i.$slider.trigger("afterChange",[i,e]),i.animating=!1,i.slideCount>i.options.slidesToShow&&i.setPosition(),i.swipeLeft=null,i.options.autoplay&&i.autoPlay(),!0===i.options.accessibility&&(i.initADA(),i.options.focusOnChange&&t(i.$slides.get(i.currentSlide)).attr("tabindex",0).focus()))},e.prototype.prev=e.prototype.slickPrev=function(){this.changeSlide({data:{message:"previous"}})},e.prototype.preventDefault=function(t){t.preventDefault()},e.prototype.progressiveLazyLoad=function(e){e=e||1;var i,n,r,o,s,a=this,l=t("img[data-lazy]",a.$slider);l.length?(i=l.first(),n=i.attr("data-lazy"),r=i.attr("data-srcset"),o=i.attr("data-sizes")||a.$slider.attr("data-sizes"),(s=document.createElement("img")).onload=function(){r&&(i.attr("srcset",r),o&&i.attr("sizes",o)),i.attr("src",n).removeAttr("data-lazy data-srcset data-sizes").removeClass("slick-loading"),!0===a.options.adaptiveHeight&&a.setPosition(),a.$slider.trigger("lazyLoaded",[a,i,n]),a.progressiveLazyLoad()},s.onerror=function(){e<3?setTimeout(function(){a.progressiveLazyLoad(e+1)},500):(i.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error"),a.$slider.trigger("lazyLoadError",[a,i,n]),a.progressiveLazyLoad())},s.src=n):a.$slider.trigger("allImagesLoaded",[a])},e.prototype.refresh=function(e){var i,n,r=this;n=r.slideCount-r.options.slidesToShow,!r.options.infinite&&r.currentSlide>n&&(r.currentSlide=n),r.slideCount<=r.options.slidesToShow&&(r.currentSlide=0),i=r.currentSlide,r.destroy(!0),t.extend(r,r.initials,{currentSlide:i}),r.init(),e||r.changeSlide({data:{message:"index",index:i}},!1)},e.prototype.registerBreakpoints=function(){var e,i,n,r=this,o=r.options.responsive||null;if("array"===t.type(o)&&o.length){r.respondTo=r.options.respondTo||"window";for(e in o)if(n=r.breakpoints.length-1,o.hasOwnProperty(e)){for(i=o[e].breakpoint;n>=0;)r.breakpoints[n]&&r.breakpoints[n]===i&&r.breakpoints.splice(n,1),n--;r.breakpoints.push(i),r.breakpointSettings[i]=o[e].settings}r.breakpoints.sort(function(t,e){return r.options.mobileFirst?t-e:e-t})}},e.prototype.reinit=function(){var e=this;e.$slides=e.$slideTrack.children(e.options.slide).addClass("slick-slide"),e.slideCount=e.$slides.length,e.currentSlide>=e.slideCount&&0!==e.currentSlide&&(e.currentSlide=e.currentSlide-e.options.slidesToScroll),e.slideCount<=e.options.slidesToShow&&(e.currentSlide=0),e.registerBreakpoints(),e.setProps(),e.setupInfinite(),e.buildArrows(),e.updateArrows(),e.initArrowEvents(),e.buildDots(),e.updateDots(),e.initDotEvents(),e.cleanUpSlideEvents(),e.initSlideEvents(),e.checkResponsive(!1,!0),!0===e.options.focusOnSelect&&t(e.$slideTrack).children().on("click.slick",e.selectHandler),e.setSlideClasses("number"==typeof e.currentSlide?e.currentSlide:0),e.setPosition(),e.focusHandler(),e.paused=!e.options.autoplay,e.autoPlay(),e.$slider.trigger("reInit",[e])},e.prototype.resize=function(){var e=this;t(window).width()!==e.windowWidth&&(clearTimeout(e.windowDelay),e.windowDelay=window.setTimeout(function(){e.windowWidth=t(window).width(),e.checkResponsive(),e.unslicked||e.setPosition()},50))},e.prototype.removeSlide=e.prototype.slickRemove=function(t,e,i){var n=this;return t="boolean"==typeof t?!0===(e=t)?0:n.slideCount-1:!0===e?--t:t,!(n.slideCount<1||t<0||t>n.slideCount-1)&&(n.unload(),!0===i?n.$slideTrack.children().remove():n.$slideTrack.children(this.options.slide).eq(t).remove(),n.$slides=n.$slideTrack.children(this.options.slide),n.$slideTrack.children(this.options.slide).detach(),n.$slideTrack.append(n.$slides),n.$slidesCache=n.$slides,n.reinit(),void 0)},e.prototype.setCSS=function(t){var e,i,n=this,r={};!0===n.options.rtl&&(t=-t),e="left"==n.positionProp?Math.ceil(t)+"px":"0px",i="top"==n.positionProp?Math.ceil(t)+"px":"0px",r[n.positionProp]=t,!1===n.transformsEnabled?n.$slideTrack.css(r):(r={},!1===n.cssTransitions?(r[n.animType]="translate("+e+", "+i+")",n.$slideTrack.css(r)):(r[n.animType]="translate3d("+e+", "+i+", 0px)",n.$slideTrack.css(r)))},e.prototype.setDimensions=function(){var t=this;!1===t.options.vertical?!0===t.options.centerMode&&t.$list.css({padding:"0px "+t.options.centerPadding}):(t.$list.height(t.$slides.first().outerHeight(!0)*t.options.slidesToShow),!0===t.options.centerMode&&t.$list.css({padding:t.options.centerPadding+" 0px"})),t.listWidth=t.$list.width(),t.listHeight=t.$list.height(),!1===t.options.vertical&&!1===t.options.variableWidth?(t.slideWidth=Math.ceil(t.listWidth/t.options.slidesToShow),t.$slideTrack.width(Math.ceil(t.slideWidth*t.$slideTrack.children(".slick-slide").length))):!0===t.options.variableWidth?t.$slideTrack.width(5e3*t.slideCount):(t.slideWidth=Math.ceil(t.listWidth),t.$slideTrack.height(Math.ceil(t.$slides.first().outerHeight(!0)*t.$slideTrack.children(".slick-slide").length)));var e=t.$slides.first().outerWidth(!0)-t.$slides.first().width();!1===t.options.variableWidth&&t.$slideTrack.children(".slick-slide").width(t.slideWidth-e)},e.prototype.setFade=function(){var e,i=this;i.$slides.each(function(n,r){e=i.slideWidth*n*-1,!0===i.options.rtl?t(r).css({position:"relative",right:e,top:0,zIndex:i.options.zIndex-2,opacity:0}):t(r).css({position:"relative",left:e,top:0,zIndex:i.options.zIndex-2,opacity:0})}),i.$slides.eq(i.currentSlide).css({zIndex:i.options.zIndex-1,opacity:1})},e.prototype.setHeight=function(){var t=this;if(1===t.options.slidesToShow&&!0===t.options.adaptiveHeight&&!1===t.options.vertical){var e=t.$slides.eq(t.currentSlide).outerHeight(!0);t.$list.css("height",e)}},e.prototype.setOption=e.prototype.slickSetOption=function(){var e,i,n,r,o,s=this,a=!1;if("object"===t.type(arguments[0])?(n=arguments[0],a=arguments[1],o="multiple"):"string"===t.type(arguments[0])&&(n=arguments[0],r=arguments[1],a=arguments[2],"responsive"===arguments[0]&&"array"===t.type(arguments[1])?o="responsive":void 0!==arguments[1]&&(o="single")),"single"===o)s.options[n]=r;else if("multiple"===o)t.each(n,function(t,e){s.options[t]=e});else if("responsive"===o)for(i in r)if("array"!==t.type(s.options.responsive))s.options.responsive=[r[i]];else{for(e=s.options.responsive.length-1;e>=0;)s.options.responsive[e].breakpoint===r[i].breakpoint&&s.options.responsive.splice(e,1),e--;s.options.responsive.push(r[i])}a&&(s.unload(),s.reinit())},e.prototype.setPosition=function(){var t=this;t.setDimensions(),t.setHeight(),!1===t.options.fade?t.setCSS(t.getLeft(t.currentSlide)):t.setFade(),t.$slider.trigger("setPosition",[t])},e.prototype.setProps=function(){var t=this,e=document.body.style;t.positionProp=!0===t.options.vertical?"top":"left","top"===t.positionProp?t.$slider.addClass("slick-vertical"):t.$slider.removeClass("slick-vertical"),void 0===e.WebkitTransition&&void 0===e.MozTransition&&void 0===e.msTransition||!0===t.options.useCSS&&(t.cssTransitions=!0),t.options.fade&&("number"==typeof t.options.zIndex?t.options.zIndex<3&&(t.options.zIndex=3):t.options.zIndex=t.defaults.zIndex),void 0!==e.OTransform&&(t.animType="OTransform",t.transformType="-o-transform",t.transitionType="OTransition",void 0===e.perspectiveProperty&&void 0===e.webkitPerspective&&(t.animType=!1)),void 0!==e.MozTransform&&(t.animType="MozTransform",t.transformType="-moz-transform",t.transitionType="MozTransition",void 0===e.perspectiveProperty&&void 0===e.MozPerspective&&(t.animType=!1)),void 0!==e.webkitTransform&&(t.animType="webkitTransform",t.transformType="-webkit-transform",t.transitionType="webkitTransition",void 0===e.perspectiveProperty&&void 0===e.webkitPerspective&&(t.animType=!1)),void 0!==e.msTransform&&(t.animType="msTransform",t.transformType="-ms-transform",t.transitionType="msTransition",void 0===e.msTransform&&(t.animType=!1)),void 0!==e.transform&&!1!==t.animType&&(t.animType="transform",t.transformType="transform",t.transitionType="transition"),t.transformsEnabled=t.options.useTransform&&null!==t.animType&&!1!==t.animType},e.prototype.setSlideClasses=function(t){var e,i,n,r,o=this;if(i=o.$slider.find(".slick-slide").removeClass("slick-active slick-center slick-current").attr("aria-hidden","true"),o.$slides.eq(t).addClass("slick-current"),!0===o.options.centerMode){var s=o.options.slidesToShow%2==0?1:0;e=Math.floor(o.options.slidesToShow/2),!0===o.options.infinite&&(t>=e&&t<=o.slideCount-1-e?o.$slides.slice(t-e+s,t+e+1).addClass("slick-active").attr("aria-hidden","false"):(n=o.options.slidesToShow+t,i.slice(n-e+1+s,n+e+2).addClass("slick-active").attr("aria-hidden","false")),0===t?i.eq(i.length-1-o.options.slidesToShow).addClass("slick-center"):t===o.slideCount-1&&i.eq(o.options.slidesToShow).addClass("slick-center")),o.$slides.eq(t).addClass("slick-center")}else t>=0&&t<=o.slideCount-o.options.slidesToShow?o.$slides.slice(t,t+o.options.slidesToShow).addClass("slick-active").attr("aria-hidden","false"):i.length<=o.options.slidesToShow?i.addClass("slick-active").attr("aria-hidden","false"):(r=o.slideCount%o.options.slidesToShow,n=!0===o.options.infinite?o.options.slidesToShow+t:t,o.options.slidesToShow==o.options.slidesToScroll&&o.slideCount-t<o.options.slidesToShow?i.slice(n-(o.options.slidesToShow-r),n+r).addClass("slick-active").attr("aria-hidden","false"):i.slice(n,n+o.options.slidesToShow).addClass("slick-active").attr("aria-hidden","false"));"ondemand"!==o.options.lazyLoad&&"anticipated"!==o.options.lazyLoad||o.lazyLoad()},e.prototype.setupInfinite=function(){var e,i,n,r=this;if(!0===r.options.fade&&(r.options.centerMode=!1),!0===r.options.infinite&&!1===r.options.fade&&(i=null,r.slideCount>r.options.slidesToShow)){for(n=!0===r.options.centerMode?r.options.slidesToShow+1:r.options.slidesToShow,e=r.slideCount;e>r.slideCount-n;e-=1)i=e-1,t(r.$slides[i]).clone(!0).attr("id","").attr("data-slick-index",i-r.slideCount).prependTo(r.$slideTrack).addClass("slick-cloned");for(e=0;e<n+r.slideCount;e+=1)i=e,t(r.$slides[i]).clone(!0).attr("id","").attr("data-slick-index",i+r.slideCount).appendTo(r.$slideTrack).addClass("slick-cloned");r.$slideTrack.find(".slick-cloned").find("[id]").each(function(){t(this).attr("id","")})}},e.prototype.interrupt=function(t){var e=this;t||e.autoPlay(),e.interrupted=t},e.prototype.selectHandler=function(e){var i=this,n=t(e.target).is(".slick-slide")?t(e.target):t(e.target).parents(".slick-slide"),r=parseInt(n.attr("data-slick-index"));r||(r=0),i.slideCount<=i.options.slidesToShow?i.slideHandler(r,!1,!0):i.slideHandler(r)},e.prototype.slideHandler=function(t,e,i){var n,r,o,s,a,l=null,c=this;if(e=e||!1,!(!0===c.animating&&!0===c.options.waitForAnimate||!0===c.options.fade&&c.currentSlide===t))if(!1===e&&c.asNavFor(t),n=t,l=c.getLeft(n),s=c.getLeft(c.currentSlide),c.currentLeft=null===c.swipeLeft?s:c.swipeLeft,!1===c.options.infinite&&!1===c.options.centerMode&&(t<0||t>c.getDotCount()*c.options.slidesToScroll))!1===c.options.fade&&(n=c.currentSlide,!0!==i?c.animateSlide(s,function(){c.postSlide(n)}):c.postSlide(n));else if(!1===c.options.infinite&&!0===c.options.centerMode&&(t<0||t>c.slideCount-c.options.slidesToScroll))!1===c.options.fade&&(n=c.currentSlide,!0!==i?c.animateSlide(s,function(){c.postSlide(n)}):c.postSlide(n));else{if(c.options.autoplay&&clearInterval(c.autoPlayTimer),r=n<0?c.slideCount%c.options.slidesToScroll!=0?c.slideCount-c.slideCount%c.options.slidesToScroll:c.slideCount+n:n>=c.slideCount?c.slideCount%c.options.slidesToScroll!=0?0:n-c.slideCount:n,c.animating=!0,c.$slider.trigger("beforeChange",[c,c.currentSlide,r]),o=c.currentSlide,c.currentSlide=r,c.setSlideClasses(c.currentSlide),c.options.asNavFor&&(a=(a=c.getNavTarget()).slick("getSlick")).slideCount<=a.options.slidesToShow&&a.setSlideClasses(c.currentSlide),c.updateDots(),c.updateArrows(),!0===c.options.fade)return!0!==i?(c.fadeSlideOut(o),c.fadeSlide(r,function(){c.postSlide(r)})):c.postSlide(r),void c.animateHeight();!0!==i?c.animateSlide(l,function(){c.postSlide(r)}):c.postSlide(r)}},e.prototype.startLoad=function(){var t=this;!0===t.options.arrows&&t.slideCount>t.options.slidesToShow&&(t.$prevArrow.hide(),t.$nextArrow.hide()),!0===t.options.dots&&t.slideCount>t.options.slidesToShow&&t.$dots.hide(),t.$slider.addClass("slick-loading")},e.prototype.swipeDirection=function(){var t,e,i,n,r=this;return t=r.touchObject.startX-r.touchObject.curX,e=r.touchObject.startY-r.touchObject.curY,i=Math.atan2(e,t),(n=Math.round(180*i/Math.PI))<0&&(n=360-Math.abs(n)),n<=45&&n>=0?!1===r.options.rtl?"left":"right":n<=360&&n>=315?!1===r.options.rtl?"left":"right":n>=135&&n<=225?!1===r.options.rtl?"right":"left":!0===r.options.verticalSwiping?n>=35&&n<=135?"down":"up":"vertical"},e.prototype.swipeEnd=function(t){var e,i,n=this;if(n.dragging=!1,n.swiping=!1,n.scrolling)return n.scrolling=!1,!1;if(n.interrupted=!1,n.shouldClick=!(n.touchObject.swipeLength>10),void 0===n.touchObject.curX)return!1;if(!0===n.touchObject.edgeHit&&n.$slider.trigger("edge",[n,n.swipeDirection()]),n.touchObject.swipeLength>=n.touchObject.minSwipe){switch(i=n.swipeDirection()){case"left":case"down":e=n.options.swipeToSlide?n.checkNavigable(n.currentSlide+n.getSlideCount()):n.currentSlide+n.getSlideCount(),n.currentDirection=0;break;case"right":case"up":e=n.options.swipeToSlide?n.checkNavigable(n.currentSlide-n.getSlideCount()):n.currentSlide-n.getSlideCount(),n.currentDirection=1}"vertical"!=i&&(n.slideHandler(e),n.touchObject={},n.$slider.trigger("swipe",[n,i]))}else n.touchObject.startX!==n.touchObject.curX&&(n.slideHandler(n.currentSlide),n.touchObject={})},e.prototype.swipeHandler=function(t){var e=this;if(!(!1===e.options.swipe||"ontouchend"in document&&!1===e.options.swipe||!1===e.options.draggable&&-1!==t.type.indexOf("mouse")))switch(e.touchObject.fingerCount=t.originalEvent&&void 0!==t.originalEvent.touches?t.originalEvent.touches.length:1,e.touchObject.minSwipe=e.listWidth/e.options.touchThreshold,!0===e.options.verticalSwiping&&(e.touchObject.minSwipe=e.listHeight/e.options.touchThreshold),t.data.action){case"start":e.swipeStart(t);break;case"move":e.swipeMove(t);break;case"end":e.swipeEnd(t)}},e.prototype.swipeMove=function(t){var e,i,n,r,o,s,a=this;return o=void 0!==t.originalEvent?t.originalEvent.touches:null,!(!a.dragging||a.scrolling||o&&1!==o.length)&&(e=a.getLeft(a.currentSlide),a.touchObject.curX=void 0!==o?o[0].pageX:t.clientX,a.touchObject.curY=void 0!==o?o[0].pageY:t.clientY,a.touchObject.swipeLength=Math.round(Math.sqrt(Math.pow(a.touchObject.curX-a.touchObject.startX,2))),s=Math.round(Math.sqrt(Math.pow(a.touchObject.curY-a.touchObject.startY,2))),!a.options.verticalSwiping&&!a.swiping&&s>4?(a.scrolling=!0,!1):(!0===a.options.verticalSwiping&&(a.touchObject.swipeLength=s),i=a.swipeDirection(),void 0!==t.originalEvent&&a.touchObject.swipeLength>4&&(a.swiping=!0,t.preventDefault()),r=(!1===a.options.rtl?1:-1)*(a.touchObject.curX>a.touchObject.startX?1:-1),!0===a.options.verticalSwiping&&(r=a.touchObject.curY>a.touchObject.startY?1:-1),n=a.touchObject.swipeLength,a.touchObject.edgeHit=!1,!1===a.options.infinite&&(0===a.currentSlide&&"right"===i||a.currentSlide>=a.getDotCount()&&"left"===i)&&(n=a.touchObject.swipeLength*a.options.edgeFriction,a.touchObject.edgeHit=!0),!1===a.options.vertical?a.swipeLeft=e+n*r:a.swipeLeft=e+n*(a.$list.height()/a.listWidth)*r,!0===a.options.verticalSwiping&&(a.swipeLeft=e+n*r),!0!==a.options.fade&&!1!==a.options.touchMove&&(!0===a.animating?(a.swipeLeft=null,!1):void a.setCSS(a.swipeLeft))))},e.prototype.swipeStart=function(t){var e,i=this;return i.interrupted=!0,1!==i.touchObject.fingerCount||i.slideCount<=i.options.slidesToShow?(i.touchObject={},!1):(void 0!==t.originalEvent&&void 0!==t.originalEvent.touches&&(e=t.originalEvent.touches[0]),i.touchObject.startX=i.touchObject.curX=void 0!==e?e.pageX:t.clientX,i.touchObject.startY=i.touchObject.curY=void 0!==e?e.pageY:t.clientY,i.dragging=!0,void 0)},e.prototype.unfilterSlides=e.prototype.slickUnfilter=function(){var t=this;null!==t.$slidesCache&&(t.unload(),t.$slideTrack.children(this.options.slide).detach(),t.$slidesCache.appendTo(t.$slideTrack),t.reinit())},e.prototype.unload=function(){var e=this;t(".slick-cloned",e.$slider).remove(),e.$dots&&e.$dots.remove(),e.$prevArrow&&e.htmlExpr.test(e.options.prevArrow)&&e.$prevArrow.remove(),e.$nextArrow&&e.htmlExpr.test(e.options.nextArrow)&&e.$nextArrow.remove(),e.$slides.removeClass("slick-slide slick-active slick-visible slick-current").attr("aria-hidden","true").css("width","")},e.prototype.unslick=function(t){var e=this;e.$slider.trigger("unslick",[e,t]),e.destroy()},e.prototype.updateArrows=function(){var t=this;Math.floor(t.options.slidesToShow/2),!0===t.options.arrows&&t.slideCount>t.options.slidesToShow&&!t.options.infinite&&(t.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false"),t.$nextArrow.removeClass("slick-disabled").attr("aria-disabled","false"),0===t.currentSlide?(t.$prevArrow.addClass("slick-disabled").attr("aria-disabled","true"),t.$nextArrow.removeClass("slick-disabled").attr("aria-disabled","false")):t.currentSlide>=t.slideCount-t.options.slidesToShow&&!1===t.options.centerMode?(t.$nextArrow.addClass("slick-disabled").attr("aria-disabled","true"),t.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false")):t.currentSlide>=t.slideCount-1&&!0===t.options.centerMode&&(t.$nextArrow.addClass("slick-disabled").attr("aria-disabled","true"),t.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false")))},e.prototype.updateDots=function(){var t=this;null!==t.$dots&&(t.$dots.find("li").removeClass("slick-active").end(),t.$dots.find("li").eq(Math.floor(t.currentSlide/t.options.slidesToScroll)).addClass("slick-active"))},e.prototype.visibility=function(){var t=this;t.options.autoplay&&(document[t.hidden]?t.interrupted=!0:t.interrupted=!1)},t.fn.slick=function(){var t,i,n=this,r=arguments[0],o=Array.prototype.slice.call(arguments,1),s=n.length;for(t=0;t<s;t++)if("object"==typeof r||void 0===r?n[t].slick=new e(n[t],r):i=n[t].slick[r].apply(n[t].slick,o),void 0!==i)return i;return n}}),define("app/slickInit",["jquery","slick"],function(t){t(function(){t("[data-slick]").slick({dots:!0,speed:500})})}),define("app/header",["jquery","foundation","mmenu"],function(t){t(function(){t("#mmenu").mmenu({extensions:["pagedim-black"],navbar:{add:!0}},{offCanvas:{pageSelector:"#off-canvas-wrapper"}})});var e=function(e){return t("[id='"+e.split("#")[1]+"']").offset().top-t(".sticky").height()},i=t(location).attr("hash");i&&t("html, body").animate({scrollTop:e(i)},1e3),t(document).on("click",'a[href*="#"]',function(i){if(!t("#mmenu").has(t(this)).length){var n=location.origin+location.pathname,r=t(this).attr("href").split("#")[0];r!==n&&""!==r||i.preventDefault(),t("html, body").animate({scrollTop:e(t(this).attr("href"))},1e3)}}),t(document).on("on.zf.toggler",function(){t(".sticky").foundation("_calc",!0)})}),define("app/languageChanger",["jquery"],function(t){t(function(){t("[data-change-language]").on("click",function(e){e.preventDefault(),t("#langChangeCulture").val(t(e.target).data("changeLanguage")),t("#langChange").submit()})})}),define("app/liveChat",["jquery"],function(t){t(function(){var e,i=t("html").attr("lang");switch(i){case"de":e=6;break;case"es":e=4;break;case"fr":e=5;break;default:e=1}window.__lc={license:2049941,skill:1,group:e};var n=document.createElement("script");n.src="https://cdn.livechatinc.com/tracking.js",document.getElementsByTagName("head")[0].appendChild(n);var r=r||{};r.on_after_load=function(){var t=document.getElementById("livechat-compact-container");t.className+="show-for-medium"}})}),define("app/redirector",["jquery"],function(t){var e=t("<form>",{method:"post"}),i=!1;return{set:function(n,r){if(i=!0,r){var o={name:n,value:r,type:"hidden"},s=t("<input>",o);e.append(s)}},go:function(n,r){i?(e.attr("action",n),t("body").append(e),e.submit()):window.location.href=n+(n.indexOf("?")===-1?"?":"&")+r}}}),define("app/Shared/DisplayTemplates/tagSearch",["jquery"],function(t){var e=!1,i=null;return{go:function(n){t(function(){function r(t){t.siblings("[data-tag-results]").empty()}function o(e,i,o){function s(e){t(e.target).is("[data-js-search-dropdown], [data-js-search-dropdown] *")||document.contains(e.target)&&(e.stopPropagation(),r(o),a.off("click",s))}var l=t('<ul class="list list--autocomplete" />');Object.entries(i).forEach(function(i){var r=i[0],o=i[1],s=new RegExp("("+e+")","ig"),a=r.replace(s,"<strong>$1</strong>"),c=t("<span />").append(a);if(c=n(c,r,o),null!==c){var u=t("<li />").append(c);l.append(u)}}),o.siblings("[data-tag-results]").append(l),a.on("click",s)}function s(n){n.stopPropagation();var s=t(this),a=s.val();if(0===a.length)return void r(s);if(l.hasOwnProperty(a)){var c=l[a];if(!t.isEmptyObject(c))return r(s),void o(a,c,s)}if(n.which>=65&&n.which<=90||13===n.which||8===n.which){var u=t.extend({search:a},s.data());i=function(){e=!0,i=null,t.ajax({url:u.tagSearch,method:"POST",data:u,success:function(n){l[a]=n,r(s),t.isEmptyObject(n)||o(a,n,s),i?i():e=!1},error:function(){r(s)}})},e||i()}}var a=t("body"),l={};t("input[data-tag-search]").on("keyup focus",s)})}}}),define("app/Admin/Design/DesignSpotlight/designSpotlight",["jquery","app/Shared/DisplayTemplates/tagSearch"],function(t,e){t(function(){var i=t("div[data-admin-tag-search] input[data-tag-search]");i.each(function(){function i(e,i){t.ajax({url:s.targetRemoveTag,method:"POST",data:{designId:a,tagId:e},success:function(){i.remove()},error:function(){alert("Server error. Tag not removed. Please refer this issue to tech.")}})}function n(e,n){t.ajax({url:s.targetAddTag,method:"POST",data:{designId:a,tagId:n},success:function(){var r=t("[data-admin-template-tag]").clone().removeClass("is-hidden").removeAttr("data-admin-template-tag").data("tag-id",n).text("Remove "+e);r.on("click",function(){i(n,r)}),o.append(r)},error:function(){alert("Server error. Tag not added. Please refer this issue to tech.")}})}var r=t(this),o=r.parents("div[data-admin-tag-search]").find("div[data-admin-tag-search-tag-container]"),s=r.data(),a=o.data("design-id");e.go(function(e,i,r){function s(e){var i=t(e).data("tag-id");return i===r}return 0!==t.grep(o.children(),s).length?null:(e.on("click",function(){e.parents("li").remove(),n(i,r)}),e)}),t("a[data-tag-id]",o).on("click",function(){var e=t(this),n=e.data("tag-id");i(n,e)})}),t("span[data-admin-designer-flag-as-emerging-target]").on("click",function(){var e=t(this),i=t(this).data();t.ajax({url:i.adminDesignerFlagAsEmergingTarget,method:"POST",data:{designerId:i.designerId},success:function(){e.off().text("Designer has been set as emerging.").addClass("disabled")},error:function(){alert("Server error. Designer not set as emerging. Please refer this issue to tech.")}})}),t("span[data-admin-design-enable-in-gallery-target]").on("click",function(){var e=t(this),i=t(this).data();t.ajax({url:i.adminDesignEnableInGalleryTarget,method:"POST",data:{designId:i.designId,enabled:"true"},success:function(){e.off().text("Design has been enabled in gallery.").addClass("disabled")},error:function(){alert("Server error. Design not enabled in gallery. Please refer this issue to tech.")}})}),t("span[data-admin-design-disable-in-gallery-target]").on("click",function(){var e=t(this),i=t(this).data();t.ajax({url:i.adminDesignDisableInGalleryTarget,method:"POST",data:{designId:i.designId,enabled:"false"},success:function(){e.off().text("Design has been disabled in gallery.").addClass("disabled")},error:function(){alert("Server error. Design not disabled in gallery. Please refer this issue to tech.")}})}),t("span[data-admin-design-mark-as-excellent-target]").on("click",function(){var e=t(this),i=t(this).data();t.ajax({url:i.adminDesignMarkAsExcellentTarget,method:"POST",data:{designId:i.designId,excellent:"true"},success:function(){e.off().text("Design has been boosted in gallery.").addClass("disabled")},error:function(){alert("Server error. Design not boosted in gallery. Please refer this issue to tech.")}})}),t("span[data-admin-design-unmark-as-excellent-target]").on("click",function(){var e=t(this),i=t(this).data();t.ajax({url:i.adminDesignUnmarkAsExcellentTarget,method:"POST",data:{designId:i.designId,excellent:"false"},success:function(){e.off().text("Design has been un-boosted in gallery.").addClass("disabled")},error:function(){alert("Server error. Design not un-boosted in gallery. Please refer this issue to tech.")}})}),t("span[data-admin-feature-design-target]").on("click",function(){var e=t(this),i=t(this).data();t.ajax({url:i.adminFeatureDesignTarget,method:"POST",data:{designId:i.designId,designTypeId:i.designTypeId},success:function(){e.off().text("Design has been featured.").addClass("disabled"),window.location=i.success},error:function(){alert("Server error. Design not featured. Please refer this issue to tech.")}})}),t("span[data-admin-unfeature-design-target]").on("click",function(){var e=t(this),i=t(this).data();t.ajax({url:i.adminUnfeatureDesignTarget,method:"POST",data:{designId:i.designId,designTypeId:i.designTypeId},success:function(){e.off().text("Design has been un-featured.").addClass("disabled"),window.location=i.success},error:function(){alert("Server error. Design not un-featured. Please refer this issue to tech.")}})})})}),define("app/Admin/Faq/question",["jquery","app/ajaxForm"],function(t){t(function(){function e(e){var i=t("input[type=checkbox][name=topics]",e).filter(":checked"),n=[];return i.each(function(e,i){n.push(parseInt(t(i).data("topic-id")))}),n}var i=sessionStorage.getItem("successMessage");null!==i&&(t("section .row .column").prepend('<div class="callout success"><p>'+i+"</p></div>"),sessionStorage.removeItem("successMessage"));var n=t("form[data-form-question]");n.each(function(i,n){function r(){var e=t("textarea[name=answer]",n).val();t("div[data-article-view]",n).html(e)}n.prepareFormData=function(){var i=t(this),n=t("input[type=hidden][name=questionId]",i).val();n=n.length>0?parseInt(n):null;var r={QuestionId:n,Language:t("input[type=hidden][name=language]",i).val(),Title:t("input[type=text][name=title]",i).val(),Answer:t("<div/>").text(t("textarea[name=answer]",i).val()).html(),UrlKey:t("input[type=text][name=urlKey]",i).val(),TopicIds:e(i),RelevantToCustomer:t("input[type=checkbox][name=relevantToCustomer]",i).prop("checked"),RelevantToDesigner:t("input[type=checkbox][name=relevantToDesigner]",i).prop("checked"),SortOrder:parseInt(t("input[type=number][name=sortOrder]",i).val())};return r},r(),setInterval(r,3e3)}),n.on("success",function(t,e){sessionStorage.setItem("successMessage",e.SuccessMessage),window.location=e.RedirectUrl})})}),define("app/Admin/Faq/topic",["jquery","app/ajaxForm"],function(t){t(function(){var e=sessionStorage.getItem("successMessage");null!==e&&(t("section .row .column").prepend('<div class="callout success"><p>'+e+"</p></div>"),sessionStorage.removeItem("successMessage"));var i=t("form[data-form-topic]");i.on("success",function(t,e){sessionStorage.setItem("successMessage",e.SuccessMessage),window.location=e.RedirectUrl});var n=t("form[data-form-topic-delete]");n.on("success",function(t,e){sessionStorage.setItem("successMessage",e.SuccessMessage),window.location=e.RedirectUrl})})}),define("app/Admin/Sem/variation",["jquery","app/ajaxForm"],function(t){var e=t("form[data-form-variation]");e.on("success",function(t,i){"Update"===e.data("mode")?alert("Variation updated. Page will reload."):alert("Variation created. Redirecting to edit."),window.location=i.RedirectUrl})}),define("app/Admin/Translations/ajaxTranslations",["jquery","foundation"],function(t){t(function(){$parent=t("table[data-ajax-translations]");var e=$parent.data("target"),i=$parent.data("language");$parent.on("change","input",function(){$input=t(this),$row=$input.closest("tr");var n={language:i,msgctxt:$row.find("[data-msgctxt]").html().trim(),msgid:$row.find("[data-msgid]").html().trim(),msgstr:t("<div />").text($input.val()).html()},r=function(t){var e=new Foundation.Tooltip($input,{disableHover:!0,clickOpen:!1,tipText:t,positionClass:"right"});e.show(),setTimeout(function(){e.destroy()},3e3)};t.ajax({url:e,method:"POST",data:{jsonData:JSON.stringify(n)},success:function(t){r("Saved")},error:function(t,e,i){r("Save Failed :(")}})}),$ddl=t("select[data-edit-mode]"),$ddl.on("change",function(){window.location=t(this).val()})})}),define("app/Brief/extendDeadline",["jquery"],function(t){t("body").on("change","#select-reason",function(e,i){
t(this).prop("selectedIndex")===t(this).data("index-of-reason-other")+1?t("#textarea-reason").prop("disabled",!1):(t("#textarea-reason").prop("disabled","disabled"),t("#extendDeadlineForm").foundation("removeErrorClasses",t("#textarea-reason")))})}),define("app/Brief/increaseBudget",["jquery"],function(t){var e={"increase-1st-place-budget":[{name:"blank",min:0,max:0},{name:"basic",min:50,max:400},{name:"middle",min:500,max:800},{name:"advance",min:900,max:1e3}],"get-additional-designs":[{name:"blank",min:0,max:0},{name:"basic",min:100,max:200},{name:"middle",min:300,max:400},{name:"advance",min:500,max:500}],"add-participation-payments":[{name:"blank",min:0,max:0},{name:"basic",min:1,max:9},{name:"middle",min:10,max:19},{name:"advance",min:20,max:25}]},i=function(e,i){var n;return t.each(e,function(t,e){i.indexOf(e.name)!==-1&&(n=e)}),n},n=function(e,n){var r=e.closest(".js-image-slider-parent"),o=r.find(".js-image-slider-image"),s=o.attr("src"),a=parseInt(e.children(".slider-handle").attr("aria-valuenow"),10);t.each(n,function(t,e){if(a>=e.min&&a<=e.max){i(n,s);o.attr("src",o.data("js-budget-image-"+e.name))}})},r=function(e){var i=e.data("backing-store"),n=parseInt(e.data("backing-divisor"),10),r=parseInt(e.children(".slider-handle").attr("aria-valuenow"),10);isNaN(n)||(r/=n),t("#"+i).val(r)},o=function(){var e=parseInt(t("#IncreaseFirst").val(),10),i=parseInt(t("#AdditionalDesigns").val(),10),n=parseInt(t("#BasePaymentCount").val(),10),r=100*i,o=10*n,s=e+r+o,a=+(.1*s).toFixed(2),l=s+a,c=+(.04*l).toFixed(2),u=l+c,d=parseInt(t("#TaxRate").val(),10),h=+(u*d/100).toFixed(2),f=u+h;0===e&&0===i&&0===n?(t("#sidebar-nothing-selected").show(),t("#sidebar-summary").hide()):(t("#sidebar-nothing-selected").hide(),0===e?t("#summary-increase-first").hide():(t("#summary-increase-first-value").text(e.toFixed(2)),t("#summary-increase-first").show()),0===i?t("#summary-additional-designs").hide():(t("#summary-additional-designs-value").text(r.toFixed(2)),t("#summary-additional-designs").show()),0===n?t("#summary-base-payments").hide():(t("#summary-base-payments-count").text(n),1===n?(t("#summary-base-payments-one").show(),t("#summary-base-payments-not-one").hide()):(t("#summary-base-payments-one").hide(),t("#summary-base-payments-not-one").show()),t("#summary-base-payments-value").text(o.toFixed(2)),t("#summary-base-payments").show()),t("#summary-upgrade-fee").text(a.toFixed(2)),t("#summary-transaction-fee").text(c.toFixed(2)),t("#summary-tax").text(h.toFixed(2)),t("#summary-grand-total").text(f.toFixed(2)),t("#sidebar-summary").show())};t.each(t(".js-image-slider"),function(i,s){t(s).on("moved.zf.slider",function(){n(t(s),e[t(s).data("js-slider-image")]),r(t(s)),o()})})}),define("app/BusinessCardMaker/businessCardMaker",["jquery"],function(t){var e=function(e){t("#save-button").addClass("button-processing").attr("disabled",!0),t("#proceed-button").addClass("button-processing").attr("disabled",!0),t("#admin-update").addClass("button-processing").attr("disabled",!0),e.removeClass("hide")},i=function(e){t("#save-button").removeClass("button-processing").attr("disabled",!1),t("#proceed-button").removeClass("button-processing").attr("disabled",!1),t("#admin-update").removeClass("button-processing").attr("disabled",!1),e.addClass("hide")},n=function(e){t.ajax({type:"POST",url:window.location.href,data:JSON.stringify(e),contentType:"application/json; charset=utf-8",dataType:"json",success:function(e){t("body").data("business-card-id",e),null===e?t("#status-message").text("Business card cannot be saved"):t("#status-message").text("Business card saved")}})};t(function(){t("body").on("click","#save-button",function(){maker.export().then(function(r){r.id=t("body").data("business-card-id");var o=t("#save-button-spinner");e(o),n(r),i(o),setTimeout(function(){t("#status-message").text("")},4e3)})}).on("click","#proceed-button",function(){maker.export().then(function(n){n.id=t("body").data("business-card-id");var r=t("#proceed-button-spinner");e(r),t.ajax({type:"POST",url:window.location.href.split("?")[0]+"/purchase",data:JSON.stringify(n),contentType:"application/json; charset=utf-8",dataType:"json",success:function(t){"success"===t.status?(location.href=t.redirectUrl,i(r)):location.reload()}})})}).on("click","#admin-update",function(){var r=t("#admin-update-spinner");e(r),maker.export().then(function(e){e.id=t("body").data("business-card-id"),n(e),maker.previews().then(function(e){var n=window.location.href.split("?");t.ajax({type:"POST",url:n[0]+"/modify-purchase?"+n[1],data:JSON.stringify(e),contentType:"application/json; charset=utf-8",dataType:"json",success:function(e){"success"===e.status?(t("#status-message").text("Generated new images"),location.href=e.redirectUrl):t("#status-message").text("Could not generate new images");var n=t("#admin-update-spinner");i(n)}})}),setTimeout(function(){t("#status-message").text("")},4e3)})})})}),define("app/DesignerDirectory/designerDirectory",["jquery","app/foundationInit"],function(t){var e={};return t(function(){function i(t){sessionStorage.setItem(h,JSON.stringify(t))}function n(e,i,n){var r=t("[data-selected-designer-template]").clone().removeAttr("data-selected-designer-template").removeClass("is-hidden");t("[data-remove-designer-id]",r).attr("data-remove-designer-id",e),t("img",r).attr("src",i),u.append(r),n.parents("[data-designer-footer-add]").addClass("is-hidden").next("[data-designer-footer-remove]").removeClass("is-hidden")}function r(r,o,s){var l=e.getSelectedDesigners();return 30===l.length?void alert(t("[data-max-designer-message]").data("max-designer-message")):(l.push({id:r,url:o}),i(l),n(r,o,s),void a())}function o(e){var i=t("[data-designer-footer-remove]");void 0!==e&&(i=i.filter(":has([data-remove-designer-id="+e+"])")),i.addClass("is-hidden").prev("[data-designer-footer-add]").removeClass("is-hidden")}function s(n){function r(t){return t.id!==n}i(t.grep(e.getSelectedDesigners(),r)),t("[data-selected-designer]:has([data-remove-designer-id="+n+"])").remove(),o(n),a()}function a(){var t=e.getSelectedDesigners().length>0;t?c.removeClass("is-hidden"):c.addClass("is-hidden")}function l(){t.each(e.getSelectedDesigners(),function(e,i){var r=t("[data-add-designer-id="+i.id+"]");n(i.id,i.url,r)}),a()}var c=t("#designer-shortlist"),u=t("[data-selected-designers]",c),d="invited",h="selected";e.getSelectedDesigners=function(){return JSON.parse(sessionStorage.getItem(h)||"[]")},e.clearSelectedDesigners=function(){sessionStorage.removeItem(h)},e.getInvitedDesigners=function(){return JSON.parse(sessionStorage.getItem(d)||"{}")},e.runPostSuccess=function(i,n){var r=parseInt(t("input[type=hidden][name=briefId]",i).val()),o=e.getInvitedDesigners();o[r]=o[r]||[];var s=JSON.parse(t("input[type=hidden][name=validDesignerIds]",i).val());t.merge(o[r],s),o[r]=t.unique(o[r]),sessionStorage.setItem(d,JSON.stringify(o));var a=t("section .row .column").first();t(".callout.callout--no-icon.success",a).remove();var l=t('<div class="callout callout--no-icon success"><p>'+n+"</p></div>");a.prepend(l),t("html,body").scrollTop(0);var c=i.closest("div.reveal.modal");t("body").trigger("clearSelection"),c.foundation("close")},t("body").on("click","[data-add-designer-id]",function(){var e=t(this).data("add-designer-id"),i=t(this).data("add-designer-profile-pic-url");r(e,i,t(this))}).on("click","[data-remove-designer-id]",function(){var e=t(this).data("remove-designer-id");s(e)}).on("click","[data-go-to-order-system-with-designers]",function(){var i=[];t.each(e.getSelectedDesigners(),function(t,e){i.push(e.id)}),e.clearSelectedDesigners();var n="?designerIds="+encodeURIComponent(i.join(", "));window.location.href=t("[data-order-url-base]").data("order-url-base")+n}).on("clearSelection",function(){e.clearSelectedDesigners(),u.empty(),a(),o()}),l()}),e}),define("app/DesignerDirectory/filter",["jquery"],function(t){t(function(){var e="form[data-designer-list-filter-form]";t("body").on("click",e+" img[data-submit-on-click]",function(){var e=t(this).closest("form");e.submit()}).on("keyup",e+" input[data-submit-on-keyup]",function(e){if(13===e.which){var i=t(this).closest("form");i.submit()}}).on("change",e+" select[data-submit-on-change]",function(){var e=t(this).closest("form");e.submit()}).on("change",e+" select[data-submit-on-change-clear-city]",function(){var e=t(this).closest("form");t("input[type=hidden][name=cityName]").val(""),e.submit()})})}),define("app/DesignerDirectory/Invite/message",["jquery","app/DesignerDirectory/designerDirectory"],function(t,e){var i="form[data-modal-designerdirectoryinvitemessage-form]";t(function(){t("body").on("success",i,function(i,n){var r=t(this).closest("form");e.runPostSuccess(r,n.SuccessMessage)})})}),define("app/Validator/integer",["jquery","app/foundationInit"],function(t,e){e.addValidator("integer",function(e,i,n){var r=t('[data-form-error-for="'+e.attr("name")+'"]',e.closest("form"));0==r.length&&(r=e.siblings("span.form-error"));var o=e.val();if(i&&!o.length)return r.addClass("is-visible"),!1;if(!o.length)return!0;if(!t.isNumeric(o))return r.text(r.data("err-integer")),r.addClass("is-visible"),!1;var s=Number(o);if(Math.floor(s)!==s)return r.text(r.data("err-integer")),r.addClass("is-visible"),!1;var a=parseInt(o);if(e.is("[data-minimum]")){var l=e.data("minimum"),c=parseInt(l);if(a<c)return r.text(r.data("err-minimum")),r.addClass("is-visible"),!1}if(e.is("[data-maximum]")){var u=e.data("maximum"),d=parseInt(u);if(a>d)return r.text(r.data("err-maximum")),r.addClass("is-visible"),!1}return e.removeClass("is-invalid-input"),r.removeClass("is-visible"),!0})}),define("app/DesignerDirectory/Invite/paymentAmount",["jquery","app/DesignerDirectory/designerDirectory","app/Validator/integer"],function(t,e){var i="form[data-modal-designerdirectoryinvitepaymentamount-form]";t(function(){t("body").on("success",i,function(t,i){e.clearSelectedDesigners(),window.location=i.RedirectUrl})}),t(i).closest("div.reveal.modal").children().foundation()}),define("app/DesignerDirectory/Invite/selectBrief",["jquery","app/DesignerDirectory/designerDirectory","app/ajaxModal"],function(t,e,i){t(function(){function n(i){var n=t("select[data-invite-modal-brief]",i).find(":selected"),r=parseInt(n.val());t("input[type=hidden][name=briefId]",i).val(r);var o=parseInt(n.data("payments-left"));t("span[data-invite-modal-payments-left]",i).text(o);var s=t("input[type=radio][name=applyParticipationPayment][value=true]",i).prop("checked"),a=t("div[data-invite-modal-use-existing-payments-option]",i),l=t("input[type=checkbox][name=useExisting]",i);o>0&&s?a.removeClass("is-hidden"):(a.addClass("is-hidden"),l.prop("checked",!1));var c=t("input[type=hidden][name=selectedDesignerIds]",i),u=t("input[type=hidden][name=validDesignerIds]",i),d=e.getSelectedDesigners(),h=!1,f=[];if(d.length>0){t.each(d,function(t,e){f.push(e.id)}),c.val(JSON.stringify(f));var p=t("div[data-invite-modal-not-enough-payments]",i);l.prop("checked")&&f.length>o?(p.removeClass("is-hidden"),h=!0):p.addClass("is-hidden")}var g=n.data("designers")||[],m=e.getInvitedDesigners();t.merge(g,m[r]||[]);var v=t.unique(f.filter(function(t){return!g.includes(t)}));u.val(JSON.stringify(v));var y=t("div[data-invite-modal-designer-already-invited]",i);0===v.length?(y.removeClass("is-hidden"),h=!0):y.addClass("is-hidden"),t("button[data-next]",i).prop("disabled",h)}var r="form[data-modal-designerdirectoryinviteselectbrief-form]";t("body").on("success",r,function(n,r){if("string"==typeof r)return void i.new(r);var o=t(this).closest("form");e.runPostSuccess(o,r.SuccessMessage)}).on("modal-initialised","div.reveal.modal:has("+r+")",function(){var e=t(this).find("form");n(e)}).on("change",r+" input[type=radio][name=applyParticipationPayment]",function(){var e=t(this).closest("form");n(e)}).on("change",r+" input[type=checkbox][name=useExisting]",function(){var e=t(this).closest("form");n(e)}).on("change",r+" select[data-invite-modal-brief]",function(){var e=t(this).closest("form");n(e)}),t(r).closest("div.reveal.modal").trigger("modal-initialised")})}),define("app/DesignGallery/designGallery",["jquery","app/Shared/DisplayTemplates/tagSearch","app/ajaxForm"],function(t,e){t(function(){e.go(function(t,e,i){return t.on("click",function(){i.indexOf("?")===-1?window.location.href=i+"?search=true":i.indexOf("?search=")===-1&&i.indexOf("&search=")===-1?window.location.href=i+"&search=true":window.location.href=i}),t})});var i="form[data-email-capture]";t("body").on("success",i,function(e,i){var n=t(this).closest("form"),r=n.data("success"),o=t("#getStartedBusinessName").val();o&&o.length>0&&(r+="&logoText="+encodeURI(o)),window.location=r})}),define("app/DesignHandover/customerOnsellToDesigner",["jquery","app/redirector","app/ajaxForm"],function(t,e){t("body").on("success",'[data-ajax-form="customerOnsellToDesigner"]',function(t,e){window.location=e.RedirectUrl}).on("change",'[data-ajax-form="customerOnsellToDesigner"] [data-role="design-type-select"]',function(){t('[data-ajax-form="customerOnsellToDesigner"] [data-role="price-display"]').val(""),t('[data-ajax-form="customerOnsellToDesigner"] [data-role="posting-fee-display"]').hide(),t('[data-ajax-form="customerOnsellToDesigner"] [data-role="posting-fee-spinner"]').show(),t('[data-ajax-form="customerOnsellToDesigner"] [data-role="submit"]').attr("disabled","disabled");var e={designType:t('[data-ajax-form="customerOnsellToDesigner"] [data-role="design-type-select"]').val(),designerId:t('[data-ajax-form="customerOnsellToDesigner"]').data("designer-id"),currencyId:t('[data-ajax-form="customerOnsellToDesigner"]').data("currency-id")};t.ajax({url:"/onsellpricing/",type:"POST",contentType:"application/json; charset=utf-8",data:JSON.stringify(e),success:function(e){t('[data-ajax-form="customerOnsellToDesigner"] [data-role="price-display"]').val(e.DefaultPrice),t('[data-ajax-form="customerOnsellToDesigner"] [data-role="submit"]').removeAttr("disabled"),t('[data-ajax-form="customerOnsellToDesigner"] [data-role="posting-fee-spinner"]').hide(),t('[data-ajax-form="customerOnsellToDesigner"] [data-role="posting-fee-display"]').show(),e.DesignerHasSkill?t('[data-ajax-form="customerOnsellToDesigner"] [data-role="skill-warning"]').hide():t('[data-ajax-form="customerOnsellToDesigner"] [data-role="skill-warning"]').show()}})})}),define("app/DesignHandover/orders",["jquery","app/ajaxForm"],function(t){t("body").on("success",'[data-ajax-form="orders"]',function(t){})}),define("app/DesignHandover/rejected1On1",["jquery"],function(t){t("body").on("click","a[data-reallocate-rejected-offer]",function(e){e.preventDefault(),t("form[data-reallocate-rejected-offer]").submit()}).on("click","a[data-reinvite-rejected-offer]",function(e){t("div[data-rejected-information]").addClass("is-hidden"),t("div[data-rejected-increase-budget-options]").removeClass("is-hidden")}).on("click","button[data-reinvite-rejected-offer-cancel]",function(e){t("div[data-rejected-information]").removeClass("is-hidden"),t("div[data-rejected-increase-budget-options]").addClass("is-hidden")})}),define("app/DesignHandover/requestChanges",["jquery","app/redirector","app/ajaxForm"],function(t,e){var i="[data-ajax-form=requestChanges]";t(function(){t(i).each(function(e,i){i.prepareFormData=function(){var e=t(this),i=e.find("[name=reply]").val(),n=t("<div />").text(i).html(),r={reply:n,selectedSubmissionId:e.find("[name=selectedSubmissionId]").val(),replyToSubmissionId:e.find("[name=replyToSubmissionId]").val(),replyToExtraFileSequence:e.find("[name=replyToExtraFileSequence]").val(),messageType:e.find("[name=messageType]").val()};return r}})}),t("body").on("success",i,function(i){var n=t(this).data().indicatorType;e.go(document.location.href,"indicatorType="+n)}).on("click","[data-btn-toggle-request-changes-form]",function(e){var n=t(this).data().submissionId,r=i+'[data-submission-id="'+n+'"]',o=t(this).data().extraFileSequence;if("undefined"!=typeof o){var s=t(r+' input[type="hidden"][name="replyToExtraFileSequence"]');s.val(o)}t(r).toggleClass("is-hidden")})}),!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define("clipboard",[],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.Clipboard=t()}}(function(){var t;return function t(e,i,n){function r(s,a){if(!i[s]){if(!e[s]){var l="function"==typeof require&&require;if(!a&&l)return l(s,!0);if(o)return o(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var u=i[s]={exports:{}};e[s][0].call(u.exports,function(t){var i=e[s][1][t];return r(i||t)},u,u.exports,t,e,i,n)}return i[s].exports}for(var o="function"==typeof require&&require,s=0;s<n.length;s++)r(n[s]);return r}({1:[function(t,e,i){function n(t,e){for(;t&&t.nodeType!==r;){if("function"==typeof t.matches&&t.matches(e))return t;t=t.parentNode}}var r=9;if("undefined"!=typeof Element&&!Element.prototype.matches){var o=Element.prototype;o.matches=o.matchesSelector||o.mozMatchesSelector||o.msMatchesSelector||o.oMatchesSelector||o.webkitMatchesSelector}e.exports=n},{}],2:[function(t,e,i){function n(t,e,i,n,o){var s=r.apply(this,arguments);return t.addEventListener(i,s,o),{destroy:function(){t.removeEventListener(i,s,o)}}}function r(t,e,i,n){return function(i){i.delegateTarget=o(i.target,e),i.delegateTarget&&n.call(t,i)}}var o=t("./closest");e.exports=n},{"./closest":1}],3:[function(t,e,i){i.node=function(t){return void 0!==t&&t instanceof HTMLElement&&1===t.nodeType},i.nodeList=function(t){var e=Object.prototype.toString.call(t);return void 0!==t&&("[object NodeList]"===e||"[object HTMLCollection]"===e)&&"length"in t&&(0===t.length||i.node(t[0]))},i.string=function(t){return"string"==typeof t||t instanceof String},i.fn=function(t){return"[object Function]"===Object.prototype.toString.call(t)}},{}],4:[function(t,e,i){function n(t,e,i){if(!t&&!e&&!i)throw new Error("Missing required arguments");if(!a.string(e))throw new TypeError("Second argument must be a String");if(!a.fn(i))throw new TypeError("Third argument must be a Function");if(a.node(t))return r(t,e,i);if(a.nodeList(t))return o(t,e,i);if(a.string(t))return s(t,e,i);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}function r(t,e,i){return t.addEventListener(e,i),{destroy:function(){t.removeEventListener(e,i)}}}function o(t,e,i){return Array.prototype.forEach.call(t,function(t){t.addEventListener(e,i)}),{destroy:function(){Array.prototype.forEach.call(t,function(t){t.removeEventListener(e,i)})}}}function s(t,e,i){return l(document.body,t,e,i)}var a=t("./is"),l=t("delegate");e.exports=n},{"./is":3,delegate:2}],5:[function(t,e,i){function n(t){var e;if("SELECT"===t.nodeName)t.focus(),e=t.value;else if("INPUT"===t.nodeName||"TEXTAREA"===t.nodeName){var i=t.hasAttribute("readonly");i||t.setAttribute("readonly",""),t.select(),t.setSelectionRange(0,t.value.length),i||t.removeAttribute("readonly"),e=t.value}else{t.hasAttribute("contenteditable")&&t.focus();var n=window.getSelection(),r=document.createRange();r.selectNodeContents(t),n.removeAllRanges(),n.addRange(r),e=n.toString()}return e}e.exports=n},{}],6:[function(t,e,i){function n(){}n.prototype={on:function(t,e,i){var n=this.e||(this.e={});return(n[t]||(n[t]=[])).push({fn:e,ctx:i}),this},once:function(t,e,i){function n(){r.off(t,n),e.apply(i,arguments)}var r=this;return n._=e,this.on(t,n,i)},emit:function(t){var e=[].slice.call(arguments,1),i=((this.e||(this.e={}))[t]||[]).slice(),n=0,r=i.length;for(n;n<r;n++)i[n].fn.apply(i[n].ctx,e);return this},off:function(t,e){var i=this.e||(this.e={}),n=i[t],r=[];if(n&&e)for(var o=0,s=n.length;o<s;o++)n[o].fn!==e&&n[o].fn._!==e&&r.push(n[o]);return r.length?i[t]=r:delete i[t],this}},e.exports=n},{}],7:[function(e,i,n){!function(r,o){if("function"==typeof t&&t.amd)t(["module","select"],o);else if(void 0!==n)o(i,e("select"));else{var s={exports:{}};o(s,r.select),r.clipboardAction=s.exports}}(this,function(t,e){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var r=i(e),o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}(),a=function(){function t(e){n(this,t),this.resolveOptions(e),this.initSelection()}return s(t,[{key:"resolveOptions",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.action=t.action,this.container=t.container,this.emitter=t.emitter,this.target=t.target,this.text=t.text,this.trigger=t.trigger,this.selectedText=""}},{key:"initSelection",value:function(){this.text?this.selectFake():this.target&&this.selectTarget()}},{key:"selectFake",value:function(){var t=this,e="rtl"==document.documentElement.getAttribute("dir");this.removeFake(),this.fakeHandlerCallback=function(){return t.removeFake()},this.fakeHandler=this.container.addEventListener("click",this.fakeHandlerCallback)||!0,this.fakeElem=document.createElement("textarea"),this.fakeElem.style.fontSize="12pt",this.fakeElem.style.border="0",this.fakeElem.style.padding="0",this.fakeElem.style.margin="0",this.fakeElem.style.position="absolute",this.fakeElem.style[e?"right":"left"]="-9999px";var i=window.pageYOffset||document.documentElement.scrollTop;this.fakeElem.style.top=i+"px",this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=this.text,this.container.appendChild(this.fakeElem),this.selectedText=(0,r.default)(this.fakeElem),this.copyText()}},{key:"removeFake",value:function(){this.fakeHandler&&(this.container.removeEventListener("click",this.fakeHandlerCallback),this.fakeHandler=null,this.fakeHandlerCallback=null),this.fakeElem&&(this.container.removeChild(this.fakeElem),this.fakeElem=null)}},{key:"selectTarget",value:function(){this.selectedText=(0,r.default)(this.target),this.copyText()}},{key:"copyText",value:function(){var t=void 0;try{t=document.execCommand(this.action)}catch(e){t=!1}this.handleResult(t)}},{key:"handleResult",value:function(t){this.emitter.emit(t?"success":"error",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})}},{key:"clearSelection",value:function(){this.trigger&&this.trigger.focus(),window.getSelection().removeAllRanges()}},{key:"destroy",value:function(){this.removeFake()}},{key:"action",set:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"copy";if(this._action=t,"copy"!==this._action&&"cut"!==this._action)throw new Error('Invalid "action" value, use either "copy" or "cut"')},get:function(){return this._action}},{key:"target",set:function(t){if(void 0!==t){if(!t||"object"!==(void 0===t?"undefined":o(t))||1!==t.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===this.action&&t.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===this.action&&(t.hasAttribute("readonly")||t.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');this._target=t}},get:function(){return this._target}}]),t}();t.exports=a})},{select:5}],8:[function(e,i,n){!function(r,o){if("function"==typeof t&&t.amd)t(["module","./clipboard-action","tiny-emitter","good-listener"],o);else if(void 0!==n)o(i,e("./clipboard-action"),e("tiny-emitter"),e("good-listener"));else{var s={exports:{}};o(s,r.clipboardAction,r.tinyEmitter,r.goodListener),r.clipboard=s.exports}}(this,function(t,e,i,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function l(t,e){var i="data-clipboard-"+t;if(e.hasAttribute(i))return e.getAttribute(i)}var c=r(e),u=r(i),d=r(n),h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},f=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}(),p=function(t){function e(t,i){o(this,e);var n=s(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return n.resolveOptions(i),n.listenClick(t),n}return a(e,t),f(e,[{key:"resolveOptions",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof t.action?t.action:this.defaultAction,this.target="function"==typeof t.target?t.target:this.defaultTarget,this.text="function"==typeof t.text?t.text:this.defaultText,this.container="object"===h(t.container)?t.container:document.body}},{key:"listenClick",value:function(t){var e=this;this.listener=(0,d.default)(t,"click",function(t){return e.onClick(t)})}},{key:"onClick",value:function(t){var e=t.delegateTarget||t.currentTarget;this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=new c.default({action:this.action(e),target:this.target(e),text:this.text(e),container:this.container,trigger:e,emitter:this})}},{key:"defaultAction",value:function(t){return l("action",t)}},{key:"defaultTarget",value:function(t){var e=l("target",t);if(e)return document.querySelector(e)}},{key:"defaultText",value:function(t){return l("text",t)}},{key:"destroy",value:function(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)}}],[{key:"isSupported",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["copy","cut"],e="string"==typeof t?[t]:t,i=!!document.queryCommandSupported;return e.forEach(function(t){i=i&&!!document.queryCommandSupported(t)}),i}}]),e}(u.default);t.exports=p})},{"./clipboard-action":7,"good-listener":4,"tiny-emitter":6}]},{},[8])(8)}),define("app/DiscountCode/clipboard",["jquery","clipboard"],function(t,e){t(function(){if(document.queryCommandSupported("copy")){var i=new e(".js-discount-code-btn");i.on("success",function(e){t(e.trigger).prop("disabled",!0),setTimeout(function(){t(e.trigger).prop("disabled",!1)},2e3)})}else t(".js-discount-code-btn").addClass("hide")})}),define("app/Jobs/addToWatchlist",["jquery","app/foundationInit"],function(t){t(function(){function e(e){var i=e.clone();e.attr("disabled","disabled").html('<i class="project-card__icon-watchlist"></i> <span>'+e.data("loading-text")+"</span>"),t.ajax({url:e.data("watchlist-url"),type:"POST",data:{briefId:e.data("watchlist-brief-id")},success:function(t){e.html('<i class="project-card__icon-watchlist is-watched"></i> <span>'+e.data("watchlist-added-msg")+"</span>"),_gaq.push(["_trackEvent","Designer","WatchlistAdd",t.Tracking]),dataLayer.push({eventCategory:"Designer",eventAction:"WatchlistAdd",eventLabel:t.Tracking,event:"Member"})},error:function(){alert("An error has occurred."),e.replaceWith(i)}})}t("body").on("click","[data-watchlist-url]:not([disabled])",function(){e(t(this))})})}),define("app/Jobs/jobDetail",["jquery","app/foundationInit"],function(t){t(function(){function e(t){t.prop("disabled",!0),window.location=t.children("option:selected").data("url")}t("body").on("change","[data-role='language-picker']:not([disabled])",function(){e(t(this))}).on("click","[data-role='remove-comment']",function(){return confirm("Are you sure?")})})}),define("app/Jobs/jobsList",["jquery","app/foundationInit"],function(t){t(function(){var e="form[data-jobs-list-filter-form]";t("body").on("change",e+" select[data-submit-on-change]",function(){t(this).closest("form").submit()}).on("change",e+" input[data-submit-on-change]",function(){t(this).closest("form").submit()})})}),define("app/LegalDocument/legals",["jquery","app/ajaxForm"],function(t){var e="form[data-legals-form]";t("body").on("success",e,function(e,i){var n=t(this).closest("form");window.location=n.data("success")})}),define("app/LegalDocument/nonDisclosureIntro",["jquery","app/ajaxForm"],function(t){var e="form[data-legals-form]";t("body").on("success",e,function(t,e){window.location=e.RedirectUrl})}),define("app/Login/loginOrRegistrationRedirect",["jquery","app/redirector"],function(t,e){var i="successUrl";t(function(){t("body").on("login-or-registration-redirect","form",function(n,r){var o=t("input[type=hidden][name=successRedirects]").val(),s=JSON.parse(o);"Customer"===r.UserType?r.IsNewUserRegistration?r.IsWholesaleCustomer?(e.set(i,s.CustomerCustom),e.go(s.CustomerRegisteredNeedsStep2)):e.go(s.CustomerCustom||s.CustomerRegistered):r.NeedsLegalsAgreement?(e.set(i,s.CustomerCustom||s.CustomerLoggedIn),e.go(s.NeedsToAgreeToLegals)):e.go(s.CustomerCustom||s.CustomerLoggedIn):"Designer"===r.UserType&&(r.IsNewUserRegistration?(e.set(i,s.DesignerCustom),e.go(s.DesignerRegistered)):r.NeedsLegalsAgreement?(e.set(i,s.DesignerCustom||s.DesignerLoggedIn),e.go(s.NeedsToAgreeToLegals)):e.go(s.DesignerCustom||s.DesignerLoggedIn))})})}),define("app/Login/authEmail",["jquery","app/ajaxForm","app/Login/loginOrRegistrationRedirect"],function(t,e){var i="form[data-email-auth-form]",n=t("input[type=hidden][name=authActions]").val(),r=JSON.parse(n);t("body").on("success",i,function(e,i){t(this).trigger("login-or-registration-redirect",i)}).on("click",i+" input[type=radio][name=userType][data-customer]",function(){var e=t(this).closest("form");t("fieldset[data-registration-checkboxes]",e).removeClass("is-hidden")}).on("click",i+" input[type=radio][name=userType][data-designer]",function(){var e=t(this).closest("form");t("fieldset[data-registration-checkboxes]",e).addClass("is-hidden")}).on("change",i+" input[type=radio][name=userType]",function(){var i=t(this).closest("form"),n=t(this),o=n.val();e.setDataAction(i,r[o])}).on("change",i+" input[type=checkbox][name=wantsOutsource]",function(){var e=t(this).closest("form"),i=t("input[type=checkbox][name=wantsEmail]",e);t(this).prop("checked")&&i.prop("checked",!0),i.prop("disabled",t(this).prop("checked"))})}),define("app/Login/authSocialMedia",["jquery","app/Login/loginOrRegistrationRedirect"],function(t){var e=new function(){this.loginForm="form[data-social-login]",this.registerForm="form[data-social-register]",this.forms=this.loginForm+","+this.registerForm};return t("body").on("success",e.forms,function(e,i){t(this).trigger("login-or-registration-redirect",i)}).on("ambiguous",e.loginForm,function(){var e=t(this),i=t(this).parent().siblings("div[data-social-register-form-frame]");i.removeClass("is-hidden");var n=t("form",i);n.attr("target",e.attr("target"));var r=t("input[type=hidden][name=source]",e),o=r.val();t("input[name=source]",i).val(o)}).on("click",e.registerForm+" input[name=socialUserType]",function(){var e=t(this).closest("form");t("button",e).removeClass("is-hidden")}).on("click",e.registerForm+" input[name=socialUserType][data-customer]",function(){var e=t(this).closest("form");t("fieldset[data-registration-checkboxes]",e).removeClass("is-hidden")}).on("click",e.registerForm+" input[name=socialUserType][data-designer]",function(){var e=t(this).closest("form");t("fieldset[data-registration-checkboxes]",e).addClass("is-hidden");
}).on("change",e.registerForm+" input[type=checkbox][name=wantsOutsource]",function(){var e=t(this).closest("form"),i=t("input[type=checkbox][name=wantsEmail]",e);t(this).prop("checked")&&i.prop("checked",!0),i.prop("disabled",t(this).prop("checked"))}).on("enable-social-buttons",e.loginForm,function(){var e=t(this);t("button.button__social",e).prop("disabled",!1)}),{formSocialLoginSelector:e.loginForm,buttonClick:function(i){if(!i.attr("disabled")){var n=t(e.forms),r=i.data("action");n.attr("data-action",r).data("action",r);var o=i.data("source");t("input[name=source]",n).val(o)}}}}),define("app/SocialMedia/facebook",["jquery","facebook"],function(t){return FB.init({appId:"365230846906902",xfbml:!0,version:"v2.10"}),{go:function(e){console.log("fb init"),"function"==typeof e&&t(e)}}}),define("app/Login/authFacebook",["jquery","app/ajaxForm","app/Login/authSocialMedia","app/SocialMedia/facebook"],function(t,e,i,n){n.go(function(){FB.AppEvents.logPageView(),t("body").on("click",i.formSocialLoginSelector+" .js-button-facebook",function(){var e=t(this);i.buttonClick(e),FB.login(function(i){if("connected"===i.status)t("input[name=fbAccessToken]").val(i.authResponse.accessToken),e.closest("form").submit();else{var n=t(e).closest("form");n.trigger("clear-clicked").trigger("enable-social-buttons")}},{scope:"email"})})})}),define("app/Login/authGoogle",["jquery","app/Login/authSocialMedia","app/ajaxForm","google"],function(t,e){return{init:function(i,n){gapi.load("auth2",function(){gapi.auth2.init({client_id:i});var r=gapi.auth2.getAuthInstance();t("body").on("click",e.formSocialLoginSelector+" .js-button-google",function(){var i=t(this);e.buttonClick(i);r.signIn({scope:n}).then(function(e){t("input[name=gUserIdToken]").val(e.getAuthResponse().id_token),i.closest("form").submit()},function(e){var n=t(i).closest("form");n.trigger("clear-clicked").trigger("enable-social-buttons")})})})}}}),define("app/Login/forgotPassword",["jquery","app/ajaxForm"],function(t){t("#js-form-forgot-password").on("success",function(e,i){window.location=t(this).data("success")})}),define("app/Login/updatePassword",["jquery","app/ajaxForm"],function(t){t("#js-form-update-password").on("success",function(e,i){window.location=t(this).data("success")})}),define("app/Modal/DesignHandover/designApproval",["jquery","app/redirector","app/ajaxForm"],function(t,e){t("body").on("success",'[data-ajax-form="designApproval"]',function(t,i){e.go(i.RedirectUrl)})}),define("app/Modal/DesignHandover/upsellModals",["jquery","app/ajaxModal"],function(t,e){t(function(){var i="get-upsell-modals-displayed";if("true"!==localStorage.getItem(i)){var n=t("[data-upsell-modal-web-hosting]").first(),r=t("[data-upsell-businesscard-printing]").first(),o={briefId:n.data().briefId};e.modalize(n,o,function(){e.modalize(r,o)}),localStorage.setItem(i,"true")}})}),define("app/Modal/designFeatured",["jquery"],function(t){t(function(){var e=t("link[rel=canonical]"),i=window.location.href;e.length&&(i=e.attr("href"));var n=t("[data-design-featured]").data("design-id");window.dataLayer.push({eventCategory:"Modal",eventAction:n,eventLabel:i,event:"Modal"})})}),define("app/Modal/helpArticle",["jquery"],function(t){t(function(){var e=t("link[rel=canonical]"),i=window.location.href;e.length&&(i=e.attr("href"));var n=t("#modal-money-back-guarantee [data-help-article-url-key]").data("help-article-url-key");window.dataLayer.push({eventCategory:"Modal",eventAction:n,eventLabel:i,event:"Modal"})})}),define("app/Modal/howItWorks",["jquery"],function(t){t(function(){var e=t("link[rel=canonical]"),i=window.location.href;e.length&&(i=e.attr("href")),window.dataLayer.push({eventCategory:"Modal",eventAction:"How It Works",eventLabel:"howItWorksVideoModal",event:"Modal"})})}),define("app/Modal/registerCustomer",["jquery"],function(t){t(function(){var e=t("link[rel=canonical]"),i=window.location.href;e.length&&(i=e.attr("href")),window.dataLayer.push({eventCategory:"Modal",eventAction:"CustomerRegistration",eventLabel:i,event:"Modal"})})}),define("app/Modal/registerDesigner",["jquery"],function(t){t(function(){var e=t("link[rel=canonical]"),i=window.location.href;e.length&&(i=e.attr("href")),window.dataLayer.push({eventCategory:"Modal",eventAction:"DesignerRegistration",eventLabel:i,event:"Modal"})})}),define("app/Modal/webStyle",["jquery"],function(t){t(function(){function e(){r.addClass("is-hidden"),n.removeClass("is-hidden")}function i(){n.addClass("is-hidden"),r.removeClass("is-hidden")}var n,r;t("body").on("modal-initialised","#modal-webstyle",function(){n=t("#modal-webstyle [data-webstyle][data-action-select]"),r=t("#modal-webstyle [data-webstyle][data-action-deselect]");var e=t("[data-webstyle]",t(this)).first().data("webstyle");t("[data-webstyle="+e+"][data-webstyle-selected]").length&&i()}).on("click","#modal-webstyle [data-webstyle][data-action-select]",function(){i()}).on("click","#modal-webstyle [data-webstyle][data-action-deselect]",function(){e()}),t("#modal-webstyle").trigger("modal-initialised")})}),define("app/Modal/registerCustomerAlternate",["jquery","app/ajaxForm","app/Login/loginOrRegistrationRedirect"],function(t){var e="form[data-registration-customer-alternate-form]";t("body").on("success",e,function(e,i){t(this).trigger("login-or-registration-redirect",i)});var i=t("link[rel=canonical]"),n=window.location.href;i.length&&(n=i.attr("href")),window.dataLayer.push({eventCategory:"Modal",eventAction:"CustomerRegistrationAlternate",eventLabel:n,event:"Modal"})}),define("app/OrderConfirmation/completeYourAccount",["jquery","app/ajaxForm"],function(t){var e="form[data-survey-form]",i=t(e+" div[data-free-text-container]"),n=t(e+" label[data-free-text-label]"),r=t(e+" input[name=moreInfo]");t("body").on("success",e,function(t,e){window.location=e.RedirectUrl}).on("change",e+" select[data-how-they-heard]",function(){t("input[data-js-more-info]").val("");var o=t(e+" select[data-how-they-heard] option:selected").data("free-text");0!==o.length?(n.text(o),i.removeClass("is-hidden"),r.attr("required","required")):(i.addClass("is-hidden"),r.removeAttr("required"))})}),define("app/OrderConfirmation/guarantee",["jquery"],function(t){var e="form[data-js-guarantee-form]",i="is-selected",n="a[data-js-button]",r="div[data-js-container]",o=function(e){t(n).removeClass(i),t(r).removeClass(i),e.addClass(i),e.parents(r).addClass(i),t(".js-budget-button-text").toggleClass("hide")};t("body").on("click",n,function(){if(!t(this).hasClass(i)){o(t(this));var n=t(this).data("js-guaranteed");t(e+" input[data-js-guarantee-input]").val(n)}})}),define("app/OrderConfirmation/privacy",["jquery"],function(t){var e="form[data-js-private-project-form]",i="is-selected",n="a[data-js-button]",r="div[data-js-container]",o=function(e){t(n).removeClass(i),t(r).removeClass(i),e.addClass(i),e.parent(r).addClass(i),t(".js-budget-button-text").toggleClass("hide")};t("body").on("click",n,function(){if(!t(this).hasClass(i)){o(t(this));var n=t(this).data("js-private");t(e+" input[data-js-private-project-input]").val(n)}})}),define("app/Outsource/enquiry",["jquery","app/ajaxForm"],function(t){t("body").on("modal-initialised","#modal-outsource-enquiry",function(e){function i(){l.show(),c.hide(),u.hide(),r.hide(),s.hide(),a.hide(),t("div[data-design-type]").first().toggleClass("tile--selected"),window.dataLayer.push({eventCategory:"Modal",eventAction:"outsource",eventLabel:"designConsultationStep1",event:"Modal"})}var n=t(".modal__footer #btnCancel",e.target),r=t(".modal__footer #btnBack",e.target),o=t(".modal__footer #btnNext",e.target),s=t(".modal__footer #btnSubmit",e.target),a=t(".modal__footer #btnClose",e.target),l=t("#panelDesignType",e.target),c=t("#panelUserDetails",e.target),u=t("#panelThankYou",e.target);r.on("click",function(){l.show(),c.hide(),n.show(),r.hide(),o.show(),s.hide()}),o.on("click",function(){l.hide(),c.show(),n.hide(),r.show(),o.hide(),s.show(),window.dataLayer.push({eventCategory:"Modal",eventAction:"outsource",eventLabel:"designConsultationStep2",event:"Modal"})}),i()});var e="form[data-modal-outsourceenquiry-form]";t("body").on("click",e+" div[data-design-type]",function(e,i){t(".tile--selected").toggleClass("tile--selected"),t(this).toggleClass("tile--selected"),t("#DesignType").val(t(this).data("design-type"))}),t("body").on("success",e,function(e,i){var n=t(".modal__footer #btnBack"),r=t(".modal__footer #btnSubmit"),o=t(".modal__footer #btnClose"),s=t("#panelUserDetails"),a=t("#panelThankYou");s.hide(),a.show(),n.hide(),r.hide(),o.show(),t(this).toggleClass("is-disabled"),window.dataLayer.push({eventCategory:"Modal",eventAction:"outsource",eventLabel:"designConsultationStep3",event:"Modal"})})}),define("app/Pattern/not_whitespace",["jquery","foundation"],function(t){Foundation.Abide.defaults.patterns.not_whitespace=/[^\s]/}),define("app/Pattern/url_key",["jquery","foundation"],function(t){Foundation.Abide.defaults.patterns.url_key=/^[A-Za-z0-9-]+$/}),define("app/Pattern/email_csv",["jquery","foundation"],function(t){Foundation.Abide.defaults.patterns.email_csv=/^([\,\s]*([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[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])?)+)[\,\s]*)+$/}),define("app/Poll/vote",["jquery","app/ajaxForm"],function(t,e){t(function(){function e(){var e=[],i=t("#hasVote");t("div[data-poll-submission]").each(function(){var i=t(this),n=this.dataset.pollSubmission,r=i.find("input[type=radio]:checked").val(),o=i.find("textarea").val();"undefined"!=typeof r&&e.push({pollSubmissionId:n,rating:r,comment:o})});var r=JSON.stringify(e);n.val(r),t(i)[0].checked=e.length>0,t(i).change()}var i="form[data-submit-vote-form]",n=t("input[type=hidden][name=votesJson]",i);t(i).each(function(e,i){i.prepareFormData=function(){var e=t(this),i={pollId:t("input[type=hidden][name=pollId]",e).val(),votesJson:t("input[type=hidden][name=votesJson]",e).val(),name:t("input[type=text][name=name]",e).val(),email:t("input[type=email][name=email]",e).val(),emailOptIn:t("input[type=checkbox][name=emailOptIn]",e).prop("checked")};return i}}),t("body").on("success",i,function(t,e){window.location=e.RedirectUrl}).on("click, change",i+" input[type=radio]",function(){e()}).on("change",i+" textarea",function(){e()})})}),define("app/Product/fullScreenModalTest",["jquery","foundation"],function(t){window.enableAbTest=function(){var e="#design-list-section";t(e).each(function(e,i){i.processResult=function(){var e=t(this);e.find('a[data-reveal-id="modal-design-featured"]').each(function(){t(this).attr("data-reveal-size","full"),t(this).attr("data-reveal-classes","modal--fullscreen-design-example");var e=t(this).attr("data-reveal-ajax");t(this).attr("data-reveal-ajax",e+"?full=true")})}}),t(e)[0].processResult()}}),define("app/ProjectList/filters",["jquery","foundation"],function(t){t(function(){var e=!1,i=t(".filter__content"),n=function(i){var n=t(i.target.dataset.filter);n.hasClass("filter--active")?Foundation.Motion.animateOut(n,"slide-out-up"):e?Foundation.Motion.animateIn(n,"slide-in-down"):(e=!0,Foundation.Motion.animateIn(n,"slide-in-down",function(){Foundation.reInit(t("#js-budget-slider"))}))};t("select",i).on("change",function(){t(this).parents("form").submit()}),t("a[data-slider-cancel]",i).on("click",function(){var e=t(".slider",i),n=e.data("initial-start"),r=e.data("initial-end");t("#budget-slider-handle-1",i).val(n).change(),t("#budget-slider-handle-2",i).val(r).change(),setTimeout(function(){t("#js-budget-slider").foundation("_reflow")},e.data("move-time"))}),t("a[data-slider-apply]",i).on("click",function(){t(this).parents("form").submit()}),t("input[type=text]",i).keypress(function(e){13===e.which&&t(this).parents("form").submit()}),t('a[data-js="filter-toggle"]').on("click",n)})}),define("app/Registration/customerStep2",["jquery","app/ajaxForm"],function(t){var e="form[data-designer-profile-form]";t("body").on("success",e,function(e,i){var n=t(this).closest("form");window.location.href=n.data("success")}).on("click",e+" p[data-email]",function(){var e=t("input[name=paymentUsername]");e.val(t(this).data("email")),e.removeClass("is-invalid-input"),e.next("span.form-error").removeClass("is-visible")})}),define("app/Registration/designerStep2",["jquery","app/ajaxForm"],function(t){var e="form[data-designer-profile-form]";t("body").on("success",e,function(e,i){var n=t(this).closest("form");window.location.href=n.data("success")}).on("click",e+" p[data-email]",function(){var e=t("input[name=paymentUsername]");e.val(t(this).data("email")),e.removeClass("is-invalid-input"),e.next("span.form-error").removeClass("is-visible")})}),define("app/Sem/webHostingLanding",["jquery"],function(t){t(function(){var e=t("nav").height(),i=document.scrollingElement||document.documentElement,n=function(n){t(i).stop().animate({scrollTop:n.offset().top-e},500)},r=t("[data-section-pricing]"),o=t("[data-section-quote]");window.location.href.toLowerCase().indexOf("scrollto=pricing")!==-1?n(r):window.location.href.toLowerCase().indexOf("scrollto=quote")!==-1&&n(o);var s="form[data-web-hosting-quote-form]";t("body").on("success",s,function(e,i){t("div.row[data-quote]").hide(),t("div.row[data-quote-thanks]").removeClass("hide")});var a=t("[data-button-hero-cta-logged-in], nav .button:last:not([data-success])");if(a.length){if(r.length)if(r.hasClass("is-hidden")){r.before(t("<div data-section-pricing-anchor />"));var l=r.detach(),c=function(e){l.removeClass("is-hidden"),t("div[data-section-pricing-anchor]").after(l),n(r),t(this).off("click",c),e.preventDefault()};a.on("click",c)}else a.on("click",function(t){n(r),t.preventDefault()});o.length&&a.on("click",function(t){n(o),t.preventDefault()})}})}),define("app/Shared/DisplayTemplates/bannerMain",["jquery","app/ajaxForm"],function(t){var e="form[data-banner-main]";t("body").on("success",e,function(e,i){var n=t(this).closest("form"),r=n.data("success"),o=t("input[data-business-name]").val();o&&o.length>0&&(r+=(r.indexOf("?")===-1?"?logoText=":"&logoText=")+encodeURI(o)),window.location=r})}),define("app/Shared/DisplayTemplates/designTypeAccordion",["jquery","echo","foundation"],function(t,e){t(function(){var i=t("#categories-link-expand");if(i.length){var n=i.data("js-toggle").split(" ");i.on("click",function(){for(var r=0;r<n.length;r++){var o=t("#"+n[r]);o&&(o.is(":visible")?Foundation.Motion.animateOut(o,"fade-out"):(o.removeClass("is-hidden"),Foundation.Motion.animateIn(o,"fade-in")))}i.toggleClass("is-expanded"),e.render()})}})}),define("app/Shared/DisplayTemplates/socialMediaShare",["jquery","app/SocialMedia/facebook"],function(t,e){t(function(){function e(t,e,i,n){var r=void 0!=window.screenLeft?window.screenLeft:window.screenX,o=void 0!=window.screenTop?window.screenTop:window.screenY,s=window.innerWidth?window.innerWidth:document.documentElement.clientWidth?document.documentElement.clientWidth:screen.width,a=window.innerHeight?window.innerHeight:document.documentElement.clientHeight?document.documentElement.clientHeight:screen.height,l=s/2-i/2+r,c=a/2-n/2+o,u=window.open(t,e,"menubar=no,toolbar=no,resizable=yes,scrollbars=yes, width="+i+", height="+n+", top="+c+", left="+l);window.focus&&u.focus()}var i=t("link[rel=canonical]"),n=t("div[data-social-media-share]");n.each(function(){function n(){var t=window.location.href;return i.length&&(t=i.attr("href")),s.hasAttribute("data-url")&&(t=o.data("url")),t}function r(){var t=document.title;return s.hasAttribute("data-text")&&(t=o.data("text")),t}var o=t(this),s=this,a=n(),l=encodeURIComponent(a),c=encodeURIComponent(r());t("[data-twitter-share]",o).on("click",function(){var t="https://twitter.com/intent/tweet?text="+c+"&url="+l;e(t,"Share on Twitter",550,470)}),t("[data-linkedin-share]",o).on("click",function(){var t="https://www.linkedin.com/shareArticle?mini=true&source=DesignCrowd&url="+l+"&summary="+c;e(t,"Share on LinkedIn",550,470)}),t("[data-facebook-share]",o).on("click",function(){var t="https://www.facebook.com/sharer.php?u="+l;e(t,"Share on LinkedIn",550,470)})})})}),define("app/Shared/util",["jquery"],function(t){return{getParameterByName:function(t,e){e||(e=window.location.href),t=t.replace(/[\[\]]/g,"\\$&");var i=new RegExp("[?&]"+t+"(=([^&#]*)|&|#|$)"),n=i.exec(e);return n?n[2]?decodeURIComponent(n[2].replace(/\+/g," ")):"":null}}}),define("app/Shared/dynamicDesignLoad",["jquery","app/Shared/util"],function(t,e){t("body").on("click","a[data-see-more-designs-page]",function(i){var n=t(this).data("see-more-designs-page"),r=t(this).data("design-type"),o=e.getParameterByName("industry");Foundation.SmoothScroll.scrollToLoc("#design-list-section");var s="GetDesignListModel?pageNumber="+n;o&&(s=s+"&industry="+o),r&&(s=s+"&term="+r),t.ajax({type:"GET",url:s,success:function(e){t("#design-list-section").fadeOut("fast"),t("#design-list-section").promise().done(function(){t("div[data-design-carousel]").replaceWith(e);var i=t("#design-list-section"),n=i[0];n.hasOwnProperty("processResult")&&n.processResult(),i.fadeIn("slow")})}})})}),define("app/Shared/solicitationWarning",["jquery"],function(t){t(function(){t("[data-role-solicitation-check]").each(function(){var e,i=t(this).data("role-solicitation-check");t(this).on("keyup",function(){clearTimeout(e),e=setTimeout(function(e){var n=e.val();t.ajax({cache:!1,contentType:"application/json; charset=utf-8",data:JSON.stringify({text:n}),dataType:"json",type:"POST",url:"/CheckContactDetailsPresentHandler.ashx?_="+(new Date).getTime()}).done(function(e){e.result&&t("#"+i).show()})},1e3,t(this))})})})}),define("app/Shared/starRating",["jquery","app/ajaxForm"],function(t){t("body").on("click","[data-star-rating]",function(e){var i=t(this),n=i.val(),r=i.closest("form");t("[name=rating]",r).val(n),r.trigger("rating",n);var o=function(t,e){r.off("success",o),e.enableForm()};r.on("success",o),r.submit()})}),define("app/Shared/starRatingDesignCrowd",["jquery","app/ajaxModal","app/ajaxForm"],function(t,e){t("body").on("rating","[data-designcrowd-star-rating] form",function(i,n){var r=t(this).closest("[data-designcrowd-star-rating]"),o=r.find("[data-rate-dc-modal-cta]");n=parseInt(n);var s=r.data().minTrustpilotRating;e.modalize(o,{rating:n,minTrustpilotRating:s})})}),define("app/Shared/sticky",["jquery"],function(t){t(function(){var e=t("[data-sticky-content]");if(e){var i=t(".navigation-top").height()+"px";e.on("sticky.zf.stuckto:top",function(){e.css("margin-top",i),e.css("height","calc(100vh - "+i+")")}),e.on("sticky.zf.unstuckfrom:top",function(){e.css("margin-top","0px"),e.css("height","auto")}),e.on("sticky.zf.unstuckfrom:bottom",function(){e.css("margin-top","0px"),e.css("height","auto")}),t(window).on("changed.zf.mediaquery",function(t,n,r){"small"===n||"medium"===n?e.css("height","auto"):e.css("height","calc(100vh - "+i+")")})}})}),define("app/Shared/tipDesigner",["jquery","app/ajaxForm"],function(t){var e=function(e,i){return e=t.isNumeric(e)?parseInt(e):0,i=t.isNumeric(i)?parseInt(i):0,e<=0?i:i<=0?e:i<e?i:e},i=function(e,i){return t(i).val()},n=function(t,n,r){var o=t("input[type=radio]",n),s=o.map(i).toArray().reduce(e),a=r.val();t.isNumeric(a)||(a=0),a<s?r.val(s):Number.isInteger(a)||r.val(parseInt(a))};t("body").on("change","[data-tip-designer] input[type=radio], [data-tip-designer] input[name=tipValue]",function(e){var i=t(this).closest("[data-tip-designer]"),r=i.find("input[name=tipValue]"),o=t(this).closest("[data-tip-select]"),s=t(this).closest("form"),a=function(t,e){return e.RedirectUrl?void(window.location.href=e.RedirectUrl):(s.off("success",a),void e.enableForm())};if(s.on("success",a),t(this).is("input[type=radio]")){var l=t(this),c=l.val();c.length?(r.val(c),o.removeClass("tip-select--other")):(n(t,i,r),o.addClass("tip-select--other"))}else n(t,i,r);0===s.find("button:visible").length&&s.submit()})}),define("app/SubmitDesign/submitDesign",["jquery","app/Shared/DisplayTemplates/tagSearch","app/ajaxForm"],function(t,e){t(function(){function i(){var t=m.clone();p.append(t)}function n(){var e=[];f.is(":visible")&&t("li[data-stock-image]",p).each(function(){var i=t(this),n=i.find("input[data-stock-name]").val(),r=i.find("input[data-stock-url]").val(),o=i.find("input[data-stock-purchase]").is(":checked");e.push({designId:0,description:n,sourceUrl:r,mustPurchase:o})});var i=JSON.stringify(e);g.val(i)}function r(){var e=[];t("[data-tag]",d).each(function(){var i=t(this).find("a[data-tag-name]").text();e.push(i)});var i=JSON.stringify(e);u.val(i)}function o(t){var e=d.find('[data-tag-name="'+t+'"]');if(!e.length){var i=c.clone(),n=i.find("a[data-tag-name]");n.data().tagName=t,n.attr("data-tag-name",t),n.text(t),d.append(i),r()}}function s(t){return l+" "+t}function a(t){t.remove(),p.children().length||(h.filter(":not(:checked)").prop("checked",!0),h.trigger("change"))}var l="form[data-submit-design-form]",c=t("[data-tag-template]",l).first().detach().removeAttr("data-tag-template").removeClass("is-hidden"),u=t("input[type=hidden][name=tagsJson]",l),d=t("[data-tags]",l),h=t("input[name=stockUsage]",l),f=t("[data-stock-images-section]",l),p=t("[data-stock-images-list]",l),g=t("input[type=hidden][name=stockJson]",l),m=t("[data-stock-image][data-stock-image-template]",l).first().detach().removeAttr("[data-stock-image-template]").removeClass("is-hidden");h.on("change",function(t){var e=h.filter(":checked"),r=e.val();"True"===r?(f.removeClass("is-hidden"),p.children().length||i()):f.addClass("is-hidden"),n()}),e.go(function(e,i,n){function r(e){var n=t("[data-tag-name]",e).data().tagName;return n===i}return 0!==t.grep(d.children(),r).length?null:(e.on("click",function(){e.parents("li").remove(),o(i)}),e)}),t("body").on("success",l,function(t,e){window.location=e.RedirectUrl}).on("click",s("[data-tag] [data-tag-close]"),function(){var e=t(this).closest("[data-tag]");e.remove(),r()}).on("blur",s("[data-stock-image] input[type=text]"),function(){n()}).on("click, change",s("[data-stock-image] input[type=checkbox]"),function(){n()}).on("click",s("[data-stock-images-section] [data-button-add]"),function(){i()}).on("click",s("[data-stock-image] [data-button-remove]"),function(){var e=t(this).closest("[data-stock-image]");a(e)})})}),define("app/UpgradeAddons/addonList",["jquery","app/ajaxForm"],function(t){t(function(){var e={addonList:"[data-addon-list]"},i=t(e.addonList),n=i.data().shippingOptionNotApplicable,r=i.data().shippingOptionStandard;t("body").on("refresh init",e.addonList,function(){var o=[],s=[];t("[data-addon] button[data-button-add]:visible",this).each(function(e,i){var n=t(i),r=n.closest("[data-addon]");r.removeClass("is-added").find(".addon-slidedown").addClass("hide");var a=(n.closest("[data-cart-sku-id]").data()||{}).cartSkuId||null;if(null!==a)return void s.push({key:a,value:0});var l=(n.closest("[data-addon-id]").data()||{}).addonId||null;null!==l&&o.push({key:l,value:0})});var a=[],l=!1;t("[data-sku][data-preselected]",e.addonList).each(function(e,i){var n=t(i),r=n.data().skuId;a.push({key:r,value:null}),s.push({key:r,value:1}),l=l||n.is("[data-requires-shipping]")}),t("[data-addon][data-preselected]",e.addonList).each(function(e,i){var n=t(i),r=n.data().addonId,s=n.data().addonQty;a.push({key:r,value:s}),o.push({key:r,value:s}),l=l||n.is("[data-requires-shipping]")}),t("[data-addon] button[data-button-added]:visible",this).each(function(e,i){var n=t(i),r=n.closest("[data-addon]");l=l||r.is("[data-requires-shipping]"),r.addClass("is-added");var c=r.find(".addon-slidedown");c.hasClass("hide")&&c.removeClass("hide").trigger("init");var u=(n.closest("[data-sku-id]").data()||{}).skuId||null;if(null!==u){var d=(n.closest("[data-cart-sku-id]").data()||{}).cartSkuId||null;return null!==d&&s.push({key:d,value:0}),a.push({key:u,value:null}),void s.push({key:u,value:1})}var h=parseInt(r.find("select[data-select-print-qty]").val()||1),f=t("[data-addon-id]",r);if(f.length){var p=f.sort(function(e,i){return t(i).is(":visible")-t(e).is(":visible")}).map(function(e,i){return t(i).data().addonId}),g=p.splice(0,1)[0];a.push({key:g,value:h}),o.push({key:g,value:h});var m=t(p).map(function(t,e){return{key:e,value:0}}).toArray();return void(o=o.concat(m))}var v=r.data().addonId;a.push({key:v,value:h}),o.push({key:v,value:h})}),i.trigger("proceed-form-data-changed",{name:"shippingOption",value:l?r:n}),i.trigger("proceed-form-data-changed",{name:"addonsJSON",value:JSON.stringify(o)}),i.trigger("proceed-form-data-changed",{name:"skusJSON",value:JSON.stringify(s)}),i.trigger("sidebar-data-updated",{sidebarData:a,shippingRequired:l||!1})}).on("click","[data-addon] button[data-button-add]",function(){t(this).addClass("hide").next("button[data-button-added]").removeClass("hide"),i.trigger("refresh")}).on("click","[data-addon] button[data-button-added]",function(){t(this).addClass("hide").prev("button[data-button-add]").removeClass("hide"),i.trigger("refresh")}).on("refresh-addon-list","[data-addon]",function(t,e){i.trigger("refresh")})})}),define("app/UpgradeAddons/CustomSimpleAddon/specialContest",["jquery","app/UpgradeAddons/addonList","app/ajaxForm","app/foundationInit"],function(t){var e="form[data-addon-item-special-contest-form]",i="urlId",n=t(e),r=n.closest(".addon-slidedown");t("body").on("success",e,function(e,o){var s=n.find("input[name="+i+"]"),a=s.val();t(this).closest("[data-emits-proceed-form-data]").trigger("proceed-form-data-changed",{name:i,value:a}),n=t(this);var l=r.find("[data-callout=success]");l.removeClass("hide"),l.find("span[data-url-id]").text(a),o.enableForm()}).on("taken",e,function(t,e){r.find("[data-callout=taken]").removeClass("hide")}).on("invalid",e,function(t,e){r.find("[data-callout=guidelines]").removeClass("hide")}).on("submit",e,function(){r.find("[data-callout]").addClass("hide")}).on("init","[data-addon]:has("+e+")",function(){var e=t(this),i=t("input[name=urlId]",e),r=i.val();r.length?n.trigger("submit"):i.focus()}),t("[data-addon]:has("+e+")").trigger("init")}),define("app/UpgradeAddons/CustomCategory/printing",["jquery"],function(t){t(function(){t("body").on("update-prices","[data-printing-addon]",function(e){var i=t(this),n=!1,r=i.find("select[data-select-is-double-sided]");if(r.length){var o=r.find("option:selected");n="True"===o.val()}var s=i.data("recalculate-printing-url"),a=i.data("currency-id"),l=i.data("format"),c=i.data("print-offering-type"),u=t("input[name=__RequestVerificationToken]").val(),d=i.find("select[data-select-print-qty]"),h=1===d.length?parseInt(t("option:selected",d).val()):1,f={__RequestVerificationToken:u,currencyId:a,printQty:h,printOfferingType:c,format:l,doubleSided:n};t.ajax({url:s,method:"POST",data:f,success:function(t){i.attr("data-sku-id",t.SkuId),i.data().skuId=t.SkuId,i.attr("data-sku-name",t.SkuName),i.data().skuName=t.SkuName,i.trigger("refresh-addon-list"),i.find("[data-total-price]").text(t.TotalPriceText),i.find("[data-single-total-price]").text(t.SinglePriceText),i.find("[data-difference-price]").text(t.DifferencePriceText)},error:function(t){console.log("Error")}})}).on("change","[data-printing-addon] select[data-select-print-qty]",function(){var e=t(this),i=e.closest("[data-printing-addon]");i.trigger("update-prices")}).on("change","[data-printing-addon] select[data-select-is-double-sided]",function(){var e=t(this),i=e.closest("[data-printing-addon]");i.trigger("update-prices")}),t("[data-printing-addon][data-addon] button[data-button-added]:visible").trigger("update-prices")})}),define("app/UpgradeAddons/proceedForm",["jquery","app/ajaxForm"],function(t){t(function(){function e(t,e){return n.find("input[name="+t+"]").val(e),e}var i={proceedForm:"form[data-proceed-form]",emitsProceedFormData:"[data-emits-proceed-form-data]"},n=t(i.proceedForm);t("body").on("success",i.proceedForm,function(t,e){window.location=e.RedirectUrl}).on("proceed-form-data-changed",i.emitsProceedFormData,function(t,i){e(i.name,i.value)}),t(i.emitsProceedFormData).trigger("init")})}),define("app/UpgradeAddons/CustomCategory/webHosting",["jquery","app/UpgradeAddons/addonList","app/UpgradeAddons/proceedForm"],function(t){t("body").on("change","[data-web-hosting-addon] select[data-select-tier]",function(){var e=t(this),i=e.find("option:selected"),n=i.val(),r=e.closest("[data-web-hosting-addon]");r.find("[data-addon-id]").addClass("hide");var o=r.find("[data-addon-id="+n+"]");o.removeClass("hide"),r.find("button[data-button-add]").removeClass("hide"),r.find("button[data-button-added]").addClass("hide"),o=r.find("div[data-addon-id="+n+"]"),o.find("button[data-button-add]").addClass("hide"),o.find("button[data-button-added]").removeClass("hide"),e.closest("[data-addon]").trigger("refresh-addon-list")}).on("change","[data-web-hosting-addon] select[data-select-domain-option]",function(){var e=t(this),i=e.find("option:selected"),n=i.val();t(this).closest("[data-emits-proceed-form-data]").trigger("proceed-form-data-changed",{name:"domainOption",value:n})}).on("init","[data-web-hosting-addon]",function(){t("select[data-select-domain-option]",this).trigger("change")})}),define("app/UpgradeAddons/CustomCategory/PrintOffering/businessCards",["jquery","app/UpgradeAddons/addonList"],function(t){t(function(){function e(){var e={};return t.ajax({async:!1,url:v,method:"POST",data:y,success:function(i){t(i).each(function(t,i){e[i.Key]=i.Value})},error:function(t){console.log("Error")}}),e}function i(t){return m=m||e(),m[t]}var n={addon:"[data-addon-list] [data-addon][data-sku-id][data-sku-name][data-print-offering=BusinessCards]",qtySelect:"select[name=quantity]",sidednessSelect:"select[name=sidedness]",styleSelect:"select[name=style]",finishSelect:"select[name=finish]",skuPriceCopy:"[data-sku-price-copy]",qtyPriceCopy:"[data-quantity-price-copy]",sidednessPriceCopy:"[data-sidedness-price-copy]",stylePriceCopy:"[data-style-price-copy]",finishPriceCopy:"[data-finish-price-copy]",token:"input[name=__RequestVerificationToken]"},r=t(n.addon),o=t(n.qtySelect,r),s=t(n.sidednessSelect,r),a=t(n.styleSelect,r),l=t(n.finishSelect,r),c=t(n.skuPriceCopy,r),u=t(n.qtyPriceCopy,r),d=t(n.sidednessPriceCopy,r),h=t(n.stylePriceCopy,r),f=t(n.finishPriceCopy,r),p=t("option",l),g=t(n.token).val(),m=null,v=r.data().getStyleFinishesUrl,y={__RequestVerificationToken:g},b=r.data().recalculateBusinesscardsUrl,w={__RequestVerificationToken:g,currencyId:r.data().currencyId};t("body").on("update-prices",n.addon,function(e){w.qty=parseInt(o.val()),w.sidedness=s.val(),w.style=a.val(),w.finish=l.val(),t.ajax({url:b,method:"POST",data:w,success:function(t){r.attr("data-sku-id",t.SkuId),r.data().skuId=t.SkuId,r.attr("data-sku-name",t.SkuName),r.data().skuName=t.SkuName,r.trigger("refresh-addon-list"),c.text(t.SkuPriceCopy),u.text(t.QtyPriceCopy[t.SkuPrintQty]),d.text(t.SidednessPriceCopy[t.SkuSidedness]),h.text(t.StylePriceCopy[t.SkuStyle]),f.text(t.FinishPriceCopy[t.SkuFinish])},error:function(t){console.log("Error")}})}).on("change",n.sidednessSelect,function(){r.trigger("update-prices")}).on("change",n.qtySelect,function(){r.trigger("update-prices")}).on("change",n.finishSelect,function(){r.trigger("update-prices")}).on("change",n.styleSelect,function(){var e=l.find("option:selected"),n=i(a.val());p.each(function(e,i){n.indexOf(t(i).val())!==-1?t.contains(l,i)||l.append(i):t(i).detach().prop("selected",!1)}),l.has(e).length||l.find("option").first().prop("selected",!0),r.trigger("update-prices")}).on("init",n.addon,function(){a.trigger("change")}),r.trigger("init")})}),define("app/UpgradeAddons/CustomCategory/PrintOffering/logoOnBags",["jquery","app/UpgradeAddons/addonList"],function(t){t(function(){var e={addon:"[data-addon-list] [data-addon][data-sku-id][data-sku-name][data-print-offering=LogoOnBags]",qtySelect:"select[name=quantity]",styleSelect:"select[name=style]",skuPriceCopy:"[data-sku-price-copy]",qtyPriceCopy:"[data-quantity-price-copy]",stylePriceCopy:"[data-style-price-copy]",token:"input[name=__RequestVerificationToken]"},i=t(e.addon),n=t(e.qtySelect,i),r=t(e.styleSelect,i),o=t(e.skuPriceCopy,i),s=t(e.qtyPriceCopy,i),a=t(e.stylePriceCopy,i),l=t(e.token).val(),c=i.data().recalculateLogoOnBagsUrl,u={__RequestVerificationToken:l,
currencyId:i.data().currencyId};t("body").on("update-prices",e.addon,function(e){u.qty=parseInt(n.val()),u.style=r.val(),t.ajax({url:c,method:"POST",data:u,success:function(t){i.attr("data-sku-id",t.SkuId),i.data().skuId=t.SkuId,i.attr("data-sku-name",t.SkuName),i.data().skuName=t.SkuName,i.trigger("refresh-addon-list"),o.text(t.SkuPriceCopy),s.text(t.QtyPriceCopy[t.SkuPrintQty]),a.text(t.StylePriceCopy[t.SkuStyle])},error:function(t){console.log("Error")}})}).on("change",e.qtySelect,function(){i.trigger("update-prices")}).on("change",e.styleSelect,function(){i.trigger("update-prices")})})}),define("app/UpgradeAddons/sidebar",["jquery","app/ajaxForm","app/UpgradeAddons/proceedForm"],function(t){t(function(){function e(e){var i="";return null!==e.AddonId&&(i=(t("[data-addon-id="+e.AddonId+"]").data()||{}).addonName||""),i.length||null===e.SkuId||(i=(t("[data-sku-id="+e.SkuId+"]").data()||{}).skuName),e.Qty>1&&(i+=" x"+e.Qty),i}var i={sidebar:"[data-sidebar]",addonList:"[data-addon-list]",emptyCallout:"[data-callout-nothing-selected]",shippingItems:"li[data-item-shipping]",shippingOptions:"input[type=radio][name=shipping]",itemTemplate:"[data-item-template]",sidebarTitle:"[data-sidebar-title]",sidebarTax:"[data-item-tax]",sidebarTxnFee:"[data-item-transaction-fee] [data-amount]",sidebarTotal:"[data-item-total] [data-amount]",token:"input[name=__RequestVerificationToken]"},n=t(i.sidebar),r=t(i.addonList),o=t(i.emptyCallout),s=t(i.shippingItems,n),a=t(i.shippingOptions),l=r.data().shippingOptionNotApplicable,c=t(i.itemTemplate,n).detach().removeAttr("data-item-template").attr("data-item","").removeClass("hide"),u=t(i.sidebarTitle,n),d=t(i.sidebarTax,n),h=t(i.sidebarTxnFee,n),f=t(i.sidebarTotal,n),p=n.data().recalculateUrl,g=!1,m=null,v={__RequestVerificationToken:t(i.token).val(),currencyId:n.data().currencyId,taxcode:n.data().taxcode,format:n.data().format};t("body").on("refresh",i.sidebar,function(i,r){if(g&&!r.allow)return void(m=r);if(g=!0,n.addClass("hide"),o.addClass("hide"),0===r.addons.length)return o.removeClass("hide"),void(g=!1);t("[data-item]",n).remove(),n.removeClass("hide");var y=l;s.addClass("hide"),r.shippingRequired&&(s.removeClass("hide"),y=a.filter(":checked").val()),v.shippingOption=y,n.trigger("proceed-form-data-changed",{name:"shippingOption",value:v.shippingOption}),v.addonsJSON=JSON.stringify(r.addons||"[]"),t.ajax({url:p,method:"POST",data:v,success:function(t){if(null!==m){var i=m;return m=null,i.allow=!0,void n.trigger("refresh",i)}t.AddonPrices.reverse().forEach(function(t){var i=c.clone();i.find("[data-name]").text(e(t)),i.find("[data-amount]").text(t.PriceText),u.after(i)}),d.addClass("hide"),null!==t.Tax&&(d.find("[data-tax-name]").text(t.TaxName),d.find("[data-amount]").text(t.Tax),d.removeClass("hide")),h.text(t.TransactionFee),f.text(t.Total),g=!1},error:function(t){console.log("Error")}})}).on("change",i.shippingOptions,function(){r.trigger("refresh")}).on("sidebar-data-updated",i.addonList,function(t,e){n.trigger("refresh",{addons:e.sidebarData||[],shippingRequired:e.shippingRequired||!1})}),r.trigger("refresh")})}),define("app/UpgradeAddons/RecommendedAddons/recommendedAddons",["jquery","app/UpgradeAddons/addonList","app/UpgradeAddons/sidebar"],function(t){t(function(){t("[data-addon-list]").trigger("refresh")})}),define("app/UpgradeAddons/ReviewAddon/businessCards",["jquery"],function(t){t(function(){function e(t,e){null===e?t.closest("tr").hide():t.text(e).closest("tr").show()}function i(){var e={};return t.ajax({async:!1,url:v,method:"POST",data:y,success:function(i){t(i).each(function(t,i){e[i.Key]=i.Value})},error:function(t){console.log("Error")}}),e}function n(t){return m=m||i(),m[t]}function r(){var t=p.filter(":checked");if(t.closest(".radio-box__item").hasClass("is-disabled")){t.closest(".radio-box__item").removeClass("is-selected");var e=p.closest(".radio-box__item").not(".is-disabled").first();e.addClass("is-selected");var i=e.find("input");i.prop("checked",!0),i.attr("checked","checked")}}function o(){var e=n(f.filter(":checked").val());p.each(function(i,n){var r=t(n).closest(".radio-box__item");e.indexOf(t(n).val())!==-1?(r.removeClass("is-disabled"),r.closest(".column-block").removeAttr("hidden")):r.hasClass("is-disabled")||(r.addClass("is-disabled"),r.closest(".column-block").attr("hidden",""))})}function s(e){var i=e.find("input").attr("name"),n=t("input[name="+i+"]"),r=e.find("input");return n.each(function(){t(this).removeAttr("checked"),t(this).closest(".radio-box__item").removeClass("is-selected")}),r.attr("checked","checked"),r.prop("checked",!0).change(),e.closest(".radio-box__item").addClass("is-selected"),r}function a(){var e=d.find("option").filter(":selected").val();t("[name=discountText] span").each(function(){t(this).prop("hidden",!0)}),t("[name=discountText] span[id="+e+"-discount]").removeAttr("hidden")}var l={addonList:"[data-addon-list]",addon:"[data-addon][data-sku-id][data-sku-name][data-print-offering=BusinessCards]",qtyGroup:"select[name=quantity]",sidednessGroup:"input[type=radio][name=sidedness]",styleGroup:"input[type=radio][name=style]",finishGroup:"input[type=radio][name=finish]",token:"input[name=__RequestVerificationToken]"},c=t(l.addonList),u=t(l.addon,c),d=t(l.qtyGroup),h=t(l.sidednessGroup),f=t(l.styleGroup),p=t(l.finishGroup),g=t(l.token).val(),m=null,v=u.data().getStyleFinishesUrl,y={__RequestVerificationToken:g},b=u.data().recalculateBusinesscardsUrl,w={__RequestVerificationToken:g,currencyId:u.data().currencyId};t("body").on("refresh",l.addonList,function(){u.trigger("update-prices")}).on("update-prices",l.addon,function(i){w.qty=parseInt(d.find("option").filter(":selected").val()),w.sidedness=h.filter(":checked").val(),w.style=f.filter(":checked").val(),w.finish=p.filter(":checked").val(),t.ajax({url:b,method:"POST",data:w,success:function(i){u.attr("data-sku-id",i.SkuId),u.data().skuId=i.SkuId,u.attr("data-sku-name",i.SkuName),u.data().skuName=i.SkuName;var n=[{key:i.SkuId,value:1}];c.trigger("proceed-form-data-changed",{name:"skusJSON",value:JSON.stringify(n)});var r=[{key:i.SkuId,value:null}];c.trigger("sidebar-data-updated",{sidebarData:r,shippingRequired:!0});for(key in i.QtyPriceCopy)t("[data-price="+key+"]").html(i.QtyPriceCopy[key]);for(key in i.SidednessPriceCopy)e(t("[data-sidedness-price-copy="+key+"]"),i.SidednessPriceCopy[key]);for(key in i.StylePriceCopy)e(t("[data-style-price-copy="+key+"]"),i.StylePriceCopy[key]);for(key in i.FinishPriceCopy)e(t("[data-finish-price-copy="+key+"]"),i.FinishPriceCopy[key])},error:function(t){console.log("Error")}})}).on("change",l.sidednessGroup,function(){u.trigger("update-prices")}).on("change",l.quantityGroup,function(){a(),u.trigger("update-prices")}).on("change",l.finishGroup,function(){u.trigger("update-prices")}).on("change",l.styleGroup,function(){o(),r(),u.trigger("update-prices")}).on("click",".radio-box__item",function(){s(t(this))}),o(),r(),a(),u.trigger("update-prices")})}),define("app/UpgradeAddons/ReviewAddon/printing",["jquery","app/UpgradeAddons/sidebar"],function(t){t(function(){var e={addonList:"[data-addon-list]:has([data-review-printing-addon])"},i=t(e.addonList);t("body").on("refresh",e.addonList,function(){var e=[],n=[],r=t("[data-review-printing-addon]").data("addon-id");t("[data-radio-addon-id]").length&&(r=t("input[type=radio][name=addonId]:checked").val());var o=parseInt(r),s=t("input[type=radio][name=quantity]:checked").val(),a=parseInt(s);t("[data-option-qty-price]").addClass("is-hidden");var l=t("[data-option-qty-price][data-addon-id="+o+"]");l.removeClass("is-hidden"),l.find("input[value="+a+"]").prop("checked",!0),n.push({key:o,value:a}),i.trigger("proceed-form-data-changed",{name:"addonsJSON",value:JSON.stringify(n)}),e.push({key:o,value:a}),i.trigger("sidebar-data-updated",{sidebarData:e,shippingRequired:!0})}).on("change","input[type=radio][name=addonId]",function(){i.trigger("refresh")}).on("change","input[type=radio][name=quantity]",function(){i.trigger("refresh")}),i.trigger("refresh")})}),define("app/UpgradeAddons/sideBar",["jquery","app/ajaxForm","app/UpgradeAddons/proceedForm"],function(t){t(function(){function e(e){var i="";return null!==e.AddonId&&(i=(t("[data-addon-id="+e.AddonId+"]").data()||{}).addonName||""),i.length||null===e.SkuId||(i=(t("[data-sku-id="+e.SkuId+"]").data()||{}).skuName),e.Qty>1&&(i+=" x"+e.Qty),i}var i={sidebar:"[data-sidebar]",addonList:"[data-addon-list]",emptyCallout:"[data-callout-nothing-selected]",shippingItems:"li[data-item-shipping]",shippingOptions:"input[type=radio][name=shipping]",itemTemplate:"[data-item-template]",sidebarTitle:"[data-sidebar-title]",sidebarTax:"[data-item-tax]",sidebarTxnFee:"[data-item-transaction-fee] [data-amount]",sidebarTotal:"[data-item-total] [data-amount]",token:"input[name=__RequestVerificationToken]"},n=t(i.sidebar),r=t(i.addonList),o=t(i.emptyCallout),s=t(i.shippingItems,n),a=t(i.shippingOptions),l=r.data().shippingOptionNotApplicable,c=t(i.itemTemplate,n).detach().removeAttr("data-item-template").attr("data-item","").removeClass("hide"),u=t(i.sidebarTitle,n),d=t(i.sidebarTax,n),h=t(i.sidebarTxnFee,n),f=t(i.sidebarTotal,n),p=n.data().recalculateUrl,g=!1,m=null,v={__RequestVerificationToken:t(i.token).val(),currencyId:n.data().currencyId,taxcode:n.data().taxcode,format:n.data().format};t("body").on("refresh",i.sidebar,function(i,r){if(g&&!r.allow)return void(m=r);if(g=!0,n.addClass("hide"),o.addClass("hide"),0===r.addons.length)return o.removeClass("hide"),void(g=!1);t("[data-item]",n).remove(),n.removeClass("hide");var y=l;s.addClass("hide"),r.shippingRequired&&(s.removeClass("hide"),y=a.filter(":checked").val()),v.shippingOption=y,n.trigger("proceed-form-data-changed",{name:"shippingOption",value:v.shippingOption}),v.addonsJSON=JSON.stringify(r.addons||"[]"),t.ajax({url:p,method:"POST",data:v,success:function(t){if(null!==m){var i=m;return m=null,i.allow=!0,void n.trigger("refresh",i)}t.AddonPrices.reverse().forEach(function(t){var i=c.clone();i.find("[data-name]").text(e(t)),i.find("[data-amount]").text(t.PriceText),u.after(i)}),d.addClass("hide"),null!==t.Tax&&(d.find("[data-tax-name]").text(t.TaxName),d.find("[data-amount]").text(t.Tax),d.removeClass("hide")),h.text(t.TransactionFee),f.text(t.Total),g=!1},error:function(t){console.log("Error")}})}).on("change",i.shippingOptions,function(){r.trigger("refresh")}).on("sidebar-data-updated",i.addonList,function(t,e){n.trigger("refresh",{addons:e.sidebarData||[],shippingRequired:e.shippingRequired||!1})}),r.trigger("refresh")})}),define("app/UpgradeAddons/webStylesSelection",["jquery"],function(t){function e(t,e){return t+=t.indexOf("?")===-1?"?":"&",t+=e}function i(t){t.addClass("tile--selected"),t.attr("data-webstyle-selected","")}function n(t){t.removeClass("tile--selected"),t.removeAttr("data-webstyle-selected")}t("body").on("click","[data-webstyle][data-action-select]",function(){var e=t(this).data("webstyle"),n=t(".tile[data-webstyle="+e+"]");i(n)}).on("click","[data-webstyle][data-action-deselect]",function(){var e=t(this).data("webstyle"),i=t(".tile[data-webstyle="+e+"]");n(i)}).on("click",".tile[data-webstyle]:not(.tile--selected)",function(){i(t(this))}).on("click",".tile--selected[data-webstyle]",function(){n(t(this))}).on("click",".card[data-webstyle]",function(){var e=t(this);e.is(".card--selected")?e.removeClass("card--selected"):e.addClass("card--selected")}).on("click","[data-button-skip]",function(){var e=t(this),i=e.data("url");window.location=i}).on("click","[data-button-continue]",function(){var i=t(this),n=i.data("url"),r="",o=t(".card--selected[data-webstyle], .tile--selected[data-webstyle]");o.each(function(e,i){r+=t(i).data("webstyle"),e<o.length-1&&(r+=",")}),r="webStyles="+encodeURIComponent(r),n=e(n,r),window.location=n})}),define("app/Validator/checkbox_group_min_selected",["jquery","app/foundationInit"],function(t,e){e.addValidator("checkbox_group_min_selected",function(e,i,n){var r=e.closest("[data-checkbox-group]"),o=r.next("span.form-error"),s=e.attr("name"),a=parseInt(r.data("minimum-selected")),l=t("input[type=checkbox][name="+s+"]",r);return l.filter(":checked").length<a?(r.attr("failed-validation",""),l.each(function(e,i){t(i).addClass("is-invalid-input"),t(i).parent("label").addClass("is-invalid-label")}),o.text(o.data("err-minimum")),o.addClass("is-visible"),!1):(r.removeAttr("failed-validation"),l.each(function(e,i){t(i).removeClass("is-invalid-input"),t(i).parent("label").removeClass("is-invalid-label")}),o.removeClass("is-visible"),!0)})}),define("app/Validator/password_strength",["jquery","app/foundationInit"],function(t,e){e.addValidator("password_strength",function(e,i,n){if(!i)return!0;var r=e.next("span.form-error");if(0===e.val().length)return r.text(r.data("err-required")),!1;if(e.val().length<8)return r.text(r.data("err-length")),!1;var o=e.closest("form"),s=t("input[name=email]",o);if(s.val().length&&e.val().length){var a=s.val().toLowerCase();if(e.val().toLowerCase().indexOf(a)!==-1)return r.text(r.data("err-email")),!1}var l=e.data("matches");if("undefined"!=typeof l&&l!==!1){var c=t("input[name="+l+"]",o);if(e.val()!==c.val())return r.text(r.data("err-matches")),!1}return!0})});