svgedit/dist/editor/index.js

522 lines
2.2 MiB
JavaScript
Raw Normal View History

2021-01-31 22:16:43 +00:00
var en="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function createCommonjsModule(en){var tn={exports:{}};return en(tn,tn.exports),tn.exports}var check=function(en){return en&&en.Math==Math&&en},tn=check("object"==typeof globalThis&&globalThis)||check("object"==typeof window&&window)||check("object"==typeof self&&self)||check("object"==typeof en&&en)||function(){return this}()||Function("return this")(),fails=function(en){try{return!!en()}catch(en){return!0}},nn=!fails((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),rn={}.propertyIsEnumerable,an=Object.getOwnPropertyDescriptor,sn={f:an&&!rn.call({1:2},1)?function propertyIsEnumerable(en){var tn=an(this,en);return!!tn&&tn.enumerable}:rn},createPropertyDescriptor=function(en,tn){return{enumerable:!(1&en),configurable:!(2&en),writable:!(4&en),value:tn}},cn={}.toString,classofRaw=function(en){return cn.call(en).slice(8,-1)},un="".split,dn=fails((function(){return!Object("z").propertyIsEnumerable(0)}))?function(en){return"String"==classofRaw(en)?un.call(en,""):Object(en)}:Object,requireObjectCoercible=function(en){if(null==en)throw TypeError("Can't call method on "+en);return en},toIndexedObject=function(en){return dn(requireObjectCoercible(en))},isObject=function(en){return"object"==typeof en?null!==en:"function"==typeof en},toPrimitive=function(en,tn){if(!isObject(en))return en;var nn,rn;if(tn&&"function"==typeof(nn=en.toString)&&!isObject(rn=nn.call(en)))return rn;if("function"==typeof(nn=en.valueOf)&&!isObject(rn=nn.call(en)))return rn;if(!tn&&"function"==typeof(nn=en.toString)&&!isObject(rn=nn.call(en)))return rn;throw TypeError("Can't convert object to primitive value")},pn={}.hasOwnProperty,has=function(en,tn){return pn.call(en,tn)},hn=tn.document,gn=isObject(hn)&&isObject(hn.createElement),documentCreateElement=function(en){return gn?hn.createElement(en):{}},An=!nn&&!fails((function(){return 7!=Object.defineProperty(documentCreateElement("div"),"a",{get:function(){return 7}}).a})),mn=Object.getOwnPropertyDescriptor,vn={f:nn?mn:function getOwnPropertyDescriptor(en,tn){if(en=toIndexedObject(en),tn=toPrimitive(tn,!0),An)try{return mn(en,tn)}catch(en){}if(has(en,tn))return createPropertyDescriptor(!sn.f.call(en,tn),en[tn])}},anObject=function(en){if(!isObject(en))throw TypeError(String(en)+" is not an object");return en},yn=Object.defineProperty,_n={f:nn?yn:function defineProperty(en,tn,nn){if(anObject(en),tn=toPrimitive(tn,!0),anObject(nn),An)try{return yn(en,tn,nn)}catch(en){}if("get"in nn||"set"in nn)throw TypeError("Accessors not supported");return"value"in nn&&(en[tn]=nn.value),en}},wn=nn?function(en,tn,nn){return _n.f(en,tn,createPropertyDescriptor(1,nn))}:function(en,tn,nn){return en[tn]=nn,en},setGlobal=function(en,nn){try{wn(tn,en,nn)}catch(rn){tn[en]=nn}return nn},xn=tn["__core-js_shared__"]||setGlobal("__core-js_shared__",{}),Sn=Function.toString;"function"!=typeof xn.inspectSource&&(xn.inspectSource=function(en){return Sn.call(en)});var Cn,kn,Bn,En=xn.inspectSource,Pn=tn.WeakMap,Ln="function"==typeof Pn&&/native code/.test(En(Pn)),Tn=createCommonjsModule((function(en){(en.exports=function(en,tn){return xn[en]||(xn[en]=void 0!==tn?tn:{})})("versions",[]).push({version:"3.8.3",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})})),Nn=0,In=Math.random(),uid=function(en){return"Symbol("+String(void 0===en?"":en)+")_"+(++Nn+In).toString(36)},On=Tn("keys"),sharedKey=function(en){return On[en]||(On[en]=uid(en))},Fn={},Un=tn.WeakMap;if(Ln){var Mn=xn.state||(xn.state=new Un),Rn=Mn.get,Dn=Mn.has,jn=Mn.set;Cn=function(en,tn){return tn.facade=en,jn.call(Mn,en,tn),tn},kn=function(en){return Rn.call(Mn,en)||{}},Bn=function(en){return Dn.call(Mn,en)}}else{var Qn=sharedKey("state");Fn[Qn]=!0,Cn=function(en,tn){return tn.facade=en,wn(en,Qn,tn),tn},kn=function(en){return has(en,Qn)?en[Qn]:{}},Bn=function(en){return has(en,Qn)}}var Hn,Gn,Vn={set:Cn,get:kn,has:Bn,enforce:function(en){return Bn(en)?kn(en):Cn(en,{})},getterFor:function(
/*! jQuery v1.7.1 jquery.com | jquery.org/license */_export({target:"String",proto:!0,forced:stringHtmlForced("sub")},{sub:function sub(){return createHtml(this,"sub","","")}}),_export({target:"URL",proto:!0,enumerable:!0},{toJSON:function toJSON(){return URL.prototype.toString.call(this)}}),function(en,tn){function cy(en){return sn.isWindow(en)?en:9===en.nodeType&&(en.defaultView||en.parentWindow)}function cv(en){if(!Ti[en]){var tn=nn.body,rn=sn("<"+en+">").appendTo(tn),an=rn.css("display");rn.remove(),"none"!==an&&""!==an||(Bi||((Bi=nn.createElement("iframe")).frameBorder=Bi.width=Bi.height=0),tn.appendChild(Bi),Ei&&Bi.createElement||((Ei=(Bi.contentWindow||Bi.contentDocument).document).write(("CSS1Compat"===nn.compatMode?"<!doctype html>":"")+"<html><body>"),Ei.close()),rn=Ei.createElement(en),Ei.body.appendChild(rn),an=sn.css(rn,"display"),tn.removeChild(Bi)),Ti[en]=an}return Ti[en]}function cu(en,tn){var nn={};return sn.each(Oi.concat.apply([],Oi.slice(0,tn)),(function(){nn[this]=en})),nn}function ct(){Li=tn}function cs(){return setTimeout(ct,0),Li=sn.now()}function ci(){try{return new en.XMLHttpRequest}catch(en){}}function ca(en,tn,nn,rn){if(sn.isArray(tn))sn.each(tn,(function(tn,an){nn||ri.test(en)?rn(en,an):ca(en+"["+("object"==_typeof(an)||sn.isArray(an)?tn:"")+"]",an,nn,rn)}));else if(nn||null==tn||"object"!=_typeof(tn))rn(en,tn);else for(var an in tn)ca(en+"["+an+"]",tn[an],nn,rn)}function b_(en,nn){var rn,an,cn=sn.ajaxSettings.flatOptions||{};for(rn in nn)nn[rn]!==tn&&((cn[rn]?en:an||(an={}))[rn]=nn[rn]);an&&sn.extend(!0,en,an)}function b$(en,nn,rn,an,sn,cn){(cn=cn||{})[sn=sn||nn.dataTypes[0]]=!0;for(var un,dn=en[sn],pn=0,hn=dn?dn.length:0,gn=en===vi;pn<hn&&(gn||!un);pn++)"string"==typeof(un=dn[pn](nn,rn,an))&&(!gn||cn[un]?un=tn:(nn.dataTypes.unshift(un),un=b$(en,nn,rn,an,un,cn)));return(gn||!un)&&!cn["*"]&&(un=b$(en,nn,rn,an,"*",cn)),un}function bZ(en){return function(tn,nn){if("string"!=typeof tn&&(nn=tn,tn="*"),sn.isFunction(nn))for(var rn,an,cn=tn.toLowerCase().split(gi),un=0,dn=cn.length;un<dn;un++)rn=cn[un],(an=/^\+/.test(rn))&&(rn=rn.substr(1)||"*"),(en[rn]=en[rn]||[])[an?"unshift":"push"](nn)}}function bC(en,tn,nn){var rn="width"===tn?en.offsetWidth:en.offsetHeight,an="width"===tn?Jr:Zr,cn=0,un=an.length;if(rn>0){if("border"!==nn)for(;cn<un;cn++)nn||(rn-=parseFloat(sn.css(en,"padding"+an[cn]))||0),"margin"===nn?rn+=parseFloat(sn.css(en,nn+an[cn]))||0:rn-=parseFloat(sn.css(en,"border"+an[cn]+"Width"))||0;return rn+"px"}if(((rn=Qr(en,tn,tn))<0||null==rn)&&(rn=en.style[tn]||0),rn=parseFloat(rn)||0,nn)for(;cn<un;cn++)rn+=parseFloat(sn.css(en,"padding"+an[cn]))||0,"padding"!==nn&&(rn+=parseFloat(sn.css(en,"border"+an[cn]+"Width"))||0),"margin"===nn&&(rn+=parseFloat(sn.css(en,nn+an[cn]))||0);return rn+"px"}function bp(en,tn){tn.src?sn.ajax({url:tn.src,async:!1,dataType:"script"}):sn.globalEval((tn.text||tn.textContent||tn.innerHTML||"").replace(Ur,"/*$0*/")),tn.parentNode&&tn.parentNode.removeChild(tn)}function bo(en){var tn=nn.createElement("div");return Dr.appendChild(tn),tn.innerHTML=en.outerHTML,tn.firstChild}function bn(en){var tn=(en.nodeName||"").toLowerCase();"input"===tn?bm(en):"script"!==tn&&void 0!==en.getElementsByTagName&&sn.grep(en.getElementsByTagName("input"),bm)}function bm(en){"checkbox"!==en.type&&"radio"!==en.type||(en.defaultChecked=en.checked)}function bl(en){return void 0!==en.getElementsByTagName?en.getElementsByTagName("*"):void 0!==en.querySelectorAll?en.querySelectorAll("*"):[]}function bk(en,tn){var nn;1===tn.nodeType&&(tn.clearAttributes&&tn.clearAttributes(),tn.mergeAttributes&&tn.mergeAttributes(en),"object"===(nn=tn.nodeName.toLowerCase())?tn.outerHTML=en.outerHTML:"input"!==nn||"checkbox"!==en.type&&"radio"!==en.type?"option"===nn?tn.selected=en.defaultSelected:"input"!==nn&&"textarea"!==nn||(tn.defaultValue=en.defaultValue):(en.checked&&(tn.defaultChecked=tn.checked=en.checked),tn.value!==en.value&&(tn.value=en.value)),tn.removeAttribute(sn.expando))}function bj(en,tn){if(1===tn.nodeType&&sn.hasData(en)){var nn,rn,an,cn=sn._data(en),un=sn._data(tn,cn),dn=cn.events;if(dn)fo
2020-09-18 20:43:34 +00:00
/*!
* jQuery UI 1.8.17
*
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI
2021-01-31 22:16:43 +00:00
*/!function(en,tn){function d(tn){return!en(tn).parents().andSelf().filter((function(){return"hidden"===en.curCSS(this,"visibility")||en.expr.filters.hidden(this)})).length}function c(tn,nn){var rn=tn.nodeName.toLowerCase();if("area"===rn){var an,sn=tn.parentNode,cn=sn.name;return!(!tn.href||!cn||"map"!==sn.nodeName.toLowerCase())&&(!!(an=en("img[usemap=#"+cn+"]")[0])&&d(an))}return(/input|select|textarea|button|object/.test(rn)?!tn.disabled:"a"==rn&&tn.href||nn)&&d(tn)}en.ui=en.ui||{},en.ui.version||(en.extend(en.ui,{version:"1.8.17",keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}}),en.fn.extend({propAttr:en.fn.prop||en.fn.attr,_focus:en.fn.focus,focus:function focus(tn,nn){return"number"==typeof tn?this.each((function(){var rn=this;setTimeout((function(){en(rn).focus(),nn&&nn.call(rn)}),tn)})):this._focus.apply(this,arguments)},scrollParent:function scrollParent(){var tn;return tn=en.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter((function(){return/(relative|absolute|fixed)/.test(en.curCSS(this,"position",1))&&/(auto|scroll)/.test(en.curCSS(this,"overflow",1)+en.curCSS(this,"overflow-y",1)+en.curCSS(this,"overflow-x",1))})).eq(0):this.parents().filter((function(){return/(auto|scroll)/.test(en.curCSS(this,"overflow",1)+en.curCSS(this,"overflow-y",1)+en.curCSS(this,"overflow-x",1))})).eq(0),/fixed/.test(this.css("position"))||!tn.length?en(document):tn},zIndex:function zIndex(nn){if(nn!==tn)return this.css("zIndex",nn);if(this.length)for(var rn,an,sn=en(this[0]);sn.length&&sn[0]!==document;){if(("absolute"===(rn=sn.css("position"))||"relative"===rn||"fixed"===rn)&&(an=parseInt(sn.css("zIndex"),10),!isNaN(an)&&0!==an))return an;sn=sn.parent()}return 0},disableSelection:function disableSelection(){return this.bind((en.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",(function(en){en.preventDefault()}))},enableSelection:function enableSelection(){return this.unbind(".ui-disableSelection")}}),en.each(["Width","Height"],(function(nn,rn){function h(tn,nn,rn,sn){return en.each(an,(function(){nn-=parseFloat(en.curCSS(tn,"padding"+this,!0))||0,rn&&(nn-=parseFloat(en.curCSS(tn,"border"+this+"Width",!0))||0),sn&&(nn-=parseFloat(en.curCSS(tn,"margin"+this,!0))||0)})),nn}var an="Width"===rn?["Left","Right"]:["Top","Bottom"],sn=rn.toLowerCase(),cn={innerWidth:en.fn.innerWidth,innerHeight:en.fn.innerHeight,outerWidth:en.fn.outerWidth,outerHeight:en.fn.outerHeight};en.fn["inner"+rn]=function(nn){return nn===tn?cn["inner"+rn].call(this):this.each((function(){en(this).css(sn,h(this,nn)+"px")}))},en.fn["outer"+rn]=function(tn,nn){return"number"!=typeof tn?cn["outer"+rn].call(this,tn):this.each((function(){en(this).css(sn,h(this,tn,!0,nn)+"px")}))}})),en.extend(en.expr[":"],{data:function data(tn,nn,rn){return!!en.data(tn,rn[3])},focusable:function focusable(tn){return c(tn,!isNaN(en.attr(tn,"tabindex")))},tabbable:function tabbable(tn){var nn=en.attr(tn,"tabindex"),rn=isNaN(nn);return(rn||nn>=0)&&c(tn,!rn)}}),en((function(){var tn=document.body,nn=tn.appendChild(nn=document.createElement("div"));en.extend(nn.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0}),en.support.minHeight=100===nn.offsetHeight,en.support.selectstart="onselectstart"in nn,tn.removeChild(nn).style.display="none"})),en.extend(en.ui,{plugin:{add:function add(tn,nn,rn){var an=en.ui[tn].prototype;for(var sn in rn)an.plugins[sn]=an.plugins[sn]||[],an.plugins[sn].push([nn,rn[sn]])},call:function call(en,tn,nn){var rn=en.plugins[tn];if(rn&&en.element[0].parentNode)for(var an=0;an<rn.length;an++)en.options[rn[an][0]]&&rn[an][1].apply(en.element,nn)}},contains:function contains(en,tn){return document.compareDocumentPosition?16&en.compareDocume
2020-09-18 20:43:34 +00:00
/*!
* jQuery UI Widget 1.8.17
*
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Widget
*/
2021-01-31 22:16:43 +00:00
function(en,tn){if(en.cleanData){var nn=en.cleanData;en.cleanData=function(tn){for(var rn,an=0;null!=(rn=tn[an]);an++)try{en(rn).triggerHandler("remove")}catch(en){}nn(tn)}}else{var rn=en.fn.remove;en.fn.remove=function(tn,nn){return this.each((function(){return nn||(!tn||en.filter(tn,[this]).length)&&en("*",this).add([this]).each((function(){try{en(this).triggerHandler("remove")}catch(en){}})),rn.call(en(this),tn,nn)}))}}en.widget=function(tn,nn,rn){var an,sn=tn.split(".")[0];an=sn+"-"+(tn=tn.split(".")[1]),rn||(rn=nn,nn=en.Widget),en.expr[":"][an]=function(nn){return!!en.data(nn,tn)},en[sn]=en[sn]||{},en[sn][tn]=function(en,tn){arguments.length&&this._createWidget(en,tn)};var cn=new nn;cn.options=en.extend(!0,{},cn.options),en[sn][tn].prototype=en.extend(!0,cn,{namespace:sn,widgetName:tn,widgetEventPrefix:en[sn][tn].prototype.widgetEventPrefix||tn,widgetBaseClass:an},rn),en.widget.bridge(tn,en[sn][tn])},en.widget.bridge=function(nn,rn){en.fn[nn]=function(an){var sn="string"==typeof an,cn=Array.prototype.slice.call(arguments,1),un=this;return an=!sn&&cn.length?en.extend.apply(null,[!0,an].concat(cn)):an,sn&&"_"===an.charAt(0)||(sn?this.each((function(){var rn=en.data(this,nn),sn=rn&&en.isFunction(rn[an])?rn[an].apply(rn,cn):rn;if(sn!==rn&&sn!==tn)return un=sn,!1})):this.each((function(){var tn=en.data(this,nn);tn?tn.option(an||{})._init():en.data(this,nn,new rn(an,this))}))),un}},en.Widget=function(en,tn){arguments.length&&this._createWidget(en,tn)},en.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:!1},_createWidget:function _createWidget(tn,nn){en.data(nn,this.widgetName,this),this.element=en(nn),this.options=en.extend(!0,{},this.options,this._getCreateOptions(),tn);var rn=this;this.element.bind("remove."+this.widgetName,(function(){rn.destroy()})),this._create(),this._trigger("create"),this._init()},_getCreateOptions:function _getCreateOptions(){return en.metadata&&en.metadata.get(this.element[0])[this.widgetName]},_create:function _create(){},_init:function _init(){},destroy:function destroy(){this.element.unbind("."+this.widgetName).removeData(this.widgetName),this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled ui-state-disabled")},widget:function widget(){return this.element},option:function option(nn,rn){var an=nn;if(0===arguments.length)return en.extend({},this.options);if("string"==typeof nn){if(rn===tn)return this.options[nn];(an={})[nn]=rn}return this._setOptions(an),this},_setOptions:function _setOptions(tn){var nn=this;return en.each(tn,(function(en,tn){nn._setOption(en,tn)})),this},_setOption:function _setOption(en,tn){return this.options[en]=tn,"disabled"===en&&this.widget()[tn?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",tn),this},enable:function enable(){return this._setOption("disabled",!1)},disable:function disable(){return this._setOption("disabled",!0)},_trigger:function _trigger(tn,nn,rn){var an,sn,cn=this.options[tn];if(rn=rn||{},(nn=en.Event(nn)).type=(tn===this.widgetEventPrefix?tn:this.widgetEventPrefix+tn).toLowerCase(),nn.target=this.element[0],sn=nn.originalEvent)for(an in sn)an in nn||(nn[an]=sn[an]);return this.element.trigger(nn,rn),!(en.isFunction(cn)&&!1===cn.call(this.element[0],nn,rn)||nn.isDefaultPrevented())}}}(jQuery),
2020-09-18 20:43:34 +00:00
/*!
* jQuery UI Mouse 1.8.17
*
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Mouse
*
* Depends:
* jquery.ui.widget.js
*/
2021-01-31 22:16:43 +00:00
function(en,tn){var nn=!1;en(document).mouseup((function(en){nn=!1})),en.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function _mouseInit(){var tn=this;this.element.bind("mousedown."+this.widgetName,(function(en){return tn._mouseDown(en)})).bind("click."+this.widgetName,(function(nn){if(!0===en.data(nn.target,tn.widgetName+".preventClickEvent"))return en.removeData(nn.target,tn.widgetName+".preventClickEvent"),nn.stopImmediatePropagation(),!1})),this.started=!1},_mouseDestroy:function _mouseDestroy(){this.element.unbind("."+this.widgetName)},_mouseDown:function _mouseDown(tn){if(!nn){this._mouseStarted&&this._mouseUp(tn),this._mouseDownEvent=tn;var rn=this,an=1==tn.which,sn=!("string"!=typeof this.options.cancel||!tn.target.nodeName)&&en(tn.target).closest(this.options.cancel).length;return!(an&&!sn&&this._mouseCapture(tn))||(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout((function(){rn.mouseDelayMet=!0}),this.options.delay)),this._mouseDistanceMet(tn)&&this._mouseDelayMet(tn)&&(this._mouseStarted=!1!==this._mouseStart(tn),!this._mouseStarted)?(tn.preventDefault(),!0):(!0===en.data(tn.target,this.widgetName+".preventClickEvent")&&en.removeData(tn.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(en){return rn._mouseMove(en)},this._mouseUpDelegate=function(en){return rn._mouseUp(en)},en(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),tn.preventDefault(),nn=!0,!0))}},_mouseMove:function _mouseMove(tn){return!en.browser.msie||document.documentMode>=9||tn.button?this._mouseStarted?(this._mouseDrag(tn),tn.preventDefault()):(this._mouseDistanceMet(tn)&&this._mouseDelayMet(tn)&&(this._mouseStarted=!1!==this._mouseStart(this._mouseDownEvent,tn),this._mouseStarted?this._mouseDrag(tn):this._mouseUp(tn)),!this._mouseStarted):this._mouseUp(tn)},_mouseUp:function _mouseUp(tn){return en(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,tn.target==this._mouseDownEvent.target&&en.data(tn.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(tn)),!1},_mouseDistanceMet:function _mouseDistanceMet(en){return Math.max(Math.abs(this._mouseDownEvent.pageX-en.pageX),Math.abs(this._mouseDownEvent.pageY-en.pageY))>=this.options.distance},_mouseDelayMet:function _mouseDelayMet(en){return this.mouseDelayMet},_mouseStart:function _mouseStart(en){},_mouseDrag:function _mouseDrag(en){},_mouseStop:function _mouseStop(en){},_mouseCapture:function _mouseCapture(en){return!0}})}(jQuery),function(en,tn){en.widget("ui.draggable",en.ui.mouse,{widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1},_create:function _create(){"original"==this.options.helper&&!/^(?:r|a|f)/.test(this.element.css("position"))&&(this.element[0].style.position="relative"),this.options.addClasses&&this.element.addClass("ui-draggable"),this.options.disabled&&this.element.addClass("ui-draggable-disabled"),this._mouseInit()},destroy:function destroy(){if(this.element.data("draggable"))return this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._mouseDestroy(),this},_mouseCapture:function _mouseCapture(tn){var nn=this.options;return!(this.helper||nn.disabled||en(tn.target).is(".ui-resizable-handle"))&&(this.handle=this._getHandle(tn),!!this.handle&&(nn.iframeFix&&en(!0===nn.iframeFix?"iframe":nn.iframeFix).each((function(){en('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"
2021-01-01 23:13:07 +00:00
/**
* @file jGraduate 0.4
*
* jQuery Plugin for a gradient picker
*
* @module jGraduate
* @copyright 2010 Jeff Schiller {@link http://blog.codedread.com/}, 2010 Alexis Deveria {@link http://a.deveria.com/}
*
* @license Apache-2.0
* @example
* // The Paint object is described below.
* $.jGraduate.Paint(); // constructs a 'none' color
* @example $.jGraduate.Paint({copy: o}); // creates a copy of the paint o
* @example $.jGraduate.Paint({hex: '#rrggbb'}); // creates a solid color paint with hex = "#rrggbb"
* @example $.jGraduate.Paint({linearGradient: o, a: 50}); // creates a linear gradient paint with opacity=0.5
* @example $.jGraduate.Paint({radialGradient: o, a: 7}); // creates a radial gradient paint with opacity=0.07
* @example $.jGraduate.Paint({hex: '#rrggbb', linearGradient: o}); // throws an exception?
*/
2021-01-31 22:16:43 +00:00
var Bf="http://www.w3.org/2000/svg",Ef="http://www.w3.org/1999/xlink";
2021-01-01 23:13:07 +00:00
/**
* @file jPicker (Adapted from version 1.1.6)
*
* jQuery Plugin for Photoshop style color picker
*
* @module jPicker
* @copyright (c) 2010 Christopher T. Tillman
* Digital Magic Productions, Inc. ({@link http://www.digitalmagicpro.com/})
* FREE to use, alter, copy, sell, and especially ENHANCE
* @license MIT
*
* Painstakingly ported from John Dyers' excellent work on his own color picker based on the Prototype framework.
*
* John Dyers' website: {@link http://johndyer.name}
* Color Picker page: {@link http://johndyer.name/photoshop-like-javascript-color-picker/}
*/
2021-01-31 22:16:43 +00:00
function toFixedNumeric(en,tn){return void 0===tn&&(tn=0),Math.round(en*Math.pow(10,tn))/Math.pow(10,tn)}window.console||(window.console={log:function log(en){},dir:function dir(en){}});var Pf=function isNullish(en){return null==en};_export({target:"Number",stat:!0},{isNaN:function isNaN(en){return en!=en}});var Lf,Tf=vn.f,Nf="".startsWith,If=Math.min,Of=correctIsRegexpLogic("startsWith"),Ff=!(Of||(Lf=Tf(String.prototype,"startsWith"),!Lf||Lf.writable));_export({target:"String",proto:!0,forced:!Ff&&!Of},{startsWith:function startsWith(en){var tn=String(requireObjectCoercible(this));notARegexp(en);var nn=toLength(If(arguments.length>1?arguments[1]:void 0,tn.length)),rn=String(en);return Nf?Nf.call(tn,rn,nn):tn.slice(nn,nn+rn.length)===rn}});var Uf=function(){function PaintBox(en,tn){_classCallCheck(this,PaintBox);var nn=(new DOMParser).parseFromString('<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14">\n <rect\n fill="#000000" opacity="1" width="14" height="14"/>\n <defs><linearGradient id="gradbox_'.concat(PaintBox.ctr++,'"/></defs>\n </svg>'),"text/xml").documentElement;nn=document.importNode(nn,!0),en.append(nn),this.rect=nn.firstElementChild,this.defs=nn.getElementsByTagName("defs")[0],this.grad=this.defs.firstElementChild,this.type=tn}return _createClass(PaintBox,[{key:"setPaint",value:function setPaint(en){this.paint=en;var tn=en.type,nn=en.alpha/100,rn="none";switch(tn){case"solidColor":rn="none"!==en[tn]?"#"+en[tn]:en[tn];break;case"linearGradient":case"radialGradient":this.grad.remove(),this.grad=en[tn],this.defs.append(this.grad),rn="url(#"+(this.grad.id="gradbox_"+this.type)+")"}this.rect.setAttribute("fill",rn),this.rect.setAttribute("opacity",nn)}},{key:"update",value:function update(en,tn){if(!tn)return null;var nn=this.type;switch(tn.tagName){case"use":case"image":case"foreignObject":return null;case"g":case"a":for(var rn=tn.getElementsByTagName("*"),an=null,sn=0,cn=rn.length;sn<cn;sn++){var un=rn[sn].getAttribute(nn);if(0===sn)an=un;else if(an!==un){an=null;break}}if(null===an)return this._paintColor=null,null;this._paintColor=an,this._paintOpacity=1;break;default:this._paintOpacity=Number.parseFloat(tn.getAttribute(nn+"-opacity")),Number.isNaN(this._paintOpacity)&&(this._paintOpacity=1);var dn="fill"===nn?"black":"none";this._paintColor=tn.getAttribute(nn)||dn}this._paintOpacity*=100;var pn=PaintBox.getPaint(en,this._paintColor,this._paintOpacity,nn);return this.setPaint(pn),pn}}],[{key:"getPaint",value:function getPaint(en,tn,nn,rn){var an={alpha:nn};if(tn.startsWith("url(#")){var sn=en.getRefElem(tn);an[(sn=sn?sn.cloneNode(!0):$("#"+rn+"_color defs *")[0]).tagName]=sn}else tn.startsWith("#")?an.solidColor=tn.substr(1):an.solidColor="none";return new $.jGraduate.Paint(an)}}]),PaintBox}();Uf.ctr=0;var Mf=[function jQueryPluginJGraduate(en){en.jGraduate={Paint:function Paint(en){_classCallCheck(this,Paint);var tn=en||{};if(this.alpha=isNaN(tn.alpha)?100:tn.alpha,tn.copy)switch(this.type=tn.copy.type,this.alpha=tn.copy.alpha,this.solidColor=null,this.linearGradient=null,this.radialGradient=null,this.type){case"none":break;case"solidColor":this.solidColor=tn.copy.solidColor;break;case"linearGradient":this.linearGradient=tn.copy.linearGradient.cloneNode(!0);break;case"radialGradient":this.radialGradient=tn.copy.radialGradient.cloneNode(!0)}else tn.linearGradient?(this.type="linearGradient",this.solidColor=null,this.radialGradient=null,this.linearGradient=tn.linearGradient.cloneNode(!0)):tn.radialGradient?(this.type="radialGradient",this.solidColor=null,this.linearGradient=null,this.radialGradient=tn.radialGradient.cloneNode(!0)):tn.solidColor?(this.type="solidColor",this.solidColor=tn.solidColor):(this.type="none",this.solidColor=null,this.linearGradient=null,this.radialGradient=null)}},en.fn.jGraduateDefaults={paint:new en.jGraduate.Paint,window:{pickerTitle:"Drag markers to pick a paint"},images:{clientPath:"images/"},newstop:"inverse"};var tn=navigator.userAgent.includes("Gecko/");function mkElem(en,nn,rn){var an=document.createElementNS(Bf,en);return funct
2020-09-04 20:34:30 +00:00
/**
* Namespaces or tools therefor.
* @module namespaces
* @license MIT
*/
2021-01-31 22:16:43 +00:00
var Zf,eA={HTML:"http://www.w3.org/1999/xhtml",MATH:"http://www.w3.org/1998/Math/MathML",SE:"http://svg-edit.googlecode.com",SVG:"http://www.w3.org/2000/svg",XLINK:"http://www.w3.org/1999/xlink",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"},tA=function getReverseNS(){var en={};return Object.entries(eA).forEach((function(tn){var nn=_slicedToArray(tn,2),rn=nn[0],an=nn[1];en[an]=rn.toLowerCase()})),en},nA=["x","x1","cx","rx","width"],rA=["y","y1","cy","ry","height"],iA=["r","radius"].concat(nA,rA),oA={},aA=function getTypeMap(){return oA},sA=function shortFloat(en){var tn=Zf.getRoundDigits();return isNaN(en)?Array.isArray(en)?shortFloat(en[0])+","+shortFloat(en[1]):Number.parseFloat(en).toFixed(tn)-0:Number(Number(en).toFixed(tn))},lA=function convertUnit(en,tn){return tn=tn||Zf.getBaseUnit(),sA(en/oA[tn])},cA=function setUnitAttr(en,tn,nn){en.setAttribute(tn,nn)},uA=function convertToNum(en,tn){if(!isNaN(tn))return tn-0;if("%"===tn.substr(-1)){var nn=tn.substr(0,tn.length-1)/100,rn=Zf.getWidth(),an=Zf.getHeight();return nA.includes(en)?nn*rn:rA.includes(en)?nn*an:nn*Math.sqrt(rn*rn+an*an)/Math.sqrt(2)}var sn=tn.substr(-2);return tn.substr(0,tn.length-2)*oA[sn]},dA=function isValidUnit(en,tn,nn){if(iA.includes(en))return!isNaN(tn)||(tn=tn.toLowerCase(),Object.keys(oA).some((function(en){return new RegExp("^-?[\\d\\.]+"+en+"$").test(tn)})));if("id"===en){var rn=!1;try{var an=Zf.getElement(tn);rn=!an||an===nn}catch(en){}return rn}return!0},pA=document.createElement("template");pA.innerHTML='\n <style>\n :not(:defined) {\n display: none;\n }\n\n /* Force the scroll bar to appear so we see it hide when overlay opens. */\n body::-webkit-scrollbar {\n background: lightgray;\n }\n body::-webkit-scrollbar-thumb {\n background: darkgray;\n }\n #svg_docprops #svg_docprops_container {\n padding: 10px;\n background-color: #B0B0B0;\n border: 1px outset #777;\n opacity: 1.0;\n font-family: Verdana, Helvetica, sans-serif;\n font-size: .8em;\n z-index: 20001;\n }\n \n #svg_docprops .error {\n border: 1px solid red;\n padding: 3px;\n }\n \n #svg_docprops #resolution {\n max-width: 14em;\n }\n \n #tool_docprops_back {\n margin-left: 1em;\n overflow: auto;\n }\n \n #svg_docprops_container #svg_docprops_docprops {\n float: left;\n width: 221px;\n margin: 5px .7em;\n overflow: hidden;\n }\n \n #svg_docprops legend {\n max-width: 195px;\n }\n \n #svg_docprops_docprops > legend {\n font-weight: bold;\n font-size: 1.1em;\n }\n \n #svg_docprops_container fieldset {\n padding: 5px;\n margin: 5px;\n border: 1px solid #DDD;\n }\n \n #svg_docprops_container label {\n display: block;\n margin: .5em;\n }\n </style>\n <elix-dialog id="svg_docprops" aria-label="Sample dialog" closed>\n <div id="svg_docprops_container">\n <div id="tool_docprops_back" class="toolbar_button">\n <button id="tool_docprops_save">OK</button>\n <button id="tool_docprops_cancel">Cancel</button>\n </div>\n <fieldset id="svg_docprops_docprops">\n <legend id="svginfo_image_props">Image Properties</legend>\n <label>\n <span id="svginfo_title">Title:</span>\n <input type="text" id="canvas_title" />\n </label>\n <fieldset id="change_resolution">\n <legend id="svginfo_dim">Canvas Dimensions</legend>\n <label>\n <span id="svginfo_width">width:</span>\n <input type="text" id="canvas_width" size="6" />\n </label>\n <label>\n <span id="svginfo_height">height:</span>\n <input type="text" id="canvas_height" size="6" />\n </label>\n <label>\n <select id="resolution">\n <option id="selectedPredefined" selected="selected">Select predefined:</option>\n <option>640x480</option>\n <option>800x600</option>\n <option>1024x768</option>\n <option>1280x960</option>\n <option>1600x1200</option>\
2020-09-04 20:34:30 +00:00
/**
* A jQuery module to work with SVG attributes.
* @module jQueryAttr
* @license MIT
*/
2021-01-31 22:16:43 +00:00
function jQueryPluginSVG(en){var tn=en.fn.attr;return en.fn.attr=function(en,nn){var rn=this.length;if(!rn)return tn.call(this,en,nn);for(var an=0;an<rn;++an){var sn=this[an];if("http://www.w3.org/2000/svg"!==sn.namespaceURI)return tn.call(this,en,nn);if(void 0!==nn)sn.setAttribute(en,nn);else if(Array.isArray(en)){for(var cn={},un=en.length;un--;){var dn=en[un],pn=sn.getAttribute(dn);(pn||"0"===pn)&&(pn=isNaN(pn)?pn:pn-0),cn[dn]=pn}return cn}if("object"!==_typeof(en)){var hn=sn.getAttribute(en);return(hn||"0"===hn)&&(hn=isNaN(hn)?hn:hn-0),hn}for(var gn=0,An=Object.entries(en);gn<An.length;gn++){var mn=_slicedToArray(An[gn],2),vn=mn[0],yn=mn[1];sn.setAttribute(vn,yn)}}return this},en}var XE=document.createElementNS(eA.SVG,"svg");function transformToString(en){var tn=en.matrix,nn="";switch(en.type){case 1:nn="matrix("+[tn.a,tn.b,tn.c,tn.d,tn.e,tn.f].join(",")+")";break;case 2:nn="translate("+tn.e+","+tn.f+")";break;case 3:nn=tn.a===tn.d?"scale(".concat(tn.a,")"):"scale(".concat(tn.a,",").concat(tn.d,")");break;case 4:var rn=0,an=0;if(0!==en.angle){var sn=1-tn.a;an=(sn*tn.f+tn.b*tn.e)/(sn*sn+tn.b*tn.b),rn=(tn.e-tn.b*an)/sn}nn="rotate("+en.angle+" "+rn+","+an+")"}return nn}var YE={},JE=function(){function SVGTransformList(en){_classCallCheck(this,SVGTransformList),this._elem=en||null,this._xforms=[],this._update=function(){for(var en="",tn=0;tn<this.numberOfItems;++tn){en+=transformToString(this._list.getItem(tn))+" "}this._elem.setAttribute("transform",en)},this._list=this,this._init=function(){var en=this,tn=this._elem.getAttribute("transform");if(tn)for(var nn=/\s*((scale|matrix|rotate|translate)\s*\(.*?\))\s*,?\s*/,rn=!0;rn;)rn=tn.match(nn),tn=tn.replace(nn,""),rn&&rn[1]&&function(){var tn=rn[1].split(/\s*\(/),nn=tn[0],an=tn[1].match(/\s*(.*?)\s*\)/);an[1]=an[1].replace(/(\d)-/g,"$1 -");var sn=an[1].split(/[, ]+/),cn="abcdef".split(""),un=XE.createSVGMatrix();Object.values(sn).forEach((function(en,tn){sn[tn]=Number.parseFloat(en),"matrix"===nn&&(un[cn[tn]]=sn[tn])}));var dn=XE.createSVGTransform(),pn="set"+nn.charAt(0).toUpperCase()+nn.slice(1),hn="matrix"===nn?[un]:sn;"scale"===nn&&1===hn.length?hn.push(hn[0]):"translate"===nn&&1===hn.length?hn.push(0):"rotate"===nn&&1===hn.length&&hn.push(0,0),dn[pn].apply(dn,_toConsumableArray(hn)),en._list.appendItem(dn)}()},this._removeFromOtherLists=function(en){en&&Object.values(YE).some((function(tn){for(var nn=0,rn=tn._xforms.length;nn<rn;++nn)if(tn._xforms[nn]===en)return tn.removeItem(nn),!0;return!1}))},this.numberOfItems=0}return _createClass(SVGTransformList,[{key:"clear",value:function clear(){this.numberOfItems=0,this._xforms=[]}},{key:"initialize",value:function initialize(en){this.numberOfItems=1,this._removeFromOtherLists(en),this._xforms=[en]}},{key:"getItem",value:function getItem(en){if(en<this.numberOfItems&&en>=0)return this._xforms[en];var tn=new Error("DOMException with code=INDEX_SIZE_ERR");throw tn.code=1,tn}},{key:"insertItemBefore",value:function insertItemBefore(en,tn){var nn=null;if(tn>=0)if(tn<this.numberOfItems){this._removeFromOtherLists(en);var rn,an=new Array(this.numberOfItems+1);for(rn=0;rn<tn;++rn)an[rn]=this._xforms[rn];an[rn]=en;for(var sn=rn+1;rn<this.numberOfItems;++sn,++rn)an[sn]=this._xforms[rn];this.numberOfItems++,this._xforms=an,nn=en,this._list._update()}else nn=this._list.appendItem(en);return nn}},{key:"replaceItem",value:function replaceItem(en,tn){var nn=null;return tn<this.numberOfItems&&tn>=0&&(this._removeFromOtherLists(en),this._xforms[tn]=en,nn=en,this._list._update()),nn}},{key:"removeItem",value:function removeItem(en){if(en<this.numberOfItems&&en>=0){var tn,nn=this._xforms[en],rn=new Array(this.numberOfItems-1);for(tn=0;tn<en;++tn)rn[tn]=this._xforms[tn];for(var an=tn;an<this.numberOfItems-1;++an,++tn)rn[an]=this._xforms[tn+1];return this.numberOfItems--,this._xforms=rn,this._list._update(),nn}var sn=new Error("DOMException with code=INDEX_SIZE_ERR");throw sn.code=1,sn}},{key:"appendItem",value:function appendItem(en){return this._removeFromOtherLists(en),this._xforms.push(en),this.numberOfItems++,this._list._update(),en}}])
/**
* @license
* FileSaver.js
* A saveAs() FileSaver implementation.
2020-09-04 20:34:30 +00:00
*
2021-01-31 22:16:43 +00:00
* By Eli Grey, http://eligrey.com
*
* License : https://github.com/eligrey/FileSaver.js/blob/master/LICENSE.md (MIT)
* source : http://purl.eligrey.com/github/FileSaver.js
*/function a$1(en,tn,nn){var rn=new XMLHttpRequest;rn.open("GET",en),rn.responseType="blob",rn.onload=function(){WU(rn.response,tn,nn)},rn.onerror=function(){KU.error("could not download file")},rn.send()}function o$1(en){var tn=new XMLHttpRequest;tn.open("HEAD",en,!1);try{tn.send()}catch(en){}return tn.status>=200&&tn.status<=299}function s$1(en){try{en.dispatchEvent(new MouseEvent("click"))}catch(nn){var tn=document.createEvent("MouseEvents");tn.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),en.dispatchEvent(tn)}}var qU,$U,WU=zU.saveAs||("object"!=("undefined"==typeof window?"undefined":_typeof(window))||window!==zU?function(){}:"download"in HTMLAnchorElement.prototype?function(en,tn,nn){var rn=zU.URL||zU.webkitURL,an=document.createElement("a");tn=tn||en.name||"download",an.download=tn,an.rel="noopener","string"==typeof en?(an.href=en,an.origin!==location.origin?o$1(an.href)?a$1(en,tn,nn):s$1(an,an.target="_blank"):s$1(an)):(an.href=rn.createObjectURL(en),setTimeout((function(){rn.revokeObjectURL(an.href)}),4e4),setTimeout((function(){s$1(an)}),0))}:"msSaveOrOpenBlob"in navigator?function(en,tn,nn){if(tn=tn||en.name||"download","string"==typeof en)if(o$1(en))a$1(en,tn,nn);else{var rn=document.createElement("a");rn.href=en,rn.target="_blank",setTimeout((function(){s$1(rn)}))}else navigator.msSaveOrOpenBlob(function(en,tn){return void 0===tn?tn={autoBom:!1}:"object"!=_typeof(tn)&&(KU.warn("Deprecated: Expected third argument to be a object"),tn={autoBom:!tn}),tn.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(en.type)?new Blob([String.fromCharCode(65279),en],{type:en.type}):en}(en,nn),tn)}:function(en,tn,nn,rn){if((rn=rn||open("","_blank"))&&(rn.document.title=rn.document.body.innerText="downloading..."),"string"==typeof en)return a$1(en,tn,nn);var an="application/octet-stream"===en.type,sn=/constructor/i.test(zU.HTMLElement)||zU.safari,cn=/CriOS\/[\d]+/.test(navigator.userAgent);if((cn||an&&sn)&&"object"==("undefined"==typeof FileReader?"undefined":_typeof(FileReader))){var un=new FileReader;un.onloadend=function(){var en=un.result;en=cn?en:en.replace(/^data:[^;]*;/,"data:attachment/file;"),rn?rn.location.href=en:location=en,rn=null},un.readAsDataURL(en)}else{var dn=zU.URL||zU.webkitURL,pn=dn.createObjectURL(en);rn?rn.location=pn:location.href=pn,rn=null,setTimeout((function(){dn.revokeObjectURL(pn)}),4e4)}});
/**
* A class to parse color values
* @author Stoyan Stefanov <sstoo@gmail.com>
* {@link http://www.phpied.com/rgb-color-parser-in-javascript/}
* @license Use it if you like it
*/function h$1(en){var tn;en=en||"",this.ok=!1,"#"==en.charAt(0)&&(en=en.substr(1,6)),en={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",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"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",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",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:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",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",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"}[en=(en=en.replace(/ /g,"")).toLowerCase()]||en;for(var nn=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function process(en){return[parseInt(en[1]),parseInt(en[2]),parseInt(en[3])]}},{re:/^(\w{2})(\w{2})(\w{2})$/,example:["#00ff00","336699"],process:function process(en){return[parseInt(en[1],16),parseInt(en[2],16),parseInt(en[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function process(en){return[parseInt(en[1]+en[1],16),parseInt(en[2]+en[2],16),parseInt(en[3]+en[3],16)]}}],rn=0;rn<nn.length;rn++){var an=nn[rn].re,sn=nn[rn].process,cn=an.exec(en);cn&&(tn=sn(cn),this.r=tn[0],this.g=tn[1],this.b=tn[2],this.ok=!0)}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toHex=function(){var en=this.r.toString(16),tn=this.g.toString(16),nn=this.b.toString(16);return 1==en.length&&(en="0"+en),1==tn.length&&(tn="0"+tn),1==nn.length&&(nn="0"+nn),"#"+en+tn+nn}}
/**
* @license
* Joseph Myers does not specify a particular license for his work.
*
* Author: Joseph Myers
* Accessed from: http://www.myersdaily.org/joseph/javascript/md5.js
*
* Modified by: Owen Leong
*/function f$h(en,tn){var nn=en[0],rn=en[1],an=en[2],sn=en[3];nn=p$1(nn,rn,an,sn,tn[0],7,-680876936),sn=p$1(sn,nn,rn,an,tn[1],12,-389564586),an=p$1(an,sn,nn,rn,tn[2],17,606105819),rn=p$1(rn,an,sn,nn,tn[3],22,-1044525330),nn=p$1(nn,rn,an,sn,tn[4],7,-176418897),sn=p$1(sn,nn,rn,an,tn[5],12,1200080426),an=p$1(an,sn,nn,rn,tn[6],17,-1473231341),rn=p$1(rn,an,sn,nn,tn[7],22,-45705983),nn=p$1(nn,rn,an,sn,tn[8],7,1770035416),sn=p$1(sn,nn,rn,an,tn[9],12,-1958414417),an=p$1(an,sn,nn,rn,tn[10],17,-42063),rn=p$1(rn,an,sn,nn,tn[11],22,-1990404162),nn=p$1(nn,rn,an,sn,tn[12],7,1804603682),sn=p$1(sn,nn,rn,an,tn[13],12,-40341101),an=p$1(an,sn,nn,rn,tn[14],17,-1502002290),nn=g(nn,rn=p$1(rn,an,sn,nn,tn[15],22,1236535329),an,sn,tn[1],5,-165796510),sn=g(sn,nn,rn,an,tn[6],9,-1069501632),an=g(an,sn,nn,rn,tn[11],14,643717713),rn=g(rn,an,sn,nn,tn[0],20,-373897302),nn=g(nn,rn,an,sn,tn[5],5,-701558691),sn=g(sn,nn,rn,an,tn[10],9,38016083),an=g(an,sn,nn,rn,tn[15],14,-660478335),rn=g(rn,an,sn,nn,tn[4],20,-405537848),nn=g(nn,rn,an,sn,tn[9],5,568446438),sn=g(sn,nn,rn,an,tn[14],9,-1019803690),an=g(an,sn,nn,rn,tn[3],14,-187363961),rn=g(rn,an,sn,nn,tn[8],20,1163531501),nn=g(nn,rn,an,sn,tn[13],5,-1444681467),sn=g(sn,nn,rn,an,tn[2],9,-51403784),an=g(an,sn,nn,rn,tn[7],14,1735328473),nn=m$2(nn,rn=g(rn,an,sn,nn,tn[12],20,-1926607734),an,sn,tn[5],4,-378558),sn=m$2(sn,nn,rn,an,tn[8],11,-2022574463),an=m$2(an,sn,nn,rn,tn[11],16,1839030562),rn=m$2(rn,an,sn,nn,tn[14],23,-35309556),nn=m$2(nn,rn,an,sn,tn[1],4,-1530992060),sn=m$2(sn,nn,rn,an,tn[4],11,1272893353),an=m$2(an,sn,nn,rn,tn[7],16,-155497632),rn=m$2(rn,an,sn,nn,tn[10],23,-1094730640),nn=m$2(nn,rn,an,sn,tn[13],4,681279174),sn=m$2(sn,nn,rn,an,tn[0],11,-358537222),an=m$2(an,sn,nn,rn,tn[3],16,-722521979),rn=m$2(rn,an,sn,nn,tn[6],23,76029189),nn=m$2(nn,rn,an,sn,tn[9],4,-640364487),sn=m$2(sn,nn,rn,an,tn[12],11,-421815835),an=m$2(an,sn,nn,rn,tn[15],16,530742520),nn=v$1(nn,rn=m$2(rn,an,sn,nn,tn[2],23,-995338651),an,sn,tn[0],6,-198630844),sn=v$1(sn,nn,rn,an,tn[7],10,1126891415),an=v$1(an,sn,nn,rn,tn[14],15,-1416354905),rn=v$1(rn,an,sn,nn,tn[5],21,-57434055),nn=v$1(nn,rn,an,sn,tn[12],6,1700485571),sn=v$1(sn,nn,rn,an,tn[3],10,-1894986606),an=v$1(an,sn,nn,rn,tn[10],15,-1051523),rn=v$1(rn,an,sn,nn,tn[1],21,-2054922799),nn=v$1(nn,rn,an,sn,tn[8],6,1873313359),sn=v$1(sn,nn,rn,an,tn[15],10,-30611744),an=v$1(an,sn,nn,rn,tn[6],15,-1560198380),rn=v$1(rn,an,sn,nn,tn[13],21,1309151649),nn=v$1(nn,rn,an,sn,tn[4],6,-145523070),sn=v$1(sn,nn,rn,an,tn[11],10,-1120210379),an=v$1(an,sn,nn,rn,tn[2],15,718787259),rn=v$1(rn,an,sn,nn,tn[9],21,-343485551),en[0]=x$1(nn,en[0]),en[1]=x$1(rn,en[1]),en[2]=x$1(an,en[2]),en[3]=x$1(sn,en[3])}function d(en,tn,nn,rn,an,sn){return tn=x$1(x$1(tn,en),x$1(rn,sn)),x$1(tn<<an|tn>>>32-an,nn)}function p$1(en,tn,nn,rn,an,sn,cn){return d(tn&nn|~tn&rn,en,tn,an,sn,cn)}function g(en,tn,nn,rn,an,sn,cn){return d(tn&rn|nn&~rn,en,tn,an,sn,cn)}function m$2(en,tn,nn,rn,an,sn,cn){return d(tn^nn^rn,en,tn,an,sn,cn)}function v$1(en,tn,nn,rn,an,sn,cn){return d(nn^(tn|~rn),en,tn,an,sn,cn)}function b(en){var tn,nn=en.length,rn=[1732584193,-271733879,-1732584194,271733878];for(tn=64;tn<=en.length;tn+=64)f$h(rn,y$1(en.substring(tn-64,tn)));en=en.substring(tn-64);var an=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(tn=0;tn<en.length;tn++)an[tn>>2]|=en.charCodeAt(tn)<<(tn%4<<3);if(an[tn>>2]|=128<<(tn%4<<3),tn>55)for(f$h(rn,an),tn=0;tn<16;tn++)an[tn]=0;return an[14]=8*nn,f$h(rn,an),rn}function y$1(en){var tn,nn=[];for(tn=0;tn<64;tn+=4)nn[tn>>2]=en.charCodeAt(tn)+(en.charCodeAt(tn+1)<<8)+(en.charCodeAt(tn+2)<<16)+(en.charCodeAt(tn+3)<<24);return nn}qU=zU.atob.bind(zU),$U=zU.btoa.bind(zU);var XU="0123456789abcdef".split("");function N$1(en){for(var tn="",nn=0;nn<4;nn++)tn+=XU[en>>8*nn+4&15]+XU[en>>8*nn&15];return tn}function L(en){return String.fromCharCode((255&en)>>0,(65280&en)>>8,(16711680&en)>>16,(4278190080&en)>>24)}function A(en){return b(en).map(L).join("")}function x$1(en,tn){return en+tn&4294967295}
/**
* @license
* FPDF is released under a permissive license: there is no usage restriction.
* You may embed it freely in your application (commercial or not), with or
* without modifications.
*
* Reference: http://www.fpdf.org/en/script/script37.php
*/
function S(en,tn){var nn,rn,an,sn;if(en!==nn){for(var cn=(an=en,sn=1+(256/en.length>>0),new Array(sn+1).join(an)),un=[],dn=0;dn<256;dn++)un[dn]=dn;var pn=0;for(dn=0;dn<256;dn++){var hn=un[dn];pn=(pn+hn+cn.charCodeAt(dn))%256,un[dn]=un[pn],un[pn]=hn}nn=en,rn=un}else un=rn;var gn=tn.length,An=0,mn=0,vn="";for(dn=0;dn<gn;dn++)mn=(mn+(hn=un[An=(An+1)%256]))%256,un[An]=un[mn],un[mn]=hn,cn=un[(un[An]+un[mn])%256],vn+=String.fromCharCode(tn.charCodeAt(dn)^cn);return vn}
/**
* @license
* Licensed under the MIT License.
* http://opensource.org/licenses/mit-license
* Author: Owen Leong (@owenl131)
* Date: 15 Oct 2020
* References:
* https://www.cs.cmu.edu/~dst/Adobe/Gallery/anon21jul01-pdf-encryption.txt
* https://github.com/foliojs/pdfkit/blob/master/lib/security.js
* http://www.fpdf.org/en/script/script37.php
*/!function(en){for(var tn=0;tn<en.length;tn++)en[tn]=N$1(en[tn]);en.join("")}(b("hello"));var YU={print:4,modify:8,copy:16,"annot-forms":32};function P(en,tn,nn,rn){this.v=1,this.r=2;var an=192;en.forEach((function(en){if(void 0!==YU.perm)throw new Error("Invalid permission: "+en);an+=YU[en]})),this.padding="(¿N^NuŠAd\0NVÿú\b..\0¶Ðh>€/\f©þdSiz";var sn=(tn+this.padding).substr(0,32),cn=(nn+this.padding).substr(0,32);this.O=this.processOwnerPassword(sn,cn),this.P=-(1+(255^an)),this.encryptionKey=A(sn+this.O+this.lsbFirstWord(this.P)+this.hexToBytes(rn)).substr(0,5),this.U=S(this.encryptionKey,this.padding)}function k(en){if("object"!=_typeof(en))throw new Error("Invalid Context passed to initialize PubSub (jsPDF-module)");var tn={};this.subscribe=function(en,nn,rn){if(rn=rn||!1,"string"!=typeof en||"function"!=typeof nn||"boolean"!=typeof rn)throw new Error("Invalid arguments passed to PubSub.subscribe (jsPDF-module)");tn.hasOwnProperty(en)||(tn[en]={});var an=Math.random().toString(35);return tn[en][an]=[nn,!!rn],an},this.unsubscribe=function(en){for(var nn in tn)if(tn[nn][en])return delete tn[nn][en],0===Object.keys(tn[nn]).length&&delete tn[nn],!0;return!1},this.publish=function(nn){if(tn.hasOwnProperty(nn)){var rn=Array.prototype.slice.call(arguments,1),an=[];for(var sn in tn[nn]){var cn=tn[nn][sn];try{cn[0].apply(en,rn)}catch(en){zU.console&&KU.error("jsPDF PubSub Error",en.message,en)}cn[1]&&an.push(sn)}an.length&&an.forEach(this.unsubscribe)}},this.getTopics=function(){return tn}}function I(en){if(!(this instanceof I))return new I(en);var tn="opacity,stroke-opacity".split(",");for(var nn in en)en.hasOwnProperty(nn)&&tn.indexOf(nn)>=0&&(this[nn]=en[nn]);this.id="",this.objectNumber=-1}function F(en,tn){this.gState=en,this.matrix=tn,this.id="",this.objectNumber=-1}function C(en,tn,nn,rn,an){if(!(this instanceof C))return new C(en,tn,nn,rn,an);this.type="axial"===en?2:3,this.coords=tn,this.colors=nn,F.call(this,rn,an)}function j$2(en,tn,nn,rn,an){if(!(this instanceof j$2))return new j$2(en,tn,nn,rn,an);this.boundingBox=en,this.xStep=tn,this.yStep=nn,this.stream="",this.cloneIndex=0,F.call(this,rn,an)}function O$1(en){var tn,nn="string"==typeof arguments[0]?arguments[0]:"p",rn=arguments[1],an=arguments[2],sn=arguments[3],cn=[],un=1,dn=16,pn="S",hn=null;"object"==_typeof(en=en||{})&&(nn=en.orientation,rn=en.unit||rn,an=en.format||an,sn=en.compress||en.compressPdf||sn,null!==(hn=en.encryption||null)&&(hn.userPassword=hn.userPassword||"",hn.ownerPassword=hn.ownerPassword||"",hn.userPermissions=hn.userPermissions||[]),un="number"==typeof en.userUnit?Math.abs(en.userUnit):1,void 0!==en.precision&&(tn=en.precision),void 0!==en.floatPrecision&&(dn=en.floatPrecision),pn=en.defaultPathOperation||"S"),cn=en.filters||(!0===sn?["FlateEncode"]:cn),rn=rn||"mm",nn=(""+(nn||"P")).toLowerCase();var gn=en.putOnlyUsedFonts||!1,An={},mn={internal:{},__private__:{}};mn.__private__.PubSub=k;var vn="1.3",yn=mn.__private__.getPdfVersion=function(){return vn};mn.__private__.setPdfVersion=function(en){vn=en};var _n={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};mn.__private__.getPageFormats=function(){return _n};var wn=mn.__private__.getPageFormat=function(en){return _n[en]};an=an||"a4";var xn={COMPAT:"compat",ADVANCED:"advanced"},Sn=xn.COMPAT;function S(){this.saveGraphicsState
/** @license
* jsPDF addImage plugin
* Copyright (c) 2012 Jason Siefken, https://github.com/siefkenj/
* 2013 Chris Dowling, https://github.com/gingerchris
* 2013 Trinh Ho, https://github.com/ineedfat
* 2013 Edwin Alejandro Perez, https://github.com/eaparango
* 2013 Norah Smith, https://github.com/burnburnrocket
2020-09-04 20:34:30 +00:00
* 2014 Diego Casorran, https://github.com/diegocr
2021-01-31 22:16:43 +00:00
* 2014 James Robb, https://github.com/jamesbrobb
2020-09-04 20:34:30 +00:00
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2020-09-08 23:35:47 +00:00
*/
2021-01-31 22:16:43 +00:00
function At(en){return en.reduce((function(en,tn,nn){return en[tn]=nn,en}),{})}JU.AcroFormChoiceField=kM,JU.AcroFormListBox=BM,JU.AcroFormComboBox=EM,JU.AcroFormEditBox=PM,JU.AcroFormButton=LM,JU.AcroFormPushButton=TM,JU.AcroFormRadioButton=NM,JU.AcroFormCheckBox=OM,JU.AcroFormTextField=FM,JU.AcroFormPasswordField=UM,JU.AcroFormAppearance=MM,JU.AcroForm={ChoiceField:kM,ListBox:BM,ComboBox:EM,EditBox:PM,Button:LM,PushButton:TM,RadioButton:NM,CheckBox:OM,TextField:FM,PasswordField:UM,Appearance:MM},O$1.AcroForm={ChoiceField:kM,ListBox:BM,ComboBox:EM,EditBox:PM,Button:LM,PushButton:TM,RadioButton:NM,CheckBox:OM,TextField:FM,PasswordField:UM,Appearance:MM},function(en){en.__addimage__={};var tn="UNKNOWN",nn={PNG:[[137,80,78,71]],TIFF:[[77,77,0,42],[73,73,42,0]],JPEG:[[255,216,255,224,void 0,void 0,74,70,73,70,0],[255,216,255,225,void 0,void 0,69,120,105,102,0,0],[255,216,255,219],[255,216,255,238]],JPEG2000:[[0,0,0,12,106,80,32,32]],GIF87a:[[71,73,70,56,55,97]],GIF89a:[[71,73,70,56,57,97]],WEBP:[[82,73,70,70,void 0,void 0,void 0,void 0,87,69,66,80]],BMP:[[66,77],[66,65],[67,73],[67,80],[73,67],[80,84]]},rn=en.__addimage__.getImageFileTypeByImageData=function(en,rn){var an,sn;rn=rn||tn;var cn,un,dn,pn=tn;if(Bn(en))for(dn in nn)for(cn=nn[dn],an=0;an<cn.length;an+=1){for(un=!0,sn=0;sn<cn[an].length;sn+=1)if(void 0!==cn[an][sn]&&cn[an][sn]!==en[sn]){un=!1;break}if(!0===un){pn=dn;break}}else for(dn in nn)for(cn=nn[dn],an=0;an<cn.length;an+=1){for(un=!0,sn=0;sn<cn[an].length;sn+=1)if(void 0!==cn[an][sn]&&cn[an][sn]!==en.charCodeAt(sn)){un=!1;break}if(!0===un){pn=dn;break}}return pn===tn&&rn!==tn&&(pn=rn),pn},an=function i(en){for(var tn=this.internal.write,nn=this.internal.putStream,rn=(0,this.internal.getFilters)();-1!==rn.indexOf("FlateEncode");)rn.splice(rn.indexOf("FlateEncode"),1);en.objectId=this.internal.newObject();var an=[];if(an.push({key:"Type",value:"/XObject"}),an.push({key:"Subtype",value:"/Image"}),an.push({key:"Width",value:en.width}),an.push({key:"Height",value:en.height}),en.colorSpace===_n.INDEXED?an.push({key:"ColorSpace",value:"[/Indexed /DeviceRGB "+(en.palette.length/3-1)+" "+("sMask"in en&&void 0!==en.sMask?en.objectId+2:en.objectId+1)+" 0 R]"}):(an.push({key:"ColorSpace",value:"/"+en.colorSpace}),en.colorSpace===_n.DEVICE_CMYK&&an.push({key:"Decode",value:"[1 0 1 0 1 0 1 0]"})),an.push({key:"BitsPerComponent",value:en.bitsPerComponent}),"decodeParameters"in en&&void 0!==en.decodeParameters&&an.push({key:"DecodeParms",value:"<<"+en.decodeParameters+">>"}),"transparency"in en&&Array.isArray(en.transparency)){for(var sn="",cn=0,un=en.transparency.length;cn<un;cn++)sn+=en.transparency[cn]+" "+en.transparency[cn]+" ";an.push({key:"Mask",value:"["+sn+"]"})}void 0!==en.sMask&&an.push({key:"SMask",value:en.objectId+1+" 0 R"});var dn=void 0!==en.filter?["/"+en.filter]:void 0;if(nn({data:en.data,additionalKeyValues:an,alreadyAppliedFilters:dn,objectId:en.objectId}),tn("endobj"),"sMask"in en&&void 0!==en.sMask){var pn="/Predictor "+en.predictor+" /Colors 1 /BitsPerComponent "+en.bitsPerComponent+" /Columns "+en.width,hn={width:en.width,height:en.height,colorSpace:"DeviceGray",bitsPerComponent:en.bitsPerComponent,decodeParameters:pn,data:en.sMask};"filter"in en&&(hn.filter=en.filter),i.call(this,hn)}if(en.colorSpace===_n.INDEXED){var gn=this.internal.newObject();nn({data:Pn(new Uint8Array(en.palette)),objectId:gn}),tn("endobj")}},sn=function a(){var en=this.internal.collections.addImage_images;for(var tn in en)an.call(this,en[tn])},cn=function o(){var en,tn=this.internal.collections.addImage_images,nn=this.internal.write;for(var rn in tn)nn("/I"+(en=tn[rn]).index,en.objectId,"0","R")},un=function s(){this.internal.collections.addImage_images||(this.internal.collections.addImage_images={},this.internal.events.subscribe("putResources",sn),this.internal.events.subscribe("putXobjectDict",cn))},dn=function l(){var en=this.internal.collections.addImage_images;return un.call(this),en},pn=function h(){return Object.keys(this.internal.collections.addImage_images).length},hn=function f(tn){return"function"==typeof en["process"
2020-09-04 20:34:30 +00:00
/**
* @license
* Copyright (c) 2014 Steven Spungin (TwelveTone LLC) steven@twelvetone.tv
*
* Licensed under the MIT License.
* http://opensource.org/licenses/mit-license
*/
2021-01-31 22:16:43 +00:00
function(en){var tn=function e(en){if(void 0!==en&&""!=en)return!0};O$1.API.events.push(["addPage",function(en){this.internal.getPageInfo(en.pageNumber).pageContext.annotations=[]}]),en.events.push(["putPage",function(en){for(var nn,rn,an,sn=this.internal.getCoordinateString,cn=this.internal.getVerticalCoordinateString,un=this.internal.getPageInfoByObjId(en.objId),dn=en.pageContext.annotations,pn=!1,hn=0;hn<dn.length&&!pn;hn++)switch((nn=dn[hn]).type){case"link":(tn(nn.options.url)||tn(nn.options.pageNumber))&&(pn=!0);break;case"reference":case"text":case"freetext":pn=!0}if(0!=pn){this.internal.write("/Annots [");for(var gn=0;gn<dn.length;gn++){nn=dn[gn];var An=this.internal.pdfEscape,mn=this.internal.getEncryptor(en.objId);switch(nn.type){case"reference":this.internal.write(" "+nn.object.objId+" 0 R ");break;case"text":var vn=this.internal.newAdditionalObject(),yn=this.internal.newAdditionalObject(),_n=this.internal.getEncryptor(vn.objId),wn=nn.title||"Note";an="<</Type /Annot /Subtype /Text "+(rn="/Rect ["+sn(nn.bounds.x)+" "+cn(nn.bounds.y+nn.bounds.h)+" "+sn(nn.bounds.x+nn.bounds.w)+" "+cn(nn.bounds.y)+"] ")+"/Contents ("+An(_n(nn.contents))+")",an+=" /Popup "+yn.objId+" 0 R",an+=" /P "+un.objId+" 0 R",an+=" /T ("+An(_n(wn))+") >>",vn.content=an;var xn=vn.objId+" 0 R";an="<</Type /Annot /Subtype /Popup "+(rn="/Rect ["+sn(nn.bounds.x+30)+" "+cn(nn.bounds.y+nn.bounds.h)+" "+sn(nn.bounds.x+nn.bounds.w+30)+" "+cn(nn.bounds.y)+"] ")+" /Parent "+xn,nn.open&&(an+=" /Open true"),an+=" >>",yn.content=an,this.internal.write(vn.objId,"0 R",yn.objId,"0 R");break;case"freetext":rn="/Rect ["+sn(nn.bounds.x)+" "+cn(nn.bounds.y)+" "+sn(nn.bounds.x+nn.bounds.w)+" "+cn(nn.bounds.y+nn.bounds.h)+"] ";var Sn=nn.color||"#000000";an="<</Type /Annot /Subtype /FreeText "+rn+"/Contents ("+An(mn(nn.contents))+")",an+=" /DS(font: Helvetica,sans-serif 12.0pt; text-align:left; color:#"+Sn+")",an+=" /Border [0 0 0]",an+=" >>",this.internal.write(an);break;case"link":if(nn.options.name){var Cn=this.annotations._nameMap[nn.options.name];nn.options.pageNumber=Cn.page,nn.options.top=Cn.y}else nn.options.top||(nn.options.top=0);if(rn="/Rect ["+nn.finalBounds.x+" "+nn.finalBounds.y+" "+nn.finalBounds.w+" "+nn.finalBounds.h+"] ",an="",nn.options.url)an="<</Type /Annot /Subtype /Link "+rn+"/Border [0 0 0] /A <</S /URI /URI ("+An(mn(nn.options.url))+") >>";else if(nn.options.pageNumber)switch(an="<</Type /Annot /Subtype /Link "+rn+"/Border [0 0 0] /Dest ["+this.internal.getPageInfo(nn.options.pageNumber).objId+" 0 R",nn.options.magFactor=nn.options.magFactor||"XYZ",nn.options.magFactor){case"Fit":an+=" /Fit]";break;case"FitH":an+=" /FitH "+nn.options.top+"]";break;case"FitV":nn.options.left=nn.options.left||0,an+=" /FitV "+nn.options.left+"]";break;case"XYZ":default:var kn=cn(nn.options.top);nn.options.left=nn.options.left||0,void 0===nn.options.zoom&&(nn.options.zoom=0),an+=" /XYZ "+nn.options.left+" "+kn+" "+nn.options.zoom+"]"}""!=an&&(an+=" >>",this.internal.write(an))}}this.internal.write("]")}}]),en.createAnnotation=function(en){var tn=this.internal.getCurrentPageInfo();switch(en.type){case"link":this.link(en.bounds.x,en.bounds.y,en.bounds.w,en.bounds.h,en);break;case"text":case"freetext":tn.pageContext.annotations.push(en)}},en.link=function(en,tn,nn,rn,an){var sn=this.internal.getCurrentPageInfo(),cn=this.internal.getCoordinateString,un=this.internal.getVerticalCoordinateString;sn.pageContext.annotations.push({finalBounds:{x:cn(en),y:un(tn),w:cn(en+nn),h:un(tn+rn)},options:an,type:"link"})},en.textWithLink=function(en,tn,nn,rn){var an=this.getTextWidth(en),sn=this.internal.getLineHeight()/this.internal.scaleFactor;return this.text(en,tn,nn,rn),nn+=.2*sn,"center"===rn.align&&(tn-=an/2),"right"===rn.align&&(tn-=an),this.link(tn,nn-sn,an,sn,rn),an},en.getTextWidth=function(en){var tn=this.internal.getFontSize();return this.getStringUnitWidth(en)*tn/this.internal.scaleFactor}}(O$1.API),
2020-09-04 20:34:30 +00:00
/**
* @license
* Copyright (c) 2017 Aras Abbasi
*
* Licensed under the MIT License.
* http://opensource.org/licenses/mit-license
*/
2021-01-31 22:16:43 +00:00
function(en){var tn={1569:[65152],1570:[65153,65154],1571:[65155,65156],1572:[65157,65158],1573:[65159,65160],1574:[65161,65162,65163,65164],1575:[65165,65166],1576:[65167,65168,65169,65170],1577:[65171,65172],1578:[65173,65174,65175,65176],1579:[65177,65178,65179,65180],1580:[65181,65182,65183,65184],1581:[65185,65186,65187,65188],1582:[65189,65190,65191,65192],1583:[65193,65194],1584:[65195,65196],1585:[65197,65198],1586:[65199,65200],1587:[65201,65202,65203,65204],1588:[65205,65206,65207,65208],1589:[65209,65210,65211,65212],1590:[65213,65214,65215,65216],1591:[65217,65218,65219,65220],1592:[65221,65222,65223,65224],1593:[65225,65226,65227,65228],1594:[65229,65230,65231,65232],1601:[65233,65234,65235,65236],1602:[65237,65238,65239,65240],1603:[65241,65242,65243,65244],1604:[65245,65246,65247,65248],1605:[65249,65250,65251,65252],1606:[65253,65254,65255,65256],1607:[65257,65258,65259,65260],1608:[65261,65262],1609:[65263,65264,64488,64489],1610:[65265,65266,65267,65268],1649:[64336,64337],1655:[64477],1657:[64358,64359,64360,64361],1658:[64350,64351,64352,64353],1659:[64338,64339,64340,64341],1662:[64342,64343,64344,64345],1663:[64354,64355,64356,64357],1664:[64346,64347,64348,64349],1667:[64374,64375,64376,64377],1668:[64370,64371,64372,64373],1670:[64378,64379,64380,64381],1671:[64382,64383,64384,64385],1672:[64392,64393],1676:[64388,64389],1677:[64386,64387],1678:[64390,64391],1681:[64396,64397],1688:[64394,64395],1700:[64362,64363,64364,64365],1702:[64366,64367,64368,64369],1705:[64398,64399,64400,64401],1709:[64467,64468,64469,64470],1711:[64402,64403,64404,64405],1713:[64410,64411,64412,64413],1715:[64406,64407,64408,64409],1722:[64414,64415],1723:[64416,64417,64418,64419],1726:[64426,64427,64428,64429],1728:[64420,64421],1729:[64422,64423,64424,64425],1733:[64480,64481],1734:[64473,64474],1735:[64471,64472],1736:[64475,64476],1737:[64482,64483],1739:[64478,64479],1740:[64508,64509,64510,64511],1744:[64484,64485,64486,64487],1746:[64430,64431],1747:[64432,64433]},nn={65247:{65154:65269,65156:65271,65160:65273,65166:65275},65248:{65154:65270,65156:65272,65160:65274,65166:65276},65165:{65247:{65248:{65258:65010}}},1617:{1612:64606,1613:64607,1614:64608,1615:64609,1616:64610}},rn={1612:64606,1613:64607,1614:64608,1615:64609,1616:64610},an=[1570,1571,1573,1575];en.__arabicParser__={};var sn=en.__arabicParser__.isInArabicSubstitutionA=function(en){return void 0!==tn[en.charCodeAt(0)]},cn=en.__arabicParser__.isArabicLetter=function(en){return"string"==typeof en&&/^[\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF]+$/.test(en)},un=en.__arabicParser__.isArabicEndLetter=function(en){return cn(en)&&sn(en)&&tn[en.charCodeAt(0)].length<=2},dn=en.__arabicParser__.isArabicAlfLetter=function(en){return cn(en)&&an.indexOf(en.charCodeAt(0))>=0};en.__arabicParser__.arabicLetterHasIsolatedForm=function(en){return cn(en)&&sn(en)&&tn[en.charCodeAt(0)].length>=1};var pn=en.__arabicParser__.arabicLetterHasFinalForm=function(en){return cn(en)&&sn(en)&&tn[en.charCodeAt(0)].length>=2};en.__arabicParser__.arabicLetterHasInitialForm=function(en){return cn(en)&&sn(en)&&tn[en.charCodeAt(0)].length>=3};var hn=en.__arabicParser__.arabicLetterHasMedialForm=function(en){return cn(en)&&sn(en)&&4==tn[en.charCodeAt(0)].length},gn=en.__arabicParser__.resolveLigatures=function(en){var tn=0,rn=nn,an="",sn=0;for(tn=0;tn<en.length;tn+=1)void 0!==rn[en.charCodeAt(tn)]?(sn++,"number"==typeof(rn=rn[en.charCodeAt(tn)])&&(an+=String.fromCharCode(rn),rn=nn,sn=0),tn===en.length-1&&(rn=nn,an+=en.charAt(tn-(sn-1)),tn-=sn-1,sn=0)):(rn=nn,an+=en.charAt(tn-sn),tn-=sn,sn=0);return an};en.__arabicParser__.isArabicDiacritic=function(en){return void 0!==en&&void 0!==rn[en.charCodeAt(0)]};var An=en.__arabicParser__.getCorrectForm=function(en,tn,nn){return cn(en)?!1===sn(en)?-1:!pn(en)||!cn(tn)&&!cn(nn)||!cn(nn)&&un(tn)||un(en)&&!cn(tn)||un(en)&&dn(tn)||un(en)&&un(tn)?0:hn(en)&&cn(tn)&&!un(tn)&&cn(nn)&&pn(nn)?3:un(en)||!cn(nn)?1:2:-1},mn=function d(en){var nn=0,rn=0,an=0,sn="",un="",dn="",pn=(en=en||"").split("\\s+"),hn=[];for(nn=0;nn<pn.length;nn+=1){fo
2020-09-04 20:34:30 +00:00
/**
* @license
* Copyright (c) 2014 Steven Spungin (TwelveTone LLC) steven@twelvetone.tv
*
* Licensed under the MIT License.
* http://opensource.org/licenses/mit-license
*/
2021-01-31 22:16:43 +00:00
function(en){var tn=function e(){var en=void 0;Object.defineProperty(this,"pdf",{get:function get(){return en},set:function set(tn){en=tn}});var e=150;Object.defineProperty(this,"width",{get:function get(){return e},set:function set(en){e=isNaN(en)||!1===Number.isInteger(en)||en<0?150:en,this.getContext("2d").pageWrapXEnabled&&(this.getContext("2d").pageWrapX=e+1)}});var tn=300;Object.defineProperty(this,"height",{get:function get(){return tn},set:function set(en){tn=isNaN(en)||!1===Number.isInteger(en)||en<0?300:en,this.getContext("2d").pageWrapYEnabled&&(this.getContext("2d").pageWrapY=tn+1)}});var nn=[];Object.defineProperty(this,"childNodes",{get:function get(){return nn},set:function set(en){nn=en}});var rn={};Object.defineProperty(this,"style",{get:function get(){return rn},set:function set(en){rn=en}}),Object.defineProperty(this,"parentNode",{})};tn.prototype.getContext=function(en,tn){var nn;if("2d"!==(en=en||"2d"))return null;for(nn in tn)this.pdf.context2d.hasOwnProperty(nn)&&(this.pdf.context2d[nn]=tn[nn]);return this.pdf.context2d._canvas=this,this.pdf.context2d},tn.prototype.toDataURL=function(){throw new Error("toDataURL is not implemented.")},en.events.push(["initialized",function(){this.canvas=new tn,this.canvas.pdf=this}])}(O$1.API),
2020-09-04 20:34:30 +00:00
/**
* @license
* ====================================================================
* Copyright (c) 2013 Youssef Beddad, youssef.beddad@gmail.com
* 2013 Eduardo Menezes de Morais, eduardo.morais@usp.br
* 2013 Lee Driscoll, https://github.com/lsdriscoll
* 2014 Juan Pablo Gaviria, https://github.com/juanpgaviria
* 2014 James Hall, james@parall.ax
* 2014 Diego Casorran, https://github.com/diegocr
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* ====================================================================
*/
2021-01-31 22:16:43 +00:00
function(en){var tn={left:0,top:0,bottom:0,right:0},nn=!1,rn=function n(){void 0===this.internal.__cell__&&(this.internal.__cell__={},this.internal.__cell__.padding=3,this.internal.__cell__.headerFunction=void 0,this.internal.__cell__.margins=Object.assign({},tn),this.internal.__cell__.margins.width=this.getPageWidth(),an.call(this))},an=function i(){this.internal.__cell__.lastCell=new sn,this.internal.__cell__.pages=1},sn=function a(){var en=arguments[0];Object.defineProperty(this,"x",{enumerable:!0,get:function get(){return en},set:function set(tn){en=tn}});var tn=arguments[1];Object.defineProperty(this,"y",{enumerable:!0,get:function get(){return tn},set:function set(en){tn=en}});var nn=arguments[2];Object.defineProperty(this,"width",{enumerable:!0,get:function get(){return nn},set:function set(en){nn=en}});var rn=arguments[3];Object.defineProperty(this,"height",{enumerable:!0,get:function get(){return rn},set:function set(en){rn=en}});var an=arguments[4];Object.defineProperty(this,"text",{enumerable:!0,get:function get(){return an},set:function set(en){an=en}});var a=arguments[5];Object.defineProperty(this,"lineNumber",{enumerable:!0,get:function get(){return a},set:function set(en){a=en}});var sn=arguments[6];return Object.defineProperty(this,"align",{enumerable:!0,get:function get(){return sn},set:function set(en){sn=en}}),this};sn.prototype.clone=function(){return new sn(this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align)},sn.prototype.toArray=function(){return[this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align]},en.setHeaderFunction=function(en){return rn.call(this),this.internal.__cell__.headerFunction="function"==typeof en?en:void 0,this},en.getTextDimensions=function(en,tn){rn.call(this);var nn=(tn=tn||{}).fontSize||this.getFontSize(),an=tn.font||this.getFont(),sn=tn.scaleFactor||this.internal.scaleFactor,cn=0,un=0,dn=0;if(!Array.isArray(en)&&"string"!=typeof en){if("number"!=typeof en)throw new Error("getTextDimensions expects text-parameter to be of type String or type Number or an Array of Strings.");en=String(en)}var pn=tn.maxWidth;pn>0?"string"==typeof en?en=this.splitTextToSize(en,pn):"[object Array]"===Object.prototype.toString.call(en)&&(en=en.reduce((function(en,tn){return en.concat(scope.splitTextToSize(tn,pn))}),[])):en=Array.isArray(en)?en:[en];for(var hn=0;hn<en.length;hn++)cn<(dn=this.getStringUnitWidth(en[hn],{font:an})*nn)&&(cn=dn);return 0!==cn&&(un=en.length),{w:cn/=sn,h:Math.max((un*nn*this.getLineHeightFactor()-nn*(this.getLineHeightFactor()-1))/sn,0)}},en.cellAddPage=function(){rn.call(this),this.addPage();var en=this.internal.__cell__.margins||tn;return this.internal.__cell__.lastCell=new sn(en.left,en.top,void 0,void 0),this.internal.__cell__.pages+=1,this};var cn=en.cell=function(){var en;en=arguments[0]instanceof sn?arguments[0]:new sn(arguments[0],arguments[1],arguments[2],arguments[3],arguments[4],arguments[5]),rn.call(this);var an=this.internal.__cell__.lastCell,cn=this.internal.__cell__.padding,un=this.internal.__cell__.margins||tn,dn=this.internal.__cell__.tableHeaderRow,pn=this.internal.__cell__.printHeaders;return void 0!==an.lineNumber&&(an.lineNumber===en.lineNumber?(en.x=(an.x||0)+(an.width||0),en.y=an.y||0):an.y+an.height+en.height+un.bottom>this.getPageHeight()?(this.cellAddPage(),en.y=un.top,pn&&dn&&(this.printHeaderRow(en.lineNumber,!0),en.y+=dn[0].height)):en.y=an.y+an.height||en.y),void 0!==en.text[0]&&(this.rect(en.x,en.y,en.width,en.height,!0===nn?"FD":void 0),"right"===en.align?this.text(en.text,en.x+en.width-cn,en.y+cn,{align:"right",baseline:"top"}):"center"===en.align?this.text(en.text,en.x+en.width/2,en.y+cn,{align:"center",baseline:"top",maxWidth:en.width-cn-cn}):this.text(en.text,en.x+cn,en.y+cn,{align:"left",baseline:"top",maxWidth:en.width-cn-cn})),this.internal.__cell__.lastCell=en,this};en.table=function(en,nn,dn,pn,hn){if(rn.call(this),!dn)throw new Error("No data for PDF table.");var gn,An,mn,vn,yn=[],_n=[],wn=[],xn={},Sn={},Cn=[],kn=[],Bn=(hn=hn||{}).autoSize||!1,En=!1!==hn.printHeaders,Pn=hn.css&&void 0!==h
2020-09-04 20:34:30 +00:00
/**
* @license
* jsPDF filters PlugIn
* Copyright (c) 2014 Aras Abbasi
*
* Licensed under the MIT License.
* http://opensource.org/licenses/mit-license
2021-01-31 22:16:43 +00:00
*/
function(en){var tn=function r(en){var tn,r,nn,rn,an,sn,cn,un,dn,pn;for(/[^\x00-\xFF]/.test(en),r=[],nn=0,rn=(en+=tn="\0\0\0\0".slice(en.length%4||4)).length;rn>nn;nn+=4)0!==(an=(en.charCodeAt(nn)<<24)+(en.charCodeAt(nn+1)<<16)+(en.charCodeAt(nn+2)<<8)+en.charCodeAt(nn+3))?(sn=(an=((an=((an=((an=(an-(pn=an%85))/85)-(dn=an%85))/85)-(un=an%85))/85)-(cn=an%85))/85)%85,r.push(sn+33,cn+33,un+33,dn+33,pn+33)):r.push(122);return function(en,tn){for(var nn=tn;nn>0;nn--)en.pop()}(r,tn.length),String.fromCharCode.apply(String,r)+"~>"},nn=function n(en){var tn,nn,n,rn,an,sn=String,cn="length",un=255,dn="charCodeAt",pn="slice",hn="replace";for(en[pn](-2),en=en[pn](0,-2)[hn](/\s/g,"")[hn]("z","!!!!!"),n=[],rn=0,an=(en+=tn="uuuuu"[pn](en[cn]%5||5))[cn];an>rn;rn+=5)nn=52200625*(en[dn](rn)-33)+614125*(en[dn](rn+1)-33)+7225*(en[dn](rn+2)-33)+85*(en[dn](rn+3)-33)+(en[dn](rn+4)-33),n.push(un&nn>>24,un&nn>>16,un&nn>>8,un&nn);return function(en,tn){for(var nn=tn;nn>0;nn--)en.pop()}(n,tn[cn]),sn.fromCharCode.apply(sn,n)},rn=function i(en){var tn=new RegExp(/^([0-9A-Fa-f]{2})+$/);if(-1!==(en=en.replace(/\s/g,"")).indexOf(">")&&(en=en.substr(0,en.indexOf(">"))),en.length%2&&(en+="0"),!1===tn.test(en))return"";for(var nn="",rn=0;rn<en.length;rn+=2)nn+=String.fromCharCode("0x"+(en[rn]+en[rn+1]));return nn},an=function a(en){for(var tn=new Uint8Array(en.length),nn=en.length;nn--;)tn[nn]=en.charCodeAt(nn);return(tn=zlibSync(tn)).reduce((function(en,tn){return en+String.fromCharCode(tn)}),"")};en.processDataByFilters=function(en,sn){var cn=0,un=en||"",dn=[];for("string"==typeof(sn=sn||[])&&(sn=[sn]),cn=0;cn<sn.length;cn+=1)switch(sn[cn]){case"ASCII85Decode":case"/ASCII85Decode":un=nn(un),dn.push("/ASCII85Encode");break;case"ASCII85Encode":case"/ASCII85Encode":un=tn(un),dn.push("/ASCII85Decode");break;case"ASCIIHexDecode":case"/ASCIIHexDecode":un=rn(un),dn.push("/ASCIIHexEncode");break;case"ASCIIHexEncode":case"/ASCIIHexEncode":un=un.split("").map((function(en){return("0"+en.charCodeAt().toString(16)).slice(-2)})).join("")+">",dn.push("/ASCIIHexDecode");break;case"FlateEncode":case"/FlateEncode":un=an(un),dn.push("/FlateDecode");break;default:throw new Error('The filter: "'+sn[cn]+'" is not implemented')}return{data:un,reverseChain:dn.reverse().join(" ")}}}(O$1.API),(
2020-09-04 20:34:30 +00:00
/**
* @license
* jsPDF fileloading PlugIn
* Copyright (c) 2018 Aras Abbasi (aras.abbasi@gmail.com)
*
* Licensed under the MIT License.
* http://opensource.org/licenses/mit-license
*/
2021-01-31 22:16:43 +00:00
WM=O$1.API).loadFile=function(en,tn,nn){return function(en,tn,nn){tn=!1!==tn,nn="function"==typeof nn?nn:function(){};var rn=void 0;try{rn=function(en,tn,nn){var rn=new XMLHttpRequest,an=0,sn=function a(en){var tn=en.length,nn=[],rn=String.fromCharCode;for(an=0;an<tn;an+=1)nn.push(rn(255&en.charCodeAt(an)));return nn.join("")};if(rn.open("GET",en,!tn),rn.overrideMimeType("text/plain; charset=x-user-defined"),!1===tn&&(rn.onload=function(){200===rn.status?nn(sn(this.responseText)):nn(void 0)}),rn.send(null),tn&&200===rn.status)return sn(rn.responseText)}(en,tn,nn)}catch(en){}return rn}(en,tn,nn)},WM.loadImageFile=WM.loadFile,
2020-09-04 20:34:30 +00:00
/**
* @license
* Copyright (c) 2018 Erik Koopmans
* Released under the MIT License.
*
* Licensed under the MIT License.
* http://opensource.org/licenses/mit-license
*/
2021-01-31 22:16:43 +00:00
function(en){function e(){return(zU.html2canvas?Promise.resolve(zU.html2canvas):Promise.resolve().then((function(){return gQ}))).catch((function(en){return Promise.reject(new Error("Could not load html2canvas: "+en))})).then((function(en){return en.default?en.default:en}))}function n(){return(zU.DOMPurify?Promise.resolve(zU.DOMPurify):Promise.resolve().then((function(){return TQ}))).catch((function(en){return Promise.reject(new Error("Could not load dompurify: "+en))})).then((function(en){return en.default?en.default:en}))}var tn=function i(en){var tn=_typeof(en);return"undefined"===tn?"undefined":"string"===tn||en instanceof String?"string":"number"===tn||en instanceof Number?"number":"function"===tn||en instanceof Function?"function":en&&en.constructor===Array?"array":en&&1===en.nodeType?"element":"object"===tn?"object":"unknown"},nn=function a(en,tn){var nn=document.createElement(en);for(var rn in tn.className&&(nn.className=tn.className),tn.innerHTML&&tn.dompurify&&(nn.innerHTML=tn.dompurify.sanitize(tn.innerHTML)),tn.style)nn.style[rn]=tn.style[rn];return nn},rn=function t(en){var tn=Object.assign(t.convert(Promise.resolve()),JSON.parse(JSON.stringify(t.template))),nn=t.convert(Promise.resolve(),tn);return(nn=nn.setProgress(1,t,1,[t])).set(en)};(rn.prototype=Object.create(Promise.prototype)).constructor=rn,rn.convert=function(en,tn){return en.__proto__=tn||rn.prototype,en},rn.template={prop:{src:null,container:null,overlay:null,canvas:null,img:null,pdf:null,pageSize:null,callback:function callback(){}},progress:{val:0,state:null,n:0,stack:[]},opt:{filename:"file.pdf",margin:[0,0,0,0],enableLinks:!0,x:0,y:0,html2canvas:{},jsPDF:{},backgroundColor:"transparent"}},rn.prototype.from=function(en,rn){return this.then((function(){switch(rn=rn||function(en){switch(tn(en)){case"string":return"string";case"element":return"canvas"===en.nodeName.toLowerCase()?"canvas":"element";default:return"unknown"}}(en)){case"string":return this.then(n).then((function(tn){return this.set({src:nn("div",{innerHTML:en,dompurify:tn})})}));case"element":return this.set({src:en});case"canvas":return this.set({canvas:en});case"img":return this.set({img:en});default:return this.error("Unknown source type.")}}))},rn.prototype.to=function(en){switch(en){case"container":return this.toContainer();case"canvas":return this.toCanvas();case"img":return this.toImg();case"pdf":return this.toPdf();default:return this.error("Invalid target.")}},rn.prototype.toContainer=function(){return this.thenList([function(){return this.prop.src||this.error("Cannot duplicate - no source HTML.")},function(){return this.prop.pageSize||this.setPageSize()}]).then((function(){var en={position:"relative",display:"inline-block",width:Math.max(this.prop.src.clientWidth,this.prop.src.scrollWidth,this.prop.src.offsetWidth)+"px",left:0,right:0,top:0,margin:"auto",backgroundColor:this.opt.backgroundColor},tn=function o(en,tn){for(var nn=3===en.nodeType?document.createTextNode(en.nodeValue):en.cloneNode(!1),rn=en.firstChild;rn;rn=rn.nextSibling)!0!==tn&&1===rn.nodeType&&"SCRIPT"===rn.nodeName||nn.appendChild(o(rn,tn));return 1===en.nodeType&&("CANVAS"===en.nodeName?(nn.width=en.width,nn.height=en.height,nn.getContext("2d").drawImage(en,0,0)):"TEXTAREA"!==en.nodeName&&"SELECT"!==en.nodeName||(nn.value=en.value),nn.addEventListener("load",(function(){nn.scrollTop=en.scrollTop,nn.scrollLeft=en.scrollLeft}),!0)),nn}(this.prop.src,this.opt.html2canvas.javascriptEnabled);"BODY"===tn.tagName&&(en.height=Math.max(document.body.scrollHeight,document.body.offsetHeight,document.documentElement.clientHeight,document.documentElement.scrollHeight,document.documentElement.offsetHeight)+"px"),this.prop.overlay=nn("div",{className:"html2pdf__overlay",style:{position:"fixed",overflow:"hidden",zIndex:1e3,left:"-100000px",right:0,bottom:0,top:0}}),this.prop.container=nn("div",{className:"html2pdf__container",style:en}),this.prop.container.appendChild(tn),this.prop.container.firstChild.appendChild(nn("div",{style:{clear:"both",border:"0 none transparent",margin:0,padding:0,height:0}})),this.prop.container
2020-09-04 20:34:30 +00:00
/**
* @license
* Copyright (c) 2014 Steven Spungin (TwelveTone LLC) steven@twelvetone.tv
*
* Licensed under the MIT License.
* http://opensource.org/licenses/mit-license
*/
2021-01-31 22:16:43 +00:00
function(en){var tn;en.events.push(["postPutResources",function(){var en=this,nn=/^(\d+) 0 obj$/;if(this.outline.root.children.length>0)for(var rn=en.outline.render().split(/\r\n/),an=0;an<rn.length;an++){var sn=rn[an],cn=nn.exec(sn);if(null!=cn){var un=cn[1];en.internal.newObjectDeferredBegin(un,!1)}en.internal.write(sn)}if(this.outline.createNamedDestinations){var dn=this.internal.pages.length,pn=[];for(an=0;an<dn;an++){var hn=en.internal.newObject();pn.push(hn);var gn=en.internal.getPageInfo(an+1);en.internal.write("<< /D["+gn.objId+" 0 R /XYZ null null null]>> endobj")}var An=en.internal.newObject();for(en.internal.write("<< /Names [ "),an=0;an<pn.length;an++)en.internal.write("(page_"+(an+1)+")"+pn[an]+" 0 R");en.internal.write(" ] >>","endobj"),tn=en.internal.newObject(),en.internal.write("<< /Dests "+An+" 0 R"),en.internal.write(">>","endobj")}}]),en.events.push(["putCatalog",function(){this.outline.root.children.length>0&&(this.internal.write("/Outlines",this.outline.makeRef(this.outline.root)),this.outline.createNamedDestinations&&this.internal.write("/Names "+tn+" 0 R"))}]),en.events.push(["initialized",function(){var en=this;en.outline={createNamedDestinations:!1,root:{children:[]}},en.outline.add=function(en,tn,nn){var rn={title:tn,options:nn,children:[]};return null==en&&(en=this.root),en.children.push(rn),rn},en.outline.render=function(){return this.ctx={},this.ctx.val="",this.ctx.pdf=en,this.genIds_r(this.root),this.renderRoot(this.root),this.renderItems(this.root),this.ctx.val},en.outline.genIds_r=function(tn){tn.id=en.internal.newObjectDeferred();for(var nn=0;nn<tn.children.length;nn++)this.genIds_r(tn.children[nn])},en.outline.renderRoot=function(en){this.objStart(en),this.line("/Type /Outlines"),en.children.length>0&&(this.line("/First "+this.makeRef(en.children[0])),this.line("/Last "+this.makeRef(en.children[en.children.length-1]))),this.line("/Count "+this.count_r({count:0},en)),this.objEnd()},en.outline.renderItems=function(tn){for(var nn=this.ctx.pdf.internal.getVerticalCoordinateString,rn=0;rn<tn.children.length;rn++){var an=tn.children[rn];this.objStart(an),this.line("/Title "+this.makeString(an.title)),this.line("/Parent "+this.makeRef(tn)),rn>0&&this.line("/Prev "+this.makeRef(tn.children[rn-1])),rn<tn.children.length-1&&this.line("/Next "+this.makeRef(tn.children[rn+1])),an.children.length>0&&(this.line("/First "+this.makeRef(an.children[0])),this.line("/Last "+this.makeRef(an.children[an.children.length-1])));var sn=this.count=this.count_r({count:0},an);if(sn>0&&this.line("/Count "+sn),an.options&&an.options.pageNumber){var cn=en.internal.getPageInfo(an.options.pageNumber);this.line("/Dest ["+cn.objId+" 0 R /XYZ 0 "+nn(0)+" 0]")}this.objEnd()}for(var un=0;un<tn.children.length;un++)this.renderItems(tn.children[un])},en.outline.line=function(en){this.ctx.val+=en+"\r\n"},en.outline.makeRef=function(en){return en.id+" 0 R"},en.outline.makeString=function(tn){return"("+en.internal.pdfEscape(tn)+")"},en.outline.objStart=function(en){this.ctx.val+="\r\n"+en.id+" 0 obj\r\n<<\r\n"},en.outline.objEnd=function(){this.ctx.val+=">> \r\nendobj\r\n"},en.outline.count_r=function(en,tn){for(var nn=0;nn<tn.children.length;nn++)en.count++,this.count_r(en,tn.children[nn]);return en.count}}])}(O$1.API),
2020-09-04 20:34:30 +00:00
/**
* @license
*
* Licensed under the MIT License.
* http://opensource.org/licenses/mit-license
*/
2021-01-31 22:16:43 +00:00
function(en){var tn=[192,193,194,195,196,197,198,199];en.processJPEG=function(en,nn,rn,an,sn,cn){var un,dn=this.decode.DCT_DECODE,pn=null;if("string"==typeof en||this.__addimage__.isArrayBuffer(en)||this.__addimage__.isArrayBufferView(en)){switch(en=sn||en,en=this.__addimage__.isArrayBuffer(en)?new Uint8Array(en):en,(un=function(en){for(var nn,rn=256*en.charCodeAt(4)+en.charCodeAt(5),an=en.length,sn={width:0,height:0,numcomponents:1},cn=4;cn<an;cn+=2){if(cn+=rn,-1!==tn.indexOf(en.charCodeAt(cn+1))){nn=256*en.charCodeAt(cn+5)+en.charCodeAt(cn+6),sn={width:256*en.charCodeAt(cn+7)+en.charCodeAt(cn+8),height:nn,numcomponents:en.charCodeAt(cn+9)};break}rn=256*en.charCodeAt(cn+2)+en.charCodeAt(cn+3)}return sn}(en=this.__addimage__.isArrayBufferView(en)?this.__addimage__.arrayBufferToBinaryString(en):en)).numcomponents){case 1:cn=this.color_spaces.DEVICE_GRAY;break;case 4:cn=this.color_spaces.DEVICE_CMYK;break;case 3:cn=this.color_spaces.DEVICE_RGB}pn={data:en,width:un.width,height:un.height,colorSpace:cn,bitsPerComponent:8,filter:dn,index:nn,alias:rn}}return pn}}(O$1.API);var YM,JM,ZM,eR,tR,nR=function(){var en,tn,nn;function a(en){var tn,nn,rn,an,sn,cn,un,dn,pn,hn,gn,An,mn,vn;for(this.data=en,this.pos=8,this.palette=[],this.imgData=[],this.transparency={},this.animation=null,this.text={},cn=null;;){switch(tn=this.readUInt32(),pn=function(){var en,tn;for(tn=[],en=0;en<4;++en)tn.push(String.fromCharCode(this.data[this.pos++]));return tn}.call(this).join("")){case"IHDR":this.width=this.readUInt32(),this.height=this.readUInt32(),this.bits=this.data[this.pos++],this.colorType=this.data[this.pos++],this.compressionMethod=this.data[this.pos++],this.filterMethod=this.data[this.pos++],this.interlaceMethod=this.data[this.pos++];break;case"acTL":this.animation={numFrames:this.readUInt32(),numPlays:this.readUInt32()||1/0,frames:[]};break;case"PLTE":this.palette=this.read(tn);break;case"fcTL":cn&&this.animation.frames.push(cn),this.pos+=4,cn={width:this.readUInt32(),height:this.readUInt32(),xOffset:this.readUInt32(),yOffset:this.readUInt32()},sn=this.readUInt16(),an=this.readUInt16()||100,cn.delay=1e3*sn/an,cn.disposeOp=this.data[this.pos++],cn.blendOp=this.data[this.pos++],cn.data=[];break;case"IDAT":case"fdAT":for("fdAT"===pn&&(this.pos+=4,tn-=4),en=(null!=cn?cn.data:void 0)||this.imgData,An=0;0<=tn?An<tn:An>tn;0<=tn?++An:--An)en.push(this.data[this.pos++]);break;case"tRNS":switch(this.transparency={},this.colorType){case 3:if(rn=this.palette.length/3,this.transparency.indexed=this.read(tn),this.transparency.indexed.length>rn)throw new Error("More transparent colors than palette size");if((hn=rn-this.transparency.indexed.length)>0)for(mn=0;0<=hn?mn<hn:mn>hn;0<=hn?++mn:--mn)this.transparency.indexed.push(255);break;case 0:this.transparency.grayscale=this.read(tn)[0];break;case 2:this.transparency.rgb=this.read(tn)}break;case"tEXt":un=(gn=this.read(tn)).indexOf(0),dn=String.fromCharCode.apply(String,gn.slice(0,un)),this.text[dn]=String.fromCharCode.apply(String,gn.slice(un+1));break;case"IEND":return cn&&this.animation.frames.push(cn),this.colors=function(){switch(this.colorType){case 0:case 3:case 4:return 1;case 2:case 6:return 3}}.call(this),this.hasAlphaChannel=4===(vn=this.colorType)||6===vn,nn=this.colors+(this.hasAlphaChannel?1:0),this.pixelBitlength=this.bits*nn,this.colorSpace=function(){switch(this.colors){case 1:return"DeviceGray";case 3:return"DeviceRGB"}}.call(this),void(this.imgData=new Uint8Array(this.imgData));default:this.pos+=tn}if(this.pos+=4,this.pos>this.data.length)throw new Error("Incomplete or corrupt PNG file")}}a.prototype.read=function(en){var tn,nn;for(nn=[],tn=0;0<=en?tn<en:tn>en;0<=en?++tn:--tn)nn.push(this.data[this.pos++]);return nn},a.prototype.readUInt32=function(){return this.data[this.pos++]<<24|this.data[this.pos++]<<16|this.data[this.pos++]<<8|this.data[this.pos++]},a.prototype.readUInt16=function(){return this.data[this.pos++]<<8|this.data[this.pos++]},a.prototype.decodePixels=function(en){var tn=this.pixelBitlength/8,nn=new Uint8Array(this.width*this.height*tn),rn=0,an=this;if(null==en&&(en=this.im
2020-09-04 20:34:30 +00:00
/**
* @license
*
2021-01-31 22:16:43 +00:00
* Copyright (c) 2014 James Robb, https://github.com/jamesbrobb
2020-09-04 20:34:30 +00:00
*
2021-01-31 22:16:43 +00:00
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
2020-09-04 20:34:30 +00:00
*
2021-01-31 22:16:43 +00:00
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
2020-09-04 20:34:30 +00:00
*
2021-01-31 22:16:43 +00:00
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* ====================================================================
2020-09-04 20:34:30 +00:00
*/
/**
* @license
* (c) Dean McNamee <dean@gmail.com>, 2013.
*
* https://github.com/deanm/omggif
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*
* omggif is a JavaScript implementation of a GIF 89a encoder and decoder,
* including animation and compression. It does not rely on any specific
* underlying system, so should run in the browser, Node, or Plask.
2021-01-31 22:16:43 +00:00
*/function Jt(en){var tn=0;if(71!==en[tn++]||73!==en[tn++]||70!==en[tn++]||56!==en[tn++]||56!=(en[tn++]+1&253)||97!==en[tn++])throw new Error("Invalid GIF 87a/89a header.");var nn=en[tn++]|en[tn++]<<8,rn=en[tn++]|en[tn++]<<8,an=en[tn++],sn=an>>7,cn=1<<1+(7&an);en[tn++],en[tn++];var un=null,dn=null;sn&&(un=tn,dn=cn,tn+=3*cn);var pn=!0,hn=[],gn=0,An=null,mn=0,vn=null;for(this.width=nn,this.height=rn;pn&&tn<en.length;)switch(en[tn++]){case 33:switch(en[tn++]){case 255:if(11!==en[tn]||78==en[tn+1]&&69==en[tn+2]&&84==en[tn+3]&&83==en[tn+4]&&67==en[tn+5]&&65==en[tn+6]&&80==en[tn+7]&&69==en[tn+8]&&50==en[tn+9]&&46==en[tn+10]&&48==en[tn+11]&&3==en[tn+12]&&1==en[tn+13]&&0==en[tn+16])tn+=14,vn=en[tn++]|en[tn++]<<8,tn++;else for(tn+=12;;){if(!((Nn=en[tn++])>=0))throw Error("Invalid block size");if(0===Nn)break;tn+=Nn}break;case 249:if(4!==en[tn++]||0!==en[tn+4])throw new Error("Invalid graphics extension block.");var yn=en[tn++];gn=en[tn++]|en[tn++]<<8,An=en[tn++],0==(1&yn)&&(An=null),mn=yn>>2&7,tn++;break;case 254:for(;;){if(!((Nn=en[tn++])>=0))throw Error("Invalid block size");if(0===Nn)break;tn+=Nn}break;default:throw new Error("Unknown graphic control label: 0x"+en[tn-1].toString(16))}break;case 44:var _n=en[tn++]|en[tn++]<<8,wn=en[tn++]|en[tn++]<<8,xn=en[tn++]|en[tn++]<<8,Sn=en[tn++]|en[tn++]<<8,Cn=en[tn++],kn=Cn>>6&1,Bn=1<<1+(7&Cn),En=un,Pn=dn,Ln=!1;Cn>>7&&(Ln=!0,En=tn,Pn=Bn,tn+=3*Bn);var Tn=tn;for(tn++;;){var Nn;if(!((Nn=en[tn++])>=0))throw Error("Invalid block size");if(0===Nn)break;tn+=Nn}hn.push({x:_n,y:wn,width:xn,height:Sn,has_local_palette:Ln,palette_offset:En,palette_size:Pn,data_offset:Tn,data_length:tn-Tn,transparent_index:An,interlaced:!!kn,delay:gn,disposal:mn});break;case 59:pn=!1;break;default:throw new Error("Unknown gif block: 0x"+en[tn-1].toString(16))}this.numFrames=function(){return hn.length},this.loopCount=function(){return vn},this.frameInfo=function(en){if(en<0||en>=hn.length)throw new Error("Frame index out of range.");return hn[en]},this.decodeAndBlitFrameBGRA=function(tn,rn){var an=this.frameInfo(tn),sn=an.width*an.height,cn=new Uint8Array(sn);Xt(en,an.data_offset,cn,sn);var un=an.palette_offset,dn=an.transparent_index;null===dn&&(dn=256);var pn=an.width,hn=nn-pn,gn=pn,An=4*(an.y*nn+an.x),mn=4*((an.y+an.height)*nn+an.x),vn=An,yn=4*hn;!0===an.interlaced&&(yn+=4*nn*7);for(var _n=8,wn=0,xn=cn.length;wn<xn;++wn){var Sn=cn[wn];if(0===gn&&(gn=pn,(vn+=yn)>=mn&&(yn=4*hn+4*nn*(_n-1),vn=An+(pn+hn)*(_n<<1),_n>>=1)),Sn===dn)vn+=4;else{var Cn=en[un+3*Sn],kn=en[un+3*Sn+1],Bn=en[un+3*Sn+2];rn[vn++]=Bn,rn[vn++]=kn,rn[vn++]=Cn,rn[vn++]=255}--gn}},this.decodeAndBlitFrameRGBA=function(tn,rn){var an=this.frameInfo(tn),sn=an.width*an.height,cn=new Uint8Array(sn);Xt(en,an.data_offset,cn,sn);var un=an.palette_offset,dn=an.transparent_index;null===dn&&(dn=256);var pn=an.width,hn=nn-pn,gn=pn,An=4*(an.y*nn+an.x),mn=4*((an.y+an.height)*nn+an.x),vn=An,yn=4*hn;!0===an.interlaced&&(yn+=4*nn*7);for(var _n=8,wn=0,xn=cn.length;wn<xn;++wn){var Sn=cn[wn];if(0===gn&&(gn=pn,(vn+=yn)>=mn&&(yn=4*hn+4*nn*(_n-1),vn=An+(pn+hn)*(_n<<1),_n>>=1)),Sn===dn)vn+=4;else{var Cn=en[un+3*Sn],kn=en[un+3*Sn+1],Bn=en[un+3*Sn+2];rn[vn++]=Cn,rn[vn++]=kn,rn[vn++]=Bn,rn[vn++]=255}--gn}}}function Xt(en,tn,nn,rn){for(var an=en[tn++],sn=1<<an,cn=sn+1,un=cn+1,dn=an+1,pn=(1<<dn)-1,hn=0,gn=0,An=0,mn=en[tn++],vn=new Int32Array(4096),yn=null;;){for(;hn<16&&0!==mn;)gn|=en[tn++]<<hn,hn+=8,1===mn?mn=en[tn++]:--mn;if(hn<dn)break;var _n=gn&pn;if(gn>>=dn,hn-=dn,_n!==sn){if(_n===cn)break;for(var wn=_n<un?_n:yn,xn=0,Sn=wn;Sn>sn;)Sn=vn[Sn]>>8,++xn;var Cn=Sn;if(An+xn+(wn!==_n?1:0)>rn)return void KU.log("Warning, gif stream longer than expected.");nn[An++]=Cn;var kn=An+=xn;for(wn!==_n&&(nn[An++]=Cn),Sn=wn;xn--;)Sn=vn[Sn],nn[--kn]=255&Sn,Sn>>=8;null!==yn&&un<4096&&(vn[un++]=yn<<8|Cn,un>=pn+1&&dn<12&&(++dn,pn=pn<<1|1)),yn=_n}else un=cn+1,pn=(1<<(dn=an+1))-1,yn=null}return An!==rn&&KU.log("Warning, gif stream shorter than expected."),nn
2020-09-04 20:34:30 +00:00
/**
* @license
Copyright (c) 2008, Adobe Systems Incorporated
All rights reserved.
2020-08-28 22:07:07 +00:00
2020-09-04 20:34:30 +00:00
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
2020-08-28 22:07:07 +00:00
2020-09-04 20:34:30 +00:00
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of Adobe Systems Incorporated nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
2020-08-28 22:07:07 +00:00
2020-09-04 20:34:30 +00:00
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2021-01-31 22:16:43 +00:00
*/}function Kt(en){var tn,nn,rn,an,sn,cn=Math.floor,un=new Array(64),dn=new Array(64),pn=new Array(64),hn=new Array(64),gn=new Array(65535),An=new Array(65535),mn=new Array(64),vn=new Array(64),yn=[],_n=0,wn=7,xn=new Array(64),Sn=new Array(64),Cn=new Array(64),kn=new Array(256),Bn=new Array(2048),En=[0,1,5,6,14,15,27,28,2,4,7,13,16,26,29,42,3,8,12,17,25,30,41,43,9,11,18,24,31,40,44,53,10,19,23,32,39,45,52,54,20,22,33,38,46,51,55,60,21,34,37,47,50,56,59,61,35,36,48,49,57,58,62,63],Pn=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],Ln=[0,1,2,3,4,5,6,7,8,9,10,11],Tn=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],Nn=[1,2,3,0,4,17,5,18,33,49,65,6,19,81,97,7,34,113,20,50,129,145,161,8,35,66,177,193,21,82,209,240,36,51,98,114,130,9,10,22,23,24,25,26,37,38,39,40,41,42,52,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,225,226,227,228,229,230,231,232,233,234,241,242,243,244,245,246,247,248,249,250],In=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],On=[0,1,2,3,4,5,6,7,8,9,10,11],Fn=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],Un=[0,1,2,3,17,4,5,33,49,6,18,65,81,7,97,113,19,34,50,129,8,20,66,145,161,177,193,9,35,51,82,240,21,98,114,209,10,22,36,52,225,37,241,23,24,25,26,38,39,40,41,42,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,130,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,226,227,228,229,230,231,232,233,234,242,243,244,245,246,247,248,249,250];function j(en,tn){for(var nn=0,rn=0,an=new Array,sn=1;sn<=16;sn++){for(var cn=1;cn<=en[sn];cn++)an[tn[rn]]=[],an[tn[rn]][0]=nn,an[tn[rn]][1]=sn,rn++,nn++;nn*=2}return an}function O(en){for(var tn=en[0],nn=en[1]-1;nn>=0;)tn&1<<nn&&(_n|=1<<wn),nn--,--wn<0&&(255==_n?(B(255),B(0)):B(_n),wn=7,_n=0)}function B(en){yn.push(en)}function M(en){B(en>>8&255),B(255&en)}function E(en,tn,nn,rn,an){for(var sn,cn=an[0],un=an[240],dn=function(en,tn){var nn,rn,an,sn,cn,un,dn,pn,hn,gn,An=0;for(hn=0;hn<8;++hn){nn=en[An],rn=en[An+1],an=en[An+2],sn=en[An+3],cn=en[An+4],un=en[An+5],dn=en[An+6];var vn=nn+(pn=en[An+7]),yn=nn-pn,_n=rn+dn,wn=rn-dn,xn=an+un,Sn=an-un,Cn=sn+cn,kn=sn-cn,Bn=vn+Cn,En=vn-Cn,Pn=_n+xn,Ln=_n-xn;en[An]=Bn+Pn,en[An+4]=Bn-Pn;var Tn=.707106781*(Ln+En);en[An+2]=En+Tn,en[An+6]=En-Tn;var Nn=.382683433*((Bn=kn+Sn)-(Ln=wn+yn)),In=.5411961*Bn+Nn,On=1.306562965*Ln+Nn,Fn=.707106781*(Pn=Sn+wn),Un=yn+Fn,Mn=yn-Fn;en[An+5]=Mn+In,en[An+3]=Mn-In,en[An+1]=Un+On,en[An+7]=Un-On,An+=8}for(An=0,hn=0;hn<8;++hn){nn=en[An],rn=en[An+8],an=en[An+16],sn=en[An+24],cn=en[An+32],un=en[An+40],dn=en[An+48];var Rn=nn+(pn=en[An+56]),Dn=nn-pn,jn=rn+dn,Qn=rn-dn,Hn=an+un,Gn=an-un,Vn=sn+cn,zn=sn-cn,Kn=Rn+Vn,qn=Rn-Vn,$n=jn+Hn,Wn=jn-Hn;en[An]=Kn+$n,en[An+32]=Kn-$n;var Xn=.707106781*(Wn+qn);en[An+16]=qn+Xn,en[An+48]=qn-Xn;var Yn=.382683433*((Kn=zn+Gn)-(Wn=Qn+Dn)),Jn=.5411961*Kn+Yn,Zn=1.306562965*Wn+Yn,Tr=.707106781*($n=Gn+Qn),Ur=Dn+Tr,Rr=Dn-Tr;en[An+40]=Rr+Jn,en[An+24]=Rr-Jn,en[An+8]=Ur+Zn,en[An+56]=Ur-Zn,An++}for(hn=0;hn<64;++hn)gn=en[hn]*tn[hn],mn[hn]=gn>0?gn+.5|0:gn-.5|0;return mn}(en,tn),pn=0;pn<64;++pn)vn[En[pn]]=dn[pn];var hn=vn[0]-nn;nn=vn[0],0==hn?O(rn[0]):(O(rn[An[sn=32767+hn]]),O(gn[sn]));for(var yn=63;yn>0&&0==vn[yn];)yn--;if(0==yn)return O(cn),nn;for(var _n,wn=1;wn<=yn;){for(var xn=wn;0==vn[wn]&&wn<=yn;)++wn;var Sn=wn-xn;if(Sn>=16){_n=Sn>>4;for(var Cn=1;Cn<=_n;++Cn)O(un);Sn&=15}sn=32767+vn[wn],O(an[(Sn<<4)+An[sn]]),O(gn[sn]),wn++}return 63!=yn&&O(cn),nn}function q(en){en=Math.min(Math.max(en,1),100),sn!=en&&(function(en){for(var tn=[16,11,10,16,24,40,51,61,12,12,14,19,26,58,60,55,14,13,16,24,40,57,69,56,14,17,22,29,51,87,80,62,18,22,37,56,68,109,103,77,24,35,55,64,81,104,113,92,49,64,78,87,103,121,120,101,72,92,95,98,112,100
2020-09-04 20:34:30 +00:00
/**
* @license
* Copyright (c) 2017 Aras Abbasi
*
* Licensed under the MIT License.
* http://opensource.org/licenses/mit-license
2021-01-31 22:16:43 +00:00
*/function Zt(en,tn){if(this.pos=0,this.buffer=en,this.datav=new DataView(en.buffer),this.is_with_alpha=!!tn,this.bottom_up=!0,this.flag=String.fromCharCode(this.buffer[0])+String.fromCharCode(this.buffer[1]),this.pos+=2,-1===["BM","BA","CI","CP","IC","PT"].indexOf(this.flag))throw new Error("Invalid BMP File");this.parseHeader(),this.parseBGR()}function $t(en){function e(en){if(!en)throw Error("assert :P")}function r(en,tn,nn){for(var rn=0;4>rn;rn++)if(en[tn+rn]!=nn.charCodeAt(rn))return!0;return!1}function n(en,tn,nn,rn,an){for(var sn=0;sn<an;sn++)en[tn+sn]=nn[rn+sn]}function i(en,tn,nn,rn){for(var an=0;an<rn;an++)en[tn+an]=nn}function a(en){return new Int32Array(en)}function o(en,tn){for(var nn=[],rn=0;rn<en;rn++)nn.push(new tn);return nn}function s(en,tn){var nn=[];return function t(en,nn,rn){for(var an=rn[nn],sn=0;sn<an&&(en.push(rn.length>nn+1?[]:new tn),!(rn.length<nn+1));sn++)t(en[sn],nn+1,rn)}(nn,0,en),nn}function u(en,tn){for(var nn="",rn=0;rn<4;rn++)nn+=String.fromCharCode(en[tn++]);return nn}function c(en,tn){return(en[tn+0]<<0|en[tn+1]<<8|en[tn+2]<<16)>>>0}function l(en,tn){return(en[tn+0]<<0|en[tn+1]<<8|en[tn+2]<<16|en[tn+3]<<24)>>>0}new($t=function $t(){var en=this;function u(en,tn){for(var nn=1<<tn-1>>>0;en&nn;)nn>>>=1;return nn?(en&nn-1)+nn:en}function c(en,tn,nn,rn,an){e(!(rn%nn));do{en[tn+(rn-=nn)]=an}while(0<rn)}function l(en,tn,nn,rn,an){if(e(2328>=an),512>=an)var sn=a(512);else if(null==(sn=a(an)))return 0;return function(en,tn,nn,rn,an,sn){var cn,un,dn=tn,pn=1<<nn,hn=a(16),gn=a(16);for(e(0!=an),e(null!=rn),e(null!=en),e(0<nn),un=0;un<an;++un){if(15<rn[un])return 0;++hn[rn[un]]}if(hn[0]==an)return 0;for(gn[1]=0,cn=1;15>cn;++cn){if(hn[cn]>1<<cn)return 0;gn[cn+1]=gn[cn]+hn[cn]}for(un=0;un<an;++un)cn=rn[un],0<rn[un]&&(sn[gn[cn]++]=un);if(1==gn[15])return(rn=new h).g=0,rn.value=sn[0],c(en,dn,1,pn,rn),pn;var An,mn=-1,vn=pn-1,yn=0,_n=1,wn=1,xn=1<<nn;for(un=0,cn=1,an=2;cn<=nn;++cn,an<<=1){if(_n+=wn<<=1,0>(wn-=hn[cn]))return 0;for(;0<hn[cn];--hn[cn])(rn=new h).g=cn,rn.value=sn[un++],c(en,dn+yn,an,xn,rn),yn=u(yn,cn)}for(cn=nn+1,an=2;15>=cn;++cn,an<<=1){if(_n+=wn<<=1,0>(wn-=hn[cn]))return 0;for(;0<hn[cn];--hn[cn]){if(rn=new h,(yn&vn)!=mn){for(dn+=xn,An=1<<(mn=cn)-nn;15>mn&&!(0>=(An-=hn[mn]));)++mn,An<<=1;pn+=xn=1<<(An=mn-nn),en[tn+(mn=yn&vn)].g=An+nn,en[tn+mn].value=dn-tn-mn}rn.g=cn-nn,rn.value=sn[un++],c(en,dn+(yn>>nn),an,xn,rn),yn=u(yn,cn)}}return _n!=2*gn[15]-1?0:pn}(en,tn,nn,rn,an,sn)}function h(){this.value=this.g=0}function f(){this.value=this.g=0}function d(){this.G=o(5,h),this.H=a(5),this.jc=this.Qb=this.qb=this.nd=0,this.pd=o(tn,f)}function p(en,tn,nn,rn){e(null!=en),e(null!=tn),e(2147483648>rn),en.Ca=254,en.I=0,en.b=-8,en.Ka=0,en.oa=tn,en.pa=nn,en.Jd=tn,en.Yc=nn+rn,en.Zc=4<=rn?nn+rn-4+1:nn,_(en)}function g(en,tn){for(var nn=0;0<tn--;)nn|=k(en,128)<<tn;return nn}function m(en,tn){var nn=g(en,tn);return P(en)?-nn:nn}function v(en,tn,nn,rn){var an,sn=0;for(e(null!=en),e(null!=tn),e(4294967288>rn),en.Sb=rn,en.Ra=0,en.u=0,en.h=0,4<rn&&(rn=4),an=0;an<rn;++an)sn+=tn[nn+an]<<8*an;en.Ra=sn,en.bb=rn,en.oa=tn,en.pa=nn}function b(en){for(;8<=en.u&&en.bb<en.Sb;)en.Ra>>>=8,en.Ra+=en.oa[en.pa+en.bb]<<an-8>>>0,++en.bb,en.u-=8;A(en)&&(en.h=1,en.u=0)}function y(en,tn){if(e(0<=tn),!en.h&&tn<=rn){var an=L(en)&nn[tn];return en.u+=tn,b(en),an}return en.h=1,en.u=0}function w(){this.b=this.Ca=this.I=0,this.oa=[],this.pa=0,this.Jd=[],this.Yc=0,this.Zc=[],this.Ka=0}function N(){this.Ra=0,this.oa=[],this.h=this.u=this.bb=this.Sb=this.pa=0}function L(en){return en.Ra>>>(en.u&an-1)>>>0}function A(en){return e(en.bb<=en.Sb),en.h||en.bb==en.Sb&&en.u>an}function x(en,tn){en.u=tn,en.h=A(en)}function S(en){en.u>=sn&&(e(en.u>=sn),b(en))}function _(en){e(null!=en&&null!=en.oa),en.pa<en.Zc?(en.I=(en.oa[en.pa++]|en.I<<8)>>>0,en.b+=8):(e(null!=en&&null!=en.oa),en.pa<en.Yc?(en.b+=8,en.I=en.oa[en.pa++]|en.I<<8):en.Ka?en.b=0:(en.I<<=8,en.b+=8,en.Ka=1))}function P(en){return g(en,1)}function k(en,tn){var nn=en.Ca;0>en.b&&_(en);var rn=en.b,an=nn*tn>>>8,sn=(en.I>>>rn>an)+0;for(sn?(nn-=an,en.I-=an+1<<rn>>>0):nn=an+1,rn=nn,an=0;256<=rn;)an+=8,
2020-09-04 20:34:30 +00:00
/** @license
* Copyright (c) 2017 Dominik Homberger
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
https://webpjs.appspot.com
WebPRiffParser dominikhlbg@gmail.com
*/
2021-01-31 22:16:43 +00:00
function(en,tn,nn,rn){for(var an=0;an<4;an++)if(en[tn+an]!="RIFF".charCodeAt(an))return!0;return!1}(en,tn)){var un,dn;for(l(en,tn+=4),tn+=8;tn<en.length;){var pn=u(en,tn),hn=l(en,tn+=4);tn+=4;var gn=hn+(1&hn);switch(pn){case"VP8 ":case"VP8L":void 0===nn.frames[rn]&&(nn.frames[rn]={}),(vn=nn.frames[rn]).src_off=an?cn:tn-8,vn.src_size=sn+hn+8,rn++,an&&(an=!1,sn=0,cn=0);break;case"VP8X":(vn=nn.header={}).feature_flags=en[tn];var An=tn+4;vn.canvas_width=1+c(en,An),An+=3,vn.canvas_height=1+c(en,An),An+=3;break;case"ALPH":an=!0,sn=gn+8,cn=tn-8;break;case"ANIM":(vn=nn.header).bgcolor=l(en,tn),An=tn+4,vn.loop_count=(un=en)[(dn=An)+0]<<0|un[dn+1]<<8,An+=2;break;case"ANMF":var mn,vn;(vn=nn.frames[rn]={}).offset_x=2*c(en,tn),tn+=3,vn.offset_y=2*c(en,tn),tn+=3,vn.width=1+c(en,tn),tn+=3,vn.height=1+c(en,tn),tn+=3,vn.duration=c(en,tn),tn+=3,mn=en[tn++],vn.dispose=1&mn,vn.blend=mn>>1&1}"ANMF"!=pn&&(tn+=gn)}return nn}}(sn,0);cn.response=sn,cn.rgbaoutput=!0,cn.dataurl=!1;var un=cn.header?cn.header:null,dn=cn.frames?cn.frames:null;if(un){un.loop_counter=un.loop_count,tn=[un.canvas_height],nn=[un.canvas_width];for(var pn=0;pn<dn.length&&0!=dn[pn].blend;pn++);}var hn=dn[0],gn=an.WebPDecodeRGBA(sn,hn.src_off,hn.src_size,nn,tn);hn.rgba=gn,hn.imgwidth=nn[0],hn.imgheight=tn[0];for(var An=0;An<nn[0]*tn[0]*4;An++)rn[An]=gn[An];return this.width=nn,this.height=tn,this.data=rn,this}!function(en){var tn=function n(tn,rn,dn,pn){var hn=4,gn=sn;switch(pn){case en.image_compression.FAST:hn=1,gn=an;break;case en.image_compression.MEDIUM:hn=6,gn=cn;break;case en.image_compression.SLOW:hn=9,gn=un}var An=zlibSync(tn=nn(tn,rn,dn,gn),{level:hn});return en.__addimage__.arrayBufferToBinaryString(An)},nn=function i(en,tn,nn,rn){for(var i,an,sn,cn=en.length/tn,un=new Uint8Array(en.length+cn),dn=pn(),gn=0;gn<cn;gn+=1){if(sn=gn*tn,i=en.subarray(sn,sn+tn),rn)un.set(rn(i,nn,an),sn+gn);else{for(var An,mn=dn.length,vn=[];An<mn;An+=1)vn[An]=dn[An](i,nn,an);var yn=hn(vn.concat());un.set(vn[yn],sn+gn)}an=i}return un},rn=function a(en){var tn=Array.apply([],en);return tn.unshift(0),tn},an=function o(en,tn){var nn,rn=[],an=en.length;rn[0]=1;for(var sn=0;sn<an;sn+=1)nn=en[sn-tn]||0,rn[sn+1]=en[sn]-nn+256&255;return rn},sn=function s(en,tn,nn){var rn,an=[],sn=en.length;an[0]=2;for(var cn=0;cn<sn;cn+=1)rn=nn&&nn[cn]||0,an[cn+1]=en[cn]-rn+256&255;return an},cn=function u(en,tn,nn){var rn,an,sn=[],cn=en.length;sn[0]=3;for(var un=0;un<cn;un+=1)rn=en[un-tn]||0,an=nn&&nn[un]||0,sn[un+1]=en[un]+256-(rn+an>>>1)&255;return sn},un=function c(en,tn,nn){var rn,an,sn,cn,un=[],pn=en.length;un[0]=4;for(var c=0;c<pn;c+=1)rn=en[c-tn]||0,an=nn&&nn[c]||0,sn=nn&&nn[c-tn]||0,cn=dn(rn,an,sn),un[c+1]=en[c]-cn+256&255;return un},dn=function l(en,tn,nn){if(en===tn&&tn===nn)return en;var rn=Math.abs(tn-nn),an=Math.abs(en-nn),sn=Math.abs(en+tn-nn-nn);return rn<=an&&rn<=sn?en:an<=sn?tn:nn},pn=function h(){return[rn,an,sn,cn,un]},hn=function f(en){var tn=en.map((function(en){return en.reduce((function(en,tn){return en+Math.abs(tn)}),0)}));return tn.indexOf(Math.min.apply(null,tn))};en.processPNG=function(nn,rn,an,sn){var cn,un,dn,pn,hn,gn,An,mn,vn,yn,_n,wn,xn,Sn,Cn,kn=this.decode.FLATE_DECODE,Bn="";if(this.__addimage__.isArrayBuffer(nn)&&(nn=new Uint8Array(nn)),this.__addimage__.isArrayBufferView(nn)){if(nn=(dn=new nR(nn)).imgData,un=dn.bits,cn=dn.colorSpace,hn=dn.colors,-1!==[4,6].indexOf(dn.colorType)){if(8===dn.bits){vn=(mn=32==dn.pixelBitlength?new Uint32Array(dn.decodePixels().buffer):16==dn.pixelBitlength?new Uint16Array(dn.decodePixels().buffer):new Uint8Array(dn.decodePixels().buffer)).length,_n=new Uint8Array(vn*dn.colors),yn=new Uint8Array(vn);var En,Pn=dn.pixelBitlength-dn.bits;for(Sn=0,Cn=0;Sn<vn;Sn++){for(xn=mn[Sn],En=0;En<Pn;)_n[Cn++]=xn>>>En&255,En+=dn.bits;yn[Sn]=xn>>>En&255}}if(16===dn.bits){vn=(mn=new Uint32Array(dn.decodePixels().buffer)).length,_n=new Uint8Array(vn*(32/dn.pixelBitlength)*dn.colors),yn=new Uint8Array(vn*(32/dn.pixelBitlength)),wn=dn.colors>1,Sn=0,Cn=0;for(var Ln=0;Sn<vn;)xn=mn[Sn++],_n[Cn++]=xn>>>0&255,wn&&(_n[Cn++]=xn>>>16&255,xn=mn[Sn++],_n[Cn++]=xn>>>0&255),yn[Ln++
2020-09-04 20:34:30 +00:00
/**
* @license
* Copyright (c) 2018 Aras Abbasi
*
* Licensed under the MIT License.
* http://opensource.org/licenses/mit-license
2020-08-28 22:07:07 +00:00
*/
2021-01-31 22:16:43 +00:00
function(en){en.processBMP=function(tn,nn,rn,an){var sn=new Zt(tn,!1),cn=sn.width,un=sn.height,dn={data:sn.getData(),width:cn,height:un},pn=new Kt(100).encode(dn,100);return en.processJPEG.call(this,pn,nn,rn,an)}}(O$1.API),$t.prototype.getData=function(){return this.data},
2020-09-04 20:34:30 +00:00
/**
* @license
* Copyright (c) 2019 Aras Abbasi
*
* Licensed under the MIT License.
* http://opensource.org/licenses/mit-license
*/
2021-01-31 22:16:43 +00:00
function(en){en.processWEBP=function(tn,nn,rn,an){var sn=new $t(tn,!1),cn=sn.width,un=sn.height,dn={data:sn.getData(),width:cn,height:un},pn=new Kt(100).encode(dn,100);return en.processJPEG.call(this,pn,nn,rn,an)}}(O$1.API),O$1.API.setLanguage=function(en){return void 0===this.internal.languageSettings&&(this.internal.languageSettings={},this.internal.languageSettings.isSubscribed=!1),void 0!=={af:"Afrikaans",sq:"Albanian",ar:"Arabic (Standard)","ar-DZ":"Arabic (Algeria)","ar-BH":"Arabic (Bahrain)","ar-EG":"Arabic (Egypt)","ar-IQ":"Arabic (Iraq)","ar-JO":"Arabic (Jordan)","ar-KW":"Arabic (Kuwait)","ar-LB":"Arabic (Lebanon)","ar-LY":"Arabic (Libya)","ar-MA":"Arabic (Morocco)","ar-OM":"Arabic (Oman)","ar-QA":"Arabic (Qatar)","ar-SA":"Arabic (Saudi Arabia)","ar-SY":"Arabic (Syria)","ar-TN":"Arabic (Tunisia)","ar-AE":"Arabic (U.A.E.)","ar-YE":"Arabic (Yemen)",an:"Aragonese",hy:"Armenian",as:"Assamese",ast:"Asturian",az:"Azerbaijani",eu:"Basque",be:"Belarusian",bn:"Bengali",bs:"Bosnian",br:"Breton",bg:"Bulgarian",my:"Burmese",ca:"Catalan",ch:"Chamorro",ce:"Chechen",zh:"Chinese","zh-HK":"Chinese (Hong Kong)","zh-CN":"Chinese (PRC)","zh-SG":"Chinese (Singapore)","zh-TW":"Chinese (Taiwan)",cv:"Chuvash",co:"Corsican",cr:"Cree",hr:"Croatian",cs:"Czech",da:"Danish",nl:"Dutch (Standard)","nl-BE":"Dutch (Belgian)",en:"English","en-AU":"English (Australia)","en-BZ":"English (Belize)","en-CA":"English (Canada)","en-IE":"English (Ireland)","en-JM":"English (Jamaica)","en-NZ":"English (New Zealand)","en-PH":"English (Philippines)","en-ZA":"English (South Africa)","en-TT":"English (Trinidad & Tobago)","en-GB":"English (United Kingdom)","en-US":"English (United States)","en-ZW":"English (Zimbabwe)",eo:"Esperanto",et:"Estonian",fo:"Faeroese",fj:"Fijian",fi:"Finnish",fr:"French (Standard)","fr-BE":"French (Belgium)","fr-CA":"French (Canada)","fr-FR":"French (France)","fr-LU":"French (Luxembourg)","fr-MC":"French (Monaco)","fr-CH":"French (Switzerland)",fy:"Frisian",fur:"Friulian",gd:"Gaelic (Scots)","gd-IE":"Gaelic (Irish)",gl:"Galacian",ka:"Georgian",de:"German (Standard)","de-AT":"German (Austria)","de-DE":"German (Germany)","de-LI":"German (Liechtenstein)","de-LU":"German (Luxembourg)","de-CH":"German (Switzerland)",el:"Greek",gu:"Gujurati",ht:"Haitian",he:"Hebrew",hi:"Hindi",hu:"Hungarian",is:"Icelandic",id:"Indonesian",iu:"Inuktitut",ga:"Irish",it:"Italian (Standard)","it-CH":"Italian (Switzerland)",ja:"Japanese",kn:"Kannada",ks:"Kashmiri",kk:"Kazakh",km:"Khmer",ky:"Kirghiz",tlh:"Klingon",ko:"Korean","ko-KP":"Korean (North Korea)","ko-KR":"Korean (South Korea)",la:"Latin",lv:"Latvian",lt:"Lithuanian",lb:"Luxembourgish",mk:"FYRO Macedonian",ms:"Malay",ml:"Malayalam",mt:"Maltese",mi:"Maori",mr:"Marathi",mo:"Moldavian",nv:"Navajo",ng:"Ndonga",ne:"Nepali",no:"Norwegian",nb:"Norwegian (Bokmal)",nn:"Norwegian (Nynorsk)",oc:"Occitan",or:"Oriya",om:"Oromo",fa:"Persian","fa-IR":"Persian/Iran",pl:"Polish",pt:"Portuguese","pt-BR":"Portuguese (Brazil)",pa:"Punjabi","pa-IN":"Punjabi (India)","pa-PK":"Punjabi (Pakistan)",qu:"Quechua",rm:"Rhaeto-Romanic",ro:"Romanian","ro-MO":"Romanian (Moldavia)",ru:"Russian","ru-MO":"Russian (Moldavia)",sz:"Sami (Lappish)",sg:"Sango",sa:"Sanskrit",sc:"Sardinian",sd:"Sindhi",si:"Singhalese",sr:"Serbian",sk:"Slovak",sl:"Slovenian",so:"Somani",sb:"Sorbian",es:"Spanish","es-AR":"Spanish (Argentina)","es-BO":"Spanish (Bolivia)","es-CL":"Spanish (Chile)","es-CO":"Spanish (Colombia)","es-CR":"Spanish (Costa Rica)","es-DO":"Spanish (Dominican Republic)","es-EC":"Spanish (Ecuador)","es-SV":"Spanish (El Salvador)","es-GT":"Spanish (Guatemala)","es-HN":"Spanish (Honduras)","es-MX":"Spanish (Mexico)","es-NI":"Spanish (Nicaragua)","es-PA":"Spanish (Panama)","es-PY":"Spanish (Paraguay)","es-PE":"Spanish (Peru)","es-PR":"Spanish (Puerto Rico)","es-ES":"Spanish (Spain)","es-UY":"Spanish (Uruguay)","es-VE":"Spanish (Venezuela)",sx:"Sutu",sw:"Swahili",sv:"Swedish","sv-FI":"Swedish (Finland)","sv-SV":"Swedish (Sweden)",ta:"Tamil",tt:"Tatar",te:"Teluga",th:"Thai",tig:"Tigre",ts:"Tsonga",tn:"Tswana",tr:"Turkish",tk:"Turkmen",uk:"Ukrain
2020-09-04 20:34:30 +00:00
/** @license
* MIT license.
* Copyright (c) 2012 Willow Systems Corporation, willow-systems.com
* 2014 Diego Casorran, https://github.com/diegocr
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* ====================================================================
*/
2021-01-31 22:16:43 +00:00
YM=O$1.API,JM=YM.getCharWidthsArray=function(en,tn){var nn,rn,an=(tn=tn||{}).font||this.internal.getFont(),sn=tn.fontSize||this.internal.getFontSize(),cn=tn.charSpace||this.internal.getCharSpace(),un=tn.widths?tn.widths:an.metadata.Unicode.widths,dn=un.fof?un.fof:1,pn=tn.kerning?tn.kerning:an.metadata.Unicode.kerning,hn=pn.fof?pn.fof:1,gn=!1!==tn.doKerning,An=0,mn=en.length,vn=0,yn=un[0]||dn,_n=[];for(nn=0;nn<mn;nn++)rn=en.charCodeAt(nn),"function"==typeof an.metadata.widthOfString?_n.push((an.metadata.widthOfGlyph(an.metadata.characterToGlyph(rn))+cn*(1e3/sn)||0)/1e3):(An=gn&&"object"==_typeof(pn[rn])&&!isNaN(parseInt(pn[rn][vn],10))?pn[rn][vn]/hn:0,_n.push((un[rn]||yn)/dn+An)),vn=rn;return _n},ZM=YM.getStringUnitWidth=function(en,tn){var nn=(tn=tn||{}).fontSize||this.internal.getFontSize(),rn=tn.font||this.internal.getFont(),an=tn.charSpace||this.internal.getCharSpace();return YM.processArabic&&(en=YM.processArabic(en)),"function"==typeof rn.metadata.widthOfString?rn.metadata.widthOfString(en,nn,an)/nn:JM.apply(this,arguments).reduce((function(en,tn){return en+tn}),0)},eR=function Wt(en,tn,nn,rn){for(var an=[],sn=0,cn=en.length,un=0;sn!==cn&&un+tn[sn]<nn;)un+=tn[sn],sn++;an.push(en.slice(0,sn));var dn=sn;for(un=0;sn!==cn;)un+tn[sn]>rn&&(an.push(en.slice(dn,sn)),un=0,dn=sn),un+=tn[sn],sn++;return dn!==sn&&an.push(en.slice(dn,sn)),an},tR=function Gt(en,tn,nn){nn||(nn={});var rn,an,sn,cn,un,dn,pn,hn=[],gn=[hn],An=nn.textIndent||0,mn=0,vn=0,yn=en.split(" "),_n=JM.apply(this,[" ",nn])[0];if(dn=-1===nn.lineIndent?yn[0].length+2:nn.lineIndent||0){var wn=Array(dn).join(" "),xn=[];yn.map((function(en){(en=en.split(/\s*\n/)).length>1?xn=xn.concat(en.map((function(en,tn){return(tn&&en.length?"\n":"")+en}))):xn.push(en[0])})),yn=xn,dn=ZM.apply(this,[wn,nn])}for(sn=0,cn=yn.length;sn<cn;sn++){var Sn=0;if(rn=yn[sn],dn&&"\n"==rn[0]&&(rn=rn.substr(1),Sn=1),An+mn+(vn=(an=JM.apply(this,[rn,nn])).reduce((function(en,tn){return en+tn}),0))>tn||Sn){if(vn>tn){for(un=eR.apply(this,[rn,an,tn-(An+mn),tn]),hn.push(un.shift()),hn=[un.pop()];un.length;)gn.push([un.shift()]);vn=an.slice(rn.length-(hn[0]?hn[0].length:0)).reduce((function(en,tn){return en+tn}),0)}else hn=[rn];gn.push(hn),An=vn+dn,mn=_n}else hn.push(rn),An+=mn+vn,mn=_n}return pn=dn?function(en,tn){return(tn?wn:"")+en.join(" ")}:function(en){return en.join(" ")},gn.map(pn)},YM.splitTextToSize=function(en,tn,nn){var rn,an=(nn=nn||{}).fontSize||this.internal.getFontSize(),sn=function(en){if(en.widths&&en.kerning)return{widths:en.widths,kerning:en.kerning};var tn=this.internal.getFont(en.fontName,en.fontStyle);return tn.metadata.Unicode?{widths:tn.metadata.Unicode.widths||{0:1},kerning:tn.metadata.Unicode.kerning||{}}:{font:tn.metadata,fontSize:this.internal.getFontSize(),charSpace:this.internal.getCharSpace()}}.call(this,nn);rn=Array.isArray(en)?en:String(en).split(/\r?\n/);var cn=1*this.internal.scaleFactor*tn/an;sn.textIndent=nn.textIndent?1*nn.textIndent*this.internal.scaleFactor/an:0,sn.lineIndent=nn.lineIndent;var un,dn,pn=[];for(un=0,dn=rn.length;un<dn;un++)pn=pn.concat(tR.apply(this,[rn[un],cn,sn]));return pn},
2020-09-04 20:34:30 +00:00
/** @license
jsPDF standard_fonts_metrics plugin
* Copyright (c) 2012 Willow Systems Corporation, willow-systems.com
* MIT license.
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* ====================================================================
*/
2021-01-31 22:16:43 +00:00
function(en){en.__fontmetrics__=en.__fontmetrics__||{};for(var tn="klmnopqrstuvwxyz",nn={},rn={},an=0;an<tn.length;an++)nn[tn[an]]="0123456789abcdef"[an],rn["0123456789abcdef"[an]]=tn[an];var sn=function a(en){return"0x"+parseInt(en,10).toString(16)},cn=en.__fontmetrics__.compress=function(en){var tn,nn,an,un,dn=["{"];for(var pn in en){if(tn=en[pn],isNaN(parseInt(pn,10))?nn="'"+pn+"'":(pn=parseInt(pn,10),nn=(nn=sn(pn).slice(2)).slice(0,-1)+rn[nn.slice(-1)]),"number"==typeof tn)tn<0?(an=sn(tn).slice(3),un="-"):(an=sn(tn).slice(2),un=""),an=un+an.slice(0,-1)+rn[an.slice(-1)];else{if("object"!=_typeof(tn))throw new Error("Don't know what to do with value type "+_typeof(tn)+".");an=cn(tn)}dn.push(nn+an)}return dn.push("}"),dn.join("")},un=en.__fontmetrics__.uncompress=function(en){if("string"!=typeof en)throw new Error("Invalid argument passed to uncompress.");for(var tn,rn,an,sn,cn={},un=1,dn=cn,pn=[],hn="",gn="",An=en.length-1,mn=1;mn<An;mn+=1)"'"==(sn=en[mn])?tn?(an=tn.join(""),tn=void 0):tn=[]:tn?tn.push(sn):"{"==sn?(pn.push([dn,an]),dn={},an=void 0):"}"==sn?((rn=pn.pop())[0][rn[1]]=dn,an=void 0,dn=rn[0]):"-"==sn?un=-1:void 0===an?nn.hasOwnProperty(sn)?(hn+=nn[sn],an=parseInt(hn,16)*un,un=1,hn=""):hn+=sn:nn.hasOwnProperty(sn)?(gn+=nn[sn],dn[an]=parseInt(gn,16)*un,un=1,an=void 0,gn=""):gn+=sn;return cn},dn={codePages:["WinAnsiEncoding"],WinAnsiEncoding:un("{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}")},pn={Unicode:{Courier:dn,"Courier-Bold":dn,"Courier-BoldOblique":dn,"Courier-Oblique":dn,Helvetica:dn,"Helvetica-Bold":dn,"Helvetica-BoldOblique":dn,"Helvetica-Oblique":dn,"Times-Roman":dn,"Times-Bold":dn,"Times-BoldItalic":dn,"Times-Italic":dn}},hn={Unicode:{"Courier-Oblique":un("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-BoldItalic":un("{'widths'{k3o2q4ycx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2r202m2n2n3m2o3m2p5n202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5n4l4m4m4m4n4m4o4s4p4m4q4m4r4s4s4y4t2r4u3m4v4m4w3x4x5t4y4s4z4s5k3x5l4s5m4m5n3r5o3x5p4s5q4m5r5t5s4m5t3x5u3x5v2l5w1w5x2l5y3t5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q2l6r3m6s3r6t1w6u1w6v3m6w1w6x4y6y3r6z3m7k3m7l3m7m2r7n2r7o1w7p3r7q2w7r4m7s3m7t2w7u2r7v2n7w1q7x2n7y3t202l3mcl4mal2ram3man3mao3map3mar3mas2lat4uau1uav3maw3way4uaz2lbk2sbl3t'fof'6obo2lbp3tbq3mbr1tbs2lbu1ybv3mbz3mck4m202k3mcm4mcn4mco4mcp4mcq5ycr4mcs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz2w203k6o212m6o2dw2l2cq2l3t3m3u2l17s3x19m3m}'kerning'{cl{4qu5kt5qt5rs17ss5ts}201s{201ss}201t{cks4lscmscnscoscpscls2wu2yu201ts}201x{2wu2yu}2k{201ts}2w{4qx5kx5ou5qx5rs17su5tu}2x{17su5tu5ou}2y{4qx5kx5ou5qx5rs17ss5ts}'fof'-6ofn{17sw5tw5ou5qw5rs}7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qs}3v{17su5tu5os5qs}7p{17su5tu}ck{4qu5kt5qt5rs17ss5ts}4l{4qu5kt5qt5rs17ss5ts}cm{4qu5kt5qt5rs17ss5ts}cn{4qu5kt5qt5rs17ss5ts}co{4qu5kt5qt5rs17ss5ts}cp{4qu5kt5qt5rs17ss5ts}6l{4qu5ou5qw5rt17su5tu}5q{ckuclucmucnucoucpu4lu}5r{ckuclucmucnucoucpu4lu}7q{cksclscmscnscoscps4ls}6p{4qu5ou5qw5rt17sw5tw}ek{4qu5ou5qw5rt17su5tu}el{4qu5ou5qw5rt17su5tu}em{4qu5ou5qw5rt17su5tu}en{4qu5ou5qw5rt17su5tu}eo{4qu5ou5qw5rt17su5tu}ep{4qu5ou5qw5rt17su5tu}es{17ss5ts5qs4qu}et{4qu5ou5qw5rt17sw5tw}eu{4qu5ou5qw5rt17ss5ts}ev{17ss5ts5qs4qu}6z{17sw5tw5ou5qw5rs}fm{17sw5tw5ou5qw5rs}7n{201ts}fo{17sw5tw5ou5qw5rs}fp{17sw5tw5ou5qw5rs}fq{17sw5tw5ou5qw5rs}7r{cksclscmscnscoscps4ls}fs{17sw5tw5ou5qw5rs}ft{17su5tu}fu{17su5tu}fv{17su5tu}fw{17su5tu}fz{cksclscmscnscoscps4ls}}}"),"Helvetica-Bold":un("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r
2020-09-04 20:34:30 +00:00
/**
* @license
* Licensed under the MIT License.
* http://opensource.org/licenses/mit-license
*/
2021-01-31 22:16:43 +00:00
function(en){var tn=function e(en){for(var e=en.length,tn=new Uint8Array(e),nn=0;nn<e;nn++)tn[nn]=en.charCodeAt(nn);return tn};en.API.events.push(["addFont",function(nn){var rn=void 0,an=nn.font,sn=nn.instance;if(!an.isStandardFont){if(void 0===sn)throw new Error("Font does not exist in vFS, import fonts or remove declaration doc.addFont('"+an.postScriptName+"').");if("string"!=typeof(rn=!1===sn.existsFileInVFS(an.postScriptName)?sn.loadFile(an.postScriptName):sn.getFileFromVFS(an.postScriptName)))throw new Error("Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('"+an.postScriptName+"').");!function(nn,rn){rn=/^\x00\x01\x00\x00/.test(rn)?tn(rn):tn(qU(rn)),nn.metadata=en.API.TTFFont.open(rn),nn.metadata.Unicode=nn.metadata.Unicode||{encoding:{},kerning:{},widths:[]},nn.metadata.glyIdsUsed=[0]}(an,rn)}}])}(O$1),
2020-09-04 20:34:30 +00:00
/** @license
* Copyright (c) 2012 Willow Systems Corporation, willow-systems.com
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* ====================================================================
*/
2021-01-31 22:16:43 +00:00
function(en){function e(){return(zU.canvg?Promise.resolve(zU.canvg):Promise.resolve().then((function(){return WE}))).catch((function(en){return Promise.reject(new Error("Could not load canvg: "+en))})).then((function(en){return en.default?en.default:en}))}O$1.API.addSvgAsImage=function(en,tn,nn,rn,an,sn,cn,un){if(isNaN(tn)||isNaN(nn))throw KU.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(rn)||isNaN(an))throw KU.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var dn=document.createElement("canvas");dn.width=rn,dn.height=an;var pn=dn.getContext("2d");pn.fillStyle="#fff",pn.fillRect(0,0,dn.width,dn.height);var hn={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},gn=this;return e().then((function(tn){return tn.fromString(pn,en,hn)}),(function(){return Promise.reject(new Error("Could not load canvg."))})).then((function(en){return en.render(hn)})).then((function(){gn.addImage(dn.toDataURL("image/jpeg",1),tn,nn,rn,an,cn,un)}))}}(),O$1.API.putTotalPages=function(en){var tn,nn=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(tn=new RegExp(en,"g"),nn=this.internal.getNumberOfPages()):(tn=new RegExp(this.pdfEscape16(en,this.internal.getFont()),"g"),nn=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var rn=1;rn<=this.internal.getNumberOfPages();rn++)for(var an=0;an<this.internal.pages[rn].length;an++)this.internal.pages[rn][an]=this.internal.pages[rn][an].replace(tn,nn);return this},O$1.API.viewerPreferences=function(en,tn){var nn;en=en||{},tn=tn||!1;var rn,an,sn,cn={HideToolbar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideMenubar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideWindowUI:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},FitWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},CenterWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},DisplayDocTitle:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.4},NonFullScreenPageMode:{defaultValue:"UseNone",value:"UseNone",type:"name",explicitSet:!1,valueSet:["UseNone","UseOutlines","UseThumbs","UseOC"],pdfVersion:1.3},Direction:{defaultValue:"L2R",value:"L2R",type:"name",explicitSet:!1,valueSet:["L2R","R2L"],pdfVersion:1.3},ViewArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},ViewClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintScaling:{defaultValue:"AppDefault",value:"AppDefault",type:"name",explicitSet:!1,valueSet:["AppDefault","None"],pdfVersion:1.6},Duplex:{defaultValue:"",value:"none",type:"name",explicitSet:!1,valueSet:["Simplex","DuplexFlipShortEdge","DuplexFlipLongEdge","none"],pdfVersion:1.7},PickTrayByPDFSize:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.7},PrintPageRange:{defaultValue:"",value:"",type:"array",explicitSet:!1,valueSet:null,pdfVersion:1.7},NumCopies:{defaultValue:1,value:1,type:"integer",explicitSet:!1,valueSet:null,pdfVersion:1.7}},un=Object.keys(cn),dn=[],pn=0,hn=0,gn=0;function f(en,tn){var nn,rn=!1;for(nn=0;nn<en.length;nn+=1)en[nn]===tn&&(rn=!0);return rn}if(void 0===this.internal.viewerpreferences&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(cn)),this.interna
2020-09-04 20:34:30 +00:00
/** ====================================================================
* @license
* jsPDF XMP metadata plugin
* Copyright (c) 2016 Jussi Utunen, u-jussi@suomi24.fi
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* ====================================================================
*/
2021-01-31 22:16:43 +00:00
function(en){var tn=function e(){var en='<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><rdf:Description rdf:about="" xmlns:jspdf="'+this.internal.__metadata__.namespaceuri+'"><jspdf:metadata>',e=unescape(encodeURIComponent('<x:xmpmeta xmlns:x="adobe:ns:meta/">')),tn=unescape(encodeURIComponent(en)),nn=unescape(encodeURIComponent(this.internal.__metadata__.metadata)),rn=unescape(encodeURIComponent("</jspdf:metadata></rdf:Description></rdf:RDF>")),an=unescape(encodeURIComponent("</x:xmpmeta>")),sn=tn.length+nn.length+rn.length+e.length+an.length;this.internal.__metadata__.metadata_object_number=this.internal.newObject(),this.internal.write("<< /Type /Metadata /Subtype /XML /Length "+sn+" >>"),this.internal.write("stream"),this.internal.write(e+tn+nn+rn+an),this.internal.write("endstream"),this.internal.write("endobj")},nn=function r(){this.internal.__metadata__.metadata_object_number&&this.internal.write("/Metadata "+this.internal.__metadata__.metadata_object_number+" 0 R")};en.addMetadata=function(en,rn){return void 0===this.internal.__metadata__&&(this.internal.__metadata__={metadata:en,namespaceuri:rn||"http://jspdf.default.namespaceuri/"},this.internal.events.subscribe("putCatalog",nn),this.internal.events.subscribe("postPutResources",tn)),this}}(O$1.API),function(en){var tn=en.API,nn=tn.pdfEscape16=function(en,tn){for(var nn,rn=tn.metadata.Unicode.widths,an=["","0","00","000","0000"],sn=[""],cn=0,un=en.length;cn<un;++cn){if(nn=tn.metadata.characterToGlyph(en.charCodeAt(cn)),tn.metadata.glyIdsUsed.push(nn),tn.metadata.toUnicode[nn]=en.charCodeAt(cn),-1==rn.indexOf(nn)&&(rn.push(nn),rn.push([parseInt(tn.metadata.widthOfGlyph(nn),10)])),"0"==nn)return sn.join("");nn=nn.toString(16),sn.push(an[4-nn.length],nn)}return sn.join("")},rn=function n(en){var tn,nn,n,rn,an,sn,cn;for(an="/CIDInit /ProcSet findresource begin\n12 dict begin\nbegincmap\n/CIDSystemInfo <<\n /Registry (Adobe)\n /Ordering (UCS)\n /Supplement 0\n>> def\n/CMapName /Adobe-Identity-UCS def\n/CMapType 2 def\n1 begincodespacerange\n<0000><ffff>\nendcodespacerange",n=[],sn=0,cn=(nn=Object.keys(en).sort((function(en,tn){return en-tn}))).length;sn<cn;sn++)tn=nn[sn],n.length>=100&&(an+="\n"+n.length+" beginbfchar\n"+n.join("\n")+"\nendbfchar",n=[]),void 0!==en[tn]&&null!==en[tn]&&"function"==typeof en[tn].toString&&(rn=("0000"+en[tn].toString(16)).slice(-4),tn=("0000"+(+tn).toString(16)).slice(-4),n.push("<"+tn+"><"+rn+">"));return n.length&&(an+="\n"+n.length+" beginbfchar\n"+n.join("\n")+"\nendbfchar\n"),an+"endcmap\nCMapName currentdict /CMap defineresource pop\nend\nend"};tn.events.push(["putFont",function(tn){!function(tn){var nn=tn.font,an=tn.out,sn=tn.newObject,cn=tn.putStream,un=tn.pdfEscapeWithNeededParanthesis;if(nn.metadata instanceof en.API.TTFFont&&"Identity-H"===nn.encoding){for(var dn=nn.metadata.Unicode.widths,pn=nn.metadata.subset.encode(nn.metadata.glyIdsUsed,1),hn="",gn=0;gn<pn.length;gn++)hn+=String.fromCharCode(pn[gn]);var An=sn();cn({data:hn,addLength1:!0,objectId:An}),an("endobj");var mn=sn();cn({data:rn(nn.metadata.toUnicode),addLength1:!0,objectId:mn}),an("endobj");var vn=sn();an("<<"),an("/Type /FontDescriptor"),an("/FontName /"+un(nn.fontName)),an("/FontFile2 "+An+" 0 R"),an("/FontBBox "+en.API.PDFObject.convert(nn.metadata.bbox)),an("/Flags "+nn.metadata.flags),an("/StemV "+nn.metadata.stemV),an("/ItalicAngle "+nn.metadata.italicAngle),an("/Ascent "+nn.metadata.ascender),an("/Descent "+nn.metadata.decender),an("/CapHeight "+nn.metadata.capHeight),an(">>"),an("endobj");var yn=sn();an("<<"),an("/Type /Font"),an("/BaseFont /"+un(nn.fontName)),an("/FontDescriptor "+vn+" 0 R"),an("/W "+en.API.PDFObject.convert(dn)),an("/CIDToGIDMap /Identity"),an("/DW 1000"),an("/Subtype /CIDFontType2"),an("/CIDSystemInfo"),an("<<"),an("/Supplement 0"),an("/Registry (Adobe)"),an("/Ordering ("+nn.encoding+")"),an(">>"),an(">>"),an("endobj"),nn.objectNumber=sn(),an("<<"),an("/Type /Font"),an("/Subtype /Type0"),an("/ToUnicode "+mn+" 0 R"),an("/BaseFont /"+un(nn.fontName)),an("/Encoding /"+nn.encoding),an("/DescendantFonts ["+yn+" 0 R]"),
2020-09-04 20:34:30 +00:00
/**
* @license
* jsPDF virtual FileSystem functionality
*
* Licensed under the MIT License.
* http://opensource.org/licenses/mit-license
2020-08-28 22:07:07 +00:00
*/
2021-01-31 22:16:43 +00:00
function(en){var tn=function e(){return void 0===this.internal.vFS&&(this.internal.vFS={}),!0};en.existsFileInVFS=function(en){return tn.call(this),void 0!==this.internal.vFS[en]},en.addFileToVFS=function(en,nn){return tn.call(this),this.internal.vFS[en]=nn,this},en.getFileFromVFS=function(en){return tn.call(this),void 0!==this.internal.vFS[en]?this.internal.vFS[en]:null}}(O$1.API),
2020-09-04 20:34:30 +00:00
/**
* @license
* Unicode Bidi Engine based on the work of Alex Shensis (@asthensis)
* MIT License
2020-08-28 22:07:07 +00:00
*/
2021-01-31 22:16:43 +00:00
function(en){en.__bidiEngine__=en.prototype.__bidiEngine__=function(en){var nn,rn,an,sn,cn,un,dn,pn=tn,hn=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],gn=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],An={L:0,R:1,EN:2,AN:3,N:4,B:5,S:6},mn={0:0,5:1,6:2,7:3,32:4,251:5,254:6,255:7},vn=["(",")","(","<",">","<","[","]","[","{","}","{","«","»","«","","","","⁅","⁆","⁅","⁽","⁾","⁽","₍","₎","₍","≤","≥","≤","〈","〉","〈","﹙","﹚","﹙","﹛","﹜","﹛","﹝","﹞","﹝","﹤","﹥","﹤"],yn=new RegExp(/^([1-4|9]|1[0-9]|2[0-9]|3[0168]|4[04589]|5[012]|7[78]|159|16[0-9]|17[0-2]|21[569]|22[03489]|250)$/),_n=!1,wn=0;this.__bidiEngine__={};var xn=function b(en){var tn=en.charCodeAt(),nn=tn>>8,rn=mn[nn];return void 0!==rn?pn[256*rn+(255&tn)]:252===nn||253===nn?"AL":yn.test(nn)?"L":8===nn?"R":"N"},Sn=function y(en){for(var tn,nn=0;nn<en.length;nn++){if("L"===(tn=xn(en.charAt(nn))))return!1;if("R"===tn)return!0}return!1},Cn=function w(en,tn,cn,un){var dn,pn,hn,gn,An=tn[un];switch(An){case"L":case"R":_n=!1;break;case"N":case"AN":break;case"EN":_n&&(An="AN");break;case"AL":_n=!0,An="R";break;case"WS":An="N";break;case"CS":un<1||un+1>=tn.length||"EN"!==(dn=cn[un-1])&&"AN"!==dn||"EN"!==(pn=tn[un+1])&&"AN"!==pn?An="N":_n&&(pn="AN"),An=pn===dn?pn:"N";break;case"ES":An="EN"===(dn=un>0?cn[un-1]:"B")&&un+1<tn.length&&"EN"===tn[un+1]?"EN":"N";break;case"ET":if(un>0&&"EN"===cn[un-1]){An="EN";break}if(_n){An="N";break}for(hn=un+1,gn=tn.length;hn<gn&&"ET"===tn[hn];)hn++;An=hn<gn&&"EN"===tn[hn]?"EN":"N";break;case"NSM":if(an&&!sn){for(gn=tn.length,hn=un+1;hn<gn&&"NSM"===tn[hn];)hn++;if(hn<gn){var mn=en[un],vn=mn>=1425&&mn<=2303||64286===mn;if(dn=tn[hn],vn&&("R"===dn||"AL"===dn)){An="R";break}}}An=un<1||"B"===(dn=tn[un-1])?"N":cn[un-1];break;case"B":_n=!1,nn=!0,An=wn;break;case"S":rn=!0,An="N";break;case"LRE":case"RLE":case"LRO":case"RLO":case"PDF":_n=!1;break;case"BN":An="N"}return An},kn=function N(en,tn,nn){var rn=en.split("");return nn&&Bn(rn,nn,{hiLevel:wn}),rn.reverse(),tn&&tn.reverse(),rn.join("")},Bn=function L(en,tn,an){var sn,cn,un,dn,pn,mn=-1,vn=en.length,yn=0,Sn=[],kn=wn?gn:hn,L=[];for(_n=!1,nn=!1,rn=!1,cn=0;cn<vn;cn++)L[cn]=xn(en[cn]);for(un=0;un<vn;un++){if(pn=yn,Sn[un]=Cn(en,L,Sn,un),sn=240&(yn=kn[pn][An[Sn[un]]]),yn&=15,tn[un]=dn=kn[yn][5],sn>0)if(16===sn){for(cn=mn;cn<un;cn++)tn[cn]=1;mn=-1}else mn=-1;if(kn[yn][6])-1===mn&&(mn=un);else if(mn>-1){for(cn=mn;cn<un;cn++)tn[cn]=dn;mn=-1}"B"===L[un]&&(tn[un]=0),an.hiLevel|=dn}rn&&function(en,tn,nn){for(var rn=0;rn<nn;rn++)if("S"===en[rn]){tn[rn]=wn;for(var an=rn-1;an>=0&&"WS"===en[an];an--)tn[an]=wn}}(L,tn,vn)},En=function A(en,tn,rn,an,sn){if(!(sn.hiLevel<en)){if(1===en&&1===wn&&!nn)return tn.reverse(),void(rn&&rn.reverse());for(var cn,un,dn,pn,hn=tn.length,gn=0;gn<hn;){if(an[gn]>=en){for(dn=gn+1;dn<hn&&an[dn]>=en;)dn++;for(pn=gn,un=dn-1;pn<un;pn++,un--)cn=tn[pn],tn[pn]=tn[un],tn[un]=cn,rn&&(cn=rn[pn],rn[pn]=rn[un],rn[un]=cn);gn=dn}gn++}}},Pn=function x(en,tn,nn){var rn=en.split(""),an={hiLevel:wn};return nn||(nn=[]),Bn(rn,nn,an),function(en,tn,nn){if(0!==nn.hiLevel&&dn)for(var rn,an=0;an<en.length;an++)1===tn[an]&&(rn=vn.indexOf(en[an]))>=0&&(en[an]=vn[rn+1])}(rn,nn,an),En(2,rn,tn,nn,an),En(1,rn,tn,nn,an),rn.join("")};return this.__bidiEngine__.doBidiReorder=function(en,tn,nn){if(function(en,tn){if(tn)for(var nn=0;nn<en.length;nn++)tn[nn]=nn;void 0===sn&&(sn=Sn(en)),void 0===un&&(un=Sn(en))}(en,tn),an||!cn||un)if(an&&cn&&sn^un)wn=sn?1:0,en=kn(en,tn,nn);else if(!an&&cn&&un)wn=sn?1:0,en=Pn(en,tn,nn),en=kn(en,tn);else if(!an||sn||cn||un){if(an&&!cn&&sn^un)en=kn(en,tn),sn?(wn=0,en=Pn(en,tn,nn)):(wn=1,en=Pn(en,tn,nn),en=kn(en,tn));else if(an&&sn&&!cn&&un)wn=1,en=Pn(en,tn,nn),en=kn(en,tn);else if(!an&&!cn&&sn^un){var rn=dn;sn?(wn=1,en=Pn(en,tn,nn),wn=0,dn=!1,en=Pn(en,tn,nn),dn=rn):(wn=0,en=Pn(en,tn,nn),en=kn(en,tn),wn=1,dn=!1,en=Pn(en,tn,nn),dn=rn,en=kn(en,tn))}}else wn=0,en=Pn(en,tn,nn);else wn=sn?1:0,en=Pn(en,tn,nn);return en},this.__bidiEngine__.setOptions=function(en){en&&(
2020-09-04 20:34:30 +00:00
/*! https://mths.be/cssesc v3.0.0 by @mathias */
2021-01-31 22:16:43 +00:00
var SR={}.hasOwnProperty,CR=/[ -,\.\/:-@\[-\^`\{-~]/,kR=/[ -,\.\/:-@\[\]\^`\{-~]/,BR=/(^|\\+)?(\\[A-F0-9]{1,6})\x20(?![a-fA-F0-9\x20])/g,ER=function cssesc(en,tn){"single"!=(tn=function merge(en,tn){if(!en)return tn;var nn={};for(var rn in tn)nn[rn]=SR.call(en,rn)?en[rn]:tn[rn];return nn}(tn,cssesc.options)).quotes&&"double"!=tn.quotes&&(tn.quotes="single");for(var nn="double"==tn.quotes?'"':"'",rn=tn.isIdentifier,an=en.charAt(0),sn="",cn=0,un=en.length;cn<un;){var dn=en.charAt(cn++),pn=dn.charCodeAt(),hn=void 0;if(pn<32||pn>126){if(pn>=55296&&pn<=56319&&cn<un){var gn=en.charCodeAt(cn++);56320==(64512&gn)?pn=((1023&pn)<<10)+(1023&gn)+65536:cn--}hn="\\"+pn.toString(16).toUpperCase()+" "}else hn=tn.escapeEverything?CR.test(dn)?"\\"+dn:"\\"+pn.toString(16).toUpperCase()+" ":/[\t\n\f\r\x0B]/.test(dn)?"\\"+pn.toString(16).toUpperCase()+" ":"\\"==dn||!rn&&('"'==dn&&nn==dn||"'"==dn&&nn==dn)||rn&&kR.test(dn)?"\\"+dn:dn;sn+=hn}return rn&&(/^-[-\d]/.test(sn)?sn="\\-"+sn.slice(1):/\d/.test(an)&&(sn="\\3"+an+" "+sn.slice(1))),sn=sn.replace(BR,(function(en,tn,nn){return tn&&tn.length%2?en:(tn||"")+nn})),!rn&&tn.wrap?nn+sn+nn:sn};ER.options={escapeEverything:!1,isIdentifier:!1,quotes:"single",wrap:!1},ER.version="3.0.0";var PR=ER,LR=/[a-z0-9_-]/i,TR=/[\s\t]/,NR=function parse(en){for(var tn,nn,rn=!0,an=0,sn="",cn=0,un=[];;){if(nn=en[cn],0===an){if(!nn&&rn)break;if(!nn&&!rn)throw new Error("Parse error");if('"'===nn||"'"===nn)tn=nn,an=1,rn=!1;else if(TR.test(nn));else{if(!LR.test(nn))throw new Error("Parse error");an=3,rn=!1,cn--}}else if(1===an){if(!nn)throw new Error("Parse Error");"\\"===nn?an=2:nn===tn?(un.push(sn),sn="",an=4):sn+=nn}else if(2===an){if(nn!==tn&&"\\"!==nn)throw new Error("Parse error");sn+=nn,an=1}else if(3===an){if(!nn){un.push(sn);break}LR.test(nn)?sn+=nn:","===nn?(un.push(sn),sn="",an=0):TR.test(nn)?an=5:"\\"===nn&&(an=6)}else if(6===an){if(/[0-9a-f]/i.test(nn))throw new Error("Parse error");sn+=nn,an=3}else if(5===an){if(!nn){un.push(sn);break}if(LR.test(nn))sn+=" "+nn,an=3;else if(","===nn)un.push(sn),sn="",an=0;else if(!TR.test(nn))throw new Error("Parse error")}else if(4===an){if(!nn)break;if(","===nn)an=0;else if(!TR.test(nn))throw new Error("Parse error")}cn++}return un},IR={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},OR=[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279];function isDigit(en){return en>=48&&en<=57}function State(en){this.index=0,this.path=en,this.max=en.length,this.result=[],this.param=0,this.err="",this.segmentStart=0,this.data=[]}function skipSpaces(en){for(;en.index<en.max&&(10===(tn=en.path.charCodeAt(en.index))||13===tn||8232===tn||8233===tn||32===tn||9===tn||11===tn||12===tn||160===tn||tn>=5760&&OR.indexOf(tn)>=0);)en.index++;var tn}function scanFlag(en){var tn=en.path.charCodeAt(en.index);return 48===tn?(en.param=0,void en.index++):49===tn?(en.param=1,void en.index++):void(en.err="SvgPath: arc flag can be 0 or 1 only (at pos "+en.index+")")}function scanParam(en){var tn,nn=en.index,rn=nn,an=en.max,sn=!1,cn=!1,un=!1,dn=!1;if(rn>=an)en.err="SvgPath: missed param (at pos "+rn+")";else if(43!==(tn=en.path.charCodeAt(rn))&&45!==tn||(tn=++rn<an?en.path.charCodeAt(rn):0),isDigit(tn)||46===tn){if(46!==tn){if(sn=48===tn,tn=++rn<an?en.path.charCodeAt(rn):0,sn&&rn<an&&tn&&isDigit(tn))return void(en.err="SvgPath: numbers started with `0` such as `09` are illegal (at pos "+nn+")");for(;rn<an&&isDigit(en.path.charCodeAt(rn));)rn++,cn=!0;tn=rn<an?en.path.charCodeAt(rn):0}if(46===tn){for(dn=!0,rn++;isDigit(en.path.charCodeAt(rn));)rn++,un=!0;tn=rn<an?en.path.charCodeAt(rn):0}if(101===tn||69===tn){if(dn&&!cn&&!un)return void(en.err="SvgPath: invalid float exponent (at pos "+rn+")");if(43!==(tn=++rn<an?en.path.charCodeAt(rn):0)&&45!==tn||rn++,!(rn<an&&isDigit(en.path.charCodeAt(rn))))return void(en.err="SvgPath: invalid float exponent (at pos "+rn+")");for(;rn<an&&isDigit(en.path.charCodeAt(rn));)rn++}en.index=rn,en.param=parseFloat(en.path.slice(nn,rn))+0}else en.err="SvgPath: param should start with 0..9 or `.` (at pos "+rn+")"}function finalizeSegment(en){var
2020-09-04 20:34:30 +00:00
/**
* Localizing script for SVG-edit UI.
* @module locale
* @license MIT
*
* @copyright 2010 Narendra Sisodya
* @copyright 2010 Alexis Deveria
*
2021-01-31 22:16:43 +00:00
*/_export({target:"String",proto:!0,forced:stringHtmlForced("bold")},{bold:function bold(){return createHtml(this,"b","","")}});var Ij=function setStrings(en,tn,nn){var rn=document.getElementById("svg_editor").parentNode;Object.entries(tn).forEach((function(tn){var an=_slicedToArray(tn,2),sn=an[0],cn=an[1];if(cn){nn&&(sn="#"+sn);var un=rn.querySelectorAll(sn);if(un.length){var dn=un[0];switch(en){case"aria-label":dn.setAttribute("aria-label",cn);break;case"content":_toConsumableArray(un).some((function(en){return!(3!==en.nodeType||!en.textContent.trim())&&(en.textContent=cn,!0)}));break;case"title":dn.setAttribute("title",cn)}}else console.log("Missing element for localization: "+sn)}else console.log(sn)}))},Oj=function readLang(en){var tn=en.tools,nn=en.properties,rn=en.config,an=en.layers,sn=en.common,cn=en.ui;Ij("content",{curve_segments:nn.curve_segments,fitToContent:tn.fitToContent,fit_to_all:tn.fit_to_all,fit_to_canvas:tn.fit_to_canvas,fit_to_layer_content:tn.fit_to_layer_content,fit_to_sel:tn.fit_to_sel,icon_large:rn.icon_large,icon_medium:rn.icon_medium,icon_small:rn.icon_small,icon_xlarge:rn.icon_xlarge,image_opt_embed:rn.image_opt_embed,image_opt_ref:rn.image_opt_ref,includedImages:rn.included_images,largest_object:tn.largest_object,layersLabel:an.layers,page:tn.page,relativeToLabel:tn.relativeTo,selLayerLabel:an.move_elems_to,selectedPredefined:rn.select_predefined,selected_objects:tn.selected_objects,smallest_object:tn.smallest_object,straight_segments:nn.straight_segments,svginfo_bg_url:rn.editor_img_url+":",svginfo_bg_note:rn.editor_bg_note,svginfo_change_background:rn.background,svginfo_dim:rn.doc_dims,svginfo_editor_prefs:rn.editor_prefs,svginfo_height:sn.height,svginfo_icons:rn.icon_size,svginfo_image_props:rn.image_props,svginfo_lang:rn.language,svginfo_title:rn.doc_title,svginfo_width:sn.width,tool_docprops_cancel:sn.cancel,tool_docprops_save:sn.ok,tool_source_cancel:sn.cancel,tool_source_save:sn.ok,tool_prefs_cancel:sn.cancel,tool_prefs_save:sn.ok,sidepanel_handle:an.layers.split("").join(" "),tool_clear:tn.new_doc,tool_docprops:tn.docprops,tool_export:tn.export_img,tool_import:tn.import_doc,tool_open:tn.open_doc,tool_save:tn.save_doc,tool_editor_prefs:rn.editor_prefs,tool_editor_homepage:tn.editor_homepage,svginfo_units_rulers:rn.units_and_rulers,svginfo_rulers_onoff:rn.show_rulers,svginfo_unit:rn.base_unit,svginfo_grid_settings:rn.grid,svginfo_snap_onoff:rn.snapping_onoff,svginfo_snap_step:rn.snapping_stepsize,svginfo_grid_color:rn.grid_color},!0);var un={};["cut","copy","paste","paste_in_place","delete","group","ungroup","move_front","move_up","move_down","move_back"].forEach((function(en){un['#cmenu_canvas a[href="#'+en+'"]']=tn[en]})),["dupe","merge_down","merge_all"].forEach((function(en){un['#cmenu_layers a[href="#'+en+'"]']=an[en]})),un['#cmenu_layers a[href="#delete"]']=an.del,Ij("content",un);var dn={};return Object.entries({tool_blur:nn.blur,tool_position:tn.align_to_page,tool_font_family:nn.font_family,zoom_panel:cn.zoom_level,stroke_linejoin:nn.linejoin_miter,stroke_linecap:nn.linecap_butt,tool_opacity:nn.opacity}).forEach((function(en){var tn=_slicedToArray(en,2),nn=tn[0],rn=tn[1];dn["#"+nn+" button"]=rn})),Object.entries({group_opacity:nn.opacity,zoom:cn.zoom_level}).forEach((function(en){var tn=_slicedToArray(en,2),nn=tn[0],rn=tn[1];dn["#"+nn]=rn})),Ij("aria-label",dn),Ij("title",{align_relative_to:tn.align_relative_to,circle_cx:nn.circle_cx,circle_cy:nn.circle_cy,circle_r:nn.circle_r,cornerRadiusLabel:nn.corner_radius,ellipse_cx:nn.ellipse_cx,ellipse_cy:nn.ellipse_cy,ellipse_rx:nn.ellipse_rx,ellipse_ry:nn.ellipse_ry,fill_color:nn.fill_color,font_family:nn.font_family,idLabel:nn.id,image_height:nn.image_height,image_url:nn.image_url,image_width:nn.image_width,layer_delete:an.del,layer_down:an.move_down,layer_new:an.new,layer_rename:an.rename,layer_moreopts:sn.more_opts,layer_up:an.move_up,line_x1:nn.line_x1,line_x2:nn.line_x2,line_y1:nn.line_y1,line_y2:nn.line_y2,linecap_butt:nn.linecap_butt,linecap_round:nn.linecap_round,linecap_square:nn.linecap_square,linejoin_bevel:nn.linejoin_be
2020-09-04 20:34:30 +00:00
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
2021-01-31 22:16:43 +00:00
var en=function extendStatics(tn,nn){return(en=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(en,tn){en.__proto__=tn}||function(en,tn){for(var nn in tn)tn.hasOwnProperty(nn)&&(en[nn]=tn[nn])})(tn,nn)};function __extends(tn,nn){function __(){this.constructor=tn}en(tn,nn),tn.prototype=null===nn?Object.create(nn):(__.prototype=nn.prototype,new __)}var tn=function __assign(){return(tn=Object.assign||function __assign(en){for(var tn,nn=1,rn=arguments.length;nn<rn;nn++)for(var an in tn=arguments[nn])Object.prototype.hasOwnProperty.call(tn,an)&&(en[an]=tn[an]);return en}).apply(this,arguments)};function __awaiter(en,tn,nn,rn){return new(nn||(nn=Promise))((function(an,sn){function fulfilled(en){try{step(rn.next(en))}catch(en){sn(en)}}function rejected(en){try{step(rn.throw(en))}catch(en){sn(en)}}function step(en){en.done?an(en.value):new nn((function(tn){tn(en.value)})).then(fulfilled,rejected)}step((rn=rn.apply(en,tn||[])).next())}))}function __generator(en,tn){var nn,rn,an,sn,cn={label:0,sent:function sent(){if(1&an[0])throw an[1];return an[1]},trys:[],ops:[]};return sn={next:verb(0),throw:verb(1),return:verb(2)},"function"==typeof Symbol&&(sn[Symbol.iterator]=function(){return this}),sn;function verb(en){return function(tn){return step([en,tn])}}function step(sn){if(nn)throw new TypeError("Generator is already executing.");for(;cn;)try{if(nn=1,rn&&(an=2&sn[0]?rn.return:sn[0]?rn.throw||((an=rn.return)&&an.call(rn),0):rn.next)&&!(an=an.call(rn,sn[1])).done)return an;switch(rn=0,an&&(sn=[2&sn[0],an.value]),sn[0]){case 0:case 1:an=sn;break;case 4:return cn.label++,{value:sn[1],done:!1};case 5:cn.label++,rn=sn[1],sn=[0];continue;case 7:sn=cn.ops.pop(),cn.trys.pop();continue;default:if(!((an=(an=cn.trys).length>0&&an[an.length-1])||6!==sn[0]&&2!==sn[0])){cn=0;continue}if(3===sn[0]&&(!an||sn[1]>an[0]&&sn[1]<an[3])){cn.label=sn[1];break}if(6===sn[0]&&cn.label<an[1]){cn.label=an[1],an=sn;break}if(an&&cn.label<an[2]){cn.label=an[2],cn.ops.push(sn);break}an[2]&&cn.ops.pop(),cn.trys.pop();continue}sn=tn.call(en,cn)}catch(en){sn=[6,en],rn=0}finally{nn=an=0}if(5&sn[0])throw sn[1];return{value:sn[0]?sn[1]:void 0,done:!0}}}for(var nn=function(){function Bounds(en,tn,nn,rn){this.left=en,this.top=tn,this.width=nn,this.height=rn}return Bounds.prototype.add=function(en,tn,nn,rn){return new Bounds(this.left+en,this.top+tn,this.width+nn,this.height+rn)},Bounds.fromClientRect=function(en){return new Bounds(en.left,en.top,en.width,en.height)},Bounds}(),rn=function parseBounds(en){return nn.fromClientRect(en.getBoundingClientRect())},an=function parseDocumentSize(en){var tn=en.body,rn=en.documentElement;if(!tn||!rn)throw new Error("Unable to get document size");var an=Math.max(Math.max(tn.scrollWidth,rn.scrollWidth),Math.max(tn.offsetWidth,rn.offsetWidth),Math.max(tn.clientWidth,rn.clientWidth)),sn=Math.max(Math.max(tn.scrollHeight,rn.scrollHeight),Math.max(tn.offsetHeight,rn.offsetHeight),Math.max(tn.clientHeight,rn.clientHeight));return new nn(0,0,an,sn)},sn=function toCodePoints(en){for(var tn=[],nn=0,rn=en.length;nn<rn;){var an=en.charCodeAt(nn++);if(an>=55296&&an<=56319&&nn<rn){var sn=en.charCodeAt(nn++);56320==(64512&sn)?tn.push(((1023&an)<<10)+(1023&sn)+65536):(tn.push(an),nn--)}else tn.push(an)}return tn},cn=function fromCodePoint(){for(var en=[],tn=0;tn<arguments.length;tn++)en[tn]=arguments[tn];if(String.fromCodePoint)return String.fromCodePoint.apply(String,en);var nn=en.length;if(!nn)return"";for(var rn=[],an=-1,sn="";++an<nn;){var cn=en[an];cn<=65535?rn.push(cn):(cn-=65536,rn.push(55296+(cn>>10),cn%1024+56320)),(an+1===nn||rn.length>16384)&&(sn+=String.fromCharCode.apply(String,rn),rn.length=0)}return sn},un="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",dn="undefined"==typeof Uint8Array?[]:new Uint8Array(256),pn=0;pn<un.length;pn++)dn[un.charCodeAt(pn)]=pn;var hn,gn=function decode(en){var tn,nn,rn,an,sn,cn=.75*en.length,un=en.length,pn=0;"="===en[en.length-1]&&(cn--,"="===en[en.length-2]&&cn--);var hn="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array&&void 0!==Uint8Array.prototype.sli
2020-08-28 22:07:07 +00:00
//# sourceMappingURL=index.js.map