PageSourceSearch

https://medicalrobots.eu/we/ext/we/we.4be18e03.js

js medicalrobots.eu collected 2026-10-02 23:38:39 UTC 2,687,136 bytes, 644 lines download raw bytes

1parcelRequire=function(e,r,t,n){var i,o="function"==typeof parcelRequire&&parcelRequire,u="function"==typeof require&&require;function f(t,n){if(!r[t]){if(!e[t]){var i="function"==typeof parcelRequire&&parcelRequire;if(!n&&i)return i(t,!0);if(o)return o(t,!0);if(u&&"string"==typeof t)return u(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[t][1][r]||r},p.cache={};var l=r[t]=new f.Module(t);e[t][0].call(l.exports,p,l,l.exports,this)}return r[t].exports;function p(e){return f(p.resolve(e))}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=r,f.parent=o,f.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]};for(var c=0;c<t.length;c++)try{f(t[c])}catch(e){i||(i=e)}if(t.length){var l=f(t[t.length-1]);"object"==typeof exports&&"undefined"!=typeof module?module.exports=l:"function"==typeof define&&define.amd?define(function(){return l}):n&&(this[n]=l)}if(parcelRequire=f,i)throw i;return f}({"g5IB":[function(require,module,exports) {
2
3var t,e,n=module.exports={};function r(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function i(e){if(t===setTimeout)return setTimeout(e,0);if((t===r||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}function u(t){if(e===clearTimeout)return clearTimeout(t);if((e===o||!e)&&clearTimeout)return e=clearTimeout,clearTimeout(t);try{return e(t)}catch(n){try{return e.call(null,t)}catch(n){return e.call(this,t)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:r}catch(n){t=r}try{e="function"==typeof clearTimeout?clearTimeout:o}catch(n){e=o}}();var c,s=[],l=!1,a=-1;function f(){l&&c&&(l=!1,c.length?s=c.concat(s):a=-1,s.length&&h())}function h(){if(!l){var t=i(f);l=!0;for(var e=s.length;e;){for(c=s,s=[];++a<e;)c&&c[a].run();a=-1,e=s.length}c=null,l=!1,u(t)}}function m(t,e){this.fun=t,this.array=e}function p(){}n.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];s.push(new m(t,e)),1!==s.length||l||i(h)},m.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.env={},n.argv=[],n.version="",n.versions={},n.on=p,n.addListener=p,n.once=p,n.off=p,n.removeListener=p,n.removeAllListeners=p,n.emit=p,n.prependListener=p,n.prependOnceListener=p,n.listeners=function(t){return[]},n.binding=function(t){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(t){throw new Error("process.chdir is not supported")},n.umask=function(){return 0};
4},{}],"HlZQ":[function(require,module,exports) {
5var global = arguments[3];
6var process = require("process");
7var define;
8var e,t=arguments[3],n=require("process");!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(t,n){"use strict";var r=[],i=Object.getPrototypeOf,o=r.slice,a=r.flat?function(e){return r.flat.call(e)}:function(e){return r.concat.apply([],e)},s=r.push,u=r.indexOf,l={},c=l.toString,f=l.hasOwnProperty,p=f.toString,d=p.call(Object),h={},g=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},v=function(e){return null!=e&&e===e.window},y=t.document,m={type:!0,src:!0,nonce:!0,noModule:!0};function x(e,t,n){var r,i,o=(n=n||y).createElement("script");if(o.text=e,t)for(r in m)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function b(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?l[c.call(e)]||"object":typeof e}var w=/HTML$/i,T=function(e,t){return new T.fn.init(e,t)};function C(e){var t=!!e&&"length"in e&&e.length,n=b(e);return!g(e)&&!v(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}
vendor: 5,280 bytes, line 8
8function S(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}T.fn=T.prototype={jquery:"3.7.1",constructor:T,length:0,toArray:function(){return o.call(this)},get:function(e){return null==e?o.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=T.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return T.each(this,e)},map:function(e){return this.pushStack(T.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(o.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(T.grep(this,function(e,t){return(t+1)%2}))},odd:function(){return this.pushStack(T.grep(this,function(e,t){return t%2}))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:s,sort:r.sort,splice:r.splice},T.extend=T.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[s]||{},s++),"object"==typeof a||g(a)||(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(e=arguments[s]))for(t in e)r=e[t],"__proto__"!==t&&a!==r&&(l&&r&&(T.isPlainObject(r)||(i=Array.isArray(r)))?(n=a[t],o=i&&!Array.isArray(n)?[]:i||T.isPlainObject(n)?n:{},i=!1,a[t]=T.extend(l,o,r)):void 0!==r&&(a[t]=r));return a},T.extend({expando:"jQuery"+("3.7.1"+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==c.call(e))&&(!(t=i(e))||"function"==typeof(n=f.call(t,"constructor")&&t.constructor)&&p.call(n)===d)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t,n){x(e,{nonce:t&&t.nonce},n)},each:function(e,t){var n,r=0;if(C(e))for(n=e.length;r<n&&!1!==t.call(e[r],r,e[r]);r++);else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},text:function(e){var t,n="",r=0,i=e.nodeType;if(!i)for(;t=e[r++];)n+=T.text(t);return 1===i||11===i?e.textContent:9===i?e.documentElement.textContent:3===i||4===i?e.nodeValue:n},makeArray:function(e,t){var n=t||[];return null!=e&&(C(Object(e))?T.merge(n,"string"==typeof e?[e]:e):s.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:u.call(t,e,n)},isXMLDoc:function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!w.test(t||n&&n.nodeName||"HTML")},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!==a&&r.push(e[i]);return r},map:function(e,t,n){var r,i,o=0,s=[];if(C(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&s.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&s.push(i);return a(s)},guid:1,support:h}),"function"==typeof Symbol&&(T.fn[Symbol.iterator]=r[Symbol.iterator]),T.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){l["[object "+t+"]"]=t.toLowerCase()});var E=r.pop,k=r.sort,j=r.splice,A="[\\x20\\t\\r\\n\\f]",D=new RegExp("^"+A+"+|((?:^|[^\\\\])(?:\\\\.)*)"+A+"+$","g");T.contains=function(e,t){var n=t&&t.parentNode;return e===n||!(!n||1!==n.nodeType||!(e.contains?e.contains(n):e.compareDocumentPosition&&16&e.compareDocumentPosition(n)))};var N=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;function q(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e}T.escapeSelector=function(e){return(e+"").replace(N,q)};var L=y,H=s;!function(){var e,n,i,a,s,l,c,p,d,g,v=H,y=T.expando,m=0,x=0,b=ee(),w=ee(),C=ee(),N=ee(),q=function(e,t){return e===t&&(s=!0),0},O="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",P="(?:\\\\[\\da-fA-F]{1,6}"+A+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",M="\\["+A+"*("+P+")(?:"+A+"*([*^$|!~]?=)"+A+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+P+"))|)"+A+"*\\]",R=":("+P+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+M+")*)|.*)\\)|)",I=new RegExp(A+"+","g"),W=new RegExp("^"+A+"*,"+A+"*"),F=new RegExp("^"+A+"*([>+~]|"+A+")"+A+"*"),$=new RegExp(A+"|>"),B=new RegExp(R),_=new RegExp("^"+P+"$"),z={ID:new RegExp("^#("+P+")"),CLASS:new RegExp("^\\.("+P+")"),TAG:new RegExp("^("+P+"|[*])"),ATTR:new RegExp("^"+M),PSEUDO:new RegExp("^"+R),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+A+"*(even|odd|(([+-]|)(\\d*)n|)"+A+"*(?:([+-]|)"+A+"*(\\d+)|))"+A+"*\\)|)","i"),bool:new RegExp("^(?:"+O+")$","i"),needsContext:new RegExp("^"+A+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+A+"*((?:-\\d)?\\d*)"+A+"*\\)|)(?=[^-]|$)","i")},X=/^(?:input|select|textarea|button)$/i,U=/^h\d$/i,V=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,G=/[+~]/,Y=new RegExp("\\\\[\\da-fA-F]{1,6}"+A+"?|\\\\([^\\r\\n\\f])","g"),Q=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},J=function(){ue()},K=pe(function(e){return!0===e.disabled&&S(e,"fieldset")},{dir:"parentNode",next:"legend"});try{v.apply(r=o.call(L.childNodes),L.childNodes),r[L.childNodes.length].nodeType}catch(xe){v={apply:function(e,t){H.apply(e,o.call(t))}
vendor: 9,347 bytes, line 8
8,call:function(e){H.apply(e,o.call(arguments,1))}}}function Z(e,t,n,r){var i,o,a,s,u,c,f,g=t&&t.ownerDocument,m=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==m&&9!==m&&11!==m)return n;if(!r&&(ue(t),t=t||l,p)){if(11!==m&&(u=V.exec(e)))if(i=u[1]){if(9===m){if(!(a=t.getElementById(i)))return n;if(a.id===i)return v.call(n,a),n}else if(g&&(a=g.getElementById(i))&&Z.contains(t,a)&&a.id===i)return v.call(n,a),n}else{if(u[2])return v.apply(n,t.getElementsByTagName(e)),n;if((i=u[3])&&t.getElementsByClassName)return v.apply(n,t.getElementsByClassName(i)),n}if(!(N[e+" "]||d&&d.test(e))){if(f=e,g=t,1===m&&($.test(e)||F.test(e))){for((g=G.test(e)&&se(t.parentNode)||t)==t&&h.scope||((s=t.getAttribute("id"))?s=T.escapeSelector(s):t.setAttribute("id",s=y)),o=(c=ce(e)).length;o--;)c[o]=(s?"#"+s:":scope")+" "+fe(c[o]);f=c.join(",")}try{return v.apply(n,g.querySelectorAll(f)),n}catch(x){N(e,!0)}finally{s===y&&t.removeAttribute("id")}}}return me(e.replace(D,"$1"),t,n,r)}function ee(){var e=[];return function t(r,i){return e.push(r+" ")>n.cacheLength&&delete t[e.shift()],t[r+" "]=i}}function te(e){return e[y]=!0,e}function ne(e){var t=l.createElement("fieldset");try{return!!e(t)}catch(xe){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function re(e){return function(t){return S(t,"input")&&t.type===e}}function ie(e){return function(t){return(S(t,"input")||S(t,"button"))&&t.type===e}}function oe(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&K(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function ae(e){return te(function(t){return t=+t,te(function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function se(e){return e&&void 0!==e.getElementsByTagName&&e}function ue(e){var t,r=e?e.ownerDocument||e:L;return r!=l&&9===r.nodeType&&r.documentElement?(c=(l=r).documentElement,p=!T.isXMLDoc(l),g=c.matches||c.webkitMatchesSelector||c.msMatchesSelector,c.msMatchesSelector&&L!=l&&(t=l.defaultView)&&t.top!==t&&t.addEventListener("unload",J),h.getById=ne(function(e){return c.appendChild(e).id=T.expando,!l.getElementsByName||!l.getElementsByName(T.expando).length}),h.disconnectedMatch=ne(function(e){return g.call(e,"*")}),h.scope=ne(function(){return l.querySelectorAll(":scope")}),h.cssHas=ne(function(){try{return l.querySelector(":has(*,:jqfake)"),!1}catch(xe){return!0}}),h.getById?(n.filter.ID=function(e){var t=e.replace(Y,Q);return function(e){return e.getAttribute("id")===t}},n.find.ID=function(e,t){if(void 0!==t.getElementById&&p){var n=t.getElementById(e);return n?[n]:[]}}):(n.filter.ID=function(e){var t=e.replace(Y,Q);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},n.find.ID=function(e,t){if(void 0!==t.getElementById&&p){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];for(i=t.getElementsByName(e),r=0;o=i[r++];)if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),n.find.TAG=function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):t.querySelectorAll(e)},n.find.CLASS=function(e,t){if(void 0!==t.getElementsByClassName&&p)return t.getElementsByClassName(e)},d=[],ne(function(e){var t;c.appendChild(e).innerHTML="<a id='"+y+"' href='' disabled='disabled'></a><select id='"+y+"-\r\\' disabled='disabled'><option selected=''></option></select>",e.querySelectorAll("[selected]").length||d.push("\\["+A+"*(?:value|"+O+")"),e.querySelectorAll("[id~="+y+"-]").length||d.push("~="),e.querySelectorAll("a#"+y+"+*").length||d.push(".#.+[+~]"),e.querySelectorAll(":checked").length||d.push(":checked"),(t=l.createElement("input")).setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),c.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&d.push(":enabled",":disabled"),(t=l.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||d.push("\\["+A+"*name"+A+"*="+A+"*(?:''|\"\")")}),h.cssHas||d.push(":has"),d=d.length&&new RegExp(d.join("|")),q=function(e,t){if(e===t)return s=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!h.sortDetached&&t.compareDocumentPosition(e)===n?e===l||e.ownerDocument==L&&Z.contains(L,e)?-1:t===l||t.ownerDocument==L&&Z.contains(L,t)?1:a?u.call(a,e)-u.call(a,t):0:4&n?-1:1)},l):l}for(e in Z.matches=function(e,t){return Z(e,null,null,t)},Z.matchesSelector=function(e,t){if(ue(e),p&&!N[t+" "]&&(!d||!d.test(t)))try{var n=g.call(e,t);if(n||h.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(xe){N(t,!0)}return Z(t,l,null,[e]).length>0},Z.contains=function(e,t){return(e.ownerDocument||e)!=l&&ue(e),T.contains(e,t)},Z.attr=function(e,t){(e.ownerDocument||e)!=l&&ue(e);var r=n.attrHandle[t.toLowerCase()],i=r&&f.call(n.attrHandle,t.toLowerCase())?r(e,t,!p):void 0;return void 0!==i?i:e.getAttribute(t)},Z.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},T.uniqueSort=function(e){var t,n=[],r=0,i=0;if(s=!h.sortStable,a=!h.sortStable&&o.call(e,0),k.call(e,q),s){for(;t=e[i++];)t===e[i]&&(r=n.push(i));for(;r--;)j.call(e,n[r],1)}return a=null,e},T.fn.uniqueSort=function(){return this.pushStack(T.uniqueSort(o.apply(this)))},(n=T.expr={cacheLength:50,createPseudo:te,match:z,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(Y,Q),e[3]=(e[3]||e[4]||e[5]||"").replace(Y,Q),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||Z.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&Z.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return z.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&B.test(n)&&(t=ce(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(Y,Q).toLowerCase();return"*"===e?function(){return!0}:function(e){return S(e,t)}},CLASS:function(e){var t=b[e+" "];return t||(t=new RegExp("(^|"+A+")"+e+"("+A+"|$)"))&&b(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=Z.attr(r,e);return null==i?"!="===t:!t||(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i.replace(I," ")+" ").indexOf(n)>-1:"|="===t&&(i===n||i.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,f,p,d,h=o!==a?"nextSibling":"previousSibling",g=t.parentNode,v=s&&t.nodeName.toLowerCase(),x=!u&&!s,b=!1;if(g){if(o){for(;h;){for(f=t;f=f[h];)if(s?S(f,v):1===f.nodeType)return!1;d=h="only"===e&&!d&&"nextSibling"}return!0}if(d=[a?g.firstChild:g.lastChild],a&&x){for(b=(p=(l=(c=g[y]||(g[y]={}))[e]||[])[0]===m&&l[1])&&l[2],f=p&&g.childNodes[p];f=++p&&f&&f[h]||(b=p=0)||d.pop();)if(1===f.nodeType&&++b&&f===t){c[e]=[m,p,b];break}}else if(x&&(b=p=(l=(c=t[y]||(t[y]={}))[e]||[])[0]===m&&l[1]),!1===b)for(;(f=++p&&f&&f[h]||(b=p=0)||d.pop())&&((s?!S(f,v):1!==f.nodeType)||!++b||(x&&((c=f[y]||(f[y]={}))[e]=[m,b]),f!==t)););return(b-=i)===r||b%r==0&&b/r>=0}}},PSEUDO:function(e,t){var r,i=n.pseudos[e]||n.setFilters[e.toLowerCase()]||Z.error("unsupported pseudo: "+e);return i[y]?i(t):i.length>1?(r=[e,e,"",t],n.setFilters.hasOwnProperty(e.toLowerCase())?te(function(e,n){for(var r,o=i(e,t),a=o.length;a--;)e[r=u.call(e,o[a])]=!(n[r]=o[a])}):function(e){return i(e,0,r)}):i}},pseudos:{not:te(function(e){var t=[],n=[],r=ye(e.replace(D,"$1"));return r[y]?te(function(e,t,n,i){for(var o,a=r(e,null,i,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),t[0]=null,!n.pop()}}),has:te(function(e){return function(t){return Z(e,t).length>0}}),contains:te(function(e){return e=e.replace(Y,Q),function(t){return(t.textContent||T.text(t)).indexOf(e)>-1}}),lang:te(function(e){return _.test(e||"")||Z.error("unsupported lang: "+e),e=e.replace(Y,Q).toLowerCase(),function(t){var n;do{if(n=p?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(e){var n=t.location&&t.location.hash;return n&&n.slice(1)===e.id},root:function(e){return e===c},focus:function(e){return e===function(){try{return l.activeElement}catch(e){}}()&&l.hasFocus()&&!!(e.type||e.href||~e.tabIndex)},enabled:oe(!1),disabled:oe(!0),checked:function(e){return S(e,"input")&&!!e.checked||S(e,"option")&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!n.pseudos.empty(e)},header:function(e){return U.test(e.nodeName)}
vendor: 5,681 bytes, line 8
8,input:function(e){return X.test(e.nodeName)},button:function(e){return S(e,"input")&&"button"===e.type||S(e,"button")},text:function(e){var t;return S(e,"input")&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:ae(function(){return[0]}),last:ae(function(e,t){return[t-1]}),eq:ae(function(e,t,n){return[n<0?n+t:n]}),even:ae(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:ae(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:ae(function(e,t,n){var r;for(r=n<0?n+t:n>t?t:n;--r>=0;)e.push(r);return e}),gt:ae(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}}).pseudos.nth=n.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})n.pseudos[e]=re(e);for(e in{submit:!0,reset:!0})n.pseudos[e]=ie(e);function le(){}function ce(e,t){var r,i,o,a,s,u,l,c=w[e+" "];if(c)return t?0:c.slice(0);for(s=e,u=[],l=n.preFilter;s;){for(a in r&&!(i=W.exec(s))||(i&&(s=s.slice(i[0].length)||s),u.push(o=[])),r=!1,(i=F.exec(s))&&(r=i.shift(),o.push({value:r,type:i[0].replace(D," ")}),s=s.slice(r.length)),n.filter)!(i=z[a].exec(s))||l[a]&&!(i=l[a](i))||(r=i.shift(),o.push({value:r,type:a,matches:i}),s=s.slice(r.length));if(!r)break}return t?s.length:s?Z.error(e):w(e,u).slice(0)}function fe(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function pe(e,t,n){var r=t.dir,i=t.next,o=i||r,a=n&&"parentNode"===o,s=x++;return t.first?function(t,n,i){for(;t=t[r];)if(1===t.nodeType||a)return e(t,n,i);return!1}:function(t,n,u){var l,c,f=[m,s];if(u){for(;t=t[r];)if((1===t.nodeType||a)&&e(t,n,u))return!0}else for(;t=t[r];)if(1===t.nodeType||a)if(c=t[y]||(t[y]={}),i&&S(t,i))t=t[r]||t;else{if((l=c[o])&&l[0]===m&&l[1]===s)return f[2]=l[2];if(c[o]=f,f[2]=e(t,n,u))return!0}return!1}}function de(e){return e.length>1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function he(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;s<u;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),l&&t.push(s)));return a}function ge(e,t,n,r,i,o){return r&&!r[y]&&(r=ge(r)),i&&!i[y]&&(i=ge(i,o)),te(function(o,a,s,l){var c,f,p,d,h=[],g=[],y=a.length,m=o||function(e,t,n){for(var r=0,i=t.length;r<i;r++)Z(e,t[r],n);return n}(t||"*",s.nodeType?[s]:s,[]),x=!e||!o&&t?m:he(m,h,e,s,l);if(n?n(x,d=i||(o?e:y||r)?[]:a,s,l):d=x,r)for(c=he(d,g),r(c,[],s,l),f=c.length;f--;)(p=c[f])&&(d[g[f]]=!(x[g[f]]=p));if(o){if(i||e){if(i){for(c=[],f=d.length;f--;)(p=d[f])&&c.push(x[f]=p);i(null,d=[],c,l)}for(f=d.length;f--;)(p=d[f])&&(c=i?u.call(o,p):h[f])>-1&&(o[c]=!(a[c]=p))}}else d=he(d===a?d.splice(y,d.length):d),i?i(null,a,d,l):v.apply(a,d)})}function ve(e){for(var t,r,o,a=e.length,s=n.relative[e[0].type],l=s||n.relative[" "],c=s?1:0,f=pe(function(e){return e===t},l,!0),p=pe(function(e){return u.call(t,e)>-1},l,!0),d=[function(e,n,r){var o=!s&&(r||n!=i)||((t=n).nodeType?f(e,n,r):p(e,n,r));return t=null,o}];c<a;c++)if(r=n.relative[e[c].type])d=[pe(de(d),r)];else{if((r=n.filter[e[c].type].apply(null,e[c].matches))[y]){for(o=++c;o<a&&!n.relative[e[o].type];o++);return ge(c>1&&de(d),c>1&&fe(e.slice(0,c-1).concat({value:" "===e[c-2].type?"*":""})).replace(D,"$1"),r,c<o&&ve(e.slice(c,o)),o<a&&ve(e=e.slice(o)),o<a&&fe(e))}d.push(r)}return de(d)}function ye(e,t){var r,o=[],a=[],s=C[e+" "];if(!s){for(t||(t=ce(e)),r=t.length;r--;)(s=ve(t[r]))[y]?o.push(s):a.push(s);(s=C(e,function(e,t){var r=t.length>0,o=e.length>0,a=function(a,s,u,c,f){var d,h,g,y=0,x="0",b=a&&[],w=[],C=i,S=a||o&&n.find.TAG("*",f),k=m+=null==C?1:Math.random()||.1,j=S.length;for(f&&(i=s==l||s||f);x!==j&&null!=(d=S[x]);x++){if(o&&d){for(h=0,s||d.ownerDocument==l||(ue(d),u=!p);g=e[h++];)if(g(d,s||l,u)){v.call(c,d);break}f&&(m=k)}r&&((d=!g&&d)&&y--,a&&b.push(d))}if(y+=x,r&&x!==y){for(h=0;g=t[h++];)g(b,w,s,u);if(a){if(y>0)for(;x--;)b[x]||w[x]||(w[x]=E.call(c));w=he(w)}v.apply(c,w),f&&!a&&w.length>0&&y+t.length>1&&T.uniqueSort(c)}return f&&(m=k,i=C),b};return r?te(a):a}(a,o))).selector=e}return s}function me(e,t,r,i){var o,a,s,u,l,c="function"==typeof e&&e,f=!i&&ce(e=c.selector||e);if(r=r||[],1===f.length){if((a=f[0]=f[0].slice(0)).length>2&&"ID"===(s=a[0]).type&&9===t.nodeType&&p&&n.relative[a[1].type]){if(!(t=(n.find.ID(s.matches[0].replace(Y,Q),t)||[])[0]))return r;c&&(t=t.parentNode),e=e.slice(a.shift().value.length)}for(o=z.needsContext.test(e)?0:a.length;o--&&(s=a[o],!n.relative[u=s.type]);)if((l=n.find[u])&&(i=l(s.matches[0].replace(Y,Q),G.test(a[0].type)&&se(t.parentNode)||t))){if(a.splice(o,1),!(e=i.length&&fe(a)))return v.apply(r,i),r;break}}return(c||ye(e,f))(i,t,!p,r,!t||G.test(e)&&se(t.parentNode)||t),r}le.prototype=n.filters=n.pseudos,n.setFilters=new le,h.sortStable=y.split("").sort(q).join("")===y,ue(),h.sortDetached=ne(function(e){return 1&e.compareDocumentPosition(l.createElement("fieldset"))}),T.find=Z,T.expr[":"]=T.expr.pseudos,T.unique=T.uniqueSort,Z.compile=ye,Z.select=me,Z.setDocument=ue,Z.tokenize=ce,Z.escape=T.escapeSelector,Z.getText=T.text,Z.isXML=T.isXMLDoc,Z.selectors=T.expr,Z.support=T.support,Z.uniqueSort=T.uniqueSort}();var O=function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&T(e).is(n))break;r.push(e)}return r},P=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},M=T.expr.match.needsContext,R=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function I(e,t,n){return g(t)?T.grep(e,function(e,r){return!!t.call(e,r,e)!==n}):t.nodeType?T.grep(e,function(e){return e===t!==n}):"string"!=typeof t?T.grep(e,function(e){return u.call(t,e)>-1!==n}):T.filter(t,e,n)}T.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?T.find.matchesSelector(r,e)?[r]:[]:T.f
vendor: 4,232 bytes, line 8
8ind.matches(e,T.grep(t,function(e){return 1===e.nodeType}))},T.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(T(e).filter(function(){for(t=0;t<r;t++)if(T.contains(i[t],this))return!0}));for(n=this.pushStack([]),t=0;t<r;t++)T.find(e,i[t],n);return r>1?T.uniqueSort(n):n},filter:function(e){return this.pushStack(I(this,e||[],!1))},not:function(e){return this.pushStack(I(this,e||[],!0))},is:function(e){return!!I(this,"string"==typeof e&&M.test(e)?T(e):e||[],!1).length}});var W,F=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(T.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||W,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:F.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof T?t[0]:t,T.merge(this,T.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:y,!0)),R.test(r[1])&&T.isPlainObject(t))for(r in t)g(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=y.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):g(e)?void 0!==n.ready?n.ready(e):e(T):T.makeArray(e,this)}).prototype=T.fn,W=T(y);var $=/^(?:parents|prev(?:Until|All))/,B={children:!0,contents:!0,next:!0,prev:!0};function _(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}T.fn.extend({has:function(e){var t=T(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(T.contains(this,t[e]))return!0})},closest:function(e,t){var n,r=0,i=this.length,o=[],a="string"!=typeof e&&T(e);if(!M.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?a.index(n)>-1:1===n.nodeType&&T.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?T.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?u.call(T(e),this[0]):u.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(T.uniqueSort(T.merge(this.get(),T(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),T.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return O(e,"parentNode")},parentsUntil:function(e,t,n){return O(e,"parentNode",n)},next:function(e){return _(e,"nextSibling")},prev:function(e){return _(e,"previousSibling")},nextAll:function(e){return O(e,"nextSibling")},prevAll:function(e){return O(e,"previousSibling")},nextUntil:function(e,t,n){return O(e,"nextSibling",n)},prevUntil:function(e,t,n){return O(e,"previousSibling",n)},siblings:function(e){return P((e.parentNode||{}).firstChild,e)},children:function(e){return P(e.firstChild)},contents:function(e){return null!=e.contentDocument&&i(e.contentDocument)?e.contentDocument:(S(e,"template")&&(e=e.content||e),T.merge([],e.childNodes))}},function(e,t){T.fn[e]=function(n,r){var i=T.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=T.filter(r,i)),this.length>1&&(B[e]||T.uniqueSort(i),$.test(e)&&i.reverse()),this.pushStack(i)}});var z=/[^\x20\t\r\n\f]+/g;function X(e){return e}function U(e){throw e}function V(e,t,n,r){var i;try{e&&g(i=e.promise)?i.call(e).done(t).fail(n):e&&g(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}T.Callbacks=function(e){e="string"==typeof e?function(e){var t={};return T.each(e.match(z)||[],function(e,n){t[n]=!0}),t}(e):T.extend({},e);var t,n,r,i,o=[],a=[],s=-1,u=function(){for(i=i||e.once,r=t=!0;a.length;s=-1)for(n=a.shift();++s<o.length;)!1===o[s].apply(n[0],n[1])&&e.stopOnFalse&&(s=o.length,n=!1);e.memory||(n=!1),t=!1,i&&(o=n?[]:"")},l={add:function(){return o&&(n&&!t&&(s=o.length-1,a.push(n)),function t(n){T.each(n,function(n,r){g(r)?e.unique&&l.has(r)||o.push(r):r&&r.length&&"string"!==b(r)&&t(r)})}(arguments),n&&!t&&u()),this},remove:function(){return T.each(arguments,function(e,t){for(var n;(n=T.inArray(t,o,n))>-1;)o.splice(n,1),n<=s&&s--}),this},has:function(e){return e?T.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=a=[],o=n="",this},disabled:function(){return!o},lock:function(){return i=a=[],n||t||(o=n=""),this},locked:function(){return!!i}
vendor: 4,743 bytes, line 8
8,fireWith:function(e,n){return i||(n=[e,(n=n||[]).slice?n.slice():n],a.push(n),t||u()),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!r}};return l},T.extend({Deferred:function(e){var n=[["notify","progress",T.Callbacks("memory"),T.Callbacks("memory"),2],["resolve","done",T.Callbacks("once memory"),T.Callbacks("once memory"),0,"resolved"],["reject","fail",T.Callbacks("once memory"),T.Callbacks("once memory"),1,"rejected"]],r="pending",i={state:function(){return r},always:function(){return o.done(arguments).fail(arguments),this},catch:function(e){return i.then(null,e)},pipe:function(){var e=arguments;return T.Deferred(function(t){T.each(n,function(n,r){var i=g(e[r[4]])&&e[r[4]];o[r[1]](function(){var e=i&&i.apply(this,arguments);e&&g(e.promise)?e.promise().progress(t.notify).done(t.resolve).fail(t.reject):t[r[0]+"With"](this,i?[e]:arguments)})}),e=null}).promise()},then:function(e,r,i){var o=0;function a(e,n,r,i){return function(){var s=this,u=arguments,l=function(){var t,l;if(!(e<o)){if((t=r.apply(s,u))===n.promise())throw new TypeError("Thenable self-resolution");l=t&&("object"==typeof t||"function"==typeof t)&&t.then,g(l)?i?l.call(t,a(o,n,X,i),a(o,n,U,i)):(o++,l.call(t,a(o,n,X,i),a(o,n,U,i),a(o,n,X,n.notifyWith))):(r!==X&&(s=void 0,u=[t]),(i||n.resolveWith)(s,u))}},c=i?l:function(){try{l()}catch(t){T.Deferred.exceptionHook&&T.Deferred.exceptionHook(t,c.error),e+1>=o&&(r!==U&&(s=void 0,u=[t]),n.rejectWith(s,u))}};e?c():(T.Deferred.getErrorHook?c.error=T.Deferred.getErrorHook():T.Deferred.getStackHook&&(c.error=T.Deferred.getStackHook()),t.setTimeout(c))}}return T.Deferred(function(t){n[0][3].add(a(0,t,g(i)?i:X,t.notifyWith)),n[1][3].add(a(0,t,g(e)?e:X)),n[2][3].add(a(0,t,g(r)?r:U))}).promise()},promise:function(e){return null!=e?T.extend(e,i):i}},o={};return T.each(n,function(e,t){var a=t[2],s=t[5];i[t[1]]=a.add,s&&a.add(function(){r=s},n[3-e][2].disable,n[3-e][3].disable,n[0][2].lock,n[0][3].lock),a.add(t[3].fire),o[t[0]]=function(){return o[t[0]+"With"](this===o?void 0:this,arguments),this},o[t[0]+"With"]=a.fireWith}),i.promise(o),e&&e.call(o,o),o},when:function(e){var t=arguments.length,n=t,r=Array(n),i=o.call(arguments),a=T.Deferred(),s=function(e){return function(n){r[e]=this,i[e]=arguments.length>1?o.call(arguments):n,--t||a.resolveWith(r,i)}};if(t<=1&&(V(e,a.done(s(n)).resolve,a.reject,!t),"pending"===a.state()||g(i[n]&&i[n].then)))return a.then();for(;n--;)V(i[n],s(n),a.reject);return a.promise()}});var G=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;T.Deferred.exceptionHook=function(e,n){t.console&&t.console.warn&&e&&G.test(e.name)&&t.console.warn("jQuery.Deferred exception: "+e.message,e.stack,n)},T.readyException=function(e){t.setTimeout(function(){throw e})};var Y=T.Deferred();function Q(){y.removeEventListener("DOMContentLoaded",Q),t.removeEventListener("load",Q),T.ready()}T.fn.ready=function(e){return Y.then(e).catch(function(e){T.readyException(e)}),this},T.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--T.readyWait:T.isReady)||(T.isReady=!0,!0!==e&&--T.readyWait>0||Y.resolveWith(y,[T]))}}),T.ready.then=Y.then,"complete"===y.readyState||"loading"!==y.readyState&&!y.documentElement.doScroll?t.setTimeout(T.ready):(y.addEventListener("DOMContentLoaded",Q),t.addEventListener("load",Q));var J=function(e,t,n,r,i,o,a){var s=0,u=e.length,l=null==n;if("object"===b(n))for(s in i=!0,n)J(e,t,s,n[s],!0,o,a);else if(void 0!==r&&(i=!0,g(r)||(a=!0),l&&(a?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(T(e),n)})),t))for(;s<u;s++)t(e[s],n,a?r:r.call(e[s],s,t(e[s],n)));return i?e:l?t.call(e):u?t(e[0],n):o},K=/^-ms-/,Z=/-([a-z])/g;function ee(e,t){return t.toUpperCase()}function te(e){return e.replace(K,"ms-").replace(Z,ee)}var ne=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function re(){this.expando=T.expando+re.uid++}re.uid=1,re.prototype={cache:function(e){var t=e[this.expando];return t||(t={},ne(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[te(t)]=n;else for(r in t)i[te(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][te(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){n=(t=Array.isArray(t)?t.map(te):(t=te(t))in r?[t]:t.match(z)||[]).length;for(;n--;)delete r[t[n]]}(void 0===t||T.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!T.isEmptyObject(t)}};
vendor: 4,389 bytes, line 8
8var ie=new re,oe=new re,ae=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,se=/[A-Z]/g;function ue(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(se,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n=function(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:ae.test(e)?JSON.parse(e):e)}(n)}catch(i){}oe.set(e,t,n)}else n=void 0;return n}T.extend({hasData:function(e){return oe.hasData(e)||ie.hasData(e)},data:function(e,t,n){return oe.access(e,t,n)},removeData:function(e,t){oe.remove(e,t)},_data:function(e,t,n){return ie.access(e,t,n)},_removeData:function(e,t){ie.remove(e,t)}}),T.fn.extend({data:function(e,t){var n,r,i,o=this[0],a=o&&o.attributes;if(void 0===e){if(this.length&&(i=oe.get(o),1===o.nodeType&&!ie.get(o,"hasDataAttrs"))){for(n=a.length;n--;)a[n]&&0===(r=a[n].name).indexOf("data-")&&(r=te(r.slice(5)),ue(o,r,i[r]));ie.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof e?this.each(function(){oe.set(this,e)}):J(this,function(t){var n;if(o&&void 0===t)return void 0!==(n=oe.get(o,e))?n:void 0!==(n=ue(o,e))?n:void 0;this.each(function(){oe.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){oe.remove(this,e)})}}),T.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=ie.get(e,t),n&&(!r||Array.isArray(n)?r=ie.access(e,t,T.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=T.queue(e,t),r=n.length,i=n.shift(),o=T._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,function(){T.dequeue(e,t)},o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return ie.get(e,n)||ie.access(e,n,{empty:T.Callbacks("once memory").add(function(){ie.remove(e,[t+"queue",n])})})}}),T.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?T.queue(this[0],e):void 0===t?this:this.each(function(){var n=T.queue(this,e,t);T._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&T.dequeue(this,e)})},dequeue:function(e){return this.each(function(){T.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=T.Deferred(),o=this,a=this.length,s=function(){--r||i.resolveWith(o,[o])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";a--;)(n=ie.get(o[a],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}});var le=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ce=new RegExp("^(?:([+-])=|)("+le+")([a-z%]*)$","i"),fe=["Top","Right","Bottom","Left"],pe=y.documentElement,de=function(e){return T.contains(e.ownerDocument,e)},he={composed:!0};pe.getRootNode&&(de=function(e){return T.contains(e.ownerDocument,e)||e.getRootNode(he)===e.ownerDocument});var ge=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&de(e)&&"none"===T.css(e,"display")};function ve(e,t,n,r){var i,o,a=20,s=r?function(){return r.cur()}:function(){return T.css(e,t,"")},u=s(),l=n&&n[3]||(T.cssNumber[t]?"":"px"),c=e.nodeType&&(T.cssNumber[t]||"px"!==l&&+u)&&ce.exec(T.css(e,t));if(c&&c[3]!==l){for(u/=2,l=l||c[3],c=+u||1;a--;)T.style(e,t,c+l),(1-o)*(1-(o=s()/u||.5))<=0&&(a=0),c/=o;c*=2,T.style(e,t,c+l),n=n||[]}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}var ye={};function me(e){var t,n=e.ownerDocument,r=e.nodeName,i=ye[r];return i||(t=n.body.appendChild(n.createElement(r)),i=T.css(t,"display"),t.parentNode.removeChild(t),"none"===i&&(i="block"),ye[r]=i,i)}function xe(e,t){for(var n,r,i=[],o=0,a=e.length;o<a;o++)(r=e[o]).style&&(n=r.style.display,t?("none"===n&&(i[o]=ie.get(r,"display")||null,i[o]||(r.style.display="")),""===r.style.display&&ge(r)&&(i[o]=me(r))):"none"!==n&&(i[o]="none",ie.set(r,"display",n)));for(o=0;o<a;o++)null!=i[o]&&(e[o].style.display=i[o]);return e}T.fn.extend({show:function(){return xe(this,!0)},hide:function(){return xe(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){ge(this)?T(this).show():T(this).hide()})}});var be,we,Te=/^(?:checkbox|radio)$/i,Ce=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,Se=/^$|^module$|\/(?:java|ecma)script/i;be=y.createDocumentFragment().appendChild(y.createElement("div")),(we=y.createElement("input")).setAttribute("type","radio"),we.setAttribute("checked","checked"),we.setAttribute("name","t"),be.appendChild(we),h.checkClone
vendor: 5,712 bytes, line 8
8=be.cloneNode(!0).cloneNode(!0).lastChild.checked,be.innerHTML="<textarea>x</textarea>",h.noCloneChecked=!!be.cloneNode(!0).lastChild.defaultValue,be.innerHTML="<option></option>",h.option=!!be.lastChild;var Ee={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function ke(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&S(e,t)?T.merge([e],n):n}function je(e,t){for(var n=0,r=e.length;n<r;n++)ie.set(e[n],"globalEval",!t||ie.get(t[n],"globalEval"))}Ee.tbody=Ee.tfoot=Ee.colgroup=Ee.caption=Ee.thead,Ee.th=Ee.td,h.option||(Ee.optgroup=Ee.option=[1,"<select multiple='multiple'>","</select>"]);var Ae=/<|&#?\w+;/;function De(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d<h;d++)if((o=e[d])||0===o)if("object"===b(o))T.merge(p,o.nodeType?[o]:o);else if(Ae.test(o)){for(a=a||f.appendChild(t.createElement("div")),s=(Ce.exec(o)||["",""])[1].toLowerCase(),u=Ee[s]||Ee._default,a.innerHTML=u[1]+T.htmlPrefilter(o)+u[2],c=u[0];c--;)a=a.lastChild;T.merge(p,a.childNodes),(a=f.firstChild).textContent=""}else p.push(t.createTextNode(o));for(f.textContent="",d=0;o=p[d++];)if(r&&T.inArray(o,r)>-1)i&&i.push(o);else if(l=de(o),a=ke(f.appendChild(o),"script"),l&&je(a),n)for(c=0;o=a[c++];)Se.test(o.type||"")&&n.push(o);return f}var Ne=/^([^.]*)(?:\.(.+)|)/;function qe(){return!0}function Le(){return!1}function He(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)He(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Le;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return T().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=T.guid++)),e.each(function(){T.event.add(this,t,i,r,n)})}function Oe(e,t,n){n?(ie.set(e,t,!1),T.event.add(e,t,{namespace:!1,handler:function(e){var n,r=ie.get(this,t);if(1&e.isTrigger&&this[t]){if(r)(T.event.special[t]||{}).delegateType&&e.stopPropagation();else if(r=o.call(arguments),ie.set(this,t,r),this[t](),n=ie.get(this,t),ie.set(this,t,!1),r!==n)return e.stopImmediatePropagation(),e.preventDefault(),n}else r&&(ie.set(this,t,T.event.trigger(r[0],r.slice(1),this)),e.stopPropagation(),e.isImmediatePropagationStopped=qe)}})):void 0===ie.get(e,t)&&T.event.add(e,t,qe)}T.event={global:{},add:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=ie.get(e);if(ne(e))for(n.handler&&(n=(o=n).handler,i=o.selector),i&&T.find.matchesSelector(pe,i),n.guid||(n.guid=T.guid++),(u=v.events)||(u=v.events=Object.create(null)),(a=v.handle)||(a=v.handle=function(t){return void 0!==T&&T.event.triggered!==t.type?T.event.dispatch.apply(e,arguments):void 0}),l=(t=(t||"").match(z)||[""]).length;l--;)d=g=(s=Ne.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=T.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=T.event.special[d]||{},c=T.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&T.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(e,r,h,a)||e.addEventListener&&e.addEventListener(d,a)),f.add&&(f.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),T.event.global[d]=!0)},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=ie.hasData(e)&&ie.get(e);if(v&&(u=v.events)){for(l=(t=(t||"").match(z)||[""]).length;l--;)if(d=g=(s=Ne.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d){for(f=T.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;o--;)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||T.removeEvent(e,d,v.handle),delete u[d])}else for(d in u)T.event.remove(e,d+t[l],n,r,!0);T.isEmptyObject(u)&&ie.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=new Array(arguments.length),u=T.event.fix(e),l=(ie.get(this,"events")||Object.create(null))[u.type]||[],c=T.event.special[u.type]||{};for(s[0]=u,t=1;t<arguments.length;t++)s[t]=arguments[t];if(u.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,u)){for(a=T.event.handlers.call(this,u,l),t=0;(i=a[t++])&&!u.isPropagationStopped();)for(u.currentTarget=i.elem,n=0;(o=i.handlers[n++])&&!u.isImmediatePropagationStopped();)u.rnamespace&&!1!==o.namespace&&!u.rnamespace.test(o.namespace)||(u.handleObj=o,u.data=o.data,void 0!==(r=((T.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,s))&&!1===(u.result=r)&&(u.preventDefault(),u.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,u),u.result}},handlers:function(e,t){var n,r,i,o,a,s=[],u=t.delegateCount,l=e.target;if(u&&l.nodeType&&!("click"===e.type&&e.button>=1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(o=[],a={},n=0;n<u;n++)void 0===a[i=(r=t[n]).selector+" "]&&(a[i]=r.needsContext?T(i,this).index(l)>-1:T.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,u<t.length&&s.push({elem:l,handlers:t.slice(u)}),s},addProp:function(e,t){Object.defineProperty(T.Event.prototype,e,{enumerable:!0,configurable:!0,get:g(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]}
vendor: 8,219 bytes, line 8
8,set:function(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(e){return e[T.expando]?e:new T.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return Te.test(t.type)&&t.click&&S(t,"input")&&Oe(t,"click",!0),!1},trigger:function(e){var t=this||e;return Te.test(t.type)&&t.click&&S(t,"input")&&Oe(t,"click"),!0},_default:function(e){var t=e.target;return Te.test(t.type)&&t.click&&S(t,"input")&&ie.get(t,"click")||S(t,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},T.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},T.Event=function(e,t){if(!(this instanceof T.Event))return new T.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?qe:Le,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&T.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[T.expando]=!0},T.Event.prototype={constructor:T.Event,isDefaultPrevented:Le,isPropagationStopped:Le,isImmediatePropagationStopped:Le,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=qe,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=qe,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=qe,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},T.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},T.event.addProp),T.each({focus:"focusin",blur:"focusout"},function(e,t){function n(e){if(y.documentMode){var n=ie.get(this,"handle"),r=T.event.fix(e);r.type="focusin"===e.type?"focus":"blur",r.isSimulated=!0,n(e),r.target===r.currentTarget&&n(r)}else T.event.simulate(t,e.target,T.event.fix(e))}T.event.special[e]={setup:function(){var r;if(Oe(this,e,!0),!y.documentMode)return!1;(r=ie.get(this,t))||this.addEventListener(t,n),ie.set(this,t,(r||0)+1)},trigger:function(){return Oe(this,e),!0},teardown:function(){var e;if(!y.documentMode)return!1;(e=ie.get(this,t)-1)?ie.set(this,t,e):(this.removeEventListener(t,n),ie.remove(this,t))},_default:function(t){return ie.get(t.target,e)},delegateType:t},T.event.special[t]={setup:function(){var r=this.ownerDocument||this.document||this,i=y.documentMode?this:r,o=ie.get(i,t);o||(y.documentMode?this.addEventListener(t,n):r.addEventListener(e,n,!0)),ie.set(i,t,(o||0)+1)},teardown:function(){var r=this.ownerDocument||this.document||this,i=y.documentMode?this:r,o=ie.get(i,t)-1;o?ie.set(i,t,o):(y.documentMode?this.removeEventListener(t,n):r.removeEventListener(e,n,!0),ie.remove(i,t))}}}),T.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){T.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=e.relatedTarget,i=e.handleObj;return r&&(r===this||T.contains(this,r))||(e.type=i.origType,n=i.handler.apply(this,arguments),e.type=t),n}}}),T.fn.extend({on:function(e,t,n,r){return He(this,e,t,n,r)},one:function(e,t,n,r){return He(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,T(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=Le),this.each(function(){T.event.remove(this,e,n,t)})}});var Pe=/<script|<style|<link/i,Me=/checked\s*(?:[^=]|=\s*.checked.)/i,Re=/^\s*<!\[CDATA\[|\]\]>\s*$/g;function Ie(e,t){return S(e,"table")&&S(11!==t.nodeType?t:t.firstChild,"tr")&&T(e).children("tbody")[0]||e}function We(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Fe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function $e(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(ie.hasData(e)&&(s=ie.get(e).events))for(i in ie.remove(t,"handle events"),s)for(n=0,r=s[i].length;n<r;n++)T.event.add(t,i,s[i][n]);oe.hasData(e)&&(o=oe.access(e),a=T.extend({},o),oe.set(t,a))}}function Be(e,t,n,r){t=a(t);var i,o,s,u,l,c,f=0,p=e.length,d=p-1,v=t[0],y=g(v);if(y||p>1&&"string"==typeof v&&!h.checkClone&&Me.test(v))return e.each(function(i){var o=e.eq(i);y&&(t[0]=v.call(this,i,o.html())),Be(o,t,n,r)});if(p&&(o=(i=De(t,e[0].ownerDocument,!1,e,r)).firstChild,1===i.childNodes.length&&(i=o),o||r)){for(u=(s=T.map(ke(i,"script"),We)).length;f<p;f++)l=i,f!==d&&(l=T.clone(l,!0,!0),u&&T.merge(s,ke(l,"script"))),n.call(e[f],l,f);if(u)for(c=s[s.length-1].ownerDocument,T.map(s,Fe),f=0;f<u;f++)l=s[f],Se.test(l.type||"")&&!ie.access(l,"globalEval")&&T.contains(c,l)&&(l.src&&"module"!==(l.type||"").toLowerCase()?T._evalUrl&&!l.noModule&&T._evalUrl(l.src,{nonce:l.nonce||l.getAttribute("nonce")},c):x(l.textContent.replace(Re,""),l,c))}return e}function _e(e,t,n){for(var r,i=t?T.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||T.cleanData(ke(r)),r.parentNode&&(n&&de(r)&&je(ke(r,"script")),r.parentNode.removeChild(r));return e}T.extend({htmlPrefilter:function(e){return e},clone:function(e,t,n){var r,i,o,a,s,u,l,c=e.cloneNode(!0),f=de(e);if(!(h.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||T.isXMLDoc(e)))for(a=ke(c),r=0,i=(o=ke(e)).length;r<i;r++)s=o[r],u=a[r],l=void 0,"input"===(l=u.nodeName.toLowerCase())&&Te.test(s.type)?u.checked=s.checked:"input"!==l&&"textarea"!==l||(u.defaultValue=s.defaultValue);if(t)if(n)for(o=o||ke(e),a=a||ke(c),r=0,i=o.length;r<i;r++)$e(o[r],a[r]);else $e(e,c);return(a=ke(c,"script")).length>0&&je(a,!f&&ke(e,"script")),c},cleanData:function(e){for(var t,n,r,i=T.event.special,o=0;void 0!==(n=e[o]);o++)if(ne(n)){if(t=n[ie.expando]){if(t.events)for(r in t.events)i[r]?T.event.remove(n,r):T.removeEvent(n,r,t.handle);n[ie.expando]=void 0}n[oe.expando]&&(n[oe.expando]=void 0)}}}),T.fn.extend({detach:function(e){return _e(this,e,!0)},remove:function(e){return _e(this,e)},text:function(e){return J(this,function(e){return void 0===e?T.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return Be(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Ie(this,e).appendChild(e)})},prepend:function(){return Be(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Ie(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return Be(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return Be(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(T.cleanData(ke(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return T.clone(this,e,t)})},html:function(e){return J(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Pe.test(e)&&!Ee[(Ce.exec(e)||["",""])[1].toLowerCase()]){e=T.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(T.cleanData(ke(t,!1)),t.innerHTML=e);t=0}catch(i){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=[];return Be(this,arguments,function(t){var n=this.parentNode;T.inArray(this,e)<0&&(T.cleanData(ke(this)),n&&n.replaceChild(t,this))},e)}}),T.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){T.fn[e]=function(e){for(var n,r=[],i=T(e),o=i.length-1,a=0;a<=o;
vendor: 8,024 bytes, line 8
8a++)n=a===o?this:this.clone(!0),T(i[a])[t](n),s.apply(r,n.get());return this.pushStack(r)}});var ze=new RegExp("^("+le+")(?!px)[a-z%]+$","i"),Xe=/^--/,Ue=function(e){var n=e.ownerDocument.defaultView;return n&&n.opener||(n=t),n.getComputedStyle(e)},Ve=function(e,t,n){var r,i,o={};for(i in t)o[i]=e.style[i],e.style[i]=t[i];for(i in r=n.call(e),t)e.style[i]=o[i];return r},Ge=new RegExp(fe.join("|"),"i");function Ye(e,t,n){var r,i,o,a,s=Xe.test(t),u=e.style;return(n=n||Ue(e))&&(a=n.getPropertyValue(t)||n[t],s&&a&&(a=a.replace(D,"$1")||void 0),""!==a||de(e)||(a=T.style(e,t)),!h.pixelBoxStyles()&&ze.test(a)&&Ge.test(t)&&(r=u.width,i=u.minWidth,o=u.maxWidth,u.minWidth=u.maxWidth=u.width=a,a=n.width,u.width=r,u.minWidth=i,u.maxWidth=o)),void 0!==a?a+"":a}function Qe(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}!function(){function e(){if(c){l.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",c.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",pe.appendChild(l).appendChild(c);var e=t.getComputedStyle(c);r="1%"!==e.top,u=12===n(e.marginLeft),c.style.right="60%",a=36===n(e.right),i=36===n(e.width),c.style.position="absolute",o=12===n(c.offsetWidth/3),pe.removeChild(l),c=null}}function n(e){return Math.round(parseFloat(e))}var r,i,o,a,s,u,l=y.createElement("div"),c=y.createElement("div");c.style&&(c.style.backgroundClip="content-box",c.cloneNode(!0).style.backgroundClip="",h.clearCloneStyle="content-box"===c.style.backgroundClip,T.extend(h,{boxSizingReliable:function(){return e(),i},pixelBoxStyles:function(){return e(),a},pixelPosition:function(){return e(),r},reliableMarginLeft:function(){return e(),u},scrollboxSize:function(){return e(),o},reliableTrDimensions:function(){var e,n,r,i;return null==s&&(e=y.createElement("table"),n=y.createElement("tr"),r=y.createElement("div"),e.style.cssText="position:absolute;left:-11111px;border-collapse:separate",n.style.cssText="box-sizing:content-box;border:1px solid",n.style.height="1px",r.style.height="9px",r.style.display="block",pe.appendChild(e).appendChild(n).appendChild(r),i=t.getComputedStyle(n),s=parseInt(i.height,10)+parseInt(i.borderTopWidth,10)+parseInt(i.borderBottomWidth,10)===n.offsetHeight,pe.removeChild(e)),s}}))}();var Je=["Webkit","Moz","ms"],Ke=y.createElement("div").style,Ze={};function et(e){var t=T.cssProps[e]||Ze[e];return t||(e in Ke?e:Ze[e]=function(e){for(var t=e[0].toUpperCase()+e.slice(1),n=Je.length;n--;)if((e=Je[n]+t)in Ke)return e}(e)||e)}var tt=/^(none|table(?!-c[ea]).+)/,nt={position:"absolute",visibility:"hidden",display:"block"},rt={letterSpacing:"0",fontWeight:"400"};function it(e,t,n){var r=ce.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function ot(e,t,n,r,i,o){var a="width"===t?1:0,s=0,u=0,l=0;if(n===(r?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(l+=T.css(e,n+fe[a],!0,i)),r?("content"===n&&(u-=T.css(e,"padding"+fe[a],!0,i)),"margin"!==n&&(u-=T.css(e,"border"+fe[a]+"Width",!0,i))):(u+=T.css(e,"padding"+fe[a],!0,i),"padding"!==n?u+=T.css(e,"border"+fe[a]+"Width",!0,i):s+=T.css(e,"border"+fe[a]+"Width",!0,i));return!r&&o>=0&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-u-s-.5))||0),u+l}function at(e,t,n){var r=Ue(e),i=(!h.boxSizingReliable()||n)&&"border-box"===T.css(e,"boxSizing",!1,r),o=i,a=Ye(e,t,r),s="offset"+t[0].toUpperCase()+t.slice(1);if(ze.test(a)){if(!n)return a;a="auto"}return(!h.boxSizingReliable()&&i||!h.reliableTrDimensions()&&S(e,"tr")||"auto"===a||!parseFloat(a)&&"inline"===T.css(e,"display",!1,r))&&e.getClientRects().length&&(i="border-box"===T.css(e,"boxSizing",!1,r),(o=s in e)&&(a=e[s])),(a=parseFloat(a)||0)+ot(e,t,n||(i?"border":"content"),o,r,a)+"px"}function st(e,t,n,r,i){return new st.prototype.init(e,t,n,r,i)}T.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Ye(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,aspectRatio:!0,borderImageSlice:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,scale:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeMiterlimit:!0,strokeOpacity:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=te(t),u=Xe.test(t),l=e.style;if(u||(t=et(s)),a=T.cssHooks[t]||T.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:l[t];"string"===(o=typeof n)&&(i=ce.exec(n))&&i[1]&&(n=ve(e,t,i),o="number"),null!=n&&n==n&&("number"!==o||u||(n+=i&&i[3]||(T.cssNumber[s]?"":"px")),h.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(u?l.setProperty(t,n):l[t]=n))}},css:function(e,t,n,r){var i,o,a,s=te(t);return Xe.test(t)||(t=et(s)),(a=T.cssHooks[t]||T.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=Ye(e,t,r)),"normal"===i&&t in rt&&(i=rt[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),T.each(["height","width"],function(e,t){T.cssHooks[t]={get:function(e,n,r){if(n)return!tt.test(T.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?at(e,t,r):Ve(e,nt,function(){return at(e,t,r)})},set:function(e,n,r){var i,o=Ue(e),a=!h.scrollboxSize()&&"absolute"===o.position,s=(a||r)&&"border-box"===T.css(e,"boxSizing",!1,o),u=r?ot(e,t,r,s,o):0;return s&&a&&(u-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(o[t])-ot(e,t,"border",!1,o)-.5)),u&&(i=ce.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=T.css(e,t)),it(0,n,u)}}}),T.cssHooks.marginLeft=Qe(h.reliableMarginLeft,function(e,t){if(t)return(parseFloat(Ye(e,"marginLeft"))||e.getBoundingClientRect().left-Ve(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),T.each({margin:"",padding:"",border:"Width"},function(e,t){T.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+fe[r]+t]=o[r]||o[r-2]||o[0];return i}},"margin"!==e&&(T.cssHooks[e+t].set=it)}),T.fn.extend({css:function(e,t){return J(this,function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=Ue(e),i=t.length;a<i;a++)o[t[a]]=T.css(e,t[a],!1,r);return o}return void 0!==n?T.style(e,t,n):T.css(e,t)},e,t,arguments.length>1)}}),T.Tween=st,st.prototype={constructor:st,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||T.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(T.cssNumber[n]?"":"px")},cur:function(){var e=st.propHooks[this.prop];return e&&e.get?e.get(this):st.propHooks._default.get(this)},run:function(e){var t,n=st.propHooks[this.prop];return this.options.duration?this.pos=t=T.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):st.propHooks._default.set(this),this}},st.prototype.init.prototype=st.prototype,st.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=T.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){T.fx.step[e.prop]?T.fx.step[e.prop](e):1!==e.elem.nodeType||!T.cssHooks[e.prop]&&null==e.elem.style[et(e.prop)]?e.elem[e.prop]=e.now:T.style(e.elem,e.prop,e.now+e.unit)}}},st.propHooks.scrollTop=st.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},T.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},T.fx=st.prototype.init,T.fx.step={};var ut,lt,ct=/^(?:toggle|show|hide)$/,ft=/queueHooks$/;function pt(){lt&&(!1===y.hidden&&t.requestAnimationFrame?t.requestAnimationFrame(pt):t.setTimeout(pt,T.fx.interval),T.fx.tick())}function dt(){return t.setTimeout(function(){ut=void 0}
vendor: 5,011 bytes, line 8
8),ut=Date.now()}function ht(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=fe[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function gt(e,t,n){for(var r,i=(vt.tweeners[t]||[]).concat(vt.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,t,e))return r}function vt(e,t,n){var r,i,o=0,a=vt.prefilters.length,s=T.Deferred().always(function(){delete u.elem}),u=function(){if(i)return!1;for(var t=ut||dt(),n=Math.max(0,l.startTime+l.duration-t),r=1-(n/l.duration||0),o=0,a=l.tweens.length;o<a;o++)l.tweens[o].run(r);return s.notifyWith(e,[l,r,n]),r<1&&a?n:(a||s.notifyWith(e,[l,1,0]),s.resolveWith(e,[l]),!1)},l=s.promise({elem:e,props:T.extend({},t),opts:T.extend(!0,{specialEasing:{},easing:T.easing._default},n),originalProperties:t,originalOptions:n,startTime:ut||dt(),duration:n.duration,tweens:[],createTween:function(t,n){var r=T.Tween(e,l.opts,t,n,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(r),r},stop:function(t){var n=0,r=t?l.tweens.length:0;if(i)return this;for(i=!0;n<r;n++)l.tweens[n].run(1);return t?(s.notifyWith(e,[l,1,0]),s.resolveWith(e,[l,t])):s.rejectWith(e,[l,t]),this}}),c=l.props;for(!function(e,t){var n,r,i,o,a;for(n in e)if(i=t[r=te(n)],o=e[n],Array.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(a=T.cssHooks[r])&&"expand"in a)for(n in o=a.expand(o),delete e[r],o)n in e||(e[n]=o[n],t[n]=i);else t[r]=i}(c,l.opts.specialEasing);o<a;o++)if(r=vt.prefilters[o].call(l,e,c,l.opts))return g(r.stop)&&(T._queueHooks(l.elem,l.opts.queue).stop=r.stop.bind(r)),r;return T.map(c,gt,l),g(l.opts.start)&&l.opts.start.call(e,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),T.fx.timer(T.extend(u,{elem:e,anim:l,queue:l.opts.queue})),l}T.Animation=T.extend(vt,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return ve(n.elem,e,ce.exec(t),n),n}]},tweener:function(e,t){g(e)?(t=e,e=["*"]):e=e.match(z);for(var n,r=0,i=e.length;r<i;r++)n=e[r],vt.tweeners[n]=vt.tweeners[n]||[],vt.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var r,i,o,a,s,u,l,c,f="width"in t||"height"in t,p=this,d={},h=e.style,g=e.nodeType&&ge(e),v=ie.get(e,"fxshow");for(r in n.queue||(null==(a=T._queueHooks(e,"fx")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,p.always(function(){p.always(function(){a.unqueued--,T.queue(e,"fx").length||a.empty.fire()})})),t)if(i=t[r],ct.test(i)){if(delete t[r],o=o||"toggle"===i,i===(g?"hide":"show")){if("show"!==i||!v||void 0===v[r])continue;g=!0}d[r]=v&&v[r]||T.style(e,r)}if((u=!T.isEmptyObject(t))||!T.isEmptyObject(d))for(r in f&&1===e.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],null==(l=v&&v.display)&&(l=ie.get(e,"display")),"none"===(c=T.css(e,"display"))&&(l?c=l:(xe([e],!0),l=e.style.display||l,c=T.css(e,"display"),xe([e]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===T.css(e,"float")&&(u||(p.done(function(){h.display=l}),null==l&&(c=h.display,l="none"===c?"":c)),h.display="inline-block")),n.overflow&&(h.overflow="hidden",p.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]})),u=!1,d)u||(v?"hidden"in v&&(g=v.hidden):v=ie.access(e,"fxshow",{display:l}),o&&(v.hidden=!g),g&&xe([e],!0),p.done(function(){for(r in g||xe([e]),ie.remove(e,"fxshow"),d)T.style(e,r,d[r])})),u=gt(g?v[r]:0,r,p),r in v||(v[r]=u.start,g&&(u.end=u.start,u.start=0))}],prefilter:function(e,t){t?vt.prefilters.unshift(e):vt.prefilters.push(e)}}),T.speed=function(e,t,n){var r=e&&"object"==typeof e?T.extend({},e):{complete:n||!n&&t||g(e)&&e,duration:e,easing:n&&t||t&&!g(t)&&t};return T.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in T.fx.speeds?r.duration=T.fx.speeds[r.duration]:r.duration=T.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){g(r.old)&&r.old.call(this),r.queue&&T.dequeue(this,r.queue)},r},T.fn.extend({fadeTo:function(e,t,n,r){return this.filter(ge).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=T.isEmptyObject(e),o=T.speed(t,n,r),a=function(){var t=vt(this,T.extend({},e),o);(i||ie.get(this,"finish"))&&t.stop(!0)};return a.finish=a,i||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(e,t,n){var r=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&this.queue(e||"fx",[]),this.each(function(){var t=!0,i=null!=e&&e+"queueHooks",o=T.timers,a=ie.get(this);if(i)a[i]&&a[i].stop&&r(a[i]);else for(i in a)a[i]&&a[i].stop&&ft.test(i)&&r(a[i]);for(i=o.length;i--;)o[i].elem!==this||null!=e&&o[i].queue!==e||(o[i].anim.stop(n),t=!1,o.splice(i,1));!t&&n||T.dequeue(this,e)})},finish:function(e){return!1!==e&&(e=e||"fx"),this.each(function(){var t,n=ie.get(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=T.timers,a=r?r.length:0;for(n.finish=!0,T.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1)
vendor: 7,077 bytes, line 8
8);for(t=0;t<a;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}}),T.each(["toggle","show","hide"],function(e,t){var n=T.fn[t];T.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(ht(t,!0),e,r,i)}}),T.each({slideDown:ht("show"),slideUp:ht("hide"),slideToggle:ht("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){T.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),T.timers=[],T.fx.tick=function(){var e,t=0,n=T.timers;for(ut=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||T.fx.stop(),ut=void 0},T.fx.timer=function(e){T.timers.push(e),T.fx.start()},T.fx.interval=13,T.fx.start=function(){lt||(lt=!0,pt())},T.fx.stop=function(){lt=null},T.fx.speeds={slow:600,fast:200,_default:400},T.fn.delay=function(e,n){return e=T.fx&&T.fx.speeds[e]||e,n=n||"fx",this.queue(n,function(n,r){var i=t.setTimeout(n,e);r.stop=function(){t.clearTimeout(i)}})},function(){var e=y.createElement("input"),t=y.createElement("select").appendChild(y.createElement("option"));e.type="checkbox",h.checkOn=""!==e.value,h.optSelected=t.selected,(e=y.createElement("input")).value="t",e.type="radio",h.radioValue="t"===e.value}();var yt,mt=T.expr.attrHandle;T.fn.extend({attr:function(e,t){return J(this,T.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){T.removeAttr(this,e)})}}),T.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?T.prop(e,t,n):(1===o&&T.isXMLDoc(e)||(i=T.attrHooks[t.toLowerCase()]||(T.expr.match.bool.test(t)?yt:void 0)),void 0!==n?null===n?void T.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=T.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!h.radioValue&&"radio"===t&&S(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(z);if(i&&1===e.nodeType)for(;n=i[r++];)e.removeAttribute(n)}}),yt={set:function(e,t,n){return!1===t?T.removeAttr(e,n):e.setAttribute(n,n),n}},T.each(T.expr.match.bool.source.match(/\w+/g),function(e,t){var n=mt[t]||T.find.attr;mt[t]=function(e,t,r){var i,o,a=t.toLowerCase();return r||(o=mt[a],mt[a]=i,i=null!=n(e,t,r)?a:null,mt[a]=o),i}});var xt=/^(?:input|select|textarea|button)$/i,bt=/^(?:a|area)$/i;function wt(e){return(e.match(z)||[]).join(" ")}function Tt(e){return e.getAttribute&&e.getAttribute("class")||""}function Ct(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(z)||[]}T.fn.extend({prop:function(e,t){return J(this,T.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[T.propFix[e]||e]})}}),T.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&T.isXMLDoc(e)||(t=T.propFix[t]||t,i=T.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=T.find.attr(e,"tabindex");return t?parseInt(t,10):xt.test(e.nodeName)||bt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),h.optSelected||(T.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),T.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){T.propFix[this.toLowerCase()]=this}),T.fn.extend({addClass:function(e){var t,n,r,i,o,a;return g(e)?this.each(function(t){T(this).addClass(e.call(this,t,Tt(this)))}):(t=Ct(e)).length?this.each(function(){if(r=Tt(this),n=1===this.nodeType&&" "+wt(r)+" "){for(o=0;o<t.length;o++)i=t[o],n.indexOf(" "+i+" ")<0&&(n+=i+" ");a=wt(n),r!==a&&this.setAttribute("class",a)}}):this},removeClass:function(e){var t,n,r,i,o,a;return g(e)?this.each(function(t){T(this).removeClass(e.call(this,t,Tt(this)))}):arguments.length?(t=Ct(e)).length?this.each(function(){if(r=Tt(this),n=1===this.nodeType&&" "+wt(r)+" "){for(o=0;o<t.length;o++)for(i=t[o];n.indexOf(" "+i+" ")>-1;)n=n.replace(" "+i+" "," ");a=wt(n),r!==a&&this.setAttribute("class",a)}}):this:this.attr("class","")},toggleClass:function(e,t){var n,r,i,o,a=typeof e,s="string"===a||Array.isArray(e);return g(e)?this.each(function(n){T(this).toggleClass(e.call(this,n,Tt(this),t),t)}):"boolean"==typeof t&&s?t?this.addClass(e):this.removeClass(e):(n=Ct(e),this.each(function(){if(s)for(o=T(this),i=0;i<n.length;i++)r=n[i],o.hasClass(r)?o.removeClass(r):o.addClass(r);else void 0!==e&&"boolean"!==a||((r=Tt(this))&&ie.set(this,"__className__",r),this.setAttribute&&this.setAttribute("class",r||!1===e?"":ie.get(this,"__className__")||""))}))},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+wt(Tt(n))+" ").indexOf(t)>-1)return!0;return!1}});var St=/\r/g;T.fn.extend({val:function(e){var t,n,r,i=this[0];return arguments.length?(r=g(e),this.each(function(n){var i;1===this.nodeType&&(null==(i=r?e.call(this,n,T(this).val()):e)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=T.map(i,function(e){return null==e?"":e+""})),(t=T.valHooks[this.type]||T.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))})):i?(t=T.valHooks[i.type]||T.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(St,""):null==n?"":n:void 0}}),T.extend({valHooks:{option:{get:function(e){var t=T.find.attr(e,"value");return null!=t?t:wt(T.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,s=a?null:[],u=a?o+1:i.length;for(r=o<0?u:a?o:0;r<u;r++)if(((n=i[r]).selected||r===o)&&!n.disabled&&(!n.parentNode.disabled||!S(n.parentNode,"optgroup"))){if(t=T(n).val(),a)return t;s.push(t)}return s},set:function(e,t){for(var n,r,i=e.options,o=T.makeArray(t),a=i.length;a--;)((r=i[a]).selected=T.inArray(T.valHooks.option.get(r),o)>-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),T.each(["radio","checkbox"],function(){T.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=T.inArray(T(e).val(),t)>-1}},h.checkOn||(T.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var Et=t.location,kt={guid:Date.now()},jt=/\?/;T.parseXML=function(e){var n,r;if(!e||"string"!=typeof e)return null;try{n=(new t.DOMParser).parseFromString(e,"text/xml")}catch(i){}return r=n&&n.getElementsByTagName("parsererror")[0],n&&!r||T.error("Invalid XML: "+(r?T.map(r.childNodes,function(e){return e.textContent}).join("\n"):e)),n};var At=/^(?:focusinfocus|focusoutblur)$/,Dt=function(e){e.stopPropagation()};T.extend(T.event,{trigger:function(e,n,r,i){var o,a,s,u,l,c,p,d,h=[r||y],m=f.call(e,"type")?e.type:e,x=f.call(e,"namespace")?e.namespace.split("."):[];if(a=d=s=r=r||y,3!==r.nodeType&&8!==r.nodeType&&!At.test(m+T.event.triggered)&&(m.indexOf(".")>
vendor: 11,773 bytes, line 8
8-1&&(x=m.split("."),m=x.shift(),x.sort()),l=m.indexOf(":")<0&&"on"+m,(e=e[T.expando]?e:new T.Event(m,"object"==typeof e&&e)).isTrigger=i?2:3,e.namespace=x.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+x.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=r),n=null==n?[e]:T.makeArray(n,[e]),p=T.event.special[m]||{},i||!p.trigger||!1!==p.trigger.apply(r,n))){if(!i&&!p.noBubble&&!v(r)){for(u=p.delegateType||m,At.test(u+m)||(a=a.parentNode);a;a=a.parentNode)h.push(a),s=a;s===(r.ownerDocument||y)&&h.push(s.defaultView||s.parentWindow||t)}for(o=0;(a=h[o++])&&!e.isPropagationStopped();)d=a,e.type=o>1?u:p.bindType||m,(c=(ie.get(a,"events")||Object.create(null))[e.type]&&ie.get(a,"handle"))&&c.apply(a,n),(c=l&&a[l])&&c.apply&&ne(a)&&(e.result=c.apply(a,n),!1===e.result&&e.preventDefault());return e.type=m,i||e.isDefaultPrevented()||p._default&&!1!==p._default.apply(h.pop(),n)||!ne(r)||l&&g(r[m])&&!v(r)&&((s=r[l])&&(r[l]=null),T.event.triggered=m,e.isPropagationStopped()&&d.addEventListener(m,Dt),r[m](),e.isPropagationStopped()&&d.removeEventListener(m,Dt),T.event.triggered=void 0,s&&(r[l]=s)),e.result}},simulate:function(e,t,n){var r=T.extend(new T.Event,n,{type:e,isSimulated:!0});T.event.trigger(r,null,t)}}),T.fn.extend({trigger:function(e,t){return this.each(function(){T.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return T.event.trigger(e,t,n,!0)}});var Nt=/\[\]$/,qt=/\r?\n/g,Lt=/^(?:submit|button|image|reset|file)$/i,Ht=/^(?:input|select|textarea|keygen)/i;function Ot(e,t,n,r){var i;if(Array.isArray(t))T.each(t,function(t,i){n||Nt.test(e)?r(e,i):Ot(e+"["+("object"==typeof i&&null!=i?t:"")+"]",i,n,r)});else if(n||"object"!==b(t))r(e,t);else for(i in t)Ot(e+"["+i+"]",t[i],n,r)}T.param=function(e,t){var n,r=[],i=function(e,t){var n=g(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!T.isPlainObject(e))T.each(e,function(){i(this.name,this.value)});else for(n in e)Ot(n,e[n],t,i);return r.join("&")},T.fn.extend({serialize:function(){return T.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=T.prop(this,"elements");return e?T.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!T(this).is(":disabled")&&Ht.test(this.nodeName)&&!Lt.test(e)&&(this.checked||!Te.test(e))}).map(function(e,t){var n=T(this).val();return null==n?null:Array.isArray(n)?T.map(n,function(e){return{name:t.name,value:e.replace(qt,"\r\n")}}):{name:t.name,value:n.replace(qt,"\r\n")}}).get()}});var Pt=/%20/g,Mt=/#.*$/,Rt=/([?&])_=[^&]*/,It=/^(.*?):[ \t]*([^\r\n]*)$/gm,Wt=/^(?:GET|HEAD)$/,Ft=/^\/\//,$t={},Bt={},_t="*/".concat("*"),zt=y.createElement("a");function Xt(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(z)||[];if(g(n))for(;r=o[i++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function Ut(e,t,n,r){var i={},o=e===Bt;function a(s){var u;return i[s]=!0,T.each(e[s]||[],function(e,s){var l=s(t,n,r);return"string"!=typeof l||o||i[l]?o?!(u=l):void 0:(t.dataTypes.unshift(l),a(l),!1)}),u}return a(t.dataTypes[0])||!i["*"]&&a("*")}function Vt(e,t){var n,r,i=T.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&T.extend(!0,e,r),e}zt.href=Et.href,T.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Et.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Et.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":_t,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":T.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Vt(Vt(e,T.ajaxSettings),t):Vt(T.ajaxSettings,e)},ajaxPrefilter:Xt($t),ajaxTransport:Xt(Bt),ajax:function(e,n){"object"==typeof e&&(n=e,e=void 0),n=n||{};var r,i,o,a,s,u,l,c,f,p,d=T.ajaxSetup({},n),h=d.context||d,g=d.context&&(h.nodeType||h.jquery)?T(h):T.event,v=T.Deferred(),m=T.Callbacks("once memory"),x=d.statusCode||{},b={},w={},C="canceled",S={readyState:0,getResponseHeader:function(e){var t;if(l){if(!a)for(a={};t=It.exec(o);)a[t[1].toLowerCase()+" "]=(a[t[1].toLowerCase()+" "]||[]).concat(t[2]);t=a[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return l?o:null},setRequestHeader:function(e,t){return null==l&&(e=w[e.toLowerCase()]=w[e.toLowerCase()]||e,b[e]=t),this},overrideMimeType:function(e){return null==l&&(d.mimeType=e),this},statusCode:function(e){var t;if(e)if(l)S.always(e[S.status]);else for(t in e)x[t]=[x[t],e[t]];return this},abort:function(e){var t=e||C;return r&&r.abort(t),E(0,t),this}};if(v.promise(S),d.url=((e||d.url||Et.href)+"").replace(Ft,Et.protocol+"//"),d.type=n.method||n.type||d.method||d.type,d.dataTypes=(d.dataType||"*").toLowerCase().match(z)||[""],null==d.crossDomain){u=y.createElement("a");try{u.href=d.url,u.href=u.href,d.crossDomain=zt.protocol+"//"+zt.host!=u.protocol+"//"+u.host}catch(k){d.crossDomain=!0}}if(d.data&&d.processData&&"string"!=typeof d.data&&(d.data=T.param(d.data,d.traditional)),Ut($t,d,n,S),l)return S;for(f in(c=T.event&&d.global)&&0==T.active++&&T.event.trigger("ajaxStart"),d.type=d.type.toUpperCase(),d.hasContent=!Wt.test(d.type),i=d.url.replace(Mt,""),d.hasContent?d.data&&d.processData&&0===(d.contentType||"").indexOf("application/x-www-form-urlencoded")&&(d.data=d.data.replace(Pt,"+")):(p=d.url.slice(i.length),d.data&&(d.processData||"string"==typeof d.data)&&(i+=(jt.test(i)?"&":"?")+d.data,delete d.data),!1===d.cache&&(i=i.replace(Rt,"$1"),p=(jt.test(i)?"&":"?")+"_="+kt.guid+++p),d.url=i+p),d.ifModified&&(T.lastModified[i]&&S.setRequestHeader("If-Modified-Since",T.lastModified[i]),T.etag[i]&&S.setRequestHeader("If-None-Match",T.etag[i])),(d.data&&d.hasContent&&!1!==d.contentType||n.contentType)&&S.setRequestHeader("Content-Type",d.contentType),S.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+("*"!==d.dataTypes[0]?", "+_t+"; q=0.01":""):d.accepts["*"]),d.headers)S.setRequestHeader(f,d.headers[f]);if(d.beforeSend&&(!1===d.beforeSend.call(h,S,d)||l))return S.abort();if(C="abort",m.add(d.complete),S.done(d.success),S.fail(d.error),r=Ut(Bt,d,n,S)){if(S.readyState=1,c&&g.trigger("ajaxSend",[S,d]),l)return S;d.async&&d.timeout>0&&(s=t.setTimeout(function(){S.abort("timeout")},d.timeout));try{l=!1,r.send(b,E)}catch(k){if(l)throw k;E(-1,k)}}else E(-1,"No Transport");function E(e,n,a,u){var f,p,y,b,w,C=n;l||(l=!0,s&&t.clearTimeout(s),r=void 0,o=u||"",S.readyState=e>0?4:0,f=e>=200&&e<300||304===e,a&&(b=function(e,t,n){for(var r,i,o,a,s=e.contents,u=e.dataTypes;"*"===u[0];)u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}(d,S,a)),!f&&T.inArray("script",d.dataTypes)>-1&&T.inArray("json",d.dataTypes)<0&&(d.converters["text script"]=function(){}),b=function(e,t,n,r){var i,o,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];for(o=c.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=l[u+" "+o]||l["* "+o]))for(i in l)if((s=i.split(" "))[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e.throws)t=a(t);else try{t=a(t)}catch(k){return{state:"parsererror",error:a?k:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}(d,b,S,f),f?(d.ifModified&&((w=S.getResponseHeader("Last-Modified"))&&(T.lastModified[i]=w),(w=S.getResponseHeader("etag"))&&(T.etag[i]=w)),204===e||"HEAD"===d.type?C="nocontent":304===e?C="notmodified":(C=b.state,p=b.data,f=!(y=b.error))):(y=C,!e&&C||(C="error",e<0&&(e=0))),S.status=e,S.statusText=(n||C)+"",f?v.resolveWith(h,[p,C,S]):v.rejectWith(h,[S,C,y]),S.statusCode(x),x=void 0,c&&g.trigger(f?"ajaxSuccess":"ajaxError",[S,d,f?p:y]),m.fireWith(h,[S,C]),c&&(g.trigger("ajaxComplete",[S,d]),--T.active||T.event.trigger("ajaxStop")))}return S},getJSON:function(e,t,n){return T.get(e,t,n,"json")},getScript:function(e,t){return T.get(e,void 0,t,"script")}}),T.each(["get","post"],function(e,t){T[t]=function(e,n,r,i){return g(n)&&(i=i||r,r=n,n=void 0),T.ajax(T.extend({url:e,type:t,dataType:i,data:n,success:r},T.isPlainObject(e)&&e))}}),T.ajaxPrefilter(function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")}),T._evalUrl=function(e,t,n){return T.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){T.globalEval(e,t,n)}})},T.fn.extend({wrapAll:function(e){var t;return this[0]&&(g(e)&&(e=e.call(this[0])),t=T(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return g(e)?this.each(function(t){T(this).wrapInner(e.call(this,t))}):this.each(function(){var t=T(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=g(e);return this.each(function(n){T(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){T(this).replaceWith(this.childNodes)}),this}}),T.expr.pseudos.hidden=function(e){return!T.expr.pseudos.visible(e)},T.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},T.ajaxSettings.xhr=function(){try{return new t.XMLHttpRequest}catch(e){}};var Gt={0:200,1223:204},Yt=T.ajaxSettings.xhr();h.cors=!!Yt&&"withCredentials"in Yt,h.ajax=Yt=!!Yt,T.ajaxTransport(function(e){var n,r;if(h.cors||Yt&&!e.crossDomain)return{send:function(i,o){var a,s=e.xhr();if(s.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(a in e.xhrFields)s[a]=e.xhrFields[a];for(a in e.mimeType&&s.overrideMimeType&&s.overrideMimeType(e.mimeType),e.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"),i)s.setRequestHeader(a,i[a]);n=function(e){return function(){n&&(n=r=s.onload=s.onerror=s.onabort=s.ontimeout=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"!=typeof s.status?o(0,"error"):o(s.status,s.statusText):o(Gt[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=n(),r=s.onerror=s.ontimeout=n("error"),void 0!==s.onabort?s.onabort=r:s.onreadystatechange=function(){4===s.readyState&&t.setTimeout(function(){n&&r()})},n=n("abort");try{s.send(e.hasContent&&e.data||null)}catch(u){if(n)throw u}},abort:function(){n&&n()}}}),T.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),T.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return T.globalEval(e),e}}}),T.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),T.ajaxTransport("script",function(e){var t,n;if(e.crossDomain||e.scriptAttrs)return{send:function(r,i){t=T("<script>").attr(e.scriptAttrs||{}
vendor: 6,901 bytes, lines 8-11
8).prop({charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&i("error"===e.type?404:200,e.type)}),y.head.appendChild(t[0])},abort:function(){n&&n()}}});var Qt,Jt=[],Kt=/(=)\?(?=&|$)|\?\?/;T.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Jt.pop()||T.expando+"_"+kt.guid++;return this[e]=!0,e}}),T.ajaxPrefilter("json jsonp",function(e,n,r){var i,o,a,s=!1!==e.jsonp&&(Kt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Kt.test(e.data)&&"data");if(s||"jsonp"===e.dataTypes[0])return i=e.jsonpCallback=g(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,s?e[s]=e[s].replace(Kt,"$1"+i):!1!==e.jsonp&&(e.url+=(jt.test(e.url)?"&":"?")+e.jsonp+"="+i),e.converters["script json"]=function(){return a||T.error(i+" was not called"),a[0]},e.dataTypes[0]="json",o=t[i],t[i]=function(){a=arguments},r.always(function(){void 0===o?T(t).removeProp(i):t[i]=o,e[i]&&(e.jsonpCallback=n.jsonpCallback,Jt.push(i)),a&&g(o)&&o(a[0]),a=o=void 0}),"script"}),h.createHTMLDocument=((Qt=y.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Qt.childNodes.length),T.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(h.createHTMLDocument?((r=(t=y.implementation.createHTMLDocument("")).createElement("base")).href=y.location.href,t.head.appendChild(r)):t=y),o=!n&&[],(i=R.exec(e))?[t.createElement(i[1])]:(i=De([e],t,o),o&&o.length&&T(o).remove(),T.merge([],i.childNodes)));var r,i,o},T.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return s>-1&&(r=wt(e.slice(s)),e=e.slice(0,s)),g(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),a.length>0&&T.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){o=arguments,a.html(r?T("<div>").append(T.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},T.expr.pseudos.animated=function(e){return T.grep(T.timers,function(t){return e===t.elem}).length},T.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=T.css(e,"position"),c=T(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=T.css(e,"top"),u=T.css(e,"left"),("absolute"===l||"fixed"===l)&&(o+u).indexOf("auto")>-1?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),g(t)&&(t=t.call(e,n,T.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},T.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){T.offset.setOffset(this,e,t)});var t,n,r=this[0];return r?r.getClientRects().length?(t=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:t.top+n.pageYOffset,left:t.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===T.css(r,"position"))t=r.getBoundingClientRect();else{for(t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;e&&(e===n.body||e===n.documentElement)&&"static"===T.css(e,"position");)e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=T(e).offset()).top+=T.css(e,"borderTopWidth",!0),i.left+=T.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-T.css(r,"marginTop",!0),left:t.left-i.left-T.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&"static"===T.css(e,"position");)e=e.offsetParent;return e||pe})}}),T.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n="pageYOffset"===t;T.fn[e]=function(r){return J(this,function(e,r,i){var o;if(v(e)?o=e:9===e.nodeType&&(o=e.defaultView),void 0===i)return o?o[t]:e[r];o?o.scrollTo(n?o.pageXOffset:i,n?i:o.pageYOffset):e[r]=i},e,r,arguments.length)}}),T.each(["top","left"],function(e,t){T.cssHooks[t]=Qe(h.pixelPosition,function(e,n){if(n)return n=Ye(e,t),ze.test(n)?T(e).position()[t]+"px":n})}),T.each({Height:"height",Width:"width"},function(e,t){T.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,r){T.fn[r]=function(i,o){var a=arguments.length&&(n||"boolean"!=typeof i),s=n||(!0===i||!0===o?"margin":"border");return J(this,function(t,n,i){var o;return v(t)?0===r.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(o=t.documentElement,Math.max(t.body["scroll"+e],o["scroll"+e],t.body["offset"+e],o["offset"+e],o["client"+e])):void 0===i?T.css(t,n,s):T.style(t,n,i,s)},t,a?i:void 0,a)}})}),T.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){T.fn[t]=function(e){return this.on(t,e)}}),T.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.on("mouseenter",e).on("mouseleave",t||e)}}),T.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,t){T.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}});var Zt=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;T.proxy=function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),g(e))return r=o.call(arguments,2),(i=function(){return e.apply(t||this,r.concat(o.call(arguments)))}).guid=e.guid=e.guid||T.guid++,i},T.holdReady=function(e){e?T.readyWait++:T.ready(!0)},T.isArray=Array.isArray,T.parseJSON=JSON.parse,T.nodeName=S,T.isFunction=g,T.isWindow=v,T.camelCase=te,T.type=b,T.now=Date.now,T.isNumeric=function(e){var t=T.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},T.trim=function(e){return null==e?"":(e+"").replace(Zt,"$1")},"function"==typeof e&&e.amd&&e("jquery",[],function(){return T});var en=t.jQuery,tn=t.$;return T.noConflict=function(e){return t.$===T&&(t.$=tn),e&&t.jQuery===T&&(t.jQuery=en),T},void 0===n&&(t.jQuery=t.$=T),T});
9},{"process":"g5IB"}],"v5IM":[function(require,module,exports) {
10var global = arguments[3];
11var e=arguments[3];Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t="undefined"!=typeof window&&"undefined"!=typeof document&&"undefined"!=typeof navigator,n=function(){for(var e=["Edge","Trident","Firefox"],n=0;n<e.length;n+=1)if(t&&navigator.userAgent.indexOf(e[n])>=0)return 1;return 0}();function r(e){var t=!1;return function(){t||(t=!0,window.Promise.resolve().then(function(){t=!1,e()}))}}function o(e){var t=!1;return function(){t||(t=!0,setTimeout(function(){t=!1,e()},n))}}var i=t&&window.Promise,a=i?r:o;function s(e){return e&&"[object Function]"==={}.toString.call(e)}function f(e,t){if(1!==e.nodeType)return[];var n=e.ownerDocument.defaultView.getComputedStyle(e,null);return t?n[t]:n}
vendor: 4,226 bytes, line 11
11function p(e){return"HTML"===e.nodeName?e:e.parentNode||e.host}function l(e){if(!e)return document.body;switch(e.nodeName){case"HTML":case"BODY":return e.ownerDocument.body;case"#document":return e.body}var t=f(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/(auto|scroll|overlay)/.test(n+o+r)?e:l(p(e))}function u(e){return e&&e.referenceNode?e.referenceNode:e}var d=t&&!(!window.MSInputMethodContext||!document.documentMode),c=t&&/MSIE 10/.test(navigator.userAgent);function h(e){return 11===e?d:10===e?c:d||c}function m(e){if(!e)return document.documentElement;for(var t=h(10)?document.body:null,n=e.offsetParent||null;n===t&&e.nextElementSibling;)n=(e=e.nextElementSibling).offsetParent;var r=n&&n.nodeName;return r&&"BODY"!==r&&"HTML"!==r?-1!==["TH","TD","TABLE"].indexOf(n.nodeName)&&"static"===f(n,"position")?m(n):n:e?e.ownerDocument.documentElement:document.documentElement}function v(e){var t=e.nodeName;return"BODY"!==t&&("HTML"===t||m(e.firstElementChild)===e)}function g(e){return null!==e.parentNode?g(e.parentNode):e}function b(e,t){if(!(e&&e.nodeType&&t&&t.nodeType))return document.documentElement;var n=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,r=n?e:t,o=n?t:e,i=document.createRange();i.setStart(r,0),i.setEnd(o,0);var a=i.commonAncestorContainer;if(e!==a&&t!==a||r.contains(o))return v(a)?a:m(a);var s=g(e);return s.host?b(s.host,t):b(e,g(t).host)}function w(e){var t="top"===(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top")?"scrollTop":"scrollLeft",n=e.nodeName;if("BODY"===n||"HTML"===n){var r=e.ownerDocument.documentElement;return(e.ownerDocument.scrollingElement||r)[t]}return e[t]}function y(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=w(t,"top"),o=w(t,"left"),i=n?-1:1;return e.top+=r*i,e.bottom+=r*i,e.left+=o*i,e.right+=o*i,e}function E(e,t){var n="x"===t?"Left":"Top",r="Left"===n?"Right":"Bottom";return parseFloat(e["border"+n+"Width"])+parseFloat(e["border"+r+"Width"])}function x(e,t,n,r){return Math.max(t["offset"+e],t["scroll"+e],n["client"+e],n["offset"+e],n["scroll"+e],h(10)?parseInt(n["offset"+e])+parseInt(r["margin"+("Height"===e?"Top":"Left")])+parseInt(r["margin"+("Height"===e?"Bottom":"Right")]):0)}function O(e){var t=e.body,n=e.documentElement,r=h(10)&&getComputedStyle(n);return{height:x("Height",t,n,r),width:x("Width",t,n,r)}}var L=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},T=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),M=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},N=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function C(e){return N({},e,{right:e.left+e.width,bottom:e.top+e.height})}function D(e){var t={};try{if(h(10)){t=e.getBoundingClientRect();var n=w(e,"top"),r=w(e,"left");t.top+=n,t.left+=r,t.bottom+=n,t.right+=r}else t=e.getBoundingClientRect()}catch(d){}var o={left:t.left,top:t.top,width:t.right-t.left,height:t.bottom-t.top},i="HTML"===e.nodeName?O(e.ownerDocument):{},a=i.width||e.clientWidth||o.width,s=i.height||e.clientHeight||o.height,p=e.offsetWidth-a,l=e.offsetHeight-s;if(p||l){var u=f(e);p-=E(u,"x"),l-=E(u,"y"),o.width-=p,o.height-=l}return C(o)}function F(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=h(10),o="HTML"===t.nodeName,i=D(e),a=D(t),s=l(e),p=f(t),u=parseFloat(p.borderTopWidth),d=parseFloat(p.borderLeftWidth);n&&o&&(a.top=Math.max(a.top,0),a.left=Math.max(a.left,0));var c=C({top:i.top-a.top-u,left:i.left-a.left-d,width:i.width,height:i.height});if(c.marginTop=0,c.marginLeft=0,!r&&o){var m=parseFloat(p.marginTop),v=parseFloat(p.marginLeft);c.top-=u-m,c.bottom-=u-m,c.left-=d-v,c.right-=d-v,c.marginTop=m,c.marginLeft=v}return(r&&!n?t.contains(s):t===s&&"BODY"!==s.nodeName)&&(c=y(c,t)),c}function S(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.ownerDocument.documentElement,r=F(e,n
vendor: 5,098 bytes, line 11
11),o=Math.max(n.clientWidth,window.innerWidth||0),i=Math.max(n.clientHeight,window.innerHeight||0),a=t?0:w(n),s=t?0:w(n,"left");return C({top:a-r.top+r.marginTop,left:s-r.left+r.marginLeft,width:o,height:i})}function W(e){var t=e.nodeName;if("BODY"===t||"HTML"===t)return!1;if("fixed"===f(e,"position"))return!0;var n=p(e);return!!n&&W(n)}function k(e){if(!e||!e.parentElement||h())return document.documentElement;for(var t=e.parentElement;t&&"none"===f(t,"transform");)t=t.parentElement;return t||document.documentElement}function H(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],i={top:0,left:0},a=o?k(e):b(e,u(t));if("viewport"===r)i=S(a,o);else{var s=void 0;"scrollParent"===r?"BODY"===(s=l(p(t))).nodeName&&(s=e.ownerDocument.documentElement):s="window"===r?e.ownerDocument.documentElement:r;var f=F(s,a,o);if("HTML"!==s.nodeName||W(a))i=f;else{var d=O(e.ownerDocument),c=d.height,h=d.width;i.top+=f.top-f.marginTop,i.bottom=c+f.top,i.left+=f.left-f.marginLeft,i.right=h+f.left}}var m="number"==typeof(n=n||0);return i.left+=m?n:n.left||0,i.top+=m?n:n.top||0,i.right-=m?n:n.right||0,i.bottom-=m?n:n.bottom||0,i}function P(e){return e.width*e.height}function B(e,t,n,r,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===e.indexOf("auto"))return e;var a=H(n,r,i,o),s={top:{width:a.width,height:t.top-a.top},right:{width:a.right-t.right,height:a.height},bottom:{width:a.width,height:a.bottom-t.bottom},left:{width:t.left-a.left,height:a.height}},f=Object.keys(s).map(function(e){return N({key:e},s[e],{area:P(s[e])})}).sort(function(e,t){return t.area-e.area}),p=f.filter(function(e){var t=e.width,r=e.height;return t>=n.clientWidth&&r>=n.clientHeight}),l=p.length>0?p[0].key:f[0].key,u=e.split("-")[1];return l+(u?"-"+u:"")}function A(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return F(n,r?k(t):b(t,u(n)),r)}function I(e){var t=e.ownerDocument.defaultView.getComputedStyle(e),n=parseFloat(t.marginTop||0)+parseFloat(t.marginBottom||0),r=parseFloat(t.marginLeft||0)+parseFloat(t.marginRight||0);return{width:e.offsetWidth+r,height:e.offsetHeight+n}}function j(e){var t={left:"right",right:"left",bottom:"top",top:"bottom"};return e.replace(/left|right|bottom|top/g,function(e){return t[e]})}function R(e,t,n){n=n.split("-")[0];var r=I(e),o={width:r.width,height:r.height},i=-1!==["right","left"].indexOf(n),a=i?"top":"left",s=i?"left":"top",f=i?"height":"width",p=i?"width":"height";return o[a]=t[a]+t[f]/2-r[f]/2,o[s]=n===s?t[s]-r[p]:t[j(s)],o}function U(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function Y(e,t,n){if(Array.prototype.findIndex)return e.findIndex(function(e){return e[t]===n});var r=U(e,function(e){return e[t]===n});return e.indexOf(r)}function V(e,t,n){return(void 0===n?e:e.slice(0,Y(e,"name",n))).forEach(function(e){e.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var n=e.function||e.fn;e.enabled&&s(n)&&(t.offsets.popper=C(t.offsets.popper),t.offsets.reference=C(t.offsets.reference),t=n(t,e))}),t}function q(){if(!this.state.isDestroyed){var e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=A(this.state,this.popper,this.reference,this.options.positionFixed),e.placement=B(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),e.originalPlacement=e.placement,e.positionFixed=this.options.positionFixed,e.offsets.popper=R(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",e=V(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}function K(e,t){return e.some(function(e){var n=e.name;return e.enabled&&n===t})}function _(e){for(var t=[!1,"ms","Webkit","Moz","O"],n=e.charAt(0).toUpperCase()+e.slice(1),r=0;r<t.length;r++){var o=t[r],i=o?""+o+n:e;if(void 0!==document.body.style[i])return i}return null}function z(){return this.state.isDestroyed=!0,K(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.position="",this.popper.style.top="",this.popper.style.left="",this.popper.style.right="",this.popper.style.bottom="",this.popper.style.willChange="",this.popper.style[_("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function G(e){var t=e.ownerDocument;return t?t.defaultView:window}function X(e,t,n,r){var o="BODY"===e.nodeName,i=o?e.ownerDocument.defaultView:e;i.addEventListener(t,n,{passive:!0}),o||X(l(i.parentNode),t,n,r),r.push(i)}function J(e,t,n,r){n.updateBound=r,G(e).addEventListener("resize",n.updateBound,{passive:!0});var o=l(e);return X(o,"scroll",n.updateBound,n.scrollParents),n.scrollElement=o,n.eventsEnabled=!0,n}function Q(){this.state.eventsEnabled||(this.state=J(this.reference,this.options,this.state,this.scheduleUpdate))}function Z(e,t){return G(e).removeEventListener("resize",t.updateBound),t.scrollParents.forEac
vendor: 3,265 bytes, line 11
11h(function(e){e.removeEventListener("scroll",t.updateBound)}),t.updateBound=null,t.scrollParents=[],t.scrollElement=null,t.eventsEnabled=!1,t}function $(){this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=Z(this.reference,this.state))}function ee(e){return""!==e&&!isNaN(parseFloat(e))&&isFinite(e)}function te(e,t){Object.keys(t).forEach(function(n){var r="";-1!==["width","height","top","right","bottom","left"].indexOf(n)&&ee(t[n])&&(r="px"),e.style[n]=t[n]+r})}function ne(e,t){Object.keys(t).forEach(function(n){!1!==t[n]?e.setAttribute(n,t[n]):e.removeAttribute(n)})}function re(e){return te(e.instance.popper,e.styles),ne(e.instance.popper,e.attributes),e.arrowElement&&Object.keys(e.arrowStyles).length&&te(e.arrowElement,e.arrowStyles),e}function oe(e,t,n,r,o){var i=A(o,t,e,n.positionFixed),a=B(n.placement,i,t,e,n.modifiers.flip.boundariesElement,n.modifiers.flip.padding);return t.setAttribute("x-placement",a),te(t,{position:n.positionFixed?"fixed":"absolute"}),n}function ie(e,t){var n=e.offsets,r=n.popper,o=n.reference,i=Math.round,a=Math.floor,s=function(e){return e},f=i(o.width),p=i(r.width),l=-1!==["left","right"].indexOf(e.placement),u=-1!==e.placement.indexOf("-"),d=t?l||u||f%2==p%2?i:a:s,c=t?i:s;return{left:d(f%2==1&&p%2==1&&!u&&t?r.left-1:r.left),top:c(r.top),bottom:c(r.bottom),right:d(r.right)}}var ae=t&&/Firefox/i.test(navigator.userAgent);function se(e,t){var n=t.x,r=t.y,o=e.offsets.popper,i=U(e.instance.modifiers,function(e){return"applyStyle"===e.name}).gpuAcceleration;void 0!==i&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var a=void 0!==i?i:t.gpuAcceleration,s=m(e.instance.popper),f=D(s),p={position:o.position},l=ie(e,window.devicePixelRatio<2||!ae),u="bottom"===n?"top":"bottom",d="right"===r?"left":"right",c=_("transform"),h=void 0,v=void 0;if(v="bottom"===u?"HTML"===s.nodeName?-s.clientHeight+l.bottom:-f.height+l.bottom:l.top,h="right"===d?"HTML"===s.nodeName?-s.clientWidth+l.right:-f.width+l.right:l.left,a&&c)p[c]="translate3d("+h+"px, "+v+"px, 0)",p[u]=0,p[d]=0,p.willChange="transform";else{var g="bottom"===u?-1:1,b="right"===d?-1:1;p[u]=v*g,p[d]=h*b,p.willChange=u+", "+d}var w={"x-placement":e.placement};return e.attributes=N({},w,e.attributes),e.styles=N({},p,e.styles),e.arrowStyles=N({},e.offsets.arrow,e.arrowStyles),e}function fe(e,t,n){var r=U(e,function(e){return e.name===t}),o=!!r&&e.some(function(e){return e.name===n&&e.enabled&&e.order<r.order});if(!o){var i="`"+t+"`",a="`"+n+"`";console.warn(a+" modifier is required by "+i+" modifier in order to work, be sure to include it before "+i+"!")}return o}function pe(e,t){var n;if(!fe(e.instance.modifiers,"arrow","keepTogether"))return e;var r=t.element;if("string"==typeof r){if(!(r=e.instance.popper.querySelector(r)))return e}else if(!e.instance.popper.contains(r))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),e;var o=e.placement.split("-")[0],i=e.offsets,a=i.popper,s=i.reference,p=-1!==["left","right"].indexOf(o),l=p?"height":"width",u=p?"Top":"Left",d=u.toLowerCase(),c=p?"left":"top",h=p?"bottom":"right",m=I(r)[l];s[h]-m<a[d]&&(e.offsets.popper[d]-=a[d]-(s[h]-m)),s[d]+m>
vendor: 4,197 bytes, line 11
11a[h]&&(e.offsets.popper[d]+=s[d]+m-a[h]),e.offsets.popper=C(e.offsets.popper);var v=s[d]+s[l]/2-m/2,g=f(e.instance.popper),b=parseFloat(g["margin"+u]),w=parseFloat(g["border"+u+"Width"]),y=v-e.offsets.popper[d]-b-w;return y=Math.max(Math.min(a[l]-m,y),0),e.arrowElement=r,e.offsets.arrow=(M(n={},d,Math.round(y)),M(n,c,""),n),e}function le(e){return"end"===e?"start":"start"===e?"end":e}var ue=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],de=ue.slice(3);function ce(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=de.indexOf(e),r=de.slice(n+1).concat(de.slice(0,n));return t?r.reverse():r}var he={FLIP:"flip",CLOCKWISE:"clockwise",COUNTERCLOCKWISE:"counterclockwise"};function me(e,t){if(K(e.instance.modifiers,"inner"))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var n=H(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement,e.positionFixed),r=e.placement.split("-")[0],o=j(r),i=e.placement.split("-")[1]||"",a=[];switch(t.behavior){case he.FLIP:a=[r,o];break;case he.CLOCKWISE:a=ce(r);break;case he.COUNTERCLOCKWISE:a=ce(r,!0);break;default:a=t.behavior}return a.forEach(function(s,f){if(r!==s||a.length===f+1)return e;r=e.placement.split("-")[0],o=j(r);var p=e.offsets.popper,l=e.offsets.reference,u=Math.floor,d="left"===r&&u(p.right)>u(l.left)||"right"===r&&u(p.left)<u(l.right)||"top"===r&&u(p.bottom)>u(l.top)||"bottom"===r&&u(p.top)<u(l.bottom),c=u(p.left)<u(n.left),h=u(p.right)>u(n.right),m=u(p.top)<u(n.top),v=u(p.bottom)>u(n.bottom),g="left"===r&&c||"right"===r&&h||"top"===r&&m||"bottom"===r&&v,b=-1!==["top","bottom"].indexOf(r),w=!!t.flipVariations&&(b&&"start"===i&&c||b&&"end"===i&&h||!b&&"start"===i&&m||!b&&"end"===i&&v),y=!!t.flipVariationsByContent&&(b&&"start"===i&&h||b&&"end"===i&&c||!b&&"start"===i&&v||!b&&"end"===i&&m),E=w||y;(d||g||E)&&(e.flipped=!0,(d||g)&&(r=a[f+1]),E&&(i=le(i)),e.placement=r+(i?"-"+i:""),e.offsets.popper=N({},e.offsets.popper,R(e.instance.popper,e.offsets.reference,e.placement)),e=V(e.instance.modifiers,e,"flip"))}),e}function ve(e){var t=e.offsets,n=t.popper,r=t.reference,o=e.placement.split("-")[0],i=Math.floor,a=-1!==["top","bottom"].indexOf(o),s=a?"right":"bottom",f=a?"left":"top",p=a?"width":"height";return n[s]<i(r[f])&&(e.offsets.popper[f]=i(r[f])-n[p]),n[f]>i(r[s])&&(e.offsets.popper[f]=i(r[s])),e}function ge(e,t,n,r){var o=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),i=+o[1],a=o[2];if(!i)return e;if(0===a.indexOf("%")){var s=void 0;switch(a){case"%p":s=n;break;case"%":case"%r":default:s=r}return C(s)[t]/100*i}if("vh"===a||"vw"===a){return("vh"===a?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*i}return i}function be(e,t,n,r){var o=[0,0],i=-1!==["right","left"].indexOf(r),a=e.split(/(\+|\-)/).map(function(e){return e.trim()}),s=a.indexOf(U(a,function(e){return-1!==e.search(/,|\s/)}));a[s]&&-1===a[s].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var f=/\s*,\s*|\s+/,p=-1!==s?[a.slice(0,s).concat([a[s].split(f)[0]]),[a[s].split(f)[1]].concat(a.slice(s+1))]:[a];return(p=p.map(function(e,r){var o=(1===r?!i:i)?"height":"width",a=!1;return e.reduce(function(e,t){return""===e[e.length-1]&&-1!==["+","-"].indexOf(t)?(e[e.length-1]=t,a=!0,e):a?(e[e.length-1]+=t,a=!1,e):e.concat(t)},[]).map(function(e){return ge(e,o,t,n)})})).forEach(function(e,t){e.forEach(function(n,r){ee(n)&&(o[t]+=n*("-"===e[r-1]?-1:1))})}),o}function we(e,t){var n=t.offset,r=e.placement,o=e.offsets,i=o.popper,a=o.reference,s=r.split("-")[0],f=void 0;return f=ee(+n)?[+n,0]:be(n,i,a,s),"left"===s?(i.top+=f[0],i.left-=f[1]):"right"===s?(i.top+=f[0],i.left+=f[1]):"top"===s?(i.left+=f[0],i.top-=f[1]):"bottom"===s&&(i.left+=f[0],i.top+=f[1]),e.popper=i,e}function ye(e,t){var n=t.boundariesElement||m(e.instance.popper);e.instance.reference===n&&(n=m(n));var r=_("transform"),o=e.instance.popper.style,i=o.top,a=o.left,s=o[r];o.top="",o.left="",o[r]="";var f=H(e.instance.popper,e.instance.reference,t.padding,n,e.positionFixed);
11o.top=i,o.left=a,o[r]=s,t.boundaries=f;var p=t.priority,l=e.offsets.popper,u={primary:function(e){var n=l[e];return l[e]<f[e]&&!t.escapeWithReference&&(n=Math.max(l[e],f[e])),M({},e,n)},secondary:function(e){var n="right"===e?"left":"top",r=l[n];return l[e]>f[e]&&!t.escapeWithReference&&(r=Math.min(l[n],f[e]-("right"===e?l.width:l.height))),M({},n,r)}};return p.forEach(function(e){var t=-1!==["left","top"].indexOf(e)?"primary":"secondary";l=N({},l,u[t](e))}),e.offsets.popper=l,e}function Ee(e){var t=e.placement,n=t.split("-")[0],r=t.split("-")[1];if(r){var o=e.offsets,i=o.reference,a=o.popper,s=-1!==["bottom","top"].indexOf(n),f=s?"left":"top",p=s?"width":"height",l={start:M({},f,i[f]),end:M({},f,i[f]+i[p]-a[p])};e.offsets.popper=N({},a,l[r])}return e}function xe(e){if(!fe(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,n=U(e.instance.modifiers,function(e){return"preventOverflow"===e.name}).boundaries;if(t.bottom<n.top||t.left>n.right||t.top>n.bottom||t.right<n.left){if(!0===e.hide)return e;e.hide=!0,e.attributes["x-out-of-boundaries"]=""}else{if(!1===e.hide)return e;e.hide=!1,e.attributes["x-out-of-boundaries"]=!1}return e}function Oe(e){var t=e.placement,n=t.split("-")[0],r=e.offsets,o=r.popper,i=r.reference,a=-1!==["left","right"].indexOf(n),s=-1===["top","left"].indexOf(n);return o[a?"left":"top"]=i[n]-(s?o[a?"width":"height"]:0),e.placement=j(t),e.offsets.popper=C(o),e}var Le={shift:{order:100,enabled:!0,fn:Ee},offset:{order:200,enabled:!0,fn:we,offset:0},preventOverflow:{order:300,enabled:!0,fn:ye,priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:ve},arrow:{order:500,enabled:!0,fn:pe,element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:me,behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:Oe},hide:{order:800,enabled:!0,fn:xe},computeStyle:{order:850,enabled:!0,fn:se,gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:re,onLoad:oe,gpuAcceleration:void 0}},Te={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:Le},Me=function(){function e(t,n){var r=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};L(this,e),this.scheduleUpdate=function(){return requestAnimationFrame(r.update)},this.update=a(this.update.bind(this)),this.options=N({},e.Defaults,o),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=t&&t.jquery?t[0]:t,this.popper=n&&n.jquery?n[0]:n,this.options.modifiers={},Object.keys(N({},e.Defaults.modifiers,o.modifiers)).forEach(function(t){r.options.modifiers[t]=N({},e.Defaults.modifiers[t]||{},o.modifiers?o.modifiers[t]:{})}),this.modifiers=Object.keys(this.options.modifiers).map(function(e){return N({name:e},r.options.modifiers[e])}).sort(function(e,t){return e.order-t.order}),this.modifiers.forEach(function(e){e.enabled&&s(e.onLoad)&&e.onLoad(r.reference,r.popper,r.options,e,r.state)}),this.update();var i=this.options.eventsEnabled;i&&this.enableEventListeners(),this.state.eventsEnabled=i}return T(e,[{key:"update",value:function(){return q.call(this)}},{key:"destroy",value:function(){return z.call(this)}},{key:"enableEventListeners",value:function(){return Q.call(this)}},{key:"disableEventListeners",value:function(){return $.call(this)}}]),e}();Me.Utils=("undefined"!=typeof window?window:e).PopperUtils,Me.placements=ue,Me.Defaults=Te;var Ne=exports.default=Me;
12},{}],"pe4o":[function(require,module,exports) {
13var define;
14var global = arguments[3];
15var t,e=arguments[3];!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("jquery"),require("popper.js")):"function"==typeof t&&t.amd?t(["exports","jquery","popper.js"],n):n((e="undefined"!=typeof globalThis?globalThis:e||self).bootstrap={},e.jQuery,e.Popper)}(this,function(t,e,n){"use strict";function i(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var o=i(e),a=i(n);function s(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function l(t,e,n){return e&&s(t.prototype,e),n&&s(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function r(){return(r=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}).apply(this,arguments)}function u(t,e){return(u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}var d="transitionend";function c(t){var e=this,n=!1;return o.default(this).one(f.TRANSITION_END,function(){n=!0}),setTimeout(function(){n||f.triggerTransitionEnd(e)},t),this}var f={TRANSITION_END:"bsTransitionEnd",getUID:function(t){do{t+=~~(1e6*Math.random())}while(document.getElementById(t));return t},getSelectorFromElement:function(t){var e=t.getAttribute("data-target");if(!e||"#"===e){var n=t.getAttribute("href");e=n&&"#"!==n?n.trim():""}try{return document.querySelector(e)?e:null}catch(i){return null}},getTransitionDurationFromElement:function(t){if(!t)return 0;var e=o.default(t).css("transition-duration"),n=o.default(t).css("transition-delay"),i=parseFloat(e),a=parseFloat(n);return i||a?(e=e.split(",")[0],n=n.split(",")[0],1e3*(parseFloat(e)+parseFloat(n))):0},reflow:function(t){return t.offsetHeight},triggerTransitionEnd:function(t){o.default(t).trigger(d)},supportsTransitionEnd:function(){return Boolean(d)},isElement:function(t){return(t[0]||t).nodeType},typeCheckConfig:function(t,e,n){for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i)){var o=n[i],a=e[i],s=a&&f.isElement(a)?"element":null==(l=a)?""+l:{}.toString.call(l).match(/\s([a-z]+)/i)[1].toLowerCase();if(!new RegExp(o).test(s))throw new Error(t.toUpperCase()+': Option "'+i+'" provided type "'+s+'" but expected type "'+o+'".')}var l},findShadowRoot:function(t){if(!document.documentElement.attachShadow)return null;if("function"==typeof t.getRootNode){var e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?f.findShadowRoot(t.parentNode):null},jQueryDetection:function(){if(void 0===o.default)throw new TypeError("Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript.");var t=o.default.fn.jquery.split(" ")[0].split(".");if(t[0]<2&&t[1]<9||1===t[0]&&9===t[1]&&t[2]<1||t[0]>=4)throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")}};f.jQueryDetection(),o.default.fn.emulateTransitionEnd=c,o.default.event.special[f.TRANSITION_END]={bindType:d,delegateType:d,handle:function(t){if(o.default(t.target).is(this))return t.handleObj.handler.apply(this,arguments)}};var h=o.default.fn.alert,g=function(){function t(t){this._element=t}var e=t.prototype;return e.close=function(t){var e=this._element;t&&(e=this._getRootElement(t)),this._triggerCloseEvent(e).isDefaultPrevented()||this._removeElement(e)}
vendor: 33,584 bytes, line 15
15,e.dispose=function(){o.default.removeData(this._element,"bs.alert"),this._element=null},e._getRootElement=function(t){var e=f.getSelectorFromElement(t),n=!1;return e&&(n=document.querySelector(e)),n||(n=o.default(t).closest(".alert")[0]),n},e._triggerCloseEvent=function(t){var e=o.default.Event("close.bs.alert");return o.default(t).trigger(e),e},e._removeElement=function(t){var e=this;if(o.default(t).removeClass("show"),o.default(t).hasClass("fade")){var n=f.getTransitionDurationFromElement(t);o.default(t).one(f.TRANSITION_END,function(n){return e._destroyElement(t,n)}).emulateTransitionEnd(n)}else this._destroyElement(t)},e._destroyElement=function(t){o.default(t).detach().trigger("closed.bs.alert").remove()},t._jQueryInterface=function(e){return this.each(function(){var n=o.default(this),i=n.data("bs.alert");i||(i=new t(this),n.data("bs.alert",i)),"close"===e&&i[e](this)})},t._handleDismiss=function(t){return function(e){e&&e.preventDefault(),t.close(this)}},l(t,null,[{key:"VERSION",get:function(){return"4.6.2"}}]),t}();o.default(document).on("click.bs.alert.data-api",'[data-dismiss="alert"]',g._handleDismiss(new g)),o.default.fn.alert=g._jQueryInterface,o.default.fn.alert.Constructor=g,o.default.fn.alert.noConflict=function(){return o.default.fn.alert=h,g._jQueryInterface};var m=o.default.fn.button,p=function(){function t(t){this._element=t,this.shouldAvoidTriggerChange=!1}var e=t.prototype;return e.toggle=function(){var t=!0,e=!0,n=o.default(this._element).closest('[data-toggle="buttons"]')[0];if(n){var i=this._element.querySelector('input:not([type="hidden"])');if(i){if("radio"===i.type)if(i.checked&&this._element.classList.contains("active"))t=!1;else{var a=n.querySelector(".active");a&&o.default(a).removeClass("active")}t&&("checkbox"!==i.type&&"radio"!==i.type||(i.checked=!this._element.classList.contains("active")),this.shouldAvoidTriggerChange||o.default(i).trigger("change")),i.focus(),e=!1}}this._element.hasAttribute("disabled")||this._element.classList.contains("disabled")||(e&&this._element.setAttribute("aria-pressed",!this._element.classList.contains("active")),t&&o.default(this._element).toggleClass("active"))},e.dispose=function(){o.default.removeData(this._element,"bs.button"),this._element=null},t._jQueryInterface=function(e,n){return this.each(function(){var i=o.default(this),a=i.data("bs.button");a||(a=new t(this),i.data("bs.button",a)),a.shouldAvoidTriggerChange=n,"toggle"===e&&a[e]()})},l(t,null,[{key:"VERSION",get:function(){return"4.6.2"}}]),t}();o.default(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(t){var e=t.target,n=e;if(o.default(e).hasClass("btn")||(e=o.default(e).closest(".btn")[0]),!e||e.hasAttribute("disabled")||e.classList.contains("disabled"))t.preventDefault();else{var i=e.querySelector('input:not([type="hidden"])');if(i&&(i.hasAttribute("disabled")||i.classList.contains("disabled")))return void t.preventDefault();"INPUT"!==n.tagName&&"LABEL"===e.tagName||p._jQueryInterface.call(o.default(e),"toggle","INPUT"===n.tagName)}}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(t){var e=o.default(t.target).closest(".btn")[0];o.default(e).toggleClass("focus",/^focus(in)?$/.test(t.type))}),o.default(window).on("load.bs.button.data-api",function(){for(var t=[].slice.call(document.querySelectorAll('[data-toggle="buttons"] .btn')),e=0,n=t.length;e<n;e++){var i=t[e],o=i.querySelector('input:not([type="hidden"])');o.checked||o.hasAttribute("checked")?i.classList.add("active"):i.classList.remove("active")}for(var a=0,s=(t=[].slice.call(document.querySelectorAll('[data-toggle="button"]'))).length;a<s;a++){var l=t[a];"true"===l.getAttribute("aria-pressed")?l.classList.add("active"):l.classList.remove("active")}}),o.default.fn.button=p._jQueryInterface,o.default.fn.button.Constructor=p,o.default.fn.button.noConflict=function(){return o.default.fn.button=m,p._jQueryInterface};var _="carousel",v=".bs.carousel",b=o.default.fn[_],y=".carousel-indicators",E={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0,touch:!0},w={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean",touch:"boolean"},T={TOUCH:"touch",PEN:"pen"},C=function(){function t(t,e){this._items=null,this._interval=null,this._activeElement=null,this._isPaused=!1,this._isSliding=!1,this.touchTimeout=null,this.touchStartX=0,this.touchDeltaX=0,this._config=this._getConfig(e),this._element=t,this._indicatorsElement=this._element.querySelector(y),this._touchSupported="ontouchstart"in document.documentElement||navigator.maxTouchPoints>0,this._pointerEvent=Boolean(window.PointerEvent||window.MSPointerEvent),this._addEventListeners()}var e=t.prototype;return e.next=function(){this._isSliding||this._slide("next")},e.nextWhenVisible=function(){var t=o.default(this._element);!document.hidden&&t.is(":visible")&&"hidden"!==t.css("visibility")&&this.next()},e.prev=function(){this._isSliding||this._slide("prev")},e.pause=function(t){t||(this._isPaused=!0),this._element.querySelector(".carousel-item-next, .carousel-item-prev")&&(f.triggerTransitionEnd(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null},e.cycle=function(t){t||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config.interval&&!this._isPaused&&(this._updateInterval(),this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))},e.to=function(t){var e=this;this._activeElement=this._element.querySelector(".active.carousel-item");var n=this._getItemIndex(this._activeElement);if(!(t>this._items.length-1||t<0))if(this._isSliding)o.default(this._element).one("slid.bs.carousel",function(){return e.to(t)});else{if(n===t)return this.pause(),void this.cycle();var i=t>n?"next":"prev";this._slide(i,this._items[t])}},e.dispose=function(){o.default(this._element).off(v),o.default.removeData(this._element,"bs.carousel"),this._items=null,this._config=null,this._element=null,this._interval=null,this._isPaused=null,this._isSliding=null,this._activeElement=null,this._indicatorsElement=null},e._getConfig=function(t){return t=r({},E,t),f.typeCheckConfig(_,t,w),t},e._handleSwipe=function(){var t=Math.abs(this.touchDeltaX);if(!(t<=40)){var e=t/this.touchDeltaX;this.touchDeltaX=0,e>0&&this.prev(),e<0&&this.next()}},e._addEventListeners=function(){var t=this;this._config.keyboard&&o.default(this._element).on("keydown.bs.carousel",function(e){return t._keydown(e)}),"hover"===this._config.pause&&o.default(this._element).on("mouseenter.bs.carousel",function(e){return t.pause(e)}).on("mouseleave.bs.carousel",function(e){return t.cycle(e)}),this._config.touch&&this._addTouchEventListeners()},e._addTouchEventListeners=function(){var t=this;if(this._touchSupported){var e=function(e){t._pointerEvent&&T[e.originalEvent.pointerType.toUpperCase()]?t.touchStartX=e.originalEvent.clientX:t._pointerEvent||(t.touchStartX=e.originalEvent.touches[0].clientX)},n=function(e){t._pointerEvent&&T[e.originalEvent.pointerType.toUpperCase()]&&(t.touchDeltaX=e.originalEvent.clientX-t.touchStartX),t._handleSwipe(),"hover"===t._config.pause&&(t.pause(),t.touchTimeout&&clearTimeout(t.touchTimeout),t.touchTimeout=setTimeout(function(e){return t.cycle(e)},500+t._config.interval))};o.default(this._element.querySelectorAll(".carousel-item img")).on("dragstart.bs.carousel",function(t){return t.preventDefault()}),this._pointerEvent?(o.default(this._element).on("pointerdown.bs.carousel",function(t){return e(t)}),o.default(this._element).on("pointerup.bs.carousel",function(t){return n(t)}),this._element.classList.add("pointer-event")):(o.default(this._element).on("touchstart.bs.carousel",function(t){return e(t)}),o.default(this._element).on("touchmove.bs.carousel",function(e){return function(e){t.touchDeltaX=e.originalEvent.touches&&e.originalEvent.touches.length>1?0:e.originalEvent.touches[0].clientX-t.touchStartX}(e)}),o.default(this._element).on("touchend.bs.carousel",function(t){return n(t)}))}},e._keydown=function(t){if(!/input|textarea/i.test(t.target.tagName))switch(t.which){case 37:t.preventDefault(),this.prev();break;case 39:t.preventDefault(),this.next()}},e._getItemIndex=function(t){return this._items=t&&t.parentNode?[].slice.call(t.parentNode.querySelectorAll(".carousel-item")):[],this._items.indexOf(t)},e._getItemByDirection=function(t,e){var n="next"===t,i="prev"===t,o=this._getItemIndex(e),a=this._items.length-1;if((i&&0===o||n&&o===a)&&!this._config.wrap)return e;var s=(o+("prev"===t?-1:1))%this._items.length;return-1===s?this._items[this._items.length-1]:this._items[s]},e._triggerSlideEvent=function(t,e){var n=this._getItemIndex(t),i=this._getItemIndex(this._element.querySelector(".active.carousel-item")),a=o.default.Event("slide.bs.carousel",{relatedTarget:t,direction:e,from:i,to:n});return o.default(this._element).trigger(a),a},e._setActiveIndicatorElement=function(t){if(this._indicatorsElement){var e=[].slice.call(this._indicatorsElement.querySelectorAll(".active"));o.default(e).removeClass("active");var n=this._indicatorsElement.children[this._getItemIndex(t)];n&&o.default(n).addClass("active")}},e._updateInterval=function(){var t=this._activeElement||this._element.querySelector(".active.carousel-item");if(t){var e=parseInt(t.getAttribute("data-interval"),10);e?(this._config.defaultInterval=this._config.defaultInterval||this._config.interval,this._config.interval=e):this._config.interval=this._config.defaultInterval||this._config.interval}},e._slide=function(t,e){var n,i,a,s=this,l=this._element.querySelector(".active.carousel-item"),r=this._getItemIndex(l),u=e||l&&this._getItemByDirection(t,l),d=this._getItemIndex(u),c=Boolean(this._interval);if("next"===t?(n="carousel-item-left",i="carousel-item-next",a="left"):(n="carousel-item-right",i="carousel-item-prev",a="right"),u&&o.default(u).hasClass("active"))this._isSliding=!1;else if(!this._triggerSlideEvent(u,a).isDefaultPrevented()&&l&&u){this._isSliding=!0,c&&this.pause(),this._setActiveIndicatorElement(u),this._activeElement=u;var h=o.default.Event("slid.bs.carousel",{relatedTarget:u,direction:a,from:r,to:d});if(o.default(this._element).hasClass("slide")){o.default(u).addClass(i),f.reflow(u),o.default(l).addClass(n),o.default(u).addClass(n);var g=f.getTransitionDurationFromElement(l);o.default(l).one(f.TRANSITION_END,function(){o.default(u).removeClass(n+" "+i).addClass("active"),o.default(l).removeClass("active "+i+" "+n),s._isSliding=!1,setTimeout(function(){return o.default(s._element).trigger(h)},0)}).emulateTransitionEnd(g)}else o.default(l).removeClass("active"),o.default(u).addClass("active"),this._isSliding=!1,o.default(this._element).trigger(h);c&&this.cycle()}},t._jQueryInterface=function(e){return this.each(function(){var n=o.default(this).data("bs.carousel"),i=r({},E,o.default(this).data());"object"==typeof e&&(i=r({},i,e));var a="string"==typeof e?e:i.slide;if(n||(n=new t(this,i),o.default(this).data("bs.carousel",n)),"number"==typeof e)n.to(e);else if("string"==typeof a){if(void 0===n[a])throw new TypeError('No method named "'+a+'"');n[a]()}else i.interval&&i.ride&&(n.pause(),n.cycle())})},t._dataApiClickHandler=function(e){var n=f.getSelectorFromElement(this);if(n){var i=o.default(n)[0];if(i&&o.default(i).hasClass("carousel")){var a=r({},o.default(i).data(),o.default(this).data()),s=this.getAttribute("data-slide-to");s&&(a.interval=!1),t._jQueryInterface.call(o.default(i),a),s&&o.default(i).data("bs.carousel").to(s),e.preventDefault()}}},l(t,null,[{key:"VERSION",get:function(){return"4.6.2"}},{key:"Default",get:function(){return E}}]),t}();o.default(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",C._dataApiClickHandler),o.default(window).on("load.bs.carousel.data-api",function(){for(var t=[].slice.call(document.querySelectorAll('[data-ride="carousel"]')),e=0,n=t.length;e<n;e++){var i=o.default(t[e]);C._jQueryInterface.call(i,i.data())}}),o.default.fn[_]=C._jQueryInterface,o.default.fn[_].Constructor=C,o.default.fn[_].noConflict=function(){return o.default.fn[_]=b,C._jQueryInterface};var S="collapse",N=o.default.fn[S],D='[data-toggle="collapse"]',k={toggle:!0,parent:""},A={toggle:"boolean",parent:"(string|element)"},I=function(){function t(t,e){this._isTransitioning=!1,this._element=t,this._config=this._getConfig(e),this._triggerArray=[].slice.call(document.querySelectorAll('[data-toggle="collapse"][href="#'+t.id+'"],[data-toggle="collapse"][data-target="#'+t.id+'"]'));for(var n=[].slice.call(document.querySelectorAll(D)),i=0,o=n.length;i<o;i++){var a=n[i],s=f.getSelectorFromElement(a),l=[].slice.call(document.querySelectorAll(s)).filter(function(e){return e===t});null!==s&&l.length>0&&(this._selector=s,this._triggerArray.push(a))}this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle()}var e=t.prototype;return e.toggle=function(){o.default(this._element).hasClass("show")?this.hide():this.show()},e.show=function(){var e,n,i=this;if(!this._isTransitioning&&!o.default(this._element).hasClass("show")&&(this._parent&&0===(e=[].slice.call(this._parent.querySelectorAll(".show, .collapsing")).filter(function(t){return"string"==typeof i._config.parent?t.getAttribute("data-parent")===i._config.parent:t.classList.contains("collapse")})).length&&(e=null),!(e&&(n=o.default(e).not(this._selector).data("bs.collapse"))&&n._isTransitioning))){var a=o.default.Event("show.bs.collapse");if(o.default(this._element).trigger(a),!a.isDefaultPrevented()){e&&(t._jQueryInterface.call(o.default(e).not(this._selector),"hide"),n||o.default(e).data("bs.collapse",null));var s=this._getDimension();o.default(this._element).removeClass("collapse").addClass("collapsing"),this._element.style[s]=0,this._triggerArray.length&&o.default(this._triggerArray).removeClass("collapsed").attr("aria-expanded",!0),this.setTransitioning(!0);var l="scroll"+(s[0].toUpperCase()+s.slice(1)),r=f.getTransitionDurationFromElement(this._element);o.default(this._element).one(f.TRANSITION_END,function(){o.default(i._element).removeClass("collapsing").addClass("collapse show"),i._element.style[s]="",i.setTransitioning(!1),o.default(i._element).trigger("shown.bs.collapse")}).emulateTransitionEnd(r),this._element.style[s]=this._element[l]+"px"}}},e.hide=function(){var t=this;if(!this._isTransitioning&&o.default(this._element).hasClass("show")){var e=o.default.Event("hide.bs.collapse");if(o.default(this._element).trigger(e),!e.isDefaultPrevented()){var n=this._getDimension();this._element.style[n]=this._element.getBoundingClientRect()[n]+"px",f.reflow(this._element),o.default(this._element).addClass("collapsing").removeClass("collapse show");var i=this._triggerArray.length;if(i>0)for(var a=0;a<i;a++){var s=this._triggerArray[a],l=f.getSelectorFromElement(s);if(null!==l)o.default([].slice.call(document.querySelectorAll(l))).hasClass("show")||o.default(s).addClass("collapsed").attr("aria-expanded",!1)}this.setTransitioning(!0);this._element.style[n]="";var r=f.getTransitionDurationFromElement(this._element);o.default(this._element).one(f.TRANSITION_END,function(){t.setTransitioning(!1),o.default(t._element).removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")}).emulateTransitionEnd(r)}}},e.setTransitioning=function(t){this._isTransitioning=t},e.dispose=function(){o.default.removeData(this._element,"bs.collapse"),this._config=null,this._parent=null,this._element=null,this._triggerArray=null,this._isTransitioning=null},e._getConfig=function(t){return(t=r({},k,t)).toggle=Boolean(t.toggle),f.typeCheckConfig(S,t,A),t},e._getDimension=function(){return o.default(this._element).hasClass("width")?"width":"height"},e._getParent=function(){var e,n=this;f.isElement(this._config.parent)?(e=this._config.parent,void 0!==this._config.parent.jquery&&(e=this._config.parent[0])):e=document.querySelector(this._config.parent);var i='[data-toggle="collapse"][data-parent="'+this._config.parent+'"]',a=[].slice.call(e.querySelectorAll(i));return o.default(a).each(function(e,i){n._addAriaAndCollapsedClass(t._getTargetFromElement(i),[i])}),e},e._addAriaAndCollapsedClass=function(t,e){var n=o.default(t).hasClass("show");e.length&&o.default(e).toggleClass("collapsed",!n).attr("aria-expanded",n)},t._getTargetFromElement=function(t){var e=f.getSelectorFromElement(t);return e?document.querySelector(e):null},t._jQueryInterface=function(e){return this.each(function(){var n=o.default(this),i=n.data("bs.collapse"),a=r({},k,n.data(),"object"==typeof e&&e?e:{});if(!i&&a.toggle&&"string"==typeof e&&/show|hide/.test(e)&&(a.toggle=!1),i||(i=new t(this,a),n.data("bs.collapse",i)),"string"==typeof e){if(void 0===i[e])throw new TypeError('No method named "'+e+'"');i[e]()}})},l(t,null,[{key:"VERSION",get:function(){return"4.6.2"}},{key:"Default",get:function(){return k}}]),t}();o.default(document).on("click.bs.collapse.data-api",D,function(t){"A"===t.currentTarget.tagName&&t.preventDefault();var e=o.default(this),n=f.getSelectorFromElement(this),i=[].slice.call(document.querySelectorAll(n));o.default(i).each(function(){var t=o.default(this),n=t.data("bs.collapse")?"toggle":e.data();I._jQueryInterface.call(t,n)})}),o.default.fn[S]=I._jQueryInterface,o.default.fn[S].Constructor=I,o.default.fn[S].noConflict=function(){return o.default.fn[S]=N,I._jQueryInterface};var O="dropdown",j=o.default.fn[O],P=new RegExp("38|40|27"),x={offset:0,flip:!0,boundary:"scrollParent",reference:"toggle",display:"dynamic",popperConfig:null},L={offset:"(number|string|function)",flip:"boolean",boundary:"(string|element)",reference:"(string|element)",display:"string",popperConfig:"(null|object)"},R=function(){function t(t,e){this._element=t,this._popper=null,this._config=this._getConfig(e),this._menu=this._getMenuElement(),this._inNavbar=this._detectNavbar(),this._addEventListeners()}var e=t.prototype;return e.toggle=function(){if(!this._element.disabled&&!o.default(this._element).hasClass("disabled")){var e=o.default(this._menu).hasClass("show");t._clearMenus(),e||this.show(!0)}},e.show=function(e){if(void 0===e&&(e=!1),!(this._element.disabled||o.default(this._element).hasClass("disabled")||o.default(this._menu).hasClass("show"))){var n={relatedTarget:this._element},i=o.default.Event("show.bs.dropdown",n),s=t._getParentFromElement(this._element);if(o.default(s).trigger(i),!i.isDefaultPrevented()){if(!this._inNavbar&&e){if(void 0===a.default)throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");var l=this._element;"parent"===this._config.reference?l=s:f.isElement(this._config.reference)&&(l=this._config.reference,void 0!==this._config.reference.jquery&&(l=this._config.reference[0])),"scrollParent"!==this._config.boundary&&o.default(s).addClass("position-static"),this._popper=new a.default(l,this._menu,this._getPopperConfig())}"ontouchstart"in document.documentElement&&0===o.default(s).closest(".navbar-nav").length&&o.default(document.body).children().on("mouseover",null,o.default.noop),this._element.focus(),this._element.setAttribute("aria-expanded",!0),o.default(this._menu).toggleClass("show"),o.default(s).toggleClass("show").trigger(o.default.Event("shown.bs.dropdown",n))}}},e.hide=function(){if(!this._element.disabled&&!o.default(this._element).hasClass("disabled")&&o.default(this._menu).hasClass("show")){var e={relatedTarget:this._element},n=o.default.Event("hide.bs.dropdown",e),i=t._getParentFromElement(this._element);o.default(i).trigger(n),n.isDefaultPrevented()||(this._popper&&this._popper.destroy(),o.default(this._menu).toggleClass("show"),o.default(i).toggleClass("show").trigger(o.default.Event("hidden.bs.dropdown",e)))}},e.dispose=function(){o.default.removeData(this._element,"bs.dropdown"),o.default(this._element).off(".bs.dropdown"),this._element=null,this._menu=null,null!==this._popper&&(this._popper.destroy(),this._popper=null)},e.update=function(){this._inNavbar=this._detectNavbar(),null!==this._popper&&this._popper.scheduleUpdate()},e._addEventListeners=function(){var t=this;o.default(this._element).on("click.bs.dropdown",function(e){e.preventDefault(),e.stopPropagation(),t.toggle()})},e._getConfig=function(t){return t=r({},this.constructor.Default,o.default(this._element).data(),t),f.typeCheckConfig(O,t,this.constructor.DefaultType),t},e._getMenuElement=function(){if(!this._menu){var e=t._getParentFromElement(this._element);e&&(this._menu=e.querySelector(".dropdown-menu"))}return this._menu},e._getPlacement=function(){var t=o.default(this._element.parentNode),e="bottom-start";return t.hasClass("dropup")?e=o.default(this._menu).hasClass("dropdown-menu-right")?"top-end":"top-start":t.hasClass("dropright")?e="right-start":t.hasClass("dropleft")?e="left-start":o.default(this._menu).hasClass("dropdown-menu-right")&&(e="bottom-end"),e},e._detectNavbar=function(){return o.default(this._element).closest(".navbar").length>0},e._getOffset=function(){var t=this,e={};return"function"==typeof this._config.offset?e.fn=function(e){return e.offsets=r({},e.offsets,t._config.offset(e.offsets,t._element)),e}:e.offset=this._config.offset,e},e._getPopperConfig=function(){var t={placement:this._getPlacement(),modifiers:{offset:this._getOffset(),flip:{enabled:this._config.flip},preventOverflow:{boundariesElement:this._config.boundary}}};return"static"===this._config.display&&(t.modifiers.applyStyle={enabled:!1}),r({},t,this._config.popperConfig)},t._jQueryInterface=function(e){return this.each(function(){var n=o.default(this).data("bs.dropdown");if(n||(n=new t(this,"object"==typeof e?e:null),o.default(this).data("bs.dropdown",n)),"string"==typeof e){if(void 0===n[e])throw new TypeError('No method named "'+e+'"');n[e]()}})},t._clearMenus=function(e){if(!e||3!==e.which&&("keyup"!==e.type||9===e.which))for(var n=[].slice.call(document.querySelectorAll('[data-toggle="dropdown"]')),i=0,a=n.length;i<a;i++){var s=t._getParentFromElement(n[i]),l=o.default(n[i]).data("bs.dropdown"),r={relatedTarget:n[i]};if(e&&"click"===e.type&&(r.clickEvent=e),l){var u=l._menu;if(o.default(s).hasClass("show")&&!(e&&("click"===e.type&&/input|textarea/i.test(e.target.tagName)||"keyup"===e.type&&9===e.which)&&o.default.contains(s,e.target))){var d=o.default.Event("hide.bs.dropdown",r);o.default(s).trigger(d),d.isDefaultPrevented()||("ontouchstart"in document.documentElement&&o.default(document.body).children().off("mouseover",null,o.default.noop),n[i].setAttribute("aria-expanded","false"),l._popper&&l._popper.destroy(),o.default(u).removeClass("show"),o.default(s).removeClass("show").trigger(o.default.Event("hidden.bs.dropdown",r)))}}}},t._getParentFromElement=function(t){var e,n=f.getSelectorFromElement(t);return n&&(e=document.querySelector(n)),e||t.parentNode},t._dataApiKeydownHandler=function(e){if((/input|textarea/i.test(e.target.tagName)?!(32===e.which||27!==e.which&&(40!==e.which&&38!==e.which||o.default(e.target).closest(".dropdown-menu").length)):P.test(e.which))&&!this.disabled&&!o.default(this).hasClass("disabled")){var n=t._getParentFromElement(this),i=o.default(n).hasClass("show");if(i||27!==e.which){if(e.preventDefault(),e.stopPropagation(),!i||27===e.which||32===e.which)return 27===e.which&&o.default(n.querySelector('[data-toggle="dropdown"]')).trigger("focus"),void o.default(this).trigger("click");var a=[].slice.call(n.querySelectorAll(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)")).filter(function(t){return o.default(t).is(":visible")});if(0!==a.length){var s=a.indexOf(e.target);38===e.which&&s>0&&s--,40===e.which&&s<a.length-1&&s++,s<0&&(s=0),a[s].focus()}}}},l(t,null,[{key:"VERSION",get:function(){return"4.6.2"}},{key:"Default",get:function(){return x}},{key:"DefaultType",get:function(){return L}}]),t}();o.default(document).on("keydown.bs.dropdown.data-api",'[data-toggle="dropdown"]',R._dataApiKeydownHandler).on("keydown.bs.dropdown.data-api",".dropdown-menu",R._dataApiKeydownHandler).on("click.bs.dropdown.data-api keyup.bs.dropdown.data-api",R._clearMenus).on("click.bs.dropdown.data-api",'[data-toggle="dropdown"]',function(t){t.preventDefault(),t.stopPropagation(),R._jQueryInterface.call(o.default(this),"toggle")}).on("click.bs.dropdown.data-api",".dropdown form",function(t){t.stopPropagation()}),o.default.fn[O]=R._jQueryInterface,o.default.fn[O].Constructor=R,o.default.fn[O].noConflict=function(){return o.default.fn[O]=j,R._jQueryInterface};var q=o.default.fn.modal,F=".modal-dialog",Q={backdrop:!0,keyboard:!0,focus:!0,show:!0},B={backdrop:"(boolean|string)",keyboard:"boolean",focus:"boolean",show:"boolean"},H=function(){function t(t,e){this._config=this._getConfig(e),this._element=t,this._dialog=t.querySelector(F),this._backdrop=null,this._isShown=!1,this._isBodyOverflowing=!1,this._ignoreBackdropClick=!1,this._isTransitioning=!1,this._scrollbarWidth=0}var e=t.prototype;return e.toggle=function(t){return this._isShown?this.hide():this.show(t)},e.show=function(t){var e=this;if(!this._isShown&&!this._isTransitioning){var n=o.default.Event("show.bs.modal",{relatedTarget:t});o.default(this._element).trigger(n),n.isDefaultPrevented()||(this._isShown=!0,o.default(this._element).hasClass("fade")&&(this._isTransitioning=!0),this._checkScrollbar(),this._setScrollbar(),this._adjustDialog(),this._setEscapeEvent(),this._setResizeEvent(),o.default(this._element).on("click.dismiss.bs.modal",'[data-dismiss="modal"]',function(t){return e.hide(t)}),o.default(this._dialog).on("mousedown.dismiss.bs.modal",function(){o.default(e._element).one("mouseup.dismiss.bs.modal",function(t){o.default(t.target).is(e._element)&&(e._ignoreBackdropClick=!0)})}),this._showBackdrop(function(){return e._showElement(t)}))}},e.hide=function(t){var e=this;if(t&&t.preventDefault(),this._isShown&&!this._isTransitioning){var n=o.default.Event("hide.bs.modal");if(o.default(this._element).trigger(n),this._isShown&&!n.isDefaultPrevented()){this._isShown=!1;var i=o.default(this._element).hasClass("fade");if(i&&(this._isTransitioning=!0),this._setEscapeEvent(),this._setResizeEvent(),o.default(document).off("focusin.bs.modal"),o.default(this._element).removeClass("show"),o.default(this._element).off("click.dismiss.bs.modal"),o.default(this._dialog).off("mousedown.dismiss.bs.modal"),i){var a=f.getTransitionDurationFromElement(this._element);o.default(this._element).one(f.TRANSITION_END,function(t){return e._hideModal(t)}).emulateTransitionEnd(a)}else this._hideModal()}}},e.dispose=function(){[window,this._element,this._dialog].forEach(function(t){return o.default(t).off(".bs.modal")}),o.default(document).off("focusin.bs.modal"),o.default.removeData(this._element,"bs.modal"),this._config=null,this._element=null,this._dialog=null,this._backdrop=null,this._isShown=null,this._isBodyOverflowing=null,this._ignoreBackdropClick=null,this._isTransitioning=null,this._scrollbarWidth=null},e.handleUpdate=function(){this._adjustDialog()},e._getConfig=function(t){return t=r({},Q,t),f.typeCheckConfig("modal",t,B),t},e._triggerBackdropTransition=function(){var t=this,e=o.default.Event("hidePrevented.bs.modal");if(o.default(this._element).trigger(e),!e.isDefaultPrevented()){var n=this._element.scrollHeight>document.documentElement.clientHeight;n||(this._element.style.overflowY="hidden"),this._element.classList.add("modal-static");var i=f.getTransitionDurationFromElement(this._dialog);o.default(this._element).off(f.TRANSITION_END),o.default(this._element).one(f.TRANSITION_END,function(){t._element.classList.remove("modal-static"),n||o.default(t._element).one(f.TRANSITION_END,function(){t._element.style.overflowY=""}).emulateTransitionEnd(t._element,i)}).emulateTransitionEnd(i),this._element.focus()}},e._showElement=function(t){var e=this,n=o.default(this._element).hasClass("fade"),i=this._dialog?this._dialog.querySelector(".modal-body"):null;this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE||document.body.appendChild(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),o.default(this._dialog).hasClass("modal-dialog-scrollable")&&i?i.scrollTop=0:this._element.scrollTop=0,n&&f.reflow(this._element),o.default(this._element).addClass("show"),this._config.focus&&this._enforceFocus();var a=o.default.Event("shown.bs.modal",{relatedTarget:t}),s=function(){e._config.focus&&e._element.focus(),e._isTransitioning=!1,o.default(e._element).trigger(a)};if(n){var l=f.getTransitionDurationFromElement(this._dialog);o.default(this._dialog).one(f.TRANSITION_END,s).emulateTransitionEnd(l)}else s()},e._enforceFocus=function(){var t=this;o.default(document).off("focusin.bs.modal").on("focusin.bs.modal",function(e){document!==e.target&&t._element!==e.target&&0===o.default(t._element).has(e.target).length&&t._element.focus()})},e._setEscapeEvent=function(){var t=this;this._isShown?o.default(this._element).on("keydown.dismiss.bs.modal",function(e){t._config.keyboard&&27===e.which?(e.preventDefault(),t.hide()):t._config.keyboard||27!==e.which||t._triggerBackdropTransition()}):this._isShown||o.default(this._element).off("keydown.dismiss.bs.modal")},e._setResizeEvent=function(){var t=this;this._isShown?o.default(window).on("resize.bs.modal",function(e){return t.handleUpdate(e)}):o.default(window).off("resize.bs.modal")},e._hideModal=function(){var t=this;this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._showBackdrop(function(){o.default(document.body).removeClass("modal-open"),t._resetAdjustments(),t._resetScrollbar(),o.default(t._element).trigger("hidden.bs.modal")})},e._removeBackdrop=function(){this._backdrop&&(o.default(this._backdrop).remove(),this._backdrop=null)},e._showBackdrop=function(t){var e=this,n=o.default(this._element).hasClass("fade")?"fade":"";if(this._isShown&&this._config.backdrop){if(this._backdrop=document.createElement("div"),this._backdrop.className="modal-backdrop",n&&this._backdrop.classList.add(n),o.default(this._backdrop).appendTo(document.body),o.default(this._element).on("click.dismiss.bs.modal",function(t){e._ignoreBackdropClick?e._ignoreBackdropClick=!1:t.target===t.currentTarget&&("static"===e._config.backdrop?e._triggerBackdropTransition():e.hide())}),n&&f.reflow(this._backdrop),o.default(this._backdrop).addClass("show"),!t)return;if(!n)return void t();var i=f.getTransitionDurationFromElement(this._backdrop);o.default(this._backdrop).one(f.TRANSITION_END,t).emulateTransitionEnd(i)}else if(!this._isShown&&this._backdrop){o.default(this._backdrop).removeClass("show");var a=function(){e._removeBackdrop(),t&&t()};if(o.default(this._element).hasClass("fade")){var s=f.getTransitionDurationFromElement(this._backdrop);o.default(this._backdrop).one(f.TRANSITION_END,a).emulateTransitionEnd(s)}else a()}else t&&t()},e._adjustDialog=function(){var t=this._element.scrollHeight>document.documentElement.clientHeight;!this._isBodyOverflowing&&t&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!t&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},e._resetAdjustments=function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},e._checkScrollbar=function(){var t=document.body.getBoundingClientRect();this._isBodyOverflowing=Math.round(t.left+t.right)<window.innerWidth,this._scrollbarWidth=this._getScrollbarWidth()},e._setScrollbar=function(){var t=this;if(this._isBodyOverflowing){var e=[].slice.call(document.querySelectorAll(".fixed-top, .fixed-bottom, .is-fixed, .sticky-top")),n=[].slice.call(document.querySelectorAll(".sticky-top"));o.default(e).each(function(e,n){var i=n.style.paddingRight,a=o.default(n).css("padding-right");o.default(n).data("padding-right",i).css("padding-right",parseFloat(a)+t._scrollbarWidth+"px")}),o.default(n).each(function(e,n){var i=n.style.marginRight,a=o.default(n).css("margin-right");o.default(n).data("margin-right",i).css("margin-right",parseFloat(a)-t._scrollbarWidth+"px")});var i=document.body.style.paddingRight,a=o.default(document.body).css("padding-right");o.default(document.body).data("padding-right",i).css("padding-right",parseFloat(a)+this._scrollbarWidth+"px")}o.default(document.body).addClass("modal-open")},e._resetScrollbar=function(){var t=[].slice.call(document.querySelectorAll(".fixed-top, .fixed-bottom, .is-fixed, .sticky-top"));o.default(t).each(function(t,e){var n=o.default(e).data("padding-right");o.default(e).removeData("padding-right"),e.style.paddingRight=n||""});var e=[].slice.call(document.querySelectorAll(".sticky-top"));o.default(e).each(function(t,e){var n=o.default(e).data("margin-right");void 0!==n&&o.default(e).css("margin-right",n).removeData("margin-right")});var n=o.default(document.body).data("padding-right");o.default(document.body).removeData("padding-right"),document.body.style.paddingRight=n||""},e._getScrollbarWidth=function(){var t=document.createElement("div");t.className="modal-scrollbar-measure",document.body.appendChild(t);var e=t.getBoundingClientRect().width-t.clientWidth;return document.body.removeChild(t),e},t._jQueryInterface=function(e,n){return this.each(function(){var i=o.default(this).data("bs.modal"),a=r({},Q,o.default(this).data(),"object"==typeof e&&e?e:{});if(i||(i=new t(this,a),o.default(this).data("bs.modal",i)),"string"==typeof e){if(void 0===i[e])throw new TypeError('No method n
15amed "'+e+'"');i[e](n)}else a.show&&i.show(n)})},l(t,null,[{key:"VERSION",get:function(){return"4.6.2"}},{key:"Default",get:function(){return Q}}]),t}();o.default(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(t){var e,n=this,i=f.getSelectorFromElement(this);i&&(e=document.querySelector(i));var a=o.default(e).data("bs.modal")?"toggle":r({},o.default(e).data(),o.default(this).data());"A"!==this.tagName&&"AREA"!==this.tagName||t.preventDefault();var s=o.default(e).one("show.bs.modal",function(t){t.isDefaultPrevented()||s.one("hidden.bs.modal",function(){o.default(n).is(":visible")&&n.focus()})});H._jQueryInterface.call(o.default(e),a,this)}),o.default.fn.modal=H._jQueryInterface,o.default.fn.modal.Constructor=H,o.default.fn.modal.noConflict=function(){return o.default.fn.modal=q,H._jQueryInterface};var U=["background","cite","href","itemtype","longdesc","poster","src","xlink:href"],M={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},W=/^(?:(?:https?|mailto|ftp|tel|file|sms):|[^#&/:?]*(?:[#/?]|$))/i,V=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i;function z(t,e,n){if(0===t.length)return t;if(n&&"function"==typeof n)return n(t);for(var i=(new window.DOMParser).parseFromString(t,"text/html"),o=Object.keys(e),a=[].slice.call(i.body.querySelectorAll("*")),s=function(t,n){var i=a[t],s=i.nodeName.toLowerCase();if(-1===o.indexOf(i.nodeName.toLowerCase()))return i.parentNode.removeChild(i),"continue";var l=[].slice.call(i.attributes),r=[].concat(e["*"]||[],e[s]||[]);l.forEach(function(t){(function(t,e){var n=t.nodeName.toLowerCase();if(-1!==e.indexOf(n))return-1===U.indexOf(n)||Boolean(W.test(t.nodeValue)||V.test(t.nodeValue));for(var i=e.filter(function(t){return t instanceof RegExp}),o=0,a=i.length;o<a;o++)if(i[o].test(n))return!0;return!1})(t,r)||i.removeAttribute(t.nodeName)})},l=0,r=a.length;l<r;l++)s(l);return i.body.innerHTML}var K="tooltip",X=o.default.fn.tooltip,Y=new RegExp("(^|\\s)bs-tooltip\\S+","g"),$=["sanitize","whiteList","sanitizeFn"],J={AUTO:"auto",TOP:"top",RIGHT:"right",BOTTOM:"bottom",LEFT:"left"},G={animation:!0,template:'<div class="tooltip" role="tooltip"><div class="arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:0,container:!1,fallbackPlacement:"flip",boundary:"scrollParent",customClass:"",sanitize:!0,sanitizeFn:null,whiteList:M,popperConfig:null},Z={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"(number|string|function)",container:"(string|element|boolean)",fallbackPlacement:"(string|array)",boundary:"(string|element)",customClass:"(string|function)",sanitize:"boolean",sanitizeFn:"(null|function)",whiteList:"object",popperConfig:"(null|object)"},tt={HIDE:"hide.bs.tooltip",HIDDEN:"hidden.bs.tooltip",SHOW:"show.bs.tooltip",SHOWN:"shown.bs.tooltip",INSERTED:"inserted.bs.tooltip",CLICK:"click.bs.tooltip",FOCUSIN:"focusin.bs.tooltip",FOCUSOUT:"focusout.bs.tooltip",MOUSEENTER:"mouseenter.bs.tooltip",MOUSELEAVE:"mouseleave.bs.tooltip"},et=function(){function t(t,e){if(void 0===a.default)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this.element=t,this.config=this._getConfig(e),this.tip=null,this._setListeners()}var e=t.prototype;return e.enable=function(){this._isEnabled=!0},e.disable=function(){this._isEnabled=!1},e.toggleEnabled=function(){this._isEnabled=!this._isEnabled},e.toggle=function(t){if(this._isEnabled)if(t){var e=this.constructor.DATA_KEY,n=o.default(t.currentTarget).data(e);n||(n=new this.constructor(t.currentTarget,this._getDelegateConfig()),o.default(t.currentTarget).data(e,n)),n._activeTrigger.click=!n._activeTrigger.click,n._isWithActiveTrigger()?n._enter(null,n):n._leave(null,n)}else{if(o.default(this.getTipElement()).hasClass("show"))return void this._leave(null,this);this._enter(null,this)}},e.dispose=function(){clearTimeout(this._timeout),o.default.removeData(this.element,this.constructor.DATA_KEY),o.default(this.element).off(this.constructor.EVENT_KEY),o.default(this.element).closest(".modal").off("hide.bs.modal",this._hideModalHandler),this.tip&&o.default(this.tip).remove(),this._isEnabled=null,this._timeout=null,this._hoverState=null,this._activeTrigger=null,this._popper&&this._popper.destroy(),this._popper=null,this.element=null,this.config=null,this.tip=null},e.show=function(){var t=this;if("none"===o.default(this.element).css("display"))throw new Error("Please use show on visible elements");var e=o.default.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){o.default(this.element).trigger(e);var n=f.findShadowRoot(this.element),i=o.default.contains(null!==n?n:this.element.ownerDocument.documentElement,this.element);if(e.isDefaultPrevented()||!i)return;var s=this.getTipElement(),l=f.getUID(this.constructor.NAME);s.setAttribute("id",l),this.element.setAttribute("aria-describedby",l),this.setContent(),this.config.animation&&o.default(s).addClass("fade");var r="function"==typeof this.config.placement?this.config.placement.call(this,s,this.element):this.config.placement,u=this._getAttachment(r);this.addAttachmentClass(u);var d=this._getContainer();o.default(s).data(this.constructor.DATA_KEY,this),o.default.contains(this.element.ownerDocument.documentElement,this.tip)||o.default(s).appendTo(d),o.default(this.element).trigger(this.constructor.Event.INSERTED),this._popper=new a.default(this.element,s,this._getPopperConfig(u)),o.default(s).addClass("show"),o.default(s).addClass(this.config.customClass),"ontouchstart"in document.documentElement&&o.default(document.body).children().on("mouseover",null,o.default.noop);var c=function(){t.config.animation&&t._fixTransition();var e=t._hoverState;t._hoverState=null,o.default(t.element).trigger(t.constructor.Event.SHOWN),"out"===e&&t._leave(null,t)};if(o.default(this.tip).hasClass("fade")){var h=f.getTransitionDurationFromElement(this.tip);o.default(this.tip).one(f.TRANSITION_END,c).emulateTransitionEnd(h)}else c()}},e.hide=function(t){var e=this,n=this.getTipElement(),i=o.default.Event(this.constructor.Event.HIDE),a=function(){"show"!==e._hoverState&&n.parentNode&&n.parentNode.removeChild(n),e._cleanTipClass(),e.element.removeAttribute("aria-describedby"),o.default(e.element).trigger(e.constructor.Event.HIDDEN),null!==e._popper&&e._popper.destroy(),t&&t()};if(o.default(this.element).trigger(i),!i.isDefaultPrevented()){if
vendor: 5,839 bytes, line 15
15(o.default(n).removeClass("show"),"ontouchstart"in document.documentElement&&o.default(document.body).children().off("mouseover",null,o.default.noop),this._activeTrigger.click=!1,this._activeTrigger.focus=!1,this._activeTrigger.hover=!1,o.default(this.tip).hasClass("fade")){var s=f.getTransitionDurationFromElement(n);o.default(n).one(f.TRANSITION_END,a).emulateTransitionEnd(s)}else a();this._hoverState=""}},e.update=function(){null!==this._popper&&this._popper.scheduleUpdate()},e.isWithContent=function(){return Boolean(this.getTitle())},e.addAttachmentClass=function(t){o.default(this.getTipElement()).addClass("bs-tooltip-"+t)},e.getTipElement=function(){return this.tip=this.tip||o.default(this.config.template)[0],this.tip},e.setContent=function(){var t=this.getTipElement();this.setElementContent(o.default(t.querySelectorAll(".tooltip-inner")),this.getTitle()),o.default(t).removeClass("fade show")},e.setElementContent=function(t,e){"object"!=typeof e||!e.nodeType&&!e.jquery?this.config.html?(this.config.sanitize&&(e=z(e,this.config.whiteList,this.config.sanitizeFn)),t.html(e)):t.text(e):this.config.html?o.default(e).parent().is(t)||t.empty().append(e):t.text(o.default(e).text())},e.getTitle=function(){var t=this.element.getAttribute("data-original-title");return t||(t="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),t},e._getPopperConfig=function(t){var e=this;return r({},{placement:t,modifiers:{offset:this._getOffset(),flip:{behavior:this.config.fallbackPlacement},arrow:{element:".arrow"},preventOverflow:{boundariesElement:this.config.boundary}},onCreate:function(t){t.originalPlacement!==t.placement&&e._handlePopperPlacementChange(t)},onUpdate:function(t){return e._handlePopperPlacementChange(t)}},this.config.popperConfig)},e._getOffset=function(){var t=this,e={};return"function"==typeof this.config.offset?e.fn=function(e){return e.offsets=r({},e.offsets,t.config.offset(e.offsets,t.element)),e}:e.offset=this.config.offset,e},e._getContainer=function(){return!1===this.config.container?document.body:f.isElement(this.config.container)?o.default(this.config.container):o.default(document).find(this.config.container)},e._getAttachment=function(t){return J[t.toUpperCase()]},e._setListeners=function(){var t=this;this.config.trigger.split(" ").forEach(function(e){if("click"===e)o.default(t.element).on(t.constructor.Event.CLICK,t.config.selector,function(e){return t.toggle(e)});else if("manual"!==e){var n="hover"===e?t.constructor.Event.MOUSEENTER:t.constructor.Event.FOCUSIN,i="hover"===e?t.constructor.Event.MOUSELEAVE:t.constructor.Event.FOCUSOUT;o.default(t.element).on(n,t.config.selector,function(e){return t._enter(e)}).on(i,t.config.selector,function(e){return t._leave(e)})}}),this._hideModalHandler=function(){t.element&&t.hide()},o.default(this.element).closest(".modal").on("hide.bs.modal",this._hideModalHandler),this.config.selector?this.config=r({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},e._fixTitle=function(){var t=typeof this.element.getAttribute("data-original-title");(this.element.getAttribute("title")||"string"!==t)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},e._enter=function(t,e){var n=this.constructor.DATA_KEY;(e=e||o.default(t.currentTarget).data(n))||(e=new this.constructor(t.currentTarget,this._getDelegateConfig()),o.default(t.currentTarget).data(n,e)),t&&(e._activeTrigger["focusin"===t.type?"focus":"hover"]=!0),o.default(e.getTipElement()).hasClass("show")||"show"===e._hoverState?e._hoverState="show":(clearTimeout(e._timeout),e._hoverState="show",e.config.delay&&e.config.delay.show?e._timeout=setTimeout(function(){"show"===e._hoverState&&e.show()},e.config.delay.show):e.show())},e._leave=function(t,e){var n=this.constructor.DATA_KEY;(e=e||o.default(t.currentTarget).data(n))||(e=new this.constructor(t.currentTarget,this._getDelegateConfig()),o.default(t.currentTarget).data(n,e)),t&&(e._activeTrigger["focusout"===t.type?"focus":"hover"]=!1),e._isWithActiveTrigger()||(clearTimeout(e._timeout),e._hoverState="out",e.config.delay&&e.config.delay.hide?e._timeout=setTimeout(function(){"out"===e._hoverState&&e.hide()},e.config.delay.hide):e.hide())},e._isWithActiveTrigger=function(){for(var t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1},e._getConfig=function(t){var e=o.default(this.element).data();return Object.keys(e).forEach(function(t){-1!==$.indexOf(t)&&delete e[t]}),"number"==typeof(t=r({},this.constructor.Default,e,"object"==typeof t&&t?t:{})).delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),f.typeCheckConfig(K,t,this.constructor.DefaultType),t.sanitize&&(t.template=z(t.template,t.whiteList,t.sanitizeFn)),t},e._getDelegateConfig=function(){var t={};if(this.config)for(var e in this.config)this.constructor.Default[e]!==this.config[e]&&(t[e]=this.config[e]);return t},e._cleanTipClass=function(){var t=o.default(this.getTipElement()),e=t.attr("class").match(Y);null!==e&&e.length&&t.removeClass(e.join(""))},e._handlePopperPlacementChange=function(t){this.tip=t.instance.popper,this._cleanTipClass(),this.addAttachmentClass(this._getAttachment(t.placement))},e._fixTransition=function(){var t=this.getTipElement(),e=this.config.animation;null===t.getAttribute("x-placement")&&(o.default(t).removeClass("fade"),this.config.animation=!1,this.hide(),this.show(),this.config.animation=e)},t._jQueryInterface=function(e){return this.each(function(){var n=o.default(this),i=n.data("bs.tooltip"),a="object"==typeof e&&e;if((i||!/dispose|hide/.test(e))&&(i||(i=new t(this,a),n.data("bs.tooltip",i)),"string"==typeof e)){if(void 0===i[e])throw new TypeError('No method n
15amed "'+e+'"');i[e]()}})},l(t,null,[{key:"VERSION",get:function(){return"4.6.2"}},{key:"Default",get:function(){return G}},{key:"NAME",get:function(){return K}},{key:"DATA_KEY",get:function(){return"bs.tooltip"}},{key:"Event",get:function(){return tt}},{key:"EVENT_KEY",get:function(){return".bs.tooltip"}},{key:"DefaultType",get:function(){return Z}}]),t}();o.default.fn.tooltip=et._jQueryInterface,o.default.fn.tooltip.Constructor=et,o.default.fn.tooltip.noConflict=function(){return o.default.fn.tooltip=X,et._jQueryInterface};var nt="popover",it=o.default.fn.popover,ot=new RegExp("(^|\\s)bs-popover\\S+","g"),at=r({},et.Default,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>'}),st=r({},et.DefaultType,{content:"(string|element|function)"}),lt={HIDE:"hide.bs.popover",HIDDEN:"hidden.bs.popover",SHOW:"show.bs.popover",SHOWN:"shown.bs.popover",INSERTED:"inserted.bs.popover",CLICK:"click.bs.popover",FOCUSIN:"focusin.bs.popover",FOCUSOUT:"focusout.bs.popover",MOUSEENTER:"mouseenter.bs.popover",MOUSELEAVE:"mouseleave.bs.popover"},rt=function(t){var e,n;function i(){return t.apply(this,arguments)||this}n=t,(e=i).prototype=Object.create(n.prototype),e.prototype.constructor=e,u(e,n);var a=i.prototype;return a.isWithContent=function(){return this.getTitle()||this._getContent()},a.addAttachmentClass=function(t){o.default(this.getTipElement()).addClass("bs-popover-"+t)},a.getTipElement=function(){return this.tip=this.tip||o.default(this.config.template)[0],this.tip},a.setContent=function(){var t=o.default(this.getTipElement());this.setElementContent(t.find(".popover-header"),this.getTitle());var e=this._getContent();"function"==typeof e&&(e=e.call(this.element)),this.setElementContent(t.find(".popover-body"),e),t.removeClass("fade show")},a._getContent=function(){return this.element.getAttribute("data-content")||this.config.content},a._cleanTipClass=function(){var t=o.default(this.getTipElement()),e=t.attr("class").match(ot);null!==e&&e.length>0&&t.removeClass(e.join(""))},i._jQueryInterface=function(t){return this.each(function(){var e=o.default(this).data("bs.popover"),n="object"==typeof t?t:null;if((e||!/dispose|hide/.test(t))&&(e||(e=new i(this,n),o.default(this).data("bs.popover",e)),"string"==typeof t)){if(void 0===e[t])throw new TypeError('No method named "'+t+'"');e[t]()}})},l(i,null,[{key:"VERSION",get:function(){return"4.6.2"}},{key:"Default",get:function(){return at}},{key:"NAME",get:function(){return nt}},{key:"DATA_KEY",get:function(){return"bs.popover"}},{key:"Event",get:function(){return lt}},{key:"EVENT_KEY",get:function(){return".bs.popover"}},{key:"DefaultType",get:function(){return st}}]),i}(et);o.default.fn.popover=rt._jQueryInterface,o.default.fn.popover.Constructor=rt,o.default.fn.popover.noConflict=function(){return o.default.fn.popover=it,rt._jQueryInterface};var ut="scrollspy",dt=o.default.fn[ut],ct="scroll.bs.scrollspy",ft=".nav-link",ht=".list-group-item",gt=".dropdown-item",mt={offset:10,method:"auto",target:""},pt={offset:"number",method:"string",target:"(string|element)"},_t=function(){function t(t,e){var n=this;this._element=t,this._scrollElement="BODY"===t.tagName?window:t,this._config=this._getConfig(e),this._selector=this._config.target+" "+ft+","+this._config.target+" "+ht+","+this._config.target+" "+gt,this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,o.default(this._scrollElement).on(ct,function(t){return n._process(t)}),this.refresh(),this._process()}var e=t.prototype;return e.refresh=function(){var t=this,e=this._scrollElement===this._scrollElement.window?"offset":"position",n="auto"===this._config.method?e:this._config.method,i="position"===n?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),[].slice.call(document.querySelectorAll(this._selector)).map(function(t){var e,a=f.getSelectorFromElement(t);if(a&&(e=document.querySelector(a)),e){var s=e.getBoundingClientRect();if(s.width||s.height)return[o.default(e)[n]().top+i,a]}return null}
vendor: 8,526 bytes, line 15
15).filter(Boolean).sort(function(t,e){return t[0]-e[0]}).forEach(function(e){t._offsets.push(e[0]),t._targets.push(e[1])})},e.dispose=function(){o.default.removeData(this._element,"bs.scrollspy"),o.default(this._scrollElement).off(".bs.scrollspy"),this._element=null,this._scrollElement=null,this._config=null,this._selector=null,this._offsets=null,this._targets=null,this._activeTarget=null,this._scrollHeight=null},e._getConfig=function(t){if("string"!=typeof(t=r({},mt,"object"==typeof t&&t?t:{})).target&&f.isElement(t.target)){var e=o.default(t.target).attr("id");e||(e=f.getUID(ut),o.default(t.target).attr("id",e)),t.target="#"+e}return f.typeCheckConfig(ut,t,pt),t},e._getScrollTop=function(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop},e._getScrollHeight=function(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)},e._getOffsetHeight=function(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height},e._process=function(){var t=this._getScrollTop()+this._config.offset,e=this._getScrollHeight(),n=this._config.offset+e-this._getOffsetHeight();if(this._scrollHeight!==e&&this.refresh(),t>=n){var i=this._targets[this._targets.length-1];this._activeTarget!==i&&this._activate(i)}else{if(this._activeTarget&&t<this._offsets[0]&&this._offsets[0]>0)return this._activeTarget=null,void this._clear();for(var o=this._offsets.length;o--;){this._activeTarget!==this._targets[o]&&t>=this._offsets[o]&&(void 0===this._offsets[o+1]||t<this._offsets[o+1])&&this._activate(this._targets[o])}}},e._activate=function(t){this._activeTarget=t,this._clear();var e=this._selector.split(",").map(function(e){return e+'[data-target="'+t+'"],'+e+'[href="'+t+'"]'}),n=o.default([].slice.call(document.querySelectorAll(e.join(","))));n.hasClass("dropdown-item")?(n.closest(".dropdown").find(".dropdown-toggle").addClass("active"),n.addClass("active")):(n.addClass("active"),n.parents(".nav, .list-group").prev(ft+", "+ht).addClass("active"),n.parents(".nav, .list-group").prev(".nav-item").children(ft).addClass("active")),o.default(this._scrollElement).trigger("activate.bs.scrollspy",{relatedTarget:t})},e._clear=function(){[].slice.call(document.querySelectorAll(this._selector)).filter(function(t){return t.classList.contains("active")}).forEach(function(t){return t.classList.remove("active")})},t._jQueryInterface=function(e){return this.each(function(){var n=o.default(this).data("bs.scrollspy");if(n||(n=new t(this,"object"==typeof e&&e),o.default(this).data("bs.scrollspy",n)),"string"==typeof e){if(void 0===n[e])throw new TypeError('No method named "'+e+'"');n[e]()}})},l(t,null,[{key:"VERSION",get:function(){return"4.6.2"}},{key:"Default",get:function(){return mt}}]),t}();o.default(window).on("load.bs.scrollspy.data-api",function(){for(var t=[].slice.call(document.querySelectorAll('[data-spy="scroll"]')),e=t.length;e--;){var n=o.default(t[e]);_t._jQueryInterface.call(n,n.data())}}),o.default.fn[ut]=_t._jQueryInterface,o.default.fn[ut].Constructor=_t,o.default.fn[ut].noConflict=function(){return o.default.fn[ut]=dt,_t._jQueryInterface};var vt=o.default.fn.tab,bt=function(){function t(t){this._element=t}var e=t.prototype;return e.show=function(){var t=this;if(!(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&o.default(this._element).hasClass("active")||o.default(this._element).hasClass("disabled")||this._element.hasAttribute("disabled"))){var e,n,i=o.default(this._element).closest(".nav, .list-group")[0],a=f.getSelectorFromElement(this._element);if(i){var s="UL"===i.nodeName||"OL"===i.nodeName?"> li > .active":".active";n=(n=o.default.makeArray(o.default(i).find(s)))[n.length-1]}var l=o.default.Event("hide.bs.tab",{relatedTarget:this._element}),r=o.default.Event("show.bs.tab",{relatedTarget:n});if(n&&o.default(n).trigger(l),o.default(this._element).trigger(r),!r.isDefaultPrevented()&&!l.isDefaultPrevented()){a&&(e=document.querySelector(a)),this._activate(this._element,i);var u=function(){var e=o.default.Event("hidden.bs.tab",{relatedTarget:t._element}),i=o.default.Event("shown.bs.tab",{relatedTarget:n});o.default(n).trigger(e),o.default(t._element).trigger(i)};e?this._activate(e,e.parentNode,u):u()}}},e.dispose=function(){o.default.removeData(this._element,"bs.tab"),this._element=null},e._activate=function(t,e,n){var i=this,a=(!e||"UL"!==e.nodeName&&"OL"!==e.nodeName?o.default(e).children(".active"):o.default(e).find("> li > .active"))[0],s=n&&a&&o.default(a).hasClass("fade"),l=function(){return i._transitionComplete(t,a,n)};if(a&&s){var r=f.getTransitionDurationFromElement(a);o.default(a).removeClass("show").one(f.TRANSITION_END,l).emulateTransitionEnd(r)}else l()},e._transitionComplete=function(t,e,n){if(e){o.default(e).removeClass("active");var i=o.default(e.parentNode).find("> .dropdown-menu .active")[0];i&&o.default(i).removeClass("active"),"tab"===e.getAttribute("role")&&e.setAttribute("aria-selected",!1)}o.default(t).addClass("active"),"tab"===t.getAttribute("role")&&t.setAttribute("aria-selected",!0),f.reflow(t),t.classList.contains("fade")&&t.classList.add("show");var a=t.parentNode;if(a&&"LI"===a.nodeName&&(a=a.parentNode),a&&o.default(a).hasClass("dropdown-menu")){var s=o.default(t).closest(".dropdown")[0];if(s){var l=[].slice.call(s.querySelectorAll(".dropdown-toggle"));o.default(l).addClass("active")}t.setAttribute("aria-expanded",!0)}n&&n()},t._jQueryInterface=function(e){return this.each(function(){var n=o.default(this),i=n.data("bs.tab");if(i||(i=new t(this),n.data("bs.tab",i)),"string"==typeof e){if(void 0===i[e])throw new TypeError('No method named "'+e+'"');i[e]()}})},l(t,null,[{key:"VERSION",get:function(){return"4.6.2"}}]),t}();o.default(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',function(t){t.preventDefault(),bt._jQueryInterface.call(o.default(this),"show")}),o.default.fn.tab=bt._jQueryInterface,o.default.fn.tab.Constructor=bt,o.default.fn.tab.noConflict=function(){return o.default.fn.tab=vt,bt._jQueryInterface};var yt="toast",Et=o.default.fn.toast,wt={animation:!0,autohide:!0,delay:500},Tt={animation:"boolean",autohide:"boolean",delay:"number"},Ct=function(){function t(t,e){this._element=t,this._config=this._getConfig(e),this._timeout=null,this._setListeners()}var e=t.prototype;return e.show=function(){var t=this,e=o.default.Event("show.bs.toast");if(o.default(this._element).trigger(e),!e.isDefaultPrevented()){this._clearTimeout(),this._config.animation&&this._element.classList.add("fade");var n=function(){t._element.classList.remove("showing"),t._element.classList.add("show"),o.default(t._element).trigger("shown.bs.toast"),t._config.autohide&&(t._timeout=setTimeout(function(){t.hide()},t._config.delay))};if(this._element.classList.remove("hide"),f.reflow(this._element),this._element.classList.add("showing"),this._config.animation){var i=f.getTransitionDurationFromElement(this._element);o.default(this._element).one(f.TRANSITION_END,n).emulateTransitionEnd(i)}else n()}},e.hide=function(){if(this._element.classList.contains("show")){var t=o.default.Event("hide.bs.toast");o.default(this._element).trigger(t),t.isDefaultPrevented()||this._close()}},e.dispose=function(){this._clearTimeout(),this._element.classList.contains("show")&&this._element.classList.remove("show"),o.default(this._element).off("click.dismiss.bs.toast"),o.default.removeData(this._element,"bs.toast"),this._element=null,this._config=null},e._getConfig=function(t){return t=r({},wt,o.default(this._element).data(),"object"==typeof t&&t?t:{}),f.typeCheckConfig(yt,t,this.constructor.DefaultType),t},e._setListeners=function(){var t=this;o.default(this._element).on("click.dismiss.bs.toast",'[data-dismiss="toast"]',function(){return t.hide()})},e._close=function(){var t=this,e=function(){t._element.classList.add("hide"),o.default(t._element).trigger("hidden.bs.toast")};if(this._element.classList.remove("show"),this._config.animation){var n=f.getTransitionDurationFromElement(this._element);o.default(this._element).one(f.TRANSITION_END,e).emulateTransitionEnd(n)}else e()},e._clearTimeout=function(){clearTimeout(this._timeout),this._timeout=null},t._jQueryInterface=function(e){return this.each(function(){var n=o.default(this),i=n.data("bs.toast");if(i||(i=new t(this,"object"==typeof e&&e),n.data("bs.toast",i)),"string"==typeof e){if(void 0===i[e])throw new TypeError('No method n
15amed "'+e+'"');i[e](this)}})},l(t,null,[{key:"VERSION",get:function(){return"4.6.2"}},{key:"DefaultType",get:function(){return Tt}},{key:"Default",get:function(){return wt}}]),t}();o.default.fn.toast=Ct._jQueryInterface,o.default.fn.toast.Constructor=Ct,o.default.fn.toast.noConflict=function(){return o.default.fn.toast=Et,Ct._jQueryInterface},t.Alert=g,t.Button=p,t.Carousel=C,t.Collapse=I,t.Dropdown=R,t.Modal=H,t.Popover=rt,t.Scrollspy=_t,t.Tab=bt,t.Toast=Ct,t.Tooltip=et,t.Util=f,Object.defineProperty(t,"__esModule",{value:!0})});
16},{"jquery":"HlZQ","popper.js":"v5IM"}],"Eofe":[function(require,module,exports) {
17
18},{"./..\\webfonts\\fa-brands-400.eot":[["fa-brands-400.ae1da9aa.eot","YH3g"],"YH3g"],"./..\\webfonts\\fa-brands-400.woff2":[["fa-brands-400.a1db9459.woff2","qUWF"],"qUWF"],"./..\\webfonts\\fa-brands-400.woff":[["fa-brands-400.04246ac6.woff","d16i"],"d16i"],"./..\\webfonts\\fa-brands-400.ttf":[["fa-brands-400.e8eab21c.ttf","Lu1x"],"Lu1x"],"./..\\webfonts\\fa-brands-400.svg":[["fa-brands-400.ac88be85.svg","GRGc"],"GRGc"],"./..\\webfonts\\fa-regular-400.eot":[["fa-regular-400.6adc9fcd.eot","nv22"],"nv22"],"./..\\webfonts\\fa-regular-400.woff2":[["fa-regular-400.6e35f891.woff2","M504"],"M504"],"./..\\webfonts\\fa-regular-400.woff":[["fa-regular-400.4f946da8.woff","H1q6"],"H1q6"],"./..\\webfonts\\fa-regular-400.ttf":[["fa-regular-400.a215af91.ttf","Evul"],"Evul"],"./..\\webfonts\\fa-regular-400.svg":[["fa-regular-400.ed807156.svg","D7rB"],"D7rB"],"./..\\webfonts\\fa-solid-900.eot":[["fa-solid-900.ef18b3bb.eot","ISQp"],"ISQp"],"./..\\webfonts\\fa-solid-900.woff2":[["fa-solid-900.ab906712.woff2","PerI"],"PerI"],"./..\\webfonts\\fa-solid-900.woff":[["fa-solid-900.88a6089c.woff","nA9q"],"nA9q"],"./..\\webfonts\\fa-solid-900.ttf":[["fa-solid-900.ec16851e.ttf","FJZt"],"FJZt"],"./..\\webfonts\\fa-solid-900.svg":[["fa-solid-900.e5b19c09.svg","lFqB"],"lFqB"]}],"FWXb":[function(require,module,exports) {
19
20},{"./..\\fonts\\materialdesignicons-webfont.eot":[["materialdesignicons-webfont.e54fd8da.eot","bBM4"],"bBM4"],"./..\\fonts\\materialdesignicons-webfont.woff2":[["materialdesignicons-webfont.ee0e0f45.woff2","B1w0"],"B1w0"],"./..\\fonts\\materialdesignicons-webfont.woff":[["materialdesignicons-webfont.b58ee716.woff","oZPE"],"oZPE"],"./..\\fonts\\materialdesignicons-webfont.ttf":[["materialdesignicons-webfont.ec4cf2c3.ttf","YQqa"],"YQqa"]}],"H97Y":[function(require,module,exports) {
21
22},{}],"lMlK":[function(require,module,exports) {
23var define;
24var e;!function(n){var t;if("function"==typeof e&&e.amd&&(e(n),t=!0),"object"==typeof exports&&(module.exports=n(),t=!0),!t){var o=window.Cookies,r=window.Cookies=n();r.noConflict=function(){return window.Cookies=o,r}}}(function(){function e(){for(var e=0,n={};e<arguments.length;e++){var t=arguments[e];for(var o in t)n[o]=t[o]}return n}function n(e){return e.replace(/(%[0-9A-Z]{2}
24)+/g,decodeURIComponent)}return function t(o){function r(){}function i(n,t,i){if("undefined"!=typeof document){"number"==typeof(i=e({path:"/"},r.defaults,i)).expires&&(i.expires=new Date(1*new Date+864e5*i.expires)),i.expires=i.expires?i.expires.toUTCString():"";try{var c=JSON.stringify(t);/^[\{\[]/.test(c)&&(t=c)}catch(a){}t=o.write?o.write(t,n):encodeURIComponent(String(t)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),n=encodeURIComponent(String(n)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var f="";for(var u in i)i[u]&&(f+="; "+u,!0!==i[u]&&(f+="="+i[u].split(";")[0]));return document.cookie=n+"="+t+f}}function c(e,t){if("undefined"!=typeof document){for(var r={},i=document.cookie?document.cookie.split("; "):[],c=0;c<i.length;c++){var f=i[c].split("="),u=f.slice(1).join("=");t||'"'!==u.charAt(0)||(u=u.slice(1,-1));try{var a=n(f[0]);if(u=(o.read||o)(u,a)||n(u),t)try{u=JSON.parse(u)}catch(p){}if(r[a]=u,e===a)break}catch(p){}}return e?r[e]:r}}return r.set=i,r.get=function(e){return c(e,!1)},r.getJSON=function(e){return c(e,!0)},r.remove=function(n,t){i(n,"",e(t,{expires:-1}))},r.defaults={},r.withConverter=t,r}(function(){})});
25},{}],"XEp8":[function(require,module,exports) {
26var define;
27var n;!function(e){function r(n,e,r){var t,a,b,h,A,l,p,E,d,H=0,v=[],S=0,g=!1,U=[],R=[],y=!1,k=!1,m=-1;if(t=(r=r||{}).encoding||"UTF8",(d=r.numRounds||1)!==parseInt(d,10)||1>d)throw Error("numRounds must a integer >= 1");if("SHA-1"===n)A=512,l=O,p=X,h=160,E=function(n){return n.slice()};else if(0===n.lastIndexOf("SHA-",0))if(l=function(e,r){return P(e,r,n)},p=function(e,r,t,a){var o,i;if("SHA-224"===n||"SHA-256"===n)o=15+(r+65>>>9<<4),i=16;else{if("SHA-384"!==n&&"SHA-512"!==n)throw Error("Unexpected error in SHA-2 implementation");o=31+(r+129>>>10<<5),i=32}for(;e.length<=o;)e.push(0);for(e[r>>>5]|=128<<24-r%32,r+=t,e[o]=4294967295&r,e[o-1]=r/4294967296|0,t=e.length,r=0;r<t;r+=i)a=P(e.slice(r,r+i),a,n);if("SHA-224"===n)e=[a[0],a[1],a[2],a[3],a[4],a[5],a[6]];else if("SHA-256"===n)e=a;else if("SHA-384"===n)e=[a[0].a,a[0].b,a[1].a,a[1].b,a[2].a,a[2].b,a[3].a,a[3].b,a[4].a,a[4].b,a[5].a,a[5].b];else{if("SHA-512"!==n)throw Error("Unexpected error in SHA-2 implementation");e=[a[0].a,a[0].b,a[1].a,a[1].b,a[2].a,a[2].b,a[3].a,a[3].b,a[4].a,a[4].b,a[5].a,a[5].b,a[6].a,a[6].b,a[7].a,a[7].b]}return e},E=function(n){return n.slice()},"SHA-224"===n)A=512,h=224;else if("SHA-256"===n)A=512,h=256;else if("SHA-384"===n)A=1024,h=384;else{if("SHA-512"!==n)throw Error("Chosen SHA variant is not supported");A=1024,h=512}else{if(0!==n.lastIndexOf("SHA3-",0)&&0!==n.lastIndexOf("SHAKE",0))throw Error("Chosen SHA variant is not supported");var F=6;if(l=M,E=function(n){var e,r=[];for(e=0;5>e;e+=1)r[e]=n[e].slice();return r},m=1,"SHA3-224"===n)A=1152,h=224;else if("SHA3-256"===n)A=1088,h=256;else if("SHA3-384"===n)A=832,h=384;else if("SHA3-512"===n)A=576,h=512;else if("SHAKE128"===n)A=1344,h=-1,F=31,k=!0;else{if("SHAKE256"!==n)throw Error("Chosen SHA variant is not supported");A=1088,h=-1,F=31,k=!0}p=function(n,e,r,t,a){var o,i=F,u=[],f=(r=A)>>>5,w=0,s=e>>>5;for(o=0;o<s&&e>=r;o+=f)t=M(n.slice(o,o+f),t),e-=r;for(n=n.slice(o),e%=r;n.length<f;)n.push(0);for(n[(o=e>>>3)>>2]^=i<<o%4*8,n[f-1]^=2147483648,t=M(n,t);32*u.length<a&&(n=t[w%5][w/5|0],u.push(n.b),!(32*u.length>=a));)u.push(n.a),0==64*(w+=1)%r&&(M(null,t),w=0);return u}}b=c(e,t,m),a=N(n),this.setHMACKey=function(e,r,o){var i;if(!0===g)throw Error("HMAC key already set");if(!0===y)throw Error("Cannot set HMAC key after calling update");if(!0===k)throw Error("SHAKE is not supported for HMAC");for(e=(r=c(r,t=(o||{}).encoding||"UTF8",m)(e)).binLen,r=r.value,o=(i=A>>>3)/4-1,i<e/8&&(r=p(r,e,0,N(n),h));r.length<=o;)r.push(0);for(e=0;e<=o;e+=1)U[e]=909522486^r[e],R[e]=1549556828^r[e];a=l(U,a),H=A,g=!0},this.update=function(n){var e,r,t,o=0,i=A>>>5;for(n=(e=b(n,v,S)).binLen,r=e.value,e=n>>>5,t=0;t<e;t+=i)o+A<=n&&(a=l(r.slice(t,t+i),a),o+=A);H+=o,v=r.slice(o>>>5),S=n%A,y=!0},this.getHash=function(e,r){var t,c,b,A;if(!0===g)throw Error("Cannot call getHash after setting HMAC ke
27y");if(b=s(r),!0===k){if(-1===b.shakeLen)throw Error("shakeLen must be specified in options");h=b.shakeLen}switch(e){case"HEX":t=function(n){return o(n,h,m,b)};break;case"B64":t=function(n){return i(n,h,m,b)};break;case"BYTES":t=function(n){return u(n,h,m)};break;case"ARRAYBUFFER":try{c=new ArrayBuffer(0)}catch(l){throw Error("ARRAYBUFFER not supported by this environment")}t=function(n){return f(n,h,m)};break;case"UINT8ARRAY":try{c=new Uint8Array(0)}catch(l){throw Error("UINT8ARRAY not supported by this environment")}t=function(n){return w(n,h,m)};break;default:throw Error("format must be HEX, B64, BYTES, ARRAYBUFFER, or UINT8ARRAY")}for(A=p(v.slice(),S,H,E(a),h),c=1;c<d;c+=1)!0===k&&0!=h%32&&(A[A.length-1]&=16777215>>>24-h%32),A=p(A,h,0,N(n),h);return t(A)},this.getHMAC=function(e,r){var t,c,b,d;if(!1===g)throw Error("Cannot call getHMAC without first setting HMAC key");switch(b=s(r),e){case"HEX":t=function(n){return o(n,h,m,b)};break;case"B64":t=function(n){return i(n,h,m,b)};break;case"BYTES":t=function(n){return u(n,h,m)};break;case"ARRAYBUFFER":try{t=new ArrayBuffer(0)}catch(U){throw Error("ARRAYBUFFER not supported by this environment")}t=function(n){return f(n,h,m)};break;case"UINT8ARRAY":try{t=new Uint8Array(0)}catch(U){throw Error("UINT8ARRAY not supported by this environment")}t=function(n){return w(n,h,m)};break;default:throw Error("outputFormat must be HEX, B64, BYTES, ARRAYBUFFER, or UINT8ARRAY")}return c=p(v.slice(),S,H,E(a),h),d=l(R,N(n)),t(d=p(c,h,A,d,h))}}function t(n,e){this.a=n,this.b=e}function a(n,e,r,t){var a,o,i,u,f;for(e=e||[0],o=(r=r||0)>>>3,f=-1===t?3:0,a=0;a<n.length;a+=1)i=(u=a+o)>>>2,e.length<=i&&e.push(0),e[i]|=n[a]<<8*(f+u%4*t);return{value:e,binLen:8*n.length+r}}function o(n,e,r,t){var a,o,i,u="";for(e/=8,i=-1===r?3:0,a=0;a<e;a+=1)o=n[a>>>2]>>>8*(i+a%4*r),u+="0123456789abcdef".charAt(o>>>4&15)+"0123456789abcdef".charAt(15&o);return t.outputUpper?u.toUpperCase():u}function i(n,e,r,t){var a,o,i,u,f="",w=e/8;for(u=-1===r?3:0,a=0;a<w;a+=3)for(o=a+1<w?n[a+1>>>2]:0,i=a+2<w?n[a+2>>>2]:0,i=(n[a>>>2]>>>8*(u+a%4*r)&255)<<16|(o>>>8*(u+(a+1)%4*r)&255)<<8|i>>>8*(u+(a+2)%4*r)&255,o=0;4>o;o+=1)f+=8*a+6*o<=e?"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(i>>>6*(3-o)&63):t.b64Pad;return f}function u(n,e,r){var t,a,o,i="";for(e/=8,o=-1===r?3:0,t=0;t<e;t+=1)a=n[t>>>2]>>>8*(o+t%4*r)&255,i+=String.fromCharCode(a);return i}function f(n,e,r){e/=8;var t,a,o,i=new ArrayBuffer(e);for(o=new Uint8Array(i),a=-1===r?3:0,t=0;t<e;t+=1)o[t]=n[t>>>2]>>>8*(a+t%4*r)&255;return i}function w(n,e,r){e/=8;var t,a,o=new Uint8Array(e);for(a=-1===r?3:0,t=0;t<e;t+=1)o[t]=n[t>>>2]>>>8*(a+t%4*r)&255;return o}function s(n){var e={outputUpper:!1,b64Pad:"=",shakeLen:-1};if(n=n||{},e.outputUpper=n.outputUpper||!1,!0===n.hasOwnProperty("b64Pad")&&(e.b64Pad=n.b64Pad),!0===n.hasOwnProperty("shakeLen")){if(0!=n.shakeLen%8)throw Error("shakeLen must be a multiple of 8");e.shakeLen=n.shakeLen}if("boolean"!=typeof e.outputUpper)throw Error("Invalid outputUpper formatting option");if("string"!=typeof e.b64Pad)throw Error("Invalid b64Pad formatting option");return e}function c(n,e,r){switch(e){case"UTF8":case"UTF16BE":case"UTF16LE":break;default:throw Error("encoding must be UTF8, UTF16BE, or UTF16LE")}switch(n){case"HEX":n=function(n,e,t){var a,o,i,u,f,w,s=n.length;if(0!=s%2)throw Error("String of HEX type must be in byte increments");for(e=e||[0],f=(t=t||0)>>>3,w=-1===r?3:0,a=0;a<s;a+=2){if(o=parseInt(n.substr(a,2),16),isNaN(o))throw Error("String of HEX type contains invalid characters");for(i=(u=(a>>>1)+f)>>>2;e.length<=i;)e.push(0);e[i]|=o<<8*(w+u%4*r)}return{value:e,binLen:4*s+t}};break;case"TEXT":n=function(n,t,a){var o,i,u,f,w,s,c,b,h=0;if(t=t||[0],w=(a=a||0)>>>3,"UTF8"===e)for(b=-1===r?3:0,u=0;u<n.length;u+=1)for(i=[],128>(o=n.charCodeAt(u))?i.push(o):2048>o?(i.push(192|o>>>6),i.push(128|63&o)):55296>o||57344<=o?i.push(224|o>>>12,128|o>>>6&63,128|63&o):(u+=1,o=65536+((1023&o)<<10|1023&n.charCodeAt(u)),i.push(240|o>>>18,128|o>>>12&63,128|o>>>6&63,128|63&o)),f=0;f<i.length;f+=1){for(s=(c=h+w)>>>2;t.length<=s;)t.push(0);t[s]|=i[f]<<8*(b+c%4*r),h+=1}else if("UTF16BE"===e||"UTF16LE"===e)for(b=-1===r?2:0,i="UTF16LE"===e&&1!==r||"UTF16LE"!==e&&1===r,u=0;u<n.length;u+=1){for(o=n.charCodeAt(u),!0===i&&(o=(f=255&o)<<8|o>>>8),s=(c=h+w)>>>2;t.length<=s;)t.push(0);t[s]|=o<<8*(b+c%4*r),h+=2}return{value:t,binLen:8*h+a}};break;case"B64":n=function(n,e,t){var a,o,i,u,f,w,s,c,b=0;if(-1===n.search(/^[a-zA-Z0-9=+\/]+$/))throw Error("Invalid character in base-64 string");if(o=n.indexOf("="),n=n.replace(/\=/g,""),-1!==o&&o<n.length)throw Error("Invalid '=' found in base-64 string");for(e=e||[0],w=(t=t||0)>>>3,c=-1===r?3:0,o=0;o<n.length;o+=4){for(f=n.substr(o,4),i=u=0;i<f.length;i+=1)u|=(a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
27+/".indexOf(f.charAt(i)))<<18-6*i;for(i=0;i<f.length-1;i+=1){for(a=(s=b+w)>>>2;e.length<=a;)e.push(0);e[a]|=(u>>>16-8*i&255)<<8*(c+s%4*r),b+=1}}return{value:e,binLen:8*b+t}};break;case"BYTES":n=function(n,e,t){var a,o,i,u,f,w;for(e=e||[0],i=(t=t||0)>>>3,w=-1===r?3:0,o=0;o<n.length;o+=1)a=n.charCodeAt(o),u=(f=o+i)>>>2,e.length<=u&&e.push(0),e[u]|=a<<8*(w+f%4*r);return{value:e,binLen:8*n.length+t}};break;case"ARRAYBUFFER":try{n=new ArrayBuffer(0)}catch(t){throw Error("ARRAYBUFFER not supported by this environment")}n=function(n,e,t){return a(new Uint8Array(n),e,t,r)};break;case"UINT8ARRAY":try{n=new Uint8Array(0)}catch(t){throw Error("UINT8ARRAY not supported by this environment")}n=function(n,e,t){return a(n,e,t,r)};break;default:throw Error("format must be HEX, TEXT, B64, BYTES, ARRAYBUFFER, or UINT8ARRAY")}return n}function b(n,e){return n<<e|n>>>32-e}function h(n,e){return 32<e?(e-=32,new t(n.b<<e|n.a>>>32-e,n.a<<e|n.b>>>32-e)):0!==e?new t(n.a<<e|n.b>>>32-e,n.b<<e|n.a>>>32-e):n}function A(n,e){return n>>>e|n<<32-e}function l(n,e){var r=null;r=new t(n.a,n.b);return 32>=e?new t(r.a>>>e|r.b<<32-e&4294967295,r.b>>>e|r.a<<32-e&4294967295):new t(r.b>>>e-32|r.a<<64-e&4294967295,r.a>>>e-32|r.b<<64-e&4294967295)}function p(n,e){return 32>=e?new t(n.a>>>e,n.b>>>e|n.a<<32-e&4294967295):new t(0,n.a>>>e-32)}function E(n,e,r){return n&e^~n&r}function d(n,e,r){return new t(n.a&e.a^~n.a&r.a,n.b&e.b^~n.b&r.b)}function H(n,e,r){return n&e^n&r^e&r}function v(n,e,r){return new t(n.a&e.a^n.a&r.a^e.a&r.a,n.b&e.b^n.b&r.b^e.b&r.b)}function S(n){return A(n,2)^A(n,13)^A(n,22)}function g(n){var e=l(n,28),r=l(n,34);return n=l(n,39),new t(e.a^r.a^n.a,e.b^r.b^n.b)}function U(n){return A(n,6)^A(n,11)^A(n,25)}function R(n){var e=l(n,14),r=l(n,18);return n=l(n,41),new t(e.a^r.a^n.a,e.b^r.b^n.b)}function y(n){return A(n,7)^A(n,18)^n>>>3}function k(n){var e=l(n,1),r=l(n,8);return n=p(n,7),new t(e.a^r.a^n.a,e.b^r.b^n.b)}function m(n){return A(n,17)^A(n,19)^n>>>10}function F(n){var e=l(n,19),r=l(n,61);return n=p(n,6),new t(e.a^r.a^n.a,e.b^r.b^n.b)}function T(n,e){var r=(65535&n)+(65535&e);return((n>>>16)+(e>>>16)+(r>>>16)&65535)<<16|65535&r}function B(n,e,r,t){var a=(65535&n)+(65535&e)+(65535&r)+(65535&t);return((n>>>16)+(e>>>16)+(r>>>16)+(t>>>16)+(a>>>16)&65535)<<16|65535&a}function Y(n,e,r,t,a){var o=(65535&n)+(65535&e)+(65535&r)+(65535&t)+(65535&a);return((n>>>16)+(e>>>16)+(r>>>16)+(t>>>16)+(a>>>16)+(o>>>16)&65535)<<16|65535&o}function C(n,e){var r,a,o;return r=(65535&n.b)+(65535&e.b),o=(65535&(a=(n.b>>>16)+(e.b>>>16)+(r>>>16)))<<16|65535&r,r=(65535&n.a)+(65535&e.a)+(a>>>16),new t((65535&(a=(n.a>>>16)+(e.a>>>16)+(r>>>16)))<<16|65535&r,o)}function I(n,e,r,a){var o,i,u;return o=(65535&n.b)+(65535&e.b)+(65535&r.b)+(65535&a.b),u=(65535&(i=(n.b>>>16)+(e.b>>>16)+(r.b>>>16)+(a.b>>>16)+(o>>>16)))<<16|65535&o,o=(65535&n.a)+(65535&e.a)+(65535&r.a)+(65535&a.a)+(i>>>16),new t((65535&(i=(n.a>>>16)+(e.a>>>16)+(r.a>>>16)+(a.a>>>16)+(o>>>16)))<<16|65535&o,u)}function L(n,e,r,a,o){var i,u,f;return i=(65535&n.b)+(65535&e.b)+(65535&r.b)+(65535&a.b)+(65535&o.b),f=(65535&(u=(n.b>>>16)+(e.b>>>16)+(r.b>>>16)+(a.b>>>16)+(o.b>>>16)+(i>>>16)))<<16|65535&i,i=(65535&n.a)+(65535&e.a)+(65535&r.a)+(65535&a.a)+(65535&o.a)+(u>>>16),new t((65535&(u=(n.a>>>16)+(e.a>>>16)+(r.a>>>16)+(a.a>>>16)+(o.a>>>16)+(i>>>16)))<<16|65535&i,f)}function x(n,e){return new t(n.a^e.a,n.b^e.b)}function N(n){var e,r=[];if("SHA-1"===n)r=[1732584193,4023233417,2562383102,271733878,3285377520];else if(0===n.lastIndexOf("SHA-",0))switch(r=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428],e=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],n){case"SHA-224":break;case"SHA-256":r=e;break;case"SHA-384":r=[new t(3418070365,r[0]),new t(1654270250,r[1]),new t(2438529370,r[2]),new t(355462360,r[3]),new t(1731405415,r[4]),new t(41048885895,r[5]),new t(3675008525,r[6]),new t(1203062813,r[7])];break;case"SHA-512":r=[new t(e[0],4089235720),new t(e[1],2227873595),new t(e[2],4271175723),new t(e[3],1595750129),new t(e[4],2917565137),new t(e[5],725511199),new t(e[6],4215389547),new t(e[7],327033209)];break;default:throw Error("Unknown SHA variant")}else{if(0!==n.lastIndexOf("SHA3-",0)&&0!==n.lastIndexOf("SHAKE",0))throw Error("No SHA variants supported");for(n=0;5>n;n+=1)r[n]=[new t(0,0),new t(0,0),new t(0,0),new t(0,0),new t(0,0)]}return r}function O(n,e){var r,t,a,o,i,u,f,w=[];for(r=e[0],t=e[1],a=e[2],o=e[3],i=e[4],f=0;80>f;f+=1)w[f]=16>f?n[f]:b(w[f-3]^w[f-8]^w[f-14]^w[f-16],1),u=20>f?Y(b(r,5),t&a^~t&o,i,1518500249,w[f]):40>f?Y(b(r,5),t^a^o,i,1859775393,w[f]):60>f?Y(b(r,5),H(t,a,o),i,2400959708,w[f]):Y(b(r,5),t^a^o,i,3395469782,w[f]),i=o,o=a,a=b(t,30),t=r,r=u;return e[0]=T(r,e[0]),e[1]=T(t,e[1]),e[2]=T(a,e[2]),e[3]=T(o,e[3]),e[4]=T(i,e[4]),e}function X(n,e,r,t){var a;for(a=15+(e+65>>>9<<4);n.length<=a;)n.push(0);for(n[e>>>5]|=128<<24-e%32,e+=r,n[a]=4294967295&e,n[a-1]=e/4294967296|0,e=n.length,a=0;a<e;a+=16)t=O(n.slice(a,a+16),t);return t}function P(n,e,r){var a,o,i,u,f,w,s,c,b,h,A,l,p,x,N,O,X,P,M,z,Z,q,D,G=[];if("SHA-224"===r||"SHA-256"===r)h=64,l=1,q=Number,p=T,x=B,N=Y,O=y,X=m,P=S,M=U,Z=H,z=E,D=K;else{if("SHA-384"!==r&&"SHA-512"!==r)throw Error("Unexpected error in SHA-2 implementation");
27h=80,l=2,q=t,p=C,x=I,N=L,O=k,X=F,P=g,M=R,Z=v,z=d,D=j}for(r=e[0],a=e[1],o=e[2],i=e[3],u=e[4],f=e[5],w=e[6],s=e[7],A=0;A<h;A+=1)16>A?(b=A*l,c=n.length<=b?0:n[b],b=n.length<=b+1?0:n[b+1],G[A]=new q(c,b)):G[A]=x(X(G[A-2]),G[A-7],O(G[A-15]),G[A-16]),c=N(s,M(u),z(u,f,w),D[A],G[A]),b=p(P(r),Z(r,a,o)),s=w,w=f,f=u,u=p(i,c),i=o,o=a,a=r,r=p(c,b);return e[0]=p(r,e[0]),e[1]=p(a,e[1]),e[2]=p(o,e[2]),e[3]=p(i,e[3]),e[4]=p(u,e[4]),e[5]=p(f,e[5]),e[6]=p(w,e[6]),e[7]=p(s,e[7]),e}function M(n,e){var r,a,o,i,u=[],f=[];if(null!==n)for(a=0;a<n.length;a+=2)e[(a>>>1)%5][(a>>>1)/5|0]=x(e[(a>>>1)%5][(a>>>1)/5|0],new t(n[a+1],n[a]));for(r=0;24>r;r+=1){for(i=N("SHA3-"),a=0;5>a;a+=1){o=e[a][0];var w=e[a][1],s=e[a][2],c=e[a][3],b=e[a][4];u[a]=new t(o.a^w.a^s.a^c.a^b.a,o.b^w.b^s.b^c.b^b.b)}for(a=0;5>a;a+=1)f[a]=x(u[(a+4)%5],h(u[(a+1)%5],1));for(a=0;5>a;a+=1)for(o=0;5>o;o+=1)e[a][o]=x(e[a][o],f[a]);for(a=0;5>a;a+=1)for(o=0;5>o;o+=1)i[o][(2*a+3*o)%5]=h(e[a][o],z[a][o]);for(a=0;5>a;a+=1)for(o=0;5>o;o+=1)e[a][o]=x(i[a][o],new t(~i[(a+1)%5][o].a&i[(a+2)%5][o].a,~i[(a+1)%5][o].b&i[(a+2)%5][o].b));e[0][0]=x(e[0][0],Z[r])}return e}var K,j,z,Z;j=[new t((K=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298])[0],3609767458),new t(K[1],602891725),new t(K[2],3964484399),new t(K[3],2173295548),new t(K[4],4081628472),new t(K[5],3053834265),new t(K[6],2937671579),new t(K[7],3664609560),new t(K[8],2734883394),new t(K[9],1164996542),new t(K[10],1323610764),new t(K[11],3590304994),new t(K[12],4068182383),new t(K[13],991336113),new t(K[14],633803317),new t(K[15],3479774868),new t(K[16],2666613458),new t(K[17],944711139),new t(K[18],2341262773),new t(K[19],2007800933),new t(K[20],1495990901),new t(K[21],1856431235),new t(K[22],3175218132),new t(K[23],2198950837),new t(K[24],3999719339),new t(K[25],766784016),new t(K[26],2566594879),new t(K[27],3203337956),new t(K[28],1034457026),new t(K[29],2466948901),new t(K[30],3758326383),new t(K[31],168717936),new t(K[32],1188179964),new t(K[33],1546045734),new t(K[34],1522805485),new t(K[35],2643833823),new t(K[36],2343527390),new t(K[37],1014477480),new t(K[38],1206759142),new t(K[39],344077627),new t(K[40],1290863460),new t(K[41],3158454273),new t(K[42],3505952657),new t(K[43],106217008),new t(K[44],3606008344),new t(K[45],1432725776),new t(K[46],1467031594),new t(K[47],851169720),new t(K[48],3100823752),new t(K[49],1363258195),new t(K[50],3750685593),new t(K[51],3785050280),new t(K[52],3318307427),new t(K[53],3812723403),new t(K[54],2003034995),new t(K[55],3602036899),new t(K[56],1575990012),new t(K[57],1125592928),new t(K[58],2716904306),new t(K[59],442776044),new t(K[60],593698344),new t(K[61],3733110249),new t(K[62],2999351573),new t(K[63],3815920427),new t(3391569614,3928383900),new t(3515267271,566280711),new t(3940187606,3454069534),new t(4118630271,4000239992),new t(116418474,1914138554),new t(174292421,2731055270),new t(289380356,3203993006),new t(460393269,320620315),new t(685471733,587496836),new t(852142971,1086792851),new t(1017036298,365543100),new t(1126000580,2618297676),new t(1288033470,3409855158),new t(1501505948,4234509866),new t(1607167915,987167468),new t(1816402316,1246189591)],Z=[new t(0,1),new t(0,32898),new t(2147483648,32906),new t(2147483648,2147516416),new t(0,32907),new t(0,2147483649),new t(2147483648,2147516545),new t(2147483648,32777),new t(0,138),new t(0,136),new t(0,2147516425),new t(0,2147483658),new t(0,2147516555),new t(2147483648,139),new t(2147483648,32905),new t(2147483648,32771),new t(2147483648,32770),new t(2147483648,128),new t(0,32778),new t(2147483648,2147483658),new t(2147483648,2147516545),new t(2147483648,32896),new t(0,2147483649),new t(2147483648,2147516424)],z=[[0,36,3,41,18],[1,44,10,45,2],[62,6,43,15,61],[28,55,25,21,56],[27,20,39,8,14]],"function"==typeof n&&n.amd?n(function(){return r}):"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(module.exports=r),exports=r):e.jsSHA=r}(this);
28},{}],"iROh":[function(require,module,exports) {
29var define;
30var global = arguments[3];
31var e,t=arguments[3];!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof e&&e.amd?e(n):t.moment=n()}(this,function(){"use strict";var e,t;function n(){return e.apply(null,arguments)}function s(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function i(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function a(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(r(e,t))return!1;return!0}function o(e){return void 0===e}function u(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function l(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function d(e,t){var n,s=[],i=e.length;for(n=0;n<i;++n)s.push(t(e[n],n));return s}function h(e,t){for(var n in t)r(t,n)&&(e[n]=t[n]);return r(t,"toString")&&(e.toString=t.toString),r(t,"valueOf")&&(e.valueOf=t.valueOf),e}function c(e,t,n,s){return xt(e,t,n,s,!0).utc()}function f(e){return null==e._pf&&(e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invali
vendor: 5,818 bytes, line 31
31dMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}),e._pf}function m(e){var n=null,s=!1,i=e._d&&!isNaN(e._d.getTime());return i&&(n=f(e),s=t.call(n.parsedDateParts,function(e){return null!=e}),i=n.overflow<0&&!n.empty&&!n.invalidEra&&!n.invalidMonth&&!n.invalidWeekday&&!n.weekdayMismatch&&!n.nullInput&&!n.invalidFormat&&!n.userInvalidated&&(!n.meridiem||n.meridiem&&s),e._strict&&(i=i&&0===n.charsLeftOver&&0===n.unusedTokens.length&&void 0===n.bigHour)),null!=Object.isFrozen&&Object.isFrozen(e)?i:(e._isValid=i,e._isValid)}function _(e){var t=c(NaN);return null!=e?h(f(t),e):f(t).userInvalidated=!0,t}t=Array.prototype.some?Array.prototype.some:function(e){var t,n=Object(this),s=n.length>>>0;for(t=0;t<s;t++)if(t in n&&e.call(this,n[t],t,n))return!0;return!1};var y=n.momentProperties=[],g=!1;function w(e,t){var n,s,i,r=y.length;if(o(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),o(t._i)||(e._i=t._i),o(t._f)||(e._f=t._f),o(t._l)||(e._l=t._l),o(t._strict)||(e._strict=t._strict),o(t._tzm)||(e._tzm=t._tzm),o(t._isUTC)||(e._isUTC=t._isUTC),o(t._offset)||(e._offset=t._offset),o(t._pf)||(e._pf=f(t)),o(t._locale)||(e._locale=t._locale),r>0)for(n=0;n<r;n++)o(i=t[s=y[n]])||(e[s]=i);return e}function p(e){w(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===g&&(g=!0,n.updateOffset(this),g=!1)}function v(e){return e instanceof p||null!=e&&null!=e._isAMomentObject}function k(e){!1===n.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function M(e,t){var s=!0;return h(function(){if(null!=n.deprecationHandler&&n.deprecationHandler(null,e),s){var i,a,o,u=[],l=arguments.length;for(a=0;a<l;a++){if(i="","object"==typeof arguments[a]){for(o in i+="\n["+a+"] ",arguments[0])r(arguments[0],o)&&(i+=o+": "+arguments[0][o]+", ");i=i.slice(0,-2)}else i=arguments[a];u.push(i)}k(e+"\nArguments: "+Array.prototype.slice.call(u).join("")+"\n"+(new Error).stack),s=!1}return t.apply(this,arguments)},t)}var D,Y={};function S(e,t){null!=n.deprecationHandler&&n.deprecationHandler(e,t),Y[e]||(k(t),Y[e]=!0)}function O(e){return"undefined"!=typeof Function&&e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function b(e,t){var n,s=h({},e);for(n in t)r(t,n)&&(i(e[n])&&i(t[n])?(s[n]={},h(s[n],e[n]),h(s[n],t[n])):null!=t[n]?s[n]=t[n]:delete s[n]);for(n in e)r(e,n)&&!r(t,n)&&i(e[n])&&(s[n]=h({},s[n]));return s}function T(e){null!=e&&this.set(e)}n.suppressDeprecationWarnings=!1,n.deprecationHandler=null,D=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)r(e,t)&&n.push(t);return n};function x(e,t,n){var s=""+Math.abs(e),i=t-s.length;return(e>=0?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+s}var N=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,W=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,P={},R={};function C(e,t,n,s){var i=s;"string"==typeof s&&(i=function(){return this[s]()}),e&&(R[e]=i),t&&(R[t[0]]=function(){return x(i.apply(this,arguments),t[1],t[2])}),n&&(R[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function U(e,t){return e.isValid()?(t=H(t,e.localeData()),P[t]=P[t]||function(e){var t,n,s,i=e.match(N);for(t=0,n=i.length;t<n;t++)R[i[t]]?i[t]=R[i[t]]:i[t]=(s=i[t]).match(/\[[\s\S]/)?s.replace(/^\[|\]$/g,""):s.replace(/\\/g,"");return function(t){var s,r="";for(s=0;s<n;s++)r+=O(i[s])?i[s].call(t,e):i[s];return r}}(t),P[t](e)):e.localeData().invalidDate()}function H(e,t){var n=5;function s(e){return t.longDateFormat(e)||e}for(W.lastIndex=0;n>=0&&W.test(e);)e=e.replace(W,s),W.lastIndex=0,n-=1;return e}var F={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function L(e){return"string"==typeof e?F[e]||F[e.toLowerCase()]:void 0}function V(e){var t,n,s={};for(n in e)r(e,n)&&(t=L(n))&&(s[t]=e[n]);return s}var G={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};var E,A=/\d/,j=/\d\d/,I=/\d{3}/,Z=/\d{4}/,z=/[+-]?\d{6}/,q=/\d\d?/,$=/\d\d\d\d?/,B=/\d\d\d\d\d\d?/,J=/\d{1,3}/,Q=/\d{1,4}/,X=/[+-]?\d{1,6}/,K=/\d+/,ee=/[+-]?\d+/,te=/Z|[+-]\d\d:?\d\d/gi,ne=/Z|[+-]\d\d(?::?\d\d)?/gi,se=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,ie=/^[1-9]\d?/,re=/^([1-9]\d|\d)/;function ae(e,t,n){E[e]=O(t)?t:function(e,s){return e&&n?n:t}}function oe(e,t){return r(E,e)?E[e](t._strict,t._locale):new RegExp(ue(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,n,s,i){return t||n||s||i})))}function ue(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function le(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function de(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=le(t)),n}E={};var he={};function ce(e,t){var n,s,i=t;
vendor: 6,639 bytes, line 31
31for("string"==typeof e&&(e=[e]),u(t)&&(i=function(e,n){n[t]=de(e)}),s=e.length,n=0;n<s;n++)he[e[n]]=i}function fe(e,t){ce(e,function(e,n,s,i){s._w=s._w||{},t(e,s._w,s,i)})}function me(e,t,n){null!=t&&r(he,e)&&he[e](t,n._a,n,e)}function _e(e){return e%4==0&&e%100!=0||e%400==0}var ye=0,ge=1,we=2,pe=3,ve=4,ke=5,Me=6,De=7,Ye=8;function Se(e){return _e(e)?366:365}C("Y",0,0,function(){var e=this.year();return e<=9999?x(e,4):"+"+e}),C(0,["YY",2],0,function(){return this.year()%100}),C(0,["YYYY",4],0,"year"),C(0,["YYYYY",5],0,"year"),C(0,["YYYYYY",6,!0],0,"year"),ae("Y",ee),ae("YY",q,j),ae("YYYY",Q,Z),ae("YYYYY",X,z),ae("YYYYYY",X,z),ce(["YYYYY","YYYYYY"],ye),ce("YYYY",function(e,t){t[ye]=2===e.length?n.parseTwoDigitYear(e):de(e)}),ce("YY",function(e,t){t[ye]=n.parseTwoDigitYear(e)}),ce("Y",function(e,t){t[ye]=parseInt(e,10)}),n.parseTwoDigitYear=function(e){return de(e)+(de(e)>68?1900:2e3)};var Oe,be=Te("FullYear",!0);function Te(e,t){return function(s){return null!=s?(Ne(this,e,s),n.updateOffset(this,t),this):xe(this,e)}}function xe(e,t){if(!e.isValid())return NaN;var n=e._d,s=e._isUTC;switch(t){case"Milliseconds":return s?n.getUTCMilliseconds():n.getMilliseconds();case"Seconds":return s?n.getUTCSeconds():n.getSeconds();case"Minutes":return s?n.getUTCMinutes():n.getMinutes();case"Hours":return s?n.getUTCHours():n.getHours();case"Date":return s?n.getUTCDate():n.getDate();case"Day":return s?n.getUTCDay():n.getDay();case"Month":return s?n.getUTCMonth():n.getMonth();case"FullYear":return s?n.getUTCFullYear():n.getFullYear();default:return NaN}}function Ne(e,t,n){var s,i,r,a,o;if(e.isValid()&&!isNaN(n)){switch(s=e._d,i=e._isUTC,t){case"Milliseconds":return void(i?s.setUTCMilliseconds(n):s.setMilliseconds(n));case"Seconds":return void(i?s.setUTCSeconds(n):s.setSeconds(n));case"Minutes":return void(i?s.setUTCMinutes(n):s.setMinutes(n));case"Hours":return void(i?s.setUTCHours(n):s.setHours(n));case"Date":return void(i?s.setUTCDate(n):s.setDate(n));case"FullYear":break;default:return}r=n,a=e.month(),o=29!==(o=e.date())||1!==a||_e(r)?o:28,i?s.setUTCFullYear(r,a,o):s.setFullYear(r,a,o)}}function We(e,t){if(isNaN(e)||isNaN(t))return NaN;var n,s=(t%(n=12)+n)%n;return e+=(t-s)/12,1===s?_e(e)?29:28:31-s%7%2}Oe=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1},C("M",["MM",2],"Mo",function(){return this.month()+1}),C("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),C("MMMM",0,0,function(e){return this.localeData().months(this,e)}),ae("M",q,ie),ae("MM",q,j),ae("MMM",function(e,t){return t.monthsShortRegex(e)}),ae("MMMM",function(e,t){return t.monthsRegex(e)}),ce(["M","MM"],function(e,t){t[ge]=de(e)-1}),ce(["MMM","MMMM"],function(e,t,n,s){var i=n._locale.monthsParse(e,s,n._strict);null!=i?t[ge]=i:f(n).invalidMonth=e});var Pe="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Re="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),Ce=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Ue=se,He=se;function Fe(e,t){if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=de(t);else if(!u(t=e.localeData().monthsParse(t)))return e;var n=t,s=e.date();return s=s<29?s:Math.min(s,We(e.year(),n)),e._isUTC?e._d.setUTCMonth(n,s):e._d.setMonth(n,s),e}function Le(e){return null!=e?(Fe(this,e),n.updateOffset(this,!0),this):xe(this,"Month")}function Ve(){function e(e,t){return t.length-e.length}var t,n,s,i,r=[],a=[],o=[];for(t=0;t<12;t++)n=c([2e3,t]),s=ue(this.monthsShort(n,"")),i=ue(this.months(n,"")),r.push(s),a.push(i),o.push(i),o.push(s);r.sort(e),a.sort(e),o.sort(e),this._monthsRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+r.join("|")+")","i")}function Ge(e){var t,n;return e<100&&e>=0?((n=Array.prototype.slice.call(arguments))[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function Ee(e,t,n){var s=7+t-n;return-((7+Ge(e,0,s).getUTCDay()-t)%7)+s-1}function Ae(e,t,n,s,i){var r,a,o=1+7*(t-1)+(7+n-s)%7+Ee(e,s,i);return o<=0?a=Se(r=e-1)+o:o>Se(e)?(r=e+1,a=o-Se(e)):(r=e,a=o),{year:r,dayOfYear:a}}function je(e,t,n){var s,i,r=Ee(e.year(),t,n),a=Math.floor((e.dayOfYear()-r-1)/7)+1;return a<1?s=a+Ie(i=e.year()-1,t,n):a>Ie(e.year(),t,n)?(s=a-Ie(e.year(),t,n),i=e.year()+1):(i=e.year(),s=a),{week:s,year:i}}function Ie(e,t,n){var s=Ee(e,t,n),i=Ee(e+1,t,n);return(Se(e)-s+i)/7}C("w",["ww",2],"wo","week"),C("W",["WW",2],"Wo","isoWeek"),ae("w",q,ie),ae("ww",q,j),ae("W",q,ie),ae("WW",q,j),fe(["w","ww","W","WW"],function(e,t,n,s){t[s.substr(0,1)]=de(e)});function Ze(e,t){return e.slice(t,7).concat(e.slice(0,t))}C("d",0,"do","day"),C("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),C("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),C("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),C("e",0,0,"weekday"),C("E",0,0,"isoWeekday"),ae("d",q),ae("e",q),ae("E",q),ae("dd",function(e,t){return t.weekdaysMinRegex(e)}),ae("ddd",function(e,t){return t.weekdaysShortRegex(e)}),ae("dddd",function(e,t){return t.weekdaysRegex(e)}),fe(["dd","ddd","dddd"],function(e,t,n,s){var i=n._locale.weekdaysParse(e,s,n._strict);null!=i?t.d=i:f(n).invalidWeekday=e}),fe(["d","e","E"],function(e,t,n,s){t[s]=de(e)});var ze="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),qe="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),$e="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Be=se,Je=se,Qe=se;function Xe(){function e(e,t){return t.length-e.length}var t,n,s,i,r,a=[],o=[],u=[],l=[];for(t=0;t<7;t++)n=c([2e3,1]).day(t),s=ue(this.weekdaysMin(n,"")),i=ue(this.weekdaysShort(n,"")),r=ue(this.weekdays(n,"")),a.push(s),o.push(i),u.push(r),l.push(s),l.push(i),l.push(r);a.sort(e),o.sort(e),u.sort(e),l.sort(e),this._weekdaysRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function Ke(){return this.hours()%12||12}function et(e,t){C(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function tt(e,t){return t._meridiemParse}C("H",["HH",2],0,"hour"),C("h",["hh",2],0,Ke),C("k",["kk",2],0,function(){return this.hours()||24}),C("hmm",0,0,function(){return""+Ke.apply(this)+x(this.minutes(),2)}
vendor: 9,525 bytes, line 31
31),C("hmmss",0,0,function(){return""+Ke.apply(this)+x(this.minutes(),2)+x(this.seconds(),2)}),C("Hmm",0,0,function(){return""+this.hours()+x(this.minutes(),2)}),C("Hmmss",0,0,function(){return""+this.hours()+x(this.minutes(),2)+x(this.seconds(),2)}),et("a",!0),et("A",!1),ae("a",tt),ae("A",tt),ae("H",q,re),ae("h",q,ie),ae("k",q,ie),ae("HH",q,j),ae("hh",q,j),ae("kk",q,j),ae("hmm",$),ae("hmmss",B),ae("Hmm",$),ae("Hmmss",B),ce(["H","HH"],pe),ce(["k","kk"],function(e,t,n){var s=de(e);t[pe]=24===s?0:s}),ce(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),ce(["h","hh"],function(e,t,n){t[pe]=de(e),f(n).bigHour=!0}),ce("hmm",function(e,t,n){var s=e.length-2;t[pe]=de(e.substr(0,s)),t[ve]=de(e.substr(s)),f(n).bigHour=!0}),ce("hmmss",function(e,t,n){var s=e.length-4,i=e.length-2;t[pe]=de(e.substr(0,s)),t[ve]=de(e.substr(s,2)),t[ke]=de(e.substr(i)),f(n).bigHour=!0}),ce("Hmm",function(e,t,n){var s=e.length-2;t[pe]=de(e.substr(0,s)),t[ve]=de(e.substr(s))}),ce("Hmmss",function(e,t,n){var s=e.length-4,i=e.length-2;t[pe]=de(e.substr(0,s)),t[ve]=de(e.substr(s,2)),t[ke]=de(e.substr(i))});var nt=Te("Hours",!0);var st,it={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Pe,monthsShort:Re,week:{dow:0,doy:6},weekdays:ze,weekdaysMin:$e,weekdaysShort:qe,meridiemParse:/[ap]\.?m?\.?/i},rt={},at={};function ot(e,t){var n,s=Math.min(e.length,t.length);for(n=0;n<s;n+=1)if(e[n]!==t[n])return n;return s}function ut(e){return e?e.toLowerCase().replace("_","-"):e}function lt(e){var t=null;if(void 0===rt[e]&&"undefined"!=typeof module&&module&&module.exports&&function(e){return!(!e||!e.match("^[^/\\\\]*$"))}(e))try{t=st._abbr,require("./locale/"+e),dt(t)}catch(n){rt[e]=null}return rt[e]}function dt(e,t){var n;return e&&((n=o(t)?ct(e):ht(e,t))?st=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),st._abbr}function ht(e,t){if(null!==t){var n,s=it;if(t.abbr=e,null!=rt[e])S("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),s=rt[e]._config;else if(null!=t.parentLocale)if(null!=rt[t.parentLocale])s=rt[t.parentLocale]._config;else{if(null==(n=lt(t.parentLocale)))return at[t.parentLocale]||(at[t.parentLocale]=[]),at[t.parentLocale].push({name:e,config:t}),null;s=n._config}return rt[e]=new T(b(s,t)),at[e]&&at[e].forEach(function(e){ht(e.name,e.config)}),dt(e),rt[e]}return delete rt[e],null}function ct(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return st;if(!s(e)){if(t=lt(e))return t;e=[e]}return function(e){for(var t,n,s,i,r=0;r<e.length;){for(t=(i=ut(e[r]).split("-")).length,n=(n=ut(e[r+1]))?n.split("-"):null;t>0;){if(s=lt(i.slice(0,t).join("-")))return s;if(n&&n.length>=t&&ot(i,n)>=t-1)break;t--}r++}return st}(e)}function ft(e){var t,n=e._a;return n&&-2===f(e).overflow&&(t=n[ge]<0||n[ge]>11?ge:n[we]<1||n[we]>We(n[ye],n[ge])?we:n[pe]<0||n[pe]>24||24===n[pe]&&(0!==n[ve]||0!==n[ke]||0!==n[Me])?pe:n[ve]<0||n[ve]>59?ve:n[ke]<0||n[ke]>59?ke:n[Me]<0||n[Me]>999?Me:-1,f(e)._overflowDayOfYear&&(t<ye||t>we)&&(t=we),f(e)._overflowWeeks&&-1===t&&(t=De),f(e)._overflowWeekday&&-1===t&&(t=Ye),f(e).overflow=t),e}var mt=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,_t=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,yt=/Z|[+-]\d\d(?::?\d\d)?/,gt=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],wt=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],pt=/^\/?Date\((-?\d+)/i,vt=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,kt={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Mt(e){var t,n,s,i,r,a,o=e._i,u=mt.exec(o)||_t.exec(o),l=gt.length,d=wt.length;if(u){for(f(e).iso=!0,t=0,n=l;t<n;t++)if(gt[t][1].exec(u[1])){i=gt[t][0],s=!1!==gt[t][2];break}if(null==i)return void(e._isValid=!1);if(u[3]){for(t=0,n=d;t<n;t++)if(wt[t][1].exec(u[3])){r=(u[2]||" ")+wt[t][0];break}if(null==r)return void(e._isValid=!1)}if(!s&&null!=r)return void(e._isValid=!1);if(u[4]){if(!yt.exec(u[4]))return void(e._isValid=!1);a="Z"}e._f=i+(r||"")+(a||""),bt(e)}else e._isValid=!1}function Dt(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function Yt(e){var t,n,s,i,r,a,o,u,l=vt.exec(e._i.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));if(l){if(n=l[4],s=l[3],i=l[2],r=l[5],a=l[6],o=l[7],u=[Dt(n),Re.indexOf(s),parseInt(i,10),parseInt(r,10),parseInt(a,10)],o&&u.push(parseInt(o,10)),t=u,!function(e,t,n){return!e||qe.indexOf(e)===new Date(t[0],t[1],t[2]).getDay()||(f(n).weekdayMismatch=!0,n._isValid=!1,!1)}(l[1],t,e))return;e._a=t,e._tzm=function(e,t,n){if(e)return kt[e];if(t)return 0;var s=parseInt(n,10),i=s%100;return(s-i)/100*60+i}(l[8],l[9],l[10]),e._d=Ge.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),f(e).rfc2822=!0}else e._isValid=!1}function St(e,t,n){return null!=e?e:null!=t?t:n}function Ot(e){var t,s,i,r,a,o=[];if(!e._d){for(i=function(e){var t=new Date(n.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}(e),e._w&&null==e._a[we]&&null==e._a[ge]&&function(e){var t,n,s,i,r,a,o,u,l;null!=(t=e._w).GG||null!=t.W||null!=t.E?(r=1,a=4,n=St(t.GG,e._a[ye],je(Nt(),1,4).year),s=St(t.W,1),((i=St(t.E,1))<1||i>7)&&(u=!0)):(r=e._locale._week.dow,a=e._locale._week.doy,l=je(Nt(),r,a),n=St(t.gg,e._a[ye],l.year),s=St(t.w,l.week),null!=t.d?((i=t.d)<0||i>6)&&(u=!0):null!=t.e?(i=t.e+r,(t.e<0||t.e>6)&&(u=!0)):i=r);s<1||s>Ie(n,r,a)?f(e)._overflowWeeks=!0:null!=u?f(e)._overflowWeekday=!0:(o=Ae(n,s,i,r,a),e._a[ye]=o.year,e._dayOfYear=o.dayOfYear)}(e),null!=e._dayOfYear&&(a=St(e._a[ye],i[ye]),(e._dayOfYear>Se(a)||0===e._dayOfYear)&&(f(e)._overflowDayOfYear=!0),s=Ge(a,0,e._dayOfYear),e._a[ge]=s.getUTCMonth(),e._a[we]=s.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=o[t]=i[t];for(;t<7;t++)e._a[t]=o[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[pe]&&0===e._a[ve]&&0===e._a[ke]&&0===e._a[Me]&&(e._nextDay=!0,e._a[pe]=0),e._d=(e._useUTC?Ge:function(e,t,n,s,i,r,a){var o;return e<100&&e>=0?(o=new Date(e+400,t,n,s,i,r,a),isFinite(o.getFullYear())&&o.setFullYear(e)):o=new Date(e,t,n,s,i,r,a),o}).apply(null,o),r=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[pe]=24),e._w&&void 0!==e._w.d&&e._w.d!==r&&(f(e).weekdayMismatch=!0)}}function bt(e){if(e._f!==n.ISO_8601)if(e._f!==n.RFC_2822){e._a=[],f(e).empty=!0;var t,s,i,r,a,o,u,l=""+e._i,d=l.length,h=0;for(u=(i=H(e._f,e._locale).match(N)||[]).length,t=0;t<u;t++)r=i[t],(s=(l.match(oe(r,e))||[])[0])&&((a=l.substr(0,l.indexOf(s))).length>0&&f(e).unusedInput.push(a),l=l.slice(l.indexOf(s)+s.length),h+=s.length),R[r]?(s?f(e).empty=!1:f(e).unusedTokens.push(r),me(r,s,e)):e._strict&&!s&&f(e).unusedTokens.push(r);f(e).charsLeftOver=d-h,l.length>0&&f(e).unusedInput.push(l),e._a[pe]<=12&&!0===f(e).bigHour&&e._a[pe]>0&&(f(e).bigHour=void 0),f(e).parsedDateParts=e._a.slice(0),f(e).meridiem=e._meridiem,e._a[pe]=function(e,t,n){var s;if(null==n)return t;return null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((s=e.isPM(n))&&t<12&&(t+=12),s||12!==t||(t=0),t):t}(e._locale,e._a[pe],e._meridiem),null!==(o=f(e).era)&&(e._a[ye]=e._locale.erasConvertYear(o,e._a[ye])),Ot(e),ft(e)}else Yt(e);else Mt(e)}function Tt(e){var t=e._i,r=e._f;return e._locale=e._locale||ct(e._l),null===t||void 0===r&&""===t?_({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),v(t)?new p(ft(t)):(l(t)?e._d=t:s(r)?function(e){var t,n,s,i,r,a,o=!1,u=e._f.length;if(0===u)return f(e).invalidFormat=!0,void(e._d=new Date(NaN));for(i=0;i<u;i++)r=0,a=!1,t=w({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[i],bt(t),m(t)&&(a=!0),r+=f(t).charsLeftOver,r+=10*f(t).unusedTokens.length,f(t).score=r,o?r<s&&(s=r,n=t):(null==s||r<s||a)&&(s=r,n=t,a&&(o=!0));h(e,n||t)}(e):r?bt(e):function(e){var t=e._i;o(t)?e._d=new Date(n.now()):l(t)?e._d=new Date(t.valueOf()):"string"==typeof t?function(e){var t=pt.exec(e._i);
vendor: 2,401 bytes, line 31
31null===t?(Mt(e),!1===e._isValid&&(delete e._isValid,Yt(e),!1===e._isValid&&(delete e._isValid,e._strict?e._isValid=!1:n.createFromInputFallback(e)))):e._d=new Date(+t[1])}(e):s(t)?(e._a=d(t.slice(0),function(e){return parseInt(e,10)}),Ot(e)):i(t)?function(e){if(!e._d){var t=V(e._i),n=void 0===t.day?t.date:t.day;e._a=d([t.year,t.month,n,t.hour,t.minute,t.second,t.millisecond],function(e){return e&&parseInt(e,10)}),Ot(e)}}(e):u(t)?e._d=new Date(t):n.createFromInputFallback(e)}(e),m(e)||(e._d=null),e))}function xt(e,t,n,r,o){var u,l={};return!0!==t&&!1!==t||(r=t,t=void 0),!0!==n&&!1!==n||(r=n,n=void 0),(i(e)&&a(e)||s(e)&&0===e.length)&&(e=void 0),l._isAMomentObject=!0,l._useUTC=l._isUTC=o,l._l=n,l._i=e,l._f=t,l._strict=r,(u=new p(ft(Tt(l))))._nextDay&&(u.add(1,"d"),u._nextDay=void 0),u}function Nt(e,t,n,s){return xt(e,t,n,s,!1)}n.createFromInputFallback=M("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))}),n.ISO_8601=function(){},n.RFC_2822=function(){};var Wt=M("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Nt.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:_()}),Pt=M("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Nt.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:_()});function Rt(e,t){var n,i;if(1===t.length&&s(t[0])&&(t=t[0]),!t.length)return Nt();for(n=t[0],i=1;i<t.length;++i)t[i].isValid()&&!t[i][e](n)||(n=t[i]);return n}var Ct=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Ut(e){var t=V(e),n=t.year||0,s=t.quarter||0,i=t.month||0,a=t.week||t.isoWeek||0,o=t.day||0,u=t.hour||0,l=t.minute||0,d=t.second||0,h=t.millisecond||0;this._isValid=function(e){var t,n,s=!1,i=Ct.length;for(t in e)if(r(e,t)&&(-1===Oe.call(Ct,t)||null!=e[t]&&isNaN(e[t])))return!1;for(n=0;n<i;++n)if(e[Ct[n]]){if(s)return!1;parseFloat(e[Ct[n]])!==de(e[Ct[n]])&&(s=!0)}return!0}(t),this._milliseconds=+h+1e3*d+6e4*l+1e3*u*60*60,this._days=+o+7*a,this._months=+i+3*s+12*n,this._data={}
vendor: 4,161 bytes, line 31
31,this._locale=ct(),this._bubble()}function Ht(e){return e instanceof Ut}function Ft(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function Lt(e,t){C(e,0,0,function(){var e=this.utcOffset(),n="+";return e<0&&(e=-e,n="-"),n+x(~~(e/60),2)+t+x(~~e%60,2)})}Lt("Z",":"),Lt("ZZ",""),ae("Z",ne),ae("ZZ",ne),ce(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=Gt(ne,e)});var Vt=/([\+\-]|\d\d)/gi;function Gt(e,t){var n,s,i=(t||"").match(e);return null===i?null:0===(s=60*(n=((i[i.length-1]||[])+"").match(Vt)||["-",0,0])[1]+de(n[2]))?0:"+"===n[0]?s:-s}function Et(e,t){var s,i;return t._isUTC?(s=t.clone(),i=(v(e)||l(e)?e.valueOf():Nt(e).valueOf())-s.valueOf(),s._d.setTime(s._d.valueOf()+i),n.updateOffset(s,!1),s):Nt(e).local()}function At(e){return-Math.round(e._d.getTimezoneOffset())}function jt(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}n.updateOffset=function(){};var It=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Zt=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function zt(e,t){var n,s,i,a=e,o=null;return Ht(e)?a={ms:e._milliseconds,d:e._days,M:e._months}:u(e)||!isNaN(+e)?(a={},t?a[t]=+e:a.milliseconds=+e):(o=It.exec(e))?(n="-"===o[1]?-1:1,a={y:0,d:de(o[we])*n,h:de(o[pe])*n,m:de(o[ve])*n,s:de(o[ke])*n,ms:de(Ft(1e3*o[Me]))*n}):(o=Zt.exec(e))?(n="-"===o[1]?-1:1,a={y:qt(o[2],n),M:qt(o[3],n),w:qt(o[4],n),d:qt(o[5],n),h:qt(o[6],n),m:qt(o[7],n),s:qt(o[8],n)}):null==a?a={}:"object"==typeof a&&("from"in a||"to"in a)&&(i=function(e,t){var n;if(!e.isValid()||!t.isValid())return{milliseconds:0,months:0};t=Et(t,e),e.isBefore(t)?n=$t(e,t):((n=$t(t,e)).milliseconds=-n.milliseconds,n.months=-n.months);return n}(Nt(a.from),Nt(a.to)),(a={}).ms=i.milliseconds,a.M=i.months),s=new Ut(a),Ht(e)&&r(e,"_locale")&&(s._locale=e._locale),Ht(e)&&r(e,"_isValid")&&(s._isValid=e._isValid),s}function qt(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function $t(e,t){var n={};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function Bt(e,t){return function(n,s){var i;return null===s||isNaN(+s)||(S(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),i=n,n=s,s=i),Jt(this,zt(n,s),e),this}}function Jt(e,t,s,i){var r=t._milliseconds,a=Ft(t._days),o=Ft(t._months);e.isValid()&&(i=null==i||i,o&&Fe(e,xe(e,"Month")+o*s),a&&Ne(e,"Date",xe(e,"Date")+a*s),r&&e._d.setTime(e._d.valueOf()+r*s),i&&n.updateOffset(e,a||o))}zt.fn=Ut.prototype,zt.invalid=function(){return zt(NaN)};var Qt=Bt(1,"add"),Xt=Bt(-1,"subtract");function Kt(e){return"string"==typeof e||e instanceof String}function en(e){return v(e)||l(e)||Kt(e)||u(e)||function(e){var t=s(e),n=!1;t&&(n=0===e.filter(function(t){return!u(t)&&Kt(e)}).length);return t&&n}(e)||function(e){var t,n,s=i(e)&&!a(e),o=!1,u=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],l=u.length;for(t=0;t<l;t+=1)n=u[t],o=o||r(e,n);return s&&o}(e)||null==e}function tn(e,t){if(e.date()<t.date())return-tn(t,e);var n=12*(t.year()-e.year())+(t.month()-e.month()),s=e.clone().add(n,"months");return-(n+(t-s<0?(t-s)/(s-e.clone().add(n-1,"months")):(t-s)/(e.clone().add(n+1,"months")-s)))||0}function nn(e){var t;return void 0===e?this._locale._abbr:(null!=(t=ct(e))&&(this._locale=t),this)}n.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",n.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var sn=M("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return void 0===e?this.localeData():this.locale(e)});function rn(){return this._locale}var an=1e3,on=60*an,un=60*on,ln=3506328*un;function dn(e,t){return(e%t+t)%t}function hn(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-ln:new Date(e,t,n).valueOf()}function cn(e,t,n){return e<100&&e>
vendor: 15,002 bytes, line 31
31=0?Date.UTC(e+400,t,n)-ln:Date.UTC(e,t,n)}function fn(e,t){return t.erasAbbrRegex(e)}function mn(){var e,t,n,s,i,r=[],a=[],o=[],u=[],l=this.eras();for(e=0,t=l.length;e<t;++e)n=ue(l[e].name),s=ue(l[e].abbr),i=ue(l[e].narrow),a.push(n),r.push(s),o.push(i),u.push(n),u.push(s),u.push(i);this._erasRegex=new RegExp("^("+u.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+a.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+r.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+o.join("|")+")","i")}function _n(e,t){C(0,[e,e.length],0,t)}function yn(e,t,n,s,i){var r;return null==e?je(this,s,i).year:(t>(r=Ie(e,s,i))&&(t=r),function(e,t,n,s,i){var r=Ae(e,t,n,s,i),a=Ge(r.year,0,r.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}.call(this,e,t,n,s,i))}C("N",0,0,"eraAbbr"),C("NN",0,0,"eraAbbr"),C("NNN",0,0,"eraAbbr"),C("NNNN",0,0,"eraName"),C("NNNNN",0,0,"eraNarrow"),C("y",["y",1],"yo","eraYear"),C("y",["yy",2],0,"eraYear"),C("y",["yyy",3],0,"eraYear"),C("y",["yyyy",4],0,"eraYear"),ae("N",fn),ae("NN",fn),ae("NNN",fn),ae("NNNN",function(e,t){return t.erasNameRegex(e)}),ae("NNNNN",function(e,t){return t.erasNarrowRegex(e)}),ce(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,s){var i=n._locale.erasParse(e,s,n._strict);i?f(n).era=i:f(n).invalidEra=e}),ae("y",K),ae("yy",K),ae("yyy",K),ae("yyyy",K),ae("yo",function(e,t){return t._eraYearOrdinalRegex||K}),ce(["y","yy","yyy","yyyy"],ye),ce(["yo"],function(e,t,n,s){var i;n._locale._eraYearOrdinalRegex&&(i=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[ye]=n._locale.eraYearOrdinalParse(e,i):t[ye]=parseInt(e,10)}),C(0,["gg",2],0,function(){return this.weekYear()%100}),C(0,["GG",2],0,function(){return this.isoWeekYear()%100}),_n("gggg","weekYear"),_n("ggggg","weekYear"),_n("GGGG","isoWeekYear"),_n("GGGGG","isoWeekYear"),ae("G",ee),ae("g",ee),ae("GG",q,j),ae("gg",q,j),ae("GGGG",Q,Z),ae("gggg",Q,Z),ae("GGGGG",X,z),ae("ggggg",X,z),fe(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,s){t[s.substr(0,2)]=de(e)}),fe(["gg","GG"],function(e,t,s,i){t[i]=n.parseTwoDigitYear(e)}),C("Q",0,"Qo","quarter"),ae("Q",A),ce("Q",function(e,t){t[ge]=3*(de(e)-1)}),C("D",["DD",2],"Do","date"),ae("D",q,ie),ae("DD",q,j),ae("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),ce(["D","DD"],we),ce("Do",function(e,t){t[we]=de(e.match(q)[0])});var gn=Te("Date",!0);C("DDD",["DDDD",3],"DDDo","dayOfYear"),ae("DDD",J),ae("DDDD",I),ce(["DDD","DDDD"],function(e,t,n){n._dayOfYear=de(e)}),C("m",["mm",2],0,"minute"),ae("m",q,re),ae("mm",q,j),ce(["m","mm"],ve);var wn=Te("Minutes",!1);C("s",["ss",2],0,"second"),ae("s",q,re),ae("ss",q,j),ce(["s","ss"],ke);var pn,vn,kn=Te("Seconds",!1);for(C("S",0,0,function(){return~~(this.millisecond()/100)}),C(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),C(0,["SSS",3],0,"millisecond"),C(0,["SSSS",4],0,function(){return 10*this.millisecond()}),C(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),C(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),C(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),C(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),C(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),ae("S",J,A),ae("SS",J,j),ae("SSS",J,I),pn="SSSS";pn.length<=9;pn+="S")ae(pn,K);function Mn(e,t){t[Me]=de(1e3*("0."+e))}for(pn="S";pn.length<=9;pn+="S")ce(pn,Mn);vn=Te("Milliseconds",!1),C("z",0,0,"zoneAbbr"),C("zz",0,0,"zoneName");var Dn=p.prototype;function Yn(e){return e}Dn.add=Qt,Dn.calendar=function(e,t){1===arguments.length&&(arguments[0]?en(arguments[0])?(e=arguments[0],t=void 0):function(e){var t,n=i(e)&&!a(e),s=!1,o=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"];for(t=0;t<o.length;t+=1)s=s||r(e,o[t]);return n&&s}(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var s=e||Nt(),o=Et(s,this).startOf("day"),u=n.calendarFormat(this,o)||"sameElse",l=t&&(O(t[u])?t[u].call(this,s):t[u]);return this.format(l||this.localeData().calendar(u,this,Nt(s)))},Dn.clone=function(){return new p(this)},Dn.diff=function(e,t,n){var s,i,r;if(!this.isValid())return NaN;if(!(s=Et(e,this)).isValid())return NaN;switch(i=6e4*(s.utcOffset()-this.utcOffset()),t=L(t)){case"year":r=tn(this,s)/12;break;case"month":r=tn(this,s);break;case"quarter":r=tn(this,s)/3;break;case"second":r=(this-s)/1e3;break;case"minute":r=(this-s)/6e4;break;case"hour":r=(this-s)/36e5;break;case"day":r=(this-s-i)/864e5;break;case"week":r=(this-s-i)/6048e5;break;default:r=this-s}return n?r:le(r)},Dn.endOf=function(e){var t,s;if(void 0===(e=L(e))||"millisecond"===e||!this.isValid())return this;switch(s=this._isUTC?cn:hn,e){case"year":t=s(this.year()+1,0,1)-1;break;case"quarter":t=s(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=s(this.year(),this.month()+1,1)-1;break;case"week":t=s(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=s(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=s(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=un-dn(t+(this._isUTC?0:this.utcOffset()*on),un)-1;break;case"minute":t=this._d.valueOf(),t+=on-dn(t,on)-1;break;case"second":t=this._d.valueOf(),t+=an-dn(t,an)-1}return this._d.setTime(t),n.updateOffset(this,!0),this},Dn.format=function(e){e||(e=this.isUtc()?n.defaultFormatUtc:n.defaultFormat);var t=U(this,e);return this.localeData().postformat(t)},Dn.from=function(e,t){return this.isValid()&&(v(e)&&e.isValid()||Nt(e).isValid())?zt({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},Dn.fromNow=function(e){return this.from(Nt(),e)},Dn.to=function(e,t){return this.isValid()&&(v(e)&&e.isValid()||Nt(e).isValid())?zt({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},Dn.toNow=function(e){return this.to(Nt(),e)},Dn.get=function(e){return O(this[e=L(e)])?this[e]():this},Dn.invalidAt=function(){return f(this).overflow},Dn.isAfter=function(e,t){var n=v(e)?e:Nt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=L(t)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf())},Dn.isBefore=function(e,t){var n=v(e)?e:Nt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=L(t)||"millisecond")?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf())},Dn.isBetween=function(e,t,n,s){var i=v(e)?e:Nt(e),r=v(t)?t:Nt(t);return!!(this.isValid()&&i.isValid()&&r.isValid())&&("("===(s=s||"()")[0]?this.isAfter(i,n):!this.isBefore(i,n))&&(")"===s[1]?this.isBefore(r,n):!this.isAfter(r,n))},Dn.isSame=function(e,t){var n,s=v(e)?e:Nt(e);return!(!this.isValid()||!s.isValid())&&("millisecond"===(t=L(t)||"millisecond")?this.valueOf()===s.valueOf():(n=s.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf()))},Dn.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)},Dn.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)},Dn.isValid=function(){return m(this)},Dn.lang=sn,Dn.locale=nn,Dn.localeData=rn,Dn.max=Pt,Dn.min=Wt,Dn.parsingFlags=function(){return h({},f(this))},Dn.set=function(e,t){if("object"==typeof e){var n,s=function(e){var t,n=[];for(t in e)r(e,t)&&n.push({unit:t,priority:G[t]});return n.sort(function(e,t){return e.priority-t.priority}),n}(e=V(e)),i=s.length;for(n=0;n<i;n++)this[s[n].unit](e[s[n].unit])}else if(O(this[e=L(e)]))return this[e](t);return this},Dn.startOf=function(e){var t,s;if(void 0===(e=L(e))||"millisecond"===e||!this.isValid())return this;switch(s=this._isUTC?cn:hn,e){case"year":t=s(this.year(),0,1);break;case"quarter":t=s(this.year(),this.month()-this.month()%3,1);break;case"month":t=s(this.year(),this.month(),1);break;case"week":t=s(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=s(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=s(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=dn(t+(this._isUTC?0:this.utcOffset()*on),un);break;case"minute":t=this._d.valueOf(),t-=dn(t,on);break;case"second":t=this._d.valueOf(),t-=dn(t,an)}return this._d.setTime(t),n.updateOffset(this,!0),this},Dn.subtract=Xt,Dn.toArray=function(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]},Dn.toObject=function(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}},Dn.toDate=function(){return new Date(this.valueOf())},Dn.toISOString=function(e){if(!this.isValid())return null;var t=!0!==e,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?U(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):O(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",U(n,"Z")):U(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},Dn.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,t,n,s="moment",i="";return this.isLocal()||(s=0===this.utcOffset()?"moment.utc":"moment.parseZone",i="Z"),e="["+s+'("]',t=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",n=i+'[")]',this.format(e+t+"-MM-DD[T]HH:mm:ss.SSS"+n)},"undefined"!=typeof Symbol&&null!=Symbol.for&&(Dn[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),Dn.toJSON=function(){return this.isValid()?this.toISOString():null},Dn.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},Dn.unix=function(){return Math.floor(this.valueOf()/1e3)},Dn.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},Dn.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},Dn.eraName=function(){var e,t,n,s=this.localeData().eras();for(e=0,t=s.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),s[e].since<=n&&n<=s[e].until)return s[e].name;if(s[e].until<=n&&n<=s[e].since)return s[e].name}return""},Dn.eraNarrow=function(){var e,t,n,s=this.localeData().eras();for(e=0,t=s.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),s[e].since<=n&&n<=s[e].until)return s[e].narrow;if(s[e].until<=n&&n<=s[e].since)return s[e].narrow}return""},Dn.eraAbbr=function(){var e,t,n,s=this.localeData().eras();for(e=0,t=s.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),s[e].since<=n&&n<=s[e].until)return s[e].abbr;if(s[e].until<=n&&n<=s[e].since)return s[e].abbr}return""},Dn.eraYear=function(){var e,t,s,i,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(s=r[e].since<=r[e].until?1:-1,i=this.clone().startOf("day").valueOf(),r[e].since<=i&&i<=r[e].until||r[e].until<=i&&i<=r[e].since)return(this.year()-n(r[e].since).year())*s+r[e].offset;return this.year()},Dn.year=be,Dn.isLeapYear=function(){return _e(this.year())},Dn.weekYear=function(e){return yn.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)},Dn.isoWeekYear=function(e){return yn.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},Dn.quarter=Dn.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},Dn.month=Le,Dn.daysInMonth=function(){return We(this.year(),this.month())},Dn.week=Dn.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},Dn.isoWeek=Dn.isoWeeks=function(e){var t=je(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},Dn.weeksInYear=function(){var e=this.localeData()._week;return Ie(this.year(),e.dow,e.doy)},Dn.weeksInWeekYear=function(){var e=this.localeData()._week;return Ie(this.weekYear(),e.dow,e.doy)},Dn.isoWeeksInYear=function(){return Ie(this.year(),1,4)},Dn.isoWeeksInISOWeekYear=function(){return Ie(this.isoWeekYear(),1,4)},Dn.date=gn,Dn.day=Dn.days=function(e){if(!this.isValid())return null!=e?this:NaN;var t=xe(this,"Day");return null!=e?(e=function(e,t){return"string"!=typeof e?e:isNaN(e)?"number"==typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}(e,this.localeData()),this.add(e-t,"d")):t},Dn.weekday=function(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},Dn.isoWeekday=function(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=function(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7},Dn.dayOfYear=function(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},Dn.hour=Dn.hours=nt,Dn.minute=Dn.minutes=wn,Dn.second=Dn.seconds=kn,Dn.millisecond=Dn.milliseconds=vn,Dn.utcOffset=function(e,t,s){var i,r=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=Gt(ne,e)))return this}else Math.abs(e)<16&&!s&&(e*=60);return!this._isUTC&&t&&(i=At(this)),this._offset=e,this._isUTC=!0,null!=i&&this.add(i,"m"),r!==e&&(!t||this._changeInProgress?Jt(this,zt(e-r,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,n.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?r:At(this)},Dn.utc=function(e){return this.utcOffset(0,e)},Dn.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(At(this),"m")),this},Dn.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=Gt(te,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this},Dn.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?Nt(e).utcOffset():0,(this.utcOffset()-e)%60==0)},Dn.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},Dn.isLocal=function(){return!!this.isValid()&&!this._isUTC},Dn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},Dn.isUtc=jt,Dn.isUTC=jt,Dn.zoneAbbr=function(){return this._isUTC?"UTC":""},Dn.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},Dn.dates=M("dates accessor is deprecated. Use date instead.",gn),Dn.months=M("months accessor is deprecated. Use month instead",Le),Dn.years=M("years accessor is deprecated. Use year instead",be),Dn.zone=M("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}),Dn.isDSTShifted=M("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!o(this._isDSTShifted))return this._isDSTShifted;var e,t={};return w(t,this),(t=Tt(t))._a?(e=t._isUTC?c(t._a):Nt(t._a),this._isDSTShifted=this.isValid()&&function(e,t,n){var s,i=Math.min(e.length,t.length),r=M
vendor: 16,384 bytes, lines 31-35
31ath.abs(e.length-t.length),a=0;for(s=0;s<i;s++)(n&&e[s]!==t[s]||!n&&de(e[s])!==de(t[s]))&&a++;return a+r}(t._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted});var Sn=T.prototype;function On(e,t,n,s){var i=ct(),r=c().set(s,t);return i[n](r,e)}function bn(e,t,n){if(u(e)&&(t=e,e=void 0),e=e||"",null!=t)return On(e,t,n,"month");var s,i=[];for(s=0;s<12;s++)i[s]=On(e,s,n,"month");return i}function Tn(e,t,n,s){"boolean"==typeof e?(u(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,u(t)&&(n=t,t=void 0),t=t||"");var i,r=ct(),a=e?r._week.dow:0,o=[];if(null!=n)return On(t,(n+a)%7,s,"day");for(i=0;i<7;i++)o[i]=On(t,(i+a)%7,s,"day");return o}Sn.calendar=function(e,t,n){var s=this._calendar[e]||this._calendar.sameElse;return O(s)?s.call(t,n):s},Sn.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(N).map(function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e}).join(""),this._longDateFormat[e])},Sn.invalidDate=function(){return this._invalidDate},Sn.ordinal=function(e){return this._ordinal.replace("%d",e)},Sn.preparse=Yn,Sn.postformat=Yn,Sn.relativeTime=function(e,t,n,s){var i=this._relativeTime[n];return O(i)?i(e,t,n,s):i.replace(/%d/i,e)},Sn.pastFuture=function(e,t){var n=this._relativeTime[e>0?"future":"past"];return O(n)?n(t):n.replace(/%s/i,t)},Sn.set=function(e){var t,n;for(n in e)r(e,n)&&(O(t=e[n])?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},Sn.eras=function(e,t){var s,i,r,a=this._eras||ct("en")._eras;for(s=0,i=a.length;s<i;++s){switch(typeof a[s].since){case"string":r=n(a[s].since).startOf("day"),a[s].since=r.valueOf()}switch(typeof a[s].until){case"undefined":a[s].until=1/0;break;case"string":r=n(a[s].until).startOf("day").valueOf(),a[s].until=r.valueOf()}}return a},Sn.erasParse=function(e,t,n){var s,i,r,a,o,u=this.eras();for(e=e.toUpperCase(),s=0,i=u.length;s<i;++s)if(r=u[s].name.toUpperCase(),a=u[s].abbr.toUpperCase(),o=u[s].narrow.toUpperCase(),n)switch(t){case"N":case"NN":case"NNN":if(a===e)return u[s];break;case"NNNN":if(r===e)return u[s];break;case"NNNNN":if(o===e)return u[s]}else if([r,a,o].indexOf(e)>=0)return u[s]},Sn.erasConvertYear=function(e,t){var s=e.since<=e.until?1:-1;return void 0===t?n(e.since).year():n(e.since).year()+(t-e.offset)*s},Sn.erasAbbrRegex=function(e){return r(this,"_erasAbbrRegex")||mn.call(this),e?this._erasAbbrRegex:this._erasRegex},Sn.erasNameRegex=function(e){return r(this,"_erasNameRegex")||mn.call(this),e?this._erasNameRegex:this._erasRegex},Sn.erasNarrowRegex=function(e){return r(this,"_erasNarrowRegex")||mn.call(this),e?this._erasNarrowRegex:this._erasRegex},Sn.months=function(e,t){return e?s(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||Ce).test(t)?"format":"standalone"][e.month()]:s(this._months)?this._months:this._months.standalone},Sn.monthsShort=function(e,t){return e?s(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[Ce.test(t)?"format":"standalone"][e.month()]:s(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},Sn.monthsParse=function(e,t,n){var s,i,r;if(this._monthsParseExact)return function(e,t,n){var s,i,r,a=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],s=0;s<12;++s)r=c([2e3,s]),this._shortMonthsParse[s]=this.monthsShort(r,"").toLocaleLowerCase(),this._longMonthsParse[s]=this.months(r,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(i=Oe.call(this._shortMonthsParse,a))?i:null:-1!==(i=Oe.call(this._longMonthsParse,a))?i:null:"MMM"===t?-1!==(i=Oe.call(this._shortMonthsParse,a))?i:-1!==(i=Oe.call(this._longMonthsParse,a))?i:null:-1!==(i=Oe.call(this._longMonthsParse,a))?i:-1!==(i=Oe.call(this._shortMonthsParse,a))?i:null}.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),s=0;s<12;s++){if(i=c([2e3,s]),n&&!this._longMonthsParse[s]&&(this._longMonthsParse[s]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[s]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[s]||(r="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[s]=new RegExp(r.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[s].test(e))return s;if(n&&"MMM"===t&&this._shortMonthsParse[s].test(e))return s;if(!n&&this._monthsParse[s].test(e))return s}},Sn.monthsRegex=function(e){return this._monthsParseExact?(r(this,"_monthsRegex")||Ve.call(this),e?this._monthsStrictRegex:this._monthsRegex):(r(this,"_monthsRegex")||(this._monthsRegex=He),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},Sn.monthsShortRegex=function(e){return this._monthsParseExact?(r(this,"_monthsRegex")||Ve.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(r(this,"_monthsShortRegex")||(this._monthsShortRegex=Ue),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},Sn.week=function(e){return je(e,this._week.dow,this._week.doy).week},Sn.firstDayOfYear=function(){return this._week.doy},Sn.firstDayOfWeek=function(){return this._week.dow},Sn.weekdays=function(e,t){var n=s(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?Ze(n,this._week.dow):e?n[e.day()]:n},Sn.weekdaysMin=function(e){return!0===e?Ze(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin},Sn.weekdaysShort=function(e){return!0===e?Ze(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort},Sn.weekdaysParse=function(e,t,n){var s,i,r;if(this._weekdaysParseExact)return function(e,t,n){var s,i,r,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],s=0;s<7;++s)r=c([2e3,1]).day(s),this._minWeekdaysParse[s]=this.weekdaysMin(r,"").toLocaleLowerCase(),this._shortWeekdaysParse[s]=this.weekdaysShort(r,"").toLocaleLowerCase(),this._weekdaysParse[s]=this.weekdays(r,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(i=Oe.call(this._weekdaysParse,a))?i:null:"ddd"===t?-1!==(i=Oe.call(this._shortWeekdaysParse,a))?i:null:-1!==(i=Oe.call(this._minWeekdaysParse,a))?i:null:"dddd"===t?-1!==(i=Oe.call(this._weekdaysParse,a))?i:-1!==(i=Oe.call(this._shortWeekdaysParse,a))?i:-1!==(i=Oe.call(this._minWeekdaysParse,a))?i:null:"ddd"===t?-1!==(i=Oe.call(this._shortWeekdaysParse,a))?i:-1!==(i=Oe.call(this._weekdaysParse,a))?i:-1!==(i=Oe.call(this._minWeekdaysParse,a))?i:null:-1!==(i=Oe.call(this._minWeekdaysParse,a))?i:-1!==(i=Oe.call(this._weekdaysParse,a))?i:-1!==(i=Oe.call(this._shortWeekdaysParse,a))?i:null}.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),s=0;s<7;s++){if(i=c([2e3,1]).day(s),n&&!this._fullWeekdaysParse[s]&&(this._fullWeekdaysParse[s]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[s]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[s]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[s]||(r="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[s]=new RegExp(r.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[s].test(e))return s;if(n&&"ddd"===t&&this._shortWeekdaysParse[s].test(e))return s;if(n&&"dd"===t&&this._minWeekdaysParse[s].test(e))return s;if(!n&&this._weekdaysParse[s].test(e))return s}},Sn.weekdaysRegex=function(e){return this._weekdaysParseExact?(r(this,"_weekdaysRegex")||Xe.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(r(this,"_weekdaysRegex")||(this._weekdaysRegex=Be),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},Sn.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(r(this,"_weekdaysRegex")||Xe.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(r(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Je),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},Sn.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(r(this,"_weekdaysRegex")||Xe.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(r(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Qe),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},Sn.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},Sn.meridiem=function(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"},dt("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===de(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),n.lang=M("moment.lang is deprecated. Use moment.locale instead.",dt),n.langData=M("moment.langData is deprecated. Use moment.localeData instead.",ct);var xn=Math.abs;function Nn(e,t,n,s){var i=zt(t,n);return e._milliseconds+=s*i._milliseconds,e._days+=s*i._days,e._months+=s*i._months,e._bubble()}function Wn(e){return e<0?Math.floor(e):Math.ceil(e)}function Pn(e){return 4800*e/146097}function Rn(e){return 146097*e/4800}function Cn(e){return function(){return this.as(e)}}var Un=Cn("ms"),Hn=Cn("s"),Fn=Cn("m"),Ln=Cn("h"),Vn=Cn("d"),Gn=Cn("w"),En=Cn("M"),An=Cn("Q"),jn=Cn("y"),In=Un;function Zn(e){return function(){return this.isValid()?this._data[e]:NaN}}var zn=Zn("milliseconds"),qn=Zn("seconds"),$n=Zn("minutes"),Bn=Zn("hours"),Jn=Zn("days"),Qn=Zn("months"),Xn=Zn("years");var Kn=Math.round,es={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};var ts=Math.abs;function ns(e){return(e>0)-(e<0)||+e}function ss(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n,s,i,r,a,o,u=ts(this._milliseconds)/1e3,l=ts(this._days),d=ts(this._months),h=this.asSeconds();return h?(e=le(u/60),t=le(e/60),u%=60,e%=60,n=le(d/12),d%=12,s=u?u.toFixed(3).replace(/\.?0+$/,""):"",i=h<0?"-":"",r=ns(this._months)!==ns(h)?"-":"",a=ns(this._days)!==ns(h)?"-":"",o=ns(this._milliseconds)!==ns(h)?"-":"",i+"P"+(n?r+n+"Y":"")+(d?r+d+"M":"")+(l?a+l+"D":"")+(t||e||u?"T":"")+(t?o+t+"H":"")+(e?o+e+"M":"")+(u?o+s+"S":"")):"P0D"}var is=Ut.prototype;return is.isValid=function(){return this._isValid},is.abs=function(){var e=this._data;return this._milliseconds=xn(this._milliseconds),this._days=xn(this._days),this._months=xn(this._months),e.milliseconds=xn(e.milliseconds),e.seconds=xn(e.seconds),e.minutes=xn(e.minutes),e.hours=xn(e.hours),e.months=xn(e.months),e.years=xn(e.years),this},is.add=function(e,t){return Nn(this,e,t,1)},is.subtract=function(e,t){return Nn(this,e,t,-1)},is.as=function(e){if(!this.isValid())return NaN;var t,n,s=this._milliseconds;if("month"===(e=L(e))||"quarter"===e||"year"===e)switch(t=this._days+s/864e5,n=this._months+Pn(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(Rn(this._months)),e){case"week":return t/7+s/6048e5;case"day":return t+s/864e5;case"hour":return 24*t+s/36e5;case"minute":return 1440*t+s/6e4;case"second":return 86400*t+s/1e3;case"millisecond":return Math.floor(864e5*t)+s;default:throw new Error("Unknown unit "+e)}},is.asMilliseconds=Un,is.asSeconds=Hn,is.asMinutes=Fn,is.asHours=Ln,is.asDays=Vn,is.asWeeks=Gn,is.asMonths=En,is.asQuarters=An,is.asYears=jn,is.valueOf=In,is._bubble=function(){var e,t,n,s,i,r=this._milliseconds,a=this._days,o=this._months,u=this._data;return r>=0&&a>=0&&o>=0||r<=0&&a<=0&&o<=0||(r+=864e5*Wn(Rn(o)+a),a=0,o=0),u.milliseconds=r%1e3,e=le(r/1e3),u.seconds=e%60,t=le(e/60),u.minutes=t%60,n=le(t/60),u.hours=n%24,a+=le(n/24),o+=i=le(Pn(a)),a-=Wn(Rn(i)),s=le(o/12),o%=12,u.days=a,u.months=o,u.years=s,this},is.clone=function(){return zt(this)},is.get=function(e){return e=L(e),this.isValid()?this[e+"s"]():NaN},is.milliseconds=zn,is.seconds=qn,is.minutes=$n,is.hours=Bn,is.days=Jn,is.weeks=function(){return le(this.days()/7)},is.months=Qn,is.years=Xn,is.humanize=function(e,t){if(!this.isValid())return this.localeData().invalidDate();var n,s,i=!1,r=es;return"object"==typeof e&&(t=e,e=!1),"boolean"==typeof e&&(i=e),"object"==typeof t&&(r=Object.assign({},es,t),null!=t.s&&null==t.ss&&(r.ss=t.s-1)),s=function(e,t,n,s){var i=zt(e).abs(),r=Kn(i.as("s")),a=Kn(i.as("m")),o=Kn(i.as("h")),u=Kn(i.as("d")),l=Kn(i.as("M")),d=Kn(i.as("w")),h=Kn(i.as("y")),c=r<=n.ss&&["s",r]||r<n.s&&["ss",r]||a<=1&&["m"]||a<n.m&&["mm",a]||o<=1&&["h"]||o<n.h&&["hh",o]||u<=1&&["d"]||u<n.d&&["dd",u];return null!=n.w&&(c=c||d<=1&&["w"]||d<n.w&&["ww",d]),(c=c||l<=1&&["M"]||l<n.M&&["MM",l]||h<=1&&["y"]||["yy",h])[2]=t,c[3]=+e>0,c[4]=s,function(e,t,n,s,i){return i.relativeTime(t||1,!!n,e,s)}.apply(null,c)}(this,!i,r,n=this.localeData()),i&&(s=n.pastFuture(+this,s)),n.postformat(s)},is.toISOString=ss,is.toString=ss,is.toJSON=ss,is.locale=nn,is.localeData=rn,is.toIsoString=M("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",ss),is.lang=sn,C("X",0,0,"unix"),C("x",0,0,"valueOf"),ae("x",ee),ae("X",/[+-]?\d+(\.\d{1,3})?/),ce("X",function(e,t,n){n._d=new Date(1e3*parseFloat(e))}),ce("x",function(e,t,n){n._d=new Date(de(e))}),n.version="2.30.1",e=Nt,n.fn=Dn,n.min=function(){return Rt("isBefore",[].slice.call(arguments,0))},n.max=function(){return Rt("isAfter",[].slice.call(arguments,0))},n.now=function(){return Date.now?Date.now():+new Date},n.utc=c,n.unix=function(e){return Nt(1e3*e)},n.months=function(e,t){return bn(e,t,"months")},n.isDate=l,n.locale=dt,n.invalid=_,n.duration=zt,n.isMoment=v,n.weekdays=function(e,t,n){return Tn(e,t,n,"weekdays")},n.parseZone=function(){return Nt.apply(null,arguments).parseZone()},n.localeData=ct,n.isDuration=Ht,n.monthsShort=function(e,t){return bn(e,t,"monthsShort")},n.weekdaysMin=function(e,t,n){return Tn(e,t,n,"weekdaysMin")},n.defineLocale=ht,n.updateLocale=function(e,t){if(null!=t){var n,s,i=it;null!=rt[e]&&null!=rt[e].parentLocale?rt[e].set(b(rt[e]._config,t)):(null!=(s=lt(e))&&(i=s._config),t=b(i,t),null==s&&(t.abbr=e),(n=new T(t)).parentLocale=rt[e],rt[e]=n),dt(e)}else null!=rt[e]&&(null!=rt[e].parentLocale?(rt[e]=rt[e].parentLocale,e===dt()&&dt(e)):null!=rt[e]&&delete rt[e]);return rt[e]},n.locales=function(){return D(rt)},n.weekdaysShort=function(e,t,n){return Tn(e,t,n,"weekdaysShort")},n.normalizeUnits=L,n.relativeTimeRounding=function(e){return void 0===e?Kn:"function"==typeof e&&(Kn=e,!0)},n.relativeTimeThreshold=function(e,t){return void 0!==es[e]&&(void 0===t?es[e]:(es[e]=t,"s"===e&&(es.ss=t-1),!0))},n.calendarFormat=function(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},n.prototype=Dn,n.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},n});
32},{}],"IvHv":[function(require,module,exports) {
33var define;
34var global = arguments[3];
35var t,e=arguments[3];!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n(function(){try{return require("moment")}catch(t){}}()):"function"==typeof t&&t.amd?t(["require"],function(t){return n(function(){try{return t("moment")}catch(e){}}())}):(e=e||self).Chart=n(e.moment)}(this,function(t){"use strict";t=t&&t.hasOwnProperty("default")?t.default:t;var e,n={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],dar
vendor: 4,653 bytes, line 35
35korange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},i=(function(t){var e={};for(var i in n)n.hasOwnProperty(i)&&(e[n[i]]=i);var a=t.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(var r in a)if(a.hasOwnProperty(r)){if(!("channels"in a[r]))throw new Error("missing channels property: "+r);if(!("labels"in a[r]))throw new Error("missing channel labels property: "+r);if(a[r].labels.length!==a[r].channels)throw new Error("channel and label counts mismatch: "+r);var o=a[r].channels,s=a[r].labels;delete a[r].channels,delete a[r].labels,Object.defineProperty(a[r],"channels",{value:o}),Object.defineProperty(a[r],"labels",{value:s})}a.rgb.hsl=function(t){var e,n,i=t[0]/255,a=t[1]/255,r=t[2]/255,o=Math.min(i,a,r),s=Math.max(i,a,r),l=s-o;return s===o?e=0:i===s?e=(a-r)/l:a===s?e=2+(r-i)/l:r===s&&(e=4+(i-a)/l),(e=Math.min(60*e,360))<0&&(e+=360),n=(o+s)/2,[e,100*(s===o?0:n<=.5?l/(s+o):l/(2-s-o)),100*n]},a.rgb.hsv=function(t){var e,n,i,a,r,o=t[0]/255,s=t[1]/255,l=t[2]/255,u=Math.max(o,s,l),d=u-Math.min(o,s,l),h=function(t){return(u-t)/6/d+.5};return 0===d?a=r=0:(r=d/u,e=h(o),n=h(s),i=h(l),o===u?a=i-n:s===u?a=1/3+e-i:l===u&&(a=2/3+n-e),a<0?a+=1:a>1&&(a-=1)),[360*a,100*r,100*u]},a.rgb.hwb=function(t){var e=t[0],n=t[1],i=t[2];return[a.rgb.hsl(t)[0],100*(1/255*Math.min(e,Math.min(n,i))),100*(i=1-1/255*Math.max(e,Math.max(n,i)))]},a.rgb.cmyk=function(t){var e,n=t[0]/255,i=t[1]/255,a=t[2]/255;return[100*((1-n-(e=Math.min(1-n,1-i,1-a)))/(1-e)||0),100*((1-i-e)/(1-e)||0),100*((1-a-e)/(1-e)||0),100*e]}
vendor: 21,275 bytes, line 35
35,a.rgb.keyword=function(t){var i=e[t];if(i)return i;var a,r,o,s=1/0;for(var l in n)if(n.hasOwnProperty(l)){var u=n[l],d=(r=t,o=u,Math.pow(r[0]-o[0],2)+Math.pow(r[1]-o[1],2)+Math.pow(r[2]-o[2],2));d<s&&(s=d,a=l)}return a},a.keyword.rgb=function(t){return n[t]},a.rgb.xyz=function(t){var e=t[0]/255,n=t[1]/255,i=t[2]/255;return[100*(.4124*(e=e>.04045?Math.pow((e+.055)/1.055,2.4):e/12.92)+.3576*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)+.1805*(i=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92)),100*(.2126*e+.7152*n+.0722*i),100*(.0193*e+.1192*n+.9505*i)]},a.rgb.lab=function(t){var e=a.rgb.xyz(t),n=e[0],i=e[1],r=e[2];return i/=100,r/=108.883,n=(n/=95.047)>.008856?Math.pow(n,1/3):7.787*n+16/116,[116*(i=i>.008856?Math.pow(i,1/3):7.787*i+16/116)-16,500*(n-i),200*(i-(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116))]},a.hsl.rgb=function(t){var e,n,i,a,r,o=t[0]/360,s=t[1]/100,l=t[2]/100;if(0===s)return[r=255*l,r,r];e=2*l-(n=l<.5?l*(1+s):l+s-l*s),a=[0,0,0];for(var u=0;u<3;u++)(i=o+1/3*-(u-1))<0&&i++,i>1&&i--,r=6*i<1?e+6*(n-e)*i:2*i<1?n:3*i<2?e+(n-e)*(2/3-i)*6:e,a[u]=255*r;return a},a.hsl.hsv=function(t){var e=t[0],n=t[1]/100,i=t[2]/100,a=n,r=Math.max(i,.01);return n*=(i*=2)<=1?i:2-i,a*=r<=1?r:2-r,[e,100*(0===i?2*a/(r+a):2*n/(i+n)),100*((i+n)/2)]},a.hsv.rgb=function(t){var e=t[0]/60,n=t[1]/100,i=t[2]/100,a=Math.floor(e)%6,r=e-Math.floor(e),o=255*i*(1-n),s=255*i*(1-n*r),l=255*i*(1-n*(1-r));switch(i*=255,a){case 0:return[i,l,o];case 1:return[s,i,o];case 2:return[o,i,l];case 3:return[o,s,i];case 4:return[l,o,i];case 5:return[i,o,s]}},a.hsv.hsl=function(t){var e,n,i,a=t[0],r=t[1]/100,o=t[2]/100,s=Math.max(o,.01);return i=(2-r)*o,n=r*s,[a,100*(n=(n/=(e=(2-r)*s)<=1?e:2-e)||0),100*(i/=2)]},a.hwb.rgb=function(t){var e,n,i,a,r,o,s,l=t[0]/360,u=t[1]/100,d=t[2]/100,h=u+d;switch(h>1&&(u/=h,d/=h),i=6*l-(e=Math.floor(6*l)),0!=(1&e)&&(i=1-i),a=u+i*((n=1-d)-u),e){default:case 6:case 0:r=n,o=a,s=u;break;case 1:r=a,o=n,s=u;break;case 2:r=u,o=n,s=a;break;case 3:r=u,o=a,s=n;break;case 4:r=a,o=u,s=n;break;case 5:r=n,o=u,s=a}return[255*r,255*o,255*s]},a.cmyk.rgb=function(t){var e=t[0]/100,n=t[1]/100,i=t[2]/100,a=t[3]/100;return[255*(1-Math.min(1,e*(1-a)+a)),255*(1-Math.min(1,n*(1-a)+a)),255*(1-Math.min(1,i*(1-a)+a))]},a.xyz.rgb=function(t){var e,n,i,a=t[0]/100,r=t[1]/100,o=t[2]/100;return n=-.9689*a+1.8758*r+.0415*o,i=.0557*a+-.204*r+1.057*o,e=(e=3.2406*a+-1.5372*r+-.4986*o)>.0031308?1.055*Math.pow(e,1/2.4)-.055:12.92*e,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:12.92*n,i=i>.0031308?1.055*Math.pow(i,1/2.4)-.055:12.92*i,[255*(e=Math.min(Math.max(0,e),1)),255*(n=Math.min(Math.max(0,n),1)),255*(i=Math.min(Math.max(0,i),1))]},a.xyz.lab=function(t){var e=t[0],n=t[1],i=t[2];return n/=100,i/=108.883,e=(e/=95.047)>.008856?Math.pow(e,1/3):7.787*e+16/116,[116*(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116)-16,500*(e-n),200*(n-(i=i>.008856?Math.pow(i,1/3):7.787*i+16/116))]},a.lab.xyz=function(t){var e,n,i,a=t[0];e=t[1]/500+(n=(a+16)/116),i=n-t[2]/200;var r=Math.pow(n,3),o=Math.pow(e,3),s=Math.pow(i,3);return n=r>.008856?r:(n-16/116)/7.787,e=o>.008856?o:(e-16/116)/7.787,i=s>.008856?s:(i-16/116)/7.787,[e*=95.047,n*=100,i*=108.883]},a.lab.lch=function(t){var e,n=t[0],i=t[1],a=t[2];return(e=360*Math.atan2(a,i)/2/Math.PI)<0&&(e+=360),[n,Math.sqrt(i*i+a*a),e]},a.lch.lab=function(t){var e,n=t[0],i=t[1];return e=t[2]/360*2*Math.PI,[n,i*Math.cos(e),i*Math.sin(e)]},a.rgb.ansi16=function(t){var e=t[0],n=t[1],i=t[2],r=1 in arguments?arguments[1]:a.rgb.hsv(t)[2];if(0===(r=Math.round(r/50)))return 30;var o=30+(Math.round(i/255)<<2|Math.round(n/255)<<1|Math.round(e/255));return 2===r&&(o+=60),o},a.hsv.ansi16=function(t){return a.rgb.ansi16(a.hsv.rgb(t),t[2])},a.rgb.ansi256=function(t){var e=t[0],n=t[1],i=t[2];return e===n&&n===i?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(n/255*5)+Math.round(i/255*5)},a.ansi16.rgb=function(t){var e=t%10;if(0===e||7===e)return t>50&&(e+=3.5),[e=e/10.5*255,e,e];var n=.5*(1+~~(t>50));return[(1&e)*n*255,(e>>1&1)*n*255,(e>>2&1)*n*255]},a.ansi256.rgb=function(t){if(t>=232){var e=10*(t-232)+8;return[e,e,e]}var n;return t-=16,[Math.floor(t/36)/5*255,Math.floor((n=t%36)/6)/5*255,n%6/5*255]},a.rgb.hex=function(t){var e=(((255&Math.round(t[0]))<<16)+((255&Math.round(t[1]))<<8)+(255&Math.round(t[2]))).toString(16).toUpperCase();return"000000".substring(e.length)+e},a.hex.rgb=function(t){var e=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];var n=e[0];3===e[0].length&&(n=n.split("").map(function(t){return t+t}).join(""));var i=parseInt(n,16);return[i>>16&255,i>>8&255,255&i]},a.rgb.hcg=function(t){var e,n=t[0]/255,i=t[1]/255,a=t[2]/255,r=Math.max(Math.max(n,i),a),o=Math.min(Math.min(n,i),a),s=r-o;return e=s<=0?0:r===n?(i-a)/s%6:r===i?2+(a-n)/s:4+(n-i)/s+4,e/=6,[360*(e%=1),100*s,100*(s<1?o/(1-s):0)]},a.hsl.hcg=function(t){var e=t[1]/100,n=t[2]/100,i=1,a=0;return(i=n<.5?2*e*n:2*e*(1-n))<1&&(a=(n-.5*i)/(1-i)),[t[0],100*i,100*a]},a.hsv.hcg=function(t){var e=t[1]/100,n=t[2]/100,i=e*n,a=0;return i<1&&(a=(n-i)/(1-i)),[t[0],100*i,100*a]},a.hcg.rgb=function(t){var e=t[0]/360,n=t[1]/100,i=t[2]/100;if(0===n)return[255*i,255*i,255*i];var a,r=[0,0,0],o=e%1*6,s=o%1,l=1-s;switch(Math.floor(o)){case 0:r[0]=1,r[1]=s,r[2]=0;break;case 1:r[0]=l,r[1]=1,r[2]=0;break;case 2:r[0]=0,r[1]=1,r[2]=s;break;case 3:r[0]=0,r[1]=l,r[2]=1;break;case 4:r[0]=s,r[1]=0,r[2]=1;break;default:r[0]=1,r[1]=0,r[2]=l}return a=(1-n)*i,[255*(n*r[0]+a),255*(n*r[1]+a),255*(n*r[2]+a)]},a.hcg.hsv=function(t){var e=t[1]/100,n=e+t[2]/100*(1-e),i=0;return n>0&&(i=e/n),[t[0],100*i,100*n]},a.hcg.hsl=function(t){var e=t[1]/100,n=t[2]/100*(1-e)+.5*e,i=0;return n>0&&n<.5?i=e/(2*n):n>=.5&&n<1&&(i=e/(2*(1-n))),[t[0],100*i,100*n]},a.hcg.hwb=function(t){var e=t[1]/100,n=e+t[2]/100*(1-e);return[t[0],100*(n-e),100*(1-n)]},a.hwb.hcg=function(t){var e=t[1]/100,n=1-t[2]/100,i=n-e,a=0;return i<1&&(a=(n-i)/(1-i)),[t[0],100*i,100*a]},a.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]},a.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]},a.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]},a.gray.hsl=a.gray.hsv=function(t){return[0,0,t[0]]},a.gray.hwb=function(t){return[0,100,t[0]]},a.gray.cmyk=function(t){return[0,0,0,t[0]]},a.gray.lab=function(t){return[t[0],0,0]},a.gray.hex=function(t){var e=255&Math.round(t[0]/100*255),n=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return"000000".substring(n.length)+n},a.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]}}(e={exports:{}},e.exports),e.exports);i.rgb,i.hsl,i.hsv,i.hwb,i.cmyk,i.xyz,i.lab,i.lch,i.hex,i.keyword,i.ansi16,i.ansi256,i.hcg,i.apple,i.gray;function a(t){var e=function(){for(var t={},e=Object.keys(i),n=e.length,a=0;a<n;a++)t[e[a]]={distance:-1,parent:null};return t}(),n=[t];for(e[t].distance=0;n.length;)for(var a=n.pop(),r=Object.keys(i[a]),o=r.length,s=0;s<o;s++){var l=r[s],u=e[l];-1===u.distance&&(u.distance=e[a].distance+1,u.parent=a,n.unshift(l))}return e}function r(t,e){return function(n){return e(t(n))}}function o(t,e){for(var n=[e[t].parent,t],a=i[e[t].parent][t],o=e[t].parent;e[o].parent;)n.unshift(e[o].parent),a=r(i[e[o].parent][o],a),o=e[o].parent;return a.conversion=n,a}var s={};Object.keys(i).forEach(function(t){s[t]={},Object.defineProperty(s[t],"channels",{value:i[t].channels}),Object.defineProperty(s[t],"labels",{value:i[t].labels});var e=function(t){for(var e=a(t),n={},i=Object.keys(e),r=i.length,s=0;s<r;s++){var l=i[s];null!==e[l].parent&&(n[l]=o(l,e))}return n}(t);Object.keys(e).forEach(function(n){var i=e[n];s[t][n]=function(t){var e=function(e){if(null==e)return e;arguments.length>1&&(e=Array.prototype.slice.call(arguments));var n=t(e);if("object"==typeof n)for(var i=n.length,a=0;a<i;a++)n[a]=Math.round(n[a]);return n};return"conversion"in t&&(e.conversion=t.conversion),e}(i),s[t][n].raw=function(t){var e=function(e){return null==e?e:(arguments.length>1&&(e=Array.prototype.slice.call(arguments)),t(e))};return"conversion"in t&&(e.conversion=t.conversion),e}(i)})});var l=s,u={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},d={getRgba:h,getHsla:c,getRgb:function(t){var e=h(t);return e&&e.slice(0,3)},getHsl:function(t){var e=c(t);return e&&e.slice(0,3)},getHwb:f,getAlpha:function(t){var e=h(t);if(e)return e[3];if(e=c(t))return e[3];if(e=f(t))return e[3]},hexString:function(t,e){var e=void 0!==e&&3===t.length?e:t[3];return"#"+b(t[0])+b(t[1])+b(t[2])+(e>=0&&e<1?b(Math.round(255*e)):"")},rgbString:function(t,e){if(e<1||t[3]&&t[3]<1)return g(t,e);return"rgb("+t[0]+", "+t[1]+", "+t[2]+")"},rgbaString:g,percentString:function(t,e){if(e<1||t[3]&&t[3]<1)return p(t,e);var n=Math.round(t[0]/255*100),i=Math.round(t[1]/255*100),a=Math.round(t[2]/255*100);return"rgb("+n+"%, "+i+"%, "+a+"%)"},percentaString:p,hslString:function(t,e){if(e<1||t[3]&&t[3]<1)return m(t,e);return"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)"},hslaString:m,hwbString:function(t,e){void 0===e&&(e=void 0!==t[3]?t[3]:1);return"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+(void 0!==e&&1!==e?", "+e:"")+")"},keyword:function(t){return x[t.slice(0,3)]}};function h(t){if(t){var e=[0,0,0],n=1,i=t.match(/^#([a-fA-F0-9]{3,4})$/i),a="";if(i){a=(i=i[1])[3];for(var r=0;r<e.length;r++)e[r]=parseInt(i[r]+i[r],16);a&&(n=Math.round(parseInt(a+a,16)/255*100)/100)}else if(i=t.match(/^#([a-fA-F0-9]{6}([a-fA-F0-9]{2})?)$/i)){a=i[2],i=i[1];for(r=0;r<e.length;r++)e[r]=parseInt(i.slice(2*r,2*r+2),16);a&&(n=Math.round(parseInt(a,16)/255*100)/100)}else if(i=t.match(/^rgba?\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i)){for(r=0;r<e.length;r++)e[r]=parseInt(i[r+1]);n=parseFloat(i[4])}else if(i=t.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i)){for(r=0;r<e.length;r++)e[r]=Math.round(2.55*parseFloat(i[r+1]));n=parseFloat(i[4])}else if(i=t.match(/(\w+)/)){if("transparent"==i[1])return[0,0,0,0];if(!(e=u[i[1]]))return}for(r=0;r<e.length;r++)e[r]=v(e[r],0,255);return n=n||0==n?v(n,0,1):1,e[3]=n,e}}function c(t){if(t){var e=t.match(/^hsla?\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/);if(e){var n=parseFloat(e[4]);return[v(parseInt(e[1]),0,360),v(parseFloat(e[2]),0,100),v(parseFloat(e[3]),0,100),v(isNaN(n)?1:n,0,1)]}}}function f(t){if(t){var e=t.match(/^hwb\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/);if(e){var n=parseFloat(e[4]);return[v(parseInt(e[1]),0,360),v(parseFloat(e[2]),0,100),v(parseFloat(e[3]),0,100),v(isNaN(n)?1:n,0,1)]}}}function g(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"rgba("+t[0]+", "+t[1]+", "+t[2]+", "+e+")"}function p(t,e){return"rgba("+Math.round(t[0]/255*100)+"%, "+Math.round(t[1]/255*100)+"%, "+Math.round(t[2]/255*100)+"%, "+(e||t[3]||1)+")"}function m(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+e+")"}function v(t,e,n){return Math.min(Math.max(e,t),n)}function b(t){var e=t.toString(16).toUpperCase();return e.length<2?"0"+e:e}var x={};for(var y in u)x[u[y]]=y;var _=function(t){return t instanceof _?t:this instanceof _?(this.valid=!1,this.values={rgb:[0,0,0],hsl:[0,0,0],hsv:[0,0,0],hwb:[0,0,0],cmyk:[0,0,0,0],alpha:1},void("string"==typeof t?(e=d.getRgba(t))?this.setValues("rgb",e):(e=d.getHsla(t))?this.setValues("hsl",e):(e=d.getHwb(t))&&this.setValues("hwb",e):"object"==typeof t&&(void 0!==(e=t).r||void 0!==e.red?this.setValues("rgb",e):void 0!==e.l||void 0!==e.lightness?this.setValues("hsl",e):void 0!==e.v||void 0!==e.value?this.setValues("hsv",e):void 0!==e.w||void 0!==e.whiteness?this.setValues("hwb",e):void 0===e.c&&void 0===e.cyan||this.setValues("cmyk",e)))):new _(t);var e};_.prototype={isValid:function(){return this.valid},rgb:function(){return this.setSpace("rgb",arguments)},hsl:function(){return this.setSpace("hsl",arguments)},hsv:function(){return this.setSpace("hsv",arguments)},hwb:function(){return this.setSpace("hwb",arguments)},cmyk:function(){return this.setSpace("cmyk",arguments)},rgbArray:function(){return this.values.rgb},hslArray:function(){return this.values.hsl},hsvArray:function(){return this.values.hsv},hwbArray:function(){var t=this.values;return 1!==t.alpha?t.hwb.concat([t.alpha]):t.hwb},cmykArray:function(){return this.values.cmyk},rgbaArray:function(){var t=this.values;return t.rgb.concat([t.alpha])},hslaArray:function(){var t=this.values;return t.hsl.concat([t.alpha])},alpha:function(t){return void 0===t?this.values.alpha:(this.setValues("alpha",t),this)},red:function(t){return this.setChannel("rgb",0,t)},green:function(t){return this.setChannel("rgb",1,t)},blue:function(t){return this.setChannel("rgb",2,t)},hue:function(t){return t&&(t=(t%=360)<0?360+t:t),this.setChannel("hsl",0,t)},saturation:function(t){return this.setChannel("hsl",1,t)},lightness:function(t){return this.setChannel("hsl",2,t)},saturationv:function(t){return this.setChannel("hsv",1,t)},whiteness:function(t){return this.setChannel("hwb",1,t)},blackness:function(t){return this.setChannel("hwb",2,t)},value:function(t){return this.setChannel("hsv",2,t)},cyan:function(t){return this.setChannel("cmyk",0,t)},magenta:function(t){return this.setChannel("cmyk",1,t)},yellow:function(t){return this.setChannel("cmyk",2,t)},black:function(t){return this.setChannel("cmyk",3,t)},hexString:function(){return d.hexString(this.values.rgb)},rgbString:function(){return d.rgbString(this.values.rgb,this.values.alpha)},rgbaString:function(){return d.rgbaString(this.values.rgb,this.values.alpha)},percentString:function(){return d.percentString(this.values.rgb,this.values.alpha)},hslString:function(){return d.hslString(this.values.hsl,this.values.alpha)},hslaString:function(){return d.hslaString(this.values.hsl,this.values.alpha)},hwbString:function(){return d.hwbString(this.values.hwb,this.values.alpha)},keyword:function(){return d.keyword(this.values.rgb,this.values.alpha)},rgbNumber:function(){var t=this.values.rgb;return t[0]<<16|t[1]<<8|t[2]},luminosity:function(){for(var t=this.values.rgb,e=[],n=0;n<t.length;n++){var i=t[n]/255;e[n]=i<=.03928?i/12.92:Math.pow((i+.055)/1.055,2.4)}return.2126*e[0]+.7152*e[1]+.0722*e[2]},contrast:function(t){var e=this.luminosity(),n=t.luminosity();return e>n?(e+.05)/(n+.05):(n+.05)/(e+.05)},level:function(t){var e=this.contrast(t);return e>=7.1?"AAA":e>=4.5?"AA":""},dark:function(){var t=this.values.rgb;return(299*t[0]+587*t[1]+114*t[2])/1e3<128},light:function(){return!this.dark()},negate:function(){for(var t=[],e=0;e<3;e++)t[e]=255-this.values.rgb[e];return this.setValues("rgb",t),this},lighten:function(t){var e=this.values.hsl;return e[2]+=e[2]*t,this.setValues("hsl",e),this},darken:function(t){var e=this.values.hsl;return e[2]-=e[2]*t,this.setValues("hsl",e),this},saturate:function(t){var e=this.values.hsl;return e[1]+=e[1]*t,this.setValues("hsl",e),this},desaturate:function(t){var e=this.values.hsl;return e[1]-=e[1]*t,this.setValues("hsl",e),this},whiten:function(t){var e=this.values.hwb;return e[1]+=e[1]*t,this.setValues("hwb",e),this},blacken:function(t){var e=this.values.hwb;return e[2]+=e[2]*t,this.setValues("hwb",e),this},greyscale:function(){var t=this.values.rgb,e=.3*t[0]+.59*t[1]+.11*t[2];return this.setValues("rgb",[e,e,e]),this},clearer:function(t){var e=this.values.alpha;return this.setValues("alpha",e-e*t),this},opaquer:function(t){var e=this.values.alpha;return this.setValues("alpha",e+e*t),this},rotate:function(t){var e=this.values.hsl,n=(e[0]+t)%360;return e[0]=n<0?360+n:n,this.setValues("hsl",e),this},mix:function(t,e){var n=t,i=void 0===e?.5:e,a=2*i-1,r=this.alpha()-n.alpha(),o=((a*r==-1?a:(a+r)/(1+a*r))+1)/2,s=1-o;return this.rgb(o*this.red()+s*n.red(),o*this.green()+s*n.green(),o*this.blue()+s*n.blue()).alpha(this.alpha()*i+n.alpha()*(1-i))},toJSON:function(){return this.rgb()},clone:function(){var t,e,n=new _,i=this.values,a=n.values;for(var r in i)i.hasOwnProperty(r)&&(t=i[r],"[object Array]"===(e={}.toString.call(t))?a[r]=t.slice(0):"[object Number]"===e?a[r]=t:console.error("unexpected color value:",t));return n}},_.prototype.spaces={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]},_.prototype.maxes={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]},_.prototype.getValues=function(t){for(var e=this.values,n={},i=0;i<t.length;i++)n[t.charAt(i)]=e[t][i];return 1!==e.alpha&&(n.a=e.alpha),n},_.prototype.setValues=function(t,e){var n,i,a=this.values,r=this.spaces,o=this.maxes,s=1;if(this.valid=!0,"alpha"===t)s=e;else if(e.length)a[t]=e.slice(0,t.length),s=e[t.length];else if(void 0!==e[t.charAt(0)]){for(n=0;n<t.length;n++)a[t][n]=e[t.charAt(n)];s=e.a}else if(void 0!==e[r[t][0]]){var u=r[t];for(n=0;n<t.length;n++)a[t][n]=e[u[n]];s=e.alpha}if(a.alpha=Math.max(0,Math.min(1,void 0===s?a.alpha:s)),"alpha"===t)return!1;for(n=0;n<t.length;n++)i=Math.max(0,Math.min(o[t][n],a[t][n])),a[t][n]=Math.round(i);for(var d in r)d!==t&&(a[d]=l[t][d](a[t]));return!0},_.prototype.setSpace=function(t,e){var n=e[0];return void 0===n?this.getValues(t):("number"==typeof n&&(n=Array.prototype.slice.call(e)),this.setValues(t,n),this)},_.prototype.setChannel=function(t,e,n){var i=this.values[t];return void 0===n?i[e]:n===i[e]?this:(i[e]=n,this.setValues(t,i),this)},"undefined"!=typeof window&&(window.Color=_);var k=_;function w(t){return-1===["__proto__","prototype","constructor"].indexOf(t)}var M,S={noop:function(){},uid:(M=0,function(){return M++}),isNullOrUndef:function(t){return null==t},isArray:function(t){if(Array.isArray&&Array.isArray(t))return!0;var e=Object.prototype.toString.call(t);return"[object"===e.substr(0,7)&&"Array]"===e.substr(-6)},isObject:function(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)},isFinite:function(t){return("number"==typeof t||t instanceof Number)&&isFinite(t)}
vendor: 4,604 bytes, line 35
35,valueOrDefault:function(t,e){return void 0===t?e:t},valueAtIndexOrDefault:function(t,e,n){return S.valueOrDefault(S.isArray(t)?t[e]:t,n)},callback:function(t,e,n){if(t&&"function"==typeof t.call)return t.apply(n,e)},each:function(t,e,n,i){var a,r,o;if(S.isArray(t))if(r=t.length,i)for(a=r-1;a>=0;a--)e.call(n,t[a],a);else for(a=0;a<r;a++)e.call(n,t[a],a);else if(S.isObject(t))for(r=(o=Object.keys(t)).length,a=0;a<r;a++)e.call(n,t[o[a]],o[a])},arrayEquals:function(t,e){var n,i,a,r;if(!t||!e||t.length!==e.length)return!1;for(n=0,i=t.length;n<i;++n)if(a=t[n],r=e[n],a instanceof Array&&r instanceof Array){if(!S.arrayEquals(a,r))return!1}else if(a!==r)return!1;return!0},clone:function(t){if(S.isArray(t))return t.map(S.clone);if(S.isObject(t)){for(var e=Object.create(t),n=Object.keys(t),i=n.length,a=0;a<i;++a)e[n[a]]=S.clone(t[n[a]]);return e}return t},_merger:function(t,e,n,i){if(w(t)){var a=e[t],r=n[t];S.isObject(a)&&S.isObject(r)?S.merge(a,r,i):e[t]=S.clone(r)}},_mergerIf:function(t,e,n){if(w(t)){var i=e[t],a=n[t];S.isObject(i)&&S.isObject(a)?S.mergeIf(i,a):e.hasOwnProperty(t)||(e[t]=S.clone(a))}},merge:function(t,e,n){var i,a,r,o,s,l=S.isArray(e)?e:[e],u=l.length;if(!S.isObject(t))return t;for(i=(n=n||{}).merger||S._merger,a=0;a<u;++a)if(e=l[a],S.isObject(e))for(s=0,o=(r=Object.keys(e)).length;s<o;++s)i(r[s],t,e,n);return t},mergeIf:function(t,e){return S.merge(t,e,{merger:S._mergerIf})},extend:Object.assign||function(t){return S.merge(t,[].slice.call(arguments,1),{merger:function(t,e,n){e[t]=n[t]}})},inherits:function(t){var e=this,n=t&&t.hasOwnProperty("constructor")?t.constructor:function(){return e.apply(this,arguments)},i=function(){this.constructor=n};return i.prototype=e.prototype,n.prototype=new i,n.extend=S.inherits,t&&S.extend(n.prototype,t),n.__super__=e.prototype,n},_deprecated:function(t,e,n,i){void 0!==e&&console.warn(t+': "'+n+'" is deprecated. Please use "'+i+'" instead')}},C=S;S.callCallback=S.callback,S.indexOf=function(t,e,n){return Array.prototype.indexOf.call(t,e,n)},S.getValueOrDefault=S.valueOrDefault,S.getValueAtIndexOrDefault=S.valueAtIndexOrDefault;var P={linear:function(t){return t},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return-t*(t-2)},easeInOutQuad:function(t){return(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1)},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return(t-=1)*t*t+1},easeInOutCubic:function(t){return(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},easeInQuart:function(t){return t*t*t*t},easeOutQuart:function(t){return-((t-=1)*t*t*t-1)},easeInOutQuart:function(t){return(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},easeInQuint:function(t){return t*t*t*t*t},easeOutQuint:function(t){return(t-=1)*t*t*t*t+1},easeInOutQuint:function(t){return(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},easeInSine:function(t){return 1-Math.cos(t*(Math.PI/2))},easeOutSine:function(t){return Math.sin(t*(Math.PI/2))},easeInOutSine:function(t){return-.5*(Math.cos(Math.PI*t)-1)},easeInExpo:function(t){return 0===t?0:Math.pow(2,10*(t-1))},easeOutExpo:function(t){return 1===t?1:1-Math.pow(2,-10*t)},easeInOutExpo:function(t){return 0===t?0:1===t?1:(t/=.5)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*--t))},easeInCirc:function(t){return t>=1?t:-(Math.sqrt(1-t*t)-1)},easeOutCirc:function(t){return Math.sqrt(1-(t-=1)*t)},easeInOutCirc:function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},easeInElastic:function(t){var e=1.70158,n=0,i=1;return 0===t?0:1===t?1:(n||(n=.3),i<1?(i=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/i),-i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n))},easeOutElastic:function(t){var e=1.70158,n=0,i=1;return 0===t?0:1===t?1:(n||(n=.3),i<1?(i=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/i),i*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/n)+1)},easeInOutElastic:function(t){var e=1.70158,n=0,i=1;return 0===t?0:2==(t/=.5)?1:(n||(n=.45),i<1?(i=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/i),t<1?i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*-.5:i*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*.5+1)},easeInBack:function(t){var e=1.70158;return t*t*((e+1)*t-e)},easeOutBack:function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack:function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:function(t){return 1-P.easeOutBounce(1-t)},easeOutBounce:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},easeInOutBounce:function(t){return t<.5?.5*P.easeInBounce(2*t):.5*P.easeOutBounce(2*t-1)+.5}},A={effects:P};
vendor: 4,553 bytes, line 35
35C.easingEffects=P;var D=Math.PI,T=D/180,I=2*D,F=D/2,O=D/4,L=2*D/3,R={clear:function(t){t.ctx.clearRect(0,0,t.width,t.height)},roundedRect:function(t,e,n,i,a,r){if(r){var o=Math.min(r,a/2,i/2),s=e+o,l=n+o,u=e+i-o,d=n+a-o;t.moveTo(e,l),s<u&&l<d?(t.arc(s,l,o,-D,-F),t.arc(u,l,o,-F,0),t.arc(u,d,o,0,F),t.arc(s,d,o,F,D)):s<u?(t.moveTo(s,n),t.arc(u,l,o,-F,F),t.arc(s,l,o,F,D+F)):l<d?(t.arc(s,l,o,-D,0),t.arc(s,d,o,0,D)):t.arc(s,l,o,-D,D),t.closePath(),t.moveTo(e,n)}else t.rect(e,n,i,a)},drawPoint:function(t,e,n,i,a,r){var o,s,l,u,d,h=(r||0)*T;if(e&&"object"==typeof e&&("[object HTMLImageElement]"===(o=e.toString())||"[object HTMLCanvasElement]"===o))return t.save(),t.translate(i,a),t.rotate(h),t.drawImage(e,-e.width/2,-e.height/2,e.width,e.height),void t.restore();if(!(isNaN(n)||n<=0)){switch(t.beginPath(),e){default:t.arc(i,a,n,0,I),t.closePath();break;case"triangle":t.moveTo(i+Math.sin(h)*n,a-Math.cos(h)*n),h+=L,t.lineTo(i+Math.sin(h)*n,a-Math.cos(h)*n),h+=L,t.lineTo(i+Math.sin(h)*n,a-Math.cos(h)*n),t.closePath();break;case"rectRounded":u=n-(d=.516*n),s=Math.cos(h+O)*u,l=Math.sin(h+O)*u,t.arc(i-s,a-l,d,h-D,h-F),t.arc(i+l,a-s,d,h-F,h),t.arc(i+s,a+l,d,h,h+F),t.arc(i-l,a+s,d,h+F,h+D),t.closePath();break;case"rect":if(!r){u=Math.SQRT1_2*n,t.rect(i-u,a-u,2*u,2*u);break}h+=O;case"rectRot":s=Math.cos(h)*n,l=Math.sin(h)*n,t.moveTo(i-s,a-l),t.lineTo(i+l,a-s),t.lineTo(i+s,a+l),t.lineTo(i-l,a+s),t.closePath();break;case"crossRot":h+=O;case"cross":s=Math.cos(h)*n,l=Math.sin(h)*n,t.moveTo(i-s,a-l),t.lineTo(i+s,a+l),t.moveTo(i+l,a-s),t.lineTo(i-l,a+s);break;case"star":s=Math.cos(h)*n,l=Math.sin(h)*n,t.moveTo(i-s,a-l),t.lineTo(i+s,a+l),t.moveTo(i+l,a-s),t.lineTo(i-l,a+s),h+=O,s=Math.cos(h)*n,l=Math.sin(h)*n,t.moveTo(i-s,a-l),t.lineTo(i+s,a+l),t.moveTo(i+l,a-s),t.lineTo(i-l,a+s);break;case"line":s=Math.cos(h)*n,l=Math.sin(h)*n,t.moveTo(i-s,a-l),t.lineTo(i+s,a+l);break;case"dash":t.moveTo(i,a),t.lineTo(i+Math.cos(h)*n,a+Math.sin(h)*n)}t.fill(),t.stroke()}},_isPointInArea:function(t,e){return t.x>e.left-1e-6&&t.x<e.right+1e-6&&t.y>e.top-1e-6&&t.y<e.bottom+1e-6},clipArea:function(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()},unclipArea:function(t){t.restore()},lineTo:function(t,e,n,i){var a=n.steppedLine;if(a){if("middle"===a){var r=(e.x+n.x)/2;t.lineTo(r,i?n.y:e.y),t.lineTo(r,i?e.y:n.y)}else"after"===a&&!i||"after"!==a&&i?t.lineTo(e.x,n.y):t.lineTo(n.x,e.y);t.lineTo(n.x,n.y)}else n.tension?t.bezierCurveTo(i?e.controlPointPreviousX:e.controlPointNextX,i?e.controlPointPreviousY:e.controlPointNextY,i?n.controlPointNextX:n.controlPointPreviousX,i?n.controlPointNextY:n.controlPointPreviousY,n.x,n.y):t.lineTo(n.x,n.y)}},z=R;C.clear=R.clear,C.drawRoundedRectangle=function(t){t.beginPath(),R.roundedRect.apply(R,arguments)};var N={_set:function(t,e){return C.merge(this[t]||(this[t]={}),e)}};N._set("global",{defaultColor:"rgba(0,0,0,0.1)",defaultFontColor:"#666",defaultFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",defaultFontSize:12,defaultFontStyle:"normal",defaultLineHeight:1.2,showLines:!0});var B=N,E=C.valueOrDefault;var W={toLineHeight:function(t,e){var n=(""+t).match(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/);if(!n||"normal"===n[1])return 1.2*e;switch(t=+n[2],n[3]){case"px":return t;case"%":t/=100}return e*t},toPadding:function(t){var e,n,i,a;return C.isObject(t)?(e=+t.top||0,n=+t.right||0,i=+t.bottom||0,a=+t.left||0):e=n=i=a=+t||0,{top:e,right:n,bottom:i,left:a,height:e+i,width:a+n}},_parseFont:function(t){var e=B.global,n=E(t.fontSize,e.defaultFontSize),i={family:E(t.fontFamily,e.defaultFontFamily),lineHeight:C.options.toLineHeight(E(t.lineHeight,e.defaultLineHeight),n),size:n,style:E(t.fontStyle,e.defaultFontStyle),weight:null,string:""};return i.string=function(t){return!t||C.isNullOrUndef(t.size)||C.isNullOrUndef(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}(i),i},resolve:function(t,e,n,i){var a,r,o,s=!0;for(a=0,r=t.length;a<r;++a)if(void 0!==(o=t[a])&&(void 0!==e&&"function"==typeof o&&(o=o(e),s=!1),void 0!==n&&C.isArray(o)&&(o=o[n],s=!1),void 0!==o))return i&&!s&&(i.cacheable=!1),o}},V={_factorize:function(t){var e,n=[],i=Math.sqrt(t);for(e=1;e<i;e++)t%e==0&&(n.push(e),n.push(t/e));return i===(0|i)&&n.push(i),n.sort(function(t,e){return t-e}).pop(),n},log10:Math.log10||function(t){var e=Math.log(t)*Math.LOG10E,n=Math.round(e);return t===Math.pow(10,n)?n:e}},H=V;C.log10=V.log10;var j=C,q=A,U=z,Y=W,G=H,X={getRtlAdapter:function(t,e,n){return t?function(t,e){return{x:function(n){return t+t+e-n}
vendor: 4,446 bytes, line 35
35,setWidth:function(t){e=t},textAlign:function(t){return"center"===t?t:"right"===t?"left":"right"},xPlus:function(t,e){return t-e},leftForLtr:function(t,e){return t-e}}}(e,n):{x:function(t){return t},setWidth:function(t){},textAlign:function(t){return t},xPlus:function(t,e){return t+e},leftForLtr:function(t,e){return t}}},overrideTextDirection:function(t,e){var n,i;"ltr"!==e&&"rtl"!==e||(i=[(n=t.canvas.style).getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",e,"important"),t.prevTextDirection=i)},restoreTextDirection:function(t){var e=t.prevTextDirection;void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}};j.easing=q,j.canvas=U,j.options=Y,j.math=G,j.rtl=X;var K=function(t){j.extend(this,t),this.initialize.apply(this,arguments)};j.extend(K.prototype,{_type:void 0,initialize:function(){this.hidden=!1},pivot:function(){var t=this;return t._view||(t._view=j.extend({},t._model)),t._start={},t},transition:function(t){var e=this,n=e._model,i=e._start,a=e._view;return n&&1!==t?(a||(a=e._view={}),i||(i=e._start={}),function(t,e,n,i){var a,r,o,s,l,u,d,h,c,f=Object.keys(n);for(a=0,r=f.length;a<r;++a)if(u=n[o=f[a]],e.hasOwnProperty(o)||(e[o]=u),(s=e[o])!==u&&"_"!==o[0]){if(t.hasOwnProperty(o)||(t[o]=s),(d=typeof u)==typeof(l=t[o]))if("string"===d){if((h=k(l)).valid&&(c=k(u)).valid){e[o]=c.mix(h,i).rgbString();continue}}else if(j.isFinite(l)&&j.isFinite(u)){e[o]=l+(u-l)*i;continue}e[o]=u}}(i,a,n,t),e):(e._view=j.extend({},n),e._start=null,e)},tooltipPosition:function(){return{x:this._model.x,y:this._model.y}},hasValue:function(){return j.isNumber(this._model.x)&&j.isNumber(this._model.y)}}),K.extend=j.inherits;var Z=K,$=Z.extend({chart:null,currentStep:0,numSteps:60,easing:"",render:null,onAnimationProgress:null,onAnimationComplete:null}),J=$;Object.defineProperty($.prototype,"animationObject",{get:function(){return this}}),Object.defineProperty($.prototype,"chartInstance",{get:function(){return this.chart},set:function(t){this.chart=t}}),B._set("global",{animation:{duration:1e3,easing:"easeOutQuart",onProgress:j.noop,onComplete:j.noop}});var Q={animations:[],request:null,addAnimation:function(t,e,n,i){var a,r,o=this.animations;for(e.chart=t,e.startTime=Date.now(),e.duration=n,i||(t.animating=!0),a=0,r=o.length;a<r;++a)if(o[a].chart===t)return void(o[a]=e);o.push(e),1===o.length&&this.requestAnimationFrame()},cancelAnimation:function(t){var e=j.findIndex(this.animations,function(e){return e.chart===t});-1!==e&&(this.animations.splice(e,1),t.animating=!1)},requestAnimationFrame:function(){var t=this;null===t.request&&(t.request=j.requestAnimFrame.call(window,function(){t.request=null,t.startDigest()}))},startDigest:function(){this.advance(),this.animations.length>0&&this.requestAnimationFrame()},advance:function(){for(var t,e,n,i,a=this.animations,r=0;r<a.length;)e=(t=a[r]).chart,n=t.numSteps,i=Math.floor((Date.now()-t.startTime)/t.duration*n)+1,t.currentStep=Math.min(i,n),j.callback(t.render,[e,t],e),j.callback(t.onAnimationProgress,[t],e),t.currentStep>=n?(j.callback(t.onAnimationComplete,[t],e),e.animating=!1,a.splice(r,1)):++r}},tt=j.options.resolve,et=["push","pop","shift","splice","unshift"];function nt(t,e){var n=t._chartjs;if(n){var i=n.listeners,a=i.indexOf(e);-1!==a&&i.splice(a,1),i.length>0||(et.forEach(function(e){delete t[e]}),delete t._chartjs)}}var it=function(t,e){this.initialize(t,e)};j.extend(it.prototype,{datasetElementType:null,dataElementType:null,_datasetElementOptions:["backgroundColor","borderCapStyle","borderColor","borderDash","borderDashOffset","borderJoinStyle","borderWidth"],_dataElementOptions:["backgroundColor","borderColor","borderWidth","pointStyle"],initialize:function(t,e){var n=this;n.chart=t,n.index=e,n.linkScales(),n.addElements(),n._type=n.getMeta().type},updateIndex:function(t){this.index=t},linkScales:function(){var t=this.getMeta(),e=this.chart,n=e.scales,i=this.getDataset(),a=e.options.scales;null!==t.xAxisID&&t.xAxisID in n&&!i.xAxisID||(t.xAxisID=i.xAxisID||a.xAxes[0].id),null!==t.yAxisID&&t.yAxisID in n&&!i.yAxisID||(t.yAxisID=i.yAxisID||a.yAxes[0].id)},getDataset:function(){return this.chart.data.datasets[this.index]},getMeta:function(){return this.chart.getDatasetMeta(this.index)},getScaleForId:function(t){return this.chart.scales[t]},_getValueScaleId:function(){return this.getMeta().yAxisID},_getIndexScaleId:function(){return this.getMeta().xAxisID}
vendor: 25,392 bytes, line 35
35,_getValueScale:function(){return this.getScaleForId(this._getValueScaleId())},_getIndexScale:function(){return this.getScaleForId(this._getIndexScaleId())},reset:function(){this._update(!0)},destroy:function(){this._data&&nt(this._data,this)},createMetaDataset:function(){var t=this.datasetElementType;return t&&new t({_chart:this.chart,_datasetIndex:this.index})},createMetaData:function(t){var e=this.dataElementType;return e&&new e({_chart:this.chart,_datasetIndex:this.index,_index:t})},addElements:function(){var t,e,n=this.getMeta(),i=this.getDataset().data||[],a=n.data;for(t=0,e=i.length;t<e;++t)a[t]=a[t]||this.createMetaData(t);n.dataset=n.dataset||this.createMetaDataset()},addElementAndReset:function(t){var e=this.createMetaData(t);this.getMeta().data.splice(t,0,e),this.updateElement(e,t,!0)},buildOrUpdateElements:function(){var t,e,n=this,i=n.getDataset(),a=i.data||(i.data=[]);n._data!==a&&(n._data&&nt(n._data,n),a&&Object.isExtensible(a)&&(e=n,(t=a)._chartjs?t._chartjs.listeners.push(e):(Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),et.forEach(function(e){var n="onData"+e.charAt(0).toUpperCase()+e.slice(1),i=t[e];Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value:function(){var e=Array.prototype.slice.call(arguments),a=i.apply(this,e);return j.each(t._chartjs.listeners,function(t){"function"==typeof t[n]&&t[n].apply(t,e)}),a}})}))),n._data=a),n.resyncElements()},_configure:function(){this._config=j.merge(Object.create(null),[this.chart.options.datasets[this._type],this.getDataset()],{merger:function(t,e,n){"_meta"!==t&&"data"!==t&&j._merger(t,e,n)}})},_update:function(t){this._configure(),this._cachedDataOpts=null,this.update(t)},update:j.noop,transition:function(t){for(var e=this.getMeta(),n=e.data||[],i=n.length,a=0;a<i;++a)n[a].transition(t);e.dataset&&e.dataset.transition(t)},draw:function(){var t=this.getMeta(),e=t.data||[],n=e.length,i=0;for(t.dataset&&t.dataset.draw();i<n;++i)e[i].draw()},getStyle:function(t){var e,n=this.getMeta(),i=n.dataset;return this._configure(),i&&void 0===t?e=this._resolveDatasetElementOptions(i||{}):(t=t||0,e=this._resolveDataElementOptions(n.data[t]||{},t)),!1!==e.fill&&null!==e.fill||(e.backgroundColor=e.borderColor),e},_resolveDatasetElementOptions:function(t,e){var n,i,a,r,o=this,s=o.chart,l=o._config,u=t.custom||{},d=s.options.elements[o.datasetElementType.prototype._type]||{},h=o._datasetElementOptions,c={},f={chart:s,dataset:o.getDataset(),datasetIndex:o.index,hover:e};for(n=0,i=h.length;n<i;++n)a=h[n],r=e?"hover"+a.charAt(0).toUpperCase()+a.slice(1):a,c[a]=tt([u[r],l[r],d[r]],f);return c},_resolveDataElementOptions:function(t,e){var n=this,i=t&&t.custom,a=n._cachedDataOpts;if(a&&!i)return a;var r,o,s,l,u=n.chart,d=n._config,h=u.options.elements[n.dataElementType.prototype._type]||{},c=n._dataElementOptions,f={},g={chart:u,dataIndex:e,dataset:n.getDataset(),datasetIndex:n.index},p={cacheable:!i};if(i=i||{},j.isArray(c))for(o=0,s=c.length;o<s;++o)f[l=c[o]]=tt([i[l],d[l],h[l]],g,e,p);else for(o=0,s=(r=Object.keys(c)).length;o<s;++o)f[l=r[o]]=tt([i[l],d[c[l]],d[l],h[l]],g,e,p);return p.cacheable&&(n._cachedDataOpts=Object.freeze(f)),f},removeHoverStyle:function(t){j.merge(t._model,t.$previousStyle||{}),delete t.$previousStyle},setHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],n=t._index,i=t.custom||{},a=t._model,r=j.getHoverColor;t.$previousStyle={backgroundColor:a.backgroundColor,borderColor:a.borderColor,borderWidth:a.borderWidth},a.backgroundColor=tt([i.hoverBackgroundColor,e.hoverBackgroundColor,r(a.backgroundColor)],void 0,n),a.borderColor=tt([i.hoverBorderColor,e.hoverBorderColor,r(a.borderColor)],void 0,n),a.borderWidth=tt([i.hoverBorderWidth,e.hoverBorderWidth,a.borderWidth],void 0,n)},_removeDatasetHoverStyle:function(){var t=this.getMeta().dataset;t&&this.removeHoverStyle(t)},_setDatasetHoverStyle:function(){var t,e,n,i,a,r,o=this.getMeta().dataset,s={};if(o){for(r=o._model,a=this._resolveDatasetElementOptions(o,!0),t=0,e=(i=Object.keys(a)).length;t<e;++t)s[n=i[t]]=r[n],r[n]=a[n];o.$previousStyle=s}},resyncElements:function(){var t=this.getMeta(),e=this.getDataset().data,n=t.data.length,i=e.length;i<n?t.data.splice(i,n-i):i>n&&this.insertElements(n,i-n)},insertElements:function(t,e){for(var n=0;n<e;++n)this.addElementAndReset(t+n)},onDataPush:function(){var t=arguments.length;this.insertElements(this.getDataset().data.length-t,t)},onDataPop:function(){this.getMeta().data.pop()},onDataShift:function(){this.getMeta().data.shift()},onDataSplice:function(t,e){this.getMeta().data.splice(t,e),this.insertElements(t,arguments.length-2)},onDataUnshift:function(){this.insertElements(0,arguments.length)}}),it.extend=j.inherits;var at=it,rt=2*Math.PI;function ot(t,e){var n=e.startAngle,i=e.endAngle,a=e.pixelMargin,r=a/e.outerRadius,o=e.x,s=e.y;t.beginPath(),t.arc(o,s,e.outerRadius,n-r,i+r),e.innerRadius>a?(r=a/e.innerRadius,t.arc(o,s,e.innerRadius-a,i+r,n-r,!0)):t.arc(o,s,a,i+Math.PI/2,n-Math.PI/2),t.closePath(),t.clip()}function st(t,e,n){var i="inner"===e.borderAlign;i?(t.lineWidth=2*e.borderWidth,t.lineJoin="round"):(t.lineWidth=e.borderWidth,t.lineJoin="bevel"),n.fullCircles&&function(t,e,n,i){var a,r=n.endAngle;for(i&&(n.endAngle=n.startAngle+rt,ot(t,n),n.endAngle=r,n.endAngle===n.startAngle&&n.fullCircles&&(n.endAngle+=rt,n.fullCircles--)),t.beginPath(),t.arc(n.x,n.y,n.innerRadius,n.startAngle+rt,n.startAngle,!0),a=0;a<n.fullCircles;++a)t.stroke();for(t.beginPath(),t.arc(n.x,n.y,e.outerRadius,n.startAngle,n.startAngle+rt),a=0;a<n.fullCircles;++a)t.stroke()}(t,e,n,i),i&&ot(t,n),t.beginPath(),t.arc(n.x,n.y,e.outerRadius,n.startAngle,n.endAngle),t.arc(n.x,n.y,n.innerRadius,n.endAngle,n.startAngle,!0),t.closePath(),t.stroke()}B._set("global",{elements:{arc:{backgroundColor:B.global.defaultColor,borderColor:"#fff",borderWidth:2,borderAlign:"center"}}});var lt=Z.extend({_type:"arc",inLabelRange:function(t){var e=this._view;return!!e&&Math.pow(t-e.x,2)<Math.pow(e.radius+e.hoverRadius,2)},inRange:function(t,e){var n=this._view;if(n){for(var i=j.getAngleFromPoint(n,{x:t,y:e}),a=i.angle,r=i.distance,o=n.startAngle,s=n.endAngle;s<o;)s+=rt;for(;a>s;)a-=rt;for(;a<o;)a+=rt;var l=a>=o&&a<=s,u=r>=n.innerRadius&&r<=n.outerRadius;return l&&u}return!1},getCenterPoint:function(){var t=this._view,e=(t.startAngle+t.endAngle)/2,n=(t.innerRadius+t.outerRadius)/2;return{x:t.x+Math.cos(e)*n,y:t.y+Math.sin(e)*n}},getArea:function(){var t=this._view;return Math.PI*((t.endAngle-t.startAngle)/(2*Math.PI))*(Math.pow(t.outerRadius,2)-Math.pow(t.innerRadius,2))},tooltipPosition:function(){var t=this._view,e=t.startAngle+(t.endAngle-t.startAngle)/2,n=(t.outerRadius-t.innerRadius)/2+t.innerRadius;return{x:t.x+Math.cos(e)*n,y:t.y+Math.sin(e)*n}},draw:function(){var t,e=this._chart.ctx,n=this._view,i="inner"===n.borderAlign?.33:0,a={x:n.x,y:n.y,innerRadius:n.innerRadius,outerRadius:Math.max(n.outerRadius-i,0),pixelMargin:i,startAngle:n.startAngle,endAngle:n.endAngle,fullCircles:Math.floor(n.circumference/rt)};if(e.save(),e.fillStyle=n.backgroundColor,e.strokeStyle=n.borderColor,a.fullCircles){for(a.endAngle=a.startAngle+rt,e.beginPath(),e.arc(a.x,a.y,a.outerRadius,a.startAngle,a.endAngle),e.arc(a.x,a.y,a.innerRadius,a.endAngle,a.startAngle,!0),e.closePath(),t=0;t<a.fullCircles;++t)e.fill();a.endAngle=a.startAngle+n.circumference%rt}e.beginPath(),e.arc(a.x,a.y,a.outerRadius,a.startAngle,a.endAngle),e.arc(a.x,a.y,a.innerRadius,a.endAngle,a.startAngle,!0),e.closePath(),e.fill(),n.borderWidth&&st(e,n,a),e.restore()}}),ut=j.valueOrDefault,dt=B.global.defaultColor;B._set("global",{elements:{line:{tension:.4,backgroundColor:dt,borderWidth:3,borderColor:dt,borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",capBezierPoints:!0,fill:!0}}});var ht=Z.extend({_type:"line",draw:function(){var t,e,n,i=this,a=i._view,r=i._chart.ctx,o=a.spanGaps,s=i._children.slice(),l=B.global,u=l.elements.line,d=-1,h=i._loop;if(s.length){if(i._loop){for(t=0;t<s.length;++t)if(e=j.previousItem(s,t),!s[t]._view.skip&&e._view.skip){s=s.slice(t).concat(s.slice(0,t)),h=o;break}h&&s.push(s[0])}for(r.save(),r.lineCap=a.borderCapStyle||u.borderCapStyle,r.setLineDash&&r.setLineDash(a.borderDash||u.borderDash),r.lineDashOffset=ut(a.borderDashOffset,u.borderDashOffset),r.lineJoin=a.borderJoinStyle||u.borderJoinStyle,r.lineWidth=ut(a.borderWidth,u.borderWidth),r.strokeStyle=a.borderColor||l.defaultColor,r.beginPath(),(n=s[0]._view).skip||(r.moveTo(n.x,n.y),d=0),t=1;t<s.length;++t)n=s[t]._view,e=-1===d?j.previousItem(s,t):s[d],n.skip||(d!==t-1&&!o||-1===d?r.moveTo(n.x,n.y):j.canvas.lineTo(r,e._view,n),d=t);h&&r.closePath(),r.stroke(),r.restore()}}}),ct=j.valueOrDefault,ft=B.global.defaultColor;function gt(t){var e=this._view;return!!e&&Math.abs(t-e.x)<e.radius+e.hitRadius}B._set("global",{elements:{point:{radius:3,pointStyle:"circle",backgroundColor:ft,borderColor:ft,borderWidth:1,hitRadius:1,hoverRadius:4,hoverBorderWidth:1}}});var pt=Z.extend({_type:"point",inRange:function(t,e){var n=this._view;return!!n&&Math.pow(t-n.x,2)+Math.pow(e-n.y,2)<Math.pow(n.hitRadius+n.radius,2)},inLabelRange:gt,inXRange:gt,inYRange:function(t){var e=this._view;return!!e&&Math.abs(t-e.y)<e.radius+e.hitRadius},getCenterPoint:function(){var t=this._view;return{x:t.x,y:t.y}},getArea:function(){return Math.PI*Math.pow(this._view.radius,2)},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y,padding:t.radius+t.borderWidth}},draw:function(t){var e=this._view,n=this._chart.ctx,i=e.pointStyle,a=e.rotation,r=e.radius,o=e.x,s=e.y,l=B.global,u=l.defaultColor;e.skip||(void 0===t||j.canvas._isPointInArea(e,t))&&(n.strokeStyle=e.borderColor||u,n.lineWidth=ct(e.borderWidth,l.elements.point.borderWidth),n.fillStyle=e.backgroundColor||u,j.canvas.drawPoint(n,i,r,o,s,a))}}),mt=B.global.defaultColor;function vt(t){return t&&void 0!==t.width}function bt(t){var e,n,i,a,r;return vt(t)?(r=t.width/2,e=t.x-r,n=t.x+r,i=Math.min(t.y,t.base),a=Math.max(t.y,t.base)):(r=t.height/2,e=Math.min(t.x,t.base),n=Math.max(t.x,t.base),i=t.y-r,a=t.y+r),{left:e,top:i,right:n,bottom:a}}function xt(t,e,n){return t===e?n:t===n?e:t}function yt(t,e,n){var i,a,r,o,s=t.borderWidth,l=function(t){var e=t.borderSkipped,n={};return e?(t.horizontal?t.base>t.x&&(e=xt(e,"left","right")):t.base<t.y&&(e=xt(e,"bottom","top")),n[e]=!0,n):n}(t);return j.isObject(s)?(i=+s.top||0,a=+s.right||0,r=+s.bottom||0,o=+s.left||0):i=a=r=o=+s||0,{t:l.top||i<0?0:i>n?n:i,r:l.right||a<0?0:a>e?e:a,b:l.bottom||r<0?0:r>n?n:r,l:l.left||o<0?0:o>e?e:o}}function _t(t,e,n){var i=null===e,a=null===n,r=!(!t||i&&a)&&bt(t);return r&&(i||e>=r.left&&e<=r.right)&&(a||n>=r.top&&n<=r.bottom)}B._set("global",{elements:{rectangle:{backgroundColor:mt,borderColor:mt,borderSkipped:"bottom",borderWidth:0}}});var kt=Z.extend({_type:"rectangle",draw:function(){var t=this._chart.ctx,e=this._view,n=function(t){var e=bt(t),n=e.right-e.left,i=e.bottom-e.top,a=yt(t,n/2,i/2);return{outer:{x:e.left,y:e.top,w:n,h:i},inner:{x:e.left+a.l,y:e.top+a.t,w:n-a.l-a.r,h:i-a.t-a.b}}}(e),i=n.outer,a=n.inner;t.fillStyle=e.backgroundColor,t.fillRect(i.x,i.y,i.w,i.h),i.w===a.w&&i.h===a.h||(t.save(),t.beginPath(),t.rect(i.x,i.y,i.w,i.h),t.clip(),t.fillStyle=e.borderColor,t.rect(a.x,a.y,a.w,a.h),t.fill("evenodd"),t.restore())},height:function(){var t=this._view;return t.base-t.y},inRange:function(t,e){return _t(this._view,t,e)},inLabelRange:function(t,e){var n=this._view;return vt(n)?_t(n,t,null):_t(n,null,e)},inXRange:function(t){return _t(this._view,t,null)},inYRange:function(t){return _t(this._view,null,t)},getCenterPoint:function(){var t,e,n=this._view;return vt(n)?(t=n.x,e=(n.y+n.base)/2):(t=(n.x+n.base)/2,e=n.y),{x:t,y:e}},getArea:function(){var t=this._view;return vt(t)?t.width*Math.abs(t.y-t.base):t.height*Math.abs(t.x-t.base)},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y}}}),wt={},Mt=lt,St=ht,Ct=pt,Pt=kt;wt.Arc=Mt,wt.Line=St,wt.Point=Ct,wt.Rectangle=Pt;var At=j._deprecated,Dt=j.valueOrDefault;function Tt(t,e,n){var i,a,r=n.barThickness,o=e.stackCount,s=e.pixels[t],l=j.isNullOrUndef(r)?function(t,e){var n,i,a,r,o=t._length;for(a=1,r=e.length;a<r;++a)o=Math.min(o,Math.abs(e[a]-e[a-1]));for(a=0,r=t.getTicks().length;a<r;++a)i=t.getPixelForTick(a),o=a>0?Math.min(o,Math.abs(i-n)):o,n=i;return o}(e.scale,e.pixels):-1;return j.isNullOrUndef(r)?(i=l*n.categoryPercentage,a=n.barPercentage):(i=r*o,a=1),{chunk:i/o,ratio:a,start:s-i/2}}B._set("bar",{hover:{mode:"label"},scales:{xAxes:[{type:"category",offset:!0,gridLines:{offsetGridLines:!0}}],yAxes:[{type:"linear"}]}}),B._set("global",{datasets:{bar:{categoryPercentage:.8,barPercentage:.9}}});var It=at.extend({dataElementType:wt.Rectangle,_dataElementOptions:["backgroundColor","borderColor","borderSkipped","borderWidth","barPercentage","barThickness","categoryPercentage","maxBarThickness","minBarLength"],initialize:function(){var t,e,n=this;at.prototype.initialize.apply(n,arguments),(t=n.getMeta()).stack=n.getDataset().stack,t.bar=!0,e=n._getIndexScale().options,At("bar chart",e.barPercentage,"scales.[x/y]Axes.barPercentage","dataset.barPercentage"),At("bar chart",e.barThickness,"scales.[x/y]Axes.barThickness","dataset.barThickness"),At("bar chart",e.categoryPercentage,"scales.[x/y]Axes.categoryPercentage","dataset.categoryPercentage"),At("bar chart",n._getValueScale().options.minBarLength,"scales.[x/y]Axes.minBarLength","dataset.minBarLength"),At("bar chart",e.maxBarThickness,"scales.[x/y]Axes.maxBarThickness","dataset.maxBarThickness")},update:function(t){var e,n,i=this.getMeta().data;for(this._ruler=this.getRuler(),e=0,n=i.length;e<n;++e)this.updateElement(i[e],e,t)},updateElement:function(t,e,n){var i=this,a=i.getMeta(),r=i.getDataset(),o=i._resolveDataElementOptions(t,e);t._xScale=i.getScaleForId(a.xAxisID),t._yScale=i.getScaleForId(a.yAxisID),t._datasetIndex=i.index,t._index=e,t._model={backgroundColor:o.backgroundColor,borderColor:o.borderColor,borderSkipped:o.borderSkipped,borderWidth:o.borderWidth,datasetLabel:r.label,label:i.chart.data.labels[e]},j.isArray(r.data[e])&&(t._model.borderSkipped=null),i._updateElementGeometry(t,e,n,o),t.pivot()},_updateElementGeometry:function(t,e,n,i){var a=this,r=t._model,o=a._getValueScale(),s=o.getBasePixel(),l=o.isHorizontal(),u=a._ruler||a.getRuler(),d=a.calculateBarValuePixels(a.index,e,i),h=a.calculateBarIndexPixels(a.index,e,u,i);r.horizontal=l,r.base=n?s:d.base,r.x=l?n?s:d.head:h.center,r.y=l?h.center:n?s:d.head,r.height=l?h.size:void 0,r.width=l?void 0:h.size},_getStacks:function(t){var e,n,i=this._getIndexScale(),a=i._getMatchingVisibleMetas(this._type),r=i.options.stacked,o=a.length,s=[];for(e=0;e<o&&(n=a[e],(!1===r||-1===s.indexOf(n.stack)||void 0===r&&void 0===n.stack)&&s.push(n.stack),n.index!==t);++e);return s},getStackCount:function(){return this._getStacks().length},getStackIndex:function(t,e){var n=this._getStacks(t),i=void 0!==e?n.indexOf(e):-1;return-1===i?n.length-1:i},getRuler:function(){var t,e,n=this._getIndexScale(),i=[];for(t=0,e=this.getMeta().data.length;t<e;++t)i.push(n.getPixelForValue(null,t,this.index));return{pixels:i,start:n._startPixel,end:n._endPixel,stackCount:this.getStackCount(),scale:n}},calculateBarValuePixels:function(t,e,n){var i,a,r,o,s,l,u,d=this.chart,h=this._getValueScale(),c=h.isHorizontal(),f=d.data.datasets,g=h._getMatchingVisibleMetas(this._type),p=h._parseValue(f[t].data[e]),m=n.minBarLength,v=h.options.stacked,b=this.getMeta().stack,x=void 0===p.start?0:p.max>=0&&p.min>=0?p.min:p.max,y=void 0===p.start?p.end:p.max>=0&&p.min>=0?p.max-p.min:p.min-p.max,_=g.length;if(v||void 0===v&&void 0!==b)for(i=0;i<_&&(a=g[i]).index!==t;++i)a.stack===b&&(r=void 0===(u=h._parseValue(f[a.index].data[e])).start?u.end:u.min>=0&&u.max>=0?u.max:u.min,(p.min<0&&r<0||p.max>=0&&r>0)&&(x+=r));return o=h.getPixelForValue(x),l=(s=h.getPixelForValue(x+y))-o,void 0!==m&&Math.abs(l)<m&&(l=m,s=y>=0&&!c||y<0&&c?o-m:o+m),{size:l,base:o,head:s,center:s+l/2}},calculateBarIndexPixels:function(t,e,n,i){var a="flex"===i.barThickness?function(t,e,n){var i,a=e.pixels,r=a[t],o=t>0?a[t-1]:null,s=t<a.length-1?a[t+1]:null,l=n.categoryPercentage;return null===o&&(o=r-(null===s?e.end-e.start:s-r)),null===s&&(s=r+r-o),i=r-(r-Math.min(o,s))/2*l,{chunk:Math.abs(s-o)/2*l/e.stackCount,ratio:n.barPercentage,start:i}}(e,n,i):Tt(e,n,i),r=this.getStackIndex(t,this.getMeta().stack),o=a.start+a.chunk*r+a.chunk/2,s=Math.min(Dt(i.maxBarThickness,1/0),a.chunk*a.ratio);return{base:o-s/2,head:o+s/2,center:o,size:s}},draw:function(){var t=this.chart,e=this._getValueScale(),n=this.getMeta().data,i=this.getDataset(),a=n.length,r=0;for(j.canvas.clipArea(t.ctx,t.chartArea);r<a;++r){var o=e._parseValue(i.data[r]);isNaN(o.min)||isNaN(o.max)||n[r].draw()}j.canvas.unclipArea(t.ctx)},_resolveDataElementOptions:function(){var t=j.extend({},at.prototype._resolveDataElementOptions.apply(this,arguments)),e=this._getIndexScale().options,n=this._getValueScale().options;return t.barPercentage=Dt(e.barPercentage,t.barPercentage),t.barThickness=Dt(e.barThickness,t.barThickness),t.categoryPercentage=Dt(e.categoryPercentage,t.categoryPercentage),t.maxBarThickness=Dt(e.maxBarThickness,t.maxBarThickness),t.minBarLength=Dt(n.minBarLength,t.minBarLength),t}}),Ft=j.valueOrDefault,Ot=j.options.resolve;B._set("bubble",{hover:{mode:"single"},scales:{xAxes:[{type:"linear",position:"bottom",id:"x-axis-0"}],yAxes:[{type:"linear",position:"left",id:"y-axis-0"}]},tooltips:{callbacks:{title:function(){return""},label:function(t,e){var n=e.datasets[t.datasetIndex].label||"",i=e.datasets[t.datasetIndex].data[t.index];return n+": ("+t.xLabel+", "+t.yLabel+", "+i.r+")"}}}});var Lt=at.extend({dataElementType:wt.Point,_dataElementOptions:["backgroundColor","borderColor","borderWidth","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth","hoverRadius","hitRadius","pointStyle","rotation"],update:function(t){var e=this,n=e.getMeta().data;j.each(n,function(n,i){e.updateElement(n,i,t)})},updateElement:function(t,e,n){var i=this,a=i.getMeta(),r=t.custom||{},o=i.getScaleForId(a.xAxisID),s=i.getScaleForId(a.yAxisID),l=i._resolveDataElementOptions(t,e),u=i.getDataset().data[e],d=i.index,h=n?o.getPixelForDecimal(.5):o.getPixelForValue("object"==typeof u?u:NaN,e,d),c=n?s.getBasePixel():s.getPixelForValue(u,e,d);t._xScale=o,t._yScale=s,t._options=l,t._datasetIndex=d,t._index=e,t._model={backgroundColor:l.backgroundColor,borderColor:l.borderColor,borderWidth:l.borderWidth,hitRadius:l.hitRadius,pointStyle:l.pointStyle,rotation:l.rotation,radius:n?0:l.radius,skip:r.skip||isNaN(h)||isNaN(c),x:h,y:c},t.pivot()},setHoverStyle:function(t){var e=t._model,n=t._options,i=j.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth,radius:e.radius},e.backgroundColor=Ft(n.hoverBackgroundColor,i(n.backgroundColor)),e.borderColor=Ft(n.hoverBorderColor,i(n.borderColor)),e.borderWidth=Ft(n.hoverBorderWidth,n.borderWidth),e.radius=n.radius+n.hoverRadius},_resolveDataElementOptions:function(t,e){var n=this,i=n.chart,a=n.getDataset(),r=t.custom||{},o=a.data[e]||{},s=at.prototype._resolveDataElementOptions.apply(n,arguments),l={chart:i,dataIndex:e,dataset:a,datasetIndex:n.index};return n._cachedDataOpts===s&&(s=j.extend({},s)),s.radius=Ot([r.radius,o.r,n._config.radius,i.options.elements.point.radius],l,e),s}}),Rt=j.valueOrDefault,zt=Math.PI,Nt=2*zt,Bt=zt/2;B._set("doughnut",{animation:{animateRotate:!0,animateScale:!1},hover:{mode:"single"},legendCallback:function(t){var e,n,i,a=document.createElement("ul"),r=t.data,o=r.datasets,s=r.labels;if(a.setAttribute("class",t.id+"-legend"),o.length)for(e=0,n=o[0].data.length;e<n;++e)(i=a.appendChild(document.createElement("li"))).appendChild(document.createElement("span")).style.backgroundColor=o[0].backgroundColor[e],s[e]&&i.appendChild(document.createTextNode(s[e]));return a.outerHTML},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map(function(n,i){var a=t.getDatasetMeta(0),r=a.controller.getStyle(i);return{text:n,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,lineWidth:r.borderWidth,hidden:isNaN(e.datasets[0].data[i])||a.data[i].hidden,index:i}}):[]}},onClick:function(t,e){var n,i,a,r=e.index,o=this.chart;for(n=0,i=(o.data.datasets||[]).length;n<i;++n)(a=o.getDatasetMeta(n)).data[r]&&(a.data[r].hidden=!a.data[r].hidden);o.update()}},cutoutPercentage:50,rotation:-Bt,circumference:Nt,tooltips:{callbacks:{title:function(){return""},label:function(t,e){var n=e.labels[t.index],i=": "+e.datasets[t.datasetIndex].data[t.index];return j.isArray(n)?(n=n.slice())[0]+=i:n+=i,n}}}});var Et=at.extend({dataElementType:wt.Arc,linkScales:j.noop,_dataElementOptions:["backgroundColor","borderColor","borderWidth","borderAlign","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth"],getRingIndex:function(t){for(var e=0,n=0;n<t;++n)this.chart.isDatasetVisible(n)&&++e;return e},update:function(t){var e,n,i,a,r=this,o=r.chart,s=o.chartArea,l=o.options,u=1,d=1,h=0,c=0,f=r.getMeta(),g=f.data,p=l.cutoutPercentage/100||0,m=l.circumference,v=r._getRingWeight(r.index);if(m<Nt){var b=l.rotation%Nt,x=(b+=b>=zt?-Nt:b<-zt?Nt:0)+m,y=Math.cos(b),_=Math.sin(b),k=Math.cos(x),w=Math.sin(x),M=b<=0&&x>=0||x>=Nt,S=b<=Bt&&x>=Bt||x>=Nt+Bt,C=b<=-Bt&&x>=-Bt||x>=zt+Bt,P=b===-zt||x>=zt?-1:Math.min(y,y*p,k,k*p),A=C?-1:Math.min(_,_*p,w,w*p),D=M?1:Math.max(y,y*p,k,k*p),T=S?1:Math.max(_,_*p,w,w*p);u=(D-P)/2,d=(T-A)/2,h=-(D+P)/2,c=-(T+A)/2}for(i=0,a=g.length;i<a;++i)g[i]._options=r._resolveDataElementOptions(g[i],i);for(o.borderWidth=r.getMaxBorderWidth(),e=(s.right-s.left-o.borderWidth)/u,n=(s.bottom-s.top-o.borderWidth)/d,o.outerRadius=Math.max(Math.min(e,n)/2,0),o.innerRadius=Math.max(o.outerRadius*p,0),o.radiusLength=(o.outerRadius-o.innerRadius)/(r._getVisibleDatasetWeightTotal()||1),o.offsetX=h*o.outerRadius,o.offsetY=c*o.outerRadius,f.total=r.calculateTotal(),r.outerRadius=o.outerRadius-o.radiusLength*r._getRingWeightOffset(r.index),r.innerRadius=Math.max(r.outerRadius-o.radiusLength*v,0),i=0,a=g.length;i<a;++i)r.updateElement(g[i],i,t)},updateElement:function(t,e,n){var i=this,a=i.chart,r=a.chartArea,o=a.options,s=o.animation,l=(r.left+r.right)/2,u=(r.top+r.bottom)/2,d=o.rotation,h=o.rotation,c=i.getDataset(),f=n&&s.animateRotate?0:t.hidden?0:i.calculateCircumference(c.data[e])*(o.circumference/Nt),g=n&&s.animateScale?0:i.innerRadius,p=n&&s.animateScale?0:i.outerRadius,m=t._options||{};j.extend(t,{_datasetIndex:i.index,_index:e,_model:{backgroundColor:m.backgroundColor,borderColor:m.borderColor,borderWidth:m.borderWidth,borderAlign:m.borderAlign,x:l+a.offsetX,y:u+a.offsetY,startAngle:d,endAngle:h,circumference:f,outerRadius:p,innerRadius:g,label:j.valueAtIndexOrDefault(c.label,e,a.data.labels[e])}});var v=t._model;n&&s.animateRotate||(v.startAngle=0===e?o.rotation:i.getMeta().data[e-1]._model.endAngle,v.endAngle=v.startAngle+v.circumference),t.pivot()},calculateTotal:function(){var t,e=this.getDataset(),n=this.getMeta(),i=0;return j.each(n.data,function(n,a){t=e.data[a],isNaN(t)||n.hidden||(i+=Math.abs(t))}),i},calculateCircumference:function(t){var e=this.getMeta().total;return e>0&&!isNaN(t)?Nt*(Math.abs(t)/e):0},getMaxBorderWidth:function(t){var e,n,i,a,r,o,s,l,u=0,d=this.chart;if(!t)for(e=0,n=d.data.datasets.length;e<n;++e)if(d.isDatasetVisible(e)){t=(i=d.getDatasetMeta(e)).data,e!==this.index&&(r=i.controller);break}if(!t)return 0;for(e=0,n=t.length;e<n;++e)a=t[e],r?(r._configure(),o=r._resolveDataElementOptions(a,e)):o=a._options,"inner"!==o.borderAlign&&(s=o.borderWidth,u=(l=o.hoverBorderWidth)>(u=s>u?s:u)?l:u);return u},setHoverStyle:function(t){var e=t._model,n=t._options,i=j.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth},e.backgroundColor=Rt(n.hoverBackgroundColor,i(n.backgroundColor)),e.borderColor=Rt(n.hoverBorderColor,i(n.borderColor)),e.borderWidth=Rt(n.hoverBorderWidth,n.borderWidth)},_getRingWeightOffset:function(t){for(var e=0,n=0;n<t;++n)this.chart.isDatasetVisible(n)&&(e+=this._getRingWeight(n));return e},_getRingWeight:function(t){return Math.max(Rt(this.chart.data.datasets[t].weight,1),0)},_getVisibleDatasetWeightTotal:function(){return this._getRingWeightOffset(this.chart.data.datasets.length)}});B._set("horizontalBar",{hover:{mode:"index",axis:"y"},scales:{xAxes:[{type:"linear",position:"bottom"}],yAxes:[{type:"category",position:"left",offset:!0,gridLines:{offsetGridLines:!0}}]},elements:{rectangle:{borderSkipped:"left"}},tooltips:{mode:"index",axis:"y"}}),B._set("global",{datasets:{horizontalBar:{categoryPercentage:.8,barPercentage:.9}}});var Wt=It.extend({_getValueScaleId:function(){return this.getMeta().xAxisID},_getIndexScaleId:function(){return this.getMeta().yAxisID}}),Vt=j.valueOrDefault,Ht=j.options.resolve,jt=j.canvas._isPointInArea;function qt(t,e){var n=t&&t.options.ticks||{},i=n.reverse,a=void 0===n.min?e:0,r=void 0===n.max?e:0;return{start:i?r:a,end:i?a:r}}B._set("line",{showLines:!0,spanGaps:!1,hover:{mode:"label"},scales:{xAxes:[{type:"category",id:"x-axis-0"}],yAxes:[{type:"linear",id:"y-axis-0"}]}});var Ut=at.extend({datasetElementType:wt.Line,dataElementType:wt.Point,_datasetElementOptions:["backgroundColor","borderCapStyle","borderColor","borderDash","borderDashOffset","borderJoinStyle","borderWidth","cubicInterpolationMode","fill"],_dataElementOptions:{backgroundColor:"pointBackgroun
35dColor",borderColor:"pointBorderColor",borderWidth:"pointBorderWidth",hitRadius:"pointHitRadius",hoverBackgroundColor:"pointHoverBackgroundColor",hoverBorderColor:"pointHoverBorderColor",hoverBorderWidth:"pointHoverBorderWidth",hoverRadius:"pointHoverRadius",pointStyle:"pointStyle",radius:"pointRadius",rotation:"pointRotation"},update:function(t){var e,n,i=this,a=i.getMeta(),r=a.dataset,o=a.data||[],s=i.chart.options,l=i._config,u=i._showLine=Vt(l.showLine,s.showLines);for(i._xScale=i.getScaleForId(a.xAxisID),i._yScale=i.getScaleForId(a.yAxisID),u&&(void 0!==l.tension&&void 0===l.lineTension&&(l.lineTension=l.tension),r._scale=i._yScale,r._datasetIndex=i.index,r._children=o,r._model=i._resolveDatasetElementOptions(r),r.pivot()),e=0,n=o.length;e<n;++e)i.updateElement(o[e],e,t);for(u&&0!==r._model.tension&&i.updateBezierControlPoints(),e=0,n=o.length;e<n;++e)o[e].pivot()},updateElement:function(t,e,n){var i,a,r=this,o=r.getMeta(),s=t.custom||{},l=r.getDataset(),u=r.index,d=l.data[e],h=r._xScale,c=r._yScale,f=o.dataset._model,g=r._resolveDataElementOptions(t,e);i=h.getPixelForValue("object"==typeof d?d:NaN,e,u),a=n?c.getBasePixel():r.calculatePointY(d,e,u),t._xScale=h,t._yScale=c,t._options=g,t._datasetIndex=u,t._index=e,t._model={x:i,y:a,skip:s.skip||isNaN(i)||isNaN(a),radius:g.radius,pointStyle:g.pointStyle,rotation:g.rotation,backgroundColor:g.backgroundColor,borderColor:g.borderColor,borderWidth:g.borderWidth,tension:Vt(s.tension,f?f.tension:0),steppedLine:!!f&&f.steppedLine,hitRadius:g.hitRadius}},_resolveDatasetElementOptions:function(t){var e,n,i,a,r,o,s,l,u,d,h,c=this,f=c._config,g=t.custom||{},p=c.chart.options,m=p.elements.line,v=at.prototype._resolveDatasetElementOptions.apply(c,arguments);return v.spanGaps=Vt(f.spanGaps,p.spanGaps),v.tension=Vt(f.lineTension,m.tension),v.steppedLine=Ht([g.steppedLine,f.steppedLine,m.stepped]),v.clip=(e=Vt(f.clip,(o=c._xScale,s=c._yScale,l=v.borderWidth,d=qt(o,u=l/2),{top:(h=qt(s,u)).end,right:d.end,bottom:h.start,left:d.start})),j.isObject(e)?(n=e.top,i=e.right,a=e.bottom,r=e.left):n=i=a=r=e,{top:n,right:i,bottom:a,left:r}),v},calculatePointY:function(t,e,n){var i,a,r,o,s,l,u,d=this.chart,h=this._yScale,c=0,f=0;if(h.options.stacked){for(s=+h.getRightValue(t),u=(l=d._getSortedVisibleDatasetMetas()).length,i=0;i<u&&(r=l[i]).index!==n;++i)a=d.data.datasets[r.index],"line"===r.type&&r.yAxisID===h.id&&((o=+h.getRightValue(a.data[e]))<0?f+=o||0:c+=o||0);return s<0?h.getPixelForValue(f+s):h.getPixelForValue(c+s)}return h.getPixelForValue(t)},updateBezierControlPoints:function(){var t,e,n,i,a=this.chart,r=this.getMeta(),o=r.dataset._model,s=a.chartArea,l=r.data||[];function u(t,e,n){return Math.max(Math.min(t,n),e)}if(o.spanGaps&&(l=l.filter(function(t){return!t._model.skip})),"monotone"===o.cubicInterpolationMode)j.splineCurveMonotone(l);else for(t=0,e=l.length;t<e;++t)n=l[t]._model,i=j.splineCurve(j.previousItem(l,t)._model,n,j.nextItem(l,t)._model,o.tension),n.controlPointPreviousX=i.previous.x,n.controlPointPreviousY=i.previous.y,n.controlPointNextX=i.next.x,n.controlPointNextY=i.next.y;if(a.options.elements.line.capBezierPoints)for(t=0,e=l.length;t<e;++t)n=l[t]._model,jt(n,s)&&(t>0&&jt(l[t-1]._model,s)&&(n.controlPointPreviousX=u(n.controlPointPreviousX,s.left,s.right),n.controlPointPreviousY=u(n.controlPointPreviousY,s.top,s.bottom)),t<l.length-1&&jt(l[t+1]._model,s)&&(n.controlPointNextX=u(n.controlPointNextX,s.left,s.right),n.controlPointNextY=u(n.controlPointNextY,s.top,s.bottom)))},draw:function(){var t,e=this.chart,n=this.getMeta(),i=n.data||[],a=e.chartArea,r=e.canvas,o=0,s=i.length;for(this._showLine&&(t=n.dataset._model.clip,j.canvas.clipArea(e.ctx,{left:!1===t.left?0:a.left-t.left,right:!1===t.right?r.width:a.right+t.right,top:!1===t.top?0:a.top-t.top,bottom:!1===t.bottom?r.height:a.bottom+t.bottom}),n.dataset.draw(),j.canvas.unclipArea(e.ctx));o<s;++o)i[o].draw(a)},setHoverStyle:function(t){var e=t._model,n=t._options,i=j.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth,radius:e.radius}
vendor: 9,586 bytes, line 35
35,e.backgroundColor=Vt(n.hoverBackgroundColor,i(n.backgroundColor)),e.borderColor=Vt(n.hoverBorderColor,i(n.borderColor)),e.borderWidth=Vt(n.hoverBorderWidth,n.borderWidth),e.radius=Vt(n.hoverRadius,n.radius)}}),Yt=j.options.resolve;B._set("polarArea",{scale:{type:"radialLinear",angleLines:{display:!1},gridLines:{circular:!0},pointLabels:{display:!1},ticks:{beginAtZero:!0}},animation:{animateRotate:!0,animateScale:!0},startAngle:-.5*Math.PI,legendCallback:function(t){var e,n,i,a=document.createElement("ul"),r=t.data,o=r.datasets,s=r.labels;if(a.setAttribute("class",t.id+"-legend"),o.length)for(e=0,n=o[0].data.length;e<n;++e)(i=a.appendChild(document.createElement("li"))).appendChild(document.createElement("span")).style.backgroundColor=o[0].backgroundColor[e],s[e]&&i.appendChild(document.createTextNode(s[e]));return a.outerHTML},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map(function(n,i){var a=t.getDatasetMeta(0),r=a.controller.getStyle(i);return{text:n,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,lineWidth:r.borderWidth,hidden:isNaN(e.datasets[0].data[i])||a.data[i].hidden,index:i}}):[]}},onClick:function(t,e){var n,i,a,r=e.index,o=this.chart;for(n=0,i=(o.data.datasets||[]).length;n<i;++n)(a=o.getDatasetMeta(n)).data[r].hidden=!a.data[r].hidden;o.update()}},tooltips:{callbacks:{title:function(){return""},label:function(t,e){return e.labels[t.index]+": "+t.yLabel}}}});var Gt=at.extend({dataElementType:wt.Arc,linkScales:j.noop,_dataElementOptions:["backgroundColor","borderColor","borderWidth","borderAlign","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth"],_getIndexScaleId:function(){return this.chart.scale.id},_getValueScaleId:function(){return this.chart.scale.id},update:function(t){var e,n,i,a=this,r=a.getDataset(),o=a.getMeta(),s=a.chart.options.startAngle||0,l=a._starts=[],u=a._angles=[],d=o.data;for(a._updateRadius(),o.count=a.countVisibleElements(),e=0,n=r.data.length;e<n;e++)l[e]=s,i=a._computeAngle(e),u[e]=i,s+=i;for(e=0,n=d.length;e<n;++e)d[e]._options=a._resolveDataElementOptions(d[e],e),a.updateElement(d[e],e,t)},_updateRadius:function(){var t=this,e=t.chart,n=e.chartArea,i=e.options,a=Math.min(n.right-n.left,n.bottom-n.top);e.outerRadius=Math.max(a/2,0),e.innerRadius=Math.max(i.cutoutPercentage?e.outerRadius/100*i.cutoutPercentage:1,0),e.radiusLength=(e.outerRadius-e.innerRadius)/e.getVisibleDatasetCount(),t.outerRadius=e.outerRadius-e.radiusLength*t.index,t.innerRadius=t.outerRadius-e.radiusLength},updateElement:function(t,e,n){var i=this,a=i.chart,r=i.getDataset(),o=a.options,s=o.animation,l=a.scale,u=a.data.labels,d=l.xCenter,h=l.yCenter,c=o.startAngle,f=t.hidden?0:l.getDistanceFromCenterForValue(r.data[e]),g=i._starts[e],p=g+(t.hidden?0:i._angles[e]),m=s.animateScale?0:l.getDistanceFromCenterForValue(r.data[e]),v=t._options||{};j.extend(t,{_datasetIndex:i.index,_index:e,_scale:l,_model:{backgroundColor:v.backgroundColor,borderColor:v.borderColor,borderWidth:v.borderWidth,borderAlign:v.borderAlign,x:d,y:h,innerRadius:0,outerRadius:n?m:f,startAngle:n&&s.animateRotate?c:g,endAngle:n&&s.animateRotate?c:p,label:j.valueAtIndexOrDefault(u,e,u[e])}}),t.pivot()},countVisibleElements:function(){var t=this.getDataset(),e=this.getMeta(),n=0;return j.each(e.data,function(e,i){isNaN(t.data[i])||e.hidden||n++}),n},setHoverStyle:function(t){var e=t._model,n=t._options,i=j.getHoverColor,a=j.valueOrDefault;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth},e.backgroundColor=a(n.hoverBackgroundColor,i(n.backgroundColor)),e.borderColor=a(n.hoverBorderColor,i(n.borderColor)),e.borderWidth=a(n.hoverBorderWidth,n.borderWidth)},_computeAngle:function(t){var e=this,n=this.getMeta().count,i=e.getDataset(),a=e.getMeta();if(isNaN(i.data[t])||a.data[t].hidden)return 0;var r={chart:e.chart,dataIndex:t,dataset:i,datasetIndex:e.index};return Yt([e.chart.options.elements.arc.angle,2*Math.PI/n],r,t)}});B._set("pie",j.clone(B.doughnut)),B._set("pie",{cutoutPercentage:0});var Xt=Et,Kt=j.valueOrDefault;B._set("radar",{spanGaps:!1,scale:{type:"radialLinear"},elements:{line:{fill:"start",tension:0}}});var Zt=at.extend({datasetElementType:wt.Line,dataElementType:wt.Point,linkScales:j.noop,_datasetElementOptions:["backgroundColor","borderWidth","borderColor","borderCapStyle","borderDash","borderDashOffset","borderJoinStyle","fill"],_dataElementOptions:{backgroundColor:"pointBackgroundColor",borderColor:"pointBorderColor",borderWidth:"pointBorderWidth",hitRadius:"pointHitRadius",hoverBackgroundColor:"pointHoverBackgroundColor",hoverBorderColor:"pointHoverBorderColor",hoverBorderWidth:"pointHoverBorderWidth",hoverRadius:"pointHoverRadius",pointStyle:"pointStyle",radius:"pointRadius",rotation:"pointRotation"},_getIndexScaleId:function(){return this.chart.scale.id},_getValueScaleId:function(){return this.chart.scale.id},update:function(t){var e,n,i=this,a=i.getMeta(),r=a.dataset,o=a.data||[],s=i.chart.scale,l=i._config;for(void 0!==l.tension&&void 0===l.lineTension&&(l.lineTension=l.tension),r._scale=s,r._datasetIndex=i.index,r._children=o,r._loop=!0,r._model=i._resolveDatasetElementOptions(r),r.pivot(),e=0,n=o.length;e<n;++e)i.updateElement(o[e],e,t);for(i.updateBezierControlPoints(),e=0,n=o.length;e<n;++e)o[e].pivot()},updateElement:function(t,e,n){var i=this,a=t.custom||{},r=i.getDataset(),o=i.chart.scale,s=o.getPointPositionForValue(e,r.data[e]),l=i._resolveDataElementOptions(t,e),u=i.getMeta().dataset._model,d=n?o.xCenter:s.x,h=n?o.yCenter:s.y;t._scale=o,t._options=l,t._datasetIndex=i.index,t._index=e,t._model={x:d,y:h,skip:a.skip||isNaN(d)||isNaN(h),radius:l.radius,pointStyle:l.pointStyle,rotation:l.rotation,backgroundColor:l.backgroundColor,borderColor:l.borderColor,borderWidth:l.borderWidth,tension:Kt(a.tension,u?u.tension:0),hitRadius:l.hitRadius}},_resolveDatasetElementOptions:function(){var t=this._config,e=this.chart.options,n=at.prototype._resolveDatasetElementOptions.apply(this,arguments);return n.spanGaps=Kt(t.spanGaps,e.spanGaps),n.tension=Kt(t.lineTension,e.elements.line.tension),n},updateBezierControlPoints:function(){var t,e,n,i,a=this.getMeta(),r=this.chart.chartArea,o=a.data||[];function s(t,e,n){return Math.max(Math.min(t,n),e)}for(a.dataset._model.spanGaps&&(o=o.filter(function(t){return!t._model.skip})),t=0,e=o.length;t<e;++t)n=o[t]._model,i=j.splineCurve(j.previousItem(o,t,!0)._model,n,j.nextItem(o,t,!0)._model,n.tension),n.controlPointPreviousX=s(i.previous.x,r.left,r.right),n.controlPointPreviousY=s(i.previous.y,r.top,r.bottom),n.controlPointNextX=s(i.next.x,r.left,r.right),n.controlPointNextY=s(i.next.y,r.top,r.bottom)},setHoverStyle:function(t){var e=t._model,n=t._options,i=j.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth,radius:e.radius},e.backgroundColor=Kt(n.hoverBackgroundColor,i(n.backgroundColor)),e.borderColor=Kt(n.hoverBorderColor,i(n.borderColor)),e.borderWidth=Kt(n.hoverBorderWidth,n.borderWidth),e.radius=Kt(n.hoverRadius,n.radius)}});B._set("scatter",{hover:{mode:"single"},scales:{xAxes:[{id:"x-axis-1",type:"linear",position:"bottom"}],yAxes:[{id:"y-axis-1",type:"linear",position:"left"}]},tooltips:{callbacks:{title:function(){return""},label:function(t){return"("+t.xLabel+", "+t.yLabel+")"}}}}),B._set("global",{datasets:{scatter:{showLine:!1}}});var $t={bar:It,bubble:Lt,doughnut:Et,horizontalBar:Wt,line:Ut,polarArea:Gt,pie:Xt,radar:Zt,scatter:Ut};function Jt(t,e){return t.native?{x:t.x,y:t.y}:j.getRelativePosition(t,e)}function Qt(t,e){var n,i,a,r,o,s,l=t._getSortedVisibleDatasetMetas();for(i=0,r=l.length;i<r;++i)for(a=0,o=(n=l[i].data).length;a<o;++a)(s=n[a])._view.skip||e(s)}function te(t,e){var n=[];return Qt(t,function(t){t.inRange(e.x,e.y)&&n.push(t)}),n}function ee(t,e,n,i){var a=Number.POSITIVE_INFINITY,r=[];return Qt(t,function(t){if(!n||t.inRange(e.x,e.y)){var o=t.getCenterPoint(),s=i(e,o);s<a?(r=[t],a=s):s===a&&r.push(t)}}),r}function ne(t){var e=-1!==t.indexOf("x"),n=-1!==t.indexOf("y");return function(t,i){var a=e?Math.abs(t.x-i.x):0,r=n?Math.abs(t.y-i.y):0;return Math.sqrt(Math.pow(a,2)+Math.pow(r,2))}}function ie(t,e,n){var i=Jt(e,t);n.axis=n.axis||"x";var a=ne(n.axis),r=n.intersect?te(t,i):ee(t,i,!1,a),o=[];return r.length?(t._getSortedVisibleDatasetMetas().forEach(function(t){var e=t.data[r[0]._index];e&&!e._view.skip&&o.push(e)}),o):[]}var ae={modes:{single:function(t,e){var n=Jt(e,t),i=[];return Qt(t,function(t){if(t.inRange(n.x,n.y))return i.push(t),i}),i.slice(0,1)},label:ie,index:ie,dataset:function(t,e,n){var i=Jt(e,t);n.axis=n.axis||"xy";var a=ne(n.axis),r=n.intersect?te(t,i):ee(t,i,!1,a);return r.length>0&&(r=t.getDatasetMeta(r[0]._datasetIndex).data),r},"x-axis":function(t,e){return ie(t,e,{intersect:!1})},point:function(t,e){return te(t,Jt(e,t))},nearest:function(t,e,n){var i=Jt(e,t);n.axis=n.axis||"xy";var a=ne(n.axis);return ee(t,i,n.intersect,a)},x:function(t,e,n){var i=Jt(e,t),a=[],r=!1;return Qt(t,function(t){t.inXRange(i.x)&&a.push(t),t.inRange(i.x,i.y)&&(r=!0)}),n.intersect&&!r&&(a=[]),a},y:function(t,e,n){var i=Jt(e,t),a=[],r=!1;return Qt(t,function(t){t.inYRange(i.y)&&a.push(t),t.inRange(i.x,i.y)&&(r=!0)}),n.intersect&&!r&&(a=[]),a}}},re=j.extend;function oe(t,e){return j.where(t,function(t){return t.pos===e})}function se(t,e){return t.sort(function(t,n){var i=e?n:t,a=e?t:n;return i.weight===a.weight?i.index-a.index:i.weight-a.weight})}function le(t,e,n,i){return Math.max(t[n],e[n])+Math.max(t[i],e[i])}function ue(t,e,n){var i,a,r=n.box,o=t.maxPadding;
vendor: 4,288 bytes, line 35
35if(n.size&&(t[n.pos]-=n.size),n.size=n.horizontal?r.height:r.width,t[n.pos]+=n.size,r.getPadding){var s=r.getPadding();o.top=Math.max(o.top,s.top),o.left=Math.max(o.left,s.left),o.bottom=Math.max(o.bottom,s.bottom),o.right=Math.max(o.right,s.right)}if(i=e.outerWidth-le(o,t,"left","right"),a=e.outerHeight-le(o,t,"top","bottom"),i!==t.w||a!==t.h){t.w=i,t.h=a;var l=n.horizontal?[i,t.w]:[a,t.h];return!(l[0]===l[1]||isNaN(l[0])&&isNaN(l[1]))}}function de(t,e){var n=e.maxPadding;function i(t){var i={left:0,top:0,right:0,bottom:0};return t.forEach(function(t){i[t]=Math.max(e[t],n[t])}),i}return i(t?["left","right"]:["top","bottom"])}function he(t,e,n){var i,a,r,o,s,l,u=[];for(i=0,a=t.length;i<a;++i)(o=(r=t[i]).box).update(r.width||e.w,r.height||e.h,de(r.horizontal,e)),ue(e,n,r)&&(l=!0,u.length&&(s=!0)),o.fullWidth||u.push(r);return s&&he(u,e,n)||l}function ce(t,e,n){var i,a,r,o,s=n.padding,l=e.x,u=e.y;for(i=0,a=t.length;i<a;++i)o=(r=t[i]).box,r.horizontal?(o.left=o.fullWidth?s.left:e.left,o.right=o.fullWidth?n.outerWidth-s.right:e.left+e.w,o.top=u,o.bottom=u+o.height,o.width=o.right-o.left,u=o.bottom):(o.left=l,o.right=l+o.width,o.top=e.top,o.bottom=e.top+e.h,o.height=o.bottom-o.top,l=o.right);e.x=l,e.y=u}B._set("global",{layout:{padding:{top:0,right:0,bottom:0,left:0}}});var fe,ge={defaults:{},addBox:function(t,e){t.boxes||(t.boxes=[]),e.fullWidth=e.fullWidth||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw:function(){e.draw.apply(e,arguments)}}]},t.boxes.push(e)},removeBox:function(t,e){var n=t.boxes?t.boxes.indexOf(e):-1;-1!==n&&t.boxes.splice(n,1)},configure:function(t,e,n){for(var i,a=["fullWidth","position","weight"],r=a.length,o=0;o<r;++o)i=a[o],n.hasOwnProperty(i)&&(e[i]=n[i])},update:function(t,e,n){if(t){var i=t.options.layout||{},a=j.options.toPadding(i.padding),r=e-a.width,o=n-a.height,s=function(t){var e=function(t){var e,n,i,a=[];for(e=0,n=(t||[]).length;e<n;++e)i=t[e],a.push({index:e,box:i,pos:i.position,horizontal:i.isHorizontal(),weight:i.weight});return a}(t),n=se(oe(e,"left"),!0),i=se(oe(e,"right")),a=se(oe(e,"top"),!0),r=se(oe(e,"bottom"));return{leftAndTop:n.concat(a),rightAndBottom:i.concat(r),chartArea:oe(e,"chartArea"),vertical:n.concat(i),horizontal:a.concat(r)}}(t.boxes),l=s.vertical,u=s.horizontal,d=Object.freeze({outerWidth:e,outerHeight:n,padding:a,availableWidth:r,vBoxMaxWidth:r/2/l.length,hBoxMaxHeight:o/2}),h=re({maxPadding:re({},a),w:r,h:o,x:a.left,y:a.top},a);!function(t,e){var n,i,a;for(n=0,i=t.length;n<i;++n)(a=t[n]).width=a.horizontal?a.box.fullWidth&&e.availableWidth:e.vBoxMaxWidth,a.height=a.horizontal&&e.hBoxMaxHeight}(l.concat(u),d),he(l,h,d),he(u,h,d)&&he(l,h,d),function(t){var e=t.maxPadding;function n(n){var i=Math.max(e[n]-t[n],0);return t[n]+=i,i}t.y+=n("top"),t.x+=n("left"),n("right"),n("bottom")}(h),ce(s.leftAndTop,h,d),h.x+=h.w,h.y+=h.h,ce(s.rightAndBottom,h,d),t.chartArea={left:h.left,top:h.top,right:h.left+h.w,bottom:h.top+h.h},j.each(s.chartArea,function(e){var n=e.box;re(n,t.chartArea),n.update(h.w,h.h)})}}},pe=(fe=Object.freeze({__proto__:null,default:"/*\r\n * DOM element rendering detection\r\n * https://davidwalsh.name/detect-node-insertion\r\n */\r\n@keyframes chartjs-render-animation {\r\n\tfrom { opacity: 0.99; }\r\n\tto { opacity: 1; }\r\n}\r\n\r\n.chartjs-render-monitor {\r\n\tanimation: chartjs-render-animation 0.001s;\r\n}\r\n\r\n/*\r\n * DOM element resizing detection\r\n * https://github.com/marcj/css-element-queries\r\n */\r\n.chartjs-size-monitor,\r\n.chartjs-size-monitor-expand,\r\n.chartjs-size-monitor-shrink {\r\n\tposition: absolute;\r\n\tdirection: ltr;\r\n\tleft: 0;\r\n\ttop: 0;\r\n\tright: 0;\r\n\tbottom: 0;\r\n\toverflow: hidden;\r\n\tpointer-events: none;\r\n\tvisibility: hidden;\r\n\tz-index: -1;\r\n}\r\n\r\n.chartjs-size-monitor-expand > div {\r\n\tposition: absolute;\r\n\twidth: 1000000px;\r\n\theight: 1000000px;\r\n\tleft: 0;\r\n\ttop: 0;\r\n}\r\n\r\n.chartjs-size-monitor-shrink > div {\r\n\tposition: absolute;\r\n\twidth: 200%;\r\n\theight: 200%;\r\n\tleft: 0;\r\n\ttop: 0;\r\n}\r\n"}))&&fe.default||fe,me="$chartjs",ve="chartjs-size-monitor",be="chartjs-render-monitor",xe="chartjs-render-animation",ye=["animationstart","webkitAnimationStart"],_e={touchstart:"mousedown",touchmove:"mou
35semove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"};function ke(t,e){var n=j.getStyle(t,e),i=n&&n.match(/^(\d+)(\.\d+)?px$/);return i?Number(i[1]):void 0}var we=!!function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("e",null,e)}catch(n){}return t}()&&{passive:!0};function Me(t,e,n){t.addEventListener(e,n,we)}function Se(t,e,n){t.removeEventListener(e,n,we)}function Ce(t,e,n,i,a){return{type:t,chart:e,native:a||null,x:void 0!==n?n:null,y:void 0!==i?i:null}}function Pe(t){var e=document.createElement("div");return e.className=t||"",e}function Ae(t,e,n){var i,a,r,o,s=t[me]||(t[me]={}),l=s.resizer=function(t){var e=Pe(ve),n=Pe(ve+"-expand"),i=Pe(ve+"-shrink");n.appendChild(Pe()),i.appendChild(Pe()),e.appendChild(n),e.appendChild(i),e._reset=function(){n.scrollLeft=1e6,n.scrollTop=1e6,i.scrollLeft=1e6,i.scrollTop=1e6};var a=function(){e._reset(),t()};return Me(n,"scroll",a.bind(n,"expand")),Me(i,"scroll",a.bind(i,"shrink")),e}((i=function(){if(s.resizer){var i=n.options.maintainAspectRatio&&t.parentNode,a=i?i.clientWidth:0;e(Ce("resize",n)),i&&i.clientWidth<a&&n.canvas&&e(Ce("resize",n))}},r=!1,o=[],function(){o=Array.prototype.slice.call(arguments),a=a||this,r||(r=!0,j.requestAnimFrame.call(window,function(){r=!1,i.apply(a,o)}))}));!function(t,e){var n=t[me]||(t[me]={}),i=n.renderProxy=function(t){t.animationName===xe&&e()};j.each(ye,function(e){Me(t,e,i)}),n.reflow=!!t.offsetParent,t.classList.add(be)}(t,function(){if(s.resizer){var e=t.parentNode;e&&e!==l.parentNode&&e.insertBefore(l,e.firstChild),l._reset()}})}function De(t){var e=t[me]||{},n=e.resizer;delete e.resizer,function(t){var e=t[me]||{},n=e.renderProxy;n&&(j.each(ye,function(e){Se(t,e,n)}),delete e.renderProxy),t.classList.remove(be)}(t),n&&n.parentNode&&n.parentNode.removeChild(n)}var Te={disableCSSInjection:!1,_enabled:"undefined"!=typeof window&&"undefined"!=typeof document,_ensureLoaded:function(t){if(!this.disableCSSInjection){var e=t.getRootNode?t.getRootNode():document;!function(t,e){var n=t[me]||(t[me]={});if(!n.containsStyles){n.containsStyles=!0,e="/* Chart.js */\n"+e;var i=document.createElement("style");i.setAttribute("type","text/css"),i.appendChild(document.createTextNode(e)),t.appendChild(i)}}(e.host?e:document.head,pe)}},acquireContext:function(t,e){"string"==typeof t?t=document.getElementById(t):t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas);var n=t&&t.getContext&&t.getContext("2d");return n&&n.canvas===t?(this._ensureLoaded(t),function(t,e){var n=t.style,i=t.getAttribute("height"),a=t.getAttribute("width");if(t[me]={initial:{height:i,width:a,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",null===a||""===a){var r=ke(t,"width");void 0!==r&&(t.width=r)}if(null===i||""===i)if(""===t.style.height)t.height=t.width/(e.options.aspectRatio||2);else{var o=ke(t,"height");void 0!==r&&(t.height=o)}}(t,e),n):null},releaseContext:function(t){var e=t.canvas;if(e[me]){var n=e[me].initial;["height","width"].forEach(function(t){var i=n[t];j.isNullOrUndef(i)?e.removeAttribute(t):e.setAttribute(t,i)}),j.each(n.style||{},function(t,n){e.style[n]=t}),e.width=e.width,delete e[me]}},addEventListener:function(t,e,n){var i=t.canvas;if("resize"!==e){var a=n[me]||(n[me]={});Me(i,e,(a.proxies||(a.proxies={}))[t.id+"_"+e]=function(e){n(function(t,e){var n=_e[t.type]||t.type,i=j.getRelativePosition(t,e);return Ce(n,e,i.x,i.y,t)}(e,t))})}else Ae(i,n,t)},removeEventListener:function(t,e,n){var i=t.canvas;if("resize"!==e){var a=((n[me]||{}).proxies||{})[t.id+"_"+e];a&&Se(i,e,a)}else De(i)}};j.addEvent=Me,j.removeEvent=Se;var Ie=Te._enabled?Te:{acquireContext:function(t){return t&&t.canvas&&(t=t.canvas),t&&t.getContext("2d")||null}},Fe=j.extend({initialize:function(){},acquireContext:function(){},releaseContext:function(){},addEventListener:function(){},removeEventListener:function(){}},Ie);B._set("global",{plugins:{}});var Oe={_plugins:[],_cacheId:0,register:function(t){var e=this._plugins;[].concat(t).forEach(function(t){-1===e.indexOf(t)&&e.push(t)}),this._cacheId++},unregister:function(t){var e=this._plugins;[].concat(t).forEach(function(t){var n=e.indexOf(t);-1!==n&&e.splice(n,1)}),this._cacheId++},clear:function(){this._plugins=[],this._cacheId++},count:function(){return this._plugins.length},getAll:function(){return this._plugins},notify:function(t,e,n){var i,a,r,o,s,l=this.descriptors(t),u=l.length;for(i=0;i<u;++i)if("function"==typeof(s=(r=(a=l[i]).plugin)[e])&&((o=[t].concat(n||[])).push(a.options),!1===s.apply(r,o)))return!1;return!0},descriptors:function(t){var e=t.$plugins||(t.$plugins={});if(e.id===this._cacheId)return e.descriptors;var n=[],i=[],a=t&&t.config||{},r=a.options&&a.options.plugins||{};
vendor: 5,331 bytes, line 35
35return this._plugins.concat(a.plugins||[]).forEach(function(t){if(-1===n.indexOf(t)){var e=t.id,a=r[e];!1!==a&&(!0===a&&(a=j.clone(B.global.plugins[e])),n.push(t),i.push({plugin:t,options:a||{}}))}}),e.descriptors=i,e.id=this._cacheId,i},_invalidate:function(t){delete t.$plugins}},Le={constructors:{},defaults:{},registerScaleType:function(t,e,n){this.constructors[t]=e,this.defaults[t]=j.clone(n)},getScaleConstructor:function(t){return this.constructors.hasOwnProperty(t)?this.constructors[t]:void 0},getScaleDefaults:function(t){return this.defaults.hasOwnProperty(t)?j.merge(Object.create(null),[B.scale,this.defaults[t]]):{}},updateScaleDefaults:function(t,e){this.defaults.hasOwnProperty(t)&&(this.defaults[t]=j.extend(this.defaults[t],e))},addScalesToLayout:function(t){j.each(t.scales,function(e){e.fullWidth=e.options.fullWidth,e.position=e.options.position,e.weight=e.options.weight,ge.addBox(t,e)})}},Re=j.valueOrDefault,ze=j.rtl.getRtlAdapter;B._set("global",{tooltips:{enabled:!0,custom:null,mode:"nearest",position:"average",intersect:!0,backgroundColor:"rgba(0,0,0,0.8)",titleFontStyle:"bold",titleSpacing:2,titleMarginBottom:6,titleFontColor:"#fff",titleAlign:"left",bodySpacing:2,bodyFontColor:"#fff",bodyAlign:"left",footerFontStyle:"bold",footerSpacing:2,footerMarginTop:6,footerFontColor:"#fff",footerAlign:"left",yPadding:6,xPadding:6,caretPadding:2,caretSize:5,cornerRadius:6,multiKeyBackground:"#fff",displayColors:!0,borderColor:"rgba(0,0,0,0)",borderWidth:0,callbacks:{beforeTitle:j.noop,title:function(t,e){var n="",i=e.labels,a=i?i.length:0;if(t.length>0){var r=t[0];r.label?n=r.label:r.xLabel?n=r.xLabel:a>0&&r.index<a&&(n=i[r.index])}return n},afterTitle:j.noop,beforeBody:j.noop,beforeLabel:j.noop,label:function(t,e){var n=e.datasets[t.datasetIndex].label||"";return n&&(n+=": "),j.isNullOrUndef(t.value)?n+=t.yLabel:n+=t.value,n},labelColor:function(t,e){var n=e.getDatasetMeta(t.datasetIndex).data[t.index]._view;return{borderColor:n.borderColor,backgroundColor:n.backgroundColor}},labelTextColor:function(){return this._options.bodyFontColor},afterLabel:j.noop,afterBody:j.noop,beforeFooter:j.noop,footer:j.noop,afterFooter:j.noop}}});var Ne={average:function(t){if(!t.length)return!1;var e,n,i=0,a=0,r=0;for(e=0,n=t.length;e<n;++e){var o=t[e];if(o&&o.hasValue()){var s=o.tooltipPosition();i+=s.x,a+=s.y,++r}}return{x:i/r,y:a/r}},nearest:function(t,e){var n,i,a,r=e.x,o=e.y,s=Number.POSITIVE_INFINITY;for(n=0,i=t.length;n<i;++n){var l=t[n];if(l&&l.hasValue()){var u=l.getCenterPoint(),d=j.distanceBetweenPoints(e,u);d<s&&(s=d,a=l)}}if(a){var h=a.tooltipPosition();r=h.x,o=h.y}return{x:r,y:o}}};function Be(t,e){return e&&(j.isArray(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function Ee(t){return("string"==typeof t||t instanceof String)&&t.indexOf("\n")>-1?t.split("\n"):t}function We(t){var e=B.global;return{xPadding:t.xPadding,yPadding:t.yPadding,xAlign:t.xAlign,yAlign:t.yAlign,rtl:t.rtl,textDirection:t.textDirection,bodyFontColor:t.bodyFontColor,_bodyFontFamily:Re(t.bodyFontFamily,e.defaultFontFamily),_bodyFontStyle:Re(t.bodyFontStyle,e.defaultFontStyle),_bodyAlign:t.bodyAlign,bodyFontSize:Re(t.bodyFontSize,e.defaultFontSize),bodySpacing:t.bodySpacing,titleFontColor:t.titleFontColor,_titleFontFamily:Re(t.titleFontFamily,e.defaultFontFamily),_titleFontStyle:Re(t.titleFontStyle,e.defaultFontStyle),titleFontSize:Re(t.titleFontSize,e.defaultFontSize),_titleAlign:t.titleAlign,titleSpacing:t.titleSpacing,titleMarginBottom:t.titleMarginBottom,footerFontColor:t.footerFontColor,_footerFontFamily:Re(t.footerFontFamily,e.defaultFontFamily),_footerFontStyle:Re(t.footerFontStyle,e.defaultFontStyle),footerFontSize:Re(t.footerFontSize,e.defaultFontSize),_footerAlign:t.footerAlign,footerSpacing:t.footerSpacing,footerMarginTop:t.footerMarginTop,caretSize:t.caretSize,cornerRadius:t.cornerRadius,backgroundColor:t.backgroundColor,opacity:0,legendColorBackground:t.multiKeyBackground,displayColors:t.displayColors,borderColor:t.borderColor,borderWidth:t.borderWidth}}function Ve(t,e){return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-t.xPadding:t.x+t.xPadding}function He(t){return Be([],Ee(t))}var je=Z.extend({initialize:function(){this._model=We(this._options),this._lastActive=[]},getTitle:function(){var t=this._options.callbacks,e=t.beforeTitle.apply(this,arguments),n=t.title.apply(this,arguments),i=t.afterTitle.apply(this,arguments),a=[];return a=Be(a,Ee(e)),a=Be(a,Ee(n)),a=Be(a,Ee(i))},getBeforeBody:function(){return He(this._options.callbacks.beforeBody.apply(this,arguments))},getBody:function(t,e){var n=this,i=n._options.callbacks,a=[];return j.each(t,function(t){var r={before:[],lines:[],after:[]};Be(r.before,Ee(i.beforeLabel.call(n,t,e))),Be(r.lines,i.label.call(n,t,e)),Be(r.after,Ee(i.afterLabel.call(n,t,e))),a.push(r)}),a},getAfterBody:function(){return He(this._options.callbacks.afterBody.apply(this,arguments))},getFooter:function(){var t=this._options.callbacks,e=t.beforeFooter.apply(this,arguments),n=t.footer.apply(this,arguments),i=t.afterFooter.apply(this,arguments),a=[];return a=Be(a,Ee(e)),a=Be(a,Ee(n)),a=Be(a,Ee(i))},update:function(t){var e,n,i,a,r,o,s,l,u,d,h=this,c=h._options,f=h._model,g=h._model=We(c),p=h._active,m=h._data,v={xAlign:f.xAlign,yAlign:f.yAlign},b={x:f.x,y:f.y},x={width:f.width,height:f.height},y={x:f.caretX,y:f.caretY};
vendor: 7,642 bytes, line 35
35if(p.length){g.opacity=1;var _=[],k=[];y=Ne[c.position].call(h,p,h._eventPosition);var w=[];for(e=0,n=p.length;e<n;++e)w.push((i=p[e],a=void 0,r=void 0,o=void 0,s=void 0,l=void 0,u=void 0,d=void 0,a=i._xScale,r=i._yScale||i._scale,o=i._index,s=i._datasetIndex,l=i._chart.getDatasetMeta(s).controller,u=l._getIndexScale(),d=l._getValueScale(),{xLabel:a?a.getLabelForIndex(o,s):"",yLabel:r?r.getLabelForIndex(o,s):"",label:u?""+u.getLabelForIndex(o,s):"",value:d?""+d.getLabelForIndex(o,s):"",index:o,datasetIndex:s,x:i._model.x,y:i._model.y}));c.filter&&(w=w.filter(function(t){return c.filter(t,m)})),c.itemSort&&(w=w.sort(function(t,e){return c.itemSort(t,e,m)})),j.each(w,function(t){_.push(c.callbacks.labelColor.call(h,t,h._chart)),k.push(c.callbacks.labelTextColor.call(h,t,h._chart))}),g.title=h.getTitle(w,m),g.beforeBody=h.getBeforeBody(w,m),g.body=h.getBody(w,m),g.afterBody=h.getAfterBody(w,m),g.footer=h.getFooter(w,m),g.x=y.x,g.y=y.y,g.caretPadding=c.caretPadding,g.labelColors=_,g.labelTextColors=k,g.dataPoints=w,x=function(t,e){var n=t._chart.ctx,i=2*e.yPadding,a=0,r=e.body,o=r.reduce(function(t,e){return t+e.before.length+e.lines.length+e.after.length},0);o+=e.beforeBody.length+e.afterBody.length;var s=e.title.length,l=e.footer.length,u=e.titleFontSize,d=e.bodyFontSize,h=e.footerFontSize;i+=s*u,i+=s?(s-1)*e.titleSpacing:0,i+=s?e.titleMarginBottom:0,i+=o*d,i+=o?(o-1)*e.bodySpacing:0,i+=l?e.footerMarginTop:0,i+=l*h,i+=l?(l-1)*e.footerSpacing:0;var c=0,f=function(t){a=Math.max(a,n.measureText(t).width+c)};return n.font=j.fontString(u,e._titleFontStyle,e._titleFontFamily),j.each(e.title,f),n.font=j.fontString(d,e._bodyFontStyle,e._bodyFontFamily),j.each(e.beforeBody.concat(e.afterBody),f),c=e.displayColors?d+2:0,j.each(r,function(t){j.each(t.before,f),j.each(t.lines,f),j.each(t.after,f)}),c=0,n.font=j.fontString(h,e._footerFontStyle,e._footerFontFamily),j.each(e.footer,f),{width:a+=2*e.xPadding,height:i}}(this,g),b=function(t,e,n,i){var a=t.x,r=t.y,o=t.caretSize,s=t.caretPadding,l=t.cornerRadius,u=n.xAlign,d=n.yAlign,h=o+s,c=l+s;return"right"===u?a-=e.width:"center"===u&&((a-=e.width/2)+e.width>i.width&&(a=i.width-e.width),a<0&&(a=0)),"top"===d?r+=h:r-="bottom"===d?e.height+h:e.height/2,"center"===d?"left"===u?a+=h:"right"===u&&(a-=h):"left"===u?a-=c:"right"===u&&(a+=c),{x:a,y:r}}(g,x,v=function(t,e){var n,i,a,r,o,s=t._model,l=t._chart,u=t._chart.chartArea,d="center",h="center";s.y<e.height?h="top":s.y>l.height-e.height&&(h="bottom");var c=(u.left+u.right)/2,f=(u.top+u.bottom)/2;"center"===h?(n=function(t){return t<=c},i=function(t){return t>c}):(n=function(t){return t<=e.width/2},i=function(t){return t>=l.width-e.width/2}),a=function(t){return t+e.width+s.caretSize+s.caretPadding>l.width},r=function(t){return t-e.width-s.caretSize-s.caretPadding<0},o=function(t){return t<=f?"top":"bottom"},n(s.x)?(d="left",a(s.x)&&(d="center",h=o(s.y))):i(s.x)&&(d="right",r(s.x)&&(d="center",h=o(s.y)));var g=t._options;return{xAlign:g.xAlign?g.xAlign:d,yAlign:g.yAlign?g.yAlign:h}}(this,x),h._chart)}else g.opacity=0;return g.xAlign=v.xAlign,g.yAlign=v.yAlign,g.x=b.x,g.y=b.y,g.width=x.width,g.height=x.height,g.caretX=y.x,g.caretY=y.y,h._model=g,t&&c.custom&&c.custom.call(h,g),h},drawCaret:function(t,e){var n=this._chart.ctx,i=this._view,a=this.getCaretPosition(t,e,i);n.lineTo(a.x1,a.y1),n.lineTo(a.x2,a.y2),n.lineTo(a.x3,a.y3)},getCaretPosition:function(t,e,n){var i,a,r,o,s,l,u=n.caretSize,d=n.cornerRadius,h=n.xAlign,c=n.yAlign,f=t.x,g=t.y,p=e.width,m=e.height;if("center"===c)s=g+m/2,"left"===h?(a=(i=f)-u,r=i,o=s+u,l=s-u):(a=(i=f+p)+u,r=i,o=s-u,l=s+u);else if("left"===h?(i=(a=f+d+u)-u,r=a+u):"right"===h?(i=(a=f+p-d-u)-u,r=a+u):(i=(a=n.caretX)-u,r=a+u),"top"===c)s=(o=g)-u,l=o;else{s=(o=g+m)+u,l=o;var v=r;r=i,i=v}return{x1:i,x2:a,x3:r,y1:o,y2:s,y3:l}},drawTitle:function(t,e,n){var i,a,r,o=e.title,s=o.length;if(s){var l=ze(e.rtl,e.x,e.width);for(t.x=Ve(e,e._titleAlign),n.textAlign=l.textAlign(e._titleAlign),n.textBaseline="middle",i=e.titleFontSize,a=e.titleSpacing,n.fillStyle=e.titleFontColor,n.font=j.fontString(i,e._titleFontStyle,e._titleFontFamily),r=0;r<s;++r)n.fillText(o[r],l.x(t.x),t.y+i/2),t.y+=i+a,r+1===s&&(t.y+=e.titleMarginBottom-a)}},drawBody:function(t,e,n){var i,a,r,o,s,l,u,d,h=e.bodyFontSize,c=e.bodySpacing,f=e._bodyAlign,g=e.body,p=e.displayColors,m=0,v=p?Ve(e,"left"):0,b=ze(e.rtl,e.x,e.width),x=function(e){n.fillText(e,b.x(t.x+m),t.y+h/2),t.y+=h+c},y=b.textAlign(f);for(n.textAlign=f,n.textBaseline="middle",n.font=j.fontString(h,e._bodyFontStyle,e._bodyFontFamily),t.x=Ve(e,y),n.fillStyle=e.bodyFontColor,j.each(e.beforeBody,x),m=p&&"right"!==y?"center"===f?h/2+1:h+2:0,s=0,u=g.length;s<u;++s){for(i=g[s],a=e.labelTextColors[s],r=e.labelColors[s],n.fillStyle=a,j.each(i.before,x),l=0,d=(o=i.lines).length;l<d;++l){if(p){var _=b.x(v);n.fillStyle=e.legendColorBackground,n.fillRect(b.leftForLtr(_,h),t.y,h,h),n.lineWidth=1,n.strokeStyle=r.borderColor,n.strokeRect(b.leftForLtr(_,h),t.y,h,h),n.fillStyle=r.backgroundColor,n.fillRect(b.leftForLtr(b.xPlus(_,1),h-2),t.y+1,h-2,h-2),n.fillStyle=a}x(o[l])}j.each(i.after,x)}m=0,j.each(e.afterBody,x),t.y-=c},drawFooter:function(t,e,n){var i,a,r=e.footer,o=r.length;if(o){var s=ze(e.rtl,e.x,e.width);for(t.x=Ve(e,e._footerAlign),t.y+=e.footerMarginTop,n.textAlign=s.textAlign(e._footerAlign),n.textBaseline="middle",i=e.footerFontSize,n.fillStyle=e.footerFontColor,n.font=j.fontString(i,e._footerFontStyle,e._footerFontFamily),a=0;a<o;++a)n.fillText(r[a],s.x(t.x),t.y+i/2),t.y+=i+e.footerSpacing}},drawBackground:function(t,e,n,i){n.fillStyle=e.backgroundColor,n.strokeStyle=e.borderColor,n.lineWidth=e.borderWidth;var a=e.xAlign,r=e.yAlign,o=t.x,s=t.y,l=i.width,u=i.height,d=e.cornerRadius;n.beginPath(),n.moveTo(o+d,s),"top"===r&&this.drawCaret(t,i),n.lineTo(o+l-d,s),n.quadraticCurveTo(o+l,s,o+l,s+d),"center"===r&&"right"===a&&this.drawCaret(t,i),n.lineTo(o+l,s+u-d),n.quadraticCurveTo(o+l,s+u,o+l-d,s+u),"bottom"===r&&this.drawCaret(t,i),n.lineTo(o+d,s+u),n.quadraticCurveTo(o,s+u,o,s+u-d),"center"===r&&"left"===a&&this.drawCaret(t,i),n.lineTo(o,s+d),n.quadraticCurveTo(o,s,o+d,s),n.closePath(),n.fill(),e.borderWidth>0&&n.stroke()},draw:function(){var t=this._chart.ctx,e=this._view;if(0!==e.opacity){var n={width:e.width,height:e.height},i={x:e.x,y:e.y},a=Math.abs(e.opacity<.001)?0:e.opacity,r=e.title.length||e.beforeBody.length||e.body.length||e.afterBody.length||e.footer.length;this._options.enabled&&r&&(t.save(),t.globalAlpha=a,this.drawBackground(i,e,t,n),i.y+=e.yPadding,j.rtl.overrideTextDirection(t,e.textDirection),this.drawTitle(i,e,t),this.drawBody(i,e,t),this.drawFooter(i,e,t),j.rtl.restoreTextDirection(t,e.textDirection),t.restore())}},handleEvent:function(t){var e,n=this,i=n._options;return n._lastActive=n._lastActive||[],"mouseout"===t.type?n._active=[]:(n._active=n._chart.getElementsAtEventForMode(t,i.mode,i),i.reverse&&n._active.reverse()),(e=!j.arrayEquals(n._active,n._lastActive))&&(n._lastActive=n._active,(i.enabled||i.custom)&&(n._eventPosition={x:t.x,y:t.y},n.update(!0),n.pivot())),e}}),qe=Ne,Ue=je;Ue.positioners=qe;var Ye=j.valueOrDefault;function Ge(){return j.merge(Object.create(null),[].slice.call(arguments),{merger:function(t,e,n,i){if("xAxes"===t||"yAxes"===t){var a,r,o,s=n[t].length;for(e[t]||(e[t]=[]),a=0;a<s;++a)o=n[t][a],r=Ye(o.type,"xAxes"===t?"category":"linear"),a>=e[t].length&&e[t].push({}),!e[t][a].type||o.type&&o.type!==e[t][a].type?j.merge(e[t][a],[Le.getScaleDefaults(r),o]):j.merge(e[t][a],o)}else j._merger(t,e,n,i)}})}function Xe(){return j.merge(Object.create(null),[].slice.call(arguments),{merger:function(t,e,n,i){var a=e[t]||Object.create(null),r=n[t];
vendor: 4,997 bytes, line 35
35"scales"===t?e[t]=Ge(a,r):"scale"===t?e[t]=j.merge(a,[Le.getScaleDefaults(r.type),r]):j._merger(t,e,n,i)}})}function Ke(t,e,n){var i,a=function(t){return t.id===i};do{i=e+n++}while(j.findIndex(t,a)>=0);return i}function Ze(t){return"top"===t||"bottom"===t}function $e(t,e){return function(n,i){return n[t]===i[t]?n[e]-i[e]:n[t]-i[t]}}B._set("global",{elements:{},events:["mousemove","mouseout","click","touchstart","touchmove"],hover:{onHover:null,mode:"nearest",intersect:!0,animationDuration:400},onClick:null,maintainAspectRatio:!0,responsive:!0,responsiveAnimationDuration:0});var Je=function(t,e){return this.construct(t,e),this};j.extend(Je.prototype,{construct:function(t,e){var n=this;e=function(t){var e=(t=t||Object.create(null)).data=t.data||{};return e.datasets=e.datasets||[],e.labels=e.labels||[],t.options=Xe(B.global,B[t.type],t.options||{}),t}(e);var i=Fe.acquireContext(t,e),a=i&&i.canvas,r=a&&a.height,o=a&&a.width;n.id=j.uid(),n.ctx=i,n.canvas=a,n.config=e,n.width=o,n.height=r,n.aspectRatio=r?o/r:null,n.options=e.options,n._bufferedRender=!1,n._layers=[],n.chart=n,n.controller=n,Je.instances[n.id]=n,Object.defineProperty(n,"data",{get:function(){return n.config.data},set:function(t){n.config.data=t}}),i&&a?(n.initialize(),n.update()):console.error("Failed to create chart: can't acquire context from the given item")},initialize:function(){var t=this;return Oe.notify(t,"beforeInit"),j.retinaScale(t,t.options.devicePixelRatio),t.bindEvents(),t.options.responsive&&t.resize(!0),t.initToolTip(),Oe.notify(t,"afterInit"),t},clear:function(){return j.canvas.clear(this),this},stop:function(){return Q.cancelAnimation(this),this},resize:function(t){var e=this,n=e.options,i=e.canvas,a=n.maintainAspectRatio&&e.aspectRatio||null,r=Math.max(0,Math.floor(j.getMaximumWidth(i))),o=Math.max(0,Math.floor(a?r/a:j.getMaximumHeight(i)));if((e.width!==r||e.height!==o)&&(i.width=e.width=r,i.height=e.height=o,i.style.width=r+"px",i.style.height=o+"px",j.retinaScale(e,n.devicePixelRatio),!t)){var s={width:r,height:o};Oe.notify(e,"resize",[s]),n.onResize&&n.onResize(e,s),e.stop(),e.update({duration:n.responsiveAnimationDuration})}},ensureScalesHaveIDs:function(){var t=this.options,e=t.scales||{},n=t.scale;j.each(e.xAxes,function(t,n){t.id||(t.id=Ke(e.xAxes,"x-axis-",n))}),j.each(e.yAxes,function(t,n){t.id||(t.id=Ke(e.yAxes,"y-axis-",n))}),n&&(n.id=n.id||"scale")},buildOrUpdateScales:function(){var t=this,e=t.options,n=t.scales||{},i=[],a=Object.keys(n).reduce(function(t,e){return t[e]=!1,t},{});e.scales&&(i=i.concat((e.scales.xAxes||[]).map(function(t){return{options:t,dtype:"category",dposition:"bottom"}}),(e.scales.yAxes||[]).map(function(t){return{options:t,dtype:"linear",dposition:"left"}}))),e.scale&&i.push({options:e.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),j.each(i,function(e){var i=e.options,r=i.id,o=Ye(i.type,e.dtype);Ze(i.position)!==Ze(e.dposition)&&(i.position=e.dposition),a[r]=!0;var s=null;if(r in n&&n[r].type===o)(s=n[r]).options=i,s.ctx=t.ctx,s.chart=t;else{var l=Le.getScaleConstructor(o);if(!l)return;s=new l({id:r,type:o,options:i,ctx:t.ctx,chart:t}),n[s.id]=s}s.mergeTicksOptions(),e.isDefault&&(t.scale=s)}),j.each(a,function(t,e){t||delete n[e]}),t.scales=n,Le.addScalesToLayout(this)},buildOrUpdateControllers:function(){var t,e,n=this,i=[],a=n.data.datasets;for(t=0,e=a.length;t<e;t++){var r=a[t],o=n.getDatasetMeta(t),s=r.type||n.config.type;if(o.type&&o.type!==s&&(n.destroyDatasetMeta(t),o=n.getDatasetMeta(t)),o.type=s,o.order=r.order||0,o.index=t,o.controller)o.controller.updateIndex(t),o.controller.linkScales();else{var l=$t[o.type];if(void 0===l)throw new Error('"'+o.type+'" is not a chart type.');o.controller=new l(n,t),i.push(o.controller)}}return i},resetElements:function(){var t=this;j.each(t.data.datasets,function(e,n){t.getDatasetMeta(n).controller.reset()},t)},reset:function(){this.resetElements(),this.tooltip.initialize()},update:function(t){var e,n,i,a,r=this;if(t&&"object"==typeof t||(t={duration:t,lazy:arguments[1]}),a=(i=r).options,j.each(i.scales,function(t){ge.removeBox(i,t)}),a=Xe(B.global,B[i.config.type],a),i.options=i.config.options=a,i.ensureScalesHaveIDs(),i.buildOrUpdateScales(),i.tooltip._options=a.tooltips,i.tooltip.initialize(),Oe._invalidate(r),!1!==Oe.notify(r,"beforeUpdate")){r.tooltip._data=r.data;var o=r.buildOrUpdateControllers();for(e=0,n=r.data.datasets.length;e<n;e++)r.getDatasetMeta(e).controller.buildOrUpdateElements();r.updateLayout(),r.options.animation&&r.options.animation.duration&&j.each(o,function(t){t.reset()}),r.updateDatasets(),r.tooltip.initialize(),r.lastActive=[],Oe.notify(r,"afterUpdate"),r._layers.sort($e("z","_idx")),r._bufferedRender?r._bufferedRequest={duration:t.duration,easing:t.easing,lazy:t.lazy}:r.render(t)}},updateLayout:function(){var t=this;!1!==Oe.notify(t,"beforeLayout")&&(ge.update(this,this.width,this.height),t._layers=[],j.each(t.boxes,function(e){e._configure&&e._configure(),t._layers.push.apply(t._layers,e._layers())}
vendor: 43,728 bytes, line 35
35,t),t._layers.forEach(function(t,e){t._idx=e}),Oe.notify(t,"afterScaleUpdate"),Oe.notify(t,"afterLayout"))},updateDatasets:function(){if(!1!==Oe.notify(this,"beforeDatasetsUpdate")){for(var t=0,e=this.data.datasets.length;t<e;++t)this.updateDataset(t);Oe.notify(this,"afterDatasetsUpdate")}},updateDataset:function(t){var e=this.getDatasetMeta(t),n={meta:e,index:t};!1!==Oe.notify(this,"beforeDatasetUpdate",[n])&&(e.controller._update(),Oe.notify(this,"afterDatasetUpdate",[n]))},render:function(t){var e=this;t&&"object"==typeof t||(t={duration:t,lazy:arguments[1]});var n=e.options.animation,i=Ye(t.duration,n&&n.duration),a=t.lazy;if(!1!==Oe.notify(e,"beforeRender")){var r=function(t){Oe.notify(e,"afterRender"),j.callback(n&&n.onComplete,[t],e)};if(n&&i){var o=new J({numSteps:i/16.66,easing:t.easing||n.easing,render:function(t,e){var n=j.easing.effects[e.easing],i=e.currentStep,a=i/e.numSteps;t.draw(n(a),a,i)},onAnimationProgress:n.onProgress,onAnimationComplete:r});Q.addAnimation(e,o,i,a)}else e.draw(),r(new J({numSteps:0,chart:e}));return e}},draw:function(t){var e,n,i=this;if(i.clear(),j.isNullOrUndef(t)&&(t=1),i.transition(t),!(i.width<=0||i.height<=0)&&!1!==Oe.notify(i,"beforeDraw",[t])){for(n=i._layers,e=0;e<n.length&&n[e].z<=0;++e)n[e].draw(i.chartArea);for(i.drawDatasets(t);e<n.length;++e)n[e].draw(i.chartArea);i._drawTooltip(t),Oe.notify(i,"afterDraw",[t])}},transition:function(t){for(var e=0,n=(this.data.datasets||[]).length;e<n;++e)this.isDatasetVisible(e)&&this.getDatasetMeta(e).controller.transition(t);this.tooltip.transition(t)},_getSortedDatasetMetas:function(t){var e,n,i=[];for(e=0,n=(this.data.datasets||[]).length;e<n;++e)t&&!this.isDatasetVisible(e)||i.push(this.getDatasetMeta(e));return i.sort($e("order","index")),i},_getSortedVisibleDatasetMetas:function(){return this._getSortedDatasetMetas(!0)},drawDatasets:function(t){var e,n;if(!1!==Oe.notify(this,"beforeDatasetsDraw",[t])){for(n=(e=this._getSortedVisibleDatasetMetas()).length-1;n>=0;--n)this.drawDataset(e[n],t);Oe.notify(this,"afterDatasetsDraw",[t])}},drawDataset:function(t,e){var n={meta:t,index:t.index,easingValue:e};!1!==Oe.notify(this,"beforeDatasetDraw",[n])&&(t.controller.draw(e),Oe.notify(this,"afterDatasetDraw",[n]))},_drawTooltip:function(t){var e=this.tooltip,n={tooltip:e,easingValue:t};!1!==Oe.notify(this,"beforeTooltipDraw",[n])&&(e.draw(),Oe.notify(this,"afterTooltipDraw",[n]))},getElementAtEvent:function(t){return ae.modes.single(this,t)},getElementsAtEvent:function(t){return ae.modes.label(this,t,{intersect:!0})},getElementsAtXAxis:function(t){return ae.modes["x-axis"](this,t,{intersect:!0})},getElementsAtEventForMode:function(t,e,n){var i=ae.modes[e];return"function"==typeof i?i(this,t,n):[]},getDatasetAtEvent:function(t){return ae.modes.dataset(this,t,{intersect:!0})},getDatasetMeta:function(t){var e=this.data.datasets[t];e._meta||(e._meta={});var n=e._meta[this.id];return n||(n=e._meta[this.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e.order||0,index:t}),n},getVisibleDatasetCount:function(){for(var t=0,e=0,n=this.data.datasets.length;e<n;++e)this.isDatasetVisible(e)&&t++;return t},isDatasetVisible:function(t){var e=this.getDatasetMeta(t);return"boolean"==typeof e.hidden?!e.hidden:!this.data.datasets[t].hidden},generateLegend:function(){return this.options.legendCallback(this)},destroyDatasetMeta:function(t){var e=this.id,n=this.data.datasets[t],i=n._meta&&n._meta[e];i&&(i.controller.destroy(),delete n._meta[e])},destroy:function(){var t,e,n=this,i=n.canvas;for(n.stop(),t=0,e=n.data.datasets.length;t<e;++t)n.destroyDatasetMeta(t);i&&(n.unbindEvents(),j.canvas.clear(n),Fe.releaseContext(n.ctx),n.canvas=null,n.ctx=null),Oe.notify(n,"destroy"),delete Je.instances[n.id]},toBase64Image:function(){return this.canvas.toDataURL.apply(this.canvas,arguments)},initToolTip:function(){var t=this;t.tooltip=new Ue({_chart:t,_chartInstance:t,_data:t.data,_options:t.options.tooltips},t)},bindEvents:function(){var t=this,e=t._listeners={},n=function(){t.eventHandler.apply(t,arguments)};j.each(t.options.events,function(i){Fe.addEventListener(t,i,n),e[i]=n}),t.options.responsive&&(n=function(){t.resize()},Fe.addEventListener(t,"resize",n),e.resize=n)},unbindEvents:function(){var t=this,e=t._listeners;e&&(delete t._listeners,j.each(e,function(e,n){Fe.removeEventListener(t,n,e)}))},updateHoverStyle:function(t,e,n){var i,a,r,o=n?"set":"remove";for(a=0,r=t.length;a<r;++a)(i=t[a])&&this.getDatasetMeta(i._datasetIndex).controller[o+"HoverStyle"](i);"dataset"===e&&this.getDatasetMeta(t[0]._datasetIndex).controller["_"+o+"DatasetHoverStyle"]()},eventHandler:function(t){var e=this,n=e.tooltip;if(!1!==Oe.notify(e,"beforeEvent",[t])){e._bufferedRender=!0,e._bufferedRequest=null;var i=e.handleEvent(t);n&&(i=n._start?n.handleEvent(t):i|n.handleEvent(t)),Oe.notify(e,"afterEvent",[t]);var a=e._bufferedRequest;return a?e.render(a):i&&!e.animating&&(e.stop(),e.render({duration:e.options.hover.animationDuration,lazy:!0})),e._bufferedRender=!1,e._bufferedRequest=null,e}},handleEvent:function(t){var e,n=this,i=n.options||{},a=i.hover;return n.lastActive=n.lastActive||[],"mouseout"===t.type?n.active=[]:n.active=n.getElementsAtEventForMode(t,a.mode,a),j.callback(i.onHover||i.hover.onHover,[t.native,n.active],n),"mouseup"!==t.type&&"click"!==t.type||i.onClick&&i.onClick.call(n,t.native,n.active),n.lastActive.length&&n.updateHoverStyle(n.lastActive,a.mode,!1),n.active.length&&a.mode&&n.updateHoverStyle(n.active,a.mode,!0),e=!j.arrayEquals(n.active,n.lastActive),n.lastActive=n.active,e}}),Je.instances={};var Qe=Je;Je.Controller=Je,Je.types={},j.configMerge=Xe,j.scaleMerge=Ge;function tn(){throw new Error("This method is not implemented: either no adapter can be found or an incomplete integration was provided.")}function en(t){this.options=t||{}}j.extend(en.prototype,{formats:tn,parse:tn,format:tn,add:tn,diff:tn,startOf:tn,endOf:tn,_create:function(t){return t}}),en.override=function(t){j.extend(en.prototype,t)};var nn={_date:en},an={formatters:{values:function(t){return j.isArray(t)?t:""+t},linear:function(t,e,n){var i=n.length>3?n[2]-n[1]:n[1]-n[0];Math.abs(i)>1&&t!==Math.floor(t)&&(i=t-Math.floor(t));var a=j.log10(Math.abs(i)),r="";if(0!==t)if(Math.max(Math.abs(n[0]),Math.abs(n[n.length-1]))<1e-4){var o=j.log10(Math.abs(t)),s=Math.floor(o)-Math.floor(a);s=Math.max(Math.min(s,20),0),r=t.toExponential(s)}else{var l=-1*Math.floor(a);l=Math.max(Math.min(l,20),0),r=t.toFixed(l)}else r="0";return r},logarithmic:function(t,e,n){var i=t/Math.pow(10,Math.floor(j.log10(t)));return 0===t?"0":1===i||2===i||5===i||0===e||e===n.length-1?t.toExponential():""}}},rn=j.isArray,on=j.isNullOrUndef,sn=j.valueOrDefault,ln=j.valueAtIndexOrDefault;function un(t,e,n){var i,a=t.getTicks().length,r=Math.min(e,a-1),o=t.getPixelForTick(r),s=t._startPixel,l=t._endPixel;if(!(n&&(i=1===a?Math.max(o-s,l-o):0===e?(t.getPixelForTick(1)-o)/2:(o-t.getPixelForTick(r-1))/2,(o+=r<e?i:-i)<s-1e-6||o>l+1e-6)))return o}function dn(t,e,n,i){var a,r,o,s,l,u,d,h,c,f,g,p,m,v=n.length,b=[],x=[],y=[],_=0,k=0;for(a=0;a<v;++a){if(s=n[a].label,l=n[a].major?e.major:e.minor,t.font=u=l.string,d=i[u]=i[u]||{data:{},gc:[]},h=l.lineHeight,c=f=0,on(s)||rn(s)){if(rn(s))for(r=0,o=s.length;r<o;++r)g=s[r],on(g)||rn(g)||(c=j.measureText(t,d.data,d.gc,c,g),f+=h)}else c=j.measureText(t,d.data,d.gc,c,s),f=h;b.push(c),x.push(f),y.push(h/2),_=Math.max(c,_),k=Math.max(f,k)}function w(t){return{width:b[t]||0,height:x[t]||0,offset:y[t]||0}}return function(t,e){j.each(t,function(t){var n,i=t.gc,a=i.length/2;if(a>e){for(n=0;n<a;++n)delete t.data[i[n]];i.splice(0,a)}})}(i,v),p=b.indexOf(_),m=x.indexOf(k),{first:w(0),last:w(v-1),widest:w(p),highest:w(m)}}function hn(t){return t.drawTicks?t.tickMarkLength:0}function cn(t){var e,n;return t.display?(e=j.options._parseFont(t),n=j.options.toPadding(t.padding),e.lineHeight+n.height):0}function fn(t,e){return j.extend(j.options._parseFont({fontFamily:sn(e.fontFamily,t.fontFamily),fontSize:sn(e.fontSize,t.fontSize),fontStyle:sn(e.fontStyle,t.fontStyle),lineHeight:sn(e.lineHeight,t.lineHeight)}),{color:j.options.resolve([e.fontColor,t.fontColor,B.global.defaultFontColor])})}function gn(t){var e=fn(t,t.minor);return{minor:e,major:t.major.enabled?fn(t,t.major):e}}function pn(t){var e,n,i,a=[];for(n=0,i=t.length;n<i;++n)void 0!==(e=t[n])._index&&a.push(e);return a}function mn(t,e,n,i){var a,r,o,s,l=sn(n,0),u=Math.min(sn(i,t.length),t.length),d=0;for(e=Math.ceil(e),i&&(e=(a=i-n)/Math.floor(a/e)),s=l;s<0;)d++,s=Math.round(l+d*e);for(r=Math.max(l,0);r<u;r++)o=t[r],r===s?(o._index=r,d++,s=Math.round(l+d*e)):delete o.label}B._set("scale",{display:!0,position:"left",offset:!1,gridLines:{display:!0,color:"rgba(0,0,0,0.1)",lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickMarkLength:10,zeroLineWidth:1,zeroLineColor:"rgba(0,0,0,0.25)",zeroLineBorderDash:[],zeroLineBorderDashOffset:0,offsetGridLines:!1,borderDash:[],borderDashOffset:0},scaleLabel:{display:!1,labelString:"",padding:{top:4,bottom:4}},ticks:{beginAtZero:!1,minRotation:0,maxRotation:50,mirror:!1,padding:0,reverse:!1,display:!0,autoSkip:!0,autoSkipPadding:0,labelOffset:0,callback:an.formatters.values,minor:{},major:{}}});var vn=Z.extend({zeroLineIndex:0,getPadding:function(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}},getTicks:function(){return this._ticks},_getLabels:function(){var t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]},mergeTicksOptions:function(){},beforeUpdate:function(){j.callback(this.options.beforeUpdate,[this])},update:function(t,e,n){var i,a,r,o,s,l=this,u=l.options.ticks,d=u.sampleSize;if(l.beforeUpdate(),l.maxWidth=t,l.maxHeight=e,l.margins=j.extend({left:0,right:0,top:0,bottom:0},n),l._ticks=null,l.ticks=null,l._labelSizes=null,l._maxLabelLines=0,l.longestLabelWidth=0,l.longestTextCache=l.longestTextCache||{},l._gridLineItems=null,l._labelItems=null,l.beforeSetDimensions(),l.setDimensions(),l.afterSetDimensions(),l.beforeDataLimits(),l.determineDataLimits(),l.afterDataLimits(),l.beforeBuildTicks(),o=l.buildTicks()||[],(!(o=l.afterBuildTicks(o)||o)||!o.length)&&l.ticks)for(o=[],i=0,a=l.ticks.length;i<a;++i)o.push({value:l.ticks[i],major:!1});return l._ticks=o,s=d<o.length,r=l._convertTicksToLabels(s?function(t,e){for(var n=[],i=t.length/e,a=0,r=t.length;a<r;a+=i)n.push(t[Math.floor(a)]);return n}(o,d):o),l._configure(),l.beforeCalculateTickRotation(),l.calculateTickRotation(),l.afterCalculateTickRotation(),l.beforeFit(),l.fit(),l.afterFit(),l._ticksToDraw=u.display&&(u.autoSkip||"auto"===u.source)?l._autoSkip(o):o,s&&(r=l._convertTicksToLabels(l._ticksToDraw)),l.ticks=r,l.afterUpdate(),l.minSize},_configure:function(){var t,e,n=this,i=n.options.ticks.reverse;n.isHorizontal()?(t=n.left,e=n.right):(t=n.top,e=n.bottom,i=!i),n._startPixel=t,n._endPixel=e,n._reversePixels=i,n._length=e-t},afterUpdate:function(){j.callback(this.options.afterUpdate,[this])},beforeSetDimensions:function(){j.callback(this.options.beforeSetDimensions,[this])},setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0},afterSetDimensions:function(){j.callback(this.options.afterSetDimensions,[this])},beforeDataLimits:function(){j.callback(this.options.beforeDataLimits,[this])},determineDataLimits:j.noop,afterDataLimits:function(){j.callback(this.options.afterDataLimits,[this])},beforeBuildTicks:function(){j.callback(this.options.beforeBuildTicks,[this])},buildTicks:j.noop,afterBuildTicks:function(t){var e=this;return rn(t)&&t.length?j.callback(e.options.afterBuildTicks,[e,t]):(e.ticks=j.callback(e.options.afterBuildTicks,[e,e.ticks])||e.ticks,t)},beforeTickToLabelConversion:function(){j.callback(this.options.beforeTickToLabelConversion,[this])},convertTicksToLabels:function(){var t=this.options.ticks;this.ticks=this.ticks.map(t.userCallback||t.callback,this)},afterTickToLabelConversion:function(){j.callback(this.options.afterTickToLabelConversion,[this])},beforeCalculateTickRotation:function(){j.callback(this.options.beforeCalculateTickRotation,[this])},calculateTickRotation:function(){var t,e,n,i,a,r,o,s=this,l=s.options,u=l.ticks,d=s.getTicks().length,h=u.minRotation||0,c=u.maxRotation,f=h;!s._isVisible()||!u.display||h>=c||d<=1||!s.isHorizontal()?s.labelRotation=h:(e=(t=s._getLabelSizes()).widest.width,n=t.highest.height-t.highest.offset,i=Math.min(s.maxWidth,s.chart.width-e),e+6>(a=l.offset?s.maxWidth/d:i/(d-1))&&(a=i/(d-(l.offset?.5:1)),r=s.maxHeight-hn(l.gridLines)-u.padding-cn(l.scaleLabel),o=Math.sqrt(e*e+n*n),f=j.toDegrees(Math.min(Math.asin(Math.min((t.highest.height+6)/a,1)),Math.asin(Math.min(r/o,1))-Math.asin(n/o))),f=Math.max(h,Math.min(c,f))),s.labelRotation=f)},afterCalculateTickRotation:function(){j.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){j.callback(this.options.beforeFit,[this])},fit:function(){var t=this,e=t.minSize={width:0,height:0},n=t.chart,i=t.options,a=i.ticks,r=i.scaleLabel,o=i.gridLines,s=t._isVisible(),l="bottom"===i.position,u=t.isHorizontal();if(u?e.width=t.maxWidth:s&&(e.width=hn(o)+cn(r)),u?s&&(e.height=hn(o)+cn(r)):e.height=t.maxHeight,a.display&&s){var d=gn(a),h=t._getLabelSizes(),c=h.first,f=h.last,g=h.widest,p=h.highest,m=.4*d.minor.lineHeight,v=a.padding;if(u){var b=0!==t.labelRotation,x=j.toRadians(t.labelRotation),y=Math.cos(x),_=Math.sin(x),k=_*g.width+y*(p.height-(b?p.offset:0))+(b?0:m);e.height=Math.min(t.maxHeight,e.height+k+v);var w,M,S=t.getPixelForTick(0)-t.left,C=t.right-t.getPixelForTick(t.getTicks().length-1);b?(w=l?y*c.width+_*c.offset:_*(c.height-c.offset),M=l?_*(f.height-f.offset):y*f.width+_*f.offset):(w=c.width/2,M=f.width/2),t.paddingLeft=Math.max((w-S)*t.width/(t.width-S),0)+3,t.paddingRight=Math.max((M-C)*t.width/(t.width-C),0)+3}else{var P=a.mirror?0:g.width+v+m;e.width=Math.min(t.maxWidth,e.width+P),t.paddingTop=c.height/2,t.paddingBottom=f.height/2}}t.handleMargins(),u?(t.width=t._length=n.width-t.margins.left-t.margins.right,t.height=e.height):(t.width=e.width,t.height=t._length=n.height-t.margins.top-t.margins.bottom)},handleMargins:function(){var t=this;t.margins&&(t.margins.left=Math.max(t.paddingLeft,t.margins.left),t.margins.top=Math.max(t.paddingTop,t.margins.top),t.margins.right=Math.max(t.paddingRight,t.margins.right),t.margins.bottom=Math.max(t.paddingBottom,t.margins.bottom))},afterFit:function(){j.callback(this.options.afterFit,[this])},isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},isFullWidth:function(){return this.options.fullWidth},getRightValue:function(t){if(on(t))return NaN;if(("number"==typeof t||t instanceof Number)&&!isFinite(t))return NaN;if(t)if(this.isHorizontal()){if(void 0!==t.x)return this.getRightValue(t.x)}else if(void 0!==t.y)return this.getRightValue(t.y);return t},_convertTicksToLabels:function(t){var e,n,i,a=this;for(a.ticks=t.map(function(t){return t.value}),a.beforeTickToLabelConversion(),e=a.convertTicksToLabels(t)||a.ticks,a.afterTickToLabelConversion(),n=0,i=t.length;n<i;++n)t[n].label=e[n];return e},_getLabelSizes:function(){var t=this,e=t._labelSizes;return e||(t._labelSizes=e=dn(t.ctx,gn(t.options.ticks),t.getTicks(),t.longestTextCache),t.longestLabelWidth=e.widest.width),e},_parseValue:function(t){var e,n,i,a;return rn(t)?(e=+this.getRightValue(t[0]),n=+this.getRightValue(t[1]),i=Math.min(e,n),a=Math.max(e,n)):(e=void 0,n=t=+this.getRightValue(t),i=t,a=t),{min:i,max:a,start:e,end:n}},_getScaleLabel:function(t){var e=this._parseValue(t);return void 0!==e.start?"["+e.start+", "+e.end+"]":+this.getRightValue(t)},getLabelForIndex:j.noop,getPixelForValue:j.noop,getValueForPixel:j.noop,getPixelForTick:function(t){var e=this.options.offset,n=this._ticks.length,i=1/Math.max(n-(e?0:1),1);return t<0||t>n-1?null:this.getPixelForDecimal(t*i+(e?i/2:0))},getPixelForDecimal:function(t){return this._reversePixels&&(t=1-t),this._startPixel+t*this._length},getDecimalForPixel:function(t){var e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e},getBasePixel:function(){return this.getPixelForValue(this.getBaseValue())},getBaseValue:function(){var t=this.min,e=this.max;return this.beginAtZero?0:t<0&&e<0?e:t>0&&e>0?t:0},_autoSkip:function(t){var e,n,i,a,r=this.options.ticks,o=this._length,s=r.maxTicksLimit||o/this._tickSize()+1,l=r.major.enabled?function(t){var e,n,i=[];for(e=0,n=t.length;e<n;e++)t[e].major&&i.push(e);return i}(t):[],u=l.length,d=l[0],h=l[u-1];if(u>s)return function(t,e,n){var i,a,r=0,o=e[0];for(n=Math.ceil(n),i=0;i<t.length;i++)a=t[i],i===o?(a._index=i,o=e[++r*n]):delete a.label}(t,l,u/s),pn(t);if(i=function(t,e,n,i){var a,r,o,s,l=function(t){var e,n,i=t.length;if(i<2)return!1;for(n=t[0],e=1;e<i;++e)if(t[e]-t[e-1]!==n)return!1;return n}(t),u=(e.length-1)/i;if(!l)return Math.max(u,1);for(o=0,s=(a=j.math._factorize(l)).length-1;o<s;o++)if((r=a[o])>u)return r;return Math.max(u,1)}(l,t,0,s),u>0){for(e=0,n=u-1;e<n;e++)mn(t,i,l[e],l[e+1]);return a=u>1?(h-d)/(u-1):null,mn(t,i,j.isNullOrUndef(a)?0:d-a,d),mn(t,i,h,j.isNullOrUndef(a)?t.length:h+a),pn(t)}return mn(t,i),pn(t)},_tickSize:function(){var t=this.options.ticks,e=j.toRadians(this.labelRotation),n=Math.abs(Math.cos(e)),i=Math.abs(Math.sin(e)),a=this._getLabelSizes(),r=t.autoSkipPadding||0,o=a?a.widest.width+r:0,s=a?a.highest.height+r:0;return this.isHorizontal()?s*n>o*i?o/n:s/i:s*i<o*n?s/n:o/i},_isVisible:function(){var t,e,n,i=this.chart,a=this.options.display;if("auto"!==a)return!!a;for(t=0,e=i.data.datasets.length;t<e;++t)if(i.isDatasetVisible(t)&&((n=i.getDatasetMeta(t)).xAxisID===this.id||n.yAxisID===this.id))return!0;return!1},_computeGridLineItems:function(t){var e,n,i,a,r,o,s,l,u,d,h,c,f,g,p,m,v,b=this,x=b.chart,y=b.options,_=y.gridLines,k=y.position,w=_.offsetGridLines,M=b.isHorizontal(),S=b._ticksToDraw,C=S.length+(w?1:0),P=hn(_),A=[],D=_.drawBorder?ln(_.lineWidth,0,0):0,T=D/2,I=j._alignPixel,F=function(t){return I(x,t,D)};for("top"===k?(e=F(b.bottom),s=b.bottom-P,u=e-T,h=F(t.top)+T,f=t.bottom):"bottom"===k?(e=F(b.top),h=t.top,f=F(t.bottom)-T,s=e+T,u=b.top+P):"left"===k?(e=F(b.right),o=b.right-P,l=e-T,d=F(t.left)+T,c=t.right):(e=F(b.left),d=t.left,c=F(t.right)-T,o=e+T,l=b.left+P),n=0;n<C;++n)i=S[n]||{},on(i.label)&&n<S.length||(n===b.zeroLineIndex&&y.offset===w?(g=_.zeroLineWidth,p=_.zeroLineColor,m=_.zeroLineBorderDash||[],v=_.zeroLineBorderDashOffset||0):(g=ln(_.lineWidth,n,1),p=ln(_.color,n,"rgba(0,0,0,0.1)"),m=_.borderDash||[],v=_.borderDashOffset||0),void 0!==(a=un(b,i._index||n,w))&&(r=I(x,a,g),M?o=l=d=c=r:s=u=h=f=r,A.push({tx1:o,ty1:s,tx2:l,ty2:u,x1:d,y1:h,x2:c,y2:f,width:g,color:p,borderDash:m,borderDashOffset:v})));return A.ticksLength=C,A.borderValue=e,A},_computeLabelItems:function(){var t,e,n,i,a,r,o,s,l,u,d,h,c=this,f=c.options,g=f.ticks,p=f.position,m=g.mirror,v=c.isHorizontal(),b=c._ticksToDraw,x=gn(g),y=g.padding,_=hn(f.gridLines),k=-j.toRadians(c.labelRotation),w=[];for("top"===p?(r=c.bottom-_-y,o=k?"left":"center"):"bottom"===p?(r=c.top+_+y,o=k?"right":"center"):"left"===p?(a=c.right-(m?0:_)-y,o=m?"left":"right"):(a=c.left+(m?0:_)+y,o=m?"right":"left"),t=0,e=b.length;t<e;++t)i=(n=b[t]).label,on(i)||(s=c.getPixelForTick(n._index||t)+g.labelOffset,u=(l=n.major?x.major:x.minor).lineHeight,d=rn(i)?i.length:1,v?(a=s,h="top"===p?((k?1:.5)-d)*u:(k?0:.5)*u):(r=s,h=(1-d)*u/2),w.push({x:a,y:r,rotation:k,label:i,font:l,textOffset:h,textAlign:o}));return w},_drawGrid:function(t){var e=this,n=e.options.gridLines;if(n.display){var i,a,r,o,s,l=e.ctx,u=e.chart,d=j._alignPixel,h=n.drawBorder?ln(n.lineWidth,0,0):0,c=e._gridLineItems||(e._gridLineItems=e._computeGridLineItems(t));for(r=0,o=c.length;r<o;++r)i=(s=c[r]).width,a=s.color,i&&a&&(l.save(),l.lineWidth=i,l.strokeStyle=a,l.setLineDash&&(l.setLineDash(s.borderDash),l.lineDashOffset=s.borderDashOffset),l.beginPath(),n.drawTicks&&(l.moveTo(s.tx1,s.ty1),l.lineTo(s.tx2,s.ty2)),n.drawOnChartArea&&(l.moveTo(s.x1,s.y1),l.lineTo(s.x2,s.y2)),l.stroke(),l.restore());if(h){var f,g,p,m,v=h,b=ln(n.lineWidth,c.ticksLength-1,1),x=c.borderValue;e.isHorizontal()?(f=d(u,e.left,v)-v/2,g=d(u,e.right,b)+b/2,p=m=x):(p=d(u,e.top,v)-v/2,m=d(u,e.bottom,b)+b/2,f=g=x),l.lineWidth=h,l.strokeStyle=ln(n.color,0),l.beginPath(),l.moveTo(f,p),l.lineTo(g,m),l.stroke()}}},_drawLabels:function(){var t=this;if(t.options.ticks.display){var e,n,i,a,r,o,s,l,u=t.ctx,d=t._labelItems||(t._labelItems=t._computeLabelItems());for(e=0,i=d.length;e<i;++e){if(o=(r=d[e]).font,u.save(),u.translate(r.x,r.y),u.rotate(r.rotation),u.font=o.string,u.fillStyle=o.color,u.textBaseline="middle",u.textAlign=r.textAlign,s=r.label,l=r.textOffset,rn(s))for(n=0,a=s.length;n<a;++n)u.fillText(""+s[n],0,l),l+=o.lineHeight;else u.fillText(s,0,l);u.restore()}}},_drawTitle:function(){var t=this,e=t.ctx,n=t.options,i=n.scaleLabel;if(i.display){var a,r,o=sn(i.fontColor,B.global.defaultFontColor),s=j.options._parseFont(i),l=j.options.toPadding(i.padding),u=s.lineHeight/2,d=n.position,h=0;if(t.isHorizontal())a=t.left+t.width/2,r="bottom"===d?t.bottom-u-l.bottom:t.top+u+l.top;else{var c="left"===d;a=c?t.left+u+l.top:t.right-u-l.top,r=t.top+t.height/2,h=c?-.5*Math.PI:.5*Math.PI}e.save(),e.translate(a,r),e.rotate(h),e.textAlign="center",e.textBaseline="middle",e.fillStyle=o,e.font=s.string,e.fillText(i.labelString,0,0),e.restore()}},draw:function(t){this._isVisible()&&(this._drawGrid(t),this._drawTitle(),this._drawLabels())},_layers:function(){var t=this,e=t.options,n=e.ticks&&e.ticks.z||0,i=e.gridLines&&e.gridLines.z||0;return t._isVisible()&&n!==i&&t.draw===t._draw?[{z:i,draw:function(){t._drawGrid.apply(t,arguments),t._drawTitle.apply(t,arguments)}},{z:n,draw:function(){t._drawLabels.apply(t,arguments)}}]:[{z:n,draw:function(){t.draw.apply(t,arguments)}}]},_getMatchingVisibleMetas:function(t){var e=this,n=e.isHorizontal();return e.chart._getSortedVisibleDatasetMetas().filter(function(i){return(!t||i.type===t)&&(n?i.xAxisID===e.id:i.yAxisID===e.id)})}});vn.prototype._draw=vn.prototype.draw;var bn=vn,xn=j.isNullOrUndef,yn=bn.extend({determineDataLimits:function(){var t,e=this,n=e._getLabels(),i=e.options.ticks,a=i.min,r=i.max,o=0,s=n.length-1;void 0!==a&&(t=n.indexOf(a))>=0&&(o=t),void 0!==r&&(t=n.indexOf(r))>=0&&(s=t),e.minIndex=o,e.maxIndex=s,e.min=n[o],e.max=n[s]},buildTicks:function(){var t=this._getLabels(),e=this.minIndex,n=this.maxIndex;this.ticks=0===e&&n===t.length-1?t:t.slice(e,n+1)},getLabelForIndex:function(t,e){var n=this.chart;return n.getDatasetMeta(e).controller._getValueScaleId()===this.id?this.getRightValue(n.data.datasets[e].data[t]):this._getLabels()[t]},_configure:function(){var t=this,e=t.options.offset,n=t.ticks;bn.prototype._configure.call(t),t.isHorizontal()||(t._reversePixels=!t._reversePixels),n&&(t._startValue=t.minIndex-(e?.5:0),t._valueRange=Math.max(n.length-(e?0:1),1))},getPixelForValue:function(t,e,n){var i,a,r,o=this;return xn(e)||xn(n)||(t=o.chart.data.datasets[n].data[e]),xn(t)||(i=o.isHorizontal()?t.x:t.y),(void 0!==i||void 0!==t&&isNaN(e))&&(a=o._getLabels(),t=j.valueOrDefault(i,t),e=-1!==(r=a.indexOf(t))?r:e,isNaN(e)&&(e=t)),o.getPixelForDecimal((e-o._startValue)/o._valueRange)},getPixelForTick:function(t){var e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t],t+this.minIndex)},getValueForPixel:function(t){var e=Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange);return Math.min(Math.max(e,0),this.ticks.length-1)},getBasePixel:function(){return this.bottom}}),_n={position:"bottom"};yn._defaults=_n;var kn=j.noop,wn=j.isNullOrUndef;var Mn=bn.extend({getRightValue:function(t){return"string"==typeof t?+t:bn.prototype.getRightValue.call(this,t)},handleTickRangeOptions:function(){var t=this,e=t.options.ticks;if(e.beginAtZero){var n=j.sign(t.min),i=j.sign(t.max);n<0&&i<0?t.max=0:n>0&&i>0&&(t.min=0)}var a=void 0!==e.min||void 0!==e.suggestedMin,r=void 0!==e.max||void 0!==e.suggestedMax;void 0!==e.min?t.min=e.min:void 0!==e.suggestedMin&&(null===t.min?t.min=e.suggestedMin:t.min=Math.min(t.min,e.suggestedMin)),void 0!==e.max?t.max=e.max:void 0!==e.suggestedMax&&(null===t.max?t.max=e.suggestedMax:t.max=Math.max(t.max,e.suggestedMax)),a!==r&&t.min>=t.max&&(a?t.max=t.min+1:t.min=t.max-1),t.min===t.max&&(t.max++,e.beginAtZero||t.min--)},getTickLimit:function(){var t,e=this.options.ticks,n=e.stepSize,i=e.maxTicksLimit;return n?t=Math.ceil(this.max/n)-Math.floor(this.min/n)+1:(t=this._computeTickLimit(),i=i||11),i&&(t=Math.min(i,t)),t},_computeTickLimit:function(){return Number.POSITIVE_INFINITY},handleDirectionalChanges:kn,buildTicks:function(){var t=this,e=t.options.ticks,n=t.getTickLimit(),i={maxTicks:n=Math.max(2,n),min:e.min,max:e.max,precision:e.precision,stepSize:j.valueOrDefault(e.fixedStepSize,e.stepSize)},a=t.ticks=function(t,e){var n,i,a,r,o=[],s=t.stepSize,l=s||1,u=t.maxTicks-1,d=t.min,h=t.max,c=t.precision,f=e.min,g=e.max,p=j.niceNum((g-f)/u/l)*l;if(p<1e-14&&wn(d)&&wn(h))return[f,g];(r=Math.ceil(g/p)-Math.floor(f/p))>u&&(p=j.niceNum(r*p/u/l)*l),s||wn(c)?n=Math.pow(10,j._decimalPlaces(p)):(n=Math.pow(10,c),p=Math.ceil(p*n)/n),i=Math.floor(f/p)*p,a=Math.ceil(g/p)*p,s&&(!wn(d)&&j.almostWhole(d/p,p/1e3)&&(i=d),!wn(h)&&j.almostWhole(h/p,p/1e3)&&(a=h)),r=(a-i)/p,r=j.almostEquals(r,Math.round(r),p/1e3)?Math.round(r):Math.ceil(r),i=Math.round(i*n)/n,a=Math.round(a*n)/n,o.push(wn(d)?i:d);for(var m=1;m<r;++m)o.push(Math.round((i+m*p)*n)/n);return o.push(wn(h)?a:h),o}(i,t);t.handleDirectionalChanges(),t.max=j.max(a),t.min=j.min(a),e.reverse?(a.reverse(),t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max)},convertTicksToLabels:function(){var t=this;t.ticksAsNumbers=t.ticks.slice(),t.zeroLineIndex=t.ticks.indexOf(0),bn.prototype.convertTicksToLabels.call(t)},_configure:function(){var t,e=this,n=e.getTicks(),i=e.min,a=e.max;bn.prototype._configure.call(e),e.options.offset&&n.length&&(i-=t=(a-i)/Math.max(n.length-1,1)/2,a+=t),e._startValue=i,e._endValue=a,e._valueRange=a-i}}),Sn={position:"left",ticks:{callback:an.formatters.linear}};function Cn(t,e,n,i){var a,r,o=t.options,s=function(t,e,n){var i=[n.type,void 0===e&&void 0===n.stack?n.index:"",n.stack].join(".");return void 0===t[i]&&(t[i]={pos:[],neg:[]}),t[i]}(e,o.stacked,n),l=s.pos,u=s.neg,d=i.length;for(a=0;a<d;++a)r=t._parseValue(i[a]),isNaN(r.min)||isNaN(r.max)||n.data[a].hidden||(l[a]=l[a]||0,u[a]=u[a]||0,o.relativePoints?l[a]=100:r.min<0||r.max<0?u[a]+=r.min:l[a]+=r.max)}function Pn(t,e,n){var i,a,r=n.length;for(i=0;i<r;++i)a=t._parseValue(n[i]),isNaN(a.min)||isNaN(a.max)||e.data[i].hidden||(t.min=Math.min(t.min,a.min),t.max=Math.max(t.max,a.max))}var An=Mn.extend({determineDataLimits:function(){var t,e,n,i,a=this,r=a.options,o=a.chart.data.datasets,s=a._getMatchingVisibleMetas(),l=r.stacked,u={},d=s.length;if(a.min=Number.POSITIVE_INFINITY,a.max=Number.NEGATIVE_INFINITY,void 0===l)for(t=0;!l&&t<d;++t)l=void 0!==(e=s[t]).stack;for(t=0;t<d;++t)n=o[(e=s[t]).index].data,l?Cn(a,u,e,n):Pn(a,e,n);j.each(u,function(t){i=t.pos.concat(t.neg),a.min=Math.min(a.min,j.min(i)),a.max=Math.max(a.max,j.max(i))}),a.min=j.isFinite(a.min)&&!isNaN(a.min)?a.min:0,a.max=j.isFinite(a.max)&&!isNaN(a.max)?a.max:1,a.handleTickRangeOptions()},_computeTickLimit:function(){var t;return this.isHorizontal()?Math.ceil(this.width/40):(t=j.options._parseFont(this.options.ticks),Math.ceil(this.height/t.lineHeight))},handleDirectionalChanges:function(){this.isHorizontal()||this.ticks.reverse()},getLabelForIndex:function(t,e){return this._getScaleLabel(this.chart.data.datasets[e].data[t])},getPixelForValue:function(t){return this.getPixelForDecimal((+this.getRightValue(t)-this._startValue)/this._valueRange)},getValueForPixel:function(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange},getPixelForTick:function(t){var e=this.ticksAsNumbers;return t<0||t>e.length-1?null:this.getPixelForValue(e[t])}}),Dn=Sn;An._defaults=Dn;var Tn=j.valueOrDefault,In=j.math.log10;var Fn={position:"left",ticks:{callback:an.formatters.logarithmic}};function On(t,e){return j.isFinite(t)&&t>=0?t:e}var Ln=bn.extend({determineDataLimits:function(){var t,e,n,i,a,r,o=this,s=o.options,l=o.chart,u=l.data.datasets,d=o.isHorizontal();function h(t){return d?t.xAxisID===o.id:t.yAxisID===o.id}o.min=Number.POSITIVE_INFINITY,o.max=Number.NEGATIVE_INFINITY,o.minNotZero=Number.POSITIVE_INFINITY;var c=s.stacked;if(void 0===c)for(t=0;t<u.length;t++)if(e=l.getDatasetMeta(t),l.isDatasetVisible(t)&&h(e)&&void 0!==e.stack){c=!0;break}if(s.stacked||c){var f={};for(t=0;t<u.length;t++){var g=[(e=l.getDatasetMeta(t)).type,void 0===s.stacked&&void 0===e.stack?t:"",e.stack].join(".");if(l.isDatasetVisible(t)&&h(e))for(void 0===f[g]&&(f[g]=[]),a=0,r=(i=u[t].data).length;a<r;a++){var p=f[g];n=o._parseValue(i[a]),isNaN(n.min)||isNaN(n.max)||e.data[a].hidden||n.min<0||n.max<0||(p[a]=p[a]||0,p[a]+=n.max)}}j.each(f,function(t){if(t.length>0){var e=j.min(t),n=j.max(t);o.min=Math.min(o.min,e),o.max=Math.max(o.max,n)}})}else for(t=0;t<u.length;t++)if(e=l.getDatasetMeta(t),l.isDatasetVisible(t)&&h(e))for(a=0,r=(i=u[t].data).length;a<r;a++)n=o._parseValue(i[a]),isNaN(n.min)||isNaN(n.max)||e.data[a].hidden||n.min<0||n.max<0||(o.min=Math.min(n.min,o.min),o.max=Math.max(n.max,o.max),0!==n.min&&(o.minNotZero=Math.min(n.min,o.minNotZero)));o.min=j.isFinite(o.min)?o.min:null,o.max=j.isFinite(o.max)?o.max:null,o.minNotZero=j.isFinite(o.minNotZero)?o.minNotZero:null,this.handleTickRangeOptions()},handleTickRangeOptions:function(){var t=this,e=t.options.ticks;t.min=On(e.min,t.min),t.max=On(e.max,t.max),t.min===t.max&&(0!==t.min&&null!==t.min?(t.min=Math.pow(10,Math.floor(In(t.min))-1),t.max=Math.pow(10,Math.floor(In(t.max))+1)):(t.min=1,t.max=10)),null===t.min&&(t.min=Math.pow(10,Math.floor(In(t.max))-1)),null===t.max&&(t.max=0!==t.min?Math.pow(10,Math.floor(In(t.min))+1):10),null===t.minNotZero&&(t.min>0?t.minNotZero=t.min:t.max<1?t.minNotZero=Math.pow(10,Math.floor(In(t.max))):t.minNotZero=1)},buildTicks:function(){var t=this,e=t.options.ticks,n=!t.isHorizontal(),i={min:On(e.min),max:On(e.max)},a=t.ticks=function(t,e){var n,i,a=[],r=Tn(t.min,Math.pow(10,Math.floor(In(e.min)))),o=Math.floor(In(e.max)),s=Math.ceil(e.max/Math.pow(10,o));0===r?(n=Math.floor(In(e.minNotZero)),i=Math.floor(e.minNotZero/Math.pow(10,n)),a.push(r),r=i*Math.pow(10,n)):(n=Math.floor(In(r)),i=Math.floor(r/Math.pow(10,n)));var l=n<0?Math.pow(10,Math.abs(n)):1;do{a.push(r),10==++i&&(i=1,l=++n>=0?1:l),r=Math.round(i*Math.pow(10,n)*l)/l}while(n<o||n===o&&i<s);var u=Tn(t.max,r);return a.push(u),a}(i,t);t.max=j.max(a),t.min=j.min(a),e.reverse?(n=!n,t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max),n&&a.reverse()},convertTicksToLabels:function(){this.tickValues=this.ticks.slice(),bn.prototype.convertTicksToLabels.call(this)},getLabelForIndex:function(t,e){return this._getScaleLabel(this.chart.data.datasets[e].data[t])},getPixelForTick:function(t){var e=this.tickValues;return t<0||t>e.length-1?null:this.getPixelForValue(e[t])},_getFirstTickValue:function(t){var e=Math.floor(In(t));return Math.floor(t/Math.pow(10,e))*Math.pow(10,e)},_configure:function(){var t=this,e=t.min,n=0;bn.prototype._configure.call(t),0===e&&(e=t._getFirstTickValue(t.minNotZero),n=Tn(t.options.ticks.fontSize,B.global.defaultFontSize)/t._length),t._startValue=In(e),t._valueOffset=n,t._valueRange=(In(t.max)-In(e))/(1-n)},getPixelForValue:function(t){var e=this,n=0;return(t=+e.getRightValue(t))>e.min&&t>0&&(n=(In(t)-e._startValue)/e._valueRange+e._valueOffset),e.getPixelForDecimal(n)},getValueForPixel:function(t){var e=this,n=e.getDecimalForPixel(t);return 0===n&&0===e.min?0:Math.pow(10,e._startValue+(n-e._valueOffset)*e._valueRange)}}),Rn=Fn;Ln._defaults=Rn;var zn=j.valueOrDefault,Nn=j.valueAtIndexOrDefault,Bn=j.options.resolve,En={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,color:"rgba(0,0,0,0.1)",lineWidth:1,borderDash:[],borderDashOffset:0},gridLines:{circular:!1},ticks:{showLabelBackdrop:!0,backdropColor:"rgba(255,255,255,0.75)",backdropPaddingY:2,backdropPaddingX:2,callback:an.formatters.linear},pointLabels:{display:!0,fontSize:10,callback:function(t){return t}}};function Wn(t){var e=t.ticks;return e.display&&t.display?zn(e.fontSize,B.global.defaultFontSize)+2*e.backdropPaddingY:0}function Vn(t,e,n,i,a){return t===i||t===a?{start:e-n/2,end:e+n/2}:t<i||t>a?{start:e-n,end:e}:{start:e,end:e+n}}function Hn(t){return 0===t||180===t?"center":t<180?"left":"right"}function jn(t,e,n,i){var a,r,o=n.y+i/2;if(j.isArray(e))for(a=0,r=e.length;a<r;++a)t.fillText(e[a],n.x,o),o+=i;else t.fillText(e,n.x,o)}function qn(t,e,n){90===t||270===t?n.y-=e.h/2:(t>270||t<90)&&(n.y-=e.h)}function Un(t){return j.isNumber(t)?t:0}var Yn=Mn.extend({setDimensions:function(){var t=this;t.width=t.maxWidth,t.height=t.maxHeight,t.paddingTop=Wn(t.options)/2,t.xCenter=Math.floor(t.width/2),t.yCenter=Math.floor((t.height-t.paddingTop)/2),t.drawingArea=Math.min(t.height-t.paddingTop,t.width)/2},determineDataLimits:function(){var t=this,e=t.chart,n=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;j.each(e.data.datasets,function(a,r){if(e.isDatasetVisible(r)){var o=e.getDatasetMeta(r);j.each(a.data,function(e,a){var r=+t.getRightValue(e);isNaN(r)||o.data[a].hidden||(n=Math.min(r,n),i=Math.max(r,i))})}}),t.min=n===Number.POSITIVE_INFINITY?0:n,t.max=i===Number.NEGATIVE_INFINITY?0:i,t.handleTickRangeOptions()},_computeTickLimit:function(){return Math.ceil(this.drawingArea/Wn(this.options))},convertTicksToLabels:function(){var t=this;Mn.prototype.convertTicksToLabels.call(t),t.pointLabels=t.chart.data.labels.map(function(){var e=j.callback(t.options.pointLabels.callback,arguments,t);return e||0===e?e:""})},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},fit:function(){var t=this.options;t.display&&t.pointLabels.display?function(t){var e,n,i,a=j.options._parseFont(t.options.pointLabels),r={l:0,r:t.width,t:0,b:t.height-t.paddingTop},o={};t.ctx.font=a.string,t._pointLabelSizes=[];var s,l,u,d=t.chart.data.labels.length;for(e=0;e<d;e++){i=t.getPointPosition(e,t.drawingArea+5),s=t.ctx,l=a.lineHeight,u=t.pointLabels[e],n=j.isArray(u)?{w:j.longestText(s,s.font,u),h:u.length*l}:{w:s.measureText(u).width,h:l},t._pointLabelSizes[e]=n;var h=t.getIndexAngle(e),c=j.toDegrees(h)%360,f=Vn(c,i.x,n.w,0,180),g=Vn(c,i.y,n.h,90,270);f.start<r.l&&(r.l=f.start,o.l=h),f.end>r.r&&(r.r=f.end,o.r=h),g.start<r.t&&(r.t=g.start,o.t=h),g.end>r.b&&(r.b=g.end,o.b=h)}t.setReductions(t.drawingArea,r,o)}(this):this.setCenterPoint(0,0,0,0)},setReductions:function(t,e,n){var i=this,a=e.l/Math.sin(n.l),r=Math.max(e.r-i.width,0)/Math.sin(n.r),o=-e.t/Math.cos(n.t),s=-Math.max(e.b-(i.height-i.paddingTop),0)/Math.cos(n.b);a=Un(a),r=Un(r),o=Un(o),s=Un(s),i.drawingArea=Math.min(Math.floor(t-(a+r)/2),Math.floor(t-(o+s)/2)),i.setCenterPoint(a,r,o,s)},setCenterPoint:function(t,e,n,i){var a=this,r=a.width-e-a.drawingArea,o=t+a.drawingArea,s=n+a.drawingArea,l=a.height-a.paddingTop-i-a.drawingArea;a.xCenter=Math.floor((o+r)/2+a.left),a.yCenter=Math.floor((s+l)/2+a.top+a.paddingTop)},getIndexAngle:function(t){var e=this.chart,n=(t*(360/e.data.labels.length)+((e.options||{}).startAngle||0))%360;return(n<0?n+360:n)*Math.PI*2/360},getDistanceFromCenterForValue:function(t){var e=this;if(j.isNullOrUndef(t))return NaN;var n=e.drawingArea/(e.max-e.min);return e.options.ticks.reverse?(e.max-t)*n:(t-e.min)*n},getPointPosition:function(t,e){var n=this.getIndexAngle(t)-Math.PI/2;return{x:Math.cos(n)*e+this.xCenter,y:Math.sin(n)*e+this.yCenter}},getPointPositionForValue:function(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))},getBasePosition:function(t){var e=this.min,n=this.max;return this.getPointPositionForValue(t||0,this.beginAtZero?0:e<0&&n<0?n:e>0&&n>0?e:0)},_drawGrid:function(){var t,e,n,i=this,a=i.ctx,r=i.options,o=r.gridLines,s=r.angleLines,l=zn(s.lineWidth,o.lineWidth),u=zn(s.color,o.color);if(r.pointLabels.display&&function(t){var e=t.ctx,n=t.options,i=n.pointLabels,a=Wn(n),r=t.getDistanceFromCenterForValue(n.ticks.reverse?t.min:t.max),o=j.options._parseFont(i);e.save(),e.font=o.string,e.textBaseline="middle";for(var s=t.chart.data.labels.length-1;s>=0;s--){var l=0===s?a/2:0,u=t.getPointPosition(s,r+l+5),d=Nn(i.fontColor,s,B.global.defaultFontColor);e.fillStyle=d;var h=t.getIndexAngle(s),c=j.toDegrees(h);e.textAlign=Hn(c),qn(c,t._pointLabelSizes[s],u),jn(e,t.pointLabels[s],u,o.lineHeight)}e.restore()}(i),o.display&&j.each(i.ticks,function(t,n){0!==n&&(e=i.getDistanceFromCenterForValue(i.ticksAsNumbers[n]),function(t,e,n,i){var a,r=t.ctx,o=e.circular,s=t.chart.data.labels.length,l=Nn(e.color,i-1),u=Nn(e.lineWidth,i-1);if((o||s)&&l&&u){if(r.save(),r.strokeStyle=l,r.lineWidth=u,r.setLineDash&&(r.setLineDash(e.borderDash||[]),r.lineDashOffset=e.borderDashOffset||0),r.beginPath(),o)r.arc(t.xCenter,t.yCenter,n,0,2*Math.PI);else{a=t.getPointPosition(0,n),r.moveTo(a.x,a.y);for(var d=1;d<s;d++)a=t.getPointPosition(d,n),r.lineTo(a.x,a.y)}r.closePath(),r.stroke(),r.restore()}}(i,o,e,n))}),s.display&&l&&u){for(a.save(),a.lineWidth=l,a.strokeStyle=u,a.setLineDash&&(a.setLineDash(Bn([s.borderDash,o.borderDash,[]])),a.lineDashOffset=Bn([s.borderDashOffset,o.borderDashOffset,0])),t=i.chart.data.labels.length-1;t>=0;t--)e=i.getDistanceFromCenterForValue(r.ticks.reverse?i.min:i.max),n=i.getPointPosition(t,e),a.beginPath(),a.moveTo(i.xCenter,i.yCenter),a.lineTo(n.x,n.y),a.stroke();a.restore()}},_drawLabels:function(){var t=this,e=t.ctx,n=t.options.ticks;if(n.display){var i,a,r=t.getIndexAngle(0),o=j.options._parseFont(n),s=zn(n.fontColor,B.global.defaultFontColor);e.save(),e.font=o.string,e.translate(t.xCenter,t.yCenter),e.rotate(r),e.textAlign="center",e.textBaseline="middle",j.each(t.ticks,function(r,l){(0!==l||n.reverse)&&(i=t.getDistanceFromCenterForValue(t.ticksAsNumbers[l]),n.showLabelBackdrop&&(a=e.measureText(r).width,e.fillStyle=n.backdropColor,e.fillRect(-a/2-n.backdropPaddingX,-i-o.size/2-n.backdropPaddingY,a+2*n.backdropPaddingX,o.size+2*n.backdropPaddingY)),e.fillStyle=s,e.fillText(r,0,-i))}),e.restore()}},_drawTitle:j.noop}),Gn=En;Yn._defaults=Gn;var Xn=j._deprecated,Kn=j.options.resolve,Zn=j.valueOrDefault,$n=Number.MIN_SAFE_INTEGER||-9007199254740991,Jn=Number.MAX_SAFE_INTEGER||9007199254740991,Qn={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},ti=Object.keys(Qn);function ei(t,e){return t-e}function ni(t){return j.valueOrDefault(t.time.min,t.ticks.min)}function ii(t){return j.valueOrDefault(t.time.max,t.ticks.max)}function ai(t,e,n,i){var a=function(t,e,n){for(var i,a,r,o=0,s=t.length-1;o>=0&&o<=s;){if(a=t[(i=o+s>>1)-1]||null,r=t[i],!a)return{lo:null,hi:r};if(r[e]<n)o=i+1;else{if(!(a[e]>n))return{lo:a,hi:r};s=i-1}}return{lo:r,hi:null}}(t,e,n),r=a.lo?a.hi?a.lo:t[t.length-2]:t[0],o=a.lo?a.hi?a.hi:t[t.length-1]:t[1],s=o[e]-r[e],l=s?(n-r[e])/s:0,u=(o[i]-r[i])*l;return r[i]+u}function ri(t,e){var n=t._adapter,i=t.options.time,a=i.parser,r=a||i.format,o=e;return"function"==typeof a&&(o=a(o)),j.isFinite(o)||(o="string"==typeof r?n.parse(o,r):n.parse(o)),null!==o?+o:(a||"function"!=typeof r||(o=r(e),j.isFinite(o)||(o=n.parse(o))),o)}function oi(t,e){if(j.isNullOrUndef(e))return null;var n=t.options.time,i=ri(t,t.getRightValue(e));return null===i?i:(n.round&&(i=+t._adapter.startOf(i,n.round)),i)}function si(t,e,n,i){var a,r,o,s=ti.length;for(a=ti.indexOf(t);a<s-1;++a)if(o=(r=Qn[ti[a]]).steps?r.steps:Jn,r.common&&Math.ceil((n-e)/(o*r.size))<=i)return ti[a];return ti[s-1]}function li(t,e,n){var i,a,r=[],o={},s=e.length;for(i=0;i<s;++i)o[a=e[i]]=i,r.push({value:a,major:!1});return 0!==s&&n?function(t,e,n,i){var a,r,o=t._adapter,s=+o.startOf(e[0].value,i),l=e[e.length-1].value;for(a=s;a<=l;a=+o.add(a,1,i))(r=n[a])>=0&&(e[r].major=!0);return e}(t,r,o,n):r}var ui=bn.extend({initialize:function(){this.mergeTicksOptions(),bn.prototype.initialize.call(this)},update:function(){var t=this.options,e=t.time||(t.time={}),n=this._adapter=new nn._date(t.adapters.date);return Xn("time scale",e.format,"time.format","time.parser"),Xn("time scale",e.min,"time.min","ticks.min"),Xn("time scale",e.max,"time.max","ticks.max"),j.mergeIf(e.displayFormats,n.formats()),bn.prototype.update.apply(this,arguments)},getRightValue:function(t){return t&&void 0!==t.t&&(t=t.t),bn.prototype.getRightValue.call(this,t)},determineDataLimits:function(){var t,e,n,i,a,r,o,s=this,l=s.chart,u=s._adapter,d=s.options,h=d.time.unit||"day",c=Jn,f=$n,g=[],p=[],m=[],v=s._getLabels();for(t=0,n=v.length;t<n;++t)m.push(oi(s,v[t]));for(t=0,n=(l.data.datasets||[]).length;t<n;++t)if(l.isDatasetVisible(t))if(a=l.data.datasets[t].data,j.isObject(a[0]))for(p[t]=[],e=0,i=a.length;e<i;++e)r=oi(s,a[e]),g.push(r),p[t][e]=r;else p[t]=m.slice(0),o||(g=g.concat(m),o=!0);else p[t]=[];m.length&&(c=Math.min(c,m[0]),f=Math.max(f,m[m.length-1])),g.length&&(g=n>1?function(t){var e,n,i,a={},r=[];for(e=0,n=t.length;e<n;++e)a[i=t[e]]||(a[i]=!0,r.push(i));return r}(g).sort(ei):g.sort(ei),c=Math.min(c,g[0]),f=Math.max(f,g[g.length-1])),c=oi(s,ni(d))||c,f=oi(s,ii(d))||f,c=c===Jn?+u.startOf(Date.now(),h):c,f=f===$n?+u.endOf(Date.now(),h)+1:f,s.min=Math.min(c,f),s.max=Math.max(c+1,f),s._table=[],s._timestamps={data:g,datasets:p,labels:m}},buildTicks:function(){var t,e,n,i=this,a=i.min,r=i.max,o=i.options,s=o.ticks,l=o.time,u=i._timestamps,d=[],h=i.getLabelCapacity(a),c=s.source,f=o.distribution;for(u="data"===c||"auto"===c&&"series"===f?u.data:"labels"===c?u.labels:function(t,e,n,i){var a,r=t._adapter,o=t.options,s=o.time,l=s.unit||si(s.minUnit,e,n,i),u=Kn([s.stepSize,s.unitStepSize,1]),d="week"===l&&s.isoWeekday,h=e,c=[];if(d&&(h=+r.startOf(h,"isoWeek",d)),h=+r.startOf(h,d?"day":l),r.diff(n,e,l)>1e5*u)throw e+" and "+n+" are too far apart with stepSize of "+u+" "+l;for(a=h;a<n;a=+r.add(a,u,l))c.push(a);return a!==n&&"ticks"!==o.bounds||c.push(a),c}(i,a,r,h),"ticks"===o.bounds&&u.length&&(a=u[0],r=u[u.length-1]),a=oi(i,ni(o))||a,r=oi(i,ii(o))||r,t=0,e=u.length;t<e;++t)(n=u[t])>=a&&n<=r&&d.push(n);return i.min=a,i.max=r,i._unit=l.unit||(s.autoSkip?si(l.minUnit,i.min,i.max,h):function(t,e,n,i,a){var r,o;for(r=ti.length-1;r>=ti.indexOf(n);r--)if(o=ti[r],Qn[o].common&&t._adapter.diff(a,i,o)>=e-1)return o;return ti[n?ti.indexOf(n):0]}(i,d.length,l.minUnit,i.min,i.max)),i._majorUnit=s.major.enabled&&"year"!==i._unit?function(t){for(var e=ti.indexOf(t)+1,n=ti.length;e<n;++e)if(Qn[ti[e]].common)return ti[e]}(i._unit):void 0,i._table=function(t,e,n,i){if("linear"===i||!t.length)return[{time:e,pos:0},{time:n,pos:1}];var a,r,o,s,l,u=[],d=[e];for(a=0,r=t.length;a<r;++a)(s=t[a])>e&&s<n&&d.push(s);for(d.push(n),a=0,r=d.length;a<r;++a)l=d[a+1],o=d[a-1],s=d[a],void 0!==o&&void 0!==l&&Math.round((l+o)/2)===s||u.push({time:s,pos:a/(r-1)});return u}(i._timestamps.data,a,r,f),i._offsets=function(t,e,n,i,a){var r,o,s=0,l=0;return a.offset&&e.length&&(r=ai(t,"time",e[0],"pos"),s=1===e.length?1-r:(ai(t,"time",e[1],"pos")-r)/2,o=ai(t,"time",e[e.length-1],"pos"),l=1===e.length?o:(o-ai(t,"time",e[e.length-2],"pos"))/2),{start:s,end:l,factor:1/(s+1+l)}}(i._table,d,0,0,o),s.reverse&&d.reverse(),li(i,d,i._majorUnit)},getLabelForIndex:function(t,e){var n=this,i=n._adapter,a=n.chart.data,r=n.options.time,o=a.labels&&t<a.labels.length?a.labels[t]:"",s=a.datasets[e].data[t];return j.isObject(s)&&(o=n.getRightValue(s)),r.tooltipFormat?i.format(ri(n,o),r.tooltipFormat):"string"==typeof o?o:i.format(ri(n,o),r.displayFormats.datetime)}
vendor: 4,465 bytes, line 35
35,tickFormatFunction:function(t,e,n,i){var a=this._adapter,r=this.options,o=r.time.displayFormats,s=o[this._unit],l=this._majorUnit,u=o[l],d=n[e],h=r.ticks,c=l&&u&&d&&d.major,f=a.format(t,i||(c?u:s)),g=c?h.major:h.minor,p=Kn([g.callback,g.userCallback,h.callback,h.userCallback]);return p?p(f,e,n):f},convertTicksToLabels:function(t){var e,n,i=[];for(e=0,n=t.length;e<n;++e)i.push(this.tickFormatFunction(t[e].value,e,t));return i},getPixelForOffset:function(t){var e=this._offsets,n=ai(this._table,"time",t,"pos");return this.getPixelForDecimal((e.start+n)*e.factor)},getPixelForValue:function(t,e,n){var i=null;if(void 0!==e&&void 0!==n&&(i=this._timestamps.datasets[n][e]),null===i&&(i=oi(this,t)),null!==i)return this.getPixelForOffset(i)},getPixelForTick:function(t){var e=this.getTicks();return t>=0&&t<e.length?this.getPixelForOffset(e[t].value):null},getValueForPixel:function(t){var e=this._offsets,n=this.getDecimalForPixel(t)/e.factor-e.end,i=ai(this._table,"pos",n,"time");return this._adapter._create(i)},_getLabelSize:function(t){var e=this.options.ticks,n=this.ctx.measureText(t).width,i=j.toRadians(this.isHorizontal()?e.maxRotation:e.minRotation),a=Math.cos(i),r=Math.sin(i),o=Zn(e.fontSize,B.global.defaultFontSize);return{w:n*a+o*r,h:n*r+o*a}},getLabelWidth:function(t){return this._getLabelSize(t).w},getLabelCapacity:function(t){var e=this,n=e.options.time,i=n.displayFormats,a=i[n.unit]||i.millisecond,r=e.tickFormatFunction(t,0,li(e,[t],e._majorUnit),a),o=e._getLabelSize(r),s=Math.floor(e.isHorizontal()?e.width/o.w:e.height/o.h);return e.options.offset&&s--,s>0?s:1}}),di={position:"bottom",distribution:"linear",bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,displayFormat:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{autoSkip:!1,source:"auto",major:{enabled:!1}}};ui._defaults=di;var hi={category:yn,linear:An,logarithmic:Ln,radialLinear:Yn,time:ui},ci={datetime:"MMM D, YYYY, h:mm:ss a",millisecond:"h:mm:ss.SSS a",second:"h:mm:ss a",minute:"h:mm a",hour:"hA",day:"MMM D",week:"ll",month:"MMM YYYY",quarter:"[Q]Q - YYYY",year:"YYYY"};nn._date.override("function"==typeof t?{_id:"moment",formats:function(){return ci},parse:function(e,n){return"string"==typeof e&&"string"==typeof n?e=t(e,n):e instanceof t||(e=t(e)),e.isValid()?e.valueOf():null},format:function(e,n){return t(e).format(n)},add:function(e,n,i){return t(e).add(n,i).valueOf()},diff:function(e,n,i){return t(e).diff(t(n),i)},startOf:function(e,n,i){return e=t(e),"isoWeek"===n?e.isoWeekday(i).valueOf():e.startOf(n).valueOf()},endOf:function(e,n){return t(e).endOf(n).valueOf()},_create:function(e){return t(e)}}:{}),B._set("global",{plugins:{filler:{propagate:!0}}});var fi={dataset:function(t){var e=t.fill,n=t.chart,i=n.getDatasetMeta(e),a=i&&n.isDatasetVisible(e)&&i.dataset._children||[],r=a.length||0;return r?function(t,e){return e<r&&a[e]._view||null}:null},boundary:function(t){var e=t.boundary,n=e?e.x:null,i=e?e.y:null;return j.isArray(e)?function(t,n){return e[n]}:function(t){return{x:null===n?t.x:n,y:null===i?t.y:i}}}};function gi(t,e,n){var i,a=t._model||{},r=a.fill;if(void 0===r&&(r=!!a.backgroundColor),!1===r||null===r)return!1;if(!0===r)return"origin";if(i=parseFloat(r,10),isFinite(i)&&Math.floor(i)===i)return"-"!==r[0]&&"+"!==r[0]||(i=e+i),!(i===e||i<0||i>=n)&&i;switch(r){case"bottom":return"start";case"top":return"end";case"zero":return"origin";case"origin":case"start":case"end":return r;default:return!1}}function pi(t){return(t.el._scale||{}).getPointPositionForValue?function(t){var e,n,i,a,r,o=t.el._scale,s=o.options,l=o.chart.data.labels.length,u=t.fill,d=[];if(!l)return null;for(e=s.ticks.reverse?o.max:o.min,n=s.ticks.reverse?o.min:o.max,i=o.getPointPositionForValue(0,e),a=0;a<l;++a)r="start"===u||"end"===u?o.getPointPositionForValue(a,"start"===u?e:n):o.getBasePosition(a),s.gridLines.circular&&(r.cx=i.x,r.cy=i.y,r.angle=o.getIndexAngle(a)-Math.PI/2),d.push(r);return d}(t):function(t){var e,n=t.el._model||{},i=t.el._scale||{},a=t.fill,r=null;if(isFinite(a))return null;if("start"===a?r=void 0===n.scaleBottom?i.bottom:n.scaleBottom:"end"===a?r=void 0===n.scaleTop?i.top:n.scaleTop:void 0!==n.scaleZero?r=n.scaleZero:i.getBasePixel&&(r=i.getBasePixel()),null!=r){if(void 0!==r.x&&void 0!==r.y)return r;if(j.isFinite(r))return{x:(e=i.isHorizontal())?r:null,y:e?null:r}}return null}(t)}function mi(t,e,n){var i,a=t[e].fill,r=[e];if(!n)return a;for(;!1!==a&&-1===r.indexOf(a);){if(!isFinite(a))return a;
vendor: 16,675 bytes, line 35
35if(!(i=t[a]))return!1;if(i.visible)return a;r.push(a),a=i.fill}return!1}function vi(t){var e=t.fill,n="dataset";return!1===e?null:(isFinite(e)||(n="boundary"),fi[n](t))}function bi(t){return t&&!t.skip}function xi(t,e,n,i,a){var r,o,s,l;if(i&&a){for(t.moveTo(e[0].x,e[0].y),r=1;r<i;++r)j.canvas.lineTo(t,e[r-1],e[r]);if(void 0===n[0].angle)for(t.lineTo(n[a-1].x,n[a-1].y),r=a-1;r>0;--r)j.canvas.lineTo(t,n[r],n[r-1],!0);else for(o=n[0].cx,s=n[0].cy,l=Math.sqrt(Math.pow(n[0].x-o,2)+Math.pow(n[0].y-s,2)),r=a-1;r>0;--r)t.arc(o,s,l,n[r].angle,n[r-1].angle,!0)}}function yi(t,e,n,i,a,r){var o,s,l,u,d,h,c,f,g=e.length,p=i.spanGaps,m=[],v=[],b=0,x=0;for(t.beginPath(),o=0,s=g;o<s;++o)d=n(u=e[l=o%g]._view,l,i),h=bi(u),c=bi(d),r&&void 0===f&&h&&(s=g+(f=o+1)),h&&c?(b=m.push(u),x=v.push(d)):b&&x&&(p?(h&&m.push(u),c&&v.push(d)):(xi(t,m,v,b,x),b=x=0,m=[],v=[]));xi(t,m,v,b,x),t.closePath(),t.fillStyle=a,t.fill()}var _i={id:"filler",afterDatasetsUpdate:function(t,e){var n,i,a,r,o=(t.data.datasets||[]).length,s=e.propagate,l=[];for(i=0;i<o;++i)r=null,(a=(n=t.getDatasetMeta(i)).dataset)&&a._model&&a instanceof wt.Line&&(r={visible:t.isDatasetVisible(i),fill:gi(a,i,o),chart:t,el:a}),n.$filler=r,l.push(r);for(i=0;i<o;++i)(r=l[i])&&(r.fill=mi(l,i,s),r.boundary=pi(r),r.mapper=vi(r))},beforeDatasetsDraw:function(t){var e,n,i,a,r,o,s,l=t._getSortedVisibleDatasetMetas(),u=t.ctx;for(n=l.length-1;n>=0;--n)(e=l[n].$filler)&&e.visible&&(a=(i=e.el)._view,r=i._children||[],o=e.mapper,s=a.backgroundColor||B.global.defaultColor,o&&s&&r.length&&(j.canvas.clipArea(u,t.chartArea),yi(u,r,o,a,s,i._loop),j.canvas.unclipArea(u)))}},ki=j.rtl.getRtlAdapter,wi=j.noop,Mi=j.valueOrDefault;function Si(t,e){return t.usePointStyle&&t.boxWidth>e?e:t.boxWidth}B._set("global",{legend:{display:!0,position:"top",align:"center",fullWidth:!0,reverse:!1,weight:1e3,onClick:function(t,e){var n=e.datasetIndex,i=this.chart,a=i.getDatasetMeta(n);a.hidden=null===a.hidden?!i.data.datasets[n].hidden:null,i.update()},onHover:null,onLeave:null,labels:{boxWidth:40,padding:10,generateLabels:function(t){var e=t.data.datasets,n=t.options.legend||{},i=n.labels&&n.labels.usePointStyle;return t._getSortedDatasetMetas().map(function(n){var a=n.controller.getStyle(i?0:void 0);return{text:e[n.index].label,fillStyle:a.backgroundColor,hidden:!t.isDatasetVisible(n.index),lineCap:a.borderCapStyle,lineDash:a.borderDash,lineDashOffset:a.borderDashOffset,lineJoin:a.borderJoinStyle,lineWidth:a.borderWidth,strokeStyle:a.borderColor,pointStyle:a.pointStyle,rotation:a.rotation,datasetIndex:n.index}},this)}}},legendCallback:function(t){var e,n,i,a=document.createElement("ul"),r=t.data.datasets;for(a.setAttribute("class",t.id+"-legend"),e=0,n=r.length;e<n;e++)(i=a.appendChild(document.createElement("li"))).appendChild(document.createElement("span")).style.backgroundColor=r[e].backgroundColor,r[e].label&&i.appendChild(document.createTextNode(r[e].label));return a.outerHTML}});var Ci=Z.extend({initialize:function(t){j.extend(this,t),this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1},beforeUpdate:wi,update:function(t,e,n){var i=this;return i.beforeUpdate(),i.maxWidth=t,i.maxHeight=e,i.margins=n,i.beforeSetDimensions(),i.setDimensions(),i.afterSetDimensions(),i.beforeBuildLabels(),i.buildLabels(),i.afterBuildLabels(),i.beforeFit(),i.fit(),i.afterFit(),i.afterUpdate(),i.minSize},afterUpdate:wi,beforeSetDimensions:wi,setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0,t.minSize={width:0,height:0}},afterSetDimensions:wi,beforeBuildLabels:wi,buildLabels:function(){var t=this,e=t.options.labels||{},n=j.callback(e.generateLabels,[t.chart],t)||[];e.filter&&(n=n.filter(function(n){return e.filter(n,t.chart.data)})),t.options.reverse&&n.reverse(),t.legendItems=n},afterBuildLabels:wi,beforeFit:wi,fit:function(){var t=this,e=t.options,n=e.labels,i=e.display,a=t.ctx,r=j.options._parseFont(n),o=r.size,s=t.legendHitBoxes=[],l=t.minSize,u=t.isHorizontal();if(u?(l.width=t.maxWidth,l.height=i?10:0):(l.width=i?10:0,l.height=t.maxHeight),i){if(a.font=r.string,u){var d=t.lineWidths=[0],h=0;a.textAlign="left",a.textBaseline="middle",j.each(t.legendItems,function(t,e){var i=Si(n,o)+o/2+a.measureText(t.text).width;(0===e||d[d.length-1]+i+2*n.padding>l.width)&&(h+=o+n.padding,d[d.length-(e>0?0:1)]=0),s[e]={left:0,top:0,width:i,height:o},d[d.length-1]+=i+n.padding}),l.height+=h}else{var c=n.padding,f=t.columnWidths=[],g=t.columnHeights=[],p=n.padding,m=0,v=0;j.each(t.legendItems,function(t,e){var i=Si(n,o)+o/2+a.measureText(t.text).width;e>0&&v+o+2*c>l.height&&(p+=m+n.padding,f.push(m),g.push(v),m=0,v=0),m=Math.max(m,i),v+=o+c,s[e]={left:0,top:0,width:i,height:o}}),p+=m,f.push(m),g.push(v),l.width+=p}t.width=l.width,t.height=l.height}else t.width=l.width=t.height=l.height=0},afterFit:wi,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var t=this,e=t.options,n=e.labels,i=B.global,a=i.defaultColor,r=i.elements.line,o=t.height,s=t.columnHeights,l=t.width,u=t.lineWidths;if(e.display){var d,h=ki(e.rtl,t.left,t.minSize.width),c=t.ctx,f=Mi(n.fontColor,i.defaultFontColor),g=j.options._parseFont(n),p=g.size;c.textAlign=h.textAlign("left"),c.textBaseline="middle",c.lineWidth=.5,c.strokeStyle=f,c.fillStyle=f,c.font=g.string;var m=Si(n,p),v=t.legendHitBoxes,b=function(t,i){switch(e.align){case"start":return n.padding;case"end":return t-i;default:return(t-i+n.padding)/2}},x=t.isHorizontal();d=x?{x:t.left+b(l,u[0]),y:t.top+n.padding,line:0}:{x:t.left+n.padding,y:t.top+b(o,s[0]),line:0},j.rtl.overrideTextDirection(t.ctx,e.textDirection);var y=p+n.padding;j.each(t.legendItems,function(e,i){var f=c.measureText(e.text).width,g=m+p/2+f,_=d.x,k=d.y;h.setWidth(t.minSize.width),x?i>0&&_+g+n.padding>t.left+t.minSize.width&&(k=d.y+=y,d.line++,_=d.x=t.left+b(l,u[d.line])):i>0&&k+y>t.top+t.minSize.height&&(_=d.x=_+t.columnWidths[d.line]+n.padding,d.line++,k=d.y=t.top+b(o,s[d.line]));var w=h.x(_);!function(t,e,i){if(!(isNaN(m)||m<=0)){c.save();var o=Mi(i.lineWidth,r.borderWidth);if(c.fillStyle=Mi(i.fillStyle,a),c.lineCap=Mi(i.lineCap,r.borderCapStyle),c.lineDashOffset=Mi(i.lineDashOffset,r.borderDashOffset),c.lineJoin=Mi(i.lineJoin,r.borderJoinStyle),c.lineWidth=o,c.strokeStyle=Mi(i.strokeStyle,a),c.setLineDash&&c.setLineDash(Mi(i.lineDash,r.borderDash)),n&&n.usePointStyle){var s=m*Math.SQRT2/2,l=h.xPlus(t,m/2),u=e+p/2;j.canvas.drawPoint(c,i.pointStyle,s,l,u,i.rotation)}else c.fillRect(h.leftForLtr(t,m),e,m,p),0!==o&&c.strokeRect(h.leftForLtr(t,m),e,m,p);c.restore()}}(w,k,e),v[i].left=h.leftForLtr(w,v[i].width),v[i].top=k,function(t,e,n,i){var a=p/2,r=h.xPlus(t,m+a),o=e+a;c.fillText(n.text,r,o),n.hidden&&(c.beginPath(),c.lineWidth=2,c.moveTo(r,o),c.lineTo(h.xPlus(r,i),o),c.stroke())}(w,k,e,f),x?d.x+=g+n.padding:d.y+=y}),j.rtl.restoreTextDirection(t.ctx,e.textDirection)}},_getLegendItemAt:function(t,e){var n,i,a,r=this;if(t>=r.left&&t<=r.right&&e>=r.top&&e<=r.bottom)for(a=r.legendHitBoxes,n=0;n<a.length;++n)if(t>=(i=a[n]).left&&t<=i.left+i.width&&e>=i.top&&e<=i.top+i.height)return r.legendItems[n];return null},handleEvent:function(t){var e,n=this,i=n.options,a="mouseup"===t.type?"click":t.type;if("mousemove"===a){if(!i.onHover&&!i.onLeave)return}else{if("click"!==a)return;if(!i.onClick)return}e=n._getLegendItemAt(t.x,t.y),"click"===a?e&&i.onClick&&i.onClick.call(n,t.native,e):(i.onLeave&&e!==n._hoveredItem&&(n._hoveredItem&&i.onLeave.call(n,t.native,n._hoveredItem),n._hoveredItem=e),i.onHover&&e&&i.onHover.call(n,t.native,e))}});function Pi(t,e){var n=new Ci({ctx:t.ctx,options:e,chart:t});ge.configure(t,n,e),ge.addBox(t,n),t.legend=n}var Ai={id:"legend",_element:Ci,beforeInit:function(t){var e=t.options.legend;e&&Pi(t,e)},beforeUpdate:function(t){var e=t.options.legend,n=t.legend;e?(j.mergeIf(e,B.global.legend),n?(ge.configure(t,n,e),n.options=e):Pi(t,e)):n&&(ge.removeBox(t,n),delete t.legend)},afterEvent:function(t,e){var n=t.legend;n&&n.handleEvent(e)}},Di=j.noop;B._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,padding:10,position:"top",text:"",weight:2e3}});var Ti=Z.extend({initialize:function(t){j.extend(this,t),this.legendHitBoxes=[]},beforeUpdate:Di,update:function(t,e,n){var i=this;return i.beforeUpdate(),i.maxWidth=t,i.maxHeight=e,i.margins=n,i.beforeSetDimensions(),i.setDimensions(),i.afterSetDimensions(),i.beforeBuildLabels(),i.buildLabels(),i.afterBuildLabels(),i.beforeFit(),i.fit(),i.afterFit(),i.afterUpdate(),i.minSize},afterUpdate:Di,beforeSetDimensions:Di,setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0,t.minSize={width:0,height:0}},afterSetDimensions:Di,beforeBuildLabels:Di,buildLabels:Di,afterBuildLabels:Di,beforeFit:Di,fit:function(){var t,e=this,n=e.options,i=e.minSize={},a=e.isHorizontal();n.display?(t=(j.isArray(n.text)?n.text.length:1)*j.options._parseFont(n).lineHeight+2*n.padding,e.width=i.width=a?e.maxWidth:t,e.height=i.height=a?t:e.maxHeight):e.width=i.width=e.height=i.height=0},afterFit:Di,isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},draw:function(){var t=this,e=t.ctx,n=t.options;if(n.display){var i,a,r,o=j.options._parseFont(n),s=o.lineHeight,l=s/2+n.padding,u=0,d=t.top,h=t.left,c=t.bottom,f=t.right;e.fillStyle=j.valueOrDefault(n.fontColor,B.global.defaultFontColor),e.font=o.string,t.isHorizontal()?(a=h+(f-h)/2,r=d+l,i=f-h):(a="left"===n.position?h+l:f-l,r=d+(c-d)/2,i=c-d,u=Math.PI*("left"===n.position?-.5:.5)),e.save(),e.translate(a,r),e.rotate(u),e.textAlign="center",e.textBaseline="middle";var g=n.text;if(j.isArray(g))for(var p=0,m=0;m<g.length;++m)e.fillText(g[m],0,p,i),p+=s;else e.fillText(g,0,0,i);e.restore()}}});function Ii(t,e){var n=new Ti({ctx:t.ctx,options:e,chart:t});ge.configure(t,n,e),ge.addBox(t,n),t.titleBlock=n}var Fi={},Oi=_i,Li=Ai,Ri={id:"title",_element:Ti,beforeInit:function(t){var e=t.options.title;e&&Ii(t,e)},beforeUpdate:function(t){var e=t.options.title,n=t.titleBlock;e?(j.mergeIf(e,B.global.title),n?(ge.configure(t,n,e),n.options=e):Ii(t,e)):n&&(ge.removeBox(t,n),delete t.titleBlock)}};for(var zi in Fi.filler=Oi,Fi.legend=Li,Fi.title=Ri,Qe.helpers=j,function(){function t(t,e,n){var i;return"string"==typeof t?(i=parseInt(t,10),-1!==t.indexOf("%")&&(i=i/100*e.parentNode[n])):i=t,i}function e(t){return null!=t&&"none"!==t}function n(n,i,a){var r=document.defaultView,o=j._getParentNode(n),s=r.getComputedStyle(n)[i],l=r.getComputedStyle(o)[i],u=e(s),d=e(l),h=Number.POSITIVE_INFINITY;return u||d?Math.min(u?t(s,n,a):h,d?t(l,o,a):h):"none"}j.where=function(t,e){if(j.isArray(t)&&Array.prototype.filter)return t.filter(e);var n=[];return j.each(t,function(t){e(t)&&n.push(t)}),n},j.findIndex=Array.prototype.findIndex?function(t,e,n){return t.findIndex(e,n)}:function(t,e,n){n=void 0===n?t:n;for(var i=0,a=t.length;i<a;++i)if(e.call(n,t[i],i,t))return i;return-1},j.findNextWhere=function(t,e,n){j.isNullOrUndef(n)&&(n=-1);for(var i=n+1;i<t.length;i++){var a=t[i];if(e(a))return a}},j.findPreviousWhere=function(t,e,n){j.isNullOrUndef(n)&&(n=t.length);for(var i=n-1;i>=0;i--){var a=t[i];if(e(a))return a}},j.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},j.almostEquals=function(t,e,n){return Math.abs(t-e)<n},j.almostWhole=function(t,e){var n=Math.round(t);return n-e<=t&&n+e>=t},j.max=function(t){return t.reduce(function(t,e){return isNaN(e)?t:Math.max(t,e)},Number.NEGATIVE_INFINITY)},j.min=function(t){return t.reduce(function(t,e){return isNaN(e)?t:Math.min(t,e)},Number.POSITIVE_INFINITY)},j.sign=Math.sign?function(t){return Math.sign(t)}:function(t){return 0==(t=+t)||isNaN(t)?t:t>0?1:-1},j.toRadians=function(t){return t*(Math.PI/180)},j.toDegrees=function(t){return t*(180/Math.PI)},j._decimalPlaces=function(t){if(j.isFinite(t)){for(var e=1,n=0;Math.round(t*e)/e!==t;)e*=10,n++;return n}},j.getAngleFromPoint=function(t,e){var n=e.x-t.x,i=e.y-t.y,a=Math.sqrt(n*n+i*i),r=Math.atan2(i,n);return r<-.5*Math.PI&&(r+=2*Math.PI),{angle:r,distance:a}},j.distanceBetweenPoints=function(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))},j.aliasPixel=function(t){return t%2==0?0:.5},j._alignPixel=function(t,e,n){var i=t.currentDevicePixelRatio,a=n/2;return Math.round((e-a)*i)/i+a},j.splineCurve=function(t,e,n,i){var a=t.skip?e:t,r=e,o=n.skip?e:n,s=Math.sqrt(Math.pow(r.x-a.x,2)+Math.pow(r.y-a.y,2)),l=Math.sqrt(Math.pow(o.x-r.x,2)+Math.pow(o.y-r.y,2)),u=s/(s+l),d=l/(s+l),h=i*(u=isNaN(u)?0:u),c=i*(d=isNaN(d)?0:d);return{previous:{x:r.x-h*(o.x-a.x),y:r.y-h*(o.y-a.y)},next:{x:r.x+c*(o.x-a.x),y:r.y+c*(o.y-a.y)}}},j.EPSILON=Number.EPSILON||1e-14,j.splineCurveMonotone=function(t){var e,n,i,a,r,o,s,l,u,d=(t||[]).map(function(t){return{model:t._model,deltaK:0,mK:0}}),h=d.length;for(e=0;e<h;++e)if(!(i=d[e]).model.skip){if(n=e>0?d[e-1]:null,(a=e<h-1?d[e+1]:null)&&!a.model.skip){var c=a.model.x-i.model.x;i.deltaK=0!==c?(a.model.y-i.model.y)/c:0}!n||n.model.skip?i.mK=i.deltaK:!a||a.model.skip?i.mK=n.deltaK:this.sign(n.deltaK)!==this.sign(i.deltaK)?i.mK=0:i.mK=(n.deltaK+i.deltaK)/2}for(e=0;e<h-1;++e)i=d[e],a=d[e+1],i.model.skip||a.model.skip||(j.almostEquals(i.deltaK,0,this.EPSILON)?i.mK=a.mK=0:(r=i.mK/i.deltaK,o=a.mK/i.deltaK,(l=Math.pow(r,2)+Math.pow(o,2))<=9||(s=3/Math.sqrt(l),i.mK=r*s*i.deltaK,a.mK=o*s*i.deltaK)));for(e=0;e<h;++e)(i=d[e]).model.skip||(n=e>0?d[e-1]:null,a=e<h-1?d[e+1]:null,n&&!n.model.skip&&(u=(i.model.x-n.model.x)/3,i.model.controlPointPreviousX=i.model.x-u,i.model.controlPointPreviousY=i.model.y-u*i.mK),a&&!a.model.skip&&(u=(a.model.x-i.model.x)/3,i.model.controlPointNextX=i.model.x+u,i.model.controlPointNextY=i.model.y+u*i.mK))},j.nextItem=function(t,e,n){return n?e>=t.length-1?t[0]:t[e+1]:e>=t.length-1?t[t.length-1]:t[e+1]},j.previousItem=function(t,e,n){return n?e<=0?t[t.length-1]:t[e-1]:e<=0?t[0]:t[e-1]},j.niceNum=function(t,e){var n=Math.floor(j.log10(t)),i=t/Math.pow(10,n);return(e?i<1.5?1:i<3?2:i<7?5:10:i<=1?1:i<=2?2:i<=5?5:10)*Math.pow(10,n)},j.requestAnimFrame="undefined"==typeof window?function(t){t()}:window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return window.setTimeout(t,1e3/60)},j.getRelativePosition=function(t,e){var n,i,a=t.originalEvent||t,r=t.target||t.srcElement,o=r.getBoundingClientRect(),s=a.touches;s&&s.length>0?(n=s[0].clientX,i=s[0].clientY):(n=a.clientX,i=a.clientY);var l=parseFloat(j.getStyle(r,"padding-left")),u=parseFloat(j.getStyle(r,"padding-top")),d=parseFloat(j.getStyle(r,"padding-right")),h=parseFloat(j.getStyle(r,"padding-bottom")),c=o.right-o.left-l-d,f=o.bottom-o.top-u-h;return{x:n=Math.round((n-o.left-l)/c*r.width/e.currentDevicePixelRatio),y:i=Math.round((i-o.top-u)/f*r.height/e.currentDevicePixelRatio)}},j.getConstraintWidth=function(t){return n(t,"max-width","clientWidth")},j.getConstraintHeight=function(t){return n(t,"max-height","clientHeight")},j._calculatePadding=function(t,e,n){return(e=j.getStyle(t,e)).indexOf("%")>-1?n*parseInt(e,10)/100:parseInt(e,10)},j._getParentNode=function(t){var e=t.parentNode;return e&&"[object ShadowRoot]"===e.toString()&&(e=e.host),e},j.getMaximumWidth=function(t){var e=j._getParentNode(t);if(!e)return t.clientWidth;var n=e.clientWidth,i=n-j._calculatePadding(e,"padding-left",n)-j._calculatePadding(e,"padding-right",n),a=j.getConstraintWidth(t);return isNaN(a)?i:Math.min(i,a)},j.getMaximumHeight=function(t){var e=j._getParentNode(t);if(!e)return t.clientHeight;var n=e.clientHeight,i=n-j._calculatePadding(e,"padding-top",n)-j._calculatePadding(e,"padding-bottom",n),a=j.getConstraintHeight(t);return isNaN(a)?i:Math.min(i,a)},j.getStyle=function(t,e){return t.currentStyle?t.currentStyle[e]:document.defaultView.getComputedStyle(t,null).getPropertyValue(e)},j.retinaScale=function(t,e){var n=t.currentDevicePixelRatio=e||"undefined"!=typeof window&&window.devicePixelRatio||1;if(1!==n){var i=t.canvas,a=t.height,r=t.width;i.height=a*n,i.width=r*n,t.ctx.scale(n,n),i.style.height||i.style.width||(i.style.height=a+"px",i.style.width=r+"px")}},j.fontString=function(t,e,n){return e+" "+t+"px "+n},j.longestText=function(t,e,n,i){var a=(i=i||{}).data=i.data||{},r=i.garbageCollect=i.garbageCollect||[];i.font!==e&&(a=i.data={},r=i.garbageCollect=[],i.font=e),t.font=e;var o,s,l,u,d,h=0,c=n.length;for(o=0;o<c;o++)if(null!=(u=n[o])&&!0!==j.isArray(u))h=j.measureText(t,a,r,h,u);else if(j.isArray(u))for(s=0,l=u.length;s<l;
35s++)null==(d=u[s])||j.isArray(d)||(h=j.measureText(t,a,r,h,d));var f=r.length/2;if(f>n.length){for(o=0;o<f;o++)delete a[r[o]];r.splice(0,f)}return h},j.measureText=function(t,e,n,i,a){var r=e[a];return r||(r=e[a]=t.measureText(a).width,n.push(a)),r>i&&(i=r),i},j.numberOfLabelLines=function(t){var e=1;return j.each(t,function(t){j.isArray(t)&&t.length>e&&(e=t.length)}),e},j.color=k?function(t){return t instanceof CanvasGradient&&(t=B.global.defaultColor),k(t)}:function(t){return console.error("Color.js not found!"),t},j.getHoverColor=function(t){return t instanceof CanvasPattern||t instanceof CanvasGradient?t:j.color(t).saturate(.5).darken(.1).rgbString()}}(),Qe._adapters=nn,Qe.Animation=J,Qe.animationService=Q,Qe.controllers=$t,Qe.DatasetController=at,Qe.defaults=B,Qe.Element=Z,Qe.elements=wt,Qe.Interaction=ae,Qe.layouts=ge,Qe.platform=Fe,Qe.plugins=Oe,Qe.Scale=bn,Qe.scaleService=Le,Qe.Ticks=an,Qe.Tooltip=Ue,Qe.helpers.each(hi,function(t,e){Qe.scaleService.registerScaleType(e,t,t._defaults)}),Fi)Fi.hasOwnProperty(zi)&&Qe.plugins.register(Fi[zi]);Qe.platform.initialize();var Ni=Qe;return"undefined"!=typeof window&&(window.Chart=Qe),Qe.Chart=Qe,Qe.Legend=Fi.legend._element,Qe.Title=Fi.title._element,Qe.pluginService=Qe.plugins,Qe.PluginBase=Qe.Element.extend({}),Qe.canvasHelpers=Qe.helpers.canvas,Qe.layoutService=Qe.layouts,Qe.LinearScaleBase=Mn,Qe.helpers.each(["Bar","Bubble","Doughnut","Line","PolarArea","Radar","Scatter"],function(t){Qe[t]=function(e,n){return new Qe(e,Qe.helpers.merge(n||{},{type:t.charAt(0).toLowerCase()+t.slice(1)}))}}),Ni});
36},{"moment":"iROh"}],"RkNv":[function(require,module,exports) {
37var define;
38var e;!function(o){"function"==typeof e&&e.amd?e(["jquery"],o):"object"==typeof exports?o(require("jquery")):o(jQuery)}(function(e){var o=/\+/g;function n(e){return t.raw?e:encodeURIComponent(e)}function i(e){return n(t.json?JSON.stringify(e):String(e))}function r(n,i){var r=t.raw?n:function(e){0===e.indexOf('"')&&(e=e.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return e=decodeURIComponent(e.replace(o," ")),t.json?JSON.parse(e):e}catch(n){}}(n);return e.isFunction(i)?i(r):r}var t=e.cookie=function(o,c,u){if(void 0!==c&&!e.isFunction(c)){if("number"==typeof(u=e.extend({},t.defaults,u)).expires){var a=u.expires,p=u.expires=new Date;p.setTime(+p+864e5*a)}return document.cookie=[n(o),"=",i(c),u.expires?"; expires="+u.expires.toUTCString():"",u.path?"; path="+u.path:"",u.domain?"; domain="+u.domain:"",u.secure?"; secure":""].join("")}for(var s,d=o?void 0:{},f=document.cookie?document.cookie.split("; "):[],m=0,v=f.length;m<v;m++){var x=f[m].split("="),k=(s=x.shift(),t.raw?s:decodeURIComponent(s)),l=x.join("=");if(o&&o===k){d=r(l,c);break}o||void 0===(l=r(l))||(d[k]=l)}return d};t.defaults={},e.removeCookie=function(o,n){return void 0!==e.cookie(o)&&(e.cookie(o,"",e.extend({},n,{expires:-1})),!e.cookie(o))}});
39},{"jquery":"HlZQ"}],"f12I":[function(require,module,exports) {
40var define;
41var t;!function(e){"use strict";"function"==typeof t&&t.amd?t(["jquery"],e):e(jQuery)}(function(t){"use strict";var e=[],s=[],o={precision:100,elapse:!1,defer:!1};s.push(/^[0-9]*$/.source),s.push(/([0-9]{1,2}\/){2}[0-9]{4}( [0-9]{1,2}(:[0-9]{2}){2})?/.source),s.push(/[0-9]{4}([\/\-][0-9]{1,2}){2}( [0-9]{1,2}(:[0-9]{2}){2})?/.source),s=new RegExp(s.join("|"));var i={Y:"years",m:"months",n:"daysToMonth",d:"daysToWeek",w:"weeks",W:"weeksToMonth",H:"hours",M:"minutes",S:"seconds",D:"totalDays",I:"totalHours",N:"totalMinutes",T:"totalSeconds"};function n(t,e){var s="s",o="";return t&&(1===(t=t.replace(/(:|;|\s)/gi,"").split(/\,/)).length?s=t[0]:(o=t[0],s=t[1])),Math.abs(e)>1?s:o}var a=function(s,i,n){this.el=s,this.$el=t(s),this.interval=null,this.offset={},this.options=t.extend({},o),this.instanceNumber=e.length,e.push(this),this.$el.data("countdown-instance",this.instanceNumber),n&&("function"==typeof n?(this.$el.on("update.countdown",n),this.$el.on("stoped.countdown",n),this.$el.on("finish.countdown",n)):this.options=t.extend({},o,n)),this.setFinalDate(i),!1===this.options.defer&&this.start()};t.extend(a.prototype,{start:function(){null!==this.interval&&clearInterval(this.interval);var t=this;this.update(),this.interval=setInterval(function(){t.update.call(t)},this.options.precision)},stop:function(){clearInterval(this.interval),this.interval=null,this.dispatchEvent("stoped")},toggle:function(){this.interval?this.stop():this.start()},pause:function(){this.stop()},resume:function(){this.start()},remove:function(){this.stop.call(this),e[this.instanceNumber]=null,delete this.$el.data().countdownInstance},setFinalDate:function(t){this.finalDate=function(t){if(t instanceof Date)return t;if(String(t).match(s))return String(t).match(/^[0-9]*$/)&&(t=Number(t)),String(t).match(/\-/)&&(t=String(t).replace(/\-/g,"/")),new Date(t);throw new Error("Couldn't cast `"+t+"` to a date object.")}(t)},update:function(){if(0!==this.$el.closest("html").length){var e,s=void 0!==t._data(this.el,"events"),o=new Date;e=this.finalDate.getTime()-o.getTime(),e=Math.ceil(e/1e3),e=!this.options.elapse&&e<0?0:Math.abs(e),this.totalSecsLeft!==e&&s&&(this.totalSecsLeft=e,this.elapsed=o>=this.finalDate,this.offset={seconds:this.totalSecsLeft%60,minutes:Math.floor(this.totalSecsLeft/60)%60,hours:Math.floor(this.totalSecsLeft/60/60)%24,days:Math.floor(this.totalSecsLeft/60/60/24)%7,daysToWeek:Math.floor(this.totalSecsLeft/60/60/24)%7,daysToMonth:Math.floor(this.totalSecsLeft/60/60/24%30.4368),weeks:Math.floor(this.totalSecsLeft/60/60/24/7),weeksToMonth:Math.floor(this.totalSecsLeft/60/60/24/7)%4,months:Math.floor(this.totalSecsLeft/60/60/24/30.4368),years:Math.abs(this.finalDate.getFullYear()-o.getFullYear()),totalDays:Math.floor(this.totalSecsLeft/60/60/24),totalHours:Math.floor(this.totalSecsLeft/60/60),totalMinutes:Math.floor(this.totalSecsLeft/60),totalSeconds:this.totalSecsLeft},this.options.elapse||0!==this.totalSecsLeft?this.dispatchEvent("update"):(this.stop(),this.dispatchEvent("finish")))}else this.remove()}
41,dispatchEvent:function(e){var s,o=t.Event(e+".countdown");o.finalDate=this.finalDate,o.elapsed=this.elapsed,o.offset=t.extend({},this.offset),o.strftime=(s=this.offset,function(t){var e,o,a=t.match(/%(-|!)?[A-Z]{1}(:[^;]+;)?/gi);if(a)for(var h=0,l=a.length;h<l;++h){var r=a[h].match(/%(-|!)?([a-zA-Z]{1})(:[^;]+;)?/),c=(e=r[0],o=void 0,o=e.toString().replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1"),new RegExp(o)),f=r[1]||"",u=r[3]||"",p=null;r=r[2],i.hasOwnProperty(r)&&(p=i[r],p=Number(s[p])),null!==p&&("!"===f&&(p=n(u,p)),""===f&&p<10&&(p="0"+p.toString()),t=t.replace(c,p.toString()))}return t=t.replace(/%%/,"%")}),this.$el.trigger(o)}}),t.fn.countdown=function(){var s=Array.prototype.slice.call(arguments,0);return this.each(function(){var o=t(this).data("countdown-instance");if(void 0!==o){var i=e[o],n=s[0];a.prototype.hasOwnProperty(n)?i[n].apply(i,s.slice(1)):null===String(n).match(/^[$A-Z_][0-9A-Z_$]*$/i)?(i.setFinalDate.call(i,n),i.start()):t.error("Method %s does not exist on jQuery.countdown".replace(/\%s/gi,n))}else new a(this,s[0],s[1])})}});
42},{}],"uc98":[function(require,module,exports) {
43var define;
44var t;!function(i){"function"==typeof t&&t.amd?t(["jquery"],i):i(jQuery)}(function(t){"use strict";var i={},s=Math.max,h=Math.min;i.c={},i.c.d=t(document),i.c.t=function(t){return t.originalEvent.touches.length-1},i.o=function(){var s=this;this.o=null,this.$=null,this.i=null,this.g=null,this.v=null,this.cv=null,this.x=0,this.y=0,this.w=0,this.h=0,this.$c=null,this.c=null,this.t=0,this.isInit=!1,this.fgColor=null,this.pColor=null,this.dH=null,this.cH=null,this.eH=null,this.rH=null,this.scale=1,this.relative=!1,this.relativeWidth=!1,this.relativeHeight=!1,this.$div=null,this.run=function(){var i=function(t,i){var h;for(h in i)s.o[h]=i[h];s._carve().init(),s._configure()._draw()};if(!this.$.data("kontroled")){if(this.$.data("kontroled",!0),this.extend(),this.o=t.extend({min:void 0!==this.$.data("min")?this.$.data("min"):0,max:void 0!==this.$.data("max")?this.$.data("max"):100,stopper:!0,readOnly:this.$.data("readonly")||"readonly"===this.$.attr("readonly"),cursor:(!0===this.$.data("cursor")?30:this.$.data("cursor"))||0,thickness:this.$.data("thickness")&&Math.max(Math.min(this.$.data("thickness"),1),.01)||.35,lineCap:this.$.data("linecap")||"butt",width:this.$.data("width")||200,height:this.$.data("height")||200,displayInput:null==this.$.data("displayinput")||this.$.data("displayinput"),displayPrevious:this.$.data("displayprevious"),fgColor:this.$.data("fgcolor")||"#87CEEB",inputColor:this.$.data("inputcolor"),font:this.$.data("font")||"Arial",fontWeight:this.$.data("font-weight")||"bold",inline:!1,step:this.$.data("step")||1,rotation:this.$.data("rotation"),draw:null,change:null,cancel:null,release:null,format:function(t){return t},parse:function(t){return parseFloat(t)}},this.o),this.o.flip="anticlockwise"===this.o.rotation||"acw"===this.o.rotation,this.o.inputColor||(this.o.inputColor=this.o.fgColor),this.$.is("fieldset")?(this.v={},this.i=this.$.find("input"),this.i.each(function(i){var h=t(this);s.i[i]=h,s.v[i]=s.o.parse(h.val()),h.bind("change blur",function(){var t={};t[i]=h.val(),s.val(s._validate(t))})}),this.$.find("legend").remove()):(this.i=this.$,this.v=this.o.parse(this.$.val()),""===this.v&&(this.v=this.o.min),this.$.bind("change blur",function(){s.val(s._validate(s.o.parse(s.$.val())))})),!this.o.displayInput&&this.$.hide(),this.$c=t(document.createElement("canvas")).attr({width:this.o.width,height:this.o.height}),this.$div=t('<div style="'+(this.o.inline?"display:inline;":"")+"width:"+this.o.width+"px;height:"+this.o.height+'px;"></div>'),this.$.wrap(this.$div).before(this.$c),this.$div=this.$.parent(),"undefined"!=typeof G_vmlCanvasManager&&G_vmlCanvasManager.initElement(this.$c[0]),this.c=this.$c[0].getContext?this.$c[0].getContext("2d"):null,!this.c)throw{name:"CanvasNotSupportedException",message:"Canvas not supported. Please use excanvas on IE8.0.",toString:function(){return this.name+": "+this.message}};return this.scale=(window.devicePixelRatio||1)/(this.c.webkitBackingStorePixelRatio||this.c.mozBackingStorePixelRatio||this.c.msBackingStorePixelRatio||this.c.oBackingStorePixelRatio||this.c.backingStorePixelRatio||1),this.relativeWidth=this.o.width%1!=0&&this.o.width.indexOf("%"),this.relativeHeight=this.o.height%1!=0&&this.o.height.indexOf("%"),this.relative=this.relativeWidth||this.relativeHeight,this._carve(),this.v instanceof Object?(this.cv={},this.copy(this.v,this.cv)):this.cv=this.v,this.$.bind("configure",i).parent().bind("configure",i),this._listen()._configure()._xy().init(),this.isInit=!0,this.$.val(this.o.format(this.v)),this._draw(),this}},this._carve=function(){if(this.relative){var t=this.relativeWidth?this.$div.parent().width()*parseInt(this.o.width)/100:this.$div.parent().width(),i=this.relativeHeight?this.$div.parent().height()*parseInt(this.o.height)/100:this.$div.parent().height();this.w=this.h=Math.min(t,i)}else this.w=this.o.width,this.h=this.o.height;return this.$div.css({width:this.w+"px",height:this.h+"px"}),this.$c.attr({width:this.w,height:this.h}),1!==this.scale&&(this.$c[0].width=this.$c[0].width*this.scale,this.$c[0].height=this.$c[0].height*this.scale,this.$c.width(this.w),this.$c.height(this.h)),this},this._draw=function(){var t=!0;s.g=s.c,s.clear(),s.dH&&(t=s.dH()),!1!==t&&s.draw()},this._touch=function(t){var h=function(t){var i=s.xy2val(t.originalEvent.touches[s.t].pageX,t.originalEvent.touches[s.t].pageY);i!=s.cv&&(s.cH&&!1===s.cH(i)||(s.change(s._validate(i)),s._draw()))};return this.t=i.c.t(t),h(t),i.c.d.bind("touchmove.k",h).bind("touchend.k",function(){i.c.d.unbind("touchmove.k touchend.k"),s.val(s.cv)}),this},this._mouse=function(t){var h=function(t){var i=s.xy2val(t.pageX,t.pageY);i!=s.cv&&(s.cH&&!1===s.cH(i)||(s.change(s._validate(i)),s._draw()))};return h(t),i.c.d.bind("mousemove.k",h).bind("keyup.k",function(t){if(27===t.keyCode){if(i.c.d.unbind("mouseup.k mousemove.k keyup.k"),s.eH&&!1===s.eH())return;s.cancel()}}).bind("mouseup.k",function(t){i.c.d.unbind("mousemove.k mouseup.k keyup.k"),s.val(s.cv)}),this},this._xy=function(){var t=this.$c.offset();return this.x=t.left,this.y=t.top,this},this._listen=function(){return this.o.readOnly?this.$.attr("readonly","readonly"):(this.$c.bind("mousedown",function(t){t.preventDefault(),s._xy()._mouse(t)}).bind("touchstart",function(t){t.preventDefault(),s._xy()._touch(t)}),this.listen()),this.relative&&t(window).resize(function(){s._carve().init(),s._draw()}),this},this._configure=function(){return this.o.draw&&(this.dH=this.o.draw),this.o.change&&(this.cH=this.o.change),this.o.cancel&&(this.eH=this.o.cancel),this.o.release&&(this.rH=this.o.release),this.o.displayPrevious?(this.pColor=this.h2rgba(this.o.fgColor,"0.4"),this.fgColor=this.h2rgba(this.o.fgColor,"0.6")):this.fgColor=this.o.fgColor,this},this._clear=function(){this.$c[0].width=this.$c[0].width}
44,this._validate=function(t){var i=~~((t<0?-.5:.5)+t/this.o.step)*this.o.step;return Math.round(100*i)/100},this.listen=function(){},this.extend=function(){},this.init=function(){},this.change=function(t){},this.val=function(t){},this.xy2val=function(t,i){},this.draw=function(){},this.clear=function(){this._clear()},this.h2rgba=function(t,i){var s;return t=t.substring(1,7),"rgba("+(s=[parseInt(t.substring(0,2),16),parseInt(t.substring(2,4),16),parseInt(t.substring(4,6),16)])[0]+","+s[1]+","+s[2]+","+i+")"},this.copy=function(t,i){for(var s in t)i[s]=t[s]}},i.Dial=function(){i.o.call(this),this.startAngle=null,this.xy=null,this.radius=null,this.lineWidth=null,this.cursorExt=null,this.w2=null,this.PI2=2*Math.PI,this.extend=function(){this.o=t.extend({bgColor:this.$.data("bgcolor")||"#EEEEEE",angleOffset:this.$.data("angleoffset")||0,angleArc:this.$.data("anglearc")||360,inline:!0},this.o)},this.val=function(t,i){if(null==t)return this.v;t=this.o.parse(t),!1!==i&&t!=this.v&&this.rH&&!1===this.rH(t)||(this.cv=this.o.stopper?s(h(t,this.o.max),this.o.min):t,this.v=this.cv,this.$.val(this.o.format(this.v)),this._draw())},this.xy2val=function(t,i){var n,e;return n=Math.atan2(t-(this.x+this.w2),-(i-this.y-this.w2))-this.angleOffset,this.o.flip&&(n=this.angleArc-n-this.PI2),this.angleArc!=this.PI2&&n<0&&n>-.5?n=0:n<0&&(n+=this.PI2),e=n*(this.o.max-this.o.min)/this.angleArc+this.o.min,this.o.stopper&&(e=s(h(e,this.o.max),this.o.min)),e},this.listen=function(){var i,n,e,a,o=this,r=function(t){t.preventDefault();var e=t.originalEvent,a=e.detail||e.wheelDeltaX,r=e.detail||e.wheelDeltaY,l=o._validate(o.o.parse(o.$.val()))+(a>0||r>0?o.o.step:a<0||r<0?-o.o.step:0);l=s(h(l,o.o.max),o.o.min),o.val(l,!1),o.rH&&(clearTimeout(i),i=setTimeout(function(){o.rH(l),i=null},100),n||(n=setTimeout(function(){i&&o.rH(l),n=null},200)))},l=1,c={37:-o.o.step,38:o.o.step,39:o.o.step,40:-o.o.step};this.$.bind("keydown",function(i){var n=i.keyCode;if(n>=96&&n<=105&&(n=i.keyCode=n-48),e=parseInt(String.fromCharCode(n)),isNaN(e)&&(13!==n&&8!==n&&9!==n&&189!==n&&(190!==n||o.$.val().match(/\./))&&i.preventDefault(),t.inArray(n,[37,38,39,40])>-1)){i.preventDefault();var r=o.o.parse(o.$.val())+c[n]*l;o.o.stopper&&(r=s(h(r,o.o.max),o.o.min)),o.change(o._validate(r)),o._draw(),a=window.setTimeout(function(){l*=2},30)}}).bind("keyup",function(t){isNaN(e)?a&&(window.clearTimeout(a),a=null,l=1,o.val(o.$.val())):o.$.val()>o.o.max&&o.$.val(o.o.max)||o.$.val()<o.o.min&&o.$.val(o.o.min)}),this.$c.bind("mousewheel DOMMouseScroll",r),this.$.bind("mousewheel DOMMouseScroll",r)},this.init=function(){(this.v<this.o.min||this.v>this.o.max)&&(this.v=this.o.min),this.$.val(this.v),this.w2=this.w/2,this.cursorExt=this.o.cursor/100,this.xy=this.w2*this.scale,this.lineWidth=this.xy*this.o.thickness,this.lineCap=this.o.lineCap,this.radius=this.xy-this.lineWidth/2,this.o.angleOffset&&(this.o.angleOffset=isNaN(this.o.angleOffset)?0:this.o.angleOffset),this.o.angleArc&&(this.o.angleArc=isNaN(this.o.angleArc)?this.PI2:this.o.angleArc),this.angleOffset=this.o.angleOffset*Math.PI/180,this.angleArc=this.o.angleArc*Math.PI/180,this.startAngle=1.5*Math.PI+this.angleOffset,this.endAngle=1.5*Math.PI+this.angleOffset+this.angleArc;var t=s(String(Math.abs(this.o.max)).length,String(Math.abs(this.o.min)).length,2)+2;this.o.displayInput&&this.i.css({width:(this.w/2+4>>0)+"px",height:(this.w/3>>0)+"px",position:"absolute","vertical-align":"middle","margin-top":(this.w/3>>0)+"px","margin-left":"-"+(3*this.w/4+2>>0)+"px",border:0,background:"none",font:this.o.fontWeight+" "+(this.w/t>>0)+"px "+this.o.font,"text-align":"center",color:this.o.inputColor||this.o.fgColor,padding:"0px","-webkit-appearance":"none"})||this.i.css({width:"0px",visibility:"hidden"})},this.change=function(t){this.cv=t,this.$.val(this.o.format(t))},this.angle=function(t){return(t-this.o.min)*this.angleArc/(this.o.max-this.o.min)},this.arc=function(t){var i,s;return t=this.angle(t),s=this.o.flip?(i=this.endAngle+1e-5)-t-1e-5:(i=this.startAngle-1e-5)+t+1e-5,this.o.cursor&&(i=s-this.cursorExt)&&(s+=this.cursorExt),{s:i,e:s,d:this.o.flip&&!this.o.cursor}},this.draw=function(){var t,i=this.g,s=this.arc(this.cv),h=1;i.lineWidth=this.lineWidth,i.lineCap=this.lineCap,"none"!==this.o.bgColor&&(i.beginPath(),i.strokeStyle=this.o.bgColor,
44i.arc(this.xy,this.xy,this.radius,this.endAngle-1e-5,this.startAngle+1e-5,!0),i.stroke()),this.o.displayPrevious&&(t=this.arc(this.v),i.beginPath(),i.strokeStyle=this.pColor,i.arc(this.xy,this.xy,this.radius,t.s,t.e,t.d),i.stroke(),h=this.cv==this.v),i.beginPath(),i.strokeStyle=h?this.o.fgColor:this.fgColor,i.arc(this.xy,this.xy,this.radius,s.s,s.e,s.d),i.stroke()},this.cancel=function(){this.val(this.v)}},t.fn.dial=t.fn.knob=function(s){return this.each(function(){var h=new i.Dial;h.o=s,h.$=t(this),h.run()}).parent()}});
45},{}],"VWng":[function(require,module,exports) {
46var define;
47var t;!function(e){"use strict";"function"==typeof t&&t.amd?t(["jquery"],e):"object"==typeof exports&&"object"==typeof module?module.exports=e(require("jquery")):e(jQuery)}(function(t,e){"use strict";var r={beforeShow:f,move:f,change:f,show:f,hide:f,color:!1,flat:!1,showInput:!1,allowEmpty:!1,showButtons:!0,clickoutFiresChange:!0,showInitial:!1,showPalette:!1,showPaletteOnly:!1,hideAfterPaletteSelect:!1,togglePaletteOnly:!1,showSelectionPalette:!0,localStorageKey:!1,appendTo:"body",maxSelectionSize:7,cancelText:"cancel",chooseText:"choose",togglePaletteMoreText:"more",togglePaletteLessText:"less",clearText:"Clear Color Selection",noColorSelectedText:"No Color Selected",preferredFormat:!1,className:"",containerClassName:"",replacerClassName:"",showAlpha:!1,theme:"sp-light",palette:[["#ffffff","#000000","#ff0000","#ff8000","#ffff00","#008000","#0000ff","#4b0082","#9400d3"]],selectionPalette:[],disabled:!1,offset:null},a=[],n=!!/msie/i.exec(window.navigator.userAgent),i=function(){function t(t,e){return!!~(""+t).indexOf(e)}var e=document.createElement("div").style;return e.cssText="background-color:rgba(0,0,0,.5)",t(e.backgroundColor,"rgba")||t(e.backgroundColor,"hsla")}(),o=["<div class='sp-replacer'>","<div class='sp-preview'><div class='sp-preview-inner'></div></div>","<div class='sp-dd'>&#9660;</div>","</div>"].join(""),s=function(){var t="";if(n)for(var e=1;e<=6;e++)t+="<div class='sp-"+e+"'></div>";return["<div class='sp-container sp-hidden'>","<div class='sp-palette-container'>","<div class='sp-palette sp-thumb sp-cf'></div>","<div class='sp-palette-button-container sp-cf'>","<button type='button' class='sp-palette-toggle'></button>","</div>","</div>","<div class='sp-picker-container'>","<div class='sp-top sp-cf'>","<div class='sp-fill'></div>","<div class='sp-top-inner'>","<div class='sp-color'>","<div class='sp-sat'>","<div class='sp-val'>","<div class='sp-dragger'></div>","</div>","</div>","</div>","<div class='sp-clear sp-clear-display'>","</div>","<div class='sp-hue'>","<div class='sp-slider'></div>",t,"</div>","</div>","<div class='sp-alpha'><div class='sp-alpha-inner'><div class='sp-alpha-handle'></div></div></div>","</div>","<div class='sp-input-container sp-cf'>","<input class='sp-input' type='text' spellcheck='false'  />","</div>","<div class='sp-initial sp-thumb sp-cf'></div>","<div class='sp-button-container sp-cf'>","<a class='sp-cancel' href='#'></a>","<button type='button' class='sp-choose'></button>","</div>","</div>","</div>"].join("")}();function l(e,r,a,n){for(var o=[],s=0;s<e.length;s++){var l=e[s];if(l){var c=tinycolor(l),f=c.toHsl().l<.5?"sp-thumb-el sp-thumb-dark":"sp-thumb-el sp-thumb-light";f+=tinycolor.equals(r,l)?" sp-thumb-active":"";var h=c.toString(n.preferredFormat||"rgb"),u=i?"background-color:"+c.toRgbString():"filter:"+c.toFilter();o.push('<span title="'+h+'" data-color="'+c.toRgbString()+'" class="'+f+'"><span class="sp-thumb-inner" style="'+u+';"></span></span>')}else{o.push(t("<div />").append(t('<span data-color="" style="background-color:transparent;" class="sp-clear-display"></span>').attr("title",n.noColorSelectedText)).html())}}return"<div class='sp-cf "+a+"'>"+o.join("")+"</div>"}function c(c,f){var g,b,v,m,y=function(e,a){var n=t.extend({},r,e);return n.callbacks={move:u(n.move,a),change:u(n.change,a),show:u(n.show,a),hide:u(n.hide,a),beforeShow:u(n.beforeShow,a)},n}(f,c),w=y.flat,_=y.showSelectionPalette,x=y.localStorageKey,k=y.theme,S=y.callbacks,C=(g=Kt,b=10,function(){var t=this,e=arguments;v&&clearTimeout(m),!v&&m||(m=setTimeout(function(){m=null,g.apply(t,e)},b))}),P=!1,A=!1,M=0,R=0,H=0,F=0,T=0,O=0,q=0,N=0,j=0,E=0,D=1,I=[],z=[],B={},L=y.selectionPalette.slice(0),K=y.maxSelectionSize,V="sp-dragging",$=null,W=c.ownerDocument,X=(W.body,t(c)),Y=!1,G=t(s,W).addClass(k),Q=G.find(".sp-picker-container"),J=G.find(".sp-color"),U=G.find(".sp-dragger"),Z=G.find(".sp-hue"),tt=G.find(".sp-slider"),et=G.find(".sp-alpha-inner"),rt=G.find(".sp-alpha"),at=G.find(".sp-alpha-handle"),nt=G.find(".sp-input"),it=G.find(".sp-palette"),ot=G.find(".sp-initial"),st=G.find(".sp-cancel"),lt=G.find(".sp-clear"),ct=G.find(".sp-choose"),ft=G.find(".sp-palette-toggle"),ht=X.is("input"),ut=ht&&"color"===X.attr("type")&&p(),dt=ht&&!w,pt=dt?t(o).addClass(k).addClass(y.className).addClass(y.replacerClassName):t([]),gt=dt?pt:X,bt=pt.find(".sp-preview-inner"),vt=y.color||ht&&X.val(),mt=!1,yt=y.preferredFormat,wt=!y.showButtons||y.clickoutFiresChange,_t=!vt,xt=y.allowEmpty&&!ut;function kt(){if(y.showPaletteOnly&&(y.showPalette=!0),ft.text(y.showPaletteOnly?y.togglePaletteMoreText:y.togglePaletteLessText),y.palette){I=y.palette.slice(0),z=t.isArray(I[0])?I:[I],B={};for(var e=0;e<z.length;e++)for(var r=0;r<z[e].length;r++){var a=tinycolor(z[e][r]).toRgbString();B[a]=!0}}G.toggleClass("sp-flat",w),G.toggleClass("sp-input-disabled",!y.showInput),G.toggleClass("sp-alpha-enabled",y.showAlpha),G.toggleClass("sp-clear-enabled",xt),G.toggleClass("sp-buttons-disabled",!y.showButtons),G.toggleClass("sp-palette-buttons-disabled",!y.togglePaletteOnly),G.toggleClass("sp-palette-disabled",!y.showPalette),G.toggleClass("sp-palette-only",y.showPaletteOnly),G.toggleClass("sp-initial-disabled",!y.showInitial),G.addClass(y.className).addClass(y.containerClassName),Kt()}function St(){if(x&&window.localStorage){try{var e=window.localStorage[x].split(",#");e.length>1&&(delete window.localStorage[x],t.each(e,function(t,e){Ct(e)}))}catch(r){}try{L=window.localStorage[x].split(";")}catch(r){}}}function Ct(e){if(_){var r=tinycolor(e).toRgbString();if(!B[r]&&-1===t.inArray(r,L))for(L.push(r);L.length>K;)L.shift();if(x&&window.localStorage)try{window.localStorage[x]=L.join(";")}catch(a){}}}function Pt(){var e=Dt(),r=t.map(z,function(t,r){return l(t,e,"sp-palette-row sp-palette-row-"+r,y)});St(),L&&r.push(l(function(){var t=[];if(y.showPalette)for(var e=0;e<L.length;e++){var r=tinycolor(L[e]).toRgbString();B[r]||t.push(L[e])}return t.reverse().slice(0,y.maxSelectionSize)}(),e,"sp-palette-row sp-palette-row-selection",y)),it.html(r.join(""))}
vendor: 7,003 bytes, line 47
47function At(){if(y.showInitial){var t=mt,e=Dt();ot.html(l([t,e],e,"sp-palette-row-initial",y))}}function Mt(){(R<=0||M<=0||F<=0)&&Kt(),A=!0,G.addClass(V),$=null,X.trigger("dragstart.spectrum",[Dt()])}function Rt(){A=!1,G.removeClass(V),X.trigger("dragstop.spectrum",[Dt()])}function Ht(){var t=nt.val();if(null!==t&&""!==t||!xt){var e=tinycolor(t);e.isValid()?(Et(e),It(),Lt()):nt.addClass("sp-validation-error")}else Et(null),It(),Lt()}function Ft(){P?Nt():Tt()}function Tt(){var e=t.Event("beforeShow.spectrum");P?Kt():(X.trigger(e,[Dt()]),!1===S.beforeShow(Dt())||e.isDefaultPrevented()||(!function(){for(var t=0;t<a.length;t++)a[t]&&a[t].hide()}(),P=!0,t(W).on("keydown.spectrum",Ot),t(W).on("click.spectrum",qt),t(window).on("resize.spectrum",C),pt.addClass("sp-active"),G.removeClass("sp-hidden"),Kt(),zt(),mt=Dt(),At(),S.show(mt),X.trigger("show.spectrum",[mt])))}function Ot(t){27===t.keyCode&&Nt()}function qt(t){2!=t.button&&(A||(wt?Lt(!0):jt(),Nt()))}function Nt(){P&&!w&&(P=!1,t(W).off("keydown.spectrum",Ot),t(W).off("click.spectrum",qt),t(window).off("resize.spectrum",C),pt.removeClass("sp-active"),G.addClass("sp-hidden"),S.hide(Dt()),X.trigger("hide.spectrum",[Dt()]))}function jt(){Et(mt,!0),Lt(!0)}function Et(t,e){var r,a;tinycolor.equals(t,Dt())?zt():(!t&&xt?_t=!0:(_t=!1,a=(r=tinycolor(t)).toHsv(),N=a.h%360/360,j=a.s,E=a.v,D=a.a),zt(),r&&r.isValid()&&!e&&(yt=y.preferredFormat||r.getFormat()))}function Dt(t){return t=t||{},xt&&_t?null:tinycolor.fromRatio({h:N,s:j,v:E,a:Math.round(1e3*D)/1e3},{format:t.format||yt})}function It(){zt(),S.move(Dt()),X.trigger("move.spectrum",[Dt()])}function zt(){nt.removeClass("sp-validation-error"),Bt();var t=tinycolor.fromRatio({h:N,s:1,v:1});J.css("background-color",t.toHexString());var e=yt;D<1&&(0!==D||"name"!==e)&&("hex"!==e&&"hex3"!==e&&"hex6"!==e&&"name"!==e||(e="rgb"));var r=Dt({format:e}),a="";if(bt.removeClass("sp-clear-display"),bt.css("background-color","transparent"),!r&&xt)bt.addClass("sp-clear-display");else{var o=r.toHexString(),s=r.toRgbString();if(i||1===r.alpha?bt.css("background-color",s):(bt.css("background-color","transparent"),bt.css("filter",r.toFilter())),y.showAlpha){var l=r.toRgb();l.a=0;var c=tinycolor(l).toRgbString(),f="linear-gradient(left, "+c+", "+o+")";n?et.css("filter",tinycolor(c).toFilter({gradientType:1},o)):(et.css("background","-webkit-"+f),et.css("background","-moz-"+f),et.css("background","-ms-"+f),et.css("background","linear-gradient(to right, "+c+", "+o+")"))}a=r.toString(e)}y.showInput&&nt.val(a),y.showPalette&&Pt(),At()}function Bt(){var t=j,e=E;if(xt&&_t)at.hide(),tt.hide(),U.hide();else{at.show(),tt.show(),U.show();var r=t*M,a=R-e*R;r=Math.max(-H,Math.min(M-H,r-H)),a=Math.max(-H,Math.min(R-H,a-H)),U.css({top:a+"px",left:r+"px"});var n=D*T;at.css({left:n-O/2+"px"});var i=N*F;tt.css({top:i-q+"px"})}}function Lt(t){var e=Dt(),r="",a=!tinycolor.equals(e,mt);e&&(r=e.toString(yt),Ct(e)),ht&&X.val(r),t&&a&&(S.change(e),X.trigger("change",[e]))}function Kt(){var e,r,a,n,i,o,s,l,c,f,h,u;P&&(M=J.width(),R=J.height(),H=U.height(),Z.width(),F=Z.height(),q=tt.height(),T=rt.width(),O=at.width(),w||(G.css("position","absolute"),y.offset?G.offset(y.offset):G.offset((r=gt,a=(e=G).outerWidth(),n=e.outerHeight(),i=r.outerHeight(),o=e[0].ownerDocument,s=o.documentElement,l=s.clientWidth+t(o).scrollLeft(),c=s.clientHeight+t(o).scrollTop(),f=r.offset(),h=f.left,u=f.top,u+=i,h-=Math.min(h,h+a>l&&l>a?Math.abs(h+a-l):0),{top:u-=Math.min(u,u+n>c&&c>n?Math.abs(n+i-0):0),bottom:f.bottom,left:h,right:f.right,width:f.width,height:f.height}))),Bt(),y.showPalette&&Pt(),X.trigger("reflow.spectrum"))}function Vt(){Nt(),Y=!0,X.attr("disabled",!0),gt.addClass("sp-disabled")}!function(){if(n&&G.find("*:not(input)").attr("unselectable","on"),kt(),dt&&X.after(pt).hide(),xt||lt.hide(),w)X.after(G).hide();else{var e="parent"===y.appendTo?X.parent():t(y.appendTo);1!==e.length&&(e=t("body")),e.append(G)}function r(e){return e.data&&e.data.ignore?(Et(t(e.target).closest(".sp-thumb-el").data("color")),It()):(Et(t(e.target).closest(".sp-thumb-el").data("color")),It(),y.hideAfterPaletteSelect?(Lt(!0),Nt()):Lt()),!1}St(),gt.on("click.spectrum touchstart.spectrum",function(e){Y||Ft(),e.stopPropagation(),t(e.target).is("input")||e.preventDefault()}),(X.is(":disabled")||!0===y.disabled)&&Vt(),G.click(h),nt.change(Ht),nt.on("paste",function(){setTimeout(Ht,1)}),nt.keydown(function(t){13==t.keyCode&&Ht()}),st.text(y.cancelText),st.on("click.spectrum",function(t){t.stopPropagation(),t.preventDefault(),jt(),Nt()}),lt.attr("title",y.clearText),lt.on("click.spectrum",function(t){t.stopPropagation(),t.preventDefault(),_t=!0,It(),w&&Lt(!0)}),ct.text(y.chooseText),ct.on("click.spectrum",function(t){t.stopPropagation(),t.preventDefault(),n&&nt.is(":focus")&&nt.trigger("change"),nt.hasClass("sp-validation-error")||(Lt(!0),Nt())}),ft.text(y.showPaletteOnly?y.togglePaletteMoreText:y.togglePaletteLessText),ft.on("click.spectrum",function(t){t.stopPropagation(),t.preventDefault(),y.showPaletteOnly=!y.showPaletteOnly,y.showPaletteOnly||w||G.css("left","-="+(Q.outerWidth(!0)+5)),kt()}),d(rt,function(t,e,r){D=t/T,_t=!1,r.shiftKey&&(D=Math.round(10*D)/10),It()},Mt,Rt),d(Z,function(t,e){N=parseFloat(e/F),_t=!1,y.showAlpha||(D=1),It()},Mt,Rt),d(J,function(t,e,r){if(r.shiftKey){if(!$){var a=j*M,n=R-E*R,i=Math.abs(t-a)>Math.abs(e-n);$=i?"x":"y"}}else $=null;var o=!$||"y"===$;(!$||"x"===$)&&(j=parseFloat(t/M)),o&&(E=parseFloat((R-e)/R)),_t=!1,y.showAlpha||(D=1),It()},Mt,Rt),vt?(Et(vt),zt(),yt=y.preferredFormat||tinycolor(vt).format,Ct(vt)):zt(),w&&Tt();var a=n?"mousedown.spectrum":"click.spectrum touchstart.spectrum";it.on(a,".sp-thumb-el",r),ot.on(a,".sp-thumb-el:nth-child(1)",{ignore:!0},r)}();var $t={show:Tt,hide:Nt,toggle:Ft,reflow:Kt,option:function(r,a){return r===e?t.extend({},y):a===e?y[r]:(y[r]=a,"preferredFormat"===r&&(yt=y.preferredFormat),void kt())},enable:function(){Y=!1,X.attr("disabled",!1),gt.removeClass("sp-disabled")},disable:Vt,offset:function(t){y.offset=t,Kt()},set:function(t){Et(t),Lt()},get:Dt,destroy:function(){X.show(),gt.off("click.spectrum touchstart.spectrum"),G.remove(),pt.remove(),a[$t.id]=null},container:G};return $t.id=a.push($t)-1,$t}function f(){}function h(t){t.stopPropagation()}function u(t,e){var r=Array.prototype.slice,a=r.call(arguments,2);return function(){return t.apply(e,a.concat(r.call(arguments)))}}function d(e,r,a,i){r=r||function(){},a=a||function(){},i=i||function(){};var o=document,s=!1,l={},c=0,f=0,h="ontouchstart"in window,u={};function d(t){t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault(),t.returnValue=!1}function p(t){if(s){if(n&&o.documentMode<9&&!t.button)return g();var a=t.originalEvent&&t.originalEvent.touches&&t.originalEvent.touches[0],i=a&&a.pageX||t.pageX,u=a&&a.pageY||t.pageY,p=Math.max(0,Math.min(i-l.left,f)),b=Math.max(0,Math.min(u-l.top,c));h&&d(t),r.apply(e,[p,b,t])}}function g(){s&&(t(o).off(u),t(o.body).removeClass("sp-dragging"),setTimeout(function(){i.apply(e,arguments)}
vendor: 12,282 bytes, line 47
47,0)),s=!1}u.selectstart=d,u.dragstart=d,u["touchmove mousemove"]=p,u["touchend mouseup"]=g,t(e).on("touchstart mousedown",function(r){(r.which?3==r.which:2==r.button)||s||!1!==a.apply(e,arguments)&&(s=!0,c=t(e).height(),f=t(e).width(),l=t(e).offset(),t(o).on(u),t(o.body).addClass("sp-dragging"),p(r),d(r))})}function p(){return t.fn.spectrum.inputTypeColorSupport()}t.fn.spectrum=function(e,r){if("string"==typeof e){var n=this,i=Array.prototype.slice.call(arguments,1);return this.each(function(){var r=a[t(this).data("spectrum.id")];if(r){var o=r[e];if(!o)throw new Error("Spectrum: no such method: '"+e+"'");"get"==e?n=r.get():"container"==e?n=r.container:"option"==e?n=r.option.apply(r,i):"destroy"==e?(r.destroy(),t(this).removeData("spectrum.id")):o.apply(r,i)}}),n}return this.spectrum("destroy").each(function(){var r=c(this,t.extend({},t(this).data(),e));t(this).data("spectrum.id",r.id)})},t.fn.spectrum.load=!0,t.fn.spectrum.loadOpts={},t.fn.spectrum.draggable=d,t.fn.spectrum.defaults=r,t.fn.spectrum.inputTypeColorSupport=function e(){if(void 0===e._cachedResult){var r=t("<input type='color'/>")[0];e._cachedResult="color"===r.type&&""!==r.value}return e._cachedResult},t.spectrum={},t.spectrum.localization={},t.spectrum.palettes={},t.fn.spectrum.processNativeColorInputs=function(){var e=t("input[type=color]");e.length&&!p()&&e.spectrum({preferredFormat:"hex6"})},function(){var t=/^[\s,#]+/,e=/\s+$/,r=0,a=Math,n=a.round,i=a.min,o=a.max,s=a.random,l=function(s,c){if(c=c||{},(s=s||"")instanceof l)return s;if(!(this instanceof l))return new l(s,c);var f=function(r){var n={r:0,g:0,b:0},s=1,l=!1,c=!1;"string"==typeof r&&(r=function(r){r=r.replace(t,"").replace(e,"").toLowerCase();var a,n=!1;if(P[r])r=P[r],n=!0;else if("transparent"==r)return{r:0,g:0,b:0,a:0,format:"name"};if(a=E.rgb.exec(r))return{r:a[1],g:a[2],b:a[3]};if(a=E.rgba.exec(r))return{r:a[1],g:a[2],b:a[3],a:a[4]};if(a=E.hsl.exec(r))return{h:a[1],s:a[2],l:a[3]};if(a=E.hsla.exec(r))return{h:a[1],s:a[2],l:a[3],a:a[4]};if(a=E.hsv.exec(r))return{h:a[1],s:a[2],v:a[3]};if(a=E.hsva.exec(r))return{h:a[1],s:a[2],v:a[3],a:a[4]};if(a=E.hex8.exec(r))return{a:(i=a[1],F(i)/255),r:F(a[2]),g:F(a[3]),b:F(a[4]),format:n?"name":"hex8"};var i;if(a=E.hex6.exec(r))return{r:F(a[1]),g:F(a[2]),b:F(a[3]),format:n?"name":"hex"};if(a=E.hex3.exec(r))return{r:F(a[1]+""+a[1]),g:F(a[2]+""+a[2]),b:F(a[3]+""+a[3]),format:n?"name":"hex"};return!1}(r));"object"==typeof r&&(r.hasOwnProperty("r")&&r.hasOwnProperty("g")&&r.hasOwnProperty("b")?(f=r.r,h=r.g,u=r.b,n={r:255*R(f,255),g:255*R(h,255),b:255*R(u,255)},l=!0,c="%"===String(r.r).substr(-1)?"prgb":"rgb"):r.hasOwnProperty("h")&&r.hasOwnProperty("s")&&r.hasOwnProperty("v")?(r.s=O(r.s),r.v=O(r.v),n=function(t,e,r){t=6*R(t,360),e=R(e,100),r=R(r,100);var n=a.floor(t),i=t-n,o=r*(1-e),s=r*(1-i*e),l=r*(1-(1-i)*e),c=n%6;return{r:255*[r,s,o,o,l,r][c],g:255*[l,r,r,s,o,o][c],b:255*[o,o,l,r,r,s][c]}}(r.h,r.s,r.v),l=!0,c="hsv"):r.hasOwnProperty("h")&&r.hasOwnProperty("s")&&r.hasOwnProperty("l")&&(r.s=O(r.s),r.l=O(r.l),n=function(t,e,r){var a,n,i;function o(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}if(t=R(t,360),e=R(e,100),r=R(r,100),0===e)a=n=i=r;else{var s=r<.5?r*(1+e):r+e-r*e,l=2*r-s;a=o(l,s,t+1/3),n=o(l,s,t),i=o(l,s,t-1/3)}return{r:255*a,g:255*n,b:255*i}}(r.h,r.s,r.l),l=!0,c="hsl"),r.hasOwnProperty("a")&&(s=r.a));var f,h,u;return s=M(s),{ok:l,format:r.format||c,r:i(255,o(n.r,0)),g:i(255,o(n.g,0)),b:i(255,o(n.b,0)),a:s}}(s);this._originalInput=s,this._r=f.r,this._g=f.g,this._b=f.b,this._a=f.a,this._roundA=n(1e3*this._a)/1e3,this._format=c.format||f.format,this._gradientType=c.gradientType,this._r<1&&(this._r=n(this._r)),this._g<1&&(this._g=n(this._g)),this._b<1&&(this._b=n(this._b)),this._ok=f.ok,this._tc_id=r++};function c(t,e,r){t=R(t,255),e=R(e,255),r=R(r,255);var a,n,s=o(t,e,r),l=i(t,e,r),c=(s+l)/2;if(s==l)a=n=0;else{var f=s-l;switch(n=c>.5?f/(2-s-l):f/(s+l),s){case t:a=(e-r)/f+(e<r?6:0);break;case e:a=(r-t)/f+2;break;case r:a=(t-e)/f+4}a/=6}return{h:a,s:n,l:c}}function f(t,e,r){t=R(t,255),e=R(e,255),r=R(r,255);var a,n,s=o(t,e,r),l=i(t,e,r),c=s,f=s-l;if(n=0===s?0:f/s,s==l)a=0;else{switch(s){case t:a=(e-r)/f+(e<r?6:0);break;case e:a=(r-t)/f+2;break;case r:a=(t-e)/f+4}a/=6}return{h:a,s:n,v:c}}function h(t,e,r,a){var i=[T(n(t).toString(16)),T(n(e).toString(16)),T(n(r).toString(16))];return a&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function u(t,e,r,a){var i;return[T((i=a,Math.round(255*parseFloat(i)).toString(16))),T(n(t).toString(16)),T(n(e).toString(16)),T(n(r).toString(16))].join("")}function d(t,e){e=0===e?0:e||10;var r=l(t).toHsl();return r.s-=e/100,r.s=H(r.s),l(r)}function p(t,e){e=0===e?0:e||10;var r=l(t).toHsl();return r.s+=e/100,r.s=H(r.s),l(r)}function g(t){return l(t).desaturate(100)}function b(t,e){e=0===e?0:e||10;var r=l(t).toHsl();return r.l+=e/100,r.l=H(r.l),l(r)}function v(t,e){e=0===e?0:e||10;var r=l(t).toRgb();return r.r=o(0,i(255,r.r-n(-e/100*255))),r.g=o(0,i(255,r.g-n(-e/100*255))),r.b=o(0,i(255,r.b-n(-e/100*255))),l(r)}function m(t,e){e=0===e?0:e||10;var r=l(t).toHsl();return r.l-=e/100,r.l=H(r.l),l(r)}function y(t,e){var r=l(t).toHsl(),a=(n(r.h)+e)%360;return r.h=a<0?360+a:a,l(r)}function w(t){var e=l(t).toHsl();return e.h=(e.h+180)%360,l(e)}function _(t){var e=l(t).toHsl(),r=e.h;return[l(t),l({h:(r+120)%360,s:e.s,l:e.l}),l({h:(r+240)%360,s:e.s,l:e.l})]}function x(t){var e=l(t).toHsl(),r=e.h;return[l(t),l({h:(r+90)%360,s:e.s,l:e.l}),l({h:(r+180)%360,s:e.s,l:e.l}),l({h:(r+270)%360,s:e.s,l:e.l})]}function k(t){var e=l(t).toHsl(),r=e.h;return[l(t),l({h:(r+72)%360,s:e.s,l:e.l}),l({h:(r+216)%360,s:e.s,l:e.l})]}function S(t,e,r){e=e||6,r=r||30;var a=l(t).toHsl(),n=360/r,i=[l(t)];for(a.h=(a.h-(n*e>>1)+720)%360;--e;)a.h=(a.h+n)%360,i.push(l(a));return i}function C(t,e){e=e||6;for(var r=l(t).toHsv(),a=r.h,n=r.s,i=r.v,o=[],s=1/e;e--;)o.push(l({h:a,s:n,v:i})),i=(i+s)%1;return o}l.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},setAlpha:function(t){return this._a=M(t),this._roundA=n(1e3*this._a)/1e3,this},toHsv:function(){var t=f(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=f(this._r,this._g,this._b),e=n(360*t.h),r=n(100*t.s),a=n(100*t.v);return 1==this._a?"hsv("+e+", "+r+"%, "+a+"%)":"hsva("+e+", "+r+"%, "+a+"%, "+this._roundA+")"},toHsl:function(){var t=c(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=c(this._r,this._g,this._b),e=n(360*t.h),r=n(100*t.s),a=n(100*t.l);return 1==this._a?"hsl("+e+", "+r+"%, "+a+"%)":"hsla("+e+", "+r+"%, "+a+"%, "+this._roundA+")"},toHex:function(t){return h(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(){return u(this._r,this._g,this._b,this._a)},toHex8String:function(){return"#"+this.toHex8()},toRgb:function(){return{r:n(this._r),g:n(this._g),b:n(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+n(this._r)+", "+n(this._g)+", "+n(this._b)+")":"rgba("+n(this._r)+", "+n(this._g)+", "+n(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:n(100*R(this._r,255))+"%",g:n(100*R(this._g,255))+"%",b:n(100*R(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+n(100*R(this._r,255))+"%, "+n(100*R(this._g,255))+"%, "+n(100*R(this._b,255))+"%)":"rgba("+n(100*R(this._r,255))+"%, "+n(100*R(this._g,255))+"%, "+n(100*R(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(A[h(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var e="#"+u(this._r,this._g,this._b,this._a),r=e,a=this._gradientType?"GradientType = 1, ":"";t&&(r=l(t).toHex8String());return"progid:DXImageTransform.Microsoft.gradient("+a+"startColorstr="+e+",endColorstr="+r+")"},toString:function(t){var e=!!t;t=t||this._format;var r=!1,a=this._a<1&&this._a>=0;return e||!a||"hex"!==t&&"hex6"!==t&&"hex3"!==t&&"name"!==t?("rgb"===t&&(r=this.toRgbString()),"prgb"===t&&(r=this.toPercentageRgbString()),"hex"!==t&&"hex6"!==t||(r=this.toHexString()),"hex3"===t&&(r=this.toHexString(!0)),"hex8"===t&&(r=this.toHex8String()),"name"===t&&(r=this.toName()),"hsl"===t&&(r=this.toHslString()),"hsv"===t&&(r=this.toHsvString()),r||this.toHexString()):"name"===t&&0===this._a?this.toName():this.toRgbString()},_applyModification:function(t,e){var r=t.apply(null,[this].concat([].slice.call(e)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(b,arguments)},brighten:function(){return this._applyModification(v,arguments)},darken:function(){return this._applyModification(m,arguments)},desaturate:function(){return this._applyModification(d,arguments)},saturate:function(){return this._applyModification(p,arguments)},greyscale:function(){return this._applyModification(g,arguments)},spin:function(){return this._applyModification(y,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(S,arguments)},complement:function(){return this._applyCombination(w,arguments)},monochromatic:function(){return this._applyCombination(C,arguments)},splitcomplement:function(){return this._applyCombination(k,arguments)},triad:function(){return this._applyCombination(_,arguments)},tetrad:function(){return this._applyCombination(x,arguments)}},l.fromRatio=function(t,e){if("object"==typeof t){var r={};for(var a in t)t.hasOwnProperty(a)&&(r[a]="a"===a?t[a]:O(t[a]));t=r}return l(t,e)},l.equals=function(t,e){return!(!t||!e)&&l(t).toRgbString()==l(e).toRgbString()},l.random=function(){return l.fromRatio({r:s(),g:s(),b:s()})},l.mix=function(t,e,r){r=0===r?0:r||50;var a,n=l(t).toRgb(),i=l(e).toRgb(),o=r/100,s=2*o-1,c=i.a-n.a,f=1-(a=((a=s*c==-1?s:(s+c)/(1+s*c))+1)/2),h={r:i.r*a+n.r*f,g:i.g*a+n.g*f,b:i.b*a+n.b*f,a:i.a*o+n.a*(1-o)};return l(h)},l.readability=function(t,e){var r=l(t),a=l(e),n=r.toRgb(),i=a.toRgb(),o=r.getBrightness(),s=a.getBrightness(),c=Math.max(n.r,i.r)-Math.min(n.r,i.r)+Math.max(n.g,i.g)-Math.min(n.g,i.g)+Math.max(n.b,i.b)-Math.min(n.b,i.b);return{brightness:Math.abs(o-s),color:c}},l.isReadable=function(t,e){var r=l.readability(t,e);return r.brightness>125&&r.color>500},l.mostReadable=function(t,e){for(var r=null,a=0,n=!1,i=0;i<e.length;i++){var o=l.readability(t,e[i]),s=o.brightness>125&&o.color>500,c=o.brightness/125*3+o.color/500;(s&&!n||s&&n&&c>a||!s&&!n&&c>a)&&(n=s,a=c,r=l(e[i]))}return r};var P=l.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee9
470",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},A=l.hexNames=function(t){var e={};for(var r in t)t.hasOwnProperty(r)&&(e[t[r]]=r);return e}(P);function M(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function R(t,e){(function(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===parseFloat(t)})(t)&&(t="100%");var r=function(t){return"string"==typeof t&&-1!=t.indexOf("%")}(t);return t=i(e,o(0,parseFloat(t))),r&&(t=parseInt(t*e,10)/100),a.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function H(t){return i(1,o(0,t))}function F(t){return parseInt(t,16)}function T(t){return 1==t.length?"0"+t:""+t}function O(t){return t<=1&&(t=100*t+"%"),t}var q,N,j,E=(N="[\\s|\\(]+("+(q="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+q+")[,|\\s]+("+q+")\\s*\\)?",j="[\\s|\\(]+("+q+")[,|\\s]+("+q+")[,|\\s]+("+q+")[,|\\s]+("+q+")\\s*\\)?",{rgb:new RegExp("rgb"+N),rgba:new RegExp("rgba"+j),hsl:new RegExp("hsl"+N),hsla:new RegExp("hsla"+j),hsv:new RegExp("hsv"+N),hsva:new RegExp("hsva"
vendor: 32,529 bytes, lines 47-54
47+j),hex3:/^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex8:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});window.tinycolor=l}(),t(function(){t.fn.spectrum.load&&t.fn.spectrum.processNativeColorInputs()})});
48},{"jquery":"HlZQ"}],"n0k7":[function(require,module,exports) {
49!function(e){var t=e.spectrum.localization.pl={cancelText:"Anuluj",chooseText:"Wybierz",clearText:"Usuń wybór koloru",noColorSelectedText:"Nie wybrano koloru",togglePaletteMoreText:"Więcej",togglePaletteLessText:"Mniej"};e.extend(e.fn.spectrum.defaults,t)}(jQuery);
50},{}],"OEzi":[function(require,module,exports) {
51var define;
52var global = arguments[3];
53var process = require("process");
54var e,t=arguments[3],n=require("process");!function(t,n){if("object"==typeof exports&&"object"==typeof module)module.exports=n();else if("function"==typeof e&&e.amd)e([],n);else{var r=n();for(var i in r)("object"==typeof exports?exports:t)[i]=r[i]}}(self,function(){return function(){var e={3099:function(e){e.exports=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}},6077:function(e,t,n){var r=n(111);e.exports=function(e){if(!r(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e}},1223:function(e,t,n){var r=n(5112),i=n(30),o=n(3070),a=r("unscopables"),u=Array.prototype;null==u[a]&&o.f(u,a,{configurable:!0,value:i(null)}),e.exports=function(e){u[a][e]=!0}},1530:function(e,t,n){"use strict";var r=n(8710).charAt;e.exports=function(e,t,n){return t+(n?r(e,t).length:1)}},5787:function(e){e.exports=function(e,t,n){if(!(e instanceof t))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return e}},9670:function(e,t,n){var r=n(111);e.exports=function(e){if(!r(e))throw TypeError(String(e)+" is not an object");return e}},4019:function(e){e.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},260:function(e,t,n){"use strict";var r,i=n(4019),o=n(9781),a=n(7854),u=n(111),s=n(6656),l=n(648),c=n(8880),f=n(1320),p=n(3070).f,h=n(9518),d=n(7674),v=n(5112),y=n(9711),g=a.Int8Array,m=g&&g.prototype,b=a.Uint8ClampedArray,x=b&&b.prototype,w=g&&h(g),E=m&&h(m),k=Object.prototype,A=k.isPrototypeOf,S=v("toStringTag"),T=y("TYPED_ARRAY_TAG"),F=i&&!!d&&"Opera"!==l(a.opera),L=!1,C={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},R={BigInt64Array:8,BigUint64Array:8},I=function(e){if(!u(e))return!1;var t=l(e);return s(C,t)||s(R,t)};for(r in C)a[r]||(F=!1);if((!F||"function"!=typeof w||w===Function.prototype)&&(w=function(){throw TypeError("Incorrect invocation")},F))for(r in C)a[r]&&d(a[r],w);if((!F||!E||E===k)&&(E=w.prototype,F))for(r in C)a[r]&&d(a[r].prototype,E);if(F&&h(x)!==E&&d(x,E),o&&!s(E,S))for(r in L=!0,p(E,S,{get:function(){return u(this)?this[T]:void 0}}),C)a[r]&&c(a[r],T,r);e.exports={NATIVE_ARRAY_BUFFER_VIEWS:F,TYPED_ARRAY_TAG:L&&T,aTypedArray:function(e){if(I(e))return e;throw TypeError("Target is not a typed array")},aTypedArrayConstructor:function(e){if(d){if(A.call(w,e))return e}else for(var t in C)if(s(C,r)){var n=a[t];if(n&&(e===n||A.call(n,e)))return e}throw TypeError("Target is not a typed array constructor")},exportTypedArrayMethod:function(e,t,n){if(o){if(n)for(var r in C){var i=a[r];i&&s(i.prototype,e)&&delete i.prototype[e]}E[e]&&!n||f(E,e,n?t:F&&m[e]||t)}},exportTypedArrayStaticMethod:function(e,t,n){var r,i;if(o){if(d){if(n)for(r in C)(i=a[r])&&s(i,e)&&delete i[e];if(w[e]&&!n)return;try{return f(w,e,n?t:F&&g[e]||t)}catch(u){}}for(r in C)!(i=a[r])||i[e]&&!n||f(i,e,t)}},isView:function(e){if(!u(e))return!1;var t=l(e);return"DataView"===t||s(C,t)||s(R,t)},isTypedArray:I,TypedArray:w,TypedArrayPrototype:E}},3331:function(e,t,n){"use strict";var r=n(7854),i=n(9781),o=n(4019),a=n(8880),u=n(2248),s=n(7293),l=n(5787),c=n(9958),f=n(7466),p=n(7067),h=n(1179),d=n(9518),v=n(7674),y=n(8006).f,g=n(3070).f,m=n(1285),b=n(8003),x=n(9909),w=x.get,E=x.set,k=r.ArrayBuffer,A=k,S=r.DataView,T=S&&S.prototype,F=Object.prototype,L=r.RangeError,C=h.pack,R=h.unpack,I=function(e){return[255&e]},U=function(e){return[255&e,e>>8&255]},_=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},O=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},M=function(e){return C(e,23,4)},z=function(e){return C(e,52,8)},P=function(e,t){g(e.prototype,t,{get:function(){return w(this)[t]}})},j=function(e,t,n,r){var i=p(n),o=w(e);if(i+t>o.byteLength)throw L("Wrong index");var a=w(o.buffer).bytes,u=i+o.byteOffset,s=a.slice(u,u+t);return r?s:s.reverse()},D=function(e,t,n,r,i,o){var a=p(n),u=w(e);if(a+t>u.byteLength)throw L("Wrong index");for(var s=w(u.buffer).bytes,l=a+u.byteOffset,c=r(+i),f=0;f<t;f++)s[l+f]=c[o?f:t-f-1]};if(o){if(!s(function(){k(1)})||!s(function(){new k(-1)})||s(function(){return new k,new k(1.5),new k(NaN),"ArrayBuffer"!=k.name})){for(var N,B=(A=function(e){return l(this,A),new k(p(e))}).prototype=k.prototype,q=y(k),W=0;q.length>W;)(N=q[W++])in A||a(A,N,k[N]);B.constructor=A}v&&d(T)!==F&&v(T,F);var H=new S(new A(2)),Y=T.setInt8;H.setInt8(0,2147483648),H.setInt8(1,2147483649),!H.getInt8(0)&&H.getInt8(1)||u(T,{setInt8:function(e,t){Y.call(this,e,t<<24>>24)},setUint8:function(e,t){Y.call(this,e,t<<24>>24)}},{unsafe:!0})}else A=function(e){l(this,A,"ArrayBuffer");var t=p(e);E(this,{bytes:m.call(new Array(t),0),byteLength:t}),i||(this.byteLength=t)},S=function(e,t,n){l(this,S,"DataView"),l(e,A,"DataView");var r=w(e).byteLength,o=c(t);if(o<0||o>r)throw L("Wrong offset");if(o+(n=void 0===n?r-o:f(n))>r)throw L("Wrong length");E(this,{buffer:e,byteLength:n,byteOffset:o}),i||(this.buffer=e,this.byteLength=n,this.byteOffset=o)},i&&(P(A,"byteLength"),P(S,"buffer"),P(S,"byteLength"),P(S,"byteOffset")),u(S.prototype,{getInt8:function(e){return j(this,1,e)[0]<<24>>24},getUint8:function(e){return j(this,1,e)[0]},getInt16:function(e){var t=j(this,2,e,arguments.length>1?arguments[1]:void 0);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=j(this,2,e,arguments.length>1?arguments[1]:void 0);return t[1]<<8|t[0]},getInt32:function(e){return O(j(this,4,e,arguments.length>1?arguments[1]:void 0))},getUint32:function(e){return O(j(this,4,e,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(e){return R(j(this,4,e,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(e){return R(j(this,8,e,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(e,t){D(this,1,e,I,t)},setUint8:function(e,t){D(this,1,e,I,t)},setInt16:function(e,t){D(this,2,e,U,t,arguments.length>2?arguments[2]:void 0)},setUint16:function(e,t){D(this,2,e,U,t,arguments.length>2?arguments[2]:void 0)},setInt32:function(e,t){D(this,4,e,_,t,arguments.length>2?arguments[2]:void 0)},setUint32:function(e,t){D(this,4,e,_,t,arguments.length>2?arguments[2]:void 0)},setFloat32:function(e,t){D(this,4,e,M,t,arguments.length>2?arguments[2]:void 0)},setFloat64:function(e,t){D(this,8,e,z,t,arguments.length>2?arguments[2]:void 0)}});b(A,"ArrayBuffer"),b(S,"DataView"),e.exports={ArrayBuffer:A,DataView:S}},1048:function(e,t,n){"use strict";var r=n(7908),i=n(1400),o=n(7466),a=Math.min;e.exports=[].copyWithin||function(e,t){var n=r(this),u=o(n.length),s=i(e,u),l=i(t,u),c=arguments.length>2?arguments[2]:void 0,f=a((void 0===c?u:i(c,u))-l,u-s),p=1;for(l<s&&s<l+f&&(p=-1,l+=f-1,s+=f-1);f-- >0;)l in n?n[s]=n[l]:delete n[s],s+=p,l+=p;return n}},1285:function(e,t,n){"use strict";var r=n(7908),i=n(1400),o=n(7466);e.exports=function(e){for(var t=r(this),n=o(t.length),a=arguments.length,u=i(a>1?arguments[1]:void 0,n),s=a>2?arguments[2]:void 0,l=void 0===s?n:i(s,n);l>u;)t[u++]=e;return t}},8533:function(e,t,n){"use strict";var r=n(2092).forEach,i=n(9341)("forEach");e.exports=i?[].forEach:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}},8457:function(e,t,n){"use strict";var r=n(9974),i=n(7908),o=n(3411),a=n(7659),u=n(7466),s=n(6135),l=n(1246);e.exports=function(e){var t,n,c,f,p,h,d=i(e),v="function"==typeof this?this:Array,y=arguments.length,g=y>1?arguments[1]:void 0,m=void 0!==g,b=l(d),x=0;if(m&&(g=r(g,y>2?arguments[2]:void 0,2)),null==b||v==Array&&a(b))for(n=new v(t=u(d.length));t>x;x++)h=m?g(d[x],x):d[x],s(n,x,h);else for(p=(f=b.call(d)).next,n=new v;!(c=p.call(f)).done;x++)h=m?o(f,g,[c.value,x],!0):c.value,s(n,x,h);return n.length=x,n}},1318:function(e,t,n){var r=n(5656),i=n(7466),o=n(1400),a=function(e){return function(t,n,a){var u,s=r(t),l=i(s.length),c=o(a,l);if(e&&n!=n){for(;l>c;)if((u=s[c++])!=u)return!0}else for(;l>c;c++)if((e||c in s)&&s[c]===n)return e||c||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},2092:function(e,t,n){var r=n(9974),i=n(8361),o=n(7908),a=n(7466),u=n(5417),s=[].push,l=function(e){var t=1==e,n=2==e,l=3==e,c=4==e,f=6==e,p=7==e,h=5==e||f;return function(d,v,y,g){for(var m,b,x=o(d),w=i(x),E=r(v,y,3),k=a(w.length),A=0,S=g||u,T=t?S(d,k):n||p?S(d,0):void 0;k>A;A++)if((h||A in w)&&(b=E(m=w[A],A,x),e))if(t)T[A]=b;else if(b)switch(e){case 3:return!0;case 5:return m;case 6:return A;case 2:s.call(T,m)}else switch(e){case 4:return!1;case 7:s.call(T,m)}return f?-1:l||c?c:T}};e.exports={forEach:l(0),map:l(1),filter:l(2),some:l(3),every:l(4),find:l(5),findIndex:l(6),filterOut:l(7)}},6583:function(e,t,n){"use strict";var r=n(5656),i=n(9958),o=n(7466),a=n(9341),u=Math.min,s=[].lastIndexOf,l=!!s&&1/[1].lastIndexOf(1,-0)<0,c=a("lastIndexOf"),f=l||!c;e.exports=f?function(e){if(l)return s.apply(this,arguments)||0;var t=r(this),n=o(t.length),a=n-1;for(arguments.length>1&&(a=u(a,i(arguments[1]))),a<0&&(a=n+a);a>=0;a--)if(a in t&&t[a]===e)return a||0;return-1}:s},1194:function(e,t,n){var r=n(7293),i=n(5112),o=n(7392),a=i("species");e.exports=function(e){return o>=51||!r(function(){var t=[];return(t.constructor={})[a]=function(){return{foo:1}},1!==t[e](Boolean).foo})}},9341:function(e,t,n){"use strict";var r=n(7293);e.exports=function(e,t){var n=[][e];return!!n&&r(function(){n.call(null,t||function(){throw 1},1)})}},3671:function(e,t,n){var r=n(3099),i=n(7908),o=n(8361),a=n(7466),u=function(e){return function(t,n,u,s){r(n);var l=i(t),c=o(l),f=a(l.length),p=e?f-1:0,h=e?-1:1;if(u<2)for(;;){if(p in c){s=c[p],p+=h;break}if(p+=h,e?p<0:f<=p)throw TypeError("Reduce of empty array with no initial value")}for(;e?p>=0:f>p;p+=h)p in c&&(s=n(s,c[p],p,l));return s}};e.exports={left:u(!1),right:u(!0)}},5417:function(e,t,n){var r=n(111),i=n(3157),o=n(5112)("species");e.exports=function(e,t){var n;return i(e)&&("function"!=typeof(n=e.constructor)||n!==Array&&!i(n.prototype)?r(n)&&null===(n=n[o])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===t?0:t)}},3411:function(e,t,n){var r=n(9670),i=n(9212);e.exports=function(e,t,n,o){try{return o?t(r(n)[0],n[1]):t(n)}catch(a){throw i(e),a}}},7072:function(e,t,n){var r=n(5112)("iterator"),i=!1;try{var o=0,a={next:function(){return{done:!!o++}},return:function(){i=!0}};a[r]=function(){return this},Array.from(a,function(){throw 2})}catch(u){}e.exports=function(e,t){if(!t&&!i)return!1;var n=!1;try{var o={};o[r]=function(){return{next:function(){return{done:n=!0}}}},e(o)}catch(u){}return n}},4326:function(e){var t={}.toString;e.exports=function(e){return t.call(e).slice(8,-1)}},648:function(e,t,n){var r=n(1694),i=n(4326),o=n(5112)("toStringTag"),a="Arguments"==i(function(){return arguments}());e.exports=r?i:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(n){}}(t=Object(e),o))?n:a?i(t):"Object"==(r=i(t))&&"function"==typeof t.callee?"Arguments":r}},9920:function(e,t,n){var r=n(6656),i=n(3887),o=n(1236),a=n(3070);e.exports=function(e,t){for(var n=i(t),u=a.f,s=o.f,l=0;l<n.length;l++){var c=n[l];r(e,c)||u(e,c,s(t,c))}}},8544:function(e,t,n){var r=n(7293);e.exports=!r(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})},4994:function(e,t,n){"use strict";var r=n(3383).IteratorPrototype,i=n(30),o=n(9114),a=n(8003),u=n(7497),s=function(){return this};e.exports=function(e,t,n){var l=t+" Iterator";return e.prototype=i(r,{next:o(1,n)}),a(e,l,!1,!0),u[l]=s,e}},8880:function(e,t,n){var r=n(9781),i=n(3070),o=n(9114);e.exports=r?function(e,t,n){return i.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},9114:function(e){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},6135:function(e,t,n){"use strict";var r=n(7593),i=n(3070),o=n(9114);e.exports=function(e,t,n){var a=r(t);a in e?i.f(e,a,o(0,n)):e[a]=n}},654:function(e,t,n){"use strict";var r=n(2109),i=n(4994),o=n(9518),a=n(7674),u=n(8003),s=n(8880),l=n(1320),c=n(5112),f=n(1913),p=n(7497),h=n(3383),d=h.IteratorPrototype,v=h.BUGGY_SAFARI_ITERATORS,y=c("iterator"),g=function(){return this};e.exports=function(e,t,n,c,h,m,b){i(n,t,c);var x,w,E,k=function(e){if(e===h&&L)return L;if(!v&&e in T)return T[e];switch(e){case"keys":case"values":case"entries":return function(){return new n(this,e)}}return function(){return new n(this)}},A=t+" Iterator",S=!1,T=e.prototype,F=T[y]||T["@@iterator"]||h&&T[h],L=!v&&F||k(h),C="Array"==t&&T.entries||F;if(C&&(x=o(C.call(new e)),d!==Object.prototype&&x.next&&(f||o(x)===d||(a?a(x,d):"function"!=typeof x[y]&&s(x,y,g)),u(x,A,!0,!0),f&&(p[A]=g))),"values"==h&&F&&"values"!==F.name&&(S=!0,L=function(){return F.call(this)}),f&&!b||T[y]===L||s(T,y,L),p[t]=L,h)if(w={values:k("values"),keys:m?L:k("keys"),entries:k("entries")},b)for(E in w)!v&&!S&&E in T||l(T,E,w[E]);else r({target:t,proto:!0,forced:v||S},w);return w}},9781:function(e,t,n){var r=n(7293);e.exports=!r(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})},317:function(e,t,n){var r=n(7854),i=n(111),o=r.document,a=i(o)&&i(o.createElement);e.exports=function(e){return a?o.createElement(e):{}}},8324:function(e){e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},8113:function(e,t,n){var r=n(5005);e.exports=r("navigator","userAgent")||""},7392:function(e,t,n){var r,i,o=n(7854),a=n(8113),u=o.process,s=u&&u.versions,l=s&&s.v8;l?i=(r=l.split("."))[0]+r[1]:a&&(!(r=a.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=a.match(/Chrome\/(\d+)/))&&(i=r[1]),e.exports=i&&+i},748:function(e){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},2109:function(e,t,n){var r=n(7854),i=n(1236).f,o=n(8880),a=n(1320),u=n(3505),s=n(9920),l=n(4705);e.exports=function(e,t){var n,c,f,p,h,d=e.target,v=e.global,y=e.stat;if(n=v?r:y?r[d]||u(d,{}):(r[d]||{}).prototype)for(c in t){if(p=t[c],f=e.noTargetGet?(h=i(n,c))&&h.value:n[c],!l(v?c:d+(y?".":"#")+c,e.forced)&&void 0!==f){if(typeof p==typeof f)continue;s(p,f)}(e.sham||f&&f.sham)&&o(p,"sham",!0),a(n,c,p,e)}}},7293:function(e){e.exports=function(e){try{return!!e()}catch(t){return!0}}},7007:function(e,t,n){"use strict";n(4916);var r=n(1320),i=n(7293),o=n(5112),a=n(2261),u=n(8880),s=o("species"),l=!i(function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}),c="$0"==="a".replace(/./,"$0"),f=o("replace"),p=!!/./[f]&&""===/./[f]("a","$0"),h=!i(function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]});e.exports=function(e,t,n,f){var d=o(e),v=!i(function(){var t={};return t[d]=function(){return 7},7!=""[e](t)}),y=v&&!i(function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[s]=function(){return n},n.flags="",n[d]=/./[d]),n.exec=function(){return t=!0,null},n[d](""),!t});if(!v||!y||"replace"===e&&(!l||!c||p)||"split"===e&&!h){var g=/./[d],m=n(d,""[e],function(e,t,n,r,i){return t.exec===a?v&&!i?{done:!0,value:g.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}},{REPLACE_KEEPS_$0:c,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:p}),b=m[0],x=m[1];r(String.prototype,e,b),r(RegExp.prototype,d,2==t?function(e,t){return x.call(e,this,t)}:function(e){return x.call(e,this)})}f&&u(RegExp.prototype[d],"sham",!0)}},9974:function(e,t,n){var r=n(3099);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},5005:function(e,t,n){var r=n(857),i=n(7854),o=function(e){return"function"==typeof e?e:void 0};e.exports=function(e,t){return arguments.length<2?o(r[e])||o(i[e]):r[e]&&r[e][t]||i[e]&&i[e][t]}},1246:function(e,t,n){var r=n(648),i=n(7497),o=n(5112)("iterator");e.exports=function(e){if(null!=e)return e[o]||e["@@iterator"]||i[r(e)]}},8554:function(e,t,n){var r=n(9670),i=n(1246);e.exports=function(e){var t=i(e);if("function"!=typeof t)throw TypeError(String(e)+" is not iterable");return r(t.call(e))}},647:function(e,t,n){var r=n(7908),i=Math.floor,o="".replace,a=/\$([$&'`]|\d\d?|<[^>]*>)/g,u=/\$([$&'`]|\d\d?)/g;e.exports=function(e,t,n,s,l,c){var f=n+e.length,p=s.length,h=u;return void 0!==l&&(l=r(l),h=a),o.call(c,h,function(r,o){var a;switch(o.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,n);case"'":return t.slice(f);case"<":a=l[o.slice(1,-1)];break;default:var u=+o;if(0===u)return r;if(u>p){var c=i(u/10);return 0===c?r:c<=p?void 0===s[c-1]?o.charAt(1):s[c-1]+o.charAt(1):r}a=s[u-1]}return void 0===a?"":a})}},7854:function(e,t,n){var r=function(e){return e&&e.Math==Math&&e};e.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n.g&&n.g)||function(){return this}()||Function("return this")()},6656:function(e){var t={}.hasOwnProperty;e.exports=function(e,n){return t.call(e,n)}},3501:function(e){e.exports={}},490:function(e,t,n){var r=n(5005);e.exports=r("document","documentElement")},4664:function(e,t,n){var r=n(9781),i=n(7293),o=n(317);e.exports=!r&&!i(function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a})},1179:function(e){var t=Math.abs,n=Math.pow,r=Math.floor,i=Math.log,o=Math.LN2;e.exports={pack:function(e,a,u){var s,l,c,f=new Array(u),p=8*u-a-1,h=(1<<p)-1,d=h>>1,v=23===a?n(2,-24)-n(2,-77):0,y=e<0||0===e&&1/e<0?1:0,g=0;for((e=t(e))!=e||e===1/0?(l=e!=e?1:0,s=h):(s=r(i(e)/o),e*(c=n(2,-s))<1&&(s--,c*=2),(e+=s+d>=1?v/c:v*n(2,1-d))*c>=2&&(s++,c/=2),s+d>=h?(l=0,s=h):s+d>=1?(l=(e*c-1)*n(2,a),s+=d):(l=e*n(2,d-1)*n(2,a),s=0));a>=8;f[g++]=255&l,l/=256,a-=8);for(s=s<<a|l,p+=a;p>0;f[g++]=255&s,s/=256,p-=8);return f[--g]|=128*y,f},unpack:function(e,t){var r,i=e.length,o=8*i-t-1,a=(1<<o)-1,u=a>>1,s=o-7,l=i-1,c=e[l--],f=127&c;for(c>>=7;s>0;f=256*f+e[l],l--,s-=8);for(r=f&(1<<-s)-1,f>>=-s,s+=t;s>0;r=256*r+e[l],l--,s-=8);if(0===f)f=1-u;else{if(f===a)return r?NaN:c?-1/0:1/0;r+=n(2,t),f-=u}return(c?-1:1)*r*n(2,f-t)}}},8361:function(e,t,n){var r=n(7293),i=n(4326),o="".split;e.exports=r(function(){return!Object("z").propertyIsEnumerable(0)})?function(e){return"String"==i(e)?o.call(e,""):Object(e)}:Object},9587:function(e,t,n){var r=n(111),i=n(7674);e.exports=function(e,t,n){var o,a;return i&&"function"==typeof(o=t.constructor)&&o!==n&&r(a=o.prototype)&&a!==n.prototype&&i(e,a),e}},2788:function(e,t,n){var r=n(5465),i=Function.toString;"function"!=typeof r.inspectSource&&(r.inspectSource=function(e){return i.call(e)}),e.exports=r.inspectSource},9909:function(e,t,n){var r,i,o,a=n(8536),u=n(7854),s=n(111),l=n(8880),c=n(6656),f=n(5465),p=n(6200),h=n(3501),d=u.WeakMap;if(a){var v=f.state||(f.state=new d),y=v.get,g=v.has,m=v.set;r=function(e,t){return t.facade=e,m.call(v,e,t),t},i=function(e){return y.call(v,e)||{}},o=function(e){return g.call(v,e)}}else{var b=p("state");h[b]=!0,r=function(e,t){return t.facade=e,l(e,b,t),t},i=function(e){return c(e,b)?e[b]:{}},o=function(e){return c(e,b)}}e.exports={set:r,get:i,has:o,enforce:function(e){return o(e)?i(e):r(e,{})},getterFor:function(e){return function(t){var n;if(!s(t)||(n=i(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}}},7659:function(e,t,n){var r=n(5112),i=n(7497),o=r("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(i.Array===e||a[o]===e)}},3157:function(e,t,n){var r=n(4326);e.exports=Array.isArray||function(e){return"Array"==r(e)}},4705:function(e,t,n){var r=n(7293),i=/#|\.prototype\./,o=function(e,t){var n=u[a(e)];return n==l||n!=s&&("function"==typeof t?r(t):!!t)},a=o.normalize=function(e){return String(e).replace(i,".").toLowerCase()},u=o.data={},s=o.NATIVE="N",l=o.POLYFILL="P";e.exports=o},111:function(e){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},1913:function(e){e.exports=!1},7850:function(e,t,n){var r=n(111),i=n(4326),o=n(5112)("match");e.exports=function(e){var t;return r(e)&&(void 0!==(t=e[o])?!!t:"RegExp"==i(e))}},9212:function(e,t,n){var r=n(9670);e.exports=function(e){var t=e.return;if(void 0!==t)return r(t.call(e)).value}},3383:function(e,t,n){"use strict";var r,i,o,a=n(7293),u=n(9518),s=n(8880),l=n(6656),c=n(5112),f=n(1913),p=c("iterator"),h=!1;[].keys&&("next"in(o=[].keys())?(i=u(u(o)))!==Object.prototype&&(r=i):h=!0);var d=null==r||a(function(){var e={};return r[p].call(e)!==e});d&&(r={}),f&&!d||l(r,p)||s(r,p,function(){return this}),e.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:h}},7497:function(e){e.exports={}},133:function(e,t,n){var r=n(7293);e.exports=!!Object.getOwnPropertySymbols&&!r(function(){return!String(Symbol())})},590:function(e,t,n){var r=n(7293),i=n(5112),o=n(1913),a=i("iterator");e.exports=!r(function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,n="";return e.pathname="c%20d",t.forEach(function(e,r){t.delete("b"),n+=r+e}),o&&!e.toJSON||!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[a]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==n||"x"!==new URL("http://x",void 0).host})},8536:function(e,t,n){var r=n(7854),i=n(2788),o=r.WeakMap;e.exports="function"==typeof o&&/native code/.test(i(o))},1574:function(e,t,n){"use strict";var r=n(9781),i=n(7293),o=n(1956),a=n(5181),u=n(5296),s=n(7908),l=n(8361),c=Object.assign,f=Object.defineProperty;e.exports=!c||i(function(){if(r&&1!==c({b:1},c(f({},"a",{enumerable:!0,get:function(){f(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol();return e[n]=7,"abcdefghijklmnopqrst".split("").forEach(function(e){t[e]=e}),7!=c({},e)[n]||"abcdefghijklmnopqrst"!=o(c({},t)).join("")})?function(e,t){for(var n=s(e),i=arguments.length,c=1,f=a.f,p=u.f;i>c;)for(var h,d=l(arguments[c++]),v=f?o(d).concat(f(d)):o(d),y=v.length,g=0;y>g;)h=v[g++],r&&!p.call(d,h)||(n[h]=d[h]);return n}:c},30:function(e,t,n){var r,i=n(9670),o=n(6048),a=n(748),u=n(3501),s=n(490),l=n(317),c=n(6200),f=c("IE_PROTO"),p=function(){},h=function(e){return"<script>"+e+"<\/script>"},d=function(){try{r=document.domain&&new ActiveXObject("htmlfile")}catch(i){}var e,t;d=r?function(e){e.write(h("")),e.close();var t=e.parentWindow.Object;return e=null,t}(r):((t=l("iframe")).style.display="none",s.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(h("document.F=Object")),e.close(),e.F);for(var n=a.length;n--;)delete d.prototype[a[n]];return d()};u[f]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(p.prototype=i(e),n=new p,p.prototype=null,n[f]=e):n=d(),void 0===t?n:o(n,t)}},6048:function(e,t,n){var r=n(9781),i=n(3070),o=n(9670),a=n(1956);e.exports=r?Object.defineProperties:function(e,t){o(e);for(var n,r=a(t),u=r.length,s=0;u>s;)i.f(e,n=r[s++],t[n]);return e}},3070:function(e,t,n){var r=n(9781),i=n(4664),o=n(9670),a=n(7593),u=Object.defineProperty;t.f=r?u:function(e,t,n){if(o(e),t=a(t,!0),o(n),i)try{return u(e,t,n)}catch(r){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},1236:function(e,t,n){var r=n(9781),i=n(5296),o=n(9114),a=n(5656),u=n(7593),s=n(6656),l=n(4664),c=Object.getOwnPropertyDescriptor;t.f=r?c:function(e,t){if(e=a(e),t=u(t,!0),l)try{return c(e,t)}catch(n){}if(s(e,t))return o(!i.f.call(e,t),e[t])}},8006:function(e,t,n){var r=n(6324),i=n(748).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,i)}},5181:function(e,t){t.f=Object.getOwnPropertySymbols},9518:function(e,t,n){var r=n(6656),i=n(7908),o=n(6200),a=n(8544),u=o("IE_PROTO"),s=Object.prototype;e.exports=a?Object.getPrototypeOf:function(e){return e=i(e),r(e,u)?e[u]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?s:null}},6324:function(e,t,n){var r=n(6656),i=n(5656),o=n(1318).indexOf,a=n(3501);e.exports=function(e,t){var n,u=i(e),s=0,l=[];for(n in u)!r(a,n)&&r(u,n)&&l.push(n);for(;t.length>s;)r(u,n=t[s++])&&(~o(l,n)||l.push(n));return l}},1956:function(e,t,n){var r=n(6324),i=n(748);e.exports=Object.keys||function(e){return r(e,i)}},5296:function(e,t){"use strict";var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,i=r&&!n.call({1:2},1);t.f=i?function(e){var t=r(this,e);return!!t&&t.enumerable}:n},7674:function(e,t,n){var r=n(9670),i=n(6077);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),t=n instanceof Array}catch(o){}return function(n,o){return r(n),i(o),t?e.call(n,o):n.__proto__=o,n}}():void 0)},288:function(e,t,n){"use strict";var r=n(1694),i=n(648);e.exports=r?{}.toString:function(){return"[object "+i(this)+"]"}},3887:function(e,t,n){var r=n(5005),i=n(8006),o=n(5181),a=n(9670);e.exports=r("Reflect","ownKeys")||function(e){var t=i.f(a(e)),n=o.f;return n?t.concat(n(e)):t}},857:function(e,t,n){var r=n(7854);e.exports=r},2248:function(e,t,n){var r=n(1320);e.exports=function(e,t,n){for(var i in t)r(e,i,t[i],n);return e}},1320:function(e,t,n){var r=n(7854),i=n(8880),o=n(6656),a=n(3505),u=n(2788),s=n(9909),l=s.get,c=s.enforce,f=String(String).split("String");(e.exports=function(e,t,n,u){var s,l=!!u&&!!u.unsafe,p=!!u&&!!u.enumerable,h=!!u&&!!u.noTargetGet;"function"==typeof n&&("string"!=typeof t||o(n,"name")||i(n,"name",t),(s=c(n)).source||(s.source=f.join("string"==typeof t?t:""))),e!==r?(l?!h&&e[t]&&(p=!0):delete e[t],p?e[t]=n:i(e,t,n)):p?e[t]=n:a(t,n)})(Function.prototype,"toString",function(){return"function"==typeof this&&l(this).source||u(this)})},7651:function(e,t,n){var r=n(4326),i=n(2261);e.exports=function(e,t){var n=e.exec;if("function"==typeof n){var o=n.call(e,t);if("object"!=typeof o)throw TypeError("RegExp exec method returned something other than an Object or null");return o}if("RegExp"!==r(e))throw TypeError("RegExp#exec called on incompatible receiver");return i.call(e,t)}},2261:function(e,t,n){"use strict";var r,i,o=n(7066),a=n(2999),u=RegExp.prototype.exec,s=String.prototype.replace,l=u,c=(r=/a/,i=/b*/g,u.call(r,"a"),u.call(i,"a"),0!==r.lastIndex||0!==i.lastIndex),f=a.UNSUPPORTED_Y||a.BROKEN_CARET,p=void 0!==/()??/.exec("")[1];(c||p||f)&&(l=function(e){var t,n,r,i,a=this,l=f&&a.sticky,h=o.call(a),d=a.source,v=0,y=e;return l&&(-1===(h=h.replace("y","")).indexOf("g")&&(h+="g"),y=String(e).slice(a.lastIndex),a.lastIndex>0&&(!a.multiline||a.multiline&&"\n"!==e[a.lastIndex-1])&&(d="(?: "+d+")",y=" "+y,v++),n=new RegExp("^(?:"+d+")",h)),p&&(n=new RegExp("^"+d+"$(?!\\s)",h)),c&&(t=a.lastIndex),r=u.call(l?n:a,y),l?r?(r.input=r.input.slice(v),r[0]=r[0].slice(v),r.index=a.lastIndex,a.lastIndex+=r[0].length):a.lastIndex=0:c&&r&&(a.lastIndex=a.global?r.index+r[0].length:t),p&&r&&r.length>1&&s.call(r[0],n,function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(r[i]=void 0)}),r}),e.exports=l},7066:function(e,t,n){"use strict";var r=n(9670);e.exports=function(){var e=r(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},2999:function(e,t,n){"use strict";var r=n(7293);function i(e,t){return RegExp(e,t)}t.UNSUPPORTED_Y=r(function(){var e=i("a","y");return e.lastIndex=2,null!=e.exec("abcd")}),t.BROKEN_CARET=r(function(){var e=i("^r","gy");return e.lastIndex=2,null!=e.exec("str")})},4488:function(e){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},3505:function(e,t,n){var r=n(7854),i=n(8880);e.exports=function(e,t){try{i(r,e,t)}catch(n){r[e]=t}return t}},6340:function(e,t,n){"use strict";var r=n(5005),i=n(3070),o=n(5112),a=n(9781),u=o("species");e.exports=function(e){var t=r(e),n=i.f;a&&t&&!t[u]&&n(t,u,{configurable:!0,get:function(){return this}})}},8003:function(e,t,n){var r=n(3070).f,i=n(6656),o=n(5112)("toStringTag");e.exports=function(e,t,n){e&&!i(e=n?e:e.prototype,o)&&r(e,o,{configurable:!0,value:t})}},6200:function(e,t,n){var r=n(2309),i=n(9711),o=r("keys");e.exports=function(e){return o[e]||(o[e]=i(e))}},5465:function(e,t,n){var r=n(7854),i=n(3505),o=r["__core-js_shared__"]||i("__core-js_shared__",{});e.exports=o},2309:function(e,t,n){var r=n(1913),i=n(5465);(e.exports=function(e,t){return i[e]||(i[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.9.0",mode:r?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})},6707:function(e,t,n){var r=n(9670),i=n(3099),o=n(5112)("species");e.exports=function(e,t){var n,a=r(e).constructor;return void 0===a||null==(n=r(a)[o])?t:i(n)}},8710:function(e,t,n){var r=n(9958),i=n(4488),o=function(e){return function(t,n){var o,a,u=String(i(t)),s=r(n),l=u.length;return s<0||s>=l?e?"":void 0:(o=u.charCodeAt(s))<55296||o>56319||s+1===l||(a=u.charCodeAt(s+1))<56320||a>57343?e?u.charAt(s):o:e?u.slice(s,s+2):a-56320+(o-55296<<10)+65536}};e.exports={codeAt:o(!1),charAt:o(!0)}},3197:function(e){"use strict";var t=/[^\0-\u007E]/,n=/[.\u3002\uFF0E\uFF61]/g,r="Overflow: input needs wider integers to process",i=Math.floor,o=String.fromCharCode,a=function(e){return e+22+75*(e<26)},u=function(e,t,n){var r=0;for(e=n?i(e/700):e>>1,e+=i(e/t);e>455;r+=36)e=i(e/35);return i(r+36*e/(e+38))},s=function(e){var t,n,s=[],l=(e=function(e){for(var t=[],n=0,r=e.length;n<r;){var i=e.charCodeAt(n++);if(i>=55296&&i<=56319&&n<r){var o=e.charCodeAt(n++);56320==(64512&o)?t.push(((1023&i)<<10)+(1023&o)+65536):(t.push(i),n--)}else t.push(i)}return t}(e)).length,c=128,f=0,p=72;for(t=0;t<e.length;t++)(n=e[t])<128&&s.push(o(n));var h=s.length,d=h;for(h&&s.push("-");d<l;){var v=2147483647;for(t=0;t<e.length;t++)(n=e[t])>=c&&n<v&&(v=n);var y=d+1;if(v-c>i((2147483647-f)/y))throw RangeError(r);for(f+=(v-c)*y,c=v,t=0;t<e.length;t++){if((n=e[t])<c&&++f>2147483647)throw RangeError(r);if(n==c){for(var g=f,m=36;;m+=36){var b=m<=p?1:m>=p+26?26:m-p;if(g<b)break;var x=g-b,w=36-b;s.push(o(a(b+x%w))),g=i(x/w)}s.push(o(a(g))),p=u(f,y,d==h),f=0,++d}}++f,++c}return s.join("")};e.exports=function(e){var r,i,o=[],a=e.toLowerCase().replace(n,".").split(".");for(r=0;r<a.length;r++)i=a[r],o.push(t.test(i)?"xn--"+s(i):i);return o.join(".")}},6091:function(e,t,n){var r=n(7293),i=n(1361);e.exports=function(e){return r(function(){return!!i[e]()||"​…᠎"!="​…᠎"[e]()||i[e].name!==e})}},3111:function(e,t,n){var r=n(4488),i="["+n(1361)+"]",o=RegExp("^"+i+i+"*"),a=RegExp(i+i+"*$"),u=function(e){return function(t){var n=String(r(t));return 1&e&&(n=n.replace(o,"")),2&e&&(n=n.replace(a,"")),n}};e.exports={start:u(1),end:u(2),trim:u(3)}},1400:function(e,t,n){var r=n(9958),i=Math.max,o=Math.min;e.exports=function(e,t){var n=r(e);return n<0?i(n+t,0):o(n,t)}},7067:function(e,t,n){var r=n(9958),i=n(7466);e.exports=function(e){if(void 0===e)return 0;var t=r(e),n=i(t);if(t!==n)throw RangeError("Wrong length or index");return n}},5656:function(e,t,n){var r=n(8361),i=n(4488);e.exports=function(e){return r(i(e))}},9958:function(e){var t=Math.ceil,n=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?n:t)(e)}},7466:function(e,t,n){var r=n(9958),i=Math.min;e.exports=function(e){return e>0?i(r(e),9007199254740991):0}},7908:function(e,t,n){var r=n(4488);e.exports=function(e){return Object(r(e))}},4590:function(e,t,n){var r=n(3002);e.exports=function(e,t){var n=r(e);
vendor: 3,146 bytes, line 54
54if(n%t)throw RangeError("Wrong offset");return n}},3002:function(e,t,n){var r=n(9958);e.exports=function(e){var t=r(e);if(t<0)throw RangeError("The argument can't be less than 0");return t}},7593:function(e,t,n){var r=n(111);e.exports=function(e,t){if(!r(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!r(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},1694:function(e,t,n){var r={};r[n(5112)("toStringTag")]="z",e.exports="[object z]"===String(r)},9843:function(e,t,n){"use strict";var r=n(2109),i=n(7854),o=n(9781),a=n(3832),u=n(260),s=n(3331),l=n(5787),c=n(9114),f=n(8880),p=n(7466),h=n(7067),d=n(4590),v=n(7593),y=n(6656),g=n(648),m=n(111),b=n(30),x=n(7674),w=n(8006).f,E=n(7321),k=n(2092).forEach,A=n(6340),S=n(3070),T=n(1236),F=n(9909),L=n(9587),C=F.get,R=F.set,I=S.f,U=T.f,_=Math.round,O=i.RangeError,M=s.ArrayBuffer,z=s.DataView,P=u.NATIVE_ARRAY_BUFFER_VIEWS,j=u.TYPED_ARRAY_TAG,D=u.TypedArray,N=u.TypedArrayPrototype,B=u.aTypedArrayConstructor,q=u.isTypedArray,W=function(e,t){for(var n=0,r=t.length,i=new(B(e))(r);r>n;)i[n]=t[n++];return i},H=function(e,t){I(e,t,{get:function(){return C(this)[t]}})},Y=function(e){var t;return e instanceof M||"ArrayBuffer"==(t=g(e))||"SharedArrayBuffer"==t},G=function(e,t){return q(e)&&"symbol"!=typeof t&&t in e&&String(+t)==String(t)},Q=function(e,t){return G(e,t=v(t,!0))?c(2,e[t]):U(e,t)},$=function(e,t,n){return!(G(e,t=v(t,!0))&&m(n)&&y(n,"value"))||y(n,"get")||y(n,"set")||n.configurable||y(n,"writable")&&!n.writable||y(n,"enumerable")&&!n.enumerable?I(e,t,n):(e[t]=n.value,e)};o?(P||(T.f=Q,S.f=$,H(N,"buffer"),H(N,"byteOffset"),H(N,"byteLength"),H(N,"length")),r({target:"Object",stat:!0,forced:!P},{getOwnPropertyDescriptor:Q,defineProperty:$}),e.exports=function(e,t,n){var o=e.match(/\d+$/)[0]/8,u=e+(n?"Clamped":"")+"Array",s="get"+e,c="set"+e,v=i[u],y=v,g=y&&y.prototype,S={},T=function(e,t){I(e,t,{get:function(){return function(e,t){var n=C(e);return n.view[s](t*o+n.byteOffset,!0)}(this,t)},set:function(e){return function(e,t,r){var i=C(e);n&&(r=(r=_(r))<0?0:r>255?255:255&r),i.view[c](t*o+i.byteOffset,r,!0)}(this,t,e)},enumerable:!0})};P?a&&(y=t(function(e,t,n,r){return l(e,y,u),L(m(t)?Y(t)?void 0!==r?new v(t,d(n,o),r):void 0!==n?new v(t,d(n,o)):new v(t):q(t)?W(y,t):E.call(y,t):new v(h(t)),e,y)}),x&&x(y,D),k(w(v),function(e){e in y||f(y,e,v[e])}),y.prototype=g):(y=t(function(e,t,n,r){l(e,y,u);var i,a,s,c=0,f=0;if(m(t)){if(!Y(t))return q(t)?W(y,t):E.call(y,t);i=t,f=d(n,o);var v=t.byteLength;if(void 0===r){if(v%o)throw O("Wrong length");if((a=v-f)<0)throw O("Wrong length")}else if((a=p(r)*o)+f>v)throw O("Wrong length");s=a/o}else s=h(t),i=new M(a=s*o);for(R(e,{buffer:i,byteOffset:f,byteLength:a,length:s,view:new z(i)});c<s;)T(e,c++)}),x&&x(y,D),g=y.prototype=b(N)),g.constructor!==y&&f(g,"constructor",y),j&&f(g,j,u),S[u]=y,r({global:!0,forced:y!=v,sham:!P},S),"BYTES_PER_ELEMENT"in y||f(y,"BYTES_PER_ELEMENT",o),"BYTES_PER_ELEMENT"in g||f(g,"BYTES_PER_ELEMENT",o),A(u)}):e.exports=function(){}}
vendor: 4,267 bytes, line 54
54,3832:function(e,t,n){var r=n(7854),i=n(7293),o=n(7072),a=n(260).NATIVE_ARRAY_BUFFER_VIEWS,u=r.ArrayBuffer,s=r.Int8Array;e.exports=!a||!i(function(){s(1)})||!i(function(){new s(-1)})||!o(function(e){new s,new s(null),new s(1.5),new s(e)},!0)||i(function(){return 1!==new s(new u(2),1,void 0).length})},3074:function(e,t,n){var r=n(260).aTypedArrayConstructor,i=n(6707);e.exports=function(e,t){for(var n=i(e,e.constructor),o=0,a=t.length,u=new(r(n))(a);a>o;)u[o]=t[o++];return u}},7321:function(e,t,n){var r=n(7908),i=n(7466),o=n(1246),a=n(7659),u=n(9974),s=n(260).aTypedArrayConstructor;e.exports=function(e){var t,n,l,c,f,p,h=r(e),d=arguments.length,v=d>1?arguments[1]:void 0,y=void 0!==v,g=o(h);if(null!=g&&!a(g))for(p=(f=g.call(h)).next,h=[];!(c=p.call(f)).done;)h.push(c.value);for(y&&d>2&&(v=u(v,arguments[2],2)),n=i(h.length),l=new(s(this))(n),t=0;n>t;t++)l[t]=y?v(h[t],t):h[t];return l}},9711:function(e){var t=0,n=Math.random();e.exports=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++t+n).toString(36)}},3307:function(e,t,n){var r=n(133);e.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},5112:function(e,t,n){var r=n(7854),i=n(2309),o=n(6656),a=n(9711),u=n(133),s=n(3307),l=i("wks"),c=r.Symbol,f=s?c:c&&c.withoutSetter||a;e.exports=function(e){return o(l,e)||(u&&o(c,e)?l[e]=c[e]:l[e]=f("Symbol."+e)),l[e]}},1361:function(e){e.exports="\t\n\v\f\r                 \u2028\u2029\ufeff"},8264:function(e,t,n){"use strict";var r=n(2109),i=n(7854),o=n(3331),a=n(6340),u=o.ArrayBuffer;r({global:!0,forced:i.ArrayBuffer!==u},{ArrayBuffer:u}),a("ArrayBuffer")},2222:function(e,t,n){"use strict";var r=n(2109),i=n(7293),o=n(3157),a=n(111),u=n(7908),s=n(7466),l=n(6135),c=n(5417),f=n(1194),p=n(5112),h=n(7392),d=p("isConcatSpreadable"),v=h>=51||!i(function(){var e=[];return e[d]=!1,e.concat()[0]!==e}),y=f("concat"),g=function(e){if(!a(e))return!1;var t=e[d];return void 0!==t?!!t:o(e)};r({target:"Array",proto:!0,forced:!v||!y},{concat:function(e){var t,n,r,i,o,a=u(this),f=c(a,0),p=0;for(t=-1,r=arguments.length;t<r;t++)if(o=-1===t?a:arguments[t],g(o)){if(p+(i=s(o.length))>9007199254740991)throw TypeError("Maximum allowed index exceeded");for(n=0;n<i;n++,p++)n in o&&l(f,p,o[n])}else{if(p>=9007199254740991)throw TypeError("Maximum allowed index exceeded");l(f,p++,o)}return f.length=p,f}})},7327:function(e,t,n){"use strict";var r=n(2109),i=n(2092).filter;r({target:"Array",proto:!0,forced:!n(1194)("filter")},{filter:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},2772:function(e,t,n){"use strict";var r=n(2109),i=n(1318).indexOf,o=n(9341),a=[].indexOf,u=!!a&&1/[1].indexOf(1,-0)<0,s=o("indexOf");r({target:"Array",proto:!0,forced:u||!s},{indexOf:function(e){return u?a.apply(this,arguments)||0:i(this,e,arguments.length>1?arguments[1]:void 0)}})},6992:function(e,t,n){"use strict";var r=n(5656),i=n(1223),o=n(7497),a=n(9909),u=n(654),s=a.set,l=a.getterFor("Array Iterator");e.exports=u(Array,"Array",function(e,t){s(this,{type:"Array Iterator",target:r(e),index:0,kind:t})},function(){var e=l(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}},"values"),o.Arguments=o.Array,i("keys"),i("values"),i("entries")},1249:function(e,t,n){"use strict";var r=n(2109),i=n(2092).map;r({target:"Array",proto:!0,forced:!n(1194)("map")},{map:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},7042:function(e,t,n){"use strict";var r=n(2109),i=n(111),o=n(3157),a=n(1400),u=n(7466),s=n(5656),l=n(6135),c=n(5112),f=n(1194)("slice"),p=c("species"),h=[].slice,d=Math.max;r({target:"Array",proto:!0,forced:!f},{slice:function(e,t){var n,r,c,f=s(this),v=u(f.length),y=a(e,v),g=a(void 0===t?v:t,v);if(o(f)&&("function"!=typeof(n=f.constructor)||n!==Array&&!o(n.prototype)?i(n)&&null===(n=n[p])&&(n=void 0):n=void 0,n===Array||void 0===n))return h.call(f,y,g);for(r=new(void 0===n?Array:n)(d(g-y,0)),c=0;y<g;y++,c++)y in f&&l(r,c,f[y]);return r.length=c,r}})},561:function(e,t,n){"use strict";var r=n(2109),i=n(1400),o=n(9958),a=n(7466),u=n(7908),s=n(5417),l=n(6135),c=n(1194)("splice"),f=Math.max,p=Math.min;r({target:"Array",proto:!0,forced:!c}
vendor: 4,448 bytes, line 54
54,{splice:function(e,t){var n,r,c,h,d,v,y=u(this),g=a(y.length),m=i(e,g),b=arguments.length;if(0===b?n=r=0:1===b?(n=0,r=g-m):(n=b-2,r=p(f(o(t),0),g-m)),g+n-r>9007199254740991)throw TypeError("Maximum allowed length exceeded");for(c=s(y,r),h=0;h<r;h++)(d=m+h)in y&&l(c,h,y[d]);if(c.length=r,n<r){for(h=m;h<g-r;h++)v=h+n,(d=h+r)in y?y[v]=y[d]:delete y[v];for(h=g;h>g-r+n;h--)delete y[h-1]}else if(n>r)for(h=g-r;h>m;h--)v=h+n-1,(d=h+r-1)in y?y[v]=y[d]:delete y[v];for(h=0;h<n;h++)y[h+m]=arguments[h+2];return y.length=g-r+n,c}})},8309:function(e,t,n){var r=n(9781),i=n(3070).f,o=Function.prototype,a=o.toString,u=/^\s*function ([^ (]*)/;!r||"name"in o||i(o,"name",{configurable:!0,get:function(){try{return a.call(this).match(u)[1]}catch(e){return""}}})},489:function(e,t,n){var r=n(2109),i=n(7293),o=n(7908),a=n(9518),u=n(8544);r({target:"Object",stat:!0,forced:i(function(){a(1)}),sham:!u},{getPrototypeOf:function(e){return a(o(e))}})},1539:function(e,t,n){var r=n(1694),i=n(1320),o=n(288);r||i(Object.prototype,"toString",o,{unsafe:!0})},4916:function(e,t,n){"use strict";var r=n(2109),i=n(2261);r({target:"RegExp",proto:!0,forced:/./.exec!==i},{exec:i})},9714:function(e,t,n){"use strict";var r=n(1320),i=n(9670),o=n(7293),a=n(7066),u=RegExp.prototype,s=u.toString,l=o(function(){return"/a/b"!=s.call({source:"a",flags:"b"})}),c="toString"!=s.name;(l||c)&&r(RegExp.prototype,"toString",function(){var e=i(this),t=String(e.source),n=e.flags;return"/"+t+"/"+String(void 0===n&&e instanceof RegExp&&!("flags"in u)?a.call(e):n)},{unsafe:!0})},8783:function(e,t,n){"use strict";var r=n(8710).charAt,i=n(9909),o=n(654),a=i.set,u=i.getterFor("String Iterator");o(String,"String",function(e){a(this,{type:"String Iterator",string:String(e),index:0})},function(){var e,t=u(this),n=t.string,i=t.index;return i>=n.length?{value:void 0,done:!0}:(e=r(n,i),t.index+=e.length,{value:e,done:!1})})},4723:function(e,t,n){"use strict";var r=n(7007),i=n(9670),o=n(7466),a=n(4488),u=n(1530),s=n(7651);r("match",1,function(e,t,n){return[function(t){var n=a(this),r=null==t?void 0:t[e];return void 0!==r?r.call(t,n):new RegExp(t)[e](String(n))},function(e){var r=n(t,e,this);if(r.done)return r.value;var a=i(e),l=String(this);if(!a.global)return s(a,l);var c=a.unicode;a.lastIndex=0;for(var f,p=[],h=0;null!==(f=s(a,l));){var d=String(f[0]);p[h]=d,""===d&&(a.lastIndex=u(l,o(a.lastIndex),c)),h++}return 0===h?null:p}]})},5306:function(e,t,n){"use strict";var r=n(7007),i=n(9670),o=n(7466),a=n(9958),u=n(4488),s=n(1530),l=n(647),c=n(7651),f=Math.max,p=Math.min;r("replace",2,function(e,t,n,r){var h=r.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,d=r.REPLACE_KEEPS_$0,v=h?"$":"$0";return[function(n,r){var i=u(this),o=null==n?void 0:n[e];return void 0!==o?o.call(n,i,r):t.call(String(i),n,r)},function(e,r){if(!h&&d||"string"==typeof r&&-1===r.indexOf(v)){var u=n(t,e,this,r);if(u.done)return u.value}var y=i(e),g=String(this),m="function"==typeof r;m||(r=String(r));var b=y.global;if(b){var x=y.unicode;y.lastIndex=0}for(var w=[];;){var E=c(y,g);if(null===E)break;if(w.push(E),!b)break;""===String(E[0])&&(y.lastIndex=s(g,o(y.lastIndex),x))}for(var k,A="",S=0,T=0;T<w.length;T++){E=w[T];for(var F=String(E[0]),L=f(p(a(E.index),g.length),0),C=[],R=1;R<E.length;R++)C.push(void 0===(k=E[R])?k:String(k));var I=E.groups;if(m){var U=[F].concat(C,L,g);void 0!==I&&U.push(I);var _=String(r.apply(void 0,U))}else _=l(F,g,L,C,I,r);L>=S&&(A+=g.slice(S,L)+_,S=L+F.length)}return A+g.slice(S)}]})},3123:function(e,t,n){"use strict";var r=n(7007),i=n(7850),o=n(9670),a=n(4488),u=n(6707),s=n(1530),l=n(7466),c=n(7651),f=n(2261),p=n(7293),h=[].push,d=Math.min,v=!p(function(){return!RegExp(4294967295,"y")});r("split",2,function(e,t,n){var r;return r="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,n){var r=String(a(this)),o=void 0===n?4294967295:n>>>0;if(0===o)return[];if(void 0===e)return[r];if(!i(e))return t.call(r,e,o);for(var u,s,l,c=[],p=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),d=0,v=new RegExp(e.source,p+"g");(u=f.call(v,r))&&!((s=v.lastIndex)>d&&(c.push(r.slice(d,u.index)),u.length>1&&u.index<r.length&&h.apply(c,u.slice(1)),l=u[0].length,d=s,c.length>=o));)v.lastIndex===u.index&&v.lastIndex++;return d===r.length?!l&&v.test("")||c.push(""):c.push(r.slice(d)),c.length>o?c.slice(0,o):c}
54:"0".split(void 0,0).length?function(e,n){return void 0===e&&0===n?[]:t.call(this,e,n)}:t,[function(t,n){var i=a(this),o=null==t?void 0:t[e];return void 0!==o?o.call(t,i,n):r.call(String(i),t,n)},function(e,i){var a=n(r,e,this,i,r!==t);if(a.done)return a.value;var f=o(e),p=String(this),h=u(f,RegExp),y=f.unicode,g=(f.ignoreCase?"i":"")+(f.multiline?"m":"")+(f.unicode?"u":"")+(v?"y":"g"),m=new h(v?f:"^(?:"+f.source+")",g),b=void 0===i?4294967295:i>>>0;if(0===b)return[];if(0===p.length)return null===c(m,p)?[p]:[];for(var x=0,w=0,E=[];w<p.length;){m.lastIndex=v?w:0;var k,A=c(m,v?p:p.slice(w));if(null===A||(k=d(l(m.lastIndex+(v?0:w)),p.length))===x)w=s(p,w,y);else{if(E.push(p.slice(x,w)),E.length===b)return E;for(var S=1;S<=A.length-1;S++)if(E.push(A[S]),E.length===b)return E;w=x=k}}return E.push(p.slice(x)),E}]},!v)},3210:function(e,t,n){"use strict";var r=n(2109),i=n(3111).trim;r({target:"String",proto:!0,forced:n(6091)("trim")},{trim:function(){return i(this)}})},2990:function(e,t,n){"use strict";var r=n(260),i=n(1048),o=r.aTypedArray;(0,r.exportTypedArrayMethod)("copyWithin",function(e,t){return i.call(o(this),e,t,arguments.length>2?arguments[2]:void 0)})},8927:function(e,t,n){"use strict";var r=n(260),i=n(2092).every,o=r.aTypedArray;(0,r.exportTypedArrayMethod)("every",function(e){return i(o(this),e,arguments.length>1?arguments[1]:void 0)})},3105:function(e,t,n){"use strict";var r=n(260),i=n(1285),o=r.aTypedArray;(0,r.exportTypedArrayMethod)("fill",function(e){return i.apply(o(this),arguments)})},5035:function(e,t,n){"use strict";var r=n(260),i=n(2092).filter,o=n(3074),a=r.aTypedArray;(0,r.exportTypedArrayMethod)("filter",function(e){var t=i(a(this),e,arguments.length>1?arguments[1]:void 0);return o(this,t)})},7174:function(e,t,n){"use strict";var r=n(260),i=n(2092).findIndex,o=r.aTypedArray;(0,r.exportTypedArrayMethod)("findIndex",function(e){return i(o(this),e,arguments.length>1?arguments[1]:void 0)})},4345:function(e,t,n){"use strict";var r=n(260),i=n(2092).find,o=r.aTypedArray;(0,r.exportTypedArrayMethod)("find",function(e){return i(o(this),e,arguments.length>1?arguments[1]:void 0)})},2846:function(e,t,n){"use strict";var r=n(260),i=n(2092).forEach,o=r.aTypedArray;(0,r.exportTypedArrayMethod)("forEach",function(e){i(o(this),e,arguments.length>1?arguments[1]:void 0)})},4731:function(e,t,n){"use strict";var r=n(260),i=n(1318).includes,o=r.aTypedArray;(0,r.exportTypedArrayMethod)("includes",function(e){return i(o(this),e,arguments.length>1?arguments[1]:void 0)})},7209:function(e,t,n){"use strict";var r=n(260),i=n(1318).indexOf,o=r.aTypedArray;(0,r.exportTypedArrayMethod)("indexOf",function(e){return i(o(this),e,arguments.length>1?arguments[1]:void 0)})},6319:function(e,t,n){"use strict";var r=n(7854),i=n(260),o=n(6992),a=n(5112)("iterator"),u=r.Uint8Array,s=o.values,l=o.keys,c=o.entries,f=i.aTypedArray,p=i.exportTypedArrayMethod,h=u&&u.prototype[a],d=!!h&&("values"==h.name||null==h.name),v=function(){return s.call(f(this))};p("entries",function(){return c.call(f(this))}),p("keys",function(){return l.call(f(this))}),p("values",v,!d),p(a,v,!d)},8867:function(e,t,n){"use strict";var r=n(260),i=r.aTypedArray,o=r.exportTypedArrayMethod,a=[].join;o("join",function(e){return a.apply(i(this),arguments)})},7789:function(e,t,n){"use strict";var r=n(260),i=n(6583),o=r.aTypedArray;(0,r.exportTypedArrayMethod)("lastIndexOf",function(e){return i.apply(o(this),arguments)})},3739:function(e,t,n){"use strict";var r=n(260),i=n(2092).map,o=n(6707),a=r.aTypedArray,u=r.aTypedArrayConstructor;(0,r.exportTypedArrayMethod)("map",function(e){return i(a(this),e,arguments.length>1?arguments[1]:void 0,function(e,t){return new(u(o(e,e.constructor)))(t)})})},4483:function(e,t,n){"use strict";var r=n(260),i=n(3671).right,o=r.aTypedArray;(0,r.exportTypedArrayMethod)("reduceRight",function(e){return i(o(this),e,arguments.length,arguments.length>1?arguments[1]:void 0)})},9368:function(e,t,n){"use strict";var r=n(260),i=n(3671).left,o=r.aTypedArray;(0,r.exportTypedArrayMethod)("reduce",function(e){return i(o(this),e,arguments.length,arguments.length>1?arguments[1]:void 0)})},2056:function(e,t,n){"use strict";var r=n(260),i=r.aTypedArray,o=r.exportTypedArrayMethod,a=Math.floor;o("reverse",function(){for(var e,t=i(this).length,n=a(t/2),r=0;r<n;)e=this[r],this[r++]=this[--t],this[t]=e;return this})},3462:function(e,t,n){"use strict";var r=n(260),i=n(7466),o=n(4590),a=n(7908),u=n(7293),s=r.aTypedArray;(0,r.exportTypedArrayMethod)("set",function(e){s(this);var t=o(arguments.length>
541?arguments[1]:void 0,1),n=this.length,r=a(e),u=i(r.length),l=0;if(u+t>n)throw RangeError("Wrong length");for(;l<u;)this[t+l]=r[l++]},u(function(){new Int8Array(1).set({})}))},678:function(e,t,n){"use strict";var r=n(260),i=n(6707),o=n(7293),a=r.aTypedArray,u=r.aTypedArrayConstructor,s=r.exportTypedArrayMethod,l=[].slice;s("slice",function(e,t){for(var n=l.call(a(this),e,t),r=i(this,this.constructor),o=0,s=n.length,c=new(u(r))(s);s>o;)c[o]=n[o++];return c},o(function(){new Int8Array(1).slice()}))},7462:function(e,t,n){"use strict";var r=n(260),i=n(2092).some,o=r.aTypedArray;(0,r.exportTypedArrayMethod)("some",function(e){return i(o(this),e,arguments.length>1?arguments[1]:void 0)})},3824:function(e,t,n){"use strict";var r=n(260),i=r.aTypedArray,o=r.exportTypedArrayMethod,a=[].sort;o("sort",function(e){return a.call(i(this),e)})},5021:function(e,t,n){"use strict";var r=n(260),i=n(7466),o=n(1400),a=n(6707),u=r.aTypedArray;(0,r.exportTypedArrayMethod)("subarray",function(e,t){var n=u(this),r=n.length,s=o(e,r);return new(a(n,n.constructor))(n.buffer,n.byteOffset+s*n.BYTES_PER_ELEMENT,i((void 0===t?r:o(t,r))-s))})},2974:function(e,t,n){"use strict";var r=n(7854),i=n(260),o=n(7293),a=r.Int8Array,u=i.aTypedArray,s=i.exportTypedArrayMethod,l=[].toLocaleString,c=[].slice,f=!!a&&o(function(){l.call(new a(1))});s("toLocaleString",function(){return l.apply(f?c.call(u(this)):u(this),arguments)},o(function(){return[1,2].toLocaleString()!=new a([1,2]).toLocaleString()})||!o(function(){a.prototype.toLocaleString.call([1,2])}))},5016:function(e,t,n){"use strict";var r=n(260).exportTypedArrayMethod,i=n(7293),o=n(7854).Uint8Array,a=o&&o.prototype||{},u=[].toString,s=[].join;i(function(){u.call({})})&&(u=function(){return s.call(this)});var l=a.toString!=u;r("toString",u,l)},2472:function(e,t,n){n(9843)("Uint8",function(e){return function(t,n,r){return e(this,t,n,r)}})},4747:function(e,t,n){var r=n(7854),i=n(8324),o=n(8533),a=n(8880);for(var u in i){var s=r[u],l=s&&s.prototype;if(l&&l.forEach!==o)try{a(l,"forEach",o)}catch(c){l.forEach=o}}},3948:function(e,t,n){var r=n(7854),i=n(8324),o=n(6992),a=n(8880),u=n(5112),s=u("iterator"),l=u("toStringTag"),c=o.values;for(var f in i){var p=r[f],h=p&&p.prototype;if(h){if(h[s]!==c)try{a(h,s,c)}catch(v){h[s]=c}if(h[l]||a(h,l,f),i[f])for(var d in o)if(h[d]!==o[d])try{a(h,d,o[d])}catch(v){h[d]=o[d]}}}},1637:function(e,t,n){"use strict";n(6992);var r=n(2109),i=n(5005),o=n(590),a=n(1320),u=n(2248),s=n(8003),l=n(4994),c=n(9909),f=n(5787),p=n(6656),h=n(9974),d=n(648),v=n(9670),y=n(111),g=n(30),m=n(9114),b=n(8554),x=n(1246),w=n(5112),E=i("fetch"),k=i("Headers"),A=w("iterator"),S=c.set,T=c.getterFor("URLSearchParams"),F=c.getterFor("URLSearchParamsIterator"),L=/\+/g,C=Array(4),R=function(e){return C[e-1]||(C[e-1]=RegExp("((?:%[\\da-f]{2}){"+e+"})","gi"))},I=function(e){try{return decodeURIComponent(e)}catch(t){return e}},U=function(e){var t=e.replace(L," "),n=4;try{return decodeURIComponent(t)}catch(r){for(;n;)t=t.replace(R(n--),I);return t}},_=/[!'()~]|%20/g,O={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},M=function(e){return O[e]},z=function(e){return encodeURIComponent(e).replace(_,M)},P=function(e,t){if(t)for(var n,r,i=t.split("&"),o=0;o<i.length;)(n=i[o++]).length&&(r=n.split("="),e.push({key:U(r.shift()),value:U(r.join("="))}))},j=function(e){this.entries.length=0,P(this.entries,e)},D=function(e,t){if(e<t)throw TypeError("Not enough arguments")},N=l(function(e,t){S(this,{type:"URLSearchParamsIterator",iterator:b(T(e).entries),kind:t})},"Iterator",function(){var e=F(this),t=e.kind,n=e.iterator.next(),r=n.value;return n.done||(n.value="keys"===t?r.key:"values"===t?r.value:[r.key,r.value]),n}),B=function(){f(this,B,"URLSearchParams");var e,t,n,r,i,o,a,u,s,l=arguments.length>0?arguments[0]:void 0,c=[];if(S(this,{type:"URLSearchParams",entries:c,updateURL:function(){},updateSearchParams:j}),void 0!==l)if(y(l))if("function"==typeof(e=x(l)))for(n=(t=e.call(l)).next;!(r=n.call(t)).done;){if((a=(o=(i=b(v(r.value))).next).call(i)).done||(u=o.call(i)).done||!o.call(i).done)throw TypeError("Expected sequence with length 2");c.push({key:a.value+"",value:u.value+""})}
vendor: 8,343 bytes, line 54
54else for(s in l)p(l,s)&&c.push({key:s,value:l[s]+""});else P(c,"string"==typeof l?"?"===l.charAt(0)?l.slice(1):l:l+"")},q=B.prototype;u(q,{append:function(e,t){D(arguments.length,2);var n=T(this);n.entries.push({key:e+"",value:t+""}),n.updateURL()},delete:function(e){D(arguments.length,1);for(var t=T(this),n=t.entries,r=e+"",i=0;i<n.length;)n[i].key===r?n.splice(i,1):i++;t.updateURL()},get:function(e){D(arguments.length,1);for(var t=T(this).entries,n=e+"",r=0;r<t.length;r++)if(t[r].key===n)return t[r].value;return null},getAll:function(e){D(arguments.length,1);for(var t=T(this).entries,n=e+"",r=[],i=0;i<t.length;i++)t[i].key===n&&r.push(t[i].value);return r},has:function(e){D(arguments.length,1);for(var t=T(this).entries,n=e+"",r=0;r<t.length;)if(t[r++].key===n)return!0;return!1},set:function(e,t){D(arguments.length,1);for(var n,r=T(this),i=r.entries,o=!1,a=e+"",u=t+"",s=0;s<i.length;s++)(n=i[s]).key===a&&(o?i.splice(s--,1):(o=!0,n.value=u));o||i.push({key:a,value:u}),r.updateURL()},sort:function(){var e,t,n,r=T(this),i=r.entries,o=i.slice();for(i.length=0,n=0;n<o.length;n++){for(e=o[n],t=0;t<n;t++)if(i[t].key>e.key){i.splice(t,0,e);break}t===n&&i.push(e)}r.updateURL()},forEach:function(e){for(var t,n=T(this).entries,r=h(e,arguments.length>1?arguments[1]:void 0,3),i=0;i<n.length;)r((t=n[i++]).value,t.key,this)},keys:function(){return new N(this,"keys")},values:function(){return new N(this,"values")},entries:function(){return new N(this,"entries")}},{enumerable:!0}),a(q,A,q.entries),a(q,"toString",function(){for(var e,t=T(this).entries,n=[],r=0;r<t.length;)e=t[r++],n.push(z(e.key)+"="+z(e.value));return n.join("&")},{enumerable:!0}),s(B,"URLSearchParams"),r({global:!0,forced:!o},{URLSearchParams:B}),o||"function"!=typeof E||"function"!=typeof k||r({global:!0,enumerable:!0,forced:!0},{fetch:function(e){var t,n,r,i=[e];return arguments.length>1&&(t=arguments[1],y(t)&&(n=t.body,"URLSearchParams"===d(n)&&((r=t.headers?new k(t.headers):new k).has("content-type")||r.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"),t=g(t,{body:m(0,String(n)),headers:m(0,r)}))),i.push(t)),E.apply(this,i)}}),e.exports={URLSearchParams:B,getState:T}},285:function(e,t,n){"use strict";n(8783);var r,i=n(2109),o=n(9781),a=n(590),u=n(7854),s=n(6048),l=n(1320),c=n(5787),f=n(6656),p=n(1574),h=n(8457),d=n(8710).codeAt,v=n(3197),y=n(8003),g=n(1637),m=n(9909),b=u.URL,x=g.URLSearchParams,w=g.getState,E=m.set,k=m.getterFor("URL"),A=Math.floor,S=Math.pow,T=/[A-Za-z]/,F=/[\d+-.A-Za-z]/,L=/\d/,C=/^(0x|0X)/,R=/^[0-7]+$/,I=/^\d+$/,U=/^[\dA-Fa-f]+$/,_=/[\u0000\t\u000A\u000D #%/:?@[\\]]/,O=/[\u0000\t\u000A\u000D #/:?@[\\]]/,M=/^[\u0000-\u001F ]+|[\u0000-\u001F ]+$/g,z=/[\t\u000A\u000D]/g,P=function(e,t){var n,r,i;if("["==t.charAt(0)){if("]"!=t.charAt(t.length-1))return"Invalid host";if(!(n=D(t.slice(1,-1))))return"Invalid host";e.host=n}else if(Q(e)){if(t=v(t),_.test(t))return"Invalid host";if(null===(n=j(t)))return"Invalid host";e.host=n}else{if(O.test(t))return"Invalid host";for(n="",r=h(t),i=0;i<r.length;i++)n+=Y(r[i],B);e.host=n}},j=function(e){var t,n,r,i,o,a,u,s=e.split(".");if(s.length&&""==s[s.length-1]&&s.pop(),(t=s.length)>4)return e;for(n=[],r=0;r<t;r++){if(""==(i=s[r]))return e;if(o=10,i.length>1&&"0"==i.charAt(0)&&(o=C.test(i)?16:8,i=i.slice(8==o?1:2)),""===i)a=0;else{if(!(10==o?I:8==o?R:U).test(i))return e;a=parseInt(i,o)}n.push(a)}for(r=0;r<t;r++)if(a=n[r],r==t-1){if(a>=S(256,5-t))return null}else if(a>255)return null;for(u=n.pop(),r=0;r<n.length;r++)u+=n[r]*S(256,3-r);return u},D=function(e){var t,n,r,i,o,a,u,s=[0,0,0,0,0,0,0,0],l=0,c=null,f=0,p=function(){return e.charAt(f)};if(":"==p()){if(":"!=e.charAt(1))return;f+=2,c=++l}for(;p();){if(8==l)return;if(":"!=p()){for(t=n=0;n<4&&U.test(p());)t=16*t+parseInt(p(),16),f++,n++;if("."==p()){if(0==n)return;if(f-=n,l>6)return;for(r=0;p();){if(i=null,r>0){if(!("."==p()&&r<4))return;f++}if(!L.test(p()))return;for(;L.test(p());){if(o=parseInt(p(),10),null===i)i=o;else{if(0==i)return;i=10*i+o}if(i>255)return;f++}s[l]=256*s[l]+i,2!=++r&&4!=r||l++}if(4!=r)return;break}if(":"==p()){if(f++,!p())return}else if(p())return;s[l++]=t}else{if(null!==c)return;f++,c=++l}}if(null!==c)for(a=l-c,l=7;0!=l&&a>0;)u=s[l],s[l--]=s[c+a-1],s[c+--a]=u;else if(8!=l)return;return s},N=function(e){var t,n,r,i;if("number"==typeof e){for(t=[],n=0;n<4;n++)t.unshift(e%256),e=A(e/256);return t.join(".")}if("object"==typeof e){for(t="",r=function(e){for(var t=null,n=1,r=null,i=0,o=0;o<8;o++)0!==e[o]?(i>n&&(t=r,n=i),r=null,i=0):(null===r&&(r=o),++i);return i>n&&(t=r,n=i),t}(e),n=0;n<8;n++)i&&0===e[n]||(i&&(i=!1),r===n?(t+=n?":":"::",i=!0):(t+=e[n].toString(16),n<7&&(t+=":")));return"["+t+"]"}return e},B={},q=p({},B,{" ":1,'"':1,"<":1,">":1,"`":1}),W=p({},q,{"#":1,"?":1,"{":1,"}":1}),H=p({},W,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Y=function(e,t){var n=d(e,0);return n>32&&n<127&&!f(t,e)?e:encodeURIComponent(e)},G={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Q=function(e){return f(G,e.scheme)},$=function(e){return""!=e.username||""!=e.password},V=function(e){return!e.host||e.cannotBeABaseURL||"file"==e.scheme},X=function(e,t){var n;return 2==e.length&&T.test(e.charAt(0))&&(":"==(n=e.charAt(1))||!t&&"|"==n)},K=function(e){var t;return e.length>1&&X(e.slice(0,2))&&(2==e.length||"/"===(t=e.charAt(2))||"\\"===t||"?"===t||"#"===t)},Z=function(e){var t=e.path,n=t.length;!n||"file"==e.scheme&&1==n&&X(t[0],!0)||t.pop()},J=function(e){return"."===e||"%2e"===e.toLowerCase()},ee={},te={},ne={},re={},ie={},oe={},ae={},ue={},se={},le={},ce={},fe={},pe={},he={},de={},ve={},ye={},ge={},me={},be={},xe={},we=function(e,t,n,i){var o,a,u,s,l,c=n||ee,p=0,d="",v=!1,y=!1,g=!1;for(n||(e.scheme="",e.username="",e.password="",e.host=null,e.port=null,e.path=[],e.query=null,e.fragment=null,e.cannotBeABaseURL=!1,t=t.replace(M,"")),t=t.replace(z,""),o=h(t);p<=o.length;){switch(a=o[p],c){case ee:if(!a||!T.test(a)){if(n)return"Invalid scheme";c=ne;continue}d+=a.toLowerCase(),c=te;break;case te:if(a&&(F.test(a)||"+"==a||"-"==a||"."==a))d+=a.toLowerCase();else{if(":"!=a){if(n)return"Invalid scheme";d="",c=ne,p=0;continue}if(n&&(Q(e)!=f(G,d)||"file"==d&&($(e)||null!==e.port)||"file"==e.scheme&&!e.host))return;if(e.scheme=d,n)return void(Q(e)&&G[e.scheme]==e.port&&(e.port=null));d="","file"==e.scheme?c=he:Q(e)&&i&&i.scheme==e.scheme?c=re:Q(e)?c=ue:"/"==o[p+1]?(c=ie,p++):(e.cannotBeABaseURL=!0,e.path.push(""),c=me)}break;case ne:if(!i||i.cannotBeABaseURL&&"#"!=a)return"Invalid scheme";if(i.cannotBeABaseURL&&"#"==a){e.scheme=i.scheme,e.path=i.path.slice(),e.query=i.query,e.fragment="",e.cannotBeABaseURL=!0,c=xe;break}c="file"==i.scheme?he:oe;continue;case re:if("/"!=a||"/"!=o[p+1]){c=oe;continue}c=se,p++;break;case ie:if("/"==a){c=le;break}c=ge;continue;case oe:if(e.scheme=i.scheme,a==r)e.username=i.username,e.password=i.password,e.host=i.host,e.port=i.port,e.path=i.path.slice(),e.query=i.query;else if("/"==a||"\\"==a&&Q(e))c=ae;else if("?"==a)e.username=i.username,e.password=i.password,e.host=i.host,e.port=i.port,e.path=i.path.slice(),e.query="",c=be;else{if("#"!=a){e.username=i.username,e.password=i.password,e.host=i.host,e.port=i.port,e.path=i.path.slice(),e.path.pop(),c=ge;continue}e.username=i.username,e.password=i.password,e.host=i.host,e.port=i.port,e.path=i.path.slice(),e.query=i.query,e.fragment="",c=xe}break;case ae:if(!Q(e)||"/"!=a&&"\\"!=a){if("/"!=a){e.username=i.username,e.password=i.password,e.host=i.host,e.port=i.port,c=ge;continue}c=le}else c=se;break;case ue:if(c=se,"/"!=a||"/"!=d.charAt(p+1))continue;p++;break;case se:if("/"!=a&&"\\"!=a){c=le;continue}break;case le:if("@"==a){v&&(d="%40"+d),v=!0,u=h(d);for(var m=0;m<u.length;m++){var b=u[m];if(":"!=b||g){var x=Y(b,H);g?e.password+=x:e.username+=x}else g=!0}d=""}else if(a==r||"/"==a||"?"==a||"#"==a||"\\"==a&&Q(e)){if(v&&""==d)return"Invalid authority";p-=h(d).length+1,d="",c=ce}else d+=a;break;case ce:case fe:if(n&&"file"==e.scheme){c=ve;continue}if(":"!=a||y){if(a==r||"/"==a||"?"==a||"#"==a||"\\"==a&&Q(e)){if(Q(e)&&""==d)return"Invalid host";if(n&&""==d&&($(e)||null!==e.port))return;if(s=P(e,d))return s;if(d="",c=ye,n)return;continue}"["==a?y=!0:"]"==a&&(y=!1),d+=a}else{if(""==d)return"Invalid host";if(s=P(e,d))return s;if(d="",c=pe,n==fe)return}break;case pe:if(!L.test(a)){if(a==r||"/"==a||"?"==a||"#"==a||"\\"==a&&Q(e)||n){if
vendor: 5,516 bytes, line 54
54(""!=d){var w=parseInt(d,10);if(w>65535)return"Invalid port";e.port=Q(e)&&w===G[e.scheme]?null:w,d=""}if(n)return;c=ye;continue}return"Invalid port"}d+=a;break;case he:if(e.scheme="file","/"==a||"\\"==a)c=de;else{if(!i||"file"!=i.scheme){c=ge;continue}if(a==r)e.host=i.host,e.path=i.path.slice(),e.query=i.query;else if("?"==a)e.host=i.host,e.path=i.path.slice(),e.query="",c=be;else{if("#"!=a){K(o.slice(p).join(""))||(e.host=i.host,e.path=i.path.slice(),Z(e)),c=ge;continue}e.host=i.host,e.path=i.path.slice(),e.query=i.query,e.fragment="",c=xe}}break;case de:if("/"==a||"\\"==a){c=ve;break}i&&"file"==i.scheme&&!K(o.slice(p).join(""))&&(X(i.path[0],!0)?e.path.push(i.path[0]):e.host=i.host),c=ge;continue;case ve:if(a==r||"/"==a||"\\"==a||"?"==a||"#"==a){if(!n&&X(d))c=ge;else if(""==d){if(e.host="",n)return;c=ye}else{if(s=P(e,d))return s;if("localhost"==e.host&&(e.host=""),n)return;d="",c=ye}continue}d+=a;break;case ye:if(Q(e)){if(c=ge,"/"!=a&&"\\"!=a)continue}else if(n||"?"!=a)if(n||"#"!=a){if(a!=r&&(c=ge,"/"!=a))continue}else e.fragment="",c=xe;else e.query="",c=be;break;case ge:if(a==r||"/"==a||"\\"==a&&Q(e)||!n&&("?"==a||"#"==a)){if(".."===(l=(l=d).toLowerCase())||"%2e."===l||".%2e"===l||"%2e%2e"===l?(Z(e),"/"==a||"\\"==a&&Q(e)||e.path.push("")):J(d)?"/"==a||"\\"==a&&Q(e)||e.path.push(""):("file"==e.scheme&&!e.path.length&&X(d)&&(e.host&&(e.host=""),d=d.charAt(0)+":"),e.path.push(d)),d="","file"==e.scheme&&(a==r||"?"==a||"#"==a))for(;e.path.length>1&&""===e.path[0];)e.path.shift();"?"==a?(e.query="",c=be):"#"==a&&(e.fragment="",c=xe)}else d+=Y(a,W);break;case me:"?"==a?(e.query="",c=be):"#"==a?(e.fragment="",c=xe):a!=r&&(e.path[0]+=Y(a,B));break;case be:n||"#"!=a?a!=r&&("'"==a&&Q(e)?e.query+="%27":e.query+="#"==a?"%23":Y(a,B)):(e.fragment="",c=xe);break;case xe:a!=r&&(e.fragment+=Y(a,q))}p++}},Ee=function(e){var t,n,r=c(this,Ee,"URL"),i=arguments.length>1?arguments[1]:void 0,a=String(e),u=E(r,{type:"URL"});if(void 0!==i)if(i instanceof Ee)t=k(i);else if(n=we(t={},String(i)))throw TypeError(n);if(n=we(u,a,null,t))throw TypeError(n);var s=u.searchParams=new x,l=w(s);l.updateSearchParams(u.query),l.updateURL=function(){u.query=String(s)||null},o||(r.href=Ae.call(r),r.origin=Se.call(r),r.protocol=Te.call(r),r.username=Fe.call(r),r.password=Le.call(r),r.host=Ce.call(r),r.hostname=Re.call(r),r.port=Ie.call(r),r.pathname=Ue.call(r),r.search=_e.call(r),r.searchParams=Oe.call(r),r.hash=Me.call(r))},ke=Ee.prototype,Ae=function(){var e=k(this),t=e.scheme,n=e.username,r=e.password,i=e.host,o=e.port,a=e.path,u=e.query,s=e.fragment,l=t+":";return null!==i?(l+="//",$(e)&&(l+=n+(r?":"+r:"")+"@"),l+=N(i),null!==o&&(l+=":"+o)):"file"==t&&(l+="//"),l+=e.cannotBeABaseURL?a[0]:a.length?"/"+a.join("/"):"",null!==u&&(l+="?"+u),null!==s&&(l+="#"+s),l},Se=function(){var e=k(this),t=e.scheme,n=e.port;if("blob"==t)try{return new URL(t.path[0]).origin}catch(r){return"null"}return"file"!=t&&Q(e)?t+"://"+N(e.host)+(null!==n?":"+n:""):"null"},Te=function(){return k(this).scheme+":"},Fe=function(){return k(this).username},Le=function(){return k(this).password},Ce=function(){var e=k(this),t=e.host,n=e.port;return null===t?"":null===n?N(t):N(t)+":"+n},Re=function(){var e=k(this).host;return null===e?"":N(e)},Ie=function(){var e=k(this).port;return null===e?"":String(e)},Ue=function(){var e=k(this),t=e.path;return e.cannotBeABaseURL?t[0]:t.length?"/"+t.join("/"):""},_e=function(){var e=k(this).query;return e?"?"+e:""},Oe=function(){return k(this).searchParams},Me=function(){var e=k(this).fragment;return e?"#"+e:""},ze=function(e,t){return{get:e,set:t,configurable:!0,enumerable:!0}};if(o&&s(ke,{href:ze(Ae,function(e){var t=k(this),n=String(e),r=we(t,n);if(r)throw TypeError(r);w(t.searchParams).updateSearchParams(t.query)}),origin:ze(Se),protocol:ze(Te,function(e){var t=k(this);we(t,String(e)+":",ee)}),username:ze(Fe,function(e){var t=k(this),n=h(String(e));if(!V(t)){t.username="";for(var r=0;r<n.length;r++)t.username+=Y(n[r],H)}}),password:ze(Le,function(e){var t=k(this),n=h(String(e));if(!V(t)){t.password="";for(var r=0;r<n.length;r++)t.password+=Y(n[r],H)}}),host:ze(Ce,function(e){var t=k(this);t.cannotBeABaseURL||we(t,String(e),ce)}),hostname:ze(Re,function(e){var t=k(this);t.cannotBeABaseURL||we(t,String(e),fe)}),port:ze(Ie,function(e){var t=k(this);V(t)||(""==(e=String(e))?t.port=null:we(t,e,pe))}),pathname:ze(Ue,function(e){var t=k(this);t.cannotBeABaseURL||(t.path=[],we(t,e+"",ye))}),search:ze(_e,function(e){var t=k(this);""==(e=String(e))?t.query=null:("?"==e.charAt(0)&&(e=e.slice(1)),t.query="",we(t,e,be)),w(t.searchParams).updateSearchParams(t.query)}),searchParams:ze(Oe),hash:ze(Me,function(e){var t=k(this);""!=(e=String(e))?("#"==e.charAt(0)&&(e=e.slice(1)),t.fragment="",we(t,e,xe)):t.fragment=null})}),l(ke,"toJSON",function(){return Ae.call(this)},{enumerable:!0}),l(ke,"toString",function(){return Ae.call(this)},{enumerable:!0}),b){var Pe=b.createObjectURL,je=b.revokeObjectURL;Pe&&l(Ee,"createObjectURL",function(e){return Pe.apply(b,arguments)}),je&&l(Ee,"revokeObjectURL",function(e){return je.apply(b,arguments)})}y(Ee,"URL"),i({global:!0,forced:!a,sham:!o},{URL:Ee})}},t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}
54}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return function(){"use strict";n.r(r),n.d(r,{Dropzone:function(){return x},default:function(){return S}});n(2222),n(7327),n(2772),n(6992),n(1249),n(7042),n(561),n(8264),n(8309),n(489),n(1539),n(4916),n(9714),n(8783),n(4723),n(5306),n(3123),n(3210),n(2472),n(2990),n(8927),n(3105),n(5035),n(4345),n(7174),n(2846),n(4731),n(7209),n(6319),n(8867),n(7789),n(3739),n(9368),n(4483),n(2056),n(3462),n(678),n(7462),n(3824),n(5021),n(2974),n(5016),n(4747),n(3948),n(285);function e(e,n){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,n){if(!e)return;if("string"==typeof e)return t(e,n);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return t(e,n)}(e))||n&&e&&"number"==typeof e.length){r&&(e=r);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,u=!0,s=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return u=e.done,e},e:function(e){s=!0,a=e},f:function(){try{u||null==r.return||r.return()}finally{if(s)throw a}}}}function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var o=function(){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t)}var n,r,o;return n=t,(r=[{key:"on",value:function(e,t){return this._callbacks=this._callbacks||{},this._callbacks[e]||(this._callbacks[e]=[]),this._callbacks[e].push(t),this}},{key:"emit",value:function(t){this._callbacks=this._callbacks||{};for(var n=this._callbacks[t],r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];if(n){var a,u=e(n,!0);try{for(u.s();!(a=u.n()).done;){a.value.apply(this,i)}}catch(s){u.e(s)}finally{u.f()}}return this.element&&this.element.dispatchEvent(this.makeEvent("dropzone:"+t,{args:i})),this}},{key:"makeEvent",value:function(e,t){var n={bubbles:!0,cancelable:!0,detail:t};if("function"==typeof window.CustomEvent)return new CustomEvent(e,n);var r=document.createEvent("CustomEvent");return r.initCustomEvent(e,n.bubbles,n.cancelable,n.detail),r}},{key:"off",value:function(e,t){if(!this._callbacks||0===arguments.length)return this._callbacks={},this;var n=this._callbacks[e];if(!n)return this;if(1===arguments.length)return delete this._callbacks[e],this;for(var r=0;r<n.length;r++){if(n[r]===t){n.splice(r,1);break}}return this}}])&&i(n.prototype,r),o&&i(n,o),t}();function a(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return u(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var s={url:null,method:"post",withCredentials:!1,timeout:null,parallelUploads:2,uploadMultiple:!1,chunking:!1,forceChunking:!1,
vendor: 9,233 bytes, line 54
54chunkSize:2e6,parallelChunkUploads:!1,retryChunks:!1,retryChunksLimit:3,maxFilesize:256,paramName:"file",createImageThumbnails:!0,maxThumbnailFilesize:10,thumbnailWidth:120,thumbnailHeight:120,thumbnailMethod:"crop",resizeWidth:null,resizeHeight:null,resizeMimeType:null,resizeQuality:.8,resizeMethod:"contain",filesizeBase:1e3,maxFiles:null,headers:null,clickable:!0,ignoreHiddenFiles:!0,acceptedFiles:null,acceptedMimeTypes:null,autoProcessQueue:!0,autoQueue:!0,addRemoveLinks:!1,previewsContainer:null,disablePreviews:!1,hiddenInputContainer:"body",capture:null,renameFilename:null,renameFile:null,forceFallback:!1,dictDefaultMessage:"Drop files here to upload",dictFallbackMessage:"Your browser does not support drag'n'drop file uploads.",dictFallbackText:"Please use the fallback form below to upload your files like in the olden days.",dictFileTooBig:"File is too big ({{filesize}}MiB). Max filesize: {{maxFilesize}}MiB.",dictInvalidFileType:"You can't upload files of this type.",dictResponseError:"Server responded with {{statusCode}} code.",dictCancelUpload:"Cancel upload",dictUploadCanceled:"Upload canceled.",dictCancelUploadConfirmation:"Are you sure you want to cancel this upload?",dictRemoveFile:"Remove file",dictRemoveFileConfirmation:null,dictMaxFilesExceeded:"You can not upload any more files.",dictFileSizeUnits:{tb:"TB",gb:"GB",mb:"MB",kb:"KB",b:"b"},init:function(){},params:function(e,t,n){if(n)return{dzuuid:n.file.upload.uuid,dzchunkindex:n.index,dztotalfilesize:n.file.size,dzchunksize:this.options.chunkSize,dztotalchunkcount:n.file.upload.totalChunkCount,dzchunkbyteoffset:n.index*this.options.chunkSize}},accept:function(e,t){return t()},chunksUploaded:function(e,t){t()},fallback:function(){var e;this.element.className="".concat(this.element.className," dz-browser-not-supported");var t,n=a(this.element.getElementsByTagName("div"),!0);try{for(n.s();!(t=n.n()).done;){var r=t.value;if(/(^| )dz-message($| )/.test(r.className)){e=r,r.className="dz-message";break}}}catch(o){n.e(o)}finally{n.f()}e||(e=x.createElement('<div class="dz-message"><span></span></div>'),this.element.appendChild(e));var i=e.getElementsByTagName("span")[0];return i&&(null!=i.textContent?i.textContent=this.options.dictFallbackMessage:null!=i.innerText&&(i.innerText=this.options.dictFallbackMessage)),this.element.appendChild(this.getFallbackForm())},resize:function(e,t,n,r){var i={srcX:0,srcY:0,srcWidth:e.width,srcHeight:e.height},o=e.width/e.height;null==t&&null==n?(t=i.srcWidth,n=i.srcHeight):null==t?t=n*o:null==n&&(n=t/o);var a=(t=Math.min(t,i.srcWidth))/(n=Math.min(n,i.srcHeight));if(i.srcWidth>t||i.srcHeight>n)if("crop"===r)o>a?(i.srcHeight=e.height,i.srcWidth=i.srcHeight*a):(i.srcWidth=e.width,i.srcHeight=i.srcWidth/a);else{if("contain"!==r)throw new Error("Unknown resizeMethod '".concat(r,"'"));o>a?n=t/o:t=n*o}return i.srcX=(e.width-i.srcWidth)/2,i.srcY=(e.height-i.srcHeight)/2,i.trgWidth=t,i.trgHeight=n,i},transformFile:function(e,t){return(this.options.resizeWidth||this.options.resizeHeight)&&e.type.match(/image.*/)?this.resizeImage(e,this.options.resizeWidth,this.options.resizeHeight,this.options.resizeMethod,t):t(e)},previewTemplate:'<div class="dz-preview dz-file-preview"> <div class="dz-image"><img data-dz-thumbnail/></div> <div class="dz-details"> <div class="dz-size"><span data-dz-size></span></div> <div class="dz-filename"><span data-dz-name></span></div> </div> <div class="dz-progress"> <span class="dz-upload" data-dz-uploadprogress></span> </div> <div class="dz-error-message"><span data-dz-errormessage></span></div> <div class="dz-success-mark"> <svg width="54px" height="54px" viewBox="0 0 54 54" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <title>Check</title> <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> <path d="M23.5,31.8431458 L17.5852419,25.9283877 C16.0248253,24.3679711 13.4910294,24.366835 11.9289322,25.9289322 C10.3700136,27.4878508 10.3665912,30.0234455 11.9283877,31.5852419 L20.4147581,40.0716123 C20.5133999,40.1702541 20.6159315,40.2626649 20.7218615,40.3488435 C22.2835669,41.8725651 24.794234,41.8626202 26.3461564,40.3106978 L43.3106978,23.3461564 C44.8771021,21.7797521 44.8758057,19.2483887 43.3137085,17.6862915 C41.7547899,16.1273729 39.2176035,16.1255422 37.6538436,17.6893022 L23.5,31.8431458 Z M27,53 C41.3594035,53 53,41.3594035 53,27 C53,12.6405965 41.3594035,1 27,1 C12.6405965,1 1,12.6405965 1,27 C1,41.3594035 12.6405965,53 27,53 Z" stroke-opacity="0.198794158" stroke="#747474" fill-opacity="0.816519475" fill="#FFFFFF"></path> </g> </svg> </div> <div class="dz-error-mark"> <svg width="54px" height="54px" viewBox="0 0 54 54" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <title>Error</title> <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> <g stroke="#747474" stroke-opacity="0.198794158" fill="#FFFFFF" fill-opacity="0.816519475"> <path d="M32.6568542,29 L38.3106978,23.3461564 C39.8771021,21.7797521 39.8758057,19.2483887 38.3137085,17.6862915 C36.7547899,16.1273729 34.2176035,16.1255422 32.6538436,17.6893022 L27,23.3431458 L21.3461564,17.6893022 C19.7823965,16.1255422 17.2452101,16.1273729 15.6862915,17.6862915 C14.1241943,19.2483887 14.1228979,21.7797521 15.6893022,23.3461564 L21.3431458,29 L15.6893022,34.6538436 C14.1228979,36.2202479 14.1241943,38.7516113 15.6862915,40.3137085 C17.2452101,41.8726271 19.7823965,41.8744578 21.3461564,40.3106978 L27,34.6568542 L32.6538436,40.3106978 C34.2176035,41.8744578 36.7547899,41.8726271 38.3137085,40.3137085 C39.8758057,38.7516113 39.8771021,36.2202479 38.3106978,34.6538436 L32.6568542,29 Z M27,53 C41.3594035,53 53,41.3594035 53,27 C53,12.6405965 41.3594035,1 27,1 C12.6405965,1 1,12.6405965 1,27 C1,41.3594035 12.6405965,53 27,53 Z"></path> </g> </g> </svg> </div> </div> ',drop:function(e){return this.element.classList.remove("dz-drag-hover")},dragstart:function(e){},dragend:function(e){return this.element.classList.remove("dz-drag-hover")},dragenter:function(e){return this.element.classList.add("dz-drag-hover")},dragover:function(e){return this.element.classList.add("dz-drag-hover")},dragleave:function(e){return this.element.classList.remove("dz-drag-hover")},paste:function(e){},reset:function(){return this.element.classList.remove("dz-started")},addedfile:function(e){var t=this;if(this.element===this.previewsContainer&&this.element.classList.add("dz-started"),this.previewsContainer&&!this.options.disablePreviews){e.previewElement=x.createElement(this.options.previewTemplate.trim()),e.previewTemplate=e.previewElement,this.previewsContainer.appendChild(e.previewElement);var n,r=a(e.previewElement.querySelectorAll("[data-dz-name]"),!0);try{for(r.s();!(n=r.n()).done;){var i=n.value;i.textContent=e.name}}catch(f){r.e(f)}finally{r.f()}var o,u=a(e.previewElement.querySelectorAll("[data-dz-size]"),!0);try{for(u.s();!(o=u.n()).done;)(i=o.value).innerHTML=this.filesize(e.size)}catch(f){u.e(f)}finally{u.f()}this.options.addRemoveLinks&&(e._removeLink=x.createElement('<a class="dz-remove" href="javascript:undefined;" data-dz-remove>'.concat(this.options.dictRemoveFile,"</a>")),e.previewElement.appendChild(e._removeLink));var s,l=function(n){return n.preventDefault(),n.stopPropagation(),e.status===x.UPLOADING?x.confirm(t.options.dictCancelUploadConfirmation,function(){return t.removeFile(e)}):t.options.dictRemoveFileConfirmation?x.confirm(t.options.dictRemoveFileConfirmation,function(){return t.removeFile(e)}):t.removeFile(e)},c=a(e.previewElement.querySelectorAll("[data-dz-remove]"),!0);try{for(c.s();!(s=c.n()).done;){s.value.addEventListener("click",l)}}catch(f){c.e(f)}finally{c.f()}}},removedfile:function(e){return null!=e.previewElement&&null!=e.previewElement.parentNode&&e.previewElement.parentNode.removeChild(e.previewElement),this._updateMaxFilesReachedClass()},thumbnail:function(e,t){if(e.previewElement){e.previewElement.classList.remove("dz-file-preview");var n,r=a(e.previewElement.querySelectorAll("[data-dz-thumbnail]"),!0);try{for(r.s();!(n=r.n()).done;){var i=n.value;i.alt=e.name,i.src=t}}catch(o){r.e(o)}finally{r.f()}return setTimeout(function(){return e.previewElement.classList.add("dz-image-preview")},1)}},error:function(e,t){if(e.previewElement){e.previewElement.classList.add("dz-error"),"string"!=typeof t&&t.error&&(t=t.error);var n,r=a(e.previewElement.querySelectorAll("[data-dz-errormessage]"),!0);try{for(r.s();!(n=r.n()).done;){n.value.textContent=t}}catch(i){r.e(i)}finally{r.f()}}},errormultiple:function(){},processing:function(e){if(e.previewElement&&(e.previewElement.classList.add("dz-processing"),e._removeLink))return e._removeLink.innerHTML=this.options.dictCancelUpload},processingmultiple:function(){},uploadprogress:function(e,t,n){if(e.previewElement){var r,i=a(e.previewElement.querySelectorAll("[data-dz-uploadprogress]"),!0);try{for(i.s();!(r=i.n()).done;){var o=r.value;"PROGRESS"===o.nodeName?o.value=t:o.style.width="".concat(t,"%")}}catch(u){i.e(u)}finally{i.f()}}},totaluploadprogress:function(){},sending:function(){},sendingmultiple:function(){},success:function(e){if(e.previewElement)return e.previewElement.classList.add("dz-success")},successmultiple:function(){}
vendor: 8,584 bytes, line 54
54,canceled:function(e){return this.emit("error",e,this.options.dictUploadCanceled)},canceledmultiple:function(){},complete:function(e){if(e._removeLink&&(e._removeLink.innerHTML=this.options.dictRemoveFile),e.previewElement)return e.previewElement.classList.add("dz-complete")},completemultiple:function(){},maxfilesexceeded:function(){},maxfilesreached:function(){},queuecomplete:function(){},addedfiles:function(){}};function l(e){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return f(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return f(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,u=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw o}}}}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function d(e,t,n){return t&&h(e.prototype,t),n&&h(e,n),e}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=b(e);if(t){var i=b(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return g(this,n)}}function g(e,t){return!t||"object"!==l(t)&&"function"!=typeof t?m(e):t}function m(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function b(e){return(b=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var x=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&v(e,t)}(n,o);var t=y(n);function n(e,r){var i,o,a;if(p(this,n),(i=t.call(this)).element=e,i.version=n.version,i.clickableElements=[],i.listeners=[],i.files=[],"string"==typeof i.element&&(i.element=document.querySelector(i.element)),!i.element||null==i.element.nodeType)throw new Error("Invalid dropzone element.");if(i.element.dropzone)throw new Error("Dropzone already attached.");n.instances.push(m(i)),i.element.dropzone=m(i);var u=null!=(a=n.optionsForElement(i.element))?a:{};if(i.options=n.extend({},s,u,null!=r?r:{}),i.options.previewTemplate=i.options.previewTemplate.replace(/\n*/g,""),i.options.forceFallback||!n.isBrowserSupported())return g(i,i.options.fallback.call(m(i)));if(null==i.options.url&&(i.options.url=i.element.getAttribute("action")),!i.options.url)throw new Error("No URL provided.");if(i.options.acceptedFiles&&i.options.acceptedMimeTypes)throw new Error("You can't provide both 'acceptedFiles' and 'acceptedMimeTypes'. 'acceptedMimeTypes' is deprecated.");if(i.options.uploadMultiple&&i.options.chunking)throw new Error("You cannot set both: uploadMultiple and chunking.");return i.options.acceptedMimeTypes&&(i.options.acceptedFiles=i.options.acceptedMimeTypes,delete i.options.acceptedMimeTypes),null!=i.options.renameFilename&&(i.options.renameFile=function(e){return i.options.renameFilename.call(m(i),e.name,e)}),"string"==typeof i.options.method&&(i.options.method=i.options.method.toUpperCase()),(o=i.getExistingFallback())&&o.parentNode&&o.parentNode.removeChild(o),!1!==i.options.previewsContainer&&(i.options.previewsContainer?i.previewsContainer=n.getElement(i.options.previewsContainer,"previewsContainer"):i.previewsContainer=i.element),i.options.clickable&&(!0===i.options.clickable?i.clickableElements=[i.element]:i.clickableElements=n.getElements(i.options.clickable,"clickable")),i.init(),i}return d(n,[{key:"getAcceptedFiles",value:function(){return this.files.filter(function(e){return e.accepted}).map(function(e){return e})}},{key:"getRejectedFiles",value:function(){return this.files.filter(function(e){return!e.accepted}).map(function(e){return e})}},{key:"getFilesWithStatus",value:function(e){return this.files.filter(function(t){return t.status===e}).map(function(e){return e})}},{key:"getQueuedFiles",value:function(){return this.getFilesWithStatus(n.QUEUED)}},{key:"getUploadingFiles",value:function(){return this.getFilesWithStatus(n.UPLOADING)}},{key:"getAddedFiles",value:function(){return this.getFilesWithStatus(n.ADDED)}},{key:"getActiveFiles",value:function(){return this.files.filter(function(e){return e.status===n.UPLOADING||e.status===n.QUEUED}).map(function(e){return e})}},{key:"init",value:function(){var e=this;if("form"===this.element.tagName&&this.element.setAttribute("enctype","multipart/form-data"),this.element.classList.contains("dropzone")&&!this.element.querySelector(".dz-message")&&this.element.appendChild(n.createElement('<div class="dz-default dz-message"><button class="dz-button" type="button">'.concat(this.options.dictDefaultMessage,"</button></div>"))),this.clickableElements.length){!function t(){e.hiddenFileInput&&e.hiddenFileInput.parentNode.removeChild(e.hiddenFileInput),e.hiddenFileInput=document.createElement("input"),e.hiddenFileInput.setAttribute("type","file"),(null===e.options.maxFiles||e.options.maxFiles>1)&&e.hiddenFileInput.setAttribute("multiple","multiple"),e.hiddenFileInput.className="dz-hidden-input",null!==e.options.acceptedFiles&&e.hiddenFileInput.setAttribute("accept",e.options.acceptedFiles),null!==e.options.capture&&e.hiddenFileInput.setAttribute("capture",e.options.capture),e.hiddenFileInput.setAttribute("tabindex","-1"),e.hiddenFileInput.style.visibility="hidden",e.hiddenFileInput.style.position="absolute",e.hiddenFileInput.style.top="0",e.hiddenFileInput.style.left="0",e.hiddenFileInput.style.height="0",e.hiddenFileInput.style.width="0",n.getElement(e.options.hiddenInputContainer,"hiddenInputContainer").appendChild(e.hiddenFileInput),e.hiddenFileInput.addEventListener("change",function(){var n=e.hiddenFileInput.files;if(n.length){var r,i=c(n,!0);try{for(i.s();!(r=i.n()).done;){var o=r.value;e.addFile(o)}}catch(a){i.e(a)}finally{i.f()}}e.emit("addedfiles",n),t()})}()}this.URL=null!==window.URL?window.URL:window.webkitURL;var t,r=c(this.events,!0);try{for(r.s();!(t=r.n()).done;){var i=t.value;this.on(i,this.options[i])}}catch(a){r.e(a)}finally{r.f()}this.on("uploadprogress",function(){return e.updateTotalUploadProgress()}),this.on("removedfile",function(){return e.updateTotalUploadProgress()}),this.on("canceled",function(t){return e.emit("complete",t)}),this.on("complete",function(t){if(0===e.getAddedFiles().length&&0===e.getUploadingFiles().length&&0===e.getQueuedFiles().length)return setTimeout(function(){return e.emit("queuecomplete")},0)});var o=function(e){if(function(e){if(e.dataTransfer.types)for(var t=0;t<e.dataTransfer.types.length;t++)if("Files"===e.dataTransfer.types[t])return!0;return!1}(e))return e.stopPropagation(),e.preventDefault?e.preventDefault():e.returnValue=!1};return this.listeners=[{element:this.element,events:{dragstart:function(t){return e.emit("dragstart",t)},dragenter:function(t){return o(t),e.emit("dragenter",t)},dragover:function(t){var n;try{n=t.dataTransfer.effectAllowed}catch(r){}return t.dataTransfer.dropEffect="move"===n||"linkMove"===n?"move":"copy",o(t),e.emit("dragover",t)},dragleave:function(t){return e.emit("dragleave",t)},drop:function(t){return o(t),e.drop(t)},dragend:function(t){return e.emit("dragend",t)}}}
vendor: 4,116 bytes, line 54
54],this.clickableElements.forEach(function(t){return e.listeners.push({element:t,events:{click:function(r){return(t!==e.element||r.target===e.element||n.elementInside(r.target,e.element.querySelector(".dz-message")))&&e.hiddenFileInput.click(),!0}}})}),this.enable(),this.options.init.call(this)}},{key:"destroy",value:function(){return this.disable(),this.removeAllFiles(!0),(null!=this.hiddenFileInput?this.hiddenFileInput.parentNode:void 0)&&(this.hiddenFileInput.parentNode.removeChild(this.hiddenFileInput),this.hiddenFileInput=null),delete this.element.dropzone,n.instances.splice(n.instances.indexOf(this),1)}},{key:"updateTotalUploadProgress",value:function(){var e,t=0,n=0;if(this.getActiveFiles().length){var r,i=c(this.getActiveFiles(),!0);try{for(i.s();!(r=i.n()).done;){var o=r.value;t+=o.upload.bytesSent,n+=o.upload.total}}catch(a){i.e(a)}finally{i.f()}e=100*t/n}else e=100;return this.emit("totaluploadprogress",e,n,t)}},{key:"_getParamName",value:function(e){return"function"==typeof this.options.paramName?this.options.paramName(e):"".concat(this.options.paramName).concat(this.options.uploadMultiple?"[".concat(e,"]"):"")}},{key:"_renameFile",value:function(e){return"function"!=typeof this.options.renameFile?e.name:this.options.renameFile(e)}},{key:"getFallbackForm",value:function(){var e,t;if(e=this.getExistingFallback())return e;var r='<div class="dz-fallback">';this.options.dictFallbackText&&(r+="<p>".concat(this.options.dictFallbackText,"</p>")),r+='<input type="file" name="'.concat(this._getParamName(0),'" ').concat(this.options.uploadMultiple?'multiple="multiple"':void 0,' /><input type="submit" value="Upload!"></div>');var i=n.createElement(r);return"FORM"!==this.element.tagName?(t=n.createElement('<form action="'.concat(this.options.url,'" enctype="multipart/form-data" method="').concat(this.options.method,'"></form>'))).appendChild(i):(this.element.setAttribute("enctype","multipart/form-data"),this.element.setAttribute("method",this.options.method)),null!=t?t:i}},{key:"getExistingFallback",value:function(){for(var e=function(e){var t,n=c(e,!0);try{for(n.s();!(t=n.n()).done;){var r=t.value;if(/(^| )fallback($| )/.test(r.className))return r}}catch(i){n.e(i)}finally{n.f()}},t=0,n=["div","form"];t<n.length;t++){var r,i=n[t];if(r=e(this.element.getElementsByTagName(i)))return r}}},{key:"setupEventListeners",value:function(){return this.listeners.map(function(e){return function(){var t=[];for(var n in e.events){var r=e.events[n];t.push(e.element.addEventListener(n,r,!1))}return t}()})}},{key:"removeEventListeners",value:function(){return this.listeners.map(function(e){return function(){var t=[];for(var n in e.events){var r=e.events[n];t.push(e.element.removeEventListener(n,r,!1))}return t}()})}},{key:"disable",value:function(){var e=this;return this.clickableElements.forEach(function(e){return e.classList.remove("dz-clickable")}),this.removeEventListeners(),this.disabled=!0,this.files.map(function(t){return e.cancelUpload(t)})}},{key:"enable",value:function(){return delete this.disabled,this.clickableElements.forEach(function(e){return e.classList.add("dz-clickable")}),this.setupEventListeners()}},{key:"filesize",value:function(e){var t=0,n="b";if(e>0){for(var r=["tb","gb","mb","kb","b"],i=0;i<r.length;i++){var o=r[i];if(e>=Math.pow(this.options.filesizeBase,4-i)/10){t=e/Math.pow(this.options.filesizeBase,4-i),n=o;break}}t=Math.round(10*t)/10}return"<strong>".concat(t,"</strong> ").concat(this.options.dictFileSizeUnits[n])}},{key:"_updateMaxFilesReachedClass",value:function(){return null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(this.getAcceptedFiles().length===this.options.maxFiles&&this.emit("maxfilesreached",this.files),this.element.classList.add("dz-max-files-reached")):this.element.classList.remove("dz-max-files-reached")}},{key:"drop",value:function(e){if(e.dataTransfer){this.emit("drop",e);for(var t=[],n=0;n<e.dataTransfer.files.length;n++)t[n]=e.dataTransfer.files[n];if(t.length){var r=e.dataTransfer.items;r&&r.length&&null!=r[0].webkitGetAsEntry?this._addFilesFromItems(r):this.handleFiles(t)}
54this.emit("addedfiles",t)}}},{key:"paste",value:function(e){if(null!=(t=null!=e?e.clipboardData:void 0,n=function(e){return e.items},null!=t?n(t):void 0)){var t,n;this.emit("paste",e);var r=e.clipboardData.items;return r.length?this._addFilesFromItems(r):void 0}}},{key:"handleFiles",value:function(e){var t,n=c(e,!0);try{for(n.s();!(t=n.n()).done;){var r=t.value;this.addFile(r)}}catch(i){n.e(i)}finally{n.f()}}},{key:"_addFilesFromItems",value:function(e){var t=this;return function(){var n,r=[],i=c(e,!0);try{for(i.s();!(n=i.n()).done;){var o,a=n.value;null!=a.webkitGetAsEntry&&(o=a.webkitGetAsEntry())?o.isFile?r.push(t.addFile(a.getAsFile())):o.isDirectory?r.push(t._addFilesFromDirectory(o,o.name)):r.push(void 0):null!=a.getAsFile&&(null==a.kind||"file"===a.kind)?r.push(t.addFile(a.getAsFile())):r.push(void 0)}}catch(u){i.e(u)}finally{i.f()}return r}()}},{key:"_addFilesFromDirectory",value:function(e,t){var n=this,r=e.createReader(),i=function(e){return t=console,n="log",r=function(t){return t.log(e)},null!=t&&"function"==typeof t[n]?r(t,n):void 0;var t,n,r};return function e(){return r.readEntries(function(r){if(r.length>0){var i,o=c(r,!0);try{for(o.s();!(i=o.n()).done;){var a=i.value;a.isFile?a.file(function(e){if(!n.options.ignoreHiddenFiles||"."!==e.name.substring(0,1))return e.fullPath="".concat(t,"/").concat(e.name),n.addFile(e)}):a.isDirectory&&n._addFilesFromDirectory(a,"".concat(t,"/").concat(a.name))}}catch(u){o.e(u)}finally{o.f()}e()}return null},i)}()}},{key:"accept",value:function(e,t){this.options.maxFilesize&&e.size>1024*this.options.maxFilesize*1024?t(this.options.dictFileTooBig.replace("{{filesize}}",Math.round(e.size/1024/10.24)/100).replace("{{maxFilesize}}",this.options.maxFilesize)):n.isValidFile(e,this.options.acceptedFiles)?null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(t(this.options.dictMaxFilesExceeded.replace("{{maxFiles}}",this.options.maxFiles)),this.emit("maxfilesexceeded",e)):this.options.accept.call(this,e,t):t(this.options.dictInvalidFileType)}},{key:"addFile",value:function(e){var t=this;e.upload={uuid:n.uuidv4(),progress:0,total:e.size,bytesSent:0,filename:this._renameFile(e)},this.files.push(e),e.status=n.ADDED,this.emit("addedfile",e),this._enqueueThumbnail(e),this.accept(e,function(n){n?(e.accepted=!1,t._errorProcessing([e],n)):(e.accepted=!0,t.options.autoQueue&&t.enqueueFile(e)),t._updateMaxFilesReachedClass()})}},{key:"enqueueFiles",value:function(e){var t,n=c(e,!0);try{for(n.s();!(t=n.n()).done;){var r=t.value;this.enqueueFile(r)}}catch(i){n.e(i)}finally{n.f()}return null}},{key:"enqueueFile",value:function(e){var t=this;if(e.status!==n.ADDED||!0!==e.accepted)throw new Error("This file can't be queued because it has already been processed or was rejected.");if(e.status=n.QUEUED,this.options.autoProcessQueue)return setTimeout(function(){return t.processQueue()},0)}},{key:"_enqueueThumbnail",value:function(e){var t=this;if(this.options.createImageThumbnails&&e.type.match(/image.*/)&&e.size<=1024*this.options.maxThumbnailFilesize*1024)return this._thumbnailQueue.push(e),setTimeout(function(){return t._processThumbnailQueue()},0)}},{key:"_processThumbnailQueue",value:function(){var e=this;if(!this._processingThumbnail&&0!==this._thumbnailQueue.length){this._processingThumbnail=!0;var t=this._thumbnailQueue.shift();return this.createThumbnail(t,this.options.thumbnailWidth,this.options.thumbnailHeight,this.options.thumbnailMethod,!0,function(n){return e.emit("thumbnail",t,n),e._processingThumbnail=!1,e._processThumbnailQueue()})}}},{key:"removeFile",value:function(e){if(e.status===n.UPLOADING&&this.cancelUpload(e),this.files=w(this.files,e),this.emit("removedfile",e),0===this.files.length)return this.emit("reset")}},{key:"removeAllFiles",value:function(e){null==e&&(e=!1);var t,r=c(this.files.slice(),!0);try{for(r.s();!(t=r.n()).done;){var i=t.value;(i.status!==n.UPLOADING||e)&&this.removeFile(i)}}catch(o){r.e(o)}finally{r.f()}return null}},{key:"resizeImage",value:function(e,t,r,i,o){var a=this;return this.createThumbnail(e,t,r,i,!0,function(t,r){if(null==r)return o(e);var i=a.options.resizeMimeType;null==i&&(i=e.type);var u=r.toDataURL(i,a.options.resizeQuality);return"image/jpeg"!==i&&"image/jpg"!==i||(u=A.restore(e.dataURL,u)),o(n.dataURItoBlob(u))})}},{key:"createThumbnail",value:function(e,t,n,r,i,o){var a=this,u=new FileReader;u.onload=function(){e.dataURL=u.result,"image/svg+xml"!==e.type?a.createThumbnailFromUrl(e,t,n,r,i,o):null!=o&&o(u.result)}
vendor: 6,125 bytes, line 54
54,u.readAsDataURL(e)}},{key:"displayExistingFile",value:function(e,t,n,r){var i=this,o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];if(this.emit("addedfile",e),this.emit("complete",e),o){e.dataURL=t,this.createThumbnailFromUrl(e,this.options.thumbnailWidth,this.options.thumbnailHeight,this.options.thumbnailMethod,this.options.fixOrientation,function(t){i.emit("thumbnail",e,t),n&&n()},r)}else this.emit("thumbnail",e,t),n&&n()}},{key:"createThumbnailFromUrl",value:function(e,t,n,r,i,o,a){var u=this,s=document.createElement("img");return a&&(s.crossOrigin=a),i="from-image"!=getComputedStyle(document.body).imageOrientation&&i,s.onload=function(){var a=function(e){return e(1)};return"undefined"!=typeof EXIF&&null!==EXIF&&i&&(a=function(e){return EXIF.getData(s,function(){return e(EXIF.getTag(this,"Orientation"))})}),a(function(i){e.width=s.width,e.height=s.height;var a=u.options.resize.call(u,e,t,n,r),l=document.createElement("canvas"),c=l.getContext("2d");switch(l.width=a.trgWidth,l.height=a.trgHeight,i>4&&(l.width=a.trgHeight,l.height=a.trgWidth),i){case 2:c.translate(l.width,0),c.scale(-1,1);break;case 3:c.translate(l.width,l.height),c.rotate(Math.PI);break;case 4:c.translate(0,l.height),c.scale(1,-1);break;case 5:c.rotate(.5*Math.PI),c.scale(1,-1);break;case 6:c.rotate(.5*Math.PI),c.translate(0,-l.width);break;case 7:c.rotate(.5*Math.PI),c.translate(l.height,-l.width),c.scale(-1,1);break;case 8:c.rotate(-.5*Math.PI),c.translate(-l.height,0)}k(c,s,null!=a.srcX?a.srcX:0,null!=a.srcY?a.srcY:0,a.srcWidth,a.srcHeight,null!=a.trgX?a.trgX:0,null!=a.trgY?a.trgY:0,a.trgWidth,a.trgHeight);var f=l.toDataURL("image/png");if(null!=o)return o(f,l)})},null!=o&&(s.onerror=o),s.src=e.dataURL}},{key:"processQueue",value:function(){var e=this.options.parallelUploads,t=this.getUploadingFiles().length,n=t;if(!(t>=e)){var r=this.getQueuedFiles();if(r.length>0){if(this.options.uploadMultiple)return this.processFiles(r.slice(0,e-t));for(;n<e;){if(!r.length)return;this.processFile(r.shift()),n++}}}}},{key:"processFile",value:function(e){return this.processFiles([e])}},{key:"processFiles",value:function(e){var t,r=c(e,!0);try{for(r.s();!(t=r.n()).done;){var i=t.value;i.processing=!0,i.status=n.UPLOADING,this.emit("processing",i)}}catch(o){r.e(o)}finally{r.f()}return this.options.uploadMultiple&&this.emit("processingmultiple",e),this.uploadFiles(e)}},{key:"_getFilesWithXhr",value:function(e){return this.files.filter(function(t){return t.xhr===e}).map(function(e){return e})}},{key:"cancelUpload",value:function(e){if(e.status===n.UPLOADING){var t,r=this._getFilesWithXhr(e.xhr),i=c(r,!0);try{for(i.s();!(t=i.n()).done;){t.value.status=n.CANCELED}}catch(s){i.e(s)}finally{i.f()}void 0!==e.xhr&&e.xhr.abort();var o,a=c(r,!0);try{for(a.s();!(o=a.n()).done;){var u=o.value;this.emit("canceled",u)}}catch(s){a.e(s)}finally{a.f()}this.options.uploadMultiple&&this.emit("canceledmultiple",r)}else e.status!==n.ADDED&&e.status!==n.QUEUED||(e.status=n.CANCELED,this.emit("canceled",e),this.options.uploadMultiple&&this.emit("canceledmultiple",[e]));if(this.options.autoProcessQueue)return this.processQueue()}},{key:"resolveOption",value:function(e){if("function"==typeof e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return e.apply(this,n)}return e}},{key:"uploadFile",value:function(e){return this.uploadFiles([e])}},{key:"uploadFiles",value:function(e){var t=this;this._transformFiles(e,function(r){if(t.options.chunking){var i=r[0];e[0].upload.chunked=t.options.chunking&&(t.options.forceChunking||i.size>t.options.chunkSize),e[0].upload.totalChunkCount=Math.ceil(i.size/t.options.chunkSize)}if(e[0].upload.chunked){var o=e[0],a=r[0];o.upload.chunks=[];var u=function(){for(var r=0;void 0!==o.upload.chunks[r];)r++;if(!(r>=o.upload.totalChunkCount)){0;var i=r*t.options.chunkSize,u=Math.min(i+t.options.chunkSize,a.size),s={name:t._getParamName(0),data:a.webkitSlice?a.webkitSlice(i,u):a.slice(i,u),filename:o.upload.filename,chunkIndex:r};o.upload.chunks[r]={file:o,index:r,dataBlock:s,status:n.UPLOADING,progress:0,retries:0},t._uploadData(e,[s])}};if(o.upload.finishedChunkUpload=function(r,i){var a=!0;r.status=n.SUCCESS,r.dataBlock=null,r.xhr=null;for(var s=0;s<o.upload.totalChunkCount;s++){if(void 0===o.upload.chunks[s])return u();o.upload.chunks[s].status!==n.SUCCESS&&(a=!1)}a&&t.options.chunksUploaded(o,function(){t._finished(e,i,null)})},t.options.parallelChunkUploads)for(var s=0;s<o.upload.totalChunkCount;s++)u();else u()}else{for(var l=[],c=0;c<e.length;c++)l[c]={name:t._getParamName(c),data:r[c],filename:e[c].upload.filename};t._uploadData(e,l)}})}},{key:"_getChunk",value:function(e,t){for(var n=0;n<e.upload.totalChunkCount;n++)if(void 0!==e.upload.chunks[n]&&e.upload.chunks[n].xhr===t)return e.upload.chunks[n]}},{key:"_uploadData",value:function(e,t){var r,i=this,o=new XMLHttpRequest,a=c(e,!0);try{for(a.s();!(r=a.n()).done;){r.value.xhr=o}}catch(k){a.e(k)}finally{a.f()}e[0].upload.chunked&&(e[0].upload.chunks[t[0].chunkIndex].xhr=o);var u=this.resolveOption(this.options.method,e),s=this.resolveOption(this.options.url,e);o.open(u,s,!0),this.resolveOption(this.options.timeout,e)&&(o.timeout=this.resolveOption(this.options.timeout,e)),o.withCredentials=!!this.options.withCredentials,o.onload=function(t){i._finishedUploading(e,o,t)},o.ontimeout=function(){i._handleUploadError(e,o,"Request timedout after ".concat(i.options.timeout/1e3," seconds"))},o.onerror=function(){i._handleUploadError(e,o)},(null!=o.upload?o.upload:o).onprogress=function(t){return i._updateFilesUploadProgress(e,o,t)};var l={Accept:"application/json","Cache-Control":"no-cache","X-Requested-With":"XMLHttpRequest"};for(var f in this.options.headers&&n.extend(l,this.options.headers),l){var p=l[f];p&&o.setRequestHeader(f,p)}var h=new FormData;if(this.options.params){var d=this.options.params;for(var v in"function"==typeof d&&(d=d.call(this,e,o,e[0].upload.chunked?this._getChunk(e[0],o):null)),d){var y=d[v];if(Array.isArray(y))for(var g=0;g<y.length;g++)h.append(v,y[g]);else h.append(v,y)}}var m,b=c(e,!0);try{for(b.s();!(m=b.n()).done;){var x=m.value;
vendor: 8,730 bytes, line 54
54this.emit("sending",x,o,h)}}catch(k){b.e(k)}finally{b.f()}this.options.uploadMultiple&&this.emit("sendingmultiple",e,o,h),this._addFormElementData(h);for(var w=0;w<t.length;w++){var E=t[w];h.append(E.name,E.data,E.filename)}this.submitRequest(o,h,e)}},{key:"_transformFiles",value:function(e,t){for(var n=this,r=[],i=0,o=function(o){n.options.transformFile.call(n,e[o],function(n){r[o]=n,++i===e.length&&t(r)})},a=0;a<e.length;a++)o(a)}},{key:"_addFormElementData",value:function(e){if("FORM"===this.element.tagName){var t,n=c(this.element.querySelectorAll("input, textarea, select, button"),!0);try{for(n.s();!(t=n.n()).done;){var r=t.value,i=r.getAttribute("name"),o=r.getAttribute("type");if(o&&(o=o.toLowerCase()),null!=i)if("SELECT"===r.tagName&&r.hasAttribute("multiple")){var a,u=c(r.options,!0);try{for(u.s();!(a=u.n()).done;){var s=a.value;s.selected&&e.append(i,s.value)}}catch(l){u.e(l)}finally{u.f()}}else(!o||"checkbox"!==o&&"radio"!==o||r.checked)&&e.append(i,r.value)}}catch(l){n.e(l)}finally{n.f()}}}},{key:"_updateFilesUploadProgress",value:function(e,t,n){if(e[0].upload.chunked){var r=e[0],i=this._getChunk(r,t);n?(i.progress=100*n.loaded/n.total,i.total=n.total,i.bytesSent=n.loaded):(i.progress=100,i.bytesSent=i.total),r.upload.progress=0,r.upload.total=0,r.upload.bytesSent=0;for(var o=0;o<r.upload.totalChunkCount;o++)r.upload.chunks[o]&&void 0!==r.upload.chunks[o].progress&&(r.upload.progress+=r.upload.chunks[o].progress,r.upload.total+=r.upload.chunks[o].total,r.upload.bytesSent+=r.upload.chunks[o].bytesSent);r.upload.progress=r.upload.progress/r.upload.totalChunkCount,this.emit("uploadprogress",r,r.upload.progress,r.upload.bytesSent)}else{var a,u=c(e,!0);try{for(u.s();!(a=u.n()).done;){var s=a.value;s.upload.total&&s.upload.bytesSent&&s.upload.bytesSent==s.upload.total||(n?(s.upload.progress=100*n.loaded/n.total,s.upload.total=n.total,s.upload.bytesSent=n.loaded):(s.upload.progress=100,s.upload.bytesSent=s.upload.total),this.emit("uploadprogress",s,s.upload.progress,s.upload.bytesSent))}}catch(l){u.e(l)}finally{u.f()}}}},{key:"_finishedUploading",value:function(e,t,r){var i;if(e[0].status!==n.CANCELED&&4===t.readyState){if("arraybuffer"!==t.responseType&&"blob"!==t.responseType&&(i=t.responseText,t.getResponseHeader("content-type")&&~t.getResponseHeader("content-type").indexOf("application/json")))try{i=JSON.parse(i)}catch(o){r=o,i="Invalid JSON response from server."}this._updateFilesUploadProgress(e,t),200<=t.status&&t.status<300?e[0].upload.chunked?e[0].upload.finishedChunkUpload(this._getChunk(e[0],t),i):this._finished(e,i,r):this._handleUploadError(e,t,i)}}},{key:"_handleUploadError",value:function(e,t,r){if(e[0].status!==n.CANCELED){if(e[0].upload.chunked&&this.options.retryChunks){var i=this._getChunk(e[0],t);if(i.retries++<this.options.retryChunksLimit)return void this._uploadData(e,[i.dataBlock]);console.warn("Retried this chunk too often. Giving up.")}this._errorProcessing(e,r||this.options.dictResponseError.replace("{{statusCode}}",t.status),t)}}},{key:"submitRequest",value:function(e,t,n){1==e.readyState?e.send(t):console.warn("Cannot send this request because the XMLHttpRequest.readyState is not OPENED.")}},{key:"_finished",value:function(e,t,r){var i,o=c(e,!0);try{for(o.s();!(i=o.n()).done;){var a=i.value;a.status=n.SUCCESS,this.emit("success",a,t,r),this.emit("complete",a)}}catch(u){o.e(u)}finally{o.f()}if(this.options.uploadMultiple&&(this.emit("successmultiple",e,t,r),this.emit("completemultiple",e)),this.options.autoProcessQueue)return this.processQueue()}},{key:"_errorProcessing",value:function(e,t,r){var i,o=c(e,!0);try{for(o.s();!(i=o.n()).done;){var a=i.value;a.status=n.ERROR,this.emit("error",a,t,r),this.emit("complete",a)}}catch(u){o.e(u)}finally{o.f()}if(this.options.uploadMultiple&&(this.emit("errormultiple",e,t,r),this.emit("completemultiple",e)),this.options.autoProcessQueue)return this.processQueue()}}],[{key:"initClass",value:function(){this.prototype.Emitter=o,this.prototype.events=["drop","dragstart","dragend","dragenter","dragover","dragleave","addedfile","addedfiles","removedfile","thumbnail","error","errormultiple","processing","processingmultiple","uploadprogress","totaluploadprogress","sending","sendingmultiple","success","successmultiple","canceled","canceledmultiple","complete","completemultiple","reset","maxfilesexceeded","maxfilesreached","queuecomplete"],this.prototype._thumbnailQueue=[],this.prototype._processingThumbnail=!1}},{key:"extend",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];for(var i=0,o=n;i<o.length;i++){var a=o[i];for(var u in a){var s=a[u];e[u]=s}}return e}},{key:"uuidv4",value:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})}}]),n}();x.initClass(),x.version="5.9.3",x.options={},x.optionsForElement=function(e){return e.getAttribute("id")?x.options[E(e.getAttribute("id"))]:void 0},x.instances=[],x.forElement=function(e){if("string"==typeof e&&(e=document.querySelector(e)),null==(null!=e?e.dropzone:void 0))throw new Error("No Dropzone found for given element. This is probably because you're trying to access it before Dropzone had the time to initialize. Use the `init` option to setup any additional observers on your Dropzone.");return e.dropzone},x.autoDiscover=!0,x.discover=function(){var e;if(document.querySelectorAll)e=document.querySelectorAll(".dropzone");else{e=[];var t=function(t){return function(){var n,r=[],i=c(t,!0);try{for(i.s();!(n=i.n()).done;){var o=n.value;/(^| )dropzone($| )/.test(o.className)?r.push(e.push(o)):r.push(void 0)}}catch(a){i.e(a)}finally{i.f()}return r}()};t(document.getElementsByTagName("div")),t(document.getElementsByTagName("form"))}return function(){var t,n=[],r=c(e,!0);try{for(r.s();!(t=r.n()).done;){var i=t.value;!1!==x.optionsForElement(i)?n.push(new x(i)):n.push(void 0)}}catch(o){r.e(o)}finally{r.f()}return n}()},x.blockedBrowsers=[/opera.*(Macintosh|Windows Phone).*version\/12/i],x.isBrowserSupported=function(){var e=!0;if(window.File&&window.FileReader&&window.FileList&&window.Blob&&window.FormData&&document.querySelector)if("classList"in document.createElement("a")){void 0!==x.blacklistedBrowsers&&(x.blockedBrowsers=x.blacklistedBrowsers);var t,n=c(x.blockedBrowsers,!0);try{for(n.s();!(t=n.n()).done;){t.value.test(navigator.userAgent)&&(e=!1)}}catch(r){n.e(r)}finally{n.f()}}else e=!1;else e=!1;return e},x.dataURItoBlob=function(e){for(var t=atob(e.split(",")[1]),n=e.split(",")[0].split(":")[1].split(";")[0],r=new ArrayBuffer(t.length),i=new Uint8Array(r),o=0,a=t.length,u=0<=a;u?o<=a:o>=a;u?o++:o--)i[o]=t.charCodeAt(o);return new Blob([r],{type:n})};var w=function(e,t){return e.filter(function(e){return e!==t}).map(function(e){return e})},E=function(e){return e.replace(/[\-_](\w)/g,function(e){return e.charAt(1).toUpperCase()})};x.createElement=function(e){var t=document.createElement("div");return t.innerHTML=e,t.childNodes[0]},x.elementInside=function(e,t){if(e===t)return!0;for(;e=e.parentNode;)if(e===t)return!0;return!1},x.getElement=function(e,t){var n;if("string"==typeof e?n=document.querySelector(e):null!=e.nodeType&&(n=e),null==n)throw new Error("Invalid `".concat(t,"` option provided. Please provide a CSS selector or a plain HTML element."));return n},x.getElements=function(e,t){var n,r;if(e instanceof Array){r=[];try{var i,o=c(e,!0);try{for(o.s();!(i=o.n()).done;)n=i.value,r.push(this.getElement(n,t))}catch(s){o.e(s)}finally{o.f()}}catch(l){r=null}}else if("string"==typeof e){r=[];var a,u=c(document.querySelectorAll(e),!0);try{for(u.s();!(a=u.n()).done;)n=a.value,r.push(n)}catch(s){u.e(s)}finally{u.f()}}else null!=e.nodeType&&(r=[e]);if(null==r||!r.length)throw new Error("Invalid `".concat(t,"` option provided. Please provide a CSS selector, a plain HTML element or a list of those."));return r},x.confirm=function(e,t,n){return window.confirm(e)?t():null!=n?n():void 0},x.isValidFile=function(e,t){if(!t)return!0;t=t.split(",");var n,r=e.type,i=r.replace(/\/.*$/,""),o=c(t,!0);try{for(o.s();!(n=o.n()).done;){var a=n.value;if("."===(a=a.trim()).charAt(0)){if(-1!==e.name.toLowerCase().indexOf(a.toLowerCase(),e.name.length-a.length))return!0}else if(/\/\*$/.test(a)){if(i===a.replace(/\/.*$/,""))return!0}else if(r===a)return!0}}catch(u){o.e(u)}finally{o.f()}return!1},"undefined"!=typeof jQuery&&null!==jQuery&&(jQuery.fn.dropzone=function(e){return this.each(function(){return new x(this,e)})}),x.ADDED="added",x.QUEUED="queued",x.ACCEPTED=x.QUEUED,x.UPLOADING="uploading",x.PROCESSING=x.UPLOADING,x.CANCELED="canceled",x.ERROR="error",x.SUCCESS="success";var k=function(e,t,n,r,i,o,a,u,s,l){var c=function(e){e.naturalWi
54dth;var t=e.naturalHeight,n=document.createElement("canvas");n.width=1,n.height=t;var r=n.getContext("2d");r.drawImage(e,0,0);for(var i=r.getImageData(1,0,1,t).data,o=0,a=t,u=t;u>o;)0===i[4*(u-1)+3]?a=u:o=u,u=a+o>>1;var s=u/t;return 0===s?1:s}(t);return e.drawImage(t,n,r,i,o,a,u,s,l/c)},A=function(){function e(){p(this,e)}return d(e,null,[{key:"initClass",value:function(){this.KEY_STR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}},{key:"encode64",value:function(e){for(var t="",n=void 0,r=void 0,i="",o=void 0,a=void 0,u=void 0,s="",l=0;o=(n=e[l++])>>2,a=(3&n)<<4|(r=e[l++])>>4,u=(15&r)<<2|(i=e[l++])>>6,s=63&i,isNaN(r)?u=s=64:isNaN(i)&&(s=64),t=t+this.KEY_STR.charAt(o)+this.KEY_STR.charAt(a)+this.KEY_STR.charAt(u)+this.KEY_STR.charAt(s),n=r=i="",o=a=u=s="",l<e.length;);return t}},{key:"restore",value:function(e,t){if(!e.match("data:image/jpeg;base64,"))return t;var n=this.decode64(e.replace("data:image/jpeg;base64,","")),r=this.slice2Segments(n),i=this.exifManipulation(t,r);return"data:image/jpeg;base64,".concat(this.encode64(i))}},{key:"exifManipulation",value:function(e,t){var n=this.getExifArray(t),r=this.insertExif(e,n);return new Uint8Array(r)}},{key:"getExifArray",value:function(e){for(var t=void 0,n=0;n<e.length;){if(255===(t=e[n])[0]&225===t[1])return t;n++}return[]}},{key:"insertExif",value:function(e,t){var n=e.replace("data:image/jpeg;base64,",""),r=this.decode64(n),i=r.indexOf(255,3),o=r.slice(0,i),a=r.slice(i),u=o;return u=(u=u.concat(t)).concat(a)}},{key:"slice2Segments",value:function(e){for(var t=0,n=[];;){if(255===e[t]&218===e[t+1])break;if(255===e[t]&216===e[t+1])t+=2;else{var r=t+(256*e[t+2]+e[t+3])+2,i=e.slice(t,r);n.push(i),t=r}if(t>e.length)break}return n}},{key:"decode64",value:function(e){var t=void 0,n=void 0,r="",i=void 0,o=void 0,a="",u=0,s=[];for(/[^A-Za-z0-9\+\/\=]/g.exec(e)&&console.warn("There were invalid base64 characters in the input text.\nValid base64 characters are A-Z, a-z, 0-9, '+', '/',and '='\nExpect errors in decoding."),e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");t=this.KEY_STR.indexOf(e.charAt(u++))<<2|(i=this.KEY_STR.indexOf(e.charAt(u++)))>>4,n=(15&i)<<4|(o=this.KEY_STR.indexOf(e.charAt(u++)))>>2,r=(3&o)<<6|(a=this.KEY_STR.indexOf(e.charAt(u++))),s.push(t),64!==o&&s.push(n),64!==a&&s.push(r),t=n=r="",i=o=a="",u<e.length;);return s}}]),e}();A.initClass();x._autoDiscoverFunction=function(){if(x.autoDiscover)return x.discover()},function(e,t){var n=!1,r=!0,i=e.document,o=i.documentElement,a=i.addEventListener?"addEventListener":"attachEvent",u=i.addEventListener?"removeEventListener":"detachEvent",s=i.addEventListener?"":"on",l=function r(o){if("readystatechange"!==o.type||"complete"===i.readyState)return("load"===o.type?e:i)[u](s+o.type,r,!1),!n&&(n=!0)?t.call(e,o.type||o):void 0};if("complete"!==i.readyState){if(i.createEventObject&&o.doScroll){try{r=!e.frameElement}catch(c){}r&&function e(){try{o.doScroll("left")}catch(t){return void setTimeout(e,50)}return l("poll")}()}i[a](s+"DOMContentLoaded",l,!1),i[a](s+"readystatechange",l,!1),e[a](s+"load",l,!1)}}(window,x._autoDiscoverFunction),window.Dropzone=x;var S=x}(),r}()});
55},{"process":"g5IB"}],"xIWz":[function(require,module,exports) {
56!function(t){"use strict";var e=function(){function t(t,e){for(var i=0;i<e.length;i++){var o=e[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,i,o){return i&&t(e.prototype,i),o&&t(e,o),e}}();!function(t){var i="ekkoLightbox",o=t.fn[i],a={title:"",footer:"",maxWidth:9999,maxHeight:9999,showArrows:!0,wrapping:!0,type:null,alwaysShowClose:!1,loadingMessage:'<div class="ekko-lightbox-loader"><div><div></div><div></div></div></div>',leftArrow:"<span>&#10094;</span>",rightArrow:"<span>&#10095;</span>",strings:{close:"Close",fail:"Failed to load image:",type:"Could not detect remote target type. Force the type using data-type"},doc:document,onShow:function(){},onShown:function(){},onHide:function(){},onHidden:function(){},onNavigate:function(){},onContentLoaded:function(){}},s=function(){function i(e,o){var s=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),this._config=t.extend({},a,o),this._$modalArrows=null,this._galleryIndex=0,this._galleryName=null,this._padding=null,this._border=null,this._titleIsShown=!1,this._footerIsShown=!1,this._wantedWidth=0,this._wantedHeight=0,this._touchstartX=0,this._touchendX=0,this._modalId="ekkoLightbox-"+Math.floor(1e3*Math.random()+1),this._$element=e instanceof jQuery?e:t(e),this._isBootstrap3=3==t.fn.modal.Constructor.VERSION[0];var n='<h4 class="modal-title">'+(this._config.title||"&nbsp;")+"</h4>",l='<button type="button" class="close" data-dismiss="modal" aria-label="'+this._config.strings.close+'"><span aria-hidden="true">&times;</span></button>',r='<div class="modal-dialog" role="document"><div class="modal-content">'+('<div class="modal-header'+(this._config.title||this._config.alwaysShowClose?"":" hide")+'">'+(this._isBootstrap3?l+n:n+l)+"</div>")+'<div class="modal-body"><div class="ekko-lightbox-container"><div class="ekko-lightbox-item fade in show"></div><div class="ekko-lightbox-item fade"></div></div></div>'+('<div class="modal-footer'+(this._config.footer?"":" hide")+'">'+(this._config.footer||"&nbsp;")+"</div>")+"</div></div>";t(this._config.doc.body).append('<div id="'+this._modalId+'" class="ekko-lightbox modal fade" tabindex="-1" tabindex="-1" role="dialog" aria-hidden="true">'+r+"</div>"),this._$modal=t("#"+this._modalId,this._config.doc),this._$modalDialog=this._$modal.find(".modal
56-dialog").first(),this._$modalContent=this._$modal.find(".modal-content").first(),this._$modalBody=this._$modal.find(".modal-body").first(),this._$modalHeader=this._$modal.find(".modal-header").first(),this._$modalFooter=this._$modal.find(".modal-footer").first(),this._$lightboxContainer=this._$modalBody.find(".ekko-lightbox-container").first(),this._$lightboxBodyOne=this._$lightboxContainer.find("> div:first-child").first(),this._$lightboxBodyTwo=this._$lightboxContainer.find("> div:last-child").first(),this._border=this._calculateBorders(),this._padding=this._calculatePadding(),this._galleryName=this._$element.data("gallery"),this._galleryName&&(this._$galleryItems=t(document.body).find('*[data-gallery="'+this._galleryName+'"]'),this._galleryIndex=this._$galleryItems.index(this._$element),t(document).on("keydown.ekkoLightbox",this._navigationalBinder.bind(this)),this._config.showArrows&&this._$galleryItems.length>1&&(this._$lightboxContainer.append('<div class="ekko-lightbox-nav-overlay"><a href="#">'+this._config.leftArrow+'</a><a href="#">'+this._config.rightArrow+"</a></div>"),this._$modalArrows=this._$lightboxContainer.find("div.ekko-lightbox-nav-overlay").first(),this._$lightboxContainer.on("click","a:first-child",function(t){return t.preventDefault(),s.navigateLeft()}),this._$lightboxContainer.on("click","a:last-child",function(t){return t.preventDefault(),s.navigateRight()}),this.updateNavigation())),this._$modal.on("show.bs.modal",this._config.onShow.bind(this)).on("shown.bs.modal",function(){return s._toggleLoading(!0),s._handle(),s._config.onShown.call(s)}).on("hide.bs.modal",this._config.onHide.bind(this)).on("hidden.bs.modal",function(){return s._galleryName&&(t(document).off("keydown.ekkoLightbox"),t(window).off("resize.ekkoLightbox")),s._$modal.remove(),s._config.onHidden.call(s)}).modal(this._config),t(window).on("resize.ekkoLightbox",function(){s._resize(s._wantedWidth,s._wantedHeight)}),this._$lightboxContainer.on("touchstart",function(){s._touchstartX=event.changedTouches[0].screenX}).on("touchend",function(){s._touchendX=event.changedTouches[0].screenX,s._swipeGesure()})}return e(i,null,[{key:"Default",get:function(){return a}}]),e(i,[{key:"element",value:function(){return this._$element}},{key:"modal",value:function(){return this._$modal}},{key:"navigateTo",value:function(e){if(e<0||e>this._$galleryItems.length-1)return this;this._galleryIndex=e,this.updateNavigation(),this._$element=t(this._$galleryItems.get(this._galleryIndex)),this._handle()}},{key:"navigateLeft",value:function(){if(this._$galleryItems&&1!==this._$galleryItems.length){if(0===this._galleryIndex){if(!this._config.wrapping)return;this._galleryIndex=this._$galleryItems.length-1}else this._galleryIndex--;return this._config.onNavigate.call(this,"left",this._galleryIndex),this.navigateTo(this._galleryIndex)}}},{key:"navigateRight",value:function(){if(this._$galleryItems&&1!==this._$galleryItems.length){if(this._galleryIndex===this._$galleryItems.length-1){if(!this._config.wrapping)return;this._galleryIndex=0}else this._galleryIndex++;return this._config.onNavigate.call(this,"right",this._galleryIndex),this.navigateTo(this._galleryIndex)}}},{key:"updateNavigation",value:function(){if(!this._config.wrapping){var t=this._$lightboxContainer.find("div.ekko-lightbox-nav-overlay");0===this._galleryIndex?t.find("a:first-child").addClass("disabled"):t.find("a:first-child").removeClass("disabled"),this._galleryIndex===this._$galleryItems.length-1?t.find("a:last-child").addClass("disabled"):t.find("a:last-child").removeClass("disabled")}}},{key:"close",value:function(){return this._$modal.modal("hide")}},{key:"_navigationalBinder",value:function(t){return 39===(t=t||window.event).keyCode?this.navigateRight():37===t.keyCode?this.navigateLeft():void 0}},{key:"_detectRemoteType",value:function(t,e){return!(e=e||!1)&&this._isImage(t)&&(e="image"),!e&&this._getYoutubeId(t)&&(e="youtube"),!e&&this._getVimeoId(t)&&(e="vimeo"),!e&&this._getInstagramId(t)&&(e="instagram"),(!e||["image","youtube","vimeo","instagram","video","url"].indexOf(e)<0)&&(e="url"),e}},{key:"_isImage",value:function(t){return t&&t.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\?|#).*)?$)/i)}},{key:"_containerToUse",value:function(){var t=this,e=this._$lightboxBodyTwo,i=this._$lightboxBodyOne;return this._$lightboxBodyTwo.hasClass("in")&&(e=this._$lightboxBodyOne,i=this._$lightboxBodyTwo),i.removeClass("in show"),setTimeout(function(){t._$lightboxBodyTwo.hasClass("in")||t._$lightboxBodyTwo.empty(),t._$lightboxBodyOne.hasClass("in")||t._$lightboxBodyOne.empty()},500),e.addClass("in show"),e}},{key:"_handle",value:function(){var t=this._containerToUse();this._updateTitleAndFooter();var e=this._$element.attr("data-remote")||this._$element.attr("href"),i=this._detectRemoteType(e,this._$element.attr("data-type")||!1);
vendor: 6,399 bytes, line 56
56if(["image","youtube","vimeo","instagram","video","url"].indexOf(i)<0)return this._error(this._config.strings.type);switch(i){case"image":this._preloadImage(e,t),this._preloadImageByIndex(this._galleryIndex,3);break;case"youtube":this._showYoutubeVideo(e,t);break;case"vimeo":this._showVimeoVideo(this._getVimeoId(e),t);break;case"instagram":this._showInstagramVideo(this._getInstagramId(e),t);break;case"video":this._showHtml5Video(e,t);break;default:this._loadRemoteContent(e,t)}return this}},{key:"_getYoutubeId",value:function(t){if(!t)return!1;var e=t.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/);return!(!e||11!==e[2].length)&&e[2]}},{key:"_getVimeoId",value:function(t){return!!(t&&t.indexOf("vimeo")>0)&&t}},{key:"_getInstagramId",value:function(t){return!!(t&&t.indexOf("instagram")>0)&&t}},{key:"_toggleLoading",value:function(e){return(e=e||!1)?(this._$modalDialog.css("display","none"),this._$modal.removeClass("in show"),t(".modal-backdrop").append(this._config.loadingMessage)):(this._$modalDialog.css("display","block"),this._$modal.addClass("in show"),t(".modal-backdrop").find(".ekko-lightbox-loader").remove()),this}},{key:"_calculateBorders",value:function(){return{top:this._totalCssByAttribute("border-top-width"),right:this._totalCssByAttribute("border-right-width"),bottom:this._totalCssByAttribute("border-bottom-width"),left:this._totalCssByAttribute("border-left-width")}}},{key:"_calculatePadding",value:function(){return{top:this._totalCssByAttribute("padding-top"),right:this._totalCssByAttribute("padding-right"),bottom:this._totalCssByAttribute("padding-bottom"),left:this._totalCssByAttribute("padding-left")}}},{key:"_totalCssByAttribute",value:function(t){return parseInt(this._$modalDialog.css(t),10)+parseInt(this._$modalContent.css(t),10)+parseInt(this._$modalBody.css(t),10)}},{key:"_updateTitleAndFooter",value:function(){var t=this._$element.data("title")||"",e=this._$element.data("footer")||"";return this._titleIsShown=!1,t||this._config.alwaysShowClose?(this._titleIsShown=!0,this._$modalHeader.css("display","").find(".modal-title").html(t||"&nbsp;")):this._$modalHeader.css("display","none"),this._footerIsShown=!1,e?(this._footerIsShown=!0,this._$modalFooter.css("display","").html(e)):this._$modalFooter.css("display","none"),this}},{key:"_showYoutubeVideo",value:function(t,e){var i=this._getYoutubeId(t),o=t.indexOf("&")>0?t.substr(t.indexOf("&")):"",a=this._$element.data("width")||560,s=this._$element.data("height")||a/(560/315);return this._showVideoIframe("//www.youtube.com/embed/"+i+"?badge=0&autoplay=1&html5=1"+o,a,s,e)}},{key:"_showVimeoVideo",value:function(t,e){var i=this._$element.data("width")||500,o=this._$element.data("height")||i/(560/315);return this._showVideoIframe(t+"?autoplay=1",i,o,e)}},{key:"_showInstagramVideo",value:function(t,e){var i=this._$element.data("width")||612,o=i+80;return t="/"!==t.substr(-1)?t+"/":t,e.html('<iframe width="'+i+'" height="'+o+'" src="'+t+'embed/" frameborder="0" allowfullscreen></iframe>'),this._resize(i,o),this._config.onContentLoaded.call(this),this._$modalArrows&&this._$modalArrows.css("display","none"),this._toggleLoading(!1),this}},{key:"_showVideoIframe",value:function(t,e,i,o){return i=i||e,o.html('<div class="embed-responsive embed-responsive-16by9"><iframe width="'+e+'" height="'+i+'" src="'+t+'" frameborder="0" allowfullscreen class="embed-responsive-item"></iframe></div>'),this._resize(e,i),this._config.onContentLoaded.call(this),this._$modalArrows&&this._$modalArrows.css("display","none"),this._toggleLoading(!1),this}},{key:"_showHtml5Video",value:function(t,e){var i=this._$element.data("width")||560,o=this._$element.data("height")||i/(560/315);return e.html('<div class="embed-responsive embed-responsive-16by9"><video width="'+i+'" height="'+o+'" src="'+t+'" preload="auto" autoplay controls class="embed-responsive-item"></video></div>'),this._resize(i,o),this._config.onContentLoaded.call(this),this._$modalArrows&&this._$modalArrows.css("display","none"),this._toggleLoading(!1),this}},{key:"_loadRemoteContent",value:function(e,i){var o=this,a=this._$element.data("width")||560,s=this._$element.data("height")||560,n=this._$element.data("disableExternalCheck")||!1;return this._toggleLoading(!1),n||this._isExternal(e)?(i.html('<iframe src="'+e+'" frameborder="0" allowfullscreen></iframe>'),this._config.onContentLoaded.call(this)):i.load(e,t.proxy(function(){return o._$element.trigger("loaded.bs.modal")})),this._$modalArrows&&this._$modalArrows.css("display","none"),this._resize(a,s),this}},{key:"_isExternal",value:function(t){var e=t.match(/^([^:\/?#]+:)?(?:\/\/([^\/?#]*))?([^?#]+)?(\?[^#]*)?(#.*)?/);return"string"==typeof e[1]&&e[1].length>0&&e[1].toLowerCase()!==location.protocol||"string"==typeof e[2]&&e[2].length>0&&e[2].replace(new RegExp(":("+{"http:":80,"https:":443}[location.protocol]+")?$"),"")!==location.host}},{key:"_error",value:function(t){return console.error(t),this._containerToUse().html(t),this._resize(300,300),this}},{key:"_preloadImageByIndex",value:function(e,i){if(this._$galleryItems){var o=t(this._$galleryItems.get(e),!1);if(void 0!==o){var a=o.attr("data-remote")||o.attr("href");return("image"===o.attr("data-type")||this._isImage(a))&&this._preloadImage(a,!1),i>0?this._preloadImageByIndex(e+1,i-1):void 0}}}},{key:"_preloadImage",value:function(e,i){var o=this;i=i||!1;var a,s=new Image;return i&&(a=setTimeout(function(){i.append(o._config.loadingMessage)},200),s.onload=function(){a&&clearTimeout(a),a=null;var e=t("<img />");return e.attr("src",s.src),e.addClass("img-fluid"),e.css("width","100%"),i.html(e),o._$modalArrows&&o._$modalArrows.css("display",""),o._resize(s.width,s.height),o._toggleLoading(!1),o._config.onContentLoaded.call(o)},s.onerror=function(){return o._toggleLoading(!1),o._error(o._config.strings.fail+"  "+e)}),s.src=e,s}},{key:"_swipeGesure",value:function(){return this._touchendX<this._touchstartX?this.navigateRight():this._touchendX>this._touchstartX?this.navigateLeft():void 0}},{key:"_resize",value:function(e,i){i=i||e,this._wantedWidth=e,this._wantedHeight=i;var o=e/i,a=this._padding.left+this._padding.right+this._border.left+this._border.right,s=this._config.doc.body.clientWidth>575?20:0,n=this._config.doc.body.clientWidth>575?0:20,l=Math.min(e+a,this._config.doc.body.clientWidth-s,this._config.maxWidth);e+a>l?(i=(l-a-n)/o,e=l):e+=a;var r=0,d=0;
56this._footerIsShown&&(d=this._$modalFooter.outerHeight(!0)||55),this._titleIsShown&&(r=this._$modalHeader.outerHeight(!0)||67);var h=this._padding.top+this._padding.bottom+this._border.bottom+this._border.top,g=parseFloat(this._$modalDialog.css("margin-top"))+parseFloat(this._$modalDialog.css("margin-bottom")),_=Math.min(i,t(window).height()-h-g-r-d,this._config.maxHeight-h-r-d);i>_&&(e=Math.ceil(_*o)+a),this._$lightboxContainer.css("height",_),this._$modalDialog.css("flex",1).css("maxWidth",e);var c=this._$modal.data("bs.modal");if(c)try{c._handleUpdate()}catch(u){c.handleUpdate()}return this}}],[{key:"_jQueryInterface",value:function(e){var o=this;return e=e||{},this.each(function(){var a=t(o),s=t.extend({},i.Default,a.data(),"object"==typeof e&&e);new i(o,s)})}}]),i}();t.fn[i]=s._jQueryInterface,t.fn[i].Constructor=s,t.fn[i].noConflict=function(){return t.fn[i]=o,s._jQueryInterface}}(jQuery)}(jQuery);
57},{}],"kqo8":[function(require,module,exports) {
58
59},{"./vline.gif":[["vline.8e300eb4.gif","N9VW"],"N9VW"],"./icons.gif":[["icons.adf17e09.gif","A68Y"],"A68Y"],"./loading.gif":[["loading.3bb26a65.gif","FVsp"],"FVsp"],"./icons-rtl.gif":[["icons-rtl.82a051d2.gif","gogI"],"gogI"],"./vline-rtl.gif":[["vline-rtl.8e300eb4.gif","sKUR"],"sKUR"]}],"FxCd":[function(require,module,exports) {
60var define;
61var t;!function(e){"use strict";"function"==typeof t&&t.amd?t(["jquery"],e):e(jQuery)}(function(t){"use strict";t.ui=t.ui||{};t.ui.version="1.13.2";var e,i=0,o=Array.prototype.hasOwnProperty,n=Array.prototype.slice;t.cleanData=t.cleanData||(e=t.cleanData,function(i){var o,n,s;for(s=0;null!=(n=i[s]);s++)(o=t._data(n,"events"))&&o.remove&&t(n).triggerHandler("remove");e(i)}),t.widget=t.widget||function(e,i,o){var n,s,r,l={},a=e.split(".")[0],h=a+"-"+(e=e.split(".")[1]);return o||(o=i,i=t.Widget),Array.isArray(o)&&(o=t.extend.apply(null,[{}].concat(o))),t.expr.pseudos[h.toLowerCase()]=function(e){return!!t.data(e,h)},t[a]=t[a]||{},n=t[a][e],s=t[a][e]=function(t,e){if(!this||!this._createWidget)return new s(t,e);arguments.length&&this._createWidget(t,e)},t.extend(s,n,{version:o.version,_proto:t.extend({},o),_childConstructors:[]}),(r=new i).options=t.widget.extend({},r.options),t.each(o,function(t,e){l[t]="function"==typeof e?function(){function o(){return i.prototype[t].apply(this,arguments)}function n(e){return i.prototype[t].apply(this,e)}return function(){var t,i=this._super,s=this._superApply;return this._super=o,this._superApply=n,t=e.apply(this,arguments),this._super=i,this._superApply=s,t}}():e}),s.prototype=t.widget.extend(r,{widgetEventPrefix:n&&r.widgetEventPrefix||e},l,{constructor:s,namespace:a,widgetName:e,widgetFullName:h}),n?(t.each(n._childConstructors,function(e,i){var o=i.prototype;t.widget(o.namespace+"."+o.widgetName,s,i._proto)}),delete n._childConstructors):i._childConstructors.push(s),t.widget.bridge(e,s),s},t.widget.extend=function(e){for(var i,s,r=n.call(arguments,1),l=0,a=r.length;l<a;l++)for(i in r[l])s=r[l][i],o.call(r[l],i)&&void 0!==s&&(t.isPlainObject(s)?e[i]=t.isPlainObject(e[i])?t.widget.extend({},e[i],s):t.widget.extend({},s):e[i]=s);return e},t.widget.bridge=function(e,i){var o=i.prototype.widgetFullName||e;t.fn[e]=function(s){var r="string"==typeof s,l=n.call(arguments,1),a=this;return r?this.length||"instance"!==s?this.each(function(){var i,n=t.data(this,o);return"instance"===s?(a=n,!1):n?"function"!=typeof n[s]||"_"===s.charAt(0)?t.error("no such method '"+s+"' for "+e+" widget instance"):(i=n[s].apply(n,l))!==n&&void 0!==i?(a=i&&i.jquery?a.pushStack(i.get()):i,!1):void 0:t.error("cannot call methods on "+e+" prior to initialization; attempted to call method '"+s+"'")}):a=void 0:(l.length&&(s=t.widget.extend.apply(null,[s].concat(l))),this.each(function(){var e=t.data(this,o);e?(e.option(s||{}),e._init&&e._init()):t.data(this,o,new i(s,this))})),a}},t.Widget=t.Widget||function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(e,o){o=t(o||this.defaultElement||this)[0],this.element=t(o),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=t(),this.hoverable=t(),this.focusable=t
vendor: 5,496 bytes, line 61
61(),this.classesElementLookup={},o!==this&&(t.data(o,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===o&&this.destroy()}}),this.document=t(o.style?o.ownerDocument:o.document||o),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){var e=this;this._destroy(),t.each(this.classesElementLookup,function(t,i){e._removeClass(i,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:t.noop,widget:function(){return this.element},option:function(e,i){var o,n,s,r=e;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof e)if(r={},o=e.split("."),e=o.shift(),o.length){for(n=r[e]=t.widget.extend({},this.options[e]),s=0;s<o.length-1;s++)n[o[s]]=n[o[s]]||{},n=n[o[s]];if(e=o.pop(),1===arguments.length)return void 0===n[e]?null:n[e];n[e]=i}else{if(1===arguments.length)return void 0===this.options[e]?null:this.options[e];r[e]=i}return this._setOptions(r),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(e){var i,o,n;for(i in e)n=this.classesElementLookup[i],e[i]!==this.options.classes[i]&&n&&n.length&&(o=t(n.get()),this._removeClass(n,i),o.addClass(this._classes({element:o,keys:i,classes:e,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(e){var i=[],o=this;function n(){var i=[];e.element.each(function(e,n){t.map(o.classesElementLookup,function(t){return t}).some(function(t){return t.is(n)})||i.push(n)}),o._on(t(i),{remove:"_untrackClassesElement"})}function s(s,r){var l,a;for(a=0;a<s.length;a++)l=o.classesElementLookup[s[a]]||t(),e.add?(n(),l=t(t.uniqueSort(l.get().concat(e.element.get())))):l=t(l.not(e.element).get()),o.classesElementLookup[s[a]]=l,i.push(s[a]),r&&e.classes[s[a]]&&i.push(e.classes[s[a]])}return(e=t.extend({element:this.element,classes:this.options.classes||{}},e)).keys&&s(e.keys.match(/\S+/g)||[],!0),e.extra&&s(e.extra.match(/\S+/g)||[]),i.join(" ")},_untrackClassesElement:function(e){var i=this;t.each(i.classesElementLookup,function(o,n){-1!==t.inArray(e.target,n)&&(i.classesElementLookup[o]=t(n.not(e.target).get()))}),this._off(t(e.target))},_removeClass:function(t,e,i){return this._toggleClass(t,e,i,!1)},_addClass:function(t,e,i){return this._toggleClass(t,e,i,!0)},_toggleClass:function(t,e,i,o){o="boolean"==typeof o?o:i;var n="string"==typeof t||null===t,s={extra:n?e:i,keys:n?t:e,element:n?this.element:t,add:o};return s.element.toggleClass(this._classes(s),o),this},_on:function(e,i,o){var n,s=this;"boolean"!=typeof e&&(o=i,i=e,e=!1),o?(i=n=t(i),this.bindings=this.bindings.add(i)):(o=i,i=this.element,n=this.widget()),t.each(o,function(o,r){function l(){if(e||!0!==s.options.disabled&&!t(this).hasClass("ui-state-disabled"))return("string"==typeof r?s[r]:r).apply(s,arguments)}"string"!=typeof r&&(l.guid=r.guid=r.guid||l.guid||t.guid++);var a=o.match(/^([\w:-]*)\s*(.*)$/),h=a[1]+s.eventNamespace,c=a[2];c?n.on(h,c,l):i.on(h,l)})},_off:function(e,i){i=(i||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.off(i),this.bindings=t(this.bindings.not(e).get()),this.focusable=t(this.focusable.not(e).get()),this.hoverable=t(this.hoverable.not(e).get())},_delay:function(t,e){var i=this;return setTimeout(function(){return("string"==typeof t?i[t]:t).apply(i,arguments)},e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){this._addClass(t(e.currentTarget),null,"ui-state-hover")},mouseleave:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){this._addClass(t(e.currentTarget),null,"ui-state-focus")},focusout:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-focus")}})},_trigger:function(e,i,o){var n,s,r=this.options[e];if(o=o||{},(i=t.Event(i)).type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],s=i.originalEvent)for(n in s)n in i||(i[n]=s[n]);return this.element.trigger(i,o),!("function"==typeof r&&!1===r.apply(this.element[0],[i].concat(o))||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,i){t.Widget.prototype["_"+e]=function(o,n,s){var r;"string"==typeof n&&(n={effect:n});var l=n?!0===n||"number"==typeof n?i:n.effect||i:e;"number"==typeof(n=n||{})?n={duration:n}:!0===n&&(n={}),r=!t.isEmptyObject(n),n.complete=s,n.delay&&o.delay(n.delay),r&&t.effects&&t.effects.effect[l]?o[e](n):l!==e&&o[l]?o[l](n.duration,n.easing,s):o.queue(function(i){t(this)[e](),s&&s.call(o[0]),i()})}});t.widget;
vendor: 4,591 bytes, line 61
61!function(){var e,i=Math.max,o=Math.abs,n=/left|center|right/,s=/top|center|bottom/,r=/[\+\-]\d+(\.[\d]+)?%?/,l=/^\w+/,a=/%$/,h=t.fn.position;function c(t,e,i){return[parseFloat(t[0])*(a.test(t[0])?e/100:1),parseFloat(t[1])*(a.test(t[1])?i/100:1)]}function f(e,i){return parseInt(t.css(e,i),10)||0}function u(t){return null!=t&&t===t.window}t.position=t.position||{scrollbarWidth:function(){if(void 0!==e)return e;var i,o,n=t("<div style='display:block;position:absolute;width:200px;height:200px;overflow:hidden;'><div style='height:300px;width:auto;'></div></div>"),s=n.children()[0];return t("body").append(n),i=s.offsetWidth,n.css("overflow","scroll"),i===(o=s.offsetWidth)&&(o=n[0].clientWidth),n.remove(),e=i-o},getScrollInfo:function(e){var i=e.isWindow||e.isDocument?"":e.element.css("overflow-x"),o=e.isWindow||e.isDocument?"":e.element.css("overflow-y"),n="scroll"===i||"auto"===i&&e.width<e.element[0].scrollWidth;return{width:"scroll"===o||"auto"===o&&e.height<e.element[0].scrollHeight?t.position.scrollbarWidth():0,height:n?t.position.scrollbarWidth():0}},getWithinInfo:function(e){var i=t(e||window),o=u(i[0]),n=!!i[0]&&9===i[0].nodeType;return{element:i,isWindow:o,isDocument:n,offset:!o&&!n?t(e).offset():{left:0,top:0},scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:i.outerWidth(),height:i.outerHeight()}}},t.fn.position=function(e){if(!e||!e.of)return h.apply(this,arguments);var a,d,p,g,m,v,w,y,_="string"==typeof(e=t.extend({},e)).of?t(document).find(e.of):t(e.of),b=t.position.getWithinInfo(e.within),x=t.position.getScrollInfo(b),W=(e.collision||"flip").split(" "),C={};return v=9===(y=(w=_)[0]).nodeType?{width:w.width(),height:w.height(),offset:{top:0,left:0}}:u(y)?{width:w.width(),height:w.height(),offset:{top:w.scrollTop(),left:w.scrollLeft()}}:y.preventDefault?{width:0,height:0,offset:{top:y.pageY,left:y.pageX}}:{width:w.outerWidth(),height:w.outerHeight(),offset:w.offset()},_[0].preventDefault&&(e.at="left top"),d=v.width,p=v.height,g=v.offset,m=t.extend({},g),t.each(["my","at"],function(){var t,i,o=(e[this]||"").split(" ");1===o.length&&(o=n.test(o[0])?o.concat(["center"]):s.test(o[0])?["center"].concat(o):["center","center"]),o[0]=n.test(o[0])?o[0]:"center",o[1]=s.test(o[1])?o[1]:"center",t=r.exec(o[0]),i=r.exec(o[1]),C[this]=[t?t[0]:0,i?i[0]:0],e[this]=[l.exec(o[0])[0],l.exec(o[1])[0]]}),1===W.length&&(W[1]=W[0]),"right"===e.at[0]?m.left+=d:"center"===e.at[0]&&(m.left+=d/2),"bottom"===e.at[1]?m.top+=p:"center"===e.at[1]&&(m.top+=p/2),a=c(C.at,d,p),m.left+=a[0],m.top+=a[1],this.each(function(){var n,s,r=t(this),l=r.outerWidth(),h=r.outerHeight(),u=f(this,"marginLeft"),v=f(this,"marginTop"),w=l+u+f(this,"marginRight")+x.width,y=h+v+f(this,"marginBottom")+x.height,E=t.extend({},m),P=c(C.my,r.outerWidth(),r.outerHeight());"right"===e.my[0]?E.left-=l:"center"===e.my[0]&&(E.left-=l/2),"bottom"===e.my[1]?E.top-=h:"center"===e.my[1]&&(E.top-=h/2),E.left+=P[0],E.top+=P[1],n={marginLeft:u,marginTop:v},t.each(["left","top"],function(i,o){t.ui.position[W[i]]&&t.ui.position[W[i]][o](E,{targetWidth:d,targetHeight:p,elemWidth:l,elemHeight:h,collisionPosition:n,collisionWidth:w,collisionHeight:y,offset:[a[0]+P[0],a[1]+P[1]],my:e.my,at:e.at,within:b,elem:r})}),e.using&&(s=function(t){var n=g.left-E.left,s=n+d-l,a=g.top-E.top,c=a+p-h,f={target:{element:_,left:g.left,top:g.top,width:d,height:p},element:{element:r,left:E.left,top:E.top,width:l,height:h},horizontal:s<0?"left":n>0?"right":"center",vertical:c<0?"top":a>0?"bottom":"middle"};d<l&&o(n+s)<d&&(f.horizontal="center"),p<h&&o(a+c)<p&&(f.vertical="middle"),i(o(n),o(s))>i(o(a),o(c))?f.important="horizontal":f.important="vertical",e.using.call(this,t,f)}),r.offset(t.extend(E,{using:s}))})},t.ui.position={fit:{left:function(t,e){var o,n=e.within,s=n.isWindow?n.scrollLeft:n.offset.left,r=n.width,l=t.left-e.collisionPosition.marginLeft,a=s-l,h=l+e.collisionWidth-r-s;e.collisionWidth>r?a>0&&h<=0?(o=t.left+a+e.collisionWidth-r-s,t.left+=a-o):t.left=h>0&&a<=0?s:a>h?s+r-e.collisionWidth:s:a>0?t.left+=a:h>0?t.left-=h:t.left=i(t.left-l,t.left)},top:function(t,e){var o,n=e.within,s=n.isWindow?n.scrollTop:n.offset.top,r=e.within.height,l=t.top-e.collisionPosition.marginTop,a=s-l,h=l+e.collisionHeight-r-s;e.collisionHeight>r?a>0&&h<=0?(o=t.top+a+e.collisionHeight-r-s,t.top+=a-o):t.top=h>0&&a<=0?s:a>h?s+r-e.collisionHeight:s:a>0?t.top+=a:h>0?t.top-=h:t.top=i(t.top-l,t.top)}},flip:{left:function(t,e){var i,n,s=e.within,r=s.offset.left+s.scrollLeft,l=s.width,a=s.isWindow?s.scrollLeft:s.offset.left,h=t.left-e.collisionPosition.marginLeft,c=h-a,f=h+e.collisionWidth-l-a,u="left"
61===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,d="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,p=-2*e.offset[0];c<0?((i=t.left+u+d+p+e.collisionWidth-l-r)<0||i<o(c))&&(t.left+=u+d+p):f>0&&((n=t.left-e.collisionPosition.marginLeft+u+d+p-a)>0||o(n)<f)&&(t.left+=u+d+p)},top:function(t,e){var i,n,s=e.within,r=s.offset.top+s.scrollTop,l=s.height,a=s.isWindow?s.scrollTop:s.offset.top,h=t.top-e.collisionPosition.marginTop,c=h-a,f=h+e.collisionHeight-l-a,u="top"===e.my[1]?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,d="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,p=-2*e.offset[1];c<0?((n=t.top+u+d+p+e.collisionHeight-l-r)<0||n<o(c))&&(t.top+=u+d+p):f>0&&((i=t.top-e.collisionPosition.marginTop+u+d+p-a)>0||o(i)<f)&&(t.top+=u+d+p)}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}}}();t.ui.position;if(t.expr.pseudos||(t.expr.pseudos=t.expr[":"]),t.uniqueSort||(t.uniqueSort=t.unique),!t.escapeSelector){var s=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g,r=function(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t};t.escapeSelector=function(t){return(t+"").replace(s,r)}}t.fn.even&&t.fn.odd||t.fn.extend({even:function(){return this.filter(function(t){return t%2==0})},odd:function(){return this.filter(function(t){return t%2==1})}});var l;t.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},t.fn.scrollParent=function(e){var i=this.css("position"),o="absolute"===i,n=e?/(auto|scroll|hidden)/:/(auto|scroll)/,s=this.parents().filter(function(){var e=t(this);return(!o||"static"!==e.css("position"))&&n.test(e.css("overflow")+e.css("overflow-y")+e.css("overflow-x"))}).eq(0);return"fixed"!==i&&s.length?s:t(this[0].ownerDocument||document)},t.fn.extend({uniqueId:(l=0,function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++l)})}),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&t(this).removeAttr("id")})}})});
62},{}],"laCd":[function(require,module,exports) {
63var define;
64var e;!function(t){"function"==typeof e&&e.amd?e(["jquery","./jquery.fancytree.ui-deps"],t):"object"==typeof module&&module.exports?(require("./jquery.fancytree.ui-deps"),module.exports=t(require("jquery"))):t(jQuery)}(function(e){"use strict";if(!e.ui||!e.ui.fancytree){var t,n,i=null,r=new RegExp(/\.|\//),o=/[&<>"'/]/g,s=/[<>"'/]/g,a={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"},l={16:!0,17:!0,18:!0},d={8:"backspace",9:"tab",10:"return",13:"return",19:"pause",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"insert",46:"del",59:";",61:"=",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12",144:"numlock",145:"scroll",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},c={16:"shift",17:"ctrl",18:"alt",91:"meta",93:"meta"},u={0:"",1:"left",2:"middle",3:"right"},h="active expanded focus folder lazy radiogroup selected unselectable unselectableIgnore".split(" "),f={},p="columns types".split(" "),g="checkbox expanded extraClasses folder icon iconTooltip key lazy partsel radiogroup refKey selected statusNodeType title tooltip type unselectable unselectableIgnore unselectableStatus".split(" "),v={},y={},m={active:!0,children:!0,data:!0,focus:!0};for(t=0;t<h.length;t++)f[h[t]]=!0;for(t=0;t<g.length;t++)n=g[t],v[n]=!0,n!==n.toLowerCase()&&(y[n.toLowerCase()]=n);var b=Array.isArray;return x(e.ui,"Fancytree requires jQuery UI (http://jqueryui.com)"),Date.now||(Date.now=function(){return(new Date).getTime()}),I.prototype={_findDirectChild:function(e){var t,n,i=this.children;if(i)if("string"==typeof e){for(t=0,n=i.length;t<n;t++)if(i[t].key===e)return i[t]}else{if("number"==typeof e)return this.children[e];if(e.parent===this)return e}return null},_setChildren:function(e){x(e&&(!this.children||0===this.children.length),"only init supported"),this.children=[];for(var t=0,n=e.length;t<n;t++)this.children.push(new I(this,e[t]));this.tree._callHook("treeStructureChanged",this.tree,"setChildren")},addChildren:function(t,n){var i,r,o,s,a=this.getFirstChild(),l=this.getLastChild(),d=[];for(e.isPlainObject(t)&&(t=[t]),this.children||(this.children=[]),i=0,r=t.length;i<r;i++)d.push(new I(this,t[i]));if(s=d[0],null==n?this.children=this.children.concat(d):(n=this._findDirectChild(n),x((o=e.inArray(n,this.children))>=0,"insertBefore must be an existing child"),this.children.splice.apply(this.children,[o,0].concat(d))),a&&!n){for(i=0,r=d.length;i<r;i++)d[i].render();a!==this.getFirstChild()&&a.renderStatus(),l!==this.getLastChild()&&l.render
vendor: 5,579 bytes, line 64
64Status()}else(!this.parent||this.parent.ul||this.tr)&&this.render();return 3===this.tree.options.selectMode&&this.fixSelection3FromEndNodes(),this.triggerModifyChild("add",1===d.length?d[0]:null),s},addClass:function(e){return this.toggleClass(e,!0)},addNode:function(e,t){switch(void 0!==t&&"over"!==t||(t="child"),t){case"after":return this.getParent().addChildren(e,this.getNextSibling());case"before":return this.getParent().addChildren(e,this);case"firstChild":var n=this.children?this.children[0]:null;return this.addChildren(e,n);case"child":case"over":return this.addChildren(e)}x(!1,"Invalid mode: "+t)},addPagingNode:function(t,n){var i,r;if(n=n||"child",!1!==t)return t=e.extend({title:this.tree.options.strings.moreData,statusNodeType:"paging",icon:!1},t),this.partload=!0,this.addNode(t,n);for(i=this.children.length-1;i>=0;i--)"paging"===(r=this.children[i]).statusNodeType&&this.removeChild(r);this.partload=!1},appendSibling:function(e){return this.addNode(e,"after")},applyCommand:function(e,t){return this.tree.applyCommand(e,this,t)},applyPatch:function(e){if(null===e)return this.remove(),T(this);var t,n,i={children:!0,expanded:!0,parent:!0};for(t in e)k(e,t)&&(n=e[t],i[t]||N(n)||(v[t]?this[t]=n:this.data[t]=n));return k(e,"children")&&(this.removeChildren(),e.children&&this._setChildren(e.children)),this.isVisible()&&(this.renderTitle(),this.renderStatus()),k(e,"expanded")?this.setExpanded(e.expanded):T(this)},collapseSiblings:function(){return this.tree._callHook("nodeCollapseSiblings",this)},copyTo:function(e,t,n){return e.addNode(this.toDict(!0,n),t)},countChildren:function(e){var t,n,i,r=this.children;if(!r)return 0;if(i=r.length,!1!==e)for(t=0,n=i;t<n;t++)i+=r[t].countChildren();return i},debug:function(e){this.tree.options.debugLevel>=4&&(Array.prototype.unshift.call(arguments,this.toString()),C("log",arguments))},discard:function(){return this.warn("FancytreeNode.discard() is deprecated since 2014-02-16. Use .resetLazy() instead."),this.resetLazy()},discardMarkup:function(e){var t=e?"nodeRemoveMarkup":"nodeRemoveChildMarkup";this.tree._callHook(t,this)},error:function(e){this.tree.options.debugLevel>=1&&(Array.prototype.unshift.call(arguments,this.toString()),C("error",arguments))},findAll:function(e){e=N(e)?e:R(e);var t=[];return this.visit(function(n){e(n)&&t.push(n)}),t},findFirst:function(e){e=N(e)?e:R(e);var t=null;return this.visit(function(n){if(e(n))return t=n,!1}),t},findRelatedNode:function(e,t){return this.tree.findRelatedNode(this,e,t)},_changeSelectStatusAttrs:function(e){var t=!1,n=this.tree.options,r=i.evalOption("unselectable",this,this,n,!1),o=i.evalOption("unselectableStatus",this,this,n,void 0);switch(r&&null!=o&&(e=o),e){case!1:t=this.selected||this.partsel,this.selected=!1,this.partsel=!1;break;case!0:t=!this.selected||!this.partsel,this.selected=!0,this.partsel=!0;break;case void 0:t=this.selected||!this.partsel,this.selected=!1,this.partsel=!0;break;default:x(!1,"invalid state: "+e)}return t&&this.renderStatus(),t},fixSelection3AfterClick:function(e){var t=this.isSelected();this.visit(function(e){if(e._changeSelectStatusAttrs(t),e.radiogroup)return"skip"}),this.fixSelection3FromEndNodes(e)},fixSelection3FromEndNodes:function(e){var t=this.tree.options;x(3===t.selectMode,"expected selectMode 3"),function e(n){var r,o,s,a,l,d,c,u,h=n.children;if(h&&h.length){for(d=!0,c=!1,r=0,o=h.length;r<o;r++)a=e(s=h[r]),i.evalOption("unselectableIgnore",s,s,t,!1)||(!1!==a&&(c=!0),!0!==a&&(d=!1));l=!!d||!!c&&void 0}else l=null==(u=i.evalOption("unselectableStatus",n,n,t,void 0))?!!n.selected:!!u;return n.partsel&&!n.selected&&n.lazy&&null==n.children&&(l=void 0),n._changeSelectStatusAttrs(l),l}(this),this.visitParents(function(e){var n,r,o,s,a,l=e.children,d=!0,c=!1;for(n=0,r=l.length;n<r;n++)o=l[n],i.evalOption("unselectableIgnore",o,o,t,!1)||(((s=null==(a=i.evalOption("unselectableStatus",o,o,t,void 0))?!!o.selected:!!a)||o.partsel)&&(c=!0),s||(d=!1));s=!!d||!!c&&void 0,e._changeSelectStatusAttrs(s)})},fromDict:function(t){for(var n in t)v[n]?this[n]=t[n]:"data"===n?e.extend(this.data,t.data):N(t[n])||m[n]||(this.data[n]=t[n]);t.children&&(this.removeChildren(),this.addChildren(t.children)),this.renderTitle()},getChildren:function(){if(void 0!==this.hasChildren())return this.children},getFirstChild:function(){return this.children?this.children[0]:null},getIndex:function(){return e.inArray(this,this.parent.children)},getIndexHier:function(t,n){t=t||".";var i,r=[];return e.each(this.getParentList(!1,!0),function(e,t){i=""+(t.getIndex()+1),n&&(i=("0000000"+i).substr(-n)),r.push(i)}),r.join(t)},getKeyPath:function(e){var t=this.tree.options.keyPathSeparator;return t+this.getPath(!e,"key",t)},getLastChild:function(){return this.children?this.children[this.children.length-1]:null},getLevel:function(){for(var e=0,t=this.parent;t;)e++,t=t.parent;return e},getNextSibling:function(){if(this.parent){var e,t,n=this.parent.children;for(e=0,t=n.length-1;e<t;e++)if(n[e]===this)return n[e+1]}return null},getParent:function(){return this.parent},getParentList:function(e,t){for(var n=[],i=t?this:this.parent;i;)(e||i.parent)&&n.unshift(i),i=i.parent;return n},getPath:function(e,t,n){e=!1!==e,n=n||"/";var i,r=[],o=N(t=t||"title");return this.visitParents(function(e){e.parent&&(i=o?t(e):e[t],r.unshift(i))},e),r.join(n)},getPrevSibling:function(){if(this.parent){var e,t,n=this.parent.children;for(e=1,t=n.length;e<t;e++)if(n[e]===this)return n[e-1]}return null},getSelectedNodes:function(e){var t=[];return this.visit(function(n){if(n.selected&&(t.push(n),!0===e))return"skip"}),t}
64,hasChildren:function(){if(this.lazy){if(null==this.children)return;if(0===this.children.length)return!1;if(1===this.children.length&&this.children[0].isStatusNode())return;return!0}return!(!this.children||!this.children.length)},hasClass:function(e){return(" "+(this.extraClasses||"")+" ").indexOf(" "+e+" ")>=0},hasFocus:function(){return this.tree.hasFocus()&&this.tree.focusNode===this},info:function(e){this.tree.options.debugLevel>=3&&(Array.prototype.unshift.call(arguments,this.toString()),C("info",arguments))},isActive:function(){return this.tree.activeNode===this},isBelowOf:function(e){return this.getIndexHier(".",5)>e.getIndexHier(".",5)},isChildOf:function(e){return this.parent&&this.parent===e},isDescendantOf:function(t){if(!t||t.tree!==this.tree)return!1;for(var n=this.parent;n;){if(n===t)return!0;n===n.parent&&e.error("Recursive parent link: "+n),n=n.parent}return!1},isExpanded:function(){return!!this.expanded},isFirstSibling:function(){var e=this.parent;return!e||e.children[0]===this},isFolder:function(){return!!this.folder},isLastSibling:function(){var e=this.parent;return!e||e.children[e.children.length-1]===this},isLazy:function(){return!!this.lazy},isLoaded:function(){return!this.lazy||void 0!==this.hasChildren()},isLoading:function(){return!!this._isLoading},isRoot:function(){return this.isRootNode()},isPartsel:function(){return!this.selected&&!!this.partsel},isPartload:function(){return!!this.partload},isRootNode:function(){return this.tree.rootNode===this},isSelected:function(){return!!this.selected},isStatusNode:function(){return!!this.statusNodeType},isPagingNode:function(){return"paging"===this.statusNodeType},isTopLevel:function(){return this.tree.rootNode===this.parent},isUndefined:function(){return void 0===this.hasChildren()},isVisible:function(){var e,t,n=this.tree.enableFilter,i=this.getParentList(!1,!1);if(n&&!this.match&&!this.subMatchCount)return!1;for(e=0,t=i.length;e<t;e++)if(!i[e].expanded)return!1;return!0},lazyLoad:function(t){e.error("FancytreeNode.lazyLoad() is deprecated since 2014-02-16. Use .load() instead.")},load:function(e){var t,n,i=this,r=this.isExpanded();return x(this.isLazy(),"load() requires a lazy node"),e||this.isUndefined()?(this.isLoaded()&&this.resetLazy(),!1===(n=this.tree._triggerNodeEvent("lazyLoad",this))?T(this):(x("boolean"!=typeof n,"lazyLoad event must return source in data.result"),t=this.tree._callHook("nodeLoadChildren",this,n),r?(this.expanded=!0,t.always(function(){i.render()})):t.always(function(){i.renderStatus()}),t)):T(this)},makeVisible:function(t){var n,i=this,r=[],o=new e.Deferred,s=this.getParentList(!1,!1),a=s.length,l=!(t&&!0===t.noAnimation),d=!(t&&!1===t.scrollIntoView);for(n=a-1;n>=0;n--)r.push(s[n].setExpanded(!0,t));return e.when.apply(e,r).done(function(){d?i.scrollIntoView(l).done(function(){o.resolve()}):o.resolve()}),o.promise()},moveTo:function(t,n,i){void 0===n||"over"===n?n="child":"firstChild"===n&&(t.children&&t.children.length?(n="before",t=t.children[0]):n="child");var r,o=this.tree,s=this.parent,a="child"===n?t:t.parent;if(this!==t){if(this.parent?a.isDescendantOf(this)&&e.error("Cannot move a node to its own descendant"):e.error("Cannot move system root"),a!==s&&s.triggerModifyChild("remove",this),1===this.parent.children.length){if(this.parent===a)return;this.parent.children=this.parent.lazy?[]:null,this.parent.expanded=!1}else x((r=e.inArray(this,this.parent.children))>=0,"invalid source parent"),this.parent.children.splice(r,1);if(this.parent=a,a.hasChildren())switch(n){case"child":a.children.push(this);break;case"before":x((r=e.inArray(t,a.children))>=0,"invalid target parent"),a.children.splice(r,0,this);break;case"after":x((r=e.inArray(t,a.children))>=0,"invalid target parent"),a.children.splice(r+1,0,this);break;default:e.error("Invalid mode "+n)}else a.children=[this];i&&t.visit(i,!0),a===s?a.triggerModifyChild("move",this):a.triggerModifyChild("add",this),o!==t.tree&&(this.warn("Cross-tree moveTo is experimental!"),this.visit(function(e){e.tree=t.tree},!0)),o._callHook("treeStructureChanged",o,"moveTo"),s.isDescendantOf(a)||s.render(),a.isDescendantOf(s)||a===s||a.render()}},navigate:function(t,n){var i,r=e.ui.keyCode;switch(t){case"left":case r.LEFT:if(this.expanded)return this.setExpanded(!1);break;case"right":case r.RIGHT:if(!this.expanded&&(this.children||this.lazy))return this.setExpanded()}if(i=this.findRelatedNode(t)){try{i.makeVisible({scrollIntoView:!1})}catch(o){}return!1===n?(i.setFocus(),T()):i.setActive()}return this.warn("Could not find related node '"+t+"'."),T()},remove:function(){return this.parent.removeChild(this)},removeChild:function(e){return this.tree._callHook("nodeRemoveChild",this,e)},removeChildren:function(){return this.tree._callHook("nodeRemoveChildren",this)},removeClass:function(e){return this.toggleClass(e,!1)},render:function(e,t){return this.tree._callHook("nodeRender",this,e,t)},renderTitle:function(){return this.tree._callHook("nodeRenderTitle",this)},renderStatus:function(){return this.tree._callHook("nodeRenderStatus",this)},replaceWith:function(n){var i,r=this.parent,o=e.inArray(this,r.children),s=this;return x(this.isPagingNode(),"replaceWith() currently requires a paging status node"),(i=this.tree._callHook("nodeLoadChildren",this,n)).done(function(e){var n=s.children;for(t=0;t<n.length;t++)n[t].parent=r;r.children.splice.apply(r.children,[o+1,0].concat(n)),s.children=null,s.remove(),r.render()}).fail(function(){s.setExpanded()}),i},resetLazy:function(){this.removeChildren(),this.expanded=!1,this.lazy=!0,this.children=void 0,this.renderStatus()},scheduleAction:function(t,n){this.tree.timer&&(clearTimeout(this.tree.timer),this.tree.debug("clearTimeout(%o)",this.tree.timer)),this.tree.timer=null;var i=this;switch(t){case"cancel":break;case"expand":this.tree.timer=setTimeout(function(){i.tree.debug("setTimeout: trigger exp
64and"),i.setExpanded(!0)},n);break;case"activate":this.tree.timer=setTimeout(function(){i.tree.debug("setTimeout: trigger activate"),i.setActive(!0)},n);break;default:e.error("Invalid mode "+t)}},scrollIntoView:function(t,n){if(void 0!==n&&((i=n).tree&&void 0!==i.statusNodeType))throw Error("scrollIntoView() with 'topNode' option is deprecated since 2014-05-08. Use 'options.topNode' instead.");var i,r=e.extend({effects:!0===t?{duration:200,queue:!1}:t,scrollOfs:this.tree.options.scrollOfs,scrollParent:this.tree.options.scrollParent,topNode:null},n),o=r.scrollParent,s=this.tree.$container,a=s.css("overflow-y");o?o.jquery||(o=e(o)):o=this.tree.tbody?s.scrollParent():"scroll"===a||"auto"===a?s:s.scrollParent(),o[0]!==document&&o[0]!==document.body||(this.debug("scrollIntoView(): normalizing scrollParent to 'window':",o[0]),o=e(window));var l,d,c,u=new e.Deferred,h=this,f=e(this.span).height(),p=r.scrollOfs.top||0,g=r.scrollOfs.bottom||0,v=o.height(),y=o.scrollTop(),m=o,b=o[0]===window,k=r.topNode||null,N=null;return this.isRootNode()||!this.isVisible()?(this.info("scrollIntoView(): node is invisible."),T()):(b?(d=e(this.span).offset().top,l=k&&k.span?e(k.span).offset().top:0,m=e("html,body")):(x(o[0]!==document&&o[0]!==document.body,"scrollParent should be a simple element or `window`, not document or body."),c=o.offset().top,d=e(this.span).offset().top-c+y,l=k?e(k.span).offset().top-c+y:0,v-=Math.max(0,o.innerHeight()-o[0].clientHeight)),d<y+p?N=d-p:d+f>y+v-g&&(N=d+f-v+g,k&&(x(k.isRootNode()||k.isVisible(),"topNode must be visible"),l<N&&(N=l-p))),null===N?u.resolveWith(this):r.effects?(r.effects.complete=function(){u.resolveWith(h)},m.stop(!0).animate({scrollTop:N},r.effects)):(m[0].scrollTop=N,u.resolveWith(this)),u.promise())},setActive:function(e,t){return this.tree._callHook("nodeSetActive",this,e,t)},setExpanded:function(e,t){return this.tree._callHook("nodeSetExpanded",this,e,t)},setFocus:function(e){return this.tree._callHook("nodeSetFocus",this,e)},setSelected:function(e,t){return this.tree._callHook("nodeSetSelected",this,e,t)},setStatus:function(e,t,n){return this.tree._callHook("nodeSetStatus",this,e,t,n)},setTitle:function(e){this.title=e,this.renderTitle(),this.triggerModify("rename")},sortChildren:function(e,t){var n,i,r=this.children;if(r){if(e=e||function(e,t){var n=e.title.toLowerCase(),i=t.title.toLowerCase();return n===i?0:n>i?1:-1},r.sort(e),t)for(n=0,i=r.length;n<i;n++)r[n].children&&r[n].sortChildren(e,"$norender$");"$norender$"!==t&&this.render(),this.triggerModifyChild("sort")}},toDict:function(t,n){var i,r,o,s,a={},l=this;if(e.each(g,function(e,t){(l[t]||!1===l[t])&&(a[t]=l[t])}),e.isEmptyObject(this.data)||(a.data=e.extend({},this.data),e.isEmptyObject(a.data)&&delete a.data),n){if(!1===(s=n(a,l)))return!1;"skip"===s&&(t=!1)}if(t&&b(this.children))for(a.children=[],i=0,r=this.children.length;i<r;i++)(o=this.children[i]).isStatusNode()||!1!==(s=o.toDict(!0,n))&&a.children.push(s);return a},toggleClass:function(t,n){var i,r,o=t.match(/\S+/g)||[],s=0,a=!1,l=this[this.tree.statusClassPropName],d=" "+(this.extraClasses||"")+" ";for(l&&e(l).toggleClass(t,n);i=o[s++];)if(r=d.indexOf(" "+i+" ")>=0,n=void 0===n?!r:!!n)r||(d+=i+" ",a=!0);else for(;d.indexOf(" "+i+" ")>-1;)d=d.replace(" "+i+" "," ");return this.extraClasses=_(d),a},toggleExpanded:function(){return this.tree._callHook("nodeToggleExpanded",this)},toggleSelected:function(){return this.tree._callHook("nodeToggleSelected",this)},toString:function(){return"FancytreeNode@"+this.key+"[title='"+this.title+"']"},triggerModifyChild:function(t,n,i){var r,o=this.tree.options.modifyChild;o&&(n&&n.parent!==this&&e.error("childNode "+n+" is not a child of "+this),r={node:this,tree:this.tree,operation:t,childNode:n||null},i&&e.extend(r,i),o({type:"modifyChild"},r))},triggerModify:function(e,t){this.parent.triggerModifyChild(e,this,t)},visit:function(e,t){var n,i,r=!0,o=this.children;if(!0===t&&(!1===(r=e(this))||"skip"===r))return r;if(o)for(n=0,i=o.length;n<i&&!1!==(r=o[n].visit(e,!0));n++);return r},visitAndLoad:function(t,n,i){var r,o,s,a=this;return!t||!0!==n||!1!==(o=t(a))&&"skip"!==o?a.children||a.lazy?(r=new e.Deferred,s=[],a.load().done(function(){for(var n=0,i=a.children.length;n<i;n++){if(!1===(o=a.children[n].visitAndLoad(t,!0,!0))){r.reject();break}"skip"!==o&&s.push(o)}e.when.apply(this,s).then(function(){r.resolve()})}),r.promise()):T():i?o:T()},visitParents:function(e,t){if(t&&!1===e(this))return!1;for(var n=this.parent;n;){if(!1===e(n))return!1;n=n.parent}return!0},visitSiblings:function(e,t){var n,i,r,o=this.parent.children;for(n=0,i=o.length;n<i;n++)if(r=o[n],(t||r!==this)&&!1===e(r))return!1;return!0},warn:function(e){this.tree.options.debugLevel>=2&&(Array.prototype.unshift.call(arguments,this.toString()),C("warn",arguments))}},F.prototype={_makeHookContext:function(t,n,i){var r,o;return void 0!==t.node?(n&&t.originalEvent!==n&&e.error("invalid args"),r=t):t.tree?r={node:t,tree:o=t.tree,widget:o.widget,options:o.widget.options,originalEvent:n,typeInfo:o.types[t.type]||{}}:t.widget?r={node:null,tree:t,widget:t.widget,options:t.widget.options,originalEvent:n}:e.error("invalid args"),i&&e.extend(r,i),r},_callHook:function(t,n,i){var r=this._makeHookContext(n),o=this[t],s=Array.prototype.slice.call(arguments,2);return N(o)||e.error("_callHook('"+t+"') is not a function"),s.unshift(r),o.apply(this,s)},_setExpiringValue:function(e,t,n){this._tempCache[e]={value:t,expire:Date.now()+(+n||50)}},_getExpiringValue:function(e){var t=this._tempCache[e];return t&&t.expire>Date.now()?t.value:(delete this._tempCache[e],null)},_usesExtension:function(t){return e.inArray(t,this.options.extensions)>=0},_requireExtension:function(t,n,i,r){null!=i&&(i=!!i);var o=this._local.name,s=this.options.extensions,a=e.inArray(t,s)<e.inArray(o,s),l=n&&null==this.ext[t],d=!l&&null!=i&&i!==a;
vendor: 18,816 bytes, line 64
64return x(o&&o!==t,"invalid or same name '"+o+"' (require yourself?)"),!l&&!d||(r||(l||n?(r="'"+o+"' extension requires '"+t+"'",d&&(r+=" to be registered "+(i?"before":"after")+" itself")):r="If used together, `"+t+"` must be registered "+(i?"before":"after")+" `"+o+"`"),e.error(r),!1)},activateKey:function(e,t){var n=this.getNodeByKey(e);return n?n.setActive(!0,t):this.activeNode&&this.activeNode.setActive(!1,t),n},addPagingNode:function(e,t){return this.rootNode.addPagingNode(e,t)},applyCommand:function(t,n,i){var r;switch(n=n||this.getActiveNode(),t){case"moveUp":(r=n.getPrevSibling())&&(n.moveTo(r,"before"),n.setActive());break;case"moveDown":(r=n.getNextSibling())&&(n.moveTo(r,"after"),n.setActive());break;case"indent":(r=n.getPrevSibling())&&(n.moveTo(r,"child"),r.setExpanded(),n.setActive());break;case"outdent":n.isTopLevel()||(n.moveTo(n.getParent(),"after"),n.setActive());break;case"remove":r=n.getPrevSibling()||n.getParent(),n.remove(),r&&r.setActive();break;case"addChild":n.editCreateNode("child","");break;case"addSibling":n.editCreateNode("after","");break;case"rename":n.editStart();break;case"down":case"first":case"last":case"left":case"parent":case"right":case"up":return n.navigate(t);default:e.error("Unhandled command: '"+t+"'")}},applyPatch:function(t){var n,i,r,o,s,a,l=t.length,d=[];for(i=0;i<l;i++)x(2===(r=t[i]).length,"patchList must be an array of length-2-arrays"),o=r[0],s=r[1],(a=null===o?this.rootNode:this.getNodeByKey(o))?(n=new e.Deferred,d.push(n),a.applyPatch(s).always(A(n,a))):this.warn("could not find node with key '"+o+"'");return e.when.apply(e,d).promise()},clear:function(e){this._callHook("treeClear",this)},count:function(){return this.rootNode.countChildren()},debug:function(e){this.options.debugLevel>=4&&(Array.prototype.unshift.call(arguments,this.toString()),C("log",arguments))},destroy:function(){this.widget.destroy()},enable:function(e){!1===e?this.widget.disable():this.widget.enable()},enableUpdate:function(e){return e=!1!==e,!!this._enableUpdate==!!e?e:(this._enableUpdate=e,e?(this.debug("enableUpdate(true): redraw "),this._callHook("treeStructureChanged",this,"enableUpdate"),this.render()):this.debug("enableUpdate(false)..."),!e)},error:function(e){this.options.debugLevel>=1&&(Array.prototype.unshift.call(arguments,this.toString()),C("error",arguments))},expandAll:function(e,t){var n=this.enableUpdate(!1);e=!1!==e,this.visit(function(n){!1!==n.hasChildren()&&n.isExpanded()!==e&&n.setExpanded(e,t)}),this.enableUpdate(n)},findAll:function(e){return this.rootNode.findAll(e)},findFirst:function(e){return this.rootNode.findFirst(e)},findNextNode:function(e,t){var n,i=null,r=this.getFirstChild();function o(n){if(e(n)&&(i=n),i||n===t)return!1}return e="string"==typeof e?(n=new RegExp("^"+e,"i"),function(e){return n.test(e.title)}):e,t=t||r,this.visitRows(o,{start:t,includeSelf:!1}),i||t===r||this.visitRows(o,{start:r,includeSelf:!0}),i},findRelatedNode:function(t,n,i){var r=null,o=e.ui.keyCode;switch(n){case"parent":case o.BACKSPACE:t.parent&&t.parent.parent&&(r=t.parent);break;case"first":case o.HOME:this.visit(function(e){if(e.isVisible())return r=e,!1});break;case"last":case o.END:this.visit(function(e){e.isVisible()&&(r=e)});break;case"left":case o.LEFT:t.expanded?t.setExpanded(!1):t.parent&&t.parent.parent&&(r=t.parent);break;case"right":case o.RIGHT:t.expanded||!t.children&&!t.lazy?t.children&&t.children.length&&(r=t.children[0]):(t.setExpanded(),r=t);break;case"up":case o.UP:this.visitRows(function(e){return r=e,!1},{start:t,reverse:!0,includeSelf:!1});break;case"down":case o.DOWN:this.visitRows(function(e){return r=e,!1},{start:t,includeSelf:!1});break;default:this.tree.warn("Unknown relation '"+n+"'.")}return r},generateFormElements:function(t,n,i){i=i||{};var r,o="string"==typeof t?t:"ft_"+this._id+"[]",s="string"==typeof n?n:"ft_"+this._id+"_active",a="fancytree_result_"+this._id,l=e("#"+a),d=3===this.options.selectMode&&!1!==i.stopOnParents;function c(t){l.append(e("<input>",{type:"checkbox",name:o,value:t.key,checked:!0}))}l.length?l.empty():l=e("<div>",{id:a}).hide().insertAfter(this.$container),!1!==n&&this.activeNode&&l.append(e("<input>",{type:"radio",name:s,value:this.activeNode.key,checked:!0})),i.filter?this.visit(function(e){var t=i.filter(e);if("skip"===t)return t;!1!==t&&c(e)}):!1!==t&&(r=this.getSelectedNodes(d),e.each(r,function(e,t){c(t)}))},getActiveNode:function(){return this.activeNode},getFirstChild:function(){return this.rootNode.getFirstChild()},getFocusNode:function(){return this.focusNode},getOption:function(e){return this.widget.option(e)},getNodeByKey:function(e,t){var n,i;return!t&&(n=document.getElementById(this.options.idPrefix+e))?n.ftnode?n.ftnode:null:(t=t||this.rootNode,i=null,e=""+e,t.visit(function(t){if(t.key===e)return i=t,!1},!0),i)},getRootNode:function(){return this.rootNode},getSelectedNodes:function(e){return this.rootNode.getSelectedNodes(e)},hasFocus:function(){return!!this._hasFocus},info:function(e){this.options.debugLevel>=3&&(Array.prototype.unshift.call(arguments,this.toString()),C("info",arguments))},isLoading:function(){var e=!1;return this.rootNode.visit(function(t){if(t._isLoading||t._requestId)return e=!0,!1},!0),e},loadKeyPath:function(t,n){var i,r,o,s=this,a=new e.Deferred,l=this.getRootNode(),d=this.options.keyPathSeparator,c=[],u=e.extend({},n);for("function"==typeof n?i=n:n&&n.callback&&(i=n.callback),u.callback=function(e,t,n){i&&i.call(e,t,n),a.notifyWith(e,[{node:t,status:n}])},null==u.matchKey&&(u.matchKey=function(e,t){return e.key===t}),b(t)||(t=[t]),r=0;r<t.length;r++)(o=t[r]).charAt(0)===d&&(o=o.substr(1)),c.push(o.split(d));return setTimeout(function(){s._loadKeyPathImpl(a,u,l,c).done(function(){a.resolve()})},0),a.promise()},_loadKeyPathImpl:function(t,n,i,r){var o,s,a,l,d,c,u,h,f,p,g=this;function v(e,t){var i,r,o=e.children;if(o)for(i=0,r=o.length;i<r;i++)if(n.matchKey(o[i],t))return o[i];return null}for(u={},s=0;s<r.length;s++)for(f=r[s],h=i;f.length;){if(a=f.shift(),!(l=v(h,a))){this.warn("loadKeyPath: key not found: "+a+" (parent: "+h+")"),n.callback(this,a,"error");break}if(0===f.length){n.callback(this,l,"ok");break}if(l.lazy&&void 0===l.hasChildren()){n.callback(this,l,"loaded"),u[a=l.key]?u[a].pathSegList.push(f):u[a]={parent:l,pathSegList:[f]};break}n.callback(this,l,"loaded"),h=l}function y(e,t,i){n.callback(g,t,"loading"),t.load().done(function(){g._loadKeyPathImpl.call(g,e,n,t,i).always(A(e,g))}).fail(function(i){g.warn("loadKeyPath: error loading lazy "+t),n.callback(g,l,"error"),e.rejectWith(g)})}for(d in o=[],u)k(u,d)&&(c=u[d],p=new e.Deferred,o.push(p),y(p,c.parent,c.pathSegList));return e.when.apply(e,o).promise()},reactivate:function(e){var t,n=this.activeNode;return n?(this.activeNode=null,t=n.setActive(!0,{noFocus:!0}),e&&n.setFocus(),t):T()},reload:function(e){return this._callHook("treeClear",this),this._callHook("treeLoad",this,e)},render:function(e,t){return this.rootNode.render(e,t)},selectAll:function(e){this.visit(function(t){t.setSelected(e)})},setFocus:function(e){return this._callHook("treeSetFocus",this,e)},setOption:function(e,t){return this.widget.option(e,t)},debugTime:function(e){this.options.debugLevel>=4&&window.console.time(this+" - "+e)},debugTimeEnd:function(e){this.options.debugLevel>=4&&window.console.timeEnd(this+" - "+e)},toDict:function(e,t){var n=this.rootNode.toDict(!0,t);return e?n:n.children},toString:function(){return"Fancytree@"+this._id},_triggerNodeEvent:function(e,t,n,i){var r=this._makeHookContext(t,n,i),o=this.widget._trigger(e,n,r);return!1!==o&&void 0!==r.result?r.result:o},_triggerTreeEvent:function(e,t,n){var i=this._makeHookContext(this,t,n),r=this.widget._trigger(e,t,i);return!1!==r&&void 0!==i.result?i.result:r},visit:function(e){return this.rootNode.visit(e,!1)},visitRows:function(e,t){if(!this.rootNode.hasChildren())return!1;if(t&&t.reverse)return delete t.reverse,this._visitRowsUp(e,t);var n,i,r,o,s=0,a=!1===(t=t||{}).includeSelf,l=!!t.includeHidden,d=!l&&this.enableFilter,c=t.start||this.rootNode.children[0];for(r=c.parent;r;){for(x((i=(o=r.children).indexOf(c)+s)>=0,"Could not find "+c+" in parent's children: "+r),n=i;n<o.length;n++)if(c=o[n],!d||c.match||c.subMatchCount){if(!a&&!1===e(c))return!1;if(a=!1,c.children&&c.children.length&&(l||c.expanded)&&!1===c.visit(function(t){return!d||t.match||t.subMatchCount?!1!==e(t)&&(l||!t.children||t.expanded?void 0:"skip"):"skip"},!1))return!1}c=r,r=r.parent,s=1}return!0},_visitRowsUp:function(e,t){for(var n,i,r,o=!!t.includeHidden,s=t.start||this.rootNode.children[0];;){if((n=(r=s.parent).children)[0]===s){if(!(s=r).parent)break;n=r.children}else for(i=n.indexOf(s),s=n[i-1];(o||s.expanded)&&s.children&&s.children.length;)r=s,s=(n=s.children)[n.length-1];if((o||s.isVisible())&&!1===e(s))return!1}},warn:function(e){this.options.debugLevel>=2&&(Array.prototype.unshift.call(arguments,this.toString()),C("warn",arguments))}},e.extend(F.prototype,{nodeClick:function(e){var t,n,i=e.targetType,r=e.node;if("expander"===i){if(r.isLoading())return void r.debug("Got 2nd click while loading: ignored");this._callHook("nodeToggleExpanded",e)}else if("checkbox"===i)this._callHook("nodeToggleSelected",e),e.options.focusOnSelect&&this._callHook("nodeSetFocus",e,!0);else{if(n=!1,t=!0,r.folder)switch(e.options.clickFolderMode){case 2:n=!0,t=!1;break;case 3:t=!0,n=!0}t&&(this.nodeSetFocus(e),this._callHook("nodeSetActive",e,!0)),n&&this._callHook("nodeToggleExpanded",e)}},nodeCollapseSiblings:function(e,t){var n,i,r,o=e.node;if(o.parent)for(i=0,r=(n=o.parent.children).length;i<r;i++)n[i]!==o&&n[i].expanded&&this._callHook("nodeSetExpanded",n[i],!1,t)},nodeDblclick:function(e){"title"===e.targetType&&4===e.options.clickFolderMode&&this._callHook("nodeToggleExpanded",e),"title"===e.targetType&&e.originalEvent.preventDefault()},nodeKeydown:function(t){var n,r,o,s=t.originalEvent,a=t.node,l=t.tree,u=t.options,h=s.which,f=s.key||String.fromCharCode(h),p=!!(s.altKey||s.ctrlKey||s.metaKey),g=!c[h]&&!d[h]&&!p,v=e(s.target),y=!0,m=!(s.ctrlKey||!u.autoActivate);if(a||(o=this.getActiveNode()||this.getFirstChild())&&(o.setFocus(),(a=t.node=this.focusNode).debug("Keydown force focus on active node")),u.quicksearch&&g&&!v.is(":input:enabled"))return(r=Date.now())-l.lastQuicksearchTime>500&&(l.lastQuicksearchTerm=""),l.lastQuicksearchTime=r,l.lastQuicksearchTerm+=f,(n=l.findNextNode(l.lastQuicksearchTerm,l.getActiveNode()))&&n.setActive(),void s.preventDefault();switch(i.eventToString(s)){case"+":case"=":l.nodeSetExpanded(t,!0);break;case"-":l.nodeSetExpanded(t,!1);break;case"space":a.isPagingNode()?l._triggerNodeEvent("clickPaging",t,s):i.evalOption("checkbox",a,a,u,!1)?l.nodeToggleSelected(t):l.nodeSetActive(t,!0);break;case"return":l.nodeSetActive(t,!0);break;case"home":case"end":case"backspace":case"left":case"right":case"up":case"down":a.navigate(s.which,m);break;default:y=!1}y&&s.preventDefault()},nodeLoadChildren:function(t,n){var i,r,o,s=null,a=!0,l=t.tree,d=t.node,c=d.parent,u="nodeLoadChildren",h=Date.now();return N(n)&&x(!N(n=n.call(l,{type:"source"},t)),"source callback must not return another function"),N(n.then)?s=n:n.url?(i=e.extend({},t.options.ajax,n)).debugDelay?(r=i.debugDelay,delete i.debugDelay,b(r)&&(r=r[0]+Math.random()*(r[1]-r[0])),d.warn("nodeLoadChildren waiting debugDelay "+Math.round(r)+" ms ..."),s=e.Deferred(function(t){setTimeout(function(){e.ajax(i).done(function(){t.resolveWith(this,arguments)}).fail(function(){t.rejectWith(this,arguments)})},r)})):s=e.ajax(i):e.isPlainObject(n)||b(n)?(s={then:function(e,t){e(n,null,null)}},a=!1):e.error("Invalid source type: "+n),d._requestId&&(d.warn("Recursive load request #"+h+" while #"+d._requestId+" is pending."),d._requestId=h),a&&(l.debugTime(u),l.nodeSetStatus(t,"loading")),o=new e.Deferred,s.then(function(i,r,s){var a,u;if("json"!==n.dataType&&"jsonp"!==n.dataType||"string"!=typeof i||e.error("Ajax request returned a string (did you get the JSON dataType wrong?)."),d._requestId&&d._requestId>h)o.rejectWith(this,["$recursive_request"]);else if(null!==d.parent||null===c){if(t.options.postProcess){try{(u=l._triggerNodeEvent("postProcess",t,t.originalEvent,{response:i,error:null,dataType:n.dataType})).error&&l.warn("postProcess returned error:",u)}catch(f){u={error:f,message:""+f,details:"postProcess failed"}}if(u.error)return a=e.isPlainObject(u.error)?u.error:{message:u.error},a=l._makeHookContext(d,null,a),void o.rejectWith(this,[a]);(b(u)||e.isPlainObject(u)&&b(u.children))&&(i=u)}else i&&k(i,"d")&&t.options.enableAspx&&(42===t.options.enableAspx&&l.warn("The default for enableAspx will change to `false` in the fututure. Pass `enableAspx: true` or implement postProcess to silence this warning."),i="string"==typeof i.d?e.parseJSON(i.d):i.d);o.resolveWith(this,[i])}else o.rejectWith(this,["$request_target_invalid"])},function(e,t,n){var i=l._makeHookContext(d,null,{error:e,args:Array.prototype.slice.call(arguments),message:n,details:e.status+": "+n});o.rejectWith(this,[i])}),o.done(function(n){var i,r,o;l.nodeSetStatus(t,"ok"),e.isPlainObject(n)?(x(d.isRootNode(),"source may only be an object for root nodes (expecting an array of child objects otherwise)"),x(b(n.children),"if an object is passed as source, it must contain a 'children' array (all other properties are added to 'tree.data')"),r=n,i=n.children,delete r.children,e.each(p,function(e,t){void 0!==r[t]&&(l[t]=r[t],delete r[t])}),e.extend(l.data,r)):i=n,x(b(i),"expected array of children"),d._setChildren(i),l.options.nodata&&0===i.length&&(N(l.options.nodata)?o=l.options.nodata.call(l,{type:"nodata"},t):!0===l.options.nodata&&d.isRootNode()?o=l.options.strings.noData:"string"==typeof l.options.nodata&&d.isRootNode()&&(o=l.options.nodata),o&&d.setStatus("nodata",o)),l._triggerNodeEvent("loadChildren",d)}).fail(function(e){var n;"$recursive_request"!==e?"$request_target_invalid"!==e?(e.node&&e.error&&e.message?n=e:"[object Object]"===(n=l._makeHookContext(d,null,{error:e,args:Array.prototype.slice.call(arguments),message:e?e.message||e.toString():""})).message&&(n.message=""),d.warn("Load children failed ("+n.message+")",n),!1!==l._triggerNodeEvent("loadError",n,null)&&l.nodeSetStatus(t,"error",n.message,n.details)):d.warn("Lazy parent node was removed while loading: discarding response."):d.warn("Ignored response for obsolete load request #"+h+" (expected #"+d._requestId+")")}).always(function(){d._requestId=null,a&&l.debugTimeEnd(u)}),o.promise()},nodeLoadKeyPath:function(e,t){},nodeRemoveChild:function(t,n){var i,r=t.node,o=e.extend({},t,{node:n}),s=r.children;if(1===s.length)return x(n===s[0],"invalid single child"),this.nodeRemoveChildren(t);this.activeNode&&(n===this.activeNode||this.activeNode.isDescendantOf(n))&&this.activeNode.setActive(!1),this.focusNode&&(n===this.focusNode||this.focusNode.isDescendantOf(n))&&(this.focusNode=null),this.nodeRemoveMarkup(o),this.nodeRemoveChildren(o),x((i=e.inArray(n,s))>=0,"invalid child"),r.triggerModifyChild("remove",n),n.visit(function(e){e.parent=null},!0),this._callHook("treeRegisterNode",this,!1,n),s.splice(i,1)},nodeRemoveChildMarkup:function(t){var n=t.node;n.ul&&(n.isRootNode()?e(n.ul).empty():(e(n.ul).remove(),n.ul=null),n.visit(function(e){e.li=e.ul=null}))},nodeRemoveChildren:function(e){var t=e.tree,n=e.node;n.children&&(this.activeNode&&this.activeNode.isDescendantOf(n)&&this.activeNode.setActive(!1),this.focusNode&&this.focusNode.isDescendantOf(n)&&(this.focusNode=null),this.nodeRemoveChildMarkup(e),n.triggerModifyChild("remove",null),n.visit(function(e){e.parent=null,t._callHook("treeRegisterNode",t,!1,e)}),n.lazy?n.children=[]:n.children=null,n.isRootNode()||(n.expanded=!1),this.nodeRenderStatus(e))},nodeRemoveMarkup:function(t){var n=t.node;n.li&&(e(n.li).remove(),n.li=null),this.nodeRemoveChildMarkup(t)},nodeRender:function(t,n,i,r,o){var s,a,l,d,c,u,h,f=t.node,p=t.tree,g=t.options,v=g.aria,y=!1,m=f.parent,b=!m,k=f.children,N=null;if(!1!==p._enableUpdate&&(b||m.ul)){if(x(b||m.ul,"parent UL must exist"),b||(f.li&&(n||f.li.parentNode!==f.parent.ul)&&(f.li.parentNode===f.parent.ul?N=f.li.nextSibling:this.debug("Unlinking "+f+" (must be child of "+f.parent+")"),this.nodeRemoveMarkup(t)),f.li?this.nodeRenderStatus(t):(y=!0,f.li=document.createElement("li"),f.li.ftnode=f,f.key&&g.generateIds&&(f.li.id=g.idPrefix+f.key),f.span=document.createElement("span"),f.span.className="fancytree-node",v&&!f.tr&&e(f.li).attr("role","treeitem"),f.li.appendChild(f.span),this.nodeRenderTitle(t),g.createNode&&g.createNode.call(p,{type:"createNode"},t)),g.renderNode&&g.renderNode.call(p,{type:"renderNode"},t)),k){if(b||f.expanded||!0===i){for(f.ul||(f.ul=document.createElement("ul"),(!0!==r||o)&&f.expanded||(f.ul.style.display="none"),v&&e(f.ul).attr("role","group"),f.li?f.li.appendChild(f.ul):f.tree.$div.append(f.ul)),d=0,c=k.length;d<c;d++)h=e.extend({},t,{node:k[d]}),this.nodeRender(h,n,i,!1,!0);for(s=f.ul.firstChild;s;)(l=s.ftnode)&&l.parent!==f?(f.debug("_fixParent: remove missing "+l,s),u=s.nextSibling,s.parentNode.removeChild(s),s=u):s=s.nextSibling;for(s=f.ul.firstChild,d=0,c=k.length-1;d<c;d++)(a=k[d])===(l=s.ftnode)?s=s.nextSibling:f.ul.insertBefore(a.li,l.li)}}else f.ul&&(this.warn("remove child markup for "+f),this.nodeRemoveChildMarkup(t));b||y&&m.ul.insertBefore(f.li,N)}},nodeRenderTitle:function(t,n){var o,s,a,l,d,c,u,h=t.node,f=t.tree,p=t.options,g=p.aria,v=h.getLevel(),y=[];void 0!==n&&(h.title=n),h.span&&!1!==f._enableUpdate&&(d=g&&!1!==h.hasChildren()?" role='button'":"",v<p.minExpandLevel?(h.lazy||(h.expanded=!0),v>1&&y.push("<span "+d+" class='fancytree-expander fancytree-expander-fixed'></span>")):y.push("<span "+d+" class='fancytree-expander'></span>"),(o=i.evalOption("checkbox",h,h,p,!1))&&!h.isStatusNode()&&(d=g?" role='checkbox'":"",s="fancytree-checkbox",("radio"===o||h.parent&&h.parent.radiogroup)&&(s+=" fancytree-radio"),y.push("<span "+d+" class='"+s+"'></span>")),void 0!==h.data.iconClass&&(h.icon?e.error("'iconClass' node option is deprecated since v2.14.0: use 'icon' only instead"):(h.warn("'iconClass' node option is deprecated since v2.14.0: use 'icon' instead"),h.icon=h.data.iconClass)),!1!==(a=i.evalOption("icon",h,h,p,!0))&&(d=g?" role='presentation'":"",u=(u=i.evalOption("iconTooltip",h,h,p,null))?" title='"+P(u)+"'":"","string"==typeof a?r.test(a)?(a="/"===a.charAt(0)?a:(p.imagePath||"")+a,y.push("<img src='"+a+"' class='fancytree-icon'"+u+" alt='' />")):y.push("<span "+d+" class='fancytree-custom-icon "+a+"'"+u+"></span>"):a.text?y.push("<span "+d+" class='fancytree-custom-icon "+(a.addClass||"")+"'"+u+">"+i.escapeHtml(a.text)+"</span>"):a.html?y.push("<span "+d+" class='fancytree-custom-icon "+(a.addClass||"")+"'"+u+">"+a.html+"</span>"):y.push("<span "+d+" class='fancytree-icon'"+u+"></span>")),l="",p.renderTitle&&(l=p.renderTitle.call(f,{type:"renderTitle"}
64,t)||""),l||(!0===(c=i.evalOption("tooltip",h,h,p,null))&&(c=h.title),l="<span class='fancytree-title'"+(c=c?" title='"+P(c)+"'":"")+(p.titlesTabbable?" tabindex='0'":"")+">"+(p.escapeTitles?i.escapeHtml(h.title):h.title)+"</span>"),y.push(l),h.span.innerHTML=y.join(""),this.nodeRenderStatus(t),p.enhanceTitle&&(t.$title=e(">span.fancytree-title",h.span),l=p.enhanceTitle.call(f,{type:"enhanceTitle"},t)||""))},nodeRenderStatus:function(t){var n,r=t.node,o=t.tree,s=t.options,a=r.hasChildren(),l=r.isLastSibling(),d=s.aria,c=s._classNames,u=[],h=r[o.statusClassPropName];h&&!1!==o._enableUpdate&&(d&&(n=e(r.tr||r.li)),u.push(c.node),o.activeNode===r&&u.push(c.active),o.focusNode===r&&u.push(c.focused),r.expanded&&u.push(c.expanded),d&&(!1===a?n.removeAttr("aria-expanded"):n.attr("aria-expanded",Boolean(r.expanded))),r.folder&&u.push(c.folder),!1!==a&&u.push(c.hasChildren),l&&u.push(c.lastsib),r.lazy&&null==r.children&&u.push(c.lazy),r.partload&&u.push(c.partload),r.partsel&&u.push(c.partsel),i.evalOption("unselectable",r,r,s,!1)&&u.push(c.unselectable),r._isLoading&&u.push(c.loading),r._error&&u.push(c.error),r.statusNodeType&&u.push(c.statusNodePrefix+r.statusNodeType),r.selected?(u.push(c.selected),d&&n.attr("aria-selected",!0)):d&&n.attr("aria-selected",!1),r.extraClasses&&u.push(r.extraClasses),!1===a?u.push(c.combinedExpanderPrefix+"n"+(l?"l":"")):u.push(c.combinedExpanderPrefix+(r.expanded?"e":"c")+(r.lazy&&null==r.children?"d":"")+(l?"l":"")),u.push(c.combinedIconPrefix+(r.expanded?"e":"c")+(r.folder?"f":"")),h.className=u.join(" "),r.li&&e(r.li).toggleClass(c.lastsib,l))},nodeSetActive:function(t,n,i){i=i||{};var r,o=t.node,s=t.tree,a=t.options,l=!0===i.noEvents,d=!0===i.noFocus,c=!1!==i.scrollIntoView;return o===s.activeNode===(n=!1!==n)?T(o):(c&&t.originalEvent&&e(t.originalEvent.target).is("a,:checkbox")&&(o.info("Not scrolling while clicking an embedded link."),c=!1),n&&!l&&!1===this._triggerNodeEvent("beforeActivate",o,t.originalEvent)?L(o,["rejected"]):(n?(s.activeNode&&(x(s.activeNode!==o,"node was active (inconsistency)"),r=e.extend({},t,{node:s.activeNode}),s.nodeSetActive(r,!1),x(null===s.activeNode,"deactivate was out of sync?")),a.activeVisible&&o.makeVisible({scrollIntoView:c}),s.activeNode=o,s.nodeRenderStatus(t),d||s.nodeSetFocus(t),l||s._triggerNodeEvent("activate",o,t.originalEvent)):(x(s.activeNode===o,"node was not active (inconsistency)"),s.activeNode=null,this.nodeRenderStatus(t),l||t.tree._triggerNodeEvent("deactivate",o,t.originalEvent)),T(o)))},nodeSetExpanded:function(t,n,i){i=i||{};var r,o,s,a,l,d,c=t.node,u=t.tree,h=t.options,f=!0===i.noAnimation,p=!0===i.noEvents;if(n=!1!==n,e(c.li).hasClass(h._classNames.animating))return c.warn("setExpanded("+n+") while animating: ignored."),L(c,["recursion"]);if(c.expanded&&n||!c.expanded&&!n)return T(c);if(n&&!c.lazy&&!c.hasChildren())return T(c);if(!n&&c.getLevel()<h.minExpandLevel)return L(c,["locked"]);if(!p&&!1===this._triggerNodeEvent("beforeExpand",c,t.originalEvent))return L(c,["rejected"]);if(f||c.isVisible()||(f=i.noAnimation=!0),o=new e.Deferred,n&&!c.expanded&&h.autoCollapse){l=c.getParentList(!1,!0),d=h.autoCollapse;try{for(h.autoCollapse=!1,s=0,a=l.length;s<a;s++)this._callHook("nodeCollapseSiblings",l[s],i)}finally{h.autoCollapse=d}}return o.done(function(){var e=c.getLastChild();n&&h.autoScroll&&!f&&e&&u._enableUpdate?e.scrollIntoView(!0,{topNode:c}).always(function(){p||t.tree._triggerNodeEvent(n?"expand":"collapse",t)}):p||t.tree._triggerNodeEvent(n?"expand":"collapse",t)}),r=function(i){var r=h._classNames,o=h.toggleEffect;if(c.expanded=n,u._callHook("treeStructureChanged",t,n?"expand":"collapse"),u._callHook("nodeRender",t,!1,!1,!0),c.ul)if("none"!==c.ul.style.display===!!c.expanded)c.warn("nodeSetExpanded: UL.style.display already set");else{if(o&&!f)return e(c.li).addClass(r.animating),void(N(e(c.ul)[o.effect])?e(c.ul)[o.effect]({duration:o.duration,always:function(){e(this).removeClass(r.animating),e(c.li).removeClass(r.animating),i()}}):(e(c.ul).stop(!0,!0),e(c.ul).parent().find(".ui-effects-placeholder").remove(),e(c.ul).toggle(o.effect,o.options,o.duration,function(){e(this).removeClass(r.animating),e(c.li).removeClass(r.animating),i()})));
vendor: 6,154 bytes, line 64
64c.ul.style.display=c.expanded||!parent?"":"none"}i()},n&&c.lazy&&void 0===c.hasChildren()?c.load().done(function(){o.notifyWith&&o.notifyWith(c,["loaded"]),r(function(){o.resolveWith(c)})}).fail(function(e){r(function(){o.rejectWith(c,["load failed ("+e+")"])})}):r(function(){o.resolveWith(c)}),o.promise()},nodeSetFocus:function(t,n){var i,r=t.tree,o=t.node,s=r.options,a=!!t.originalEvent&&e(t.originalEvent.target).is(":input");if(n=!1!==n,r.focusNode){if(r.focusNode===o&&n)return;i=e.extend({},t,{node:r.focusNode}),r.focusNode=null,this._triggerNodeEvent("blur",i),this._callHook("nodeRenderStatus",i)}n&&(this.hasFocus()||(o.debug("nodeSetFocus: forcing container focus"),this._callHook("treeSetFocus",t,!0,{calledByNode:!0})),o.makeVisible({scrollIntoView:!1}),r.focusNode=o,s.titlesTabbable&&(a||e(o.span).find(".fancytree-title").focus()),s.aria&&e(r.$container).attr("aria-activedescendant",e(o.tr||o.li).uniqueId().attr("id")),this._triggerNodeEvent("focus",t),document.activeElement===r.$container.get(0)||e(document.activeElement,r.$container).length>=1||e(r.$container).focus(),s.autoScroll&&o.scrollIntoView(),this._callHook("nodeRenderStatus",t))},nodeSetSelected:function(e,t,n){n=n||{};var r=e.node,o=e.tree,s=e.options,a=!0===n.noEvents,l=r.parent;if(t=!1!==t,!i.evalOption("unselectable",r,r,s,!1)){if(r._lastSelectIntent=t,!!r.selected===t&&(3!==s.selectMode||!r.partsel||t))return t;if(!a&&!1===this._triggerNodeEvent("beforeSelect",r,e.originalEvent))return!!r.selected;t&&1===s.selectMode?(o.lastSelectedNode&&o.lastSelectedNode.setSelected(!1),r.selected=t):3!==s.selectMode||!l||l.radiogroup||r.radiogroup?l&&l.radiogroup?r.visitSiblings(function(e){e._changeSelectStatusAttrs(t&&e===r)},!0):r.selected=t:(r.selected=t,r.fixSelection3AfterClick(n)),this.nodeRenderStatus(e),o.lastSelectedNode=t?r:null,a||o._triggerNodeEvent("select",e)}},nodeSetStatus:function(t,n,i,r){var o=t.node,s=t.tree;function a(n,i){var r=o.children?o.children[0]:null;return r&&r.isStatusNode()?(e.extend(r,n),r.statusNodeType=i,s._callHook("nodeRenderTitle",r)):(o._setChildren([n]),s._callHook("treeStructureChanged",t,"setStatusNode"),o.children[0].statusNodeType=i,s.render()),o.children[0]}switch(n){case"ok":!function(){var e=o.children?o.children[0]:null;if(e&&e.isStatusNode()){try{o.ul&&(o.ul.removeChild(e.li),e.li=null)}catch(n){}1===o.children.length?o.children=[]:o.children.shift(),s._callHook("treeStructureChanged",t,"clearStatusNode")}}(),o._isLoading=!1,o._error=null,o.renderStatus();break;case"loading":o.parent||a({title:s.options.strings.loading+(i?" ("+i+")":""),checkbox:!1,tooltip:r},n),o._isLoading=!0,o._error=null,o.renderStatus();break;case"error":a({title:s.options.strings.loadError+(i?" ("+i+")":""),checkbox:!1,tooltip:r},n),o._isLoading=!1,o._error={message:i,details:r},o.renderStatus();break;case"nodata":a({title:i||s.options.strings.noData,checkbox:!1,tooltip:r},n),o._isLoading=!1,o._error=null,o.renderStatus();break;default:e.error("invalid node status "+n)}},nodeToggleExpanded:function(e){return this.nodeSetExpanded(e,!e.node.expanded)},nodeToggleSelected:function(e){var t=e.node,n=!t.selected;return t.partsel&&!t.selected&&!0===t._lastSelectIntent&&(n=!1,t.selected=!0),t._lastSelectIntent=n,this.nodeSetSelected(e,n)},treeClear:function(e){var t=e.tree;t.activeNode=null,t.focusNode=null,t.$div.find(">ul.fancytree-container").empty(),t.rootNode.children=null,t._callHook("treeStructureChanged",e,"clear")},treeCreate:function(e){},treeDestroy:function(e){this.$div.find(">ul.fancytree-container").remove(),this.$source&&this.$source.removeClass("fancytree-helper-hidden")},treeInit:function(t){var n=t.tree,i=n.options;n.$container.attr("tabindex",i.tabindex),e.each(p,function(e,t){void 0!==i[t]&&(n.info("Move option "+t+" to tree"),n[t]=i[t],delete i[t])}),i.checkboxAutoHide&&n.$container.addClass("fancytree-checkbox-auto-hide"),i.rtl?n.$container.attr("DIR","RTL").addClass("fancytree-rtl"):n.$container.removeAttr("DIR").removeClass("fancytree-rtl"),i.aria&&(n.$container.attr("role","tree"),1!==i.selectMode&&n.$container.attr("aria-multiselectable",!0)),this.treeLoad(t)},treeLoad:function(t,n){var r,o,s,a=t.tree,l=t.widget.element,d=e.extend({},t,{node:this.rootNode});if(a.rootNode.children&&this.treeClear(t),n=n||this.options.source)"string"==typeof n&&e.error("Not implemented");else switch(o=l.data("type")||"html"){case"html":(s=l.find(">ul").not(".fancytree-container").first()).length?(s.addClass("ui-fancytree-source fancytree-helper-hidden"),n=e.ui.fancytree.parseHtml(s),this.data=e.extend(this.data,H(s))):(i.warn("No `source` option was passed and container does not contain `<ul>`: assuming `source: []`."),n=[]);break;case"json":n=e.parseJSON(l.text()),l.contents().filter(function(){return 3===this.nodeType}).remove(),e.isPlainObject(n)&&(x(b(n.children),"if an object is passed as source, it must contain a 'children' array (all other properties are added to 'tree.data')"),r=n,n=n.children,delete r.children,e.each(p,function(e,t){void 0!==r[t]&&(a[t]=r[t],delete r[t])}),e.extend(a.data,r));break;default:e.error("Invalid data-type: "+o)}return a._triggerTreeEvent("preInit",null),this.nodeLoadChildren(d,n).done(function(){a._callHook("treeStructureChanged",t,"loadChildren"),a.render(),3===t.options.selectMode&&a.rootNode.fixSelection3FromEndNodes(),a.activeNode&&a.options.activeVisible&&a.activeNode.makeVisible(),a._triggerTreeEvent("init",null,{status:!0})}).fail(function(){a.render(),a._triggerTreeEvent("init",null,{status:!1})})},treeRegisterNode:function(e,t,n){e.tree._callHook("treeStructureChanged",e,t?"addNode":"removeNode")},treeSetFocus:function(t,n,i){var r;(n=!1!==n)!==this.hasFocus()&&(this._hasFocus=n,!n&&this.focusNode?this.focusNode.setFocus(!1):!n||i&&i.calledByNode||e(this.$container).focus(),this.$container.toggleClass("fancytree-treefocus",n),this._triggerTreeEvent(n?"focusTree":"blurTree"),n&&!this.activeNode&&(r=this._lastMousedownNode||this.getFirstChild())&&r.setFocus())},treeSetOption:function(t,n,i){var r=t.tree,o=!0,s=!1,a=!1;switch(n){case"aria":case"checkbox":case"icon":case"minExpandLevel":case"tabindex":s=!0,a=!0;break;
vendor: 4,870 bytes, line 64
64case"checkboxAutoHide":r.$container.toggleClass("fancytree-checkbox-auto-hide",!!i);break;case"escapeTitles":case"tooltip":a=!0;break;case"rtl":!1===i?r.$container.removeAttr("DIR").removeClass("fancytree-rtl"):r.$container.attr("DIR","RTL").addClass("fancytree-rtl"),a=!0;break;case"source":o=!1,r._callHook("treeLoad",r,i),a=!0}r.debug("set option "+n+"="+i+" <"+typeof i+">"),o&&(this.widget._super?this.widget._super.call(this.widget,n,i):e.Widget.prototype._setOption.call(this.widget,n,i)),s&&r._callHook("treeCreate",r),a&&r.render(!0,!1)},treeStructureChanged:function(e,t){}}),e.widget("ui.fancytree",{options:{activeVisible:!0,ajax:{type:"GET",cache:!1,dataType:"json"},aria:!0,autoActivate:!0,autoCollapse:!1,autoScroll:!1,checkbox:!1,clickFolderMode:4,copyFunctionsToData:!1,debugLevel:null,disabled:!1,enableAspx:42,escapeTitles:!1,extensions:[],focusOnSelect:!1,generateIds:!1,icon:!0,idPrefix:"ft_",keyboard:!0,keyPathSeparator:"/",minExpandLevel:1,nodata:!0,quicksearch:!1,rtl:!1,scrollOfs:{top:0,bottom:0},scrollParent:null,selectMode:2,strings:{loading:"Loading...",loadError:"Load error!",moreData:"More...",noData:"No data."},tabindex:"0",titlesTabbable:!1,toggleEffect:{effect:"slideToggle",duration:200},tooltip:!1,treeId:null,_classNames:{active:"fancytree-active",animating:"fancytree-animating",combinedExpanderPrefix:"fancytree-exp-",combinedIconPrefix:"fancytree-ico-",error:"fancytree-error",expanded:"fancytree-expanded",focused:"fancytree-focused",folder:"fancytree-folder",hasChildren:"fancytree-has-children",lastsib:"fancytree-lastsib",lazy:"fancytree-lazy",loading:"fancytree-loading",node:"fancytree-node",partload:"fancytree-partload",partsel:"fancytree-partsel",radio:"fancytree-radio",selected:"fancytree-selected",statusNodePrefix:"fancytree-statusnode-",unselectable:"fancytree-unselectable"},lazyLoad:null,postProcess:null},_deprecationWarning:function(e){var t=this.tree;t&&t.options.debugLevel>=3&&t.warn("$().fancytree('"+e+"') is deprecated (see https://wwwendt.de/tech/fancytree/doc/jsdoc/Fancytree_Widget.html")},_create:function(){this.tree=new F(this),this.$source=this.source||"json"===this.element.data("type")?this.element:this.element.find(">ul").first();var t,n,i,r=this.options,o=r.extensions;this.tree;for(i=0;i<o.length;i++)n=o[i],(t=e.ui.fancytree._extensions[n])||e.error("Could not apply extension '"+n+"' (it is not registered, did you forget to include it?)"),this.tree.options[n]=w({},t.options,this.tree.options[n]),x(void 0===this.tree.ext[n],"Extension name must not exist as Fancytree.ext attribute: '"+n+"'"),this.tree.ext[n]={},E(this.tree,0,t,n),t;void 0!==r.icons&&(!0===r.icon?(this.tree.warn("'icons' tree option is deprecated since v2.14.0: use 'icon' instead"),r.icon=r.icons):e.error("'icons' tree option is deprecated since v2.14.0: use 'icon' only instead")),void 0!==r.iconClass&&(r.icon?e.error("'iconClass' tree option is deprecated since v2.14.0: use 'icon' only instead"):(this.tree.warn("'iconClass' tree option is deprecated since v2.14.0: use 'icon' instead"),r.icon=r.iconClass)),void 0!==r.tabbable&&(r.tabindex=r.tabbable?"0":"-1",this.tree.warn("'tabbable' tree option is deprecated since v2.17.0: use 'tabindex='"+r.tabindex+"' instead")),this.tree._callHook("treeCreate",this.tree)},_init:function(){this.tree._callHook("treeInit",this.tree),this._bind()},_setOption:function(e,t){return this.tree._callHook("treeSetOption",this.tree,e,t)},_destroy:function(){this._unbind(),this.tree._callHook("treeDestroy",this.tree)},_unbind:function(){var t=this.tree._ns;this.element.off(t),this.tree.$container.off(t),e(document).off(t)},_bind:function(){var t=this,n=this.options,r=this.tree,o=r._ns;this._unbind(),r.$container.on("focusin"+o+" focusout"+o,function(t){var n=i.getNode(t),o="focusin"===t.type;if(!o&&n&&e(t.target).is("a"))n.debug("Ignored focusout on embedded <a> element.");else{if(o){if(r._getExpiringValue("focusin"))return void r.debug("Ignored double focusin.");r._setExpiringValue("focusin",!0,50),n||(n=r._getExpiringValue("mouseDownNode"))&&r.debug("Reconstruct mouse target for focusin from recent event.")}n?r._callHook("nodeSetFocus",r._makeHookContext(n,t),o):r.tbody&&e(t.target).parents("table.fancytree-container > thead").length?r.debug("Ignore focus event outside table body.",t):r._callHook("treeSetFocus",r,o)}}).on("selectstart"+o,"span.fancytree-title",function(e){e.preventDefault()}).on("keydown"+o,function(e){if(n.disabled||!1===n.keyboard)return!0;var t,i=r.focusNode,o=r._makeHookContext(i||r,e),s=r.phase;try{return r.phase="userEvent","preventNav"===(t=i?r._triggerNodeEvent("keydown",i,e):r._triggerTreeEvent("keydown",e))?t=!0:!1!==t&&(t=r._callHook("nodeKeydown",o)),t}finally{r.phase=s}}).on("mousedown"+o,function(e){var t=i.getEventTarget(e);r._lastMousedownNode=t?t.node:null,r._setExpiringValue("mouseDownNode",r._lastMousedownNode)}
64).on("click"+o+" dblclick"+o,function(e){if(n.disabled)return!0;var r,o=i.getEventTarget(e),s=o.node,a=t.tree,l=a.phase;if(!s)return!0;r=a._makeHookContext(s,e);try{switch(a.phase="userEvent",e.type){case"click":return r.targetType=o.type,s.isPagingNode()?!0===a._triggerNodeEvent("clickPaging",r,e):!1!==a._triggerNodeEvent("click",r,e)&&a._callHook("nodeClick",r);case"dblclick":return r.targetType=o.type,!1!==a._triggerNodeEvent("dblclick",r,e)&&a._callHook("nodeDblclick",r)}}finally{a.phase=l}})},getActiveNode:function(){return this._deprecationWarning("getActiveNode"),this.tree.activeNode},getNodeByKey:function(e){return this._deprecationWarning("getNodeByKey"),this.tree.getNodeByKey(e)},getRootNode:function(){return this._deprecationWarning("getRootNode"),this.tree.rootNode},getTree:function(){return this._deprecationWarning("getTree"),this.tree}}),i=e.ui.fancytree,e.extend(e.ui.fancytree,{version:"2.38.3",buildType:"production",debugLevel:3,_nextId:1,_nextNodeKey:1,_extensions:{},_FancytreeClass:F,_FancytreeNodeClass:I,jquerySupports:{positionMyOfs:function(t,n,i,r){var o,s,a,l=e.map(_(t).split("."),function(e){return parseInt(e,10)}),d=e.map(Array.prototype.slice.call(arguments,1),function(e){return parseInt(e,10)});for(o=0;o<d.length;o++)if((s=l[o]||0)!==(a=d[o]||0))return s>a;return!0}(e.ui.version,1,9)},assert:function(e,t){return x(e,t)},createTree:function(t,n){var r=e(t).fancytree(n);return i.getTree(r)},debounce:function(e,t,n,i){var r;return 3===arguments.length&&"boolean"!=typeof n&&(i=n,n=!1),function(){var o=arguments;i=i||this,n&&!r&&t.apply(i,o),clearTimeout(r),r=setTimeout(function(){n||t.apply(i,o),r=null},e)}},debug:function(t){e.ui.fancytree.debugLevel>=4&&C("log",arguments)},error:function(t){e.ui.fancytree.debugLevel>=1&&C("error",arguments)},escapeHtml:function(e){return(""+e).replace(o,function(e){return a[e]})},fixPositionOptions:function(t){if((t.offset||(""+t.my+t.at).indexOf("%")>=0)&&e.error("expected new position syntax (but '%' is not supported)"),!e.ui.fancytree.jquerySupports.positionMyOfs){var n=/(\w+)([+-]?\d+)?\s+(\w+)([+-]?\d+)?/.exec(t.my),i=/(\w+)([+-]?\d+)?\s+(\w+)([+-]?\d+)?/.exec(t.at),r=(n[2]?+n[2]:0)+(i[2]?+i[2]:0),o=(n[4]?+n[4]:0)+(i[4]?+i[4]:0);t=e.extend({},t,{my:n[1]+" "+n[3],at:i[1]+" "+i[3]}),(r||o)&&(t.offset=r+" "+o)}return t},getEventTarget:function(t){var n,r=t&&t.target?t.target.className:"",o={node:this.getNode(t.target),type:void 0};return/\bfancytree-title\b/.test(r)?o.type="title":/\bfancytree-expander\b/.test(r)?o.type=!1===o.node.hasChildren()?"prefix":"expander":/\bfancytree-checkbox\b/.test(r)?o.type="checkbox":/\bfancytree(-custom)?-icon\b/.test(r)?o.type="icon":/\bfancytree-node\b/.test(r)?o.type="title":t&&t.target&&((n=e(t.target)).is("ul[role=group]")?((o.node&&o.node.tree||i).debug("Ignoring click on outer UL."),o.node=null):n.closest(".fancytree-title").length?o.type="title":n.closest(".fancytree-checkbox").length?o.type="checkbox":n.closest(".fancytree-expander").length&&(o.type="expander")),o},getEventTargetType:function(e){return this.getEventTarget(e).type},getNode:function(t){if(t instanceof I)return t;for(t instanceof e?t=t[0]:void 0!==t.originalEvent&&(t=t.target);t;){if(t.ftnode)return t.ftnode;t=t.parentNode}return null},getTree:function(t){var n,i=t;return t instanceof F?t:(void 0===t&&(t=0),"number"==typeof t?t=e(".fancytree-container").eq(t):"string"==typeof t?(t=e("#ft-id-"+i).eq(0)).length||(t=e(i).eq(0)):t instanceof Element||t instanceof HTMLDocument?t=e(t):t instanceof e?t=t.eq(0):void 0!==t.originalEvent&&(t=e(t.target)),(n=(t=t.closest(":ui-fancytree")).data("ui-fancytree")||t.data("fancytree"))?n.tree:null)},evalOption:function(e,t,n,i,r){var o,s,a=t.tree,l=i[e],d=n[e];return N(l)?(o={node:t,tree:a,widget:a.widget,options:a.widget.options,typeInfo:a.types[t.type]||{}},null==(s=l.call(a,{type:e},o))&&(s=d)):s=null==d?l:d,null==s&&(s=r),s},setSpanIcon:function(t,n,i){var r=e(t);"string"==typeof i?r.attr("class",n+" "+i):(i.text?r.text(""+i.text):i.html&&(t.innerHTML=i.html),r.attr("class",n+" "+(i.addClass||"")))},eventToString:function(e){var t=e.which,n=e.type,i=[];return e.altKey&&i.push("alt"),e.ctrlKey&&i.push("ctrl"),e.metaKey&&i.push("meta"),e.shiftKey&&i.push("shift"),"click"===n||"dblclick"===n?i.push(u[e.button]+n):"wheel"===n?i.push(n):l[t]||i.push(d[t]||String.fromCharCode(t).toLowerCase()),i.join("+")},info:function(t){e.ui.fancytree.debugLevel>=3&&C("info",arguments)},keyEventToString:function(e){return this.warn("keyEventToString() is deprecated: use eventToString()"),this.eventToString(e)},overrideMethod:function(t,n,i,r){var o,s=t[n]||e.noop;t[n]=function(){var e=r||this;try{return o=e._super,e._super=s,i.apply(e,arguments)}finally{e._super=o}}},parseHtml:function(t){var n,i,r,o,s,a,l,d,c=t.find(">li"),u=[];return c.each(function(){var c,p,v=e(this),m=v.find(">span",this).first(),b=m.length?null:v.find(">a").first(),x={tooltip:null,data:{}};for(m.length?x.title=m.html():b&&b.length?(x.title=b.html(),x.data.href=b.attr("href"),x.data.target=b.attr("target"),x.tooltip=b.attr("title")):(x.title=v.html(),(s=x.title.search(/<ul/i))>=0&&(x.title=x.title.substring(0,s))),x.title=_(x.title),o=0,a=h.length;o<a;o++)x[h[o]]=void 0;for(n=this.className.split(" "),r=[],o=0,a=n.length;o<a;o++)i=n[o],f[i]?x[i]=!0:r.push(i);
vendor: 6,552 bytes, lines 64-67
64if(x.extraClasses=r.join(" "),(l=v.attr("title"))&&(x.tooltip=l),(l=v.attr("id"))&&(x.key=l),v.attr("hideCheckbox")&&(x.checkbox=!1),(c=H(v))&&!e.isEmptyObject(c)){for(p in y)k(c,p)&&(c[y[p]]=c[p],delete c[p]);for(o=0,a=g.length;o<a;o++)l=g[o],null!=(d=c[l])&&(delete c[l],x[l]=d);e.extend(x.data,c)}(t=v.find(">ul").first()).length?x.children=e.ui.fancytree.parseHtml(t):x.children=x.lazy?void 0:null,u.push(x)}),u},registerExtension:function(t){x(null!=t.name,"extensions must have a `name` property."),x(null!=t.version,"extensions must have a `version` property."),e.ui.fancytree._extensions[t.name]=t},trim:_,unescapeHtml:function(e){var t=document.createElement("div");return t.innerHTML=e,0===t.childNodes.length?"":t.childNodes[0].nodeValue},warn:function(t){e.ui.fancytree.debugLevel>=2&&C("warn",arguments)}}),e.ui.fancytree}function x(t,n){t||(n="Fancytree assertion failed"+(n=n?": "+n:""),e.ui.fancytree.error(n),e.error(n))}function k(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function N(e){return"function"==typeof e}function _(e){return null==e?"":e.trim()}function C(e,t){var n,i,r=window.console?window.console[e]:null;if(r)try{r.apply(window.console,t)}catch(o){for(i="",n=0;n<t.length;n++)i+=t[n];r(i)}}function w(){var t,n,i,r,o,s=arguments[0]||{},a=1,l=arguments.length;if("object"==typeof s||N(s)||(s={}),a===l)throw Error("need at least two args");for(;a<l;a++)if(null!=(t=arguments[a]))for(n in t)if(k(t,n)){if(i=s[n],s===(r=t[n]))continue;r&&e.isPlainObject(r)?(o=i&&e.isPlainObject(i)?i:{},s[n]=w(o,r)):void 0!==r&&(s[n]=r)}return s}function S(e,t,n,i,r){var o,s,a,l,d;return o=t[e],s=i[e],a=t.ext[r],l=function(){return o.apply(t,arguments)},d=function(e){return o.apply(t,e)},function(){var e=t._local,n=t._super,i=t._superApply;try{return t._local=a,t._super=l,t._superApply=d,s.apply(t,arguments)}finally{t._local=e,t._super=n,t._superApply=i}}}function E(t,n,i,r){for(var o in i)"function"==typeof i[o]?"function"==typeof t[o]?t[o]=S(o,t,0,i,r):"_"===o.charAt(0)?t.ext[r][o]=S(o,t,0,i,r):e.error("Could not override tree."+o+". Use prefix '_' to create tree."+r+"._"+o):"options"!==o&&(t.ext[r][o]=i[o])}function T(t,n){return void 0===t?e.Deferred(function(){this.resolve()}).promise():e.Deferred(function(){this.resolveWith(t,n)}).promise()}function L(t,n){return void 0===t?e.Deferred(function(){this.reject()}).promise():e.Deferred(function(){this.rejectWith(t,n)}).promise()}function A(e,t){return function(){e.resolveWith(t)}}function H(t){var n=e.extend({},t.data()),i=n.json;return delete n.fancytree,delete n.uiFancytree,i&&(delete n.json,n=e.extend(n,i)),n}function P(e){return(""+e).replace(s,function(e){return a[e]})}function R(e){return e=e.toLowerCase(),function(t){return t.title.toLowerCase().indexOf(e)>=0}}function I(t,n){var r,o,s,a;for(this.parent=t,this.tree=t.tree,this.ul=null,this.li=null,this.statusNodeType=null,this._isLoading=!1,this._error=null,this.data={},r=0,o=g.length;r<o;r++)this[s=g[r]]=n[s];for(s in null==this.unselectableIgnore&&null==this.unselectableStatus||(this.unselectable=!0),n.hideCheckbox&&e.error("'hideCheckbox' node option was removed in v2.23.0: use 'checkbox: false'"),n.data&&e.extend(this.data,n.data),n)v[s]||!this.tree.options.copyFunctionsToData&&N(n[s])||m[s]||(this.data[s]=n[s]);null==this.key?this.tree.options.defaultKey?(this.key=""+this.tree.options.defaultKey(this),x(this.key,"defaultKey() must return a unique key")):this.key="_"+i._nextNodeKey++:this.key=""+this.key,n.active&&(x(null===this.tree.activeNode,"only one active node allowed"),this.tree.activeNode=this),n.selected&&(this.tree.lastSelectedNode=this),(a=n.children)?a.length?this._setChildren(a):this.children=this.lazy?[]:null:this.children=null,this.tree._callHook("treeRegisterNode",this.tree,!0,this)}function F(t){this.widget=t,this.$div=t.element,this.options=t.options,this.options&&(void 0!==this.options.lazyload&&e.error("The 'lazyload' event is deprecated since 2014-02-25. Use 'lazyLoad' (with uppercase L) instead."),void 0!==this.options.loaderror&&e.error("The 'loaderror' event was renamed since 2014-07-03. Use 'loadError' (with uppercase E) instead."),void 0!==this.options.fx&&e.error("The 'fx' option was replaced by 'toggleEffect' since 2014-11-30."),void 0!==this.options.removeNode&&e.error("The 'removeNode' event was replaced by 'modifyChild' since 2.20 (2016-09-10).")),this.ext={},this.types={},this.columns={},this.data=H(this.$div),this._id=""+(this.options.treeId||e.ui.fancytree._nextId++),this._ns=".fancytree-"+this._id,this.activeNode=null,this.focusNode=null,this._hasFocus=null,this._tempCache={},this._lastMousedownNode=null,this._enableUpdate=!0,this.lastSelectedNode=null,this.systemFocusElement=null,this.lastQuicksearchTerm="",this.lastQuicksearchTime=0,this.viewport=null,this.statusClassPropName="span",this.ariaPropName="li",this.nodeContainerAttrName="li",this.$div.find(">ul.fancytree-container").remove();var n,r={tree:this};this.rootNode=new I(r,{title:"root",key:"root_"+this._id,children:null,expanded:!0}),this.rootNode.parent=null,n=e("<ul>",{id:"ft-id-"+this._id,class:"ui-fancytree fancytree-container fancytree-plain"}).appendTo(this.$div),this.$container=n,this.rootNode.ul=n[0],null==this.options.debugLevel&&(this.options.debugLevel=i.debugLevel)}e.ui.fancytree.warn("Fancytree: ignored duplicate include")});
65},{"./jquery.fancytree.ui-deps":"FxCd","jquery":"HlZQ"}],"kCJZ":[function(require,module,exports) {
66var define;
67var e;!function(r){"function"==typeof e&&e.amd?e(["jquery","./jquery.fancytree"],r):"object"==typeof module&&module.exports?(require("./jquery.fancytree"),module.exports=r(require("jquery"))):r(jQuery)}(function(e){"use strict";var r,t,o=e.ui.fancytree,a=/Mac/.test(navigator.platform),n="fancytree-drag-source",d="fancytree-drag-remove",s="fancytree-drop-accept",l="fancytree-drop-after",i="fancytree-drop-before",f="fancytree-drop-over",p="fancytree-drop-reject",g="fancytree-drop-target",c="application/x-fancytree-node",u=null,v=null,y=null,h=null,b=null,m=null,D=null,E=null,w=null,N=null;function x(){b=null,N=null,D=null,E=null,m=null,v=null,y=null,h&&h.removeClass(n+" "+d),h=null,u&&u.hide(),t&&(t.remove(),t=null)}function k(e){return 0===e?"":e>0?"+"+e:""+e}function S(e,r){var t=r.tree,o=r.dataTransfer;"dragstart"===e.type?(r.effectAllowed=t.options.dnd5.effectAllowed,r.dropEffect=t.options.dnd5.dropEffectDefault):(r.effectAllowed=E,r.dropEffect=D),r.dropEffectSuggested=function(e,r,t){var o=t;return a?r.metaKey&&r.altKey?o="link":r.ctrlKey?o="link":r.metaKey?o="move":r.altKey&&
67(o="copy"):r.ctrlKey?o="copy":r.shiftKey?o="move":r.altKey&&(o="link"),o!==m&&e.info("evalEffectModifiers: "+r.type+" - evalEffectModifiers(): "+m+" -> "+o),m=o,o}(t,e,t.options.dnd5.dropEffectDefault),r.isMove="move"===r.dropEffect,r.files=o.files||[]}function C(e,r,t){var o=r.tree,a=r.dataTransfer;return"dragstart"!==e.type&&E!==r.effectAllowed&&o.warn("effectAllowed should only be changed in dragstart event: "+e.type+": data.effectAllowed changed from "+E+" -> "+r.effectAllowed),!1===t&&(o.info("applyDropEffectCallback: allowDrop === false"),r.effectAllowed="none",r.dropEffect="none"),r.isMove="move"===r.dropEffect,"dragstart"===e.type&&(E=r.effectAllowed,D=r.dropEffect),a.effectAllowed=E,a.dropEffect=D,D}function M(r,t){if(t.options.dnd5.scroll&&function(r,t){var o,a,n=r.options.dnd5,d=r.$scrollParent[0],s=n.scrollSensitivity,l=n.scrollSpeed,i=0;d!==document&&"HTML"!==d.tagName?(o=r.$scrollParent.offset(),a=d.scrollTop,o.top+d.offsetHeight-t.pageY<s?d.scrollHeight-r.$scrollParent.innerHeight()-a>0&&(d.scrollTop=i=a+l):a>0&&t.pageY-o.top<s&&(d.scrollTop=i=a-l)):(a=e(document).scrollTop())>0&&t.pageY-a<s?(i=a-l,e(document).scrollTop(i)):e(window).height()-(t.pageY-a)<s&&(i=a+l,e(document).scrollTop(i)),i&&r.debug("autoScroll: "+i+"px")}(t.tree,r),!t.node)return t.tree.warn("Ignored dragover for non-node"),w;var a,n,d,c,v=null,y=t.tree,h=y.options,m=h.dnd5,D=t.node,E=t.otherNode,N="center",x=e(D.span),M=x.find("span.fancytree-title");if(!1===b)return y.debug("Ignored dragover, since dragenter returned false."),!1;("string"==typeof b&&e.error("assert failed: dragenter returned string"),n=x.offset(),c=(r.pageY-n.top)/x.height(),void 0===r.pageY&&y.warn("event.pageY is undefined: see issue #1013."),b.after&&c>.75?v="after":!b.over&&b.after&&c>.5?v="after":b.before&&c<=.25?v="before":!b.over&&b.before&&c<=.5?v="before":b.over&&(v="over"),m.preventVoidMoves&&"move"===t.dropEffect&&(D===E?(D.debug("Drop over source node prevented."),v=null):"before"===v&&E&&D===E.getNextSibling()?(D.debug("Drop after source node prevented."),v=null):"after"===v&&E&&D===E.getPrevSibling()?(D.debug("Drop before source node prevented."),v=null):"over"===v&&E&&E.parent===D&&E.isLastSibling()&&(D.debug("Drop last child over own parent prevented."),v=null)),t.hitMode=v,v&&m.dragOver)&&(S(r,t),m.dragOver(D,t),C(r,t,!!v),v=t.hitMode);if(w=v,"after"===v||"before"===v||"over"===v){switch(a=m.dropMarkerOffsetX||0,v){case"before":N="top",a+=m.dropMarkerInsertOffsetX||0;break;case"after":N="bottom",a+=m.dropMarkerInsertOffsetX||0}d={my:"left"+k(a)+" center",at:"left "+N,of:M},h.rtl&&(d.my="right"+k(-a)+" center",d.at="right "+N),u.toggleClass(l,"after"===v).toggleClass(f,"over"===v).toggleClass(i,"before"===v).show().position(o.fixPositionOptions(d))}else u.hide();return e(D.span).toggleClass(g,"after"===v||"before"===v||"over"===v).toggleClass(l,"after"===v).toggleClass(i,"before"===v).toggleClass(s,"over"===v).toggleClass(p,!1===v),v}function A(r){var t,a,n,d,l=this.options.dnd5,i=null,g=o.getNode(r),h=r.dataTransfer||r.originalEvent.dataTransfer,m={tree:this,node:g,options:this.options,originalEvent:r.originalEvent,widget:this.widget,hitMode:b,dataTransfer:h,otherNode:v||null,otherNodeList:y||null,otherNodeData:null,useDefaultImage:!0,dropEffect:void 0,dropEffectSuggested:void 0,effectAllowed:void 0,files:null,isCancelled:void 0,isMove:void 0};switch(r.type){case"dragenter":if(N=null,!g){this.debug("Ignore non-node "+r.type+": "+r.target.tagName+"."+r.target.className),b=!1;break}if(e(g.span).addClass(f).removeClass(s+" "+p),n=e.inArray(c,h.types)>=0,l.preventNonNodes&&!n){g.debug("Reject dropping a non-node."),b=!1;break}if(l.preventForeignNodes&&(!v||v.tree!==g.tree)){g.debug("Reject dropping a foreign node."),b=!1;break}if(l.preventSameParent&&m.otherNode&&m.otherNode.tree===g.tree&&g.parent===m.otherNode.parent){g.debug("Reject dropping as sibling (same parent)."),b=!1;break}if(l.preventRecursion&&m.otherNode&&m.otherNode.tree===g.tree&&g.isDescendantOf(m.otherNode)){g.debug("Reject dropping below own ancestor."),b=!1;break}if(l.preventLazyParents&&!g.isLoaded()){g.warn("Drop over unloaded target node prevented."),b=!1;break}u.show(),S(r,m),d=function(r){var t;return!!r&&(t=e.isPlainObject(r)?{over:!!r.over,before:!!r.before,after:!!r.after}:Array.isArray(r)?{over:e.inArray("over",r)>=0,before:e.inArray("before",r)>=0,after:e.inArray("after",r)>=0}:{over:!0===r||"over"===r,before:!0===r||"before"===r,after:!0===r||"after"===r},0!==Object.keys(t).length&&t)}(l.dragEnter(g,m)),b=d,C(r,m,i=d&&(d.over||d.before||d.after));break;case"dragover":if(!g){this.debug("Ignore non-node "+r.type+": "+r.target.tagName+"."+r.target.className);break}S(r,m),i=!!(w=M(r,m)),("over"===w||!1===w)&&!g.expanded&&!1!==g.hasChildren()?N?!(l.autoExpandMS&&Date.now()-N>l.autoExpandMS)||g.isLoading()||l.dragExpand&&!1===l.dragExpand(g,m)||g.setExpanded():N=Date.now():N=null;break;case"dragleave":if(!g){this.debug("Ignore non-node "+r.type+": "+r.target.tagName+"."+r.target.className);break}if(!e(g.span).hasClass(f)){g.debug("Ignore dragleave (multi).");break}e(g.span).removeClass(f+" "+s+" "+p),g.scheduleAction("cancel"),l.dragLeave(g,m),u.hide();break;case"drop":if(e.inArray(c,h.types)>=0&&(a=h.getData(c),this.info(r.type+": getData('application/x-fancytree-node'): '"+a+"'")),a||(a=h.getData("text"),this.info(r.type+": getData('text'): '"+a+"'")),a)try{void 0!==(t=JSON.parse(a)).title&&(m.otherNodeData=t)}catch(k){}this.debug(r.type+": nodeData: '"+a+"', otherNodeData: ",m.otherNodeData),e(g.
67span).removeClass(f+" "+s+" "+p),m.hitMode=w,S(r,m),m.isCancelled=!w;var D=v&&v.span,E=v&&v.tree;l.dragDrop(g,m),r.preventDefault(),D&&!document.body.contains(D)&&(E===this?(this.debug("Drop handler removed source element: generating dragEnd."),l.dragEnd(v,m)):this.warn("Drop handler removed source element: dragend event may be lost.")),x()}if(i)return r.preventDefault(),!1}return e.ui.fancytree.getDragNodeList=function(){return y||[]},e.ui.fancytree.getDragNode=function(){return v},e.ui.fancytree.registerExtension({name:"dnd5",version:"2.38.3",options:{autoExpandMS:1500,dropMarkerInsertOffsetX:-16,dropMarkerOffsetX:-24,dropMarkerParent:"body",multiSource:!1,effectAllowed:"all",dropEffectDefault:"move",preventForeignNodes:!1,preventLazyParents:!0,preventNonNodes:!1,preventRecursion:!0,preventSameParent:!1,preventVoidMoves:!0,scroll:!0,scrollSensitivity:20,scrollSpeed:5,setTextTypeJson:!1,sourceCopyHook:null,dragStart:null,dragDrag:e.noop,dragEnd:e.noop,dragEnter:null,dragOver:e.noop,dragExpand:e.noop,dragDrop:e.noop,dragLeave:e.noop},treeInit:function(a){var s,l=a.tree,i=a.options,f=i.glyph||null,p=i.dnd5;e.inArray("dnd",i.extensions)>=0&&e.error("Extensions 'dnd' and 'dnd5' are mutually exclusive."),p.dragStop&&e.error("dragStop is not used by ext-dnd5. Use dragEnd instead."),null!=p.preventRecursiveMoves&&e.error("preventRecursiveMoves was renamed to preventRecursion."),p.dragStart&&o.overrideMethod(a.options,"createNode",function(e,r){this._super.apply(this,arguments),r.node.span?r.node.span.draggable=!0:r.node.warn("Cannot add `draggable`: no span tag")}),this._superApply(arguments),this.$container.addClass("fancytree-ext-dnd5"),s=e("<span>").appendTo(this.$container),this.$scrollParent=s.scrollParent(),s.remove(),(u=e("#fancytree-drop-marker")).length||(u=e("<div id='fancytree-drop-marker'></div>").hide().css({"z-index":1e3,"pointer-events":"none"}).prependTo(p.dropMarkerParent),f&&o.setSpanIcon(u[0],f.map._addClass,f.map.dropMarker)),u.toggleClass("fancytree-rtl",!!i.rtl),p.dragStart&&l.$container.on("dragstart drag dragend",function(a){var s,l=this.options.dnd5,i=o.getNode(a),f=a.dataTransfer||a.originalEvent.dataTransfer,p={tree:this,node:i,options:this.options,originalEvent:a.originalEvent,widget:this.widget,dataTransfer:f,useDefaultImage:!0,dropEffect:void 0,dropEffectSuggested:void 0,effectAllowed:void 0,files:void 0,isCancelled:void 0,isMove:void 0};switch(a.type){case"dragstart":if(!i)return this.info("Ignored dragstart on a non-node."),!1;v=i,y=!1===l.multiSource?[i]:!0===l.multiSource?i.isSelected()?this.getSelectedNodes():[i]:l.multiSource(i,p),(h=e(e.map(y,function(e){return e.span}))).addClass(n);var g=i.toDict(!0,l.sourceCopyHook);g.treeId=i.tree._id,s=JSON.stringify(g);try{f.setData(c,s),f.setData("text/html",e(i.span).html()),f.setData("text/plain",i.title)}catch(u){this.warn("Could not set data (IE only accepts 'text') - "+u)}return l.setTextTypeJson?f.setData("text",s):f.setData("text",i.title),S(a,p),!1===l.dragStart(i,p)?(x(),!1):(C(a,p),t=null,p.useDefaultImage&&(r=e(i.span).find(".fancytree-title"),y&&y.length>1&&(t=e("<span class='fancytree-childcounter'/>").text("+"+(y.length-1)).appendTo(r)),f.setDragImage&&f.setDragImage(r[0],-10,-10)),!0);case"drag":S(a,p),l.dragDrag(i,p),C(a,p),h.toggleClass(d,p.isMove);break;case"dragend":S(a,p),x(),p.isCancelled=!w,l.dragEnd(i,p,!w)}}.bind(l)),p.dragEnter&&l.$container.on("dragenter dragover dragleave drop",A.bind(l))}}),e.ui.fancytree});
68},{"./jquery.fancytree":"laCd","jquery":"HlZQ"}],"kHDm":[function(require,module,exports) {
69var define;
70var e;!function(t){"function"==typeof e&&e.amd?e(["jquery","./jquery.fancytree"],t):"object"==typeof module&&module.exports?(require("./jquery.fancytree"),module.exports=t(require("jquery"))):t(jQuery)}(function(e){"use strict";var t=/Mac/.test(navigator.platform),i=e.ui.fancytree.escapeHtml,n=e.ui.fancytree.trim,r=e.ui.fancytree.unescapeHtml;return e.ui.fancytree._FancytreeNodeClass.prototype.editStart=function(){var t,i=this,n=this.tree,a=n.ext.edit,s=n.options.edit,o=e(".fancytree-title",i.span),d={node:i,tree:n,options:n.options,isNew:e(i[n.statusClassPropName]).hasClass("fancytree-edit-ne
70w"),orgTitle:i.title,input:null,dirty:!1};if(!1===s.beforeEdit.call(i,{type:"beforeEdit"},d))return!1;e.ui.fancytree.assert(!a.currentNode,"recursive edit"),a.currentNode=this,a.eventData=d,n.widget._unbind(),a.lastDraggableAttrValue=i.span.draggable,a.lastDraggableAttrValue&&(i.span.draggable=!1),e(document).on("mousedown.fancytree-edit",function(t){e(t.target).hasClass("fancytree-edit-input")||i.editEnd(!0,t)}),t=e("<input />",{class:"fancytree-edit-input",type:"text",value:n.options.escapeTitles?d.orgTitle:r(d.orgTitle)}),a.eventData.input=t,null!=s.adjustWidthOfs&&t.width(o.width()+s.adjustWidthOfs),null!=s.inputCss&&t.css(s.inputCss),o.html(t),t.focus().change(function(e){t.addClass("fancytree-edit-dirty")}).on("keydown",function(t){switch(t.which){case e.ui.keyCode.ESCAPE:i.editEnd(!1,t);break;case e.ui.keyCode.ENTER:return i.editEnd(!0,t),!1}t.stopPropagation()}).blur(function(e){return i.editEnd(!0,e)}),s.edit.call(i,{type:"edit"},d)},e.ui.fancytree._FancytreeNodeClass.prototype.editEnd=function(t,r){var a,s=this,o=this.tree,d=o.ext.edit,l=d.eventData,c=o.options.edit,u=e(".fancytree-title",s.span).find("input.fancytree-edit-input");return c.trim&&u.val(n(u.val())),a=u.val(),l.dirty=a!==s.title,l.originalEvent=r,!1===t?l.save=!1:l.isNew?l.save=""!==a:l.save=l.dirty&&""!==a,!1!==c.beforeClose.call(s,{type:"beforeClose"},l)&&((!l.save||!1!==c.save.call(s,{type:"save"},l))&&(u.removeClass("fancytree-edit-dirty").off(),e(document).off(".fancytree-edit"),l.save?(s.setTitle(o.options.escapeTitles?a:i(a)),s.setFocus()):l.isNew?(s.remove(),s=l.node=null,d.relatedNode.setFocus()):(s.renderTitle(),s.setFocus()),d.eventData=null,d.currentNode=null,d.relatedNode=null,o.widget._bind(),s&&d.lastDraggableAttrValue&&(s.span.draggable=!0),o.$container.get(0).focus({preventScroll:!0}),l.input=null,c.close.call(s,{type:"close"},l),!0))},e.ui.fancytree._FancytreeNodeClass.prototype.editCreateNode=function(t,i){var n,r=this.tree,a=this;t=t||"child",null==i?i={title:""}:"string"==typeof i?i={title:i}:e.ui.fancytree.assert(e.isPlainObject(i)),"child"!==t||this.isExpanded()||!1===this.hasChildren()?((n=this.addNode(i,t)).match=!0,e(n[r.statusClassPropName]).removeClass("fancytree-hide").addClass("fancytree-match"),n.makeVisible().done(function(){e(n[r.statusClassPropName]).addClass("fancytree-edit-new"),a.tree.ext.edit.relatedNode=a,n.editStart()})):this.setExpanded().done(function(){a.editCreateNode(t,i)})},e.ui.fancytree._FancytreeClass.prototype.isEditing=function(){return this.ext.edit?this.ext.edit.currentNode:null},e.ui.fancytree._FancytreeNodeClass.prototype.isEditing=function(){return!!this.tree.ext.edit&&this.tree.ext.edit.currentNode===this},e.ui.fancytree.registerExtension({name:"edit",version:"2.38.3",options:{adjustWidthOfs:4,allowEmpty:!1,inputCss:{minWidth:"3em"},triggerStart:["f2","mac+enter","shift+click"],trim:!0,beforeClose:e.noop,beforeEdit:e.noop,close:e.noop,edit:e.noop,save:e.noop},currentNode:null,treeInit:function(e){var t=e.tree;this._superApply(arguments),this.$container.addClass("fancytree-ext-edit").on("fancytreebeforeupdateviewport",function(e,i){var n=t.isEditing();n&&(n.info("Cancel edit due to scroll event."),n.editEnd(!1,e))})},nodeClick:function(t){var i=e.ui.fancytree.eventToString(t.originalEvent),n=t.options.edit.triggerStart;return"shift+click"===i&&e.inArray("shift+click",n)>=0&&t.originalEvent.shiftKey?(t.node.editStart(),!1):"click"===i&&e.inArray("clickActive",n)>=0&&t.node.isActive()&&!t.node.isEditing()&&e(t.originalEvent.target).hasClass("fancytree-title")?(t.node.editStart(),!1):this._superApply(arguments)},nodeDblclick:function(t){return e.inArray("dblclick",t.options.edit.triggerStart)>=0?(t.node.editStart(),!1):this._superApply(arguments)},nodeKeydown:function(i){switch(i.originalEvent.which){case 113:if(e.inArray("f2",i.options.edit.triggerStart)>=0)return i.node.editStart(),!1;break;case e.ui.keyCode.ENTER:if(e.inArray("mac+enter",i.options.edit.triggerStart)>=0&&t)return i.node.editStart(),!1}return this._superApply(arguments)}}),e.ui.fancytree});
71},{"./jquery.fancytree":"laCd","jquery":"HlZQ"}],"ovbB":[function(require,module,exports) {
72var define;
73var e;!function(t){"function"==typeof e&&e.amd?e(["jquery","./jquery.fancytree"],t):"object"==typeof module&&module.exports?(require("./jquery.fancytree"),module.exports=t(require("jquery"))):t(jQuery)}(function(e){"use strict";var t=e.ui.fancytree.assert;function n(e,t){e.visit(function(e){var n=e.tr;if(n&&(n.style.display=e.hide||!t?"none":""),!e.expanded)return"skip"})}return e.ui.fancytree.registerExtension({name:"table",version:"2.38.3",options:{checkboxColumnIdx:null,indentation:16,mergeStatusColumns:!0,nodeColumnIdx:0},treeInit:function(n){var r,o,d,a,s=n.tree,i=n.options,l=i.table,u=s.widget.element;if(null!=l.customStatus&&(null==i.renderStatusColumns?(s.warn("The 'customStatus' option is deprecated since v2.15.0. Use 'renderStatusColumns' instead."),i.renderStatusColumns=l.customStatus):e.error("The 'customStatus' option is deprecated since v2.15.0. Use 'renderStatusColumns' only instead.")),i.renderStatusColumns&&!0===i.renderStatusColumns&&(i.renderStatusColumns=i.renderColumns),u.addClass("fancytree-container fancytree-ext-table"),(a=u.find(">tbody")).length||(u.find(">tr").length&&e.error("Expected table > tbody > tr. If you see this please open an issue."),a=e("<tbody>").appendTo(u)),s.tbody=a[0],s.columnCount=e("thead >tr",u).last().find(">th",u).length,(d=a.children("tr").first()).length)o=d.children("td").length,s.c
73olumnCount&&o!==s.columnCount&&(s.warn("Column count mismatch between thead ("+s.columnCount+") and tbody ("+o+"): using tbody."),s.columnCount=o),d=d.clone();else for(t(s.columnCount>=1,"Need either <thead> or <tbody> with <td> elements to determine column count."),d=e("<tr />"),r=0;r<s.columnCount;r++)d.append("<td />");d.find(">td").eq(l.nodeColumnIdx).html("<span class='fancytree-node' />"),i.aria&&(d.attr("role","row"),d.find("td").attr("role","gridcell")),s.rowFragment=document.createDocumentFragment(),s.rowFragment.appendChild(d.get(0)),a.empty(),s.statusClassPropName="tr",s.ariaPropName="tr",this.nodeContainerAttrName="tr",s.$container=u,this._superApply(arguments),e(s.rootNode.ul).remove(),s.rootNode.ul=null,this.$container.attr("tabindex",i.tabindex),i.aria&&s.$container.attr("role","treegrid").attr("aria-readonly",!0)},nodeRemoveChildMarkup:function(t){t.node.visit(function(t){t.tr&&(e(t.tr).remove(),t.tr=null)})},nodeRemoveMarkup:function(t){var n=t.node;n.tr&&(e(n.tr).remove(),n.tr=null),this.nodeRemoveChildMarkup(t)},nodeRender:function(r,o,d,a,s){var i,l,u,c,p,h,m,f,y=r.tree,C=r.node,v=r.options,g=!C.parent;if(!1!==y._enableUpdate){if(s||(r.hasCollapsedParents=C.parent&&!C.parent.expanded),!g)if(C.tr&&o&&this.nodeRemoveMarkup(r),C.tr)o?this.nodeRenderTitle(r):this.nodeRenderStatus(r);else{if(r.hasCollapsedParents&&!d)return;p=y.rowFragment.firstChild.cloneNode(!0),h=function(n){var r,o,d=n.parent,a=d?d.children:null;if(a&&a.length>1&&a[0]!==n)for(o=a[e.inArray(n,a)-1],t(o.tr);o.children&&o.children.length&&(r=o.children[o.children.length-1]).tr;)o=r;else o=d;return o}(C),t(h),!0===a&&s?p.style.display="none":d&&r.hasCollapsedParents&&(p.style.display="none"),h.tr?(x=h.tr,b=p,x.parentNode.insertBefore(b,x.nextSibling)):(t(!h.parent,"prev. row must have a tr, or be system root"),function(e,t){e.insertBefore(t,e.firstChild)}(y.tbody,p)),C.tr=p,C.key&&v.generateIds&&(C.tr.id=v.idPrefix+C.key),C.tr.ftnode=C,C.span=e("span.fancytree-node",C.tr).get(0),this.nodeRenderTitle(r),v.createNode&&v.createNode.call(y,{type:"createNode"},r)}var x,b;if(v.renderNode&&v.renderNode.call(y,{type:"renderNode"},r),(i=C.children)&&(g||d||C.expanded))for(u=0,c=i.length;u<c;u++)(f=e.extend({},r,{node:i[u]})).hasCollapsedParents=f.hasCollapsedParents||!C.expanded,this.nodeRender(f,o,d,a,!0);i&&!s&&(m=C.tr||null,l=y.tbody.firstChild,C.visit(function(e){if(e.tr){if(e.parent.expanded||"none"===e.tr.style.display||(e.tr.style.display="none",n(e,!1)),e.tr.previousSibling!==m){C.debug("_fixOrder: mismatch at node: "+e);var t=m?m.nextSibling:l;y.tbody.insertBefore(e.tr,t)}m=e.tr}}))}},nodeRenderTitle:function(t,n){var r,o,d=t.tree,a=t.node,s=t.options,i=a.isStatusNode();return o=this._super(t,n),a.isRootNode()?o:(s.checkbox&&!i&&null!=s.table.checkboxColumnIdx&&(r=e("span.fancytree-checkbox",a.span),e(a.tr).find("td").eq(+s.table.checkboxColumnIdx).html(r)),this.nodeRenderStatus(t),i?s.renderStatusColumns?s.renderStatusColumns.call(d,{type:"renderStatusColumns"},t):s.table.mergeStatusColumns&&a.isTopLevel()&&e(a.tr).find(">td").eq(0).prop("colspan",d.columnCount).text(a.title).addClass("fancytree-status-merged").nextAll().remove():s.renderColumns&&s.renderColumns.call(d,{type:"renderColumns"},t),o)},nodeRenderStatus:function(t){var n,r=t.node,o=t.options;this._super(t),e(r.tr).removeClass("fancytree-node"),n=(r.getLevel()-1)*o.table.indentation,o.rtl?e(r.span).css({paddingRight:n+"px"}):e(r.span).css({paddingLeft:n+"px"})},nodeSetExpanded:function(t,r,o){if(r=!1!==r,t.node.expanded&&r||!t.node.expanded&&!r)return this._superApply(arguments);var d=new e.Deferred,a=e.extend({},o,{noEvents:!0,noAnimation:!0});function s(e,a){e?(n(t.node,r),r&&t.options.autoScroll&&!o.noAnimation&&t.node.hasChildren()?t.node.getLastChild().scrollIntoView(!0,{topNode:t.node}).always(function(){o.noEvents||t.tree._triggerNodeEvent(r?"expand":"collapse",t),d.resolveWith(t.node)}):(o.noEvents||t.tree._triggerNodeEvent(r?"expand":"collapse",t),d.resolveWith(t.node))):(o.noEvents||t.tree._triggerNodeEvent(r?"expand":"collapse",t),d.rejectWith(t.node))}return o=o||{},this._super(t,r,a).done(function(){s(!0)}).fail(function(){s(!1)}),d.promise()},nodeSetStatus:function(t,n,r,o){if("ok"===n){var d=t.node,a=d.children?d.children[0]:null;a&&a.isStatusNode()&&e(a.tr).remove()}return this._superApply(arguments)},treeClear:function(e){return this.nodeRemoveChildMarkup(this._makeHookContext(this.rootNode)),this._superApply(arguments)},treeDestroy:function(e){return this.$container.find("tbody").empty(),this.$source&&this.$source.removeClass("fancytree-helper-hidden"),this._superApply(arguments)}}),e.ui.fancytree});
74},{"./jquery.fancytree":"laCd","jquery":"HlZQ"}],"ICrm":[function(require,module,exports) {
75var define;
76var e;!function(t){"function"==typeof e&&e.amd?e(["jquery","./jquery.fancytree","./jquery.fancytree.table"],t):"object"==typeof module&&module.exports?(require("./jquery.fancytree.table"),module.exports=t(require("jquery"))):t(jQuery)}(function(e){"use strict";var t=e.ui.keyCode,n={text:[t.UP,t.DOWN],checkbox:[t.UP,t.DOWN,t.LEFT,t.RIGHT],link:[t.UP,t.DOWN,t.LEFT,t.RIGHT],radiobutton:[t.UP,t.DOWN,t.LEFT,t.RIGHT],"select-one":[t.LEFT,t.RIGHT],"select-multiple":[t.LEFT,t.RIGHT]};function r(t,n){var r,i=null,o=0;return t.children().each(function(){if(o>=n)return i=e(this),!1;r=e(this).prop("colspan"),o+=r||1}),i}function i(n,i){var o,a,u=n.closest("td"),s=null;switch(i){case t.LEFT:s=u.prev();break;case t.RIGHT:s=u.next();break;case t.UP:case t.DOWN:for(a=function(t,n){var r,i=n.get(0),o=0;return t.children().each(function(){if(this===i)return!1;r=e(this).prop("colspan"),o+=r||1}),o}(o=u.parent(),u);(o=i===t.UP?o.prev():o.next()).length&&(o.is(":hidden")||!(s=r(o,a))||!s.find(":input,a").length););}return s}return e.ui.fancytree.registerExtension({name:"gridnav",version:"2.38.3",options:{autofocusInput:!1,handleCursorKeys:!0},treeInit:function(t){this._requireExtension("table",!0,!0),this._superApply(arguments),this.$container.addClass("fancytree-ext-gridnav"),this.$container.on("focusin",function(n){var r,i=e.ui.fancytree.getNode(n.target);i&&!i.isActive()&&(r=t.tree._makeHookContext(i,n),t.tree._callHook("nodeSetActive",r,!0))})}
76,nodeSetActive:function(t,n,r){var i=t.options.gridnav,o=t.node,a=t.originalEvent||{},u=e(a.target).is(":input");n=!1!==n,this._superApply(arguments),n&&(t.options.titlesTabbable?(u||(e(o.span).find("span.fancytree-title").focus(),o.setFocus()),t.tree.$container.attr("tabindex","-1")):i.autofocusInput&&!u&&e(o.tr||o.span).find(":input:enabled").first().focus())},nodeKeydown:function(t){var r,o,a,u=t.options.gridnav,s=t.originalEvent,c=e(s.target);return c.is(":input:enabled")?r=c.prop("type"):c.is("a")&&(r="link"),r&&u.handleCursorKeys?!((o=n[r])&&e.inArray(s.which,o)>=0&&(a=i(c,s.which))&&a.length)||(a.find(":input:enabled,a").focus(),!1):this._superApply(arguments)}}),e.ui.fancytree});
77},{"./jquery.fancytree.table":"ovbB","jquery":"HlZQ"}],"MKUk":[function(require,module,exports) {
78var define;
79var e;!function(t){"function"==typeof e&&e.amd?e(["jquery","./jquery.fancytree"],t):"object"==typeof module&&module.exports?(require("./jquery.fancytree"),module.exports=t(require("jquery"))):t(jQuery)}(function(e){"use strict";var t=null,o=null,i=null,s=e.ui.fancytree.assert,r="expanded";try{s(window.localStorage&&window.localStorage.getItem),o={get:function(e){return window.localStorage.getItem(e)},set:function(e,t){window.localStorage.setItem(e,t)},remove:function(e){window.localStorage.removeItem(e)}}}catch(n){e.ui.fancytree.warn("Could not access window.localStorage",n)}try{s(window.sessionStorage&&window.sessionStorage.getItem),i={get:function(e){return window.sessionStorage.getItem(e)},set:function(e,t){window.sessionStorage.setItem(e,t)},remove:function(e){window.sessionStorage.removeItem(e)}}}catch(n){e.ui.fancytree.warn("Could not access window.sessionStorage",n)}return"function"==typeof Cookies?t={get:Cookies.get,set:function(e,t){Cookies.set(e,t,this.options.persist.cookie)},remove:Cookies.remove}:e&&"function"==typeof e.cookie&&(t={get:e.cookie,set:function(t,o){e.cookie(t,o,this.options.persist.cookie)},remove:e.removeCookie}),e.ui.fancytree._FancytreeClass.prototype.clearPersistData=function(e){var t=this.ext.persist,o=t.cookiePrefix;(e=e||"active expanded focus selected").indexOf("active")>=0&&t._data(o+"active",null),e.indexOf(r)>=0&&t._data(o+r,null),e.indexOf("focus")>=0&&t._data(o+"focus",null),e.indexOf("selected")>=0&&t._data(o+"selected",null)},e.ui.fancytree._FancytreeClass.prototype.clearCookies=function(e){return this.warn("'tree.clearCookies()' is deprecated since v2.27.0: use 'clearPersistData()' instead."),this.clearPersistData(e)},e.ui.fancytree._FancytreeClass.prototype.getPersistData=function(){var e=this.ext.persist,t=e.cookiePrefix,o=e.cookieDelimiter,i={};return i.active=e._data(t+"active"),i[r]=(e._data(t+r)||"").split(o),i.selected=(e._data(t+"selected")||"").split(o),i.focus=e._data(t+"focus"),i},e.ui.fancytree.registerExtension({name:"persist",version:"2.38.3",options:{cookieDelimiter:"~",cookiePrefix:void 0,cookie:{raw:!1,expires:"",path:"",domain:"",secure:!1},expandLazy:!1,expandOpts:void 0,fireActivate:!0,overrideSource:!0,store:"auto",types:"active expanded focus selected"},_data:function(e,t){var o=this._local.store;if(void 0===t)return o.get.call(this,e);null===t?o.remove.call(this,e):o.set.call(this,e,t)},_appendKey:function(t,o,i){o=""+o;var s=this._local,r=this.options.persist.cookieDelimiter,n=s.cookiePrefix+t,a=s._data(n),c=a?a.split(r):[],d=e.inArray(o,c);d>=0&&c.splice(d,1),i&&c.push(o),s._data(n,c.join(r))},treeInit:function(n){var a=n.tree,c=n.options,d=this._local,l=this.options.persist;return d.cookiePrefix=l.cookiePrefix||"fancytree-"+a._id+"-",d.storeActive=l.types.indexOf("active")>=0,d.storeExpanded=l.types.indexOf(r)>=0,d.storeSelected=l.types.indexOf("selected")>=0,d.storeFocus=l.types.indexOf("focus")>=0,d.store=null,"auto"===l.store&&(l.store=o?"local":"cookie"),e.isPlainObject(l.store)?d.store=l.store:"cookie"===l.store?d.store=t:"local"===l.store?d.store="local"===l.store?o:i:"session"===l.store&&(d.store="local"===l.store?o:i),s(d.store,"Need a valid store."),a.$div.on("fancytreeinit",function(t){if(!1!==a._triggerTreeEvent("beforeRestore",null,{})){var o,i,s,n,u=d._data(d.cookiePrefix+"focus"),f=!1===l.fireActivate;o=d._data(d.cookiePrefix+r),s=o&&o.split(l.cookieDelimiter),(d.storeExpanded?function t(o,i,s,n,a){var c,d,l,u,f=!1,p=o.options.persist.expandOpts,y=[],v=[];for(s=s||[],a=a||e.Deferred(),c=0,l=s.length;c<l;c++)d=s[c],(u=o.getNodeByKey(d))?n&&u.isUndefined()?(f=!0,o.debug("_loadLazyNodes: "+u+" is lazy: loading..."),"expand"===n?y.push(u.setExpanded(!0,p)):y.push(u.load())):(o.debug("_loadLazyNodes: "+u+" already loaded."),u.setExpanded(!0,p)):(v.push(d),o.debug("_loadLazyNodes: "+u+" was not yet found."));return e.when.apply(e,y).always(function(){if(f&&v.length>0)t(o,i,v,n,a);else{if(v.length)for(o.warn("_loadLazyNodes: could not load those keys: ",v),c=0,l=v.length;c<l;c++)d=s[c],i._appendKey(r,s[c],!1);a.resolve()}}),a}(a,d,s,!!l.expandLazy&&"expand",null):(new e.Deferred).resolve()).done(function(){if(d.storeSelected){if(o=d._data(d.cookiePrefix+"selected"))for(s=o.split(l.cookieDelimiter),i=0;i<s.length;i++)(n=a.getNodeByKey(s[i]))?(void 0===n.selected||l.overrideSource&&!1===n.selected)&&(n.selected=!0,n.renderStatus()):d._appendKey("selected",s[i],!1);3===a.options.selectMode&&a.visit(function(e){if(e.selected)return e.fixSelection3AfterClick(),"skip"})}
79d.storeActive&&(!(o=d._data(d.cookiePrefix+"active"))||!c.persist.overrideSource&&a.activeNode||(n=a.getNodeByKey(o))&&(n.debug("persist: set active",o),n.setActive(!0,{noFocus:!0,noEvents:f}))),d.storeFocus&&u&&(n=a.getNodeByKey(u))&&(a.options.titlesTabbable?e(n.span).find(".fancytree-title").focus():e(a.$container).focus()),a._triggerTreeEvent("restore",null,{})})}}),this._superApply(arguments)},nodeSetActive:function(e,t,o){var i,s=this._local;return t=!1!==t,i=this._superApply(arguments),s.storeActive&&s._data(s.cookiePrefix+"active",this.activeNode?this.activeNode.key:null),i},nodeSetExpanded:function(e,t,o){var i,s=e.node,n=this._local;return t=!1!==t,i=this._superApply(arguments),n.storeExpanded&&n._appendKey(r,s.key,t),i},nodeSetFocus:function(e,t){var o,i=this._local;return t=!1!==t,o=this._superApply(arguments),i.storeFocus&&i._data(i.cookiePrefix+"focus",this.focusNode?this.focusNode.key:null),o},nodeSetSelected:function(t,o,i){var s,r,n=t.tree,a=t.node,c=this._local;return o=!1!==o,s=this._superApply(arguments),c.storeSelected&&(3===n.options.selectMode?(r=(r=e.map(n.getSelectedNodes(!0),function(e){return e.key})).join(t.options.persist.cookieDelimiter),c._data(c.cookiePrefix+"selected",r)):c._appendKey("selected",a.key,a.selected)),s}}),e.ui.fancytree});
80},{"./jquery.fancytree":"laCd","jquery":"HlZQ"}],"MaIk":[function(require,module,exports) {
81var define;
82var e;!function(t){"function"==typeof e&&e.amd?e(["jquery","./jquery.fancytree"],t):"object"==typeof module&&module.exports?(require("./jquery.fancytree"),module.exports=t(require("jquery"))):t(jQuery)}(function(e){"use strict";var t=e.ui.fancytree.escapeHtml,i="￷",n="￸";function a(e){return(e+"").replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}function r(e,t,a){for(var r=[],s=1;s<t.length;s++){var l=t[s].length+(1===s?0:1)+(r[r.length-1]||0);r.push(l)}var o=e.split("");return a?r.forEach(function(e){o[e]=i+o[e]+n}):r.forEach(function(e){o[e]="<mark>"+o[e]+"</mark>"}),o.join("")}return e.ui.fancytree._FancytreeClass.prototype._applyFilterImpl=function(s,l,o){var h,c,d,u,p,f,y,g,m=0,x=this.options,v=x.escapeTitles,_=x.autoCollapse,C=e.extend({},x.filter,o),b="hide"===C.mode,F=!!C.leavesOnly&&!l;if("string"==typeof s){if(""===s)return this.warn("Fancytree passing an empty string as a filter is handled as clearFilter()."),void this.clearFilter();h=C.fuzzy?s.split("").map(a).reduce(function(e,t){return e+"([^"+t+"]*)"+t},""):a(s),d=new RegExp(h,"i"),u=new RegExp(a(s),"gi"),v&&(p=new RegExp(a(i),"g"),f=new RegExp(a(n),"g")),s=function(a){if(!a.title)return!1;var s,l=v?a.title:(s=a.title).indexOf(">")>=0?e("<div/>").html(s).text():s,o=l.match(d);return o&&C.highlight&&(v?(y=C.fuzzy?r(l,o,v):l.replace(u,function(e){return i+e+n}),a.titleWithHighlight=t(y).replace(p,"<mark>").replace(f,"</mark>")):C.fuzzy?a.titleWithHighlight=r(l,o):a.titleWithHighlight=l.replace(u,function(e){return"<mark>"+e+"</mark>"})),!!o}}return this.enableFilter=!0,this.lastFilterArgs=arguments,g=this.enableUpdate(!1),this.$div.addClass("fancytree-ext-filter"),b?this.$div.addClass("fancytree-ext-filter-hide"):this.$div.addClass("fancytree-ext-filter-dimm"),this.$div.toggleClass("fancytree-ext-filter-hide-expanders",!!C.hideExpanders),this.rootNode.subMatchCount=0,this.visit(function(e){delete e.match,delete e.titleWithHighlight,e.subMatchCount=0}),(c=this.getRootNode()._findDirectChild("__not_found__"))&&c.remove(),x.autoCollapse=!1,this.visit(function(e){if(!F||null==e.children){var t=s(e),i=!1;if("skip"===t)return e.visit(function(e){e.match=!1},!0),"skip";t||!l&&"branch"!==t||!e.parent.match||(t=!0,i=!0),t&&(m++,e.match=!0,e.visitParents(function(t){t!==e&&(t.subMatchCount+=1),!C.autoExpand||i||t.expanded||(t.setExpanded(!0,{noAnimation:!0,noEvents:!0,scrollIntoView:!1}),t._filterAutoExpanded=!0)},!0))}}),x.autoCollapse=_,0===m&&C.nodata&&b&&("function"==typeof(c=C.nodata)&&(c=c()),!0===c?c={}:"string"==typeof c&&(c={title:c}),c=e.extend({statusNodeType:"nodata",key:"__not_found__",title:this.options.strings.noData},c),this.getRootNode().addNode(c).match=!0),this._callHook("treeStructureChanged",this,"applyFilter"),this.enableUpdate(g),m},e.ui.fancytree._FancytreeClass.prototype.filterNodes=function(e,t){return"boolean"==typeof t&&(t={leavesOnly:t},this.warn("Fancytree.filterNodes() leavesOnly option is deprecated since 2.9.0 / 2015-04-19. Use opts.leavesOnly instead.")),this._applyFilterImpl(e,!1,t)},e.ui.fancytree._FancytreeClass.prototype.filterBranches=function(e,t){return this._applyFilterImpl(e,!0,t)},e.ui.fancytree._FancytreeClass.prototype.updateFilter=function(){this.enableFilter&&this.lastFilterArgs&&this.options.filter.autoApply?this._applyFilterImpl.apply(this,this.lastFilterArgs):this.warn("updateFilter(): no filter active.")},e.ui.fancytree._FancytreeClass.prototype.clearFilter=function(){var t,i=this.getRootNode()._findDirectChild("__not_found__"),n=this.options.escapeTitles,a=this.options.enhanceTitle,r=this.enableUpdate(!1);i&&i.remove(),delete this.rootNode.match,delete this.rootNode.subMatchCount,this.visit(function(i){i.match&&i.span&&(t=e(i.span).find(">span.fancytree-title"),n?t.text(i.title):t.html(i.title),a&&a({type:"enhanceTitle"},{node:i,$title:t})),delete i.match,delete i.subMatchCount,delete i.titleWithHighlight,i.$subMatchBadge&&(i.$subMatchBadge.remove(),delete i.$subMatchBadge),i._filterAutoExpanded&&i.expanded&&i.setExpanded(!1,{noAnimation:!0,noEvents:!0,scrollIntoView:!1}),delete i._filterAutoExpanded}),this.enableFilter=!1,this.lastFilterArgs=null,this.$div.removeClass("fancytree-ext-filter fancytree-ext-filter-dimm fancytree-ext-filter-hide"),this._callHook("treeStructureChanged",this,"clearFilter"),this.enableUpdate(r)},e.ui.fancytree._FancytreeClass.prototype.isFilterActive=function(){return!!this.enableFilter},e.ui.fancytree._FancytreeNodeClass.prototype.isMatched=function(){return!(this.tree.enableFilter&&!this.match)},e.ui.fancytree.registerExtension({name:"filter",version:"2.38.3",options:{autoApply:!0,autoExpand:!1,counter:!0,fuzzy:!1,hideExpandedCounter:!0,hideExpanders:!1,highlight:!0,leavesOnly:!1,nodata:!0,mode:"dimm"},nodeLoadChildren:function(e,t){var i=e.tree;return this._superApply(arguments).done(function(){i.enableFilter&&i.lastFilterArgs&&e.options.filter.autoApply&&i._applyFilterImpl.apply(i,i.lastFilterArgs)})},nodeSetExpanded:function(e,t,i){var n=e.node;return delete n._filterAutoExpanded,!t&&e.options.filter.hideExpandedCounter&&n.$subMatchBadge&&n.$subMatchBadge.show(),this._superApply(arguments)},nodeRenderStatus:function(t){var i,n=t.node,a=t.tree,r=t.options.filter,s=e(n.span).find("span.fancytree-title"),l=e(n[a.statusClassPropName]),o=t.options.enhanceTitle,h=t.options.escapeTitles;return i=this._super(t),l.length&&a.enableFilter?(l.toggleClass("fancytree-match",!!n.match).toggleClass("fancytree-submatch",!!n.subMatchCount).toggleClass("fancytree-hide",!(n.match||n.subMatchCount)),!r.counter||!n.subMatchCount||n.isExpanded()&&r.hideExpandedCounter?n.$subMatchBadge&&n.$subMatchBadge.hide():(n.$subMatchBadge||(n.$subMatchBadge=e("<span class='fancytree-childcounter'/>"),e("span.fancytree-icon, span.fancytree-custom-icon",n.span).append(n.$subMatchBadge)),n.$subMatchBadge.show().text(n.subMatchCount)),!n.span||n.isEditing&&n.isEditing.call(n)||(n.titleWithHighlight?s.html(n.titleWithHighlight):h?s.text(n.title):s.html(n.title),o&&o({type:"enhanceTitle"},{node:n,$title:s})),i):i}}),e.ui.fancytree});
83},{"./jquery.fancytree":"laCd","jquery":"HlZQ"}],"MXTL":[function(require,module,exports) {
84var process = require("process");
85var e=require("process");Object.defineProperty(exports,"__esModule",{value:!0}),exports.SearchBotDeviceInfo=exports.ReactNativeInfo=exports.NodeInfo=exports.BrowserInfo=exports.BotInfo=void 0,exports.browserName=w,exports.detect=p,exports.detectOS=v,exports.getNodeVersion=S,exports.parseUserAgent=h;var o=function(e,o,n){if(n||2===arguments.length)for(var r,i=0,t=o.length;i<t;i++)!r&&i in o||(r||(r=Array.prototype.slice.call(o,0,i)),r[i]=o[i]);return e.concat(r||Array.prototype.slice.call(o))},n=exports.BrowserInfo=function(){return function(e,o,n){this.name=e,this.version=o,this.os=n,this.type="browser"}}(),r=exports.NodeInfo=function(){return function(o){this.version=o,this.type="node",this.name="node",this.os=e.platform}}(),i=exports.SearchBotDeviceInfo=function(){return function(e,o,n,r){this.name=e,this.version=o,this.os=n,this.bot=r,this.type="bot-device"}}(),t=exports.BotInfo=function(){return function(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null}}(),s=exports.ReactNativeInfo=function(){return function(){this.type="react-native",this.name="react-native",this.version=null,this.os=null}}(),a=/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yaho
85o!|yandex/,d=/(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,u=3,c=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/EdgA?\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["pie",/^Microsoft Pocket Internet Explorer\/(\d+\.\d+)$/],["pie",/^Mozilla\/\d\.\d+\s\(compatible;\s(?:MSP?IE|MSInternet Explorer) (\d+\.\d+);.*Windows CE.*\)$/],["netfront",/^Mozilla\/\d\.\d+.*NetFront\/(\d.\d)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FB[AS]V\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["curl",/^curl\/([0-9\.]+)$/],["searchbot",a]],l=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Windows CE",/Windows CE|WinCE|Microsoft Pocket Internet Explorer/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/]];function p(e){return e?h(e):"undefined"==typeof document&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product?new s:"undefined"!=typeof navigator?h(navigator.userAgent):S()}function f(e){return""!==e&&c.reduce(function(o,n){var r=n[0],i=n[1];if(o)return o;var t=i.exec(e);return!!t&&[r,t]},!1)}function w(e){var o=f(e);return o?o[0]:null}function h(e){var r=f(e);if(!r)return null;var s=r[0],a=r[1];if("searchbot"===s)return new t;var c=a[1]&&a[1].split(".").join("_").split("_").slice(0,3);c?c.length<u&&(c=o(o([],c,!0),W(u-c.length),!0)):c=[];var l=c.join("."),p=v(e),w=d.exec(e);return w&&w[1]?new i(s,l,p,w[1]):new n(s,l,p)}function v(e){for(var o=0,n=l.length;o<n;o++){var r=l[o],i=r[0];if(r[1].exec(e))return i}return null}function S(){return void 0!==e&&e.version?new r(e.version.slice(1)):null}function W(e){for(var o=[],n=0;n<e;n++)o.push("0");return o}
86},{"process":"g5IB"}],"PBio":[function(require,module,exports) {
87var define;
88var global = arguments[3];
89var process = require("process");
90var e,t=arguments[3],n=require("process");!function(){"use strict";var e=function(e){if(null===e)return"null";if(void 0===e)return"undefined";var t=typeof e;return"object"===t&&(Array.prototype.isPrototypeOf(e)||e.constructor&&"Array"===e.constructor.name)?"array":"object"===t&&(String.prototype.isPrototypeOf(e)||e.constructor&&"String"===e.constructor.name)?"string":t},n=function(e){return{eq:e}},r=n(function(e,t){return e===t}),o=function(e){return n(function(t,n){if(t.length!==n.length)return!1;for(var r=t.length,o=0;o<r;o++)if(!e.eq(t[o],n[o]))return!1;return!0})},i=function(e,t){return function(e,t){return n(function(n,r){return e.eq(t(n),t(r))})}(o(e),function(e){return function(e,t){return Array.prototype.slice.call(e).sort(t)}(e,t)})},a=function(e){return n(function(t,n){var o=Object.keys(t),a=Object.keys(n);if(!i(r).eq(o,a))return!1;for(var u=o.length,c=0;c<u;c++){var s=o[c];if(!e.eq(t[s],n[s]))return!1}return!0})},u=n(function(t,n){if(t===n)return!0;var r=e(t);return r===e(n)&&(function(e){return-1!==["undefined","boolean","number","string","function","xml","null"].indexOf(e)}(r)?t===n:"array"===r?o(u).eq(t,n):"object"===r&&a(u).eq(t,n))}),c=function(e){return function(t){return r=typeof(n=t),(null===n?"null":"object"===r&&(Array.prototype.isPrototypeOf(n)||n.constructor&&"Array"===n.constructor.name)?"array":"object"===r&&(String.prototype.isPrototypeOf(n)||n.constructor&&"String"===n.constructor.name)?"string":r)===e;var n,r}},s=function(e){return function(t){return typeof t===e}},f=function(e){return function(t){return e===t}},l=c("string"),d=c("object"),m=c("array"),g=f(null),p=s("boolean"),h=f(void 0),v=function(e){return null==e},b=function(e){return!v(e)},y=s("function"),C=s("number"),w=function(){},x=function(e,t){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return e(t.apply(null,n))}},S=function(e,t){return function(n){return e(t(n))}},N=function(e){return function(){return e}},E=function(e){return e},k=function(e,t){return e===t};function _(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o=t.concat(n);return e.apply(null,o)}}var A=function(e){return function(t){return!e(t)}},R=function(e){return e()},D=function(e){e()}
90,T=N(!1),O=N(!0),B=function(){return P},P=function(){var e=function(e){return e()},t=E;return{fold:function(e,t){return e()},isSome:T,isNone:O,getOr:t,getOrThunk:e,getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:N(null),getOrUndefined:N(void 0),or:t,orThunk:e,map:B,each:w,bind:B,exists:T,forall:O,filter:function(){return B()},toArray:function(){return[]},toString:N("none()")}}(),L=function(e){var t=N(e),n=function(){return o},r=function(t){return t(e)},o={fold:function(t,n){return n(e)},isSome:O,isNone:T,getOr:t,getOrThunk:t,getOrDie:t,getOrNull:t,getOrUndefined:t,or:n,orThunk:n,map:function(t){return L(t(e))},each:function(t){t(e)},bind:r,exists:r,forall:r,filter:function(t){return t(e)?o:P},toArray:function(){return[e]},toString:function(){return"some("+e+")"}};return o},I={some:L,none:B,from:function(e){return null==e?P:L(e)}},M=Array.prototype.slice,F=Array.prototype.indexOf,U=Array.prototype.push,z=function(e,t){return F.call(e,t)},H=function(e,t){return z(e,t)>-1},j=function(e,t){for(var n=0,r=e.length;n<r;n++){if(t(e[n],n))return!0}return!1},V=function(e,t){for(var n=e.length,r=new Array(n),o=0;o<n;o++){var i=e[o];r[o]=t(i,o)}return r},q=function(e,t){for(var n=0,r=e.length;n<r;n++){t(e[n],n)}},$=function(e,t){for(var n=e.length-1;n>=0;n--){t(e[n],n)}},W=function(e,t){for(var n=[],r=[],o=0,i=e.length;o<i;o++){var a=e[o];(t(a,o)?n:r).push(a)}return{pass:n,fail:r}},K=function(e,t){for(var n=[],r=0,o=e.length;r<o;r++){var i=e[r];t(i,r)&&n.push(i)}return n},X=function(e,t,n){return $(e,function(e,r){n=t(n,e,r)}),n},Y=function(e,t,n){return q(e,function(e,r){n=t(n,e,r)}),n},G=function(e,t,n){for(var r=0,o=e.length;r<o;r++){var i=e[r];if(t(i,r))return I.some(i);if(n(i,r))break}return I.none()},J=function(e,t){return G(e,t,T)},Q=function(e,t){for(var n=0,r=e.length;n<r;n++){if(t(e[n],n))return I.some(n)}return I.none()},Z=function(e,t){return function(e){for(var t=[],n=0,r=e.length;n<r;++n){if(!m(e[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+e);U.apply(t,e[n])}return t}(V(e,t))},ee=function(e,t){for(var n=0,r=e.length;n<r;++n){if(!0!==t(e[n],n))return!1}return!0},te=function(e){var t=M.call(e,0);return t.reverse(),t},ne=function(e,t){return K(e,function(e){return!H(t,e)})},re=function(e,t){var n=M.call(e,0);return n.sort(t),n},oe=function(e,t){return t>=0&&t<e.length?I.some(e[t]):I.none()},ie=function(e){return oe(e,0)},ae=function(e){return oe(e,e.length-1)},ue=y(Array.from)?Array.from:function(e){return M.call(e)},ce=function(e,t){for(var n=0;n<e.length;n++){var r=t(e[n],n);if(r.isSome())return r}return I.none()},se=Object.keys,fe=Object.hasOwnProperty,le=function(e,t){for(var n=se(e),r=0,o=n.length;r<o;r++){var i=n[r];t(e[i],i)}},de=function(e,t){return me(e,function(e,n){return{k:n,v:t(e,n)}})},me=function(e,t){var n={};return le(e,function(e,r){var o=t(e,r);n[o.k]=o.v}),n},ge=function(e){return function(t,n){e[n]=t}},pe=function(e,t,n,r){return le(e,function(e,o){(t(e,o)?n:r)(e,o)}),{}},he=function(e,t){var n={};return pe(e,t,ge(n),w),n},ve=function(e){return function(e,t){var n=[];return le(e,function(e,r){n.push(t(e,r))}),n}(e,E)},be=function(e,t){return ye(e,t)?I.from(e[t]):I.none()},ye=function(e,t){return fe.call(e,t)},Ce=function(e,t){return ye(e,t)&&void 0!==e[t]&&null!==e[t]},we=Array.isArray,xe=function(e,t,n){var r,o;if(!e)return!1;if(n=n||e,void 0!==e.length){for(r=0,o=e.length;r<o;r++)if(!1===t.call(n,e[r],r,e))return!1}else for(r in e)if(ye(e,r)&&!1===t.call(n,e[r],r,e))return!1;return!0},Se=function(e,t){var n=[];return xe(e,function(r,o){n.push(t(r,o,e))}),n},Ne=function(e,t){var n=[];return xe(e,function(r,o){t&&!t(r,o,e)||n.push(r)}),n},Ee=function(e,t){if(e)for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},ke=function(e,t,n,r){for(var o=h(n)?e[0]:n,i=0;i<e.length;i++)o=t.call(r,o,e[i],i);return o},_e=function(e,t,n){var r,o;for(r=0,o=e.length;r<o;r++)if(t.call(n,e[r],r,e))return r;return-1},Ae=function(e){return e[e.length-1]},Re=function(){return(Re=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function De(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}var Te=function(e){var t,n=!1;return function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return n||(n=!0,t=e.apply(null,r)),t}},Oe=function(){return Be(0,0)},Be=function(e,t){return{major:e,minor:t}},Pe={nu:Be,detect:function(e,t){var n=String(t).toLowerCase();return 0===e.length?Oe():function(e,t){var n=function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r.test(t))return r}}(e,t);if(!n)return{major:0,minor:0};var r=function(e){return Number(t.replace(n,"$"+e))};return Be(r(1),r(2))}(e,n)},unknown:Oe},Le=function(e,t){var n=String(t).toLowerCase();return J(e,function(e){return e.search(n)})},Ie=function(e,t){return-1!==e.indexOf(t)},Me=function(e,t){return function(e,t,n){return""===t||e.length>=t.length&&e.substr(n,n+t.length)===t}(e,t,0)},Fe=function(e){return function(t){return t.replace(e,"")}},Ue=Fe(/^\s+|\s+$/g),ze=Fe(/^\s+/g),He=Fe(/\s+$/g),je=function(e){return e.length>0},Ve=function(e){return!je(e)},qe=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,$e=function(e){return function(t){return Ie(t,e)}},We=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(e){return Ie(e,"edge/")&&Ie(e,"chrome")&&Ie(e,"safari")&&Ie(e,"applewebkit")}},{name:"Chrome",brand:"Chromium",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,qe],search:function(e){return Ie(e,"chrome")&&!Ie(e,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(e){return Ie(e,"msie")||Ie(e,"trident")}},{name:"Opera",versionRegexes:[qe,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:$e("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:$e("firefox")},{name:"Safari",versionRegexes:[qe,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(e){return(Ie(e,"safari")||Ie(e,"mobile/"))&&Ie(e,"applewebkit")}}],Ke=[{name:"Windows",search:$e("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(e){return Ie(e,"iphone")||Ie(e,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:$e("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:$e("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:$e("linux"),versionRegexes:[]},{name:"Solaris",search:$e("sunos"),versionRegexes:[]},{name:"FreeBSD",search:$e("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:$e("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],Xe={browsers:N(We),oses:N(Ke)},Ye=function(e){var t=e.current,n=e.version,r=function(e){return function(){return t===e}};
90return{current:t,version:n,isEdge:r("Edge"),isChrome:r("Chrome"),isIE:r("IE"),isOpera:r("Opera"),isFirefox:r("Firefox"),isSafari:r("Safari")}},Ge={unknown:function(){return Ye({current:void 0,version:Pe.unknown()})},nu:Ye,edge:N("Edge"),chrome:N("Chrome"),ie:N("IE"),opera:N("Opera"),firefox:N("Firefox"),safari:N("Safari")},Je=function(e){var t=e.current,n=e.version,r=function(e){return function(){return t===e}};return{current:t,version:n,isWindows:r("Windows"),isiOS:r("iOS"),isAndroid:r("Android"),isOSX:r("OSX"),isLinux:r("Linux"),isSolaris:r("Solaris"),isFreeBSD:r("FreeBSD"),isChromeOS:r("ChromeOS")}},Qe={unknown:function(){return Je({current:void 0,version:Pe.unknown()})},nu:Je,windows:N("Windows"),ios:N("iOS"),android:N("Android"),linux:N("Linux"),osx:N("OSX"),solaris:N("Solaris"),freebsd:N("FreeBSD"),chromeos:N("ChromeOS")},Ze=function(e,t,n){var r=Xe.browsers(),o=Xe.oses(),i=t.bind(function(e){return function(e,t){return ce(t.brands,function(t){var n=t.brand.toLowerCase();return J(e,function(e){var t;return n===(null===(t=e.brand)||void 0===t?void 0:t.toLowerCase())}).map(function(e){return{current:e.name,version:Pe.nu(parseInt(t.version,10),0)}})})}(r,e)}).orThunk(function(){return function(e,t){return Le(e,t).map(function(e){var n=Pe.detect(e.versionRegexes,t);return{current:e.name,version:n}})}(r,e)}).fold(Ge.unknown,Ge.nu),a=function(e,t){return Le(e,t).map(function(e){var n=Pe.detect(e.versionRegexes,t);return{current:e.name,version:n}})}(o,e).fold(Qe.unknown,Qe.nu),u=function(e,t,n,r){var o=e.isiOS()&&!0===/ipad/i.test(n),i=e.isiOS()&&!o,a=e.isiOS()||e.isAndroid(),u=a||r("(pointer:coarse)"),c=o||!i&&a&&r("(min-device-width:768px)"),s=i||a&&!c,f=t.isSafari()&&e.isiOS()&&!1===/safari/i.test(n),l=!s&&!c&&!f;return{isiPad:N(o),isiPhone:N(i),isTablet:N(c),isPhone:N(s),isTouch:N(u),isAndroid:e.isAndroid,isiOS:e.isiOS,isWebView:N(f),isDesktop:N(l)}}(a,i,e,n);return{browser:i,os:a,deviceType:u}},et=function(e){return window.matchMedia(e).matches},tt=Te(function(){return Ze(navigator.userAgent,I.from(navigator.userAgentData),et)}),nt=function(){return tt()},rt=navigator.userAgent,ot=nt(),it=ot.browser,at=ot.os,ut=ot.deviceType,ct=/WebKit/.test(rt)&&!it.isEdge(),st="FormData"in window&&"FileReader"in window&&"URL"in window&&!!URL.createObjectURL,ft=-1!==rt.indexOf("Windows Phone"),lt={opera:it.isOpera(),webkit:ct,ie:!(!it.isIE()&&!it.isEdge())&&it.version.major,gecko:it.isFirefox(),mac:at.isOSX()||at.isiOS(),iOS:ut.isiPad()||ut.isiPhone(),android:at.isAndroid(),contentEditable:!0,transparentSrc:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",caretAfter:!0,range:window.getSelection&&"Range"in window,documentMode:it.isIE()?document.documentMode||7:10,fileApi:st,ceFalse:!0,cacheSuffix:null,container:null,experimentalShadowDom:!1,canHaveCSP:!it.isIE(),desktop:ut.isDesktop(),windowsPhone:ft,browser:{current:it.current,version:it.version,isChrome:it.isChrome,isEdge:it.isEdge,isFirefox:it.isFirefox,isIE:it.isIE,isOpera:it.isOpera,isSafari:it.isSafari},os:{current:at.current,version:at.version,isAndroid:at.isAndroid,isChromeOS:at.isChromeOS,isFreeBSD:at.isFreeBSD,isiOS:at.isiOS,isLinux:at.isLinux,isOSX:at.isOSX,isSolaris:at.isSolaris,isWindows:at.isWindows},deviceType:{isDesktop:ut.isDesktop,isiPad:ut.isiPad,isiPhone:ut.isiPhone,isPhone:ut.isPhone,isTablet:ut.isTablet,isTouch:ut.isTouch,isWebView:ut.isWebView}},dt=/^\s*|\s*$/g,mt=function(e){return null==e?"":(""+e).replace(dt,"")},gt=function(e,t){return t?!("array"!==t||!we(e))||typeof e===t:void 0!==e},pt=function(e,t,n,r){r=r||this,e&&(n&&(e=e[n]),xe(e,function(e,o){if(!1===t.call(r,e,o,n))return!1;pt(e,t,n,r)}))},ht={trim:mt,isArray:we,is:gt,toArray:function(e){if(we(e))return e;for(var t=[],n=0,r=e.length;n<r;n++)t[n]=e[n];return t},makeMap:function(e,t,n){var r;for(t=t||",","string"==typeof(e=e||[])&&(e=e.split(t)),n=n||{},r=e.length;r--;)n[e[r]]={};return n},each:xe,map:Se,grep:Ne,inArray:Ee,hasOwn:ye,extend:function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=0;r<t.length;r++){var o=t[r];for(var i in o)if(ye(o,i)){var a=o[i];void 0!==a&&(e[i]=a)}}return e},create:function(e,t,n){var r,o,i,a=0,u=(e=/^((static) )?([\w.]+)(:([\w.]+))?/.exec(e))[3].match(/(^|\.)(\w+)$/i)[2],c=this.createNS(e[3].replace(/\.\w+$/,""),n);if(!c[u]){if("static"===e[2])return c[u]=t,void(this.onCreate&&this.onCreate(e[2],e[3],c[u]));t[u]||(t[u]=function(){},a=1),c[u]=t[u],this.extend(c[u].prototype,t),e[5]&&(r=this.resolve(e[5]).prototype,o=e[5].match(/\.(\w+)$/i)[1],i=c[u],c[u]=a?function(){return r[o].apply(this,arguments)}:function(){return this.parent=r[o],i.apply(this,arguments)},c[u].prototype[u]=c[u],this.each(r,function(e,t){c[u].prototype[t]=r[t]}),this.each(t,function(e,t){r[t]?c[u].prototype[t]=function(){return this.parent=r[t],e.apply(this,arguments)}:t!==u&&(c[u].prototype[t]=e)})),this.each(t.static,function(e,t){c[u][t]=e})}},walk:pt,createNS:function(e,t){var n,r;for(t=t||window,e=e.split("."),n=0;n<e.length;n++)t[r=e[n]]||(t[r]={}),t=t[r];return t},resolve:function(e,t){var n,r;for(t=t||window,n=0,r=(e=e.split(".")).length;n<r&&(t=t[e[n]]);n++);return t},explode:function(e,t){return!e||gt(e,"array")?e:Se(e.split(t||","),mt)},_addCacheSuffix:function(e){var t=lt.cacheSuffix;return t&&(e+=(-1===e.indexOf("?")?"?":"&")+t),e}},vt=function(e){if(null==e)throw new Error("Node cannot be null or undefined");return{dom:e}},bt={fromHtml:function(e,t){var n=(t||document).createElement("div");if(n.innerHTML=e,!n.hasChildNodes()||n.childNodes.length>1)throw console.error("HTML does not have a single root node",e),new Error("HTML must have a single root node");return vt(n.childNodes[0])},fromTag:function(e,t){var n=(t||document).createElement(e);return vt(n)},fromText:function(e,t){var n=(t||document).createTextNode(e);return vt(n)},fromDom:vt,fromPoint:function(e,t,n){return I.from(e.dom.elementFromPoint(t,n)).map(vt)}},yt=function(e,t){var n=[],r=function(e){return n.push(e),t(e)},o=t(e);do{o=o.bind(r)}while(o.isSome());return n},Ct=function(e,t){var n=e.dom;if(1!==n.nodeType)return!1;var r=n;if(void 0!==r.matches)return r.matches(t);
90if(void 0!==r.msMatchesSelector)return r.msMatchesSelector(t);if(void 0!==r.webkitMatchesSelector)return r.webkitMatchesSelector(t);if(void 0!==r.mozMatchesSelector)return r.mozMatchesSelector(t);throw new Error("Browser lacks native selectors")},wt=function(e){return 1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType||0===e.childElementCount},xt=function(e,t){return e.dom===t.dom},St=function(e,t){return n=e.dom,r=t.dom,function(e,t,n){return 0!=(e.compareDocumentPosition(t)&n)}(n,r,Node.DOCUMENT_POSITION_CONTAINED_BY);var n,r},Nt=function(e,t){return nt().browser.isIE()?St(e,t):function(e,t){var n=e.dom,r=t.dom;return n!==r&&n.contains(r)}(e,t)};"undefined"!=typeof window?window:Function("return this;")();var Et=function(e){return e.dom.nodeName.toLowerCase()},kt=function(e){return e.dom.nodeType},_t=function(e){return function(t){return kt(t)===e}},At=_t(1),Rt=_t(3),Dt=_t(9),Tt=_t(11),Ot=function(e){return bt.fromDom(e.dom.ownerDocument)},Bt=function(e){return Dt(e)?e:Ot(e)},Pt=function(e){return bt.fromDom(Bt(e).dom.defaultView)},Lt=function(e){return I.from(e.dom.parentNode).map(bt.fromDom)},It=function(e){return I.from(e.dom.previousSibling).map(bt.fromDom)},Mt=function(e){return I.from(e.dom.nextSibling).map(bt.fromDom)},Ft=function(e){return te(yt(e,It))},Ut=function(e){return yt(e,Mt)},zt=function(e){return V(e.dom.childNodes,bt.fromDom)},Ht=function(e,t){var n=e.dom.childNodes;return I.from(n[t]).map(bt.fromDom)},jt=function(e){return Ht(e,0)},Vt=function(e){return Ht(e,e.dom.childNodes.length-1)},qt=function(e){return e.dom.childNodes.length},$t=function(e){return Tt(e)&&b(e.dom.host)},Wt=y(Element.prototype.attachShadow)&&y(Node.prototype.getRootNode),Kt=N(Wt),Xt=Wt?function(e){return bt.fromDom(e.dom.getRootNode())}:Bt,Yt=function(e){return $t(e)?e:function(e){var t=e.dom.head;if(null==t)throw new Error("Head is not available yet");return bt.fromDom(t)}(Bt(e))},Gt=function(e){return bt.fromDom(e.dom.host)},Jt=function(e){return b(e.dom.shadowRoot)},Qt=function(e,t){Lt(e).each(function(n){n.dom.insertBefore(t.dom,e.dom)})},Zt=function(e,t){Mt(e).fold(function(){Lt(e).each(function(e){tn(e,t)})},function(e){Qt(e,t)})},en=function(e,t){jt(e).fold(function(){tn(e,t)},function(n){e.dom.insertBefore(t.dom,n.dom)})},tn=function(e,t){e.dom.appendChild(t.dom)},nn=function(e,t){q(t,function(t){tn(e,t)})},rn=function(e){e.dom.textContent="",q(zt(e),function(e){on(e)})},on=function(e){var t=e.dom;null!==t.parentNode&&t.parentNode.removeChild(t)},an=function(e){var t,n=zt(e);n.length>0&&(t=e,q(n,function(e){Qt(t,e)})),on(e)},un=function(e){var t=Rt(e)?e.dom.parentNode:e.dom;if(null==t||null===t.ownerDocument)return!1;var n,r,o=t.ownerDocument;return(n=bt.fromDom(t),r=Xt(n),$t(r)?I.some(r):I.none()).fold(function(){return o.body.contains(t)},S(un,Gt))},cn=function(e,t){return{left:e,top:t,translate:function(n,r){return cn(e+n,t+r)}}},sn=cn,fn=function(e,t){return void 0!==e?e:void 0!==t?t:0},ln=function(e){var t=e.dom,n=t.ownerDocument.body;return n===t?sn(n.offsetLeft,n.offsetTop):un(e)?function(e){var t=e.getBoundingClientRect();return sn(t.left,t.top)}(t):sn(0,0)},dn=function(e){var t=void 0!==e?e.dom:document,n=t.body.scrollLeft||t.documentElement.scrollLeft,r=t.body.scrollTop||t.documentElement.scrollTop;return sn(n,r)},mn=function(e,t,n){var r=(void 0!==n?n.dom:document).defaultView;r&&r.scrollTo(e,t)},gn=function(e,t){nt().browser.isSafari()&&y(e.dom.scrollIntoViewIfNeeded)?e.dom.scrollIntoViewIfNeeded(!1):e.dom.scrollIntoView(t)},pn=function(e,t,n,r){return{x:e,y:t,width:n,height:r,right:e+n,bottom:t+r}},hn=function(e){var t=void 0===e?window:e,n=t.document,r=dn(bt.fromDom(n));return function(e){var t=void 0===e?window:e;return nt().browser.isFirefox()?I.none():I.from(t.visualViewport)}(t).fold(function(){var e=t.document.documentElement,n=e.clientWidth,o=e.clientHeight;return pn(r.left,r.top,n,o)},function(e){return pn(Math.max(e.pageLeft,r.left),Math.max(e.pageTop,r.top),e.width,e.height)})},vn=function(e){return function(t){return!!t&&t.nodeType===e}},bn=function(e){return!!e&&!Object.getPrototypeOf(e)},yn=vn(1),Cn=function(e){var t=e.map(function(e){return e.toLowerCase()});return function(e){if(e&&e.nodeName){var n=e.nodeName.toLowerCase();return H(t,n)}return!1}},wn=function(e,t){var n=t.toLowerCase().split(" ");return function(t){if(yn(t))for(var r=0;r<n.length;r++){var o=t.ownerDocument.defaultView.getComputedStyle(t,null);if((o?o.getPropertyValue(e):null)===n[r])return!0}return!1}},xn=function(e){return function(t){return yn(t)&&t.hasAttribute(e)}},Sn=function(e){return yn(e)&&e.hasAttribute("data-mce-bogus")},Nn=function(e){return yn(e)&&"TABLE"===e.tagName},En=function(e){return function(t){if(yn(t)){if(t.contentEditable===e)return!0;
90if(t.getAttribute("data-mce-contenteditable")===e)return!0}return!1}},kn=Cn(["textarea","input"]),_n=vn(3),An=vn(8),Rn=vn(9),Dn=vn(11),Tn=Cn(["br"]),On=Cn(["img"]),Bn=En("true"),Pn=En("false"),Ln=Cn(["td","th"]),In=Cn(["video","audio","object","embed"]),Mn=function(e,t,n){return void 0===n&&(n=k),e.exists(function(e){return n(e,t)})},Fn=function(e,t,n){return e.isSome()&&t.isSome()?I.some(n(e.getOrDie(),t.getOrDie())):I.none()},Un=function(e){return void 0!==e.style&&y(e.style.getPropertyValue)},zn=function(e,t,n){if(!(l(n)||p(n)||C(n)))throw console.error("Invalid call to Attribute.set. Key ",t,":: Value ",n,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(t,n+"")},Hn=function(e,t,n){zn(e.dom,t,n)},jn=function(e,t){var n=e.dom;le(t,function(e,t){zn(n,t,e)})},Vn=function(e,t){var n=e.dom.getAttribute(t);return null===n?void 0:n},qn=function(e,t){return I.from(Vn(e,t))},$n=function(e,t){var n=e.dom;return!(!n||!n.hasAttribute)&&n.hasAttribute(t)},Wn=function(e,t){e.dom.removeAttribute(t)},Kn=function(e,t){var n=e.dom;le(t,function(e,t){!function(e,t,n){if(!l(n))throw console.error("Invalid call to CSS.set. Property ",t,":: Value ",n,":: Element ",e),new Error("CSS value must be a string: "+n);Un(e)&&e.style.setProperty(t,n)}(n,t,e)})},Xn=function(e,t){var n=e.dom,r=window.getComputedStyle(n).getPropertyValue(t);return""!==r||un(e)?r:Yn(n,t)},Yn=function(e,t){return Un(e)?e.style.getPropertyValue(t):""},Gn=function(e,t){var n=e.dom,r=Yn(n,t);return I.from(r).filter(function(e){return e.length>0})},Jn=function(e){var t={},n=e.dom;if(Un(n))for(var r=0;r<n.style.length;r++){var o=n.style.item(r);t[o]=n.style[o]}return t},Qn=nt().browser,Zn=function(e){return J(e,At)},er=function(e,t){return e.children&&H(e.children,t)},tr=function(e,t,n){var r=0,o=0,i=e.ownerDocument;if(n=n||e,t){if(n===e&&t.getBoundingClientRect&&"static"===Xn(bt.fromDom(e),"position")){var a=t.getBoundingClientRect();return{x:r=a.left+(i.documentElement.scrollLeft||e.scrollLeft)-i.documentElement.clientLeft,y:o=a.top+(i.documentElement.scrollTop||e.scrollTop)-i.documentElement.clientTop}}for(var u=t;u&&u!==n&&u.nodeType&&!er(u,n);){var c=u;r+=c.offsetLeft||0,o+=c.offsetTop||0,u=c.offsetParent}for(u=t.parentNode;u&&u!==n&&u.nodeType&&!er(u,n);)r-=u.scrollLeft||0,o-=u.scrollTop||0,u=u.parentNode;o+=function(e){return Qn.isFirefox()&&"table"===Et(e)?Zn(zt(e)).filter(function(e){return"caption"===Et(e)}).bind(function(e){return Zn(Ut(e)).map(function(t){var n=t.dom.offsetTop,r=e.dom.offsetTop,o=e.dom.offsetHeight;return n<=r?-o:0})}).getOr(0):0}(bt.fromDom(t))}return{x:r,y:o}},nr={},rr={exports:nr};!function(e,n,r,o){!function(t,o){"object"==typeof n&&void 0!==r?r.exports=o():"function"==typeof e&&e.amd?e(o):(t="undefined"!=typeof globalThis?globalThis:t||self).EphoxContactWrapper=o()}(this,function(){var e,n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:{},r={exports:{}};e=r,function(t){var n=setTimeout;function r(){}function o(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],f(e,this)}function i(e,t){for(;3===e._state;)e=e._value;0!==e._state?(e._handled=!0,o._immediateFn(function(){var n=1===e._state?t.onFulfilled:t.onRejected;if(null!==n){var r;try{r=n(e._value)}catch(o){return void u(t.promise,o)}a(t.promise,r)}else(1===e._state?a:u)(t.promise,e._value)})):e._deferreds.push(t)}function a(e,t){try{if(t===e)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"==typeof t||"function"==typeof t)){var n=t.then;if(t instanceof o)return e._state=3,e._value=t,void c(e);if("function"==typeof n)return void f((r=n,i=t,function(){r.apply(i,arguments)}),e)}e._state=1,e._value=t,c(e)}catch(a){u(e,a)}var r,i}function u(e,t){e._state=2,e._value=t,c(e)}function c(e){2===e._state&&0===e._deferreds.length&&o._immediateFn(function(){e._handled||o._unhandledRejectionFn(e._value)});for(var t=0,n=e._deferreds.length;t<n;t++)i(e,e._deferreds[t]);e._deferreds=null}function s(e,t,n){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.promise=n}function f(e,t){var n=!1;try{e(function(e){n||(n=!0,a(t,e))},function(e){n||(n=!0,u(t,e))})}catch(r){if(n)return;n=!0,u(t,r)}}o.prototype.catch=function(e){return this.then(null,e)},o.prototype.then=function(e,t){var n=new this.constructor(r);return i(this,new s(e,t,n)),n},o.all=function(e){var t=Array.prototype.slice.call(e);return new o(function(e,n){if(0===t.length)return e([]);var r=t.length;
90function o(i,a){try{if(a&&("object"==typeof a||"function"==typeof a)){var u=a.then;if("function"==typeof u)return void u.call(a,function(e){o(i,e)},n)}t[i]=a,0==--r&&e(t)}catch(c){n(c)}}for(var i=0;i<t.length;i++)o(i,t[i])})},o.resolve=function(e){return e&&"object"==typeof e&&e.constructor===o?e:new o(function(t){t(e)})},o.reject=function(e){return new o(function(t,n){n(e)})},o.race=function(e){return new o(function(t,n){for(var r=0,o=e.length;r<o;r++)e[r].then(t,n)})},o._immediateFn="function"==typeof setImmediate?function(e){setImmediate(e)}:function(e){n(e,0)},o._unhandledRejectionFn=function(e){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",e)},o._setImmediateFn=function(e){o._immediateFn=e},o._setUnhandledRejectionFn=function(e){o._unhandledRejectionFn=e},e.exports?e.exports=o:t.Promise||(t.Promise=o)}(n);var o=r.exports;return{boltExport:("undefined"!=typeof window?window:Function("return this;")()).Promise||o}})}(void 0,nr,rr);var or=rr.exports.boltExport,ir=function(e){var t=I.none(),n=[],r=function(e){o()?a(e):n.push(e)},o=function(){return t.isSome()},i=function(e){q(e,a)},a=function(e){t.each(function(t){setTimeout(function(){e(t)},0)})};return e(function(e){o()||(t=I.some(e),i(n),n=[])}),{get:r,map:function(e){return ir(function(t){r(function(n){t(e(n))})})},isReady:o}},ar={nu:ir,pure:function(e){return ir(function(t){t(e)})}},ur=function(e){setTimeout(function(){throw e},0)},cr=function(e){var t=function(t){e().then(t,ur)};return{map:function(t){return cr(function(){return e().then(t)})},bind:function(t){return cr(function(){return e().then(function(e){return t(e).toPromise()})})},anonBind:function(t){return cr(function(){return e().then(function(){return t.toPromise()})})},toLazy:function(){return ar.nu(t)},toCached:function(){var t=null;return cr(function(){return null===t&&(t=e()),t})},toPromise:e,get:t}},sr=function(e){return cr(function(){return new or(e)})},fr=function(e,t){return t(function(t){var n=[],r=0;0===e.length?t([]):q(e,function(o,i){o.get(function(o){return function(i){n[o]=i,++r>=e.length&&t(n)}}(i))})})},lr=function(e){return{isValue:O,isError:T,getOr:N(e),getOrThunk:N(e),getOrDie:N(e),or:function(t){return lr(e)},orThunk:function(t){return lr(e)},fold:function(t,n){return n(e)},map:function(t){return lr(t(e))},mapError:function(t){return lr(e)},each:function(t){t(e)},bind:function(t){return t(e)},exists:function(t){return t(e)},forall:function(t){return t(e)},toOptional:function(){return I.some(e)}}},dr=function(e){return{isValue:T,isError:O,getOr:E,getOrThunk:function(e){return e()},getOrDie:function(){return(t=String(e),function(){throw new Error(t)})();var t},or:E,orThunk:function(e){return e()},fold:function(t,n){return t(e)},map:function(t){return dr(e)},mapError:function(t){return dr(t(e))},each:w,bind:function(t){return dr(e)},exists:T,forall:O,toOptional:I.none}},mr={value:lr,error:dr,fromOption:function(e,t){return e.fold(function(){return dr(t)},lr)}},gr=function(e){if(!m(e))throw new Error("cases must be an array");if(0===e.length)throw new Error("there must be at least one case");var t=[],n={};return q(e,function(r,o){var i=se(r);if(1!==i.length)throw new Error("one and only one name per case");var a=i[0],u=r[a];if(void 0!==n[a])throw new Error("duplicate key detected:"+a);if("cata"===a)throw new Error("cannot have a case named cata (sorry)");if(!m(u))throw new Error("case arguments must be an array");t.push(a),n[a]=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=n.length;if(i!==u.length)throw new Error("Wrong number of arguments to case "+a+". Expected "+u.length+" ("+u+"), got "+i);return{fold:function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];if(t.length!==e.length)throw new Error("Wrong number of arguments to fold. Expected "+e.length+", got "+t.length);return t[o].apply(null,n)},match:function(e){var r=se(e);if(t.length!==r.length)throw new Error("Wrong number of arguments to match. Expected: "+t.join(",")+"\nActual: "+r.join(","));if(!ee(t,function(e){return H(r,e)}))throw new Error("Not all branches were specified when using match. Specified: "+r.join(", ")+"\nRequired: "+t.join(", "));return e[a].apply(null,n)},log:function(e){console.log(e,{constructors:t,constructor:a,params:n})}}}}),n};gr([{bothErrors:["error1","error2"]},{firstError:["error1","value2"]},{secondError:["value1","error2"]},{bothValues:["value1","value2"]}]);var pr=function(e){return e.fold(E,E)};function hr(e,t,n,r,o){return e(n,r)?I.some(n):y(o)&&o(n)?I.none():t(n,r,o)}var vr,br,yr,Cr,wr,xr,Sr,Nr,Er,kr,_r,Ar,Rr,Dr,Tr,Or,Br,Pr,Lr,Ir,Mr=function(e,t,n){for(var r=e.dom,o=y(n)?n:T;r.parentNode;){r=r.parentNode;var i=bt.fromDom(r);if(t(i))return I.some(i);if(o(i))break}return I.none()},Fr=function(e,t,n){return hr(function(e,t){return t(e)},Mr,e,t,n)},Ur=function(e,t){return J(e.dom.childNodes,function(e){return t(bt.fromDom(e))}).map(bt.fromDom)},zr=function(e,t,n){return Mr(e,function(e){return Ct(e,t)},n)},Hr=function(e,t){return function(e,t){var n=void 0===t?document:t.dom;return wt(n)?I.none():I.from(n.querySelector(e)).map(bt.fromDom)}(t,e)},jr=function(e,t,n){return hr(function(e,t){return Ct(e,t)},zr,e,t,n)},Vr=window.Promise?window.Promise:or,qr=function(e,t){return"number"!=typeof t&&(t=0),setTimeout(e,t)},$r=function(e,t){return"number"!=typeof t&&(t=1),setInterval(e,t)},Wr=function(e,t){var n,r=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];clearTimeout(n),n=qr(function(){e.apply(this,r)},t)};return r.stop=function(){clearTimeout(n)},r},Kr={requestAnimationFrame:function(e,t){vr?vr.then(e):vr=new Vr(function(e){t||(t=document.body),function(e,t){for(var n=window.requestAnimationFrame,r=["ms","moz","
90webkit"],o=0;o<r.length&&!n;o++)n=window[r[o]+"RequestAnimationFrame"];n||(n=function(e){window.setTimeout(e,0)}),n(e,t)}(e,t)}).then(e)},setTimeout:qr,setInterval:$r,setEditorTimeout:function(e,t,n){return qr(function(){e.removed||t()},n)},setEditorInterval:function(e,t,n){var r=$r(function(){e.removed?clearInterval(r):t()},n);return r},debounce:Wr,throttle:Wr,clearInterval:function(e){return clearInterval(e)},clearTimeout:function(e){return clearTimeout(e)}},Xr=function(e,t){void 0===t&&(t={});var n=0,r={},o=bt.fromDom(e),i=Bt(o),a=t.maxLoadTime||5e3,u=function(u,c,s){var f,l=ht._addCacheSuffix(u),d=function(e){return be(r,e).getOrThunk(function(){return{id:"mce-u"+n++,passed:[],failed:[],count:0}})}(l);r[l]=d,d.count++;var m=function(e,t){for(var n=e.length;n--;)e[n]();d.status=t,d.passed=[],d.failed=[],f&&(f.onload=null,f.onerror=null,f=null)},g=function(){return m(d.passed,2)},p=function(){return m(d.failed,3)},h=function(){var t;t=h,function(){for(var t=e.styleSheets,n=t.length;n--;){var r=t[n].ownerNode;if(r&&r.id===f.id)return g(),!0}return!1}()||(Date.now()-y<a?Kr.setTimeout(t):p())};if(c&&d.passed.push(c),s&&d.failed.push(s),1!==d.status)if(2!==d.status)if(3!==d.status){d.status=1;var v=bt.fromTag("link",i.dom);jn(v,{rel:"stylesheet",type:"text/css",id:d.id});var b,y=Date.now();t.contentCssCors&&Hn(v,"crossOrigin","anonymous"),t.referrerPolicy&&Hn(v,"referrerpolicy",t.referrerPolicy),(f=v.dom).onload=h,f.onerror=p,b=v,tn(Yt(o),b),Hn(v,"href",l)}else p();else g()},c=function(e){return sr(function(t){u(e,x(t,N(mr.value(e))),x(t,N(mr.error(e))))})},s=function(e){var t=ht._addCacheSuffix(e);be(r,t).each(function(e){var n,i;0===--e.count&&(delete r[t],n=e.id,i=Yt(o),Hr(i,"#"+n).each(on))})};return{load:u,loadAll:function(e,t,n){var r;(r=V(e,c),fr(r,sr)).get(function(e){var r=W(e,function(e){return e.isValue()});r.fail.length>0?n(r.fail.map(pr)):t(r.pass.map(pr))})},unload:s,unloadAll:function(e){q(e,function(e){s(e)})},_setReferrerPolicy:function(e){t.referrerPolicy=e}}},Yr=function(){var e=new WeakMap;return{forElement:function(t,n){var r=Xt(t).dom;return I.from(e.get(r)).getOrThunk(function(){var t=Xr(r,n);return e.set(r,t),t})}}}(),Gr=function(){function e(e,t){this.node=e,this.rootNode=t,this.current=this.current.bind(this),this.next=this.next.bind(this),this.prev=this.prev.bind(this),this.prev2=this.prev2.bind(this)}return e.prototype.current=function(){return this.node},e.prototype.next=function(e){return this.node=this.findSibling(this.node,"firstChild","nextSibling",e),this.node},e.prototype.prev=function(e){return this.node=this.findSibling(this.node,"lastChild","previousSibling",e),this.node},e.prototype.prev2=function(e){return this.node=this.findPreviousNode(this.node,"lastChild","previousSibling",e),this.node},e.prototype.findSibling=function(e,t,n,r){var o,i;if(e){if(!r&&e[t])return e[t];if(e!==this.rootNode){if(o=e[n])return o;for(i=e.parentNode;i&&i!==this.rootNode;i=i.parentNode)if(o=i[n])return o}}},e.prototype.findPreviousNode=function(e,t,n,r){var o,i,a;if(e){if(o=e[n],this.rootNode&&o===this.rootNode)return;if(o){if(!r)for(a=o[t];a;a=a[t])if(!a[t])return a;return o}if((i=e.parentNode)&&i!==this.rootNode)return i}},e}(),Jr=function(e){var t;return function(n){return t=t||function(e,t){for(var n={},r=0,o=e.length;r<o;r++){var i=e[r];n[String(i)]=t(i,r)}return n}(e,O),ye(t,Et(n))}},Qr=Jr(["h1","h2","h3","h4","h5","h6"]),Zr=Jr(["article","aside","details","div","dt","figcaption","footer","form","fieldset","header","hgroup","html","main","nav","section","summary","body","p","dl","multicol","dd","figure","address","center","blockquote","h1","h2","h3","h4","h5","h6","listing","xmp","pre","plaintext","menu","dir","ul","ol","li","hr","table","tbody","thead","tfoot","th","tr","td","caption"]),eo=function(e){return At(e)&&!Zr(e)},to=function(e){return At(e)&&"br"===Et(e)},no=Jr(["h1","h2","h3","h4","h5","h6","p","div","address","pre","form","blockquote","center","dir","fieldset","header","footer","article","section","hgroup","aside","nav","figure"]),ro=Jr(["ul","ol","dl"]),oo=Jr(["li","dd","dt"]),io=Jr(["thead","tbody","tfoot"]),ao=Jr(["td","th"]),uo=Jr(["pre","script","textarea","style"]),co="\ufeff",so=function(e){return"\ufeff"===e},fo=function(e){return e.replace(/\uFEFF/g,"")},lo=yn,mo=_n,go=function(e){return mo(e)&&(e=e.parentNode),lo(e)&&e.hasAttribute("data-mce-caret")},po=function(e){return mo(e)&&so(e.data)},ho=function(e){return go(e)||po(e)}
90,vo=function(e){return e.firstChild!==e.lastChild||!Tn(e.firstChild)},bo=function(e){var t=e.container();return!!_n(t)&&(t.data.charAt(e.offset())===co||e.isAtStart()&&po(t.previousSibling))},yo=function(e){var t=e.container();return!!_n(t)&&(t.data.charAt(e.offset()-1)===co||e.isAtEnd()&&po(t.nextSibling))},Co=function(e,t,n){var r,o=t.ownerDocument.createElement(e);o.setAttribute("data-mce-caret",n?"before":"after"),o.setAttribute("data-mce-bogus","all"),o.appendChild(((r=document.createElement("br")).setAttribute("data-mce-bogus","1"),r));var i=t.parentNode;return n?i.insertBefore(o,t):t.nextSibling?i.insertBefore(o,t.nextSibling):i.appendChild(o),o},wo=function(e){return mo(e)&&e.data[0]===co},xo=function(e){return mo(e)&&e.data[e.data.length-1]===co},So=function(e){return e&&e.hasAttribute("data-mce-caret")?(t=e.getElementsByTagName("br"),n=t[t.length-1],Sn(n)&&n.parentNode.removeChild(n),e.removeAttribute("data-mce-caret"),e.removeAttribute("data-mce-bogus"),e.removeAttribute("style"),e.removeAttribute("_moz_abspos"),e):null;var t,n},No=function(e){return go(e.startContainer)},Eo=Bn,ko=Pn,_o=Tn,Ao=_n,Ro=Cn(["script","style","textarea"]),Do=Cn(["img","input","textarea","hr","iframe","video","audio","object","embed"]),To=Cn(["table"]),Oo=ho,Bo=function(e){return!Oo(e)&&(Ao(e)?!Ro(e.parentNode):Do(e)||_o(e)||To(e)||Po(e))},Po=function(e){return!1===function(e){return yn(e)&&"true"===e.getAttribute("unselectable")}(e)&&ko(e)},Lo=function(e,t){return Bo(e)&&function(e,t){for(e=e.parentNode;e&&e!==t;e=e.parentNode){if(Po(e))return!1;if(Eo(e))return!0}return!0}(e,t)},Io=/^[ \t\r\n]*$/,Mo=function(e){return Io.test(e)},Fo=function(e,t){var n,r,o,i=bt.fromDom(t),a=bt.fromDom(e);return n=a,r="pre,code",o=_(xt,i),zr(n,r,o).isSome()},Uo=function(e,t){return Bo(e)&&!1===function(e,t){return _n(e)&&Mo(e.data)&&!1===Fo(e,t)}(e,t)||function(e){return yn(e)&&"A"===e.nodeName&&!e.hasAttribute("href")&&(e.hasAttribute("name")||e.hasAttribute("id"))}(e)||zo(e)},zo=xn("data-mce-bookmark"),Ho=xn("data-mce-bogus"),jo=(br="data-mce-bogus",yr="all",function(e){return yn(e)&&e.getAttribute(br)===yr}),Vo=function(e,t){return void 0===t&&(t=!0),function(e,t){var n=0;if(Uo(e,e))return!1;var r=e.firstChild;if(!r)return!0;var o=new Gr(r,e);do{if(t){if(jo(r)){r=o.next(!0);continue}if(Ho(r)){r=o.next();continue}}if(Tn(r))n++,r=o.next();else{if(Uo(r,e))return!1;r=o.next()}}while(r);return n<=1}(e.dom,t)},qo=function(e,t){return b(e)&&(Uo(e,t)||eo(bt.fromDom(e)))},$o=function(e){return function(e){return"span"===e.nodeName.toLowerCase()}(e)&&"bookmark"===e.getAttribute("data-mce-type")},Wo=function(e,t){return _n(e)&&e.data.length>0&&function(e,t){var n=new Gr(e,t).prev(!1),r=new Gr(e,t).next(!1),o=h(n)||qo(n,t),i=h(r)||qo(r,t);return o&&i}(e,t)},Ko=function(e,t,n){var r=n||t;if(yn(t)&&$o(t))return t;for(var o=t.childNodes,i=o.length-1;i>=0;i--)Ko(e,o[i],r);if(yn(t)){var a=t.childNodes;1===a.length&&$o(a[0])&&t.parentNode.insertBefore(a[0],t)}return function(e){return Dn(e)||Rn(e)}(t)||Uo(t,r)||function(e){return!!yn(e)&&e.childNodes.length>0}(t)||Wo(t,r)||e.remove(t),t},Xo=ht.makeMap,Yo=/[&<>\"\u0060\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Go=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Jo=/[<>&\"\']/g,Qo=/&#([a-z0-9]+);?|&([a-z0-9]+);/gi,Zo={128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"},ei={'"':"&quot;","'":"&#39;","<":"&lt;",">":"&gt;","&":"&amp;","`":"&#96;"},ti={"&lt;":"<","&gt;":">","&amp;":"&","&quot;":'"',"&apos;":"'"},ni=function(e,t){var n,r,o,i={};if(e){for(e=e.split(","),t=t||10,n=0;n<e.length;n+=2)r=String.fromCharCode(parseInt(e[n],t)),ei[r]||(o="&"+e[n+1]+";",i[r]=o,i[o]=r);return i}},ri=ni("50,nbsp,51,iexcl,52,cent,53,pound,54,curren,55,yen,56,brvbar,57,sect,58,uml,59,copy,5a,ordf,5b,laquo,5c,not,5d,shy,5e,reg,5f,macr,5g,deg,5h,plusmn,5i,sup2,5j,sup3,5k,acute,5l,micro,5m,para,5n,middot,5o,cedil,5p,sup1,5q,ordm,5r,raquo,5s,frac14,5t,frac12,5u,frac34,5v,iquest,60,Agrave,61,Aacute,62,Acirc,63,Atilde,64,Auml,65,Aring,66,AElig,67,Ccedil,68,Egrave,69,Eacute,6a,Ecirc,6b,Euml,6c,Igrave,6d,Iacute,6e,Icirc,6f,Iuml,6g,ETH,6h,Ntilde,6i,Ograve,6j,Oacute,6k,Ocirc,6l,Otilde,6m,Ouml,6n,times,6o,Oslash,6p,Ugrave,6q,Uacute,6r,Ucirc,6s,Uuml,6t,Yacute,6u,THORN,6v,szlig,70,agrave,71,aacute,72,acirc,73,atilde,74,auml,75,aring,76,aelig,77,ccedil,78,egrave,79,eacute,7a,ecirc,7b,euml,7c,igrave,7d,iacute,7e,icirc,7f,iuml,7g,eth,7h,ntilde,7i,ograve,7j,oacute,7k,ocirc,7l,otilde,7m,ouml,7n,divide,7o,oslash,7p,ugrave,7q,uacute,7r,ucirc,7s,uuml,7t,yacute,7u,thorn,7v,yuml,ci,fnof,sh,Alpha,si,Beta,sj,Gamma,sk,Delta,sl,Epsilon,sm,Zeta,sn,Eta,so,Theta,sp,Iota,sq,Kappa,sr,Lambda,ss,Mu,st,Nu,su,Xi,sv,Omicron,t0,Pi,t1,Rho,t3,Sigma,t4,Tau,t5,Upsilon,t6,Phi,t7,Chi,t8,Psi,t9,Omega,th,alpha,ti,beta,tj,gamma,tk,delta,tl,epsilon,tm,zeta,tn,eta,to,theta,tp,iota,tq,kappa,tr,lambda,ts,mu,tt,nu,tu,xi,tv,omicron,u0,pi,u1,rho,u2,sigmaf,u3,sigma,u4,tau,u5,upsilon,u6,phi,u7,chi,u8,psi,u9,omega,uh,thetasym,ui,upsih,um,piv,812,bull,816,hellip,81i,prime,81j,Prime,81u,oline,824,frasl,88o,weierp,88h,image,88s,real,892,trade,89l,alefsym,8cg,larr,8ch,uarr,8ci,rarr,8cj,darr,8ck,harr,8dl,crarr,8eg,lArr,8eh,uArr,8ei,rArr,8ej,dArr,8ek,hArr,8g0,forall,8g2,part,8g3,exist,8g5,empty,8g7,nabla,8g8,isin,8g9,notin,8gb,ni,8gf,prod,8gh,sum,8gi,minus,8gn,lowast,8gq,radic,8gt,prop,8gu,infin,8h0,ang,8h7,and,8h8,or,8h9,cap,8ha,cup,8hb,int,8hk,there4,8hs,sim,8i5,cong,8i8,asymp,8j0,ne,8j1,equiv,8j4,le,8j5,ge,8k2,sub,8k3,sup,8
90k4,nsub,8k6,sube,8k7,supe,8kl,oplus,8kn,otimes,8l5,perp,8m5,sdot,8o8,lceil,8o9,rceil,8oa,lfloor,8ob,rfloor,8p9,lang,8pa,rang,9ea,loz,9j0,spades,9j3,clubs,9j5,hearts,9j6,diams,ai,OElig,aj,oelig,b0,Scaron,b1,scaron,bo,Yuml,m6,circ,ms,tilde,802,ensp,803,emsp,809,thinsp,80c,zwnj,80d,zwj,80e,lrm,80f,rlm,80j,ndash,80k,mdash,80o,lsquo,80p,rsquo,80q,sbquo,80s,ldquo,80t,rdquo,80u,bdquo,810,dagger,811,Dagger,81g,permil,81p,lsaquo,81q,rsaquo,85c,euro",32),oi=function(e,t){return e.replace(t?Yo:Go,function(e){return ei[e]||e})},ii=function(e,t){return e.replace(t?Yo:Go,function(e){return e.length>1?"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";":ei[e]||"&#"+e.charCodeAt(0)+";"})},ai=function(e,t,n){return n=n||ri,e.replace(t?Yo:Go,function(e){return ei[e]||n[e]||e})},ui={encodeRaw:oi,encodeAllRaw:function(e){return(""+e).replace(Jo,function(e){return ei[e]||e})},encodeNumeric:ii,encodeNamed:ai,getEncodeFunc:function(e,t){var n=ni(t)||ri,r=Xo(e.replace(/\+/g,","));return r.named&&r.numeric?function(e,t){return e.replace(t?Yo:Go,function(e){return void 0!==ei[e]?ei[e]:void 0!==n[e]?n[e]:e.length>1?"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";":"&#"+e.charCodeAt(0)+";"})}:r.named?t?function(e,t){return ai(e,t,n)}:ai:r.numeric?ii:oi},decode:function(e){return e.replace(Qo,function(e,t){return t?(t="x"===t.charAt(0).toLowerCase()?parseInt(t.substr(1),16):parseInt(t,10))>65535?(t-=65536,String.fromCharCode(55296+(t>>10),56320+(1023&t))):Zo[t]||String.fromCharCode(t):ti[e]||ri[e]||(n=e,(r=bt.fromTag("div").dom).innerHTML=n,r.textContent||r.innerText||n);var n,r})}},ci={},si={},fi=ht.makeMap,li=ht.each,di=ht.extend,mi=ht.explode,gi=ht.inArray,pi=function(e,t){return(e=ht.trim(e))?e.split(t||" "):[]},hi=function(e,t){var n=fi(e," ",fi(e.toUpperCase()," "));return di(n,t)},vi=function(e){return hi("td th li dt dd figcaption caption details summary",e.getTextBlockElements())},bi=function(e,t){var n;return e&&(n={},"string"==typeof e&&(e={"*":e}),li(e,function(e,r){n[r]=n[r.toUpperCase()]="map"===t?fi(e,/[, ]/):mi(e,/[, ]/)})),n},yi=function(e){var t,n,r,o,i,a,u,c,s,f,l={},d={},m=[],g={},p={},h=function(t,n,r){var o=e[t];return o?o=fi(o,/[, ]/,fi(o.toUpperCase(),/[, ]/)):(o=ci[t])||(o=hi(n,r),ci[t]=o),o},v=(t=(e=e||{}).schema,c={},s=function(e,t,r){var o,i,a,u=function(e,t){var n,r,o={};for(n=0,r=e.length;n<r;n++)o[e[n]]=t||{};return o};t=t||"","string"==typeof(r=r||[])&&(r=pi(r));var s=pi(e);for(o=s.length;o--;)a={attributes:u(i=pi([n,t].join(" "))),attributesOrder:i,children:u(r,si)},c[s[o]]=a},f=function(e,t){var n,r,o,i,a=pi(e);n=a.length;for(var u=pi(t);n--;)for(r=c[a[n]],o=0,i=u.length;o<i;o++)r.attributes[u[o]]={},r.attributesOrder.push(u[o])},ci[t]?ci[t]:(n="id accesskey class dir lang style tabindex title role",r="address blockquote div dl fieldset form h1 h2 h3 h4 h5 h6 hr menu ol p pre table ul",o="a abbr b bdo br button cite code del dfn em embed i iframe img input ins kbd label map noscript object q s samp script select small span strong sub sup textarea u var #text #comment","html4"!==t&&(n+=" contenteditable contextmenu draggable dropzone hidden spellcheck translate",r+=" article aside details dialog figure main header footer hgroup section nav",o+=" audio canvas command datalist mark meter output picture progress time wbr video ruby bdi keygen"),"html5-strict"!==t&&(n+=" xml:lang",o=[o,u="acronym applet basefont big font strike tt"].join(" "),li(pi(u),function(e){s(e,"",o)}),r=[r,a="center dir isindex noframes"].join(" "),i=[r,o].join(" "),li(pi(a),function(e){s(e,"",i)})),i=i||[r,o].join(" "),s("html","manifest","head body"),s("head","","base command link meta noscript script style title"),s("title hr noscript br"),s("base","href target"),s("link","href rel media hreflang type sizes hreflang"),s("meta","name http-equiv content charset"),s("style","media type scoped"),s("script","src async defer type charset"),s("body","onafterprint onbeforeprint onbeforeunload onblur onerror onfocus onhashchange onload onmessage onoffline ononline onpagehide onpageshow onpopstate onresize onscroll onstorage onunload",i),s("address dt dd div caption","",i),s("h1 h2 h3 h4 h5 h6 pre p abbr co
90de var samp kbd sub sup i b u bdo span legend em strong small s cite dfn","",o),s("blockquote","cite",i),s("ol","reversed start type","li"),s("ul","","li"),s("li","value",i),s("dl","","dt dd"),s("a","href target rel media hreflang type",o),s("q","cite",o),s("ins del","cite datetime",i),s("img","src sizes srcset alt usemap ismap width height"),s("iframe","src name width height",i),s("embed","src type width height"),s("object","data type typemustmatch name usemap form width height",[i,"param"].join(" ")),s("param","name value"),s("map","name",[i,"area"].join(" ")),s("area","alt coords shape href target rel media hreflang type"),s("table","border","caption colgroup thead tfoot tbody tr"+("html4"===t?" col":"")),s("colgroup","span","col"),s("col","span"),s("tbody thead tfoot","","tr"),s("tr","","td th"),s("td","colspan rowspan headers",i),s("th","colspan rowspan headers scope abbr",i),s("form","accept-charset action autocomplete enctype method name novalidate target",i),s("fieldset","disabled form name",[i,"legend"].join(" ")),s("label","form for",o),s("input","accept alt autocomplete checked dirname disabled form formaction formenctype formmethod formnovalidate formtarget height list max maxlength min multiple name pattern readonly required size src step type value width"),s("button","disabled form formaction formenctype formmethod formnovalidate formtarget name type value","html4"===t?i:o),s("select","disabled form multiple name required size","option optgroup"),s("optgroup","disabled label","option"),s("option","disabled label selected value"),s("textarea","cols dirname disabled form maxlength name readonly required rows wrap"),s("menu","type label",[i,"li"].join(" ")),s("noscript","",i),"html4"!==t&&(s("wbr"),s("ruby","",[o,"rt rp"].join(" ")),s("figcaption","",i),s("mark rt rp summary bdi","",o),s("canvas","width height",i),s("video","src crossorigin poster preload autoplay mediagroup loop muted controls width height buffered",[i,"track source"].join(" ")),s("audio","src crossorigin preload autoplay mediagroup loop muted controls buffered volume",[i,"track source"].join(" ")),s("picture","","img source"),s("source","src srcset type media sizes"),s("track","kind src srclang label default"),s("datalist","",[o,"option"].join(" ")),s("article section nav aside main header footer","",i),s("hgroup","","h1 h2 h3 h4 h5 h6"),s("figure","",[i,"figcaption"].join(" ")),s("time","datetime",o),s("dialog","open",i),s("command","type label icon disabled checked radiogroup command"),s("output","for form name",o),s("progress","value max",o),s("meter","value min max low high optimum",o),s("details","open",[i,"summary"].join(" ")),s("keygen","autofocus challenge disabled form keytype name")),"html5-strict"!==t&&(f("script","language xml:space"),f("style","xml:space"),f("object","declare classid code codebase codetype archive standby align border hspace vspace"),f("embed","align name hspace vspace"),f("param","valuetype type"),f("a","charset name rev shape coords"),f("br","clear"),f("applet","codebase archive code object alt name width height align hspace vspace"),f("img","name longdesc align border hspace vspace"),f("iframe","longdesc frameborder marginwidth marginheight scrolling align"),f("font basefont","size color face"),f("input","usemap align"),f("select"),f("textarea"),f("h1 h2 h3 h4 h5 h6 div p legend caption","align"),f("ul","type compact"),f("li","type"),f("ol dl menu dir","compact"),f("pre","width xml:space"),f("hr","align noshade size width"),f("isindex","prompt"),f("table","summary width frame rules cellspacing cellpadding align bgcolor"),f("col","width align char charoff valign"),f("colgroup","width align char charoff valign"),f("thead","align char charoff valign"),f("tr","align char charoff valign bgcolor"),f("th","axis align char charoff valign nowrap bgcolor width height"),f("form","accept"),f("td","abbr axis scope align char charoff valign nowrap bgcolor width height"),f("tfoot","align char charoff valign"),f("tbody","align char charoff valign"),f("area","nohref"),f("body","background bgcolor text link vlink alink")),"html4"!==t&&(f("input button select textarea","autofocus"),f("input textarea","placeholder"),f("a","download"),f("link script img","crossorigin"),f("img","loading"),f("iframe","sandbox seamless allowfullscreen loading")),li(pi("a form meter progress dfn"),function(e){c[e]&&delete c[e].children[e]}),delete c.caption.children.table,delete c.script,ci[t]=c,c));!1===e.verify_html&&(e.valid_elements="*[*]");var b=bi(e.valid_styles),y=bi(e.invalid_styles,"map"),C=bi(e.valid_classes,"map"),w=h("whitespace_elements","pre script noscript style textarea video audio iframe object c
vendor: 4,276 bytes, line 90
90ode"),x=h("self_closing_elements","colgroup dd dt li option p td tfoot th thead tr"),S=h("short_ended_elements","area base basefont br col frame hr img input isindex link meta param embed source wbr track"),E=h("boolean_attributes","checked compact declare defer disabled ismap multiple nohref noresize noshade nowrap readonly selected autoplay loop controls"),k=h("non_empty_elements","td th iframe video audio object script code pre",S),_=h("move_caret_before_on_enter_elements","td th iframe video audio object script code table",S),A=h("text_block_elements","h1 h2 h3 h4 h5 h6 p div address pre form blockquote center dir fieldset header footer article section hgroup aside main nav figure"),R=h("block_elements","hr table tbody thead tfoot th tr td li ol ul caption dl dt dd noscript menu isindex option datalist select optgroup figcaption details summary",A),D=h("text_inline_elements","span strong b em i font s strike u var cite dfn code mark q sup sub samp");li((e.special||"script noscript iframe noframes noembed title style textarea xmp").split(" "),function(e){p[e]=new RegExp("</"+e+"[^>]*>","gi")});var T=function(e){return new RegExp("^"+e.replace(/([?+*])/g,".$1")+"$")},O=function(e){var t,n,r,o,i,a,u,c,s,f,d,g,p,h,v,b,y,C,w=/^([#+\-])?([^\[!\/]+)(?:\/([^\[!]+))?(?:(!?)\[([^\]]+)])?$/,x=/^([!\-])?(\w+[\\:]:\w+|[^=:<]+)?(?:([=:<])(.*))?$/,S=/[*?+]/;if(e){var N=pi(e,",");for(l["@"]&&(b=l["@"].attributes,y=l["@"].attributesOrder),t=0,n=N.length;t<n;t++)if(i=w.exec(N[t])){if(h=i[1],s=i[2],v=i[3],c=i[5],a={attributes:g={},attributesOrder:p=[]},"#"===h&&(a.paddEmpty=!0),"-"===h&&(a.removeEmpty=!0),"!"===i[4]&&(a.removeEmptyAttrs=!0),b&&(le(b,function(e,t){g[t]=e}),p.push.apply(p,y)),c)for(r=0,o=(c=pi(c,"|")).length;r<o;r++)if(i=x.exec(c[r])){if(u={},d=i[1],f=i[2].replace(/[\\:]:/g,":"),h=i[3],C=i[4],"!"===d&&(a.attributesRequired=a.attributesRequired||[],a.attributesRequired.push(f),u.required=!0),"-"===d){delete g[f],p.splice(gi(p,f),1);continue}h&&("="===h&&(a.attributesDefault=a.attributesDefault||[],a.attributesDefault.push({name:f,value:C}),u.defaultValue=C),":"===h&&(a.attributesForced=a.attributesForced||[],a.attributesForced.push({name:f,value:C}),u.forcedValue=C),"<"===h&&(u.validValues=fi(C,"?"))),S.test(f)?(a.attributePatterns=a.attributePatterns||[],u.pattern=T(f),a.attributePatterns.push(u)):(g[f]||p.push(f),g[f]=u)}b||"@"!==s||(b=g,y=p),v&&(a.outputName=s,l[v]=a),S.test(s)?(a.pattern=T(s),m.push(a)):l[s]=a}}},B=function(e){l={},m=[],O(e),li(v,function(e,t){d[t]=e.children})},P=function(e){var t=/^(~)?(.+)$/;e&&(ci.text_block_elements=ci.block_elements=null,li(pi(e,","),function(e){var n=t.exec(e),r="~"===n[1],o=r?"span":"div",i=n[2];if(d[i]=d[o],g[i]=o,r||(R[i.toUpperCase()]={},R[i]={}),!l[i]){var a=l[o];delete(a=di({},a)).removeEmptyAttrs,delete a.removeEmpty,l[i]=a}li(d,function(e,t){e[o]&&(d[t]=e=di({},d[t]),e[i]=e[o])})}))},L=function(t){var n=/^([+\-]?)([A-Za-z0-9_\-.\u00b7\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u037d\u037f-\u1fff\u200c-\u200d\u203f-\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]+)\[([^\]]+)]$/;ci[e.schema]=null,t&&li(pi(t,","),function(e){var t,r,o=n.exec(e);o&&(r=o[1],t=r?d[o[2]]:d[o[2]]={"#comment":{}},t=d[o[2]],li(pi(o[3],"|"),function(e){"-"===r?delete t[e]:t[e]={}}))})},I=function(e){var t,n=l[e];if(n)return n;for(t=m.length;t--;)if((n=m[t]).pattern.test(e))return n};e.valid_elements?B(e.valid_elements):(li(v,function(e,t){l[t]={attributes:e.attributes,attributesOrder:e.attributesOrder},d[t]=e.children}),"html5"!==e.schema&&li(pi("strong/b em/i"),function(e){var t=pi(e,"/");l[t[1]].outputName=t[0]}),li(D,function(t,n){l[n]&&(e.padd_empty_block_inline_children&&(l[n].paddInEmptyBlock=!0),l[n].removeEmpty=!0)}),li(pi("ol ul blockquote a table tbody"),function(e){l[e]&&(l[e].removeEmpty=!0)}),li(pi("p h1 h2 h3 h4 h5 h6 th td pre div address caption li"),function(e){l[e].paddEmpty=!0}),li(pi("span"),function(e){l[e].removeEmptyAttrs=!0})),P(e.custom_elements),L(e.valid_children),O(e.extended_valid_elements),L("+ol[ul|ol],+ul[ul|ol]"),li({dd:"dl",dt:"dl",li:"ul ol",td:"tr",th:"tr",tr:"tbody thead tfoot",tbody:"table",thead:"table",tfoot:"table",legend:"fieldset",area:"map",param:"video audio object"},function(e,t){l[t]&&(l[t].parentsRequired=pi(e))}
90),e.invalid_elements&&li(mi(e.invalid_elements),function(e){l[e]&&delete l[e]}),I("span")||O("span[!data-mce-type|*]");var M=N(b),F=N(y),U=N(C),z=N(E),H=N(R),j=N(A),V=N(D),q=N(S),$=N(x),W=N(k),K=N(_),X=N(w),Y=N(p),G=N(g);return{children:d,elements:l,getValidStyles:M,getValidClasses:U,getBlockElements:H,getInvalidStyles:F,getShortEndedElements:q,getTextBlockElements:j,getTextInlineElements:V,getBoolAttrs:z,getElementRule:I,getSelfClosingElements:$,getNonEmptyElements:W,getMoveCaretBeforeOnEnterElements:K,getWhiteSpaceElements:X,getSpecialElements:Y,isValidChild:function(e,t){var n=d[e.toLowerCase()];return!(!n||!n[t.toLowerCase()])},isValid:function(e,t){var n,r,o=I(e);if(o){if(!t)return!0;if(o.attributes[t])return!0;if(n=o.attributePatterns)for(r=n.length;r--;)if(n[r].pattern.test(e))return!0}return!1},getCustomElements:G,addValidElements:O,setValidElements:B,addCustomElements:P,addValidChildren:L}},Ci=function(e,t,n,r){var o=function(e){return(e=parseInt(e,10).toString(16)).length>1?e:"0"+e};return"#"+o(t)+o(n)+o(r)},wi=function(e,t){var n,r,o,i=this,a=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/gi,u=/(?:url(?:(?:\(\s*\"([^\"]+)\"\s*\))|(?:\(\s*\'([^\']+)\'\s*\))|(?:\(\s*([^)\s]+)\s*\))))|(?:\'([^\']+)\')|(?:\"([^\"]+)\")/gi,c=/\s*([^:]+):\s*([^;]+);?/g,s=/\s+$/,f={};e=e||{},t&&(r=t.getValidStyles(),o=t.getInvalidStyles());var l="\\\" \\' \\; \\: ; : \ufeff".split(" ");for(n=0;n<l.length;n++)f[l[n]]="\ufeff"+n,f["\ufeff"+n]=l[n];return{toHex:function(e){return e.replace(a,Ci)},parse:function(t){var r,o,l,d,m,g,p,h,v={},b=e.url_converter,y=e.url_converter_scope||i,C=function(e,t,r){var o=v[e+"-top"+t];if(o){var i=v[e+"-right"+t];if(i){var a=v[e+"-bottom"+t];if(a){var u=v[e+"-left"+t];
90if(u){var c=[o,i,a,u];for(n=c.length-1;n--&&c[n]===c[n+1];);n>-1&&r||(v[e+t]=-1===n?c[0]:c.join(" "),delete v[e+"-top"+t],delete v[e+"-right"+t],delete v[e+"-bottom"+t],delete v[e+"-left"+t])}}}}},w=function(e){var t,n=v[e];if(n){for(t=(n=n.split(" ")).length;t--;)if(n[t]!==n[0])return!1;return v[e]=n[0],!0}},x=function(e){return d=!0,f[e]},S=function(e,t){return d&&(e=e.replace(/\uFEFF[0-9]/g,function(e){return f[e]})),t||(e=e.replace(/\\([\'\";:])/g,"$1")),e},N=function(e){return String.fromCharCode(parseInt(e.slice(1),16))},E=function(e){return e.replace(/\\[0-9a-f]+/gi,N)},k=function(t,n,r,o,i,a){if(i=i||a)return"'"+(i=S(i)).replace(/\'/g,"\\'")+"'";if(n=S(n||r||o),!e.allow_script_urls){var u=n.replace(/[\s\r\n]+/g,"");if(/(java|vb)script:/i.test(u))return"";if(!e.allow_svg_data_urls&&/^data:image\/svg/i.test(u))return""}return b&&(n=b.call(y,n,"style")),"url('"+n.replace(/\'/g,"\\'")+"')"};if(t){for(t=(t=t.replace(/[\u0000-\u001F]/g,"")).replace(/\\[\"\';:\uFEFF]/g,x).replace(/\"[^\"]+\"|\'[^\']+\'/g,function(e){return e.replace(/[;:]/g,x)});r=c.exec(t);)if(c.lastIndex=r.index+r[0].length,o=r[1].replace(s,"").toLowerCase(),l=r[2].replace(s,""),o&&l){if(o=E(o),l=E(l),-1!==o.indexOf("\ufeff")||-1!==o.indexOf('"'))continue;if(!e.allow_script_urls&&("behavior"===o||/expression\s*\(|\/\*|\*\//.test(l)))continue;"font-weight"===o&&"700"===l?l="bold":"color"!==o&&"background-color"!==o||(l=l.toLowerCase()),l=(l=l.replace(a,Ci)).replace(u,k),v[o]=d?S(l,!0):l}C("border","",!0),C("border","-width"),C("border","-color"),C("border","-style"),C("padding",""),C("margin",""),m="border",p="border-style",h="border-color",w(g="border-width")&&w(p)&&w(h)&&(v[m]=v[g]+" "+v[p]+" "+v[h],delete v[g],delete v[p],delete v[h]),"medium none"===v.border&&delete v.border,"none"===v["border-image"]&&delete v["border-image"]}return v},serialize:function(e,t){var n="",i=function(t){var o,i=r[t];if(i)for(var a=0,u=i.length;a<u;a++)t=i[a],(o=e[t])&&(n+=(n.length>0?" ":"")+t+": "+o+";")};return t&&r?(i("*"),i(t)):le(e,function(e,r){!e||o&&!function(e,t){var n=o["*"];return!(n&&n[e]||(n=o[t])&&n[e])}(r,t)||(n+=(n.length>0?" ":"")+r+": "+e+";")}),n}}},xi={keyLocation:!0,layerX:!0,layerY:!0,returnValue:!0,webkitMovementX:!0,webkitMovementY:!0,keyIdentifier:!0,mozPressure:!0},Si=function(e){return e instanceof Event||y(e.initEvent)},Ni=function(e,t,n,r){var o,i=function(e,t){var n=null!=t?t:{};for(var r in e)ye(xi,r)||(n[r]=e[r]);return b(n.composedPath)&&(n.composedPath=function(){return e.composedPath()}),n}(t,r);return i.type=e,v(i.target)&&(i.target=null!==(o=i.srcElement)&&void 0!==o?o:n),function(e){return v(e.preventDefault)||Si(e)}(t)&&(i.preventDefault=function(){i.defaultPrevented=!0,i.isDefaultPrevented=O,y(t.preventDefault)?t.preventDefault():Si(t)&&(t.returnValue=!1)},i.stopPropagation=function(){i.cancelBubble=!0,i.isPropagationStopped=O,y(t.stopPropagation)?t.stopPropagation():Si(t)&&(t.cancelBubble=!0)},i.stopImmediatePropagation=function(){i.isImmediatePropagationStopped=O,i.stopPropagation()},function(e){return e.isDefaultPrevented===O||e.isDefaultPrevented===T}(i)||(i.isDefaultPrevented=!0===i.defaultPrevented?O:T,i.isPropagationStopped=!0===i.cancelBubble?O:T,i.isImmediatePropagationStopped=T)),i},Ei="mce-data-",ki=/^(?:mouse|contextmenu)|click/,_i=function(e,t,n,r){e.addEventListener?e.addEventListener(t,n,r||!1):e.attachEvent&&e.attachEvent("on"+t,n)},Ai=function(e,t,n,r){e.removeEventListener?e.removeEventListener(t,n,r||!1):e.detachEvent&&e.detachEvent("on"+t,n)},Ri=function(e,t){var n=Ni(e.type,e,document,t);if(function(e){return b(e)&&ki.test(e.type)}(e)&&h(e.pageX)&&!h(e.clientX)){var r=n.target.ownerDocument||document,o=r.documentElement,i=r.body,a=n;a.pageX=e.clientX+(o&&o.scrollLeft||i&&i.scrollLeft||0)-(o&&o.clientLeft||i&&i.clientLeft||0),a.pageY=e.clientY+(o&&o.scrollTop||i&&i.scrollTop||0)-(o&&o.clientTop||i&&i.clientTop||0)}return h(n.metaKey)&&(n.metaKey=!1),n},Di=function(e,t,n){var r=e.document,o={type:"ready"};if(n.domLoaded)t(o);else{var i=function(){Ai(e,"DOMContentLoaded",i),Ai(e,"load",i),n.domLoaded||(n.domLoaded=!0,t(o)),e=null};"complete"===r.readyState||"interactive"===r.readyState&&r.body?i():_i(e,"DOMContentLoaded",i),n.domLoaded||_i(e,"load",i)}},Ti=function(){function e(){this.domLoaded=!1,this.events={},this.count=1,this.expando=Ei+(+new Date).toString(32),this.hasMouseEnterLeave="onmouseenter"in document.documentElement,this.hasFocusIn="onfocusin"in document.documentElement,this.count=1}return e.prototype.bind=function(e,t,n,r){var o,i,a,u,c,s,f,l=this,d=window,m=function(e){l.executeHandlers(Ri(e||d.event),o)};if(e&&3!==e.nodeType&&8!==e.nodeType){e[l.expando]?o=e[l.expando]:(o=l.count++,e[l.expando]=o,l.events[o]={}),r=r||e;var g=t.split(" ");for(a=g.length;a--;
90)s=m,c=f=!1,"DOMContentLoaded"===(u=g[a])&&(u="ready"),l.domLoaded&&"ready"===u&&"complete"===e.readyState?n.call(r,Ri({type:u})):(l.hasMouseEnterLeave||(c=l.mouseEnterLeave[u])&&(s=function(e){var t=e.currentTarget,n=e.relatedTarget;if(n&&t.contains)n=t.contains(n);else for(;n&&n!==t;)n=n.parentNode;n||((e=Ri(e||d.event)).type="mouseout"===e.type?"mouseleave":"mouseenter",e.target=t,l.executeHandlers(e,o))}),l.hasFocusIn||"focusin"!==u&&"focusout"!==u||(f=!0,c="focusin"===u?"focus":"blur",s=function(e){(e=Ri(e||d.event)).type="focus"===e.type?"focusin":"focusout",l.executeHandlers(e,o)}),(i=l.events[o][u])?"ready"===u&&l.domLoaded?n(Ri({type:u})):i.push({func:n,scope:r}):(l.events[o][u]=i=[{func:n,scope:r}],i.fakeName=c,i.capture=f,i.nativeHandler=s,"ready"===u?Di(e,s,l):_i(e,c||u,s,f)));return e=i=null,n}},e.prototype.unbind=function(e,t,n){var r,o,i,a,u;if(!e||3===e.nodeType||8===e.nodeType)return this;var c=e[this.expando];if(c){if(u=this.events[c],t){var s=t.split(" ");for(o=s.length;o--;)if(r=u[a=s[o]]){if(n)for(i=r.length;i--;)if(r[i].func===n){var f=r.nativeHandler,l=r.fakeName,d=r.capture;(r=r.slice(0,i).concat(r.slice(i+1))).nativeHandler=f,r.fakeName=l,r.capture=d,u[a]=r}n&&0!==r.length||(delete u[a],Ai(e,r.fakeName||a,r.nativeHandler,r.capture))}}else le(u,function(t,n){Ai(e,t.fakeName||n,t.nativeHandler,t.capture)}),u={};for(a in u)if(ye(u,a))return this;delete this.events[c];try{delete e[this.expando]}catch(m){e[this.expando]=null}}return this},e.prototype.fire=function(e,t,n){var r;if(!e||3===e.nodeType||8===e.nodeType)return this;var o=Ri({type:t,target:e},n);do{(r=e[this.expando])&&this.executeHandlers(o,r),e=e.parentNode||e.ownerDocument||e.defaultView||e.parentWindow}while(e&&!o.isPropagationStopped());return this},e.prototype.clean=function(e){var t,n;if(!e||3===e.nodeType||8===e.nodeType)return this;if(e[this.expando]&&this.unbind(e),e.getElementsByTagName||(e=e.document),e&&e.getElementsByTagName)for(this.unbind(e),t=(n=e.getElementsByTagName("*")).length;t--;)(e=n[t])[this.expando]&&this.unbind(e);return this},e.prototype.destroy=function(){this.events={}},e.prototype.cancel=function(e){return e&&(e.preventDefault(),e.stopImmediatePropagation()),!1},e.prototype.executeHandlers=function(e,t){var n=this.events[t],r=n&&n[e.type];if(r)for(var o=0,i=r.length;o<i;o++){var a=r[o];if(a&&!1===a.func.call(a.scope,e)&&e.preventDefault(),e.isImmediatePropagationStopped())return}},e.Event=new e,e}(),Oi="sizzle"+-new Date,Bi=window.document,Pi=0,Li=0,Ii=pa(),Mi=pa(),Fi=pa(),Ui=function(e,t){return e===t&&(Rr=!0),0},zi="undefined",Hi=1<<31,ji={}.hasOwnProperty,Vi=[],qi=Vi.pop,$i=Vi.push,Wi=Vi.push,Ki=Vi.slice,Xi=Vi.indexOf||function(e){for(var t=0,n=this.length;t<n;t++)if(this[t]===e)return t;return-1},Yi="[\\x20\\t\\r\\n\\f]",Gi="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",Ji="\\["+Yi+"*("+Gi+")(?:"+Yi+"*([*^$|!~]?=)"+Yi+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+Gi+"))|)"+Yi+"*\\]",Qi=":("+Gi+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+Ji+")*)|.*)\\)|)",Zi=new RegExp("^"+Yi+"+|((?:^|[^\\\\])(?:\\\\.)*)"+Yi+"+$","g"),ea=new RegExp("^"+Yi+"*,"+Yi+"*"),ta=new RegExp("^"+Yi+"*([>+~]|"+Yi+")"+Yi+"*"),na=new RegExp("="+Yi+"*([^\\]'\"]*?)"+Yi+"*\\]","g"),ra=new RegExp(Qi),oa=new RegExp("^"+Gi+"$"),ia={ID:new RegExp("^#("+Gi+")"),CLASS:new RegExp("^\\.("+Gi+")"),TAG:new RegExp("^("+Gi+"|[*])"),ATTR:new RegExp("^"+Ji),PSEUDO:new RegExp("^"+Qi),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+Yi+"*(even|odd|(([+-]|)(\\d*)n|)"+Yi+"*(?:([+-]|)"+Yi+"*(\\d+)|))"+Yi+"*\\)|)","i"),bool:new RegExp("^(?:checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped)$","i"),needsContext:new RegExp("^"+Yi+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+Yi+"*((?:-\\d)?\\d*)"+Yi+"*\\)|)(?=[^-]|$)","i")},aa=/^(?:input|select|textarea|button)$/i,ua=/^h\d$/i,ca=/^[^{]+\{\s*\[native \w/,sa=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,fa=/[+~]/,la=/'|\\/g,da=new RegExp("\\\\([\\da-f]{1,6}"+Yi+"?|("+Yi+")|.)","ig"),ma=function(e,t,n){var r="0x"+t-65536;return r!=r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)};try{Wi.apply(Vi=Ki.call(Bi.childNodes),Bi.childNodes),Vi[Bi.childNodes.length].nodeType}catch(Jk){Wi={apply:Vi.length?function(e,t){$i.apply(e,Ki.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}var ga=function(e,t,n,r){var o,i,a,u,c,s,f,l,d,m;if((t?t.ownerDocument||t:Bi)!==Tr&&Dr(t),n=n||[],!e||"string"!=typeof e)return n;if(1!==(u=(t=t||Tr).nodeType)&&9!==u)return[];
vendor: 6,766 bytes, line 90
90if(Br&&!r){if(o=sa.exec(e))if(a=o[1]){if(9===u){if(!(i=t.getElementById(a))||!i.parentNode)return n;if(i.id===a)return n.push(i),n}else if(t.ownerDocument&&(i=t.ownerDocument.getElementById(a))&&Ir(t,i)&&i.id===a)return n.push(i),n}else{if(o[2])return Wi.apply(n,t.getElementsByTagName(e)),n;if((a=o[3])&&Cr.getElementsByClassName)return Wi.apply(n,t.getElementsByClassName(a)),n}if(Cr.qsa&&(!Pr||!Pr.test(e))){if(l=f=Oi,d=t,m=9===u&&e,1===u&&"object"!==t.nodeName.toLowerCase()){for(s=Nr(e),(f=t.getAttribute("id"))?l=f.replace(la,"\\$&"):t.setAttribute("id",l),l="[id='"+l+"'] ",c=s.length;c--;)s[c]=l+wa(s[c]);d=fa.test(e)&&ya(t.parentNode)||t,m=s.join(",")}if(m)try{return Wi.apply(n,d.querySelectorAll(m)),n}catch(g){}finally{f||t.removeAttribute("id")}}}return kr(e.replace(Zi,"$1"),t,n,r)};function pa(){var e=[];return function t(n,r){return e.push(n+" ")>wr.cacheLength&&delete t[e.shift()],t[n+" "]=r}}function ha(e){return e[Oi]=!0,e}function va(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||Hi)-(~e.sourceIndex||Hi);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function ba(e){return ha(function(t){return t=+t,ha(function(n,r){for(var o,i=e([],n.length,t),a=i.length;a--;)n[o=i[a]]&&(n[o]=!(r[o]=n[o]))})})}function ya(e){return e&&typeof e.getElementsByTagName!==zi&&e}function Ca(){}function wa(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function xa(e,t,n){var r=t.dir,o=n&&"parentNode"===r,i=Li++;return t.first?function(t,n,i){for(;t=t[r];)if(1===t.nodeType||o)return e(t,n,i)}:function(t,n,a){var u,c,s=[Pi,i];if(a){for(;t=t[r];)if((1===t.nodeType||o)&&e(t,n,a))return!0}else for(;t=t[r];)if(1===t.nodeType||o){if((u=(c=t[Oi]||(t[Oi]={}))[r])&&u[0]===Pi&&u[1]===i)return s[2]=u[2];if(c[r]=s,s[2]=e(t,n,a))return!0}}}function Sa(e){return e.length>1?function(t,n,r){for(var o=e.length;o--;)if(!e[o](t,n,r))return!1;return!0}:e[0]}function Na(e,t,n,r,o){for(var i,a=[],u=0,c=e.length,s=null!=t;u<c;u++)(i=e[u])&&(n&&!n(i,r,o)||(a.push(i),s&&t.push(u)));return a}function Ea(e,t,n,r,o,i){return r&&!r[Oi]&&(r=Ea(r)),o&&!o[Oi]&&(o=Ea(o,i)),ha(function(i,a,u,c){var s,f,l,d=[],m=[],g=a.length,p=i||function(e,t,n){for(var r=0,o=t.length;r<o;r++)ga(e,t[r],n);return n}(t||"*",u.nodeType?[u]:u,[]),h=!e||!i&&t?p:Na(p,d,e,u,c),v=n?o||(i?e:g||r)?[]:a:h;if(n&&n(h,v,u,c),r)for(s=Na(v,m),r(s,[],u,c),f=s.length;f--;)(l=s[f])&&(v[m[f]]=!(h[m[f]]=l));if(i){if(o||e){if(o){for(s=[],f=v.length;f--;)(l=v[f])&&s.push(h[f]=l);o(null,v=[],s,c)}for(f=v.length;f--;)(l=v[f])&&(s=o?Xi.call(i,l):d[f])>-1&&(i[s]=!(a[s]=l))}}else v=Na(v===a?v.splice(g,v.length):v),o?o(null,a,v,c):Wi.apply(a,v)})}function ka(e){for(var t,n,r,o=e.length,i=wr.relative[e[0].type],a=i||wr.relative[" "],u=i?1:0,c=xa(function(e){return e===t},a,!0),s=xa(function(e){return Xi.call(t,e)>-1},a,!0),f=[function(e,n,r){var o=!i&&(r||n!==_r)||((t=n).nodeType?c(e,n,r):s(e,n,r));return t=null,o}];u<o;u++)if(n=wr.relative[e[u].type])f=[xa(Sa(f),n)];else{if((n=wr.filter[e[u].type].apply(null,e[u].matches))[Oi]){for(r=++u;r<o&&!wr.relative[e[r].type];r++);return Ea(u>1&&Sa(f),u>1&&wa(e.slice(0,u-1).concat({value:" "===e[u-2].type?"*":""})).replace(Zi,"$1"),n,u<r&&ka(e.slice(u,r)),r<o&&ka(e=e.slice(r)),r<o&&wa(e))}f.push(n)}return Sa(f)}Cr=ga.support={},Sr=ga.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},Dr=ga.setDocument=function(e){var t,n=e?e.ownerDocument||e:Bi,r=n.defaultView;return n!==Tr&&9===n.nodeType&&n.documentElement?(Tr=n,Or=n.documentElement,Br=!Sr(n),r&&r!==function(e){try{return e.top}catch(t){}return null}(r)&&(r.addEventListener?r.addEventListener("unload",function(){Dr()},!1):r.attachEvent&&r.attachEvent("onunload",function(){Dr()})),Cr.attributes=!0,Cr.getElementsByTagName=!0,Cr.getElementsByClassName=ca.test(n.getElementsByClassName),Cr.getById=!0,wr.find.ID=function(e,t){if(typeof t.getElementById!==zi&&Br){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},wr.filter.ID=function(e){var t=e.replace(da,ma);return function(e){return e.getAttribute("id")===t}},wr.find.TAG=Cr.getElementsByTagName?function(e,t){if(typeof t.getElementsByTagName!==zi)return t.getElementsByTagName(e)}:function(e,t){var n,r=[],o=0,i=t.getElementsByTagName(e);if("*"===e){for(;n=i[o++];)1===n.nodeType&&r.push(n);return r}return i},wr.find.CLASS=Cr.getElementsByClassName&&function(e,t){if(Br)return t.getElementsByClassName(e)},Lr=[],Pr=[],Cr.disconnectedMatch=!0,Pr=Pr.length&&new RegExp(Pr.join("|")),Lr=Lr.length&&new RegExp(Lr.join("|")),t=ca.test(Or.compareDocumentPosition),Ir=t||ca.test(Or.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},Ui=t?function(e,t){if(e===t)return Rr=!0,0;var r=!e.compareDocumentPosition-!t.compareDocumentPosition;return r||(1&(r=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!Cr.sortDetached&&t.compareDocumentPosition(e)===r?e===n||e.ownerDocument===Bi&&Ir(Bi,e)?-1:t===n||t.ownerDocument===Bi&&Ir(Bi,t)?1:Ar?Xi.call(Ar,e)-Xi.call(Ar,t):0:4&r?-1:1)}:function(e,t){if(e===t)return Rr=!0,0;var r,o=0,i=e.parentNode,a=t.parentNode,u=[e],c=[t];if(!i||!a)return e===n?-1:t===n?1:i?-1:a?1:Ar?Xi.call(Ar,e)-Xi.call(Ar,t):0;if(i===a)return va(e,t);for(r=e;r=r.parentNode;)u.unshift(r);for(r=t;r=r.parentNode;)c.unshift(r);for(;u[o]===c[o];)o++;return o?va(u[o],c[o]):u[o]===Bi?-1:c[o]===Bi?1:0},n):Tr},ga.matches=function(e,t){return ga(e,null,null,t)},ga.matchesSelector=function(e,t){if((e.ownerDocument||e)!==Tr&&Dr(e),t=t.replace(na,"='$1']"),Cr.matchesSelector&&Br&&(!Lr||!Lr.test(t))&&(!Pr||!Pr.test(t)))try{var n=(void 0).call(e,t);if(n||Cr.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(Jk){}return ga(t,Tr,null,[e]).length>0},ga.contains=function(e,t){return(e.ownerDocument||e)!==Tr&&Dr(e),Ir(e,t)},ga.attr=function(e,t){(e.ownerDocument||e)!==Tr&&Dr(e);var n=wr.attrHandle[t.toLowerCase()],r=n&&ji.call(wr.attrHandle,t.toLowerCase())?n(e,t,!Br):void 0;return void 0!==r?r:Cr.attributes||!Br?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},ga.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},ga.uniqueSort=function(e){var t,n=[],r=0,o=0;if(Rr=!Cr.detectDuplicates,Ar=!Cr.sortStable&&e.slice(0),e.sort(Ui),Rr){for(;t=e[o++];)t===e[o]&&(r=n.push(o));for(;r--;)e.splice(n[r],1)}return Ar=null,e},xr=ga.getText=function(e){var t,n="",r=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=xr(e)}
vendor: 4,175 bytes, line 90
90else if(3===o||4===o)return e.nodeValue}else for(;t=e[r++];)n+=xr(t);return n},(wr=ga.selectors={cacheLength:50,createPseudo:ha,match:ia,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(da,ma),e[3]=(e[3]||e[4]||e[5]||"").replace(da,ma),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||ga.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&ga.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return ia.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&ra.test(n)&&(t=Nr(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(da,ma).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=Ii[e+" "];return t||(t=new RegExp("(^|"+Yi+")"+e+"("+Yi+"|$)"))&&Ii(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==zi&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var o=ga.attr(r,e);return null==o?"!="===t:!t||(o+="","="===t?o===n:"!="===t?o!==n:"^="===t?n&&0===o.indexOf(n):"*="===t?n&&o.indexOf(n)>-1:"$="===t?n&&o.slice(-n.length)===n:"~="===t?(" "+o+" ").indexOf(n)>-1:"|="===t&&(o===n||o.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,r,o){var i="nth"!==e.slice(0,3),a="last"!==e.slice(-4),u="of-type"===t;return 1===r&&0===o?function(e){return!!e.parentNode}:function(t,n,c){var s,f,l,d,m,g,p=i!==a?"nextSibling":"previousSibling",h=t.parentNode,v=u&&t.nodeName.toLowerCase(),b=!c&&!u;if(h){if(i){for(;p;){for(l=t;l=l[p];)if(u?l.nodeName.toLowerCase()===v:1===l.nodeType)return!1;g=p="only"===e&&!g&&"nextSibling"}return!0}if(g=[a?h.firstChild:h.lastChild],a&&b){for(m=(s=(f=h[Oi]||(h[Oi]={}))[e]||[])[0]===Pi&&s[1],d=s[0]===Pi&&s[2],l=m&&h.childNodes[m];l=++m&&l&&l[p]||(d=m=0)||g.pop();)if(1===l.nodeType&&++d&&l===t){f[e]=[Pi,m,d];break}}else if(b&&(s=(t[Oi]||(t[Oi]={}))[e])&&s[0]===Pi)d=s[1];else for(;(l=++m&&l&&l[p]||(d=m=0)||g.pop())&&((u?l.nodeName.toLowerCase()!==v:1!==l.nodeType)||!++d||(b&&((l[Oi]||(l[Oi]={}))[e]=[Pi,d]),l!==t)););return(d-=o)===r||d%r==0&&d/r>=0}}},PSEUDO:function(e,t){var n,r=wr.pseudos[e]||wr.setFilters[e.toLowerCase()]||ga.error("unsupported pseudo: "+e);return r[Oi]?r(t):r.length>1?(n=[e,e,"",t],wr.setFilters.hasOwnProperty(e.toLowerCase())?ha(function(e,n){for(var o,i=r(e,t),a=i.length;a--;)e[o=Xi.call(e,i[a])]=!(n[o]=i[a])}):function(e){return r(e,0,n)}):r}},pseudos:{not:ha(function(e){var t=[],n=[],r=Er(e.replace(Zi,"$1"));return r[Oi]?ha(function(e,t,n,o){for(var i,a=r(e,null,o,[]),u=e.length;u--;)(i=a[u])&&(e[u]=!(t[u]=i))}):function(e,o,i){return t[0]=e,r(t,null,i,n),t[0]=null,!n.pop()}}),has:ha(function(e){return function(t){return ga(e,t).length>0}}),contains:ha(function(e){return e=e.replace(da,ma),function(t){return(t.textContent||t.innerText||xr(t)).indexOf(e)>-1}}),lang:ha(function(e){return oa.test(e||"")||ga.error("unsupported lang: "+e),e=e.replace(da,ma).toLowerCase(),function(t){var n;do{if(n=Br?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(e){var t=window.location&&window.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===Or},focus:function(e){return e===Tr.activeElement&&(!Tr.hasFocus||Tr.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return!1===e.disabled},disabled:function(e){return!0===e.disabled},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!wr.pseudos.empty(e)},header:function(e){return ua.test(e.nodeName)}
vendor: 4,139 bytes, line 90
90,input:function(e){return aa.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:ba(function(){return[0]}),last:ba(function(e,t){return[t-1]}),eq:ba(function(e,t,n){return[n<0?n+t:n]}),even:ba(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:ba(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:ba(function(e,t,n){for(var r=n<0?n+t:n;--r>=0;)e.push(r);return e}),gt:ba(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}}).pseudos.nth=wr.pseudos.eq,q(["radio","checkbox","file","password","image"],function(e){var t;wr.pseudos[e]=(t=e,function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t})}),q(["submit","reset"],function(e){var t;wr.pseudos[e]=(t=e,function(e){var n=e.nodeName.toLowerCase();return("input"===n||"button"===n)&&e.type===t})}),Ca.prototype=wr.filters=wr.pseudos,wr.setFilters=new Ca,Nr=ga.tokenize=function(e,t){var n,r,o,i,a,u,c,s=Mi[e+" "];if(s)return t?0:s.slice(0);for(a=e,u=[],c=wr.preFilter;a;){for(i in n&&!(r=ea.exec(a))||(r&&(a=a.slice(r[0].length)||a),u.push(o=[])),n=!1,(r=ta.exec(a))&&(n=r.shift(),o.push({value:n,type:r[0].replace(Zi," ")}),a=a.slice(n.length)),wr.filter)wr.filter.hasOwnProperty(i)&&(!(r=ia[i].exec(a))||c[i]&&!(r=c[i](r))||(n=r.shift(),o.push({value:n,type:i,matches:r}),a=a.slice(n.length)));if(!n)break}return t?a.length:a?ga.error(e):Mi(e,u).slice(0)},Er=ga.compile=function(e,t){var n,r=[],o=[],i=Fi[e+" "];if(!i){for(t||(t=Nr(e)),n=t.length;n--;)(i=ka(t[n]))[Oi]?r.push(i):o.push(i);(i=Fi(e,function(e,t){var n=t.length>0,r=e.length>0,o=function(o,i,a,u,c){var s,f,l,d=0,m="0",g=o&&[],p=[],h=_r,v=o||r&&wr.find.TAG("*",c),b=Pi+=null==h?1:Math.random()||.1,y=v.length;for(c&&(_r=i!==Tr&&i);m!==y&&null!=(s=v[m]);m++){if(r&&s){for(f=0;l=e[f++];)if(l(s,i,a)){u.push(s);break}c&&(Pi=b)}n&&((s=!l&&s)&&d--,o&&g.push(s))}if(d+=m,n&&m!==d){for(f=0;l=t[f++];)l(g,p,i,a);if(o){if(d>0)for(;m--;)g[m]||p[m]||(p[m]=qi.call(u));p=Na(p)}Wi.apply(u,p),c&&!o&&p.length>0&&d+t.length>1&&ga.uniqueSort(u)}return c&&(Pi=b,_r=h),g};return n?ha(o):o}(o,r))).selector=e}return i},kr=ga.select=function(e,t,n,r){var o,i,a,u,c,s="function"==typeof e&&e,f=!r&&Nr(e=s.selector||e);if(n=n||[],1===f.length){if((i=f[0]=f[0].slice(0)).length>2&&"ID"===(a=i[0]).type&&Cr.getById&&9===t.nodeType&&Br&&wr.relative[i[1].type]){if(!(t=(wr.find.ID(a.matches[0].replace(da,ma),t)||[])[0]))return n;s&&(t=t.parentNode),e=e.slice(i.shift().value.length)}for(o=ia.needsContext.test(e)?0:i.length;o--&&(a=i[o],!wr.relative[u=a.type]);)if((c=wr.find[u])&&(r=c(a.matches[0].replace(da,ma),fa.test(i[0].type)&&ya(t.parentNode)||t))){if(i.splice(o,1),!(e=r.length&&wa(i)))return Wi.apply(n,r),n;break}}return(s||Er(e,f))(r,t,!Br,n,fa.test(e)&&ya(t.parentNode)||t),n},Cr.sortStable=Oi.split("").sort(Ui).join("")===Oi,Cr.detectDuplicates=!!Rr,Dr(),Cr.sortDetached=!0;var _a=document,Aa=Array.prototype.push,Ra=Array.prototype.slice,Da=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,Ta=Ti.Event,Oa=ht.makeMap("children,contents,next,prev"),Ba=function(e){return void 0!==e},Pa=function(e){return"string"==typeof e},La=function(e,t){var n,r=(t=t||_a).createElement("div"),o=t.createDocumentFragment();for(r.innerHTML=e;n=r.firstChild;)o.appendChild(n);return o},Ia=function(e,t,n,r){var o;if(Pa(t))t=La(t,Ga(e[0]));else if(t.length&&!t.nodeType){if(t=eu.makeArray(t),r)for(o=t.length-1;o>=0;o--)Ia(e,t[o],n,r);else for(o=0;o<t.length;o++)Ia(e,t[o],n,r);return e}if(t.nodeType)for(o=e.length;o--;)n.call(e[o],t);return e},Ma=function(e,t){return e&&t&&-1!==(" "+e.className+" ").indexOf(" "+t+" ")},Fa=function(e,t,n){var r,o;return t=eu(t)[0],e.each(function(){n&&r===this.parentNode?o.appendChild(this):(r=this.parentNode,o=t.cloneNode(!1),this.parentNode.insertBefore(o,this),o.appendChild(this))}),e},Ua=ht.makeMap("fillOpacity fontWeight lineHeight opacity orphans widows zIndex zoom"," "),za=ht.makeMap("checked compact declare defer disabled ismap multiple nohref nosh
90ade nowrap readonly selected"," "),Ha={for:"htmlFor",class:"className",readonly:"readOnly"},ja={float:"cssFloat"},Va={},qa={},$a=function(e,t){return new eu.fn.init(e,t)},Wa=/^\s*|\s*$/g,Ka=function(e){return null==e?"":(""+e).replace(Wa,"")},Xa=function(e,t){var n,r,o,i;if(e)if(void 0===(n=e.length)){for(r in e)if(e.hasOwnProperty(r)&&(i=e[r],!1===t.call(i,r,i)))break}else for(o=0;o<n&&(i=e[o],!1!==t.call(i,o,i));o++);return e},Ya=function(e,t){var n=[];return Xa(e,function(e,r){t(r,e)&&n.push(r)}),n},Ga=function(e){return e?9===e.nodeType?e:e.ownerDocument:_a};$a.fn=$a.prototype={constructor:$a,selector:"",context:null,length:0,init:function(e,t){var n,r;if(!e)return this;if(e.nodeType)return this.context=this[0]=e,this.length=1,this;if(t&&t.nodeType)this.context=t;else{if(t)return eu(e).attr(t);this.context=t=document}if(Pa(e)){if(this.selector=e,!(n="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:Da.exec(e)))return eu(t).find(e);if(n[1])for(r=La(e,Ga(t)).firstChild;r;)Aa.call(this,r),r=r.nextSibling;else{if(!(r=Ga(t).getElementById(n[2])))return this;if(r.id!==n[2])return this.find(e);this.length=1,this[0]=r}}else this.add(e,!1);return this},toArray:function(){return ht.toArray(this)},add:function(e,t){var n,r;if(Pa(e))return this.add(eu(e));if(!1!==t)for(n=eu.unique(this.toArray().concat(eu.makeArray(e))),this.length=n.length,r=0;r<n.length;r++)this[r]=n[r];else Aa.apply(this,eu.makeArray(e));return this},attr:function(e,t){var n,r=this;if("object"==typeof e)Xa(e,function(e,t){r.attr(e,t)});else{if(!Ba(t)){if(r[0]&&1===r[0].nodeType){if((n=Va[e])&&n.get)return n.get(r[0],e);if(za[e])return r.prop(e)?e:void 0;null===(t=r[0].getAttribute(e,2))&&(t=void 0)}return t}this.each(function(){var n;if(1===this.nodeType){if((n=Va[e])&&n.set)return void n.set(this,t);null===t?this.removeAttribute(e,2):this.setAttribute(e,t,2)}})}return r},removeAttr:function(e){return this.attr(e,null)},prop:function(e,t){var n=this;if("object"==typeof(e=Ha[e]||e))Xa(e,function(e,t){n.prop(e,t)});else{if(!Ba(t))return n[0]&&n[0].nodeType&&e in n[0]?n[0][e]:t;this.each(function(){1===this.nodeType&&(this[e]=t)})}return n},css:function(e,t){var n,r,o=this,i=function(e){return e.replace(/-(\D)/g,function(e,t){return t.toUpperCase()})},a=function(e){return e.replace(/[A-Z]/g,function(e){return"-"+e})};if("object"==typeof e)Xa(e,function(e,t){o.css(e,t)});else if(Ba(t))e=i(e),"number"!=typeof t||Ua[e]||(t=t.toString()+"px"),o.each(function(){var n=this.style;if((r=qa[e])&&r.set)r.set(this,t);else{try{this.style[ja[e]||e]=t}catch(o){}null!==t&&""!==t||(n.removeProperty?n.removeProperty(a(e)):n.removeAttribute(e))}});else{if(n=o[0],(r=qa[e])&&r.get)return r.get(n);if(!n.ownerDocument.defaultView)return n.currentStyle?n.currentStyle[i(e)]:"";try{return n.ownerDocument.defaultView.getComputedStyle(n,null).getPropertyValue(a(e))}catch(u){return}}return o},remove:function(){for(var e,t=this.length;t--;)e=this[t],Ta.clean(e),e.parentNode&&e.parentNode.removeChild(e);return this},empty:function(){for(var e,t=this.length;t--;)for(e=this[t];e.firstChild;)e.removeChild(e.firstChild);return this},html:function(e){var t;if(Ba(e)){t=this.length;try{for(;t--;)this[t].innerHTML=e}catch(n){eu(this[t]).empty().append(e)}return this}return this[0]?this[0].innerHTML:""},text:function(e){var t;if(Ba(e)){for(t=this.length;t--;)"innerText"in this[t]?this[t].innerText=e:this[0].textContent=e;return this}return this[0]?this[0].innerText||this[0].textContent:""},append:function(){return Ia(this,arguments,function(e){(1===this.nodeType||this.host&&1===this.host.nodeType)&&this.appendChild(e)})},prepend:function(){return Ia(this,arguments,function(e){(1===this.nodeType||this.host&&1===this.host.nodeType)&&this.insertBefore(e,this.firstChild)},!0)},before:function(){return this[0]&&this[0].parentNode?Ia(this,arguments,function(e){this.parentNode.insertBefore(e,this)}):this},after:function(){return this[0]&&this[0].parentNode?Ia(this,arguments,function(e){this.parentNode.insertBefore(e,this.nextSibling)},!0):this},appendTo:function(e){return eu(e).append(this),this},prependTo:function(e){return eu(e).prepend(this),this},replaceWith:function(e){return this.before(e).remove()},wrap:function(e){return Fa(this,e)},wrapAll:function(e){return Fa(this,e,!0)},wrapInner:function(e){return this.each(function(){eu(this).contents().wrapAll(e)}),this},unwrap:function(){return this.parent().each(function(){eu(this).replaceWith(this.childNodes)})},clone:function(){var e=[];return this.each(function(){e.push(this.cloneNode(!0))}),eu(e)},addClass:function(e){return this.toggleClass(e,!0)},removeClass:function(e){return this.toggleClass(e,!1)},toggleClass:function(e,t){var n=this;return"string"!=typeof e?n:(-1!==e.indexOf(" ")?Xa(e.split(" "),function(){n.toggleClass(this,t)}):n.each(function(n,r){var o=Ma(r,e);if(o!==t){var i=r.className;o?r.className=Ka((" "+i+" ").replace(" "+e+" "," ")):r.className+=i?" "+e:e}}),n)},hasClass:function(e){return Ma(this[0],e)},each:function(e){return Xa(this,e)},on:function(e,t){return this.each(function(){Ta.bind(this,e,t)})},off:function(e,t){return this.each(function(){Ta.unbind(this,e,t)})},trigger:function(e){return this.each(function(){"object"==typeof e?Ta.fire(this,e.type,e):Ta.fire(this,e)})},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},slice:function(){return eu(Ra.apply(this,arguments))},eq:function(e){return-1===e?this.slice(e):this.slice(e,+e+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},find:function(e){var t,n,r=[];for(t=0,n=this.length;t<n;t++)eu.find(e,this[t],r);return eu(r)},filter:function(e){return eu("function"==typeof e?Ya(this.toArray(),function(t,n){return e(n,t)}):eu.filter(e,this.toArray()))},closest:function(e){var t=[];return e instanceof eu&&(e=e[0]),this.each(function(n,r){for(;r;){if("string"==typeof e&&eu(r).is(e)){t.push(r);break}if(r===e){t.push(r);break}r=r.parentNode}}),eu(t)},offset:function(e){var t,n,r,o,i=0,a=0;return e?this.css(e):((t=this[0])&&(r=(n=t.ownerDocument).documentElement,t.getBoundingClientRect&&(i=(o=t.getBoundingClientRect()).left+(r.scrollLeft||n.body.scrollLeft)-r.clientLeft,a=o.top+(r.scrollTop||n.body.scrollTop)-r.clientTop)),{left:i,top:a})},push:Aa,sort:Array.prototype.sort,splice:Array.prototype.splice},ht.extend($a,{extend:ht.extend,makeArray:function(e){return(t=e)&&t===t.window||e.nodeType?[e]:ht.toArray(e);var t},inArray:function(e,t){var n;if(t.indexOf)return t.indexOf(e);for(n=t.length;n--;)if(t[n]===e)return n;return-1},isArray:ht.isArray,each:Xa,trim:Ka,grep:Ya,find:ga,expr:ga.selectors,unique:ga.uniqueSort,text:ga.getText,contains:ga.contains,filter:function(e,t,n){var r=t.length;for(n&&(e=":not("+e+")");r--;)1!==t[r].nodeType&&t.splice(r,1);return t=1===t.length?eu.find.matchesSelector(t[0],e)?[t[0]]:[]:eu.find.matches(e,t)}});var Ja=function(e,t,n){var r=[],o=e[t];for("string"!=typeof n&&n instanceof eu&&(n=n[0]);o&&9!==o.nodeType;
90){if(void 0!==n){if(o===n)break;if("string"==typeof n&&eu(o).is(n))break}1===o.nodeType&&r.push(o),o=o[t]}return r},Qa=function(e,t,n,r){var o=[];for(r instanceof eu&&(r=r[0]);e;e=e[t])if(!n||e.nodeType===n){if(void 0!==r){if(e===r)break;if("string"==typeof r&&eu(e).is(r))break}o.push(e)}return o},Za=function(e,t,n){for(e=e[t];e;e=e[t])if(e.nodeType===n)return e;return null};Xa({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return Ja(e,"parentNode")},next:function(e){return Za(e,"nextSibling",1)},prev:function(e){return Za(e,"previousSibling",1)},children:function(e){return Qa(e.firstChild,"nextSibling",1)},contents:function(e){return ht.toArray(("iframe"===e.nodeName?e.contentDocument||e.contentWindow.document:e).childNodes)}},function(e,t){$a.fn[e]=function(n){var r=[];this.each(function(){var e=t.call(r,this,n,r);e&&(eu.isArray(e)?r.push.apply(r,e):r.push(e))}),this.length>1&&(Oa[e]||(r=eu.unique(r)),0===e.indexOf("parents")&&(r=r.reverse()));var o=eu(r);return n?o.filter(n):o}}),Xa({parentsUntil:function(e,t){return Ja(e,"parentNode",t)},nextUntil:function(e,t){return Qa(e,"nextSibling",1,t).slice(1)},prevUntil:function(e,t){return Qa(e,"previousSibling",1,t).slice(1)}},function(e,t){$a.fn[e]=function(n,r){var o=[];this.each(function(){var e=t.call(o,this,n,o);e&&(eu.isArray(e)?o.push.apply(o,e):o.push(e))}),this.length>1&&(o=eu.unique(o),0!==e.indexOf("parents")&&"prevUntil"!==e||(o=o.reverse()));var i=eu(o);return r?i.filter(r):i}}),$a.fn.is=function(e){return!!e&&this.filter(e).length>0},$a.fn.init.prototype=$a.fn,$a.overrideDefaults=function(e){var t,n=function(r,o){return t=t||e(),0===arguments.length&&(r=t.element),o||(o=t.context),new n.fn.init(r,o)};return eu.extend(n,this),n},$a.attrHooks=Va,$a.cssHooks=qa;var eu=$a,tu=ht.each,nu=ht.grep,ru=lt.ie,ou=/^([a-z0-9],?)+$/i,iu=function(e,t){var n=t.attr("style"),r=e.serialize(e.parse(n),t[0].nodeName);r||(r=null),t.attr("data-mce-style",r)},au=function(e,t){var n,r,o=0;if(e)for(n=e.nodeType,e=e.previousSibling;e;e=e.previousSibling)r=e.nodeType,(!t||3!==r||r!==n&&e.nodeValue.length)&&(o++,n=r);return o},uu=function(e,t){void 0===t&&(t={});var n={},r=window,o={},i=0,a=Yr.forElement(bt.fromDom(e),{contentCssCors:t.contentCssCors,referrerPolicy:t.referrerPolicy}),u=[],c=t.schema?t.schema:yi({}),s=wi({url_converter:t.url_converter,url_converter_scope:t.url_converter_scope},t.schema),f=t.ownEvents?new Ti:Ti.Event,d=c.getBlockElements(),m=eu.overrideDefaults(function(){return{context:e,element:V.getRoot()}}),g=function(t){return t&&e&&l(t)?e.getElementById(t):t},p=function(e){return m("string"==typeof e?g(e):e)},h=function(e,t,n){var r,o,i=p(e);return i.length&&(o=(r=$[t])&&r.get?r.get(i,t):i.attr(t)),void 0===o&&(o=n||""),o},b=function(e){var t=g(e);return t?t.attributes:[]},y=function(e,n,r){""===r&&(r=null);var o=p(e),i=o.attr(n);if(o.length){var a=$[n];a&&a.set?a.set(o,r,n):o.attr(n,r),i!==r&&t.onSetAttrib&&t.onSetAttrib({attrElm:o,attrName:n,attrValue:r})}},C=function(){return t.root_element||e.body},x=function(t,n){return tr(e.body,g(t),n)},S=function(e,t,n){var r=p(e);return n?r.css(t):("float"===(t=t.replace(/-(\D)/g,function(e,t){return t.toUpperCase()}))&&(t=lt.browser.isIE()?"styleFloat":"cssFloat"),r[0]&&r[0].style?r[0].style[t]:void 0)},E=function(e){var t,n;return e=g(e),t=S(e,"width"),n=S(e,"height"),-1===t.indexOf("px")&&(t=0),-1===n.indexOf("px")&&(n=0),{w:parseInt(t,10)||e.offsetWidth||e.clientWidth,h:parseInt(n,10)||e.offsetHeight||e.clientHeight}},k=function(e,t){var n;if(!e)return!1;if(!Array.isArray(e)){if("*"===t)return 1===e.nodeType;if(ou.test(t)){var r=t.toLowerCase().split(/,/),o=e.nodeName.toLowerCase();for(n=r.length-1;n>=0;n--)if(r[n]===o)return!0;return!1}if(e.nodeType&&1!==e.nodeType)return!1}var i=Array.isArray(e)?e:[e];return ga(t,i[0].ownerDocument||i[0],null,i).length>0},_=function(e,t,n,r){var o,i=[],a=g(e);for(r=void 0===r,n=n||("BODY"!==C().nodeName?C().parentNode:null),ht.is(t,"string")&&(o=t,t="*"===t?function(e){return 1===e.nodeType}:function(e){return k(e,o)});a&&!(a===n||v(a.nodeType)||Rn(a)||Dn(a));){if(!t||"function"==typeof t&&t(a)){if(!r)return[a];i.push(a)}a=a.parentNode}return r?i:null},A=function(e,t,n){var r=t;if(e)for("string"==typeof t&&(r=function(e){return k(e,t)}),e=e[n];e;e=e[n])if("function"==typeof r&&r(e))return e;return null}
90,R=function(e,t,n){var r,o="string"==typeof e?g(e):e;if(!o)return!1;if(ht.isArray(o)&&(o.length||0===o.length))return r=[],tu(o,function(e,o){e&&r.push(t.call(n,"string"==typeof e?g(e):e,o))}),r;var i=n||this;return t.call(i,o)},D=function(e,t){p(e).each(function(e,n){tu(t,function(e,t){y(n,t,e)})})},T=function(e,t){var n=p(e);ru?n.each(function(e,n){if(!1!==n.canHaveHTML){for(;n.firstChild;)n.removeChild(n.firstChild);try{n.innerHTML="<br>"+t,n.removeChild(n.firstChild)}catch(r){eu("<div></div>").html("<br>"+t).contents().slice(1).appendTo(n)}return t}}):n.html(t)},O=function(t,n,r,o,i){return R(t,function(t){var a="string"==typeof n?e.createElement(n):n;return D(a,r),o&&("string"!=typeof o&&o.nodeType?a.appendChild(o):"string"==typeof o&&T(a,o)),i?a:t.appendChild(a)})},B=function(t,n,r){return O(e.createElement(t),t,n,r,!0)},P=ui.encodeAllRaw,L=function(e,t){var n=p(e);return t?n.each(function(){for(var e;e=this.firstChild;)3===e.nodeType&&0===e.data.length?this.removeChild(e):this.parentNode.insertBefore(e,this)}).remove():n.remove(),n.length>1?n.toArray():n[0]},I=function(e,t,n){p(e).toggleClass(t,n).each(function(){""===this.className&&eu(this).attr("class",null)})},M=function(e,t,n){return R(t,function(t){return ht.is(t,"array")&&(e=e.cloneNode(!0)),n&&tu(nu(t.childNodes),function(t){e.appendChild(t)}),t.parentNode.replaceChild(e,t)})},F=function(e){if(yn(e)){var t="a"===e.nodeName.toLowerCase()&&!h(e,"href")&&h(e,"id");if(h(e,"name")||h(e,"data-mce-bookmark")||t)return!0}return!1},U=function(){return e.createRange()},z=function(n,o,i,a){if(ht.isArray(n)){for(var c=n.length,s=[];c--;)s[c]=z(n[c],o,i,a);return s}return!t.collect||n!==e&&n!==r||u.push([n,o,i,a]),f.bind(n,o,i,a||V)},H=function(t,n,o){if(ht.isArray(t)){for(var i=t.length,a=[];i--;)a[i]=H(t[i],n,o);return a}if(u.length>0&&(t===e||t===r))for(i=u.length;i--;){var c=u[i];t!==c[0]||n&&n!==c[1]||o&&o!==c[2]||f.unbind(c[0],c[1],c[2])}return f.unbind(t,n,o)},j=function(e){if(e&&yn(e)){var t=e.getAttribute("data-mce-contenteditable");return t&&"inherit"!==t?t:"inherit"!==e.contentEditable?e.contentEditable:null}return null},V={doc:e,settings:t,win:r,files:o,stdMode:!0,boxModel:!0,styleSheetLoader:a,boundEvents:u,styles:s,schema:c,events:f,isBlock:function(e){if("string"==typeof e)return!!d[e];if(e){var t=e.nodeType;if(t)return!(1!==t||!d[e.nodeName])}return!1},$:m,$$:p,root:null,clone:function(t,n){if(!ru||1!==t.nodeType||n)return t.cloneNode(n);var r=e.createElement(t.nodeName);return tu(b(t),function(e){y(r,e.nodeName,h(t,e.nodeName))}),r},getRoot:C,getViewPort:function(e){var t=hn(e);return{x:t.x,y:t.y,w:t.width,h:t.height}},getRect:function(e){e=g(e);var t=x(e),n=E(e);return{x:t.x,y:t.y,w:n.w,h:n.h}},getSize:E,getParent:function(e,t,n){var r=_(e,t,n,!1);return r&&r.length>0?r[0]:null},getParents:_,get:g,getNext:function(e,t){return A(e,t,"nextSibling")},getPrev:function(e,t){return A(e,t,"previousSibling")},select:function(n,r){return ga(n,g(r)||t.root_element||e,[])},is:k,add:O,create:B,createHTML:function(e,t,n){var r,o="";for(r in o+="<"+e,t)Ce(t,r)&&(o+=" "+r+'="'+P(t[r])+'"');return void 0!==n?o+">"+n+"</"+e+">":o+" />"},createFragment:function(t){var n,r=e.createElement("div"),o=e.createDocumentFragment();for(o.appendChild(r),t&&(r.innerHTML=t);n=r.firstChild;)o.appendChild(n);return o.removeChild(r),o},remove:L,setStyle:function(e,n,r){var o=l(n)?p(e).css(n,r):p(e).css(n);t.update_styles&&iu(s,o)},getStyle:S,setStyles:function(e,n){var r=p(e).css(n);t.update_styles&&iu(s,r)},removeAllAttribs:function(e){return R(e,function(e){var t,n=e.attributes;for(t=n.length-1;t>=0;t--)e.removeAttributeNode(n.item(t))})},setAttrib:y,setAttribs:D,getAttrib:h,getPos:x,parseStyle:function(e){return s.parse(e)},serializeStyle:function(e,t){return s.serialize(e,t)},addStyle:function(t){var r,o;if(V!==uu.DOM&&e===document){if(n[t])return;n[t]=!0}(o=e.getElementById("mceDefaultStyles"))||((o=e.createElement("style")).id="mceDefaultStyles",o.type="text/css",(r=e.getElementsByTagName("head")[0]).firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o)),o.styleSheet?o.styleSheet.cssText+=t:o.appendChild(e.createTextNode(t))},loadCSS:function(e){e||(e=""),q(e.split(","),function(e){o[e]=!0,a.load(e,w)})},addClass:function(e,t){p(e).addClass(t)},removeClass:function(e,t){I(e,t,!1)},hasClass:function(e,t){return p(e).hasClass(t)},toggleClass:I,show:function(e){p(e).show()},hide:function(e){p(e).hide()},isHidden:function(e){return"none"===p(e).css("display")},uniqueId:function(e){return(e||"mce_")+i++},setHTML:T,getOuterHTML:function(e){var t="string"==typeof e?g(e):e;return yn(t)?t.outerHTML:eu("<div></div>").append(eu(t).clone()).html()},setOuterHTML:function(e,t){p(e).each(function(){try{if("outerHTML"in this)return void(this.outerHTML=t)}catch(e){}L(eu(this).html(t),!0)})},decode:ui.decode,encode:P,insertAfter:function(e,t){var n=g(t);return R(e,function(e){var t=n.parentNode,r=n.nextSibling;return r?t.insertBefore(e,r):t.appendChild(e),e})},replace:M,rename:function(e,t){var n;
90return e.nodeName!==t.toUpperCase()&&(n=B(t),tu(b(e),function(t){y(n,t.nodeName,h(e,t.nodeName))}),M(n,e,!0)),n||e},findCommonAncestor:function(e,t){for(var n,r=e;r;){for(n=t;n&&r!==n;)n=n.parentNode;if(r===n)break;r=r.parentNode}return!r&&e.ownerDocument?e.ownerDocument.documentElement:r},toHex:function(e){return s.toHex(ht.trim(e))},run:R,getAttribs:b,isEmpty:function(e,t){var n,r,o=0;if(F(e))return!1;if(e=e.firstChild){var i=new Gr(e,e.parentNode),a=c?c.getWhiteSpaceElements():{};t=t||(c?c.getNonEmptyElements():null);do{if(n=e.nodeType,yn(e)){var u=e.getAttribute("data-mce-bogus");if(u){e=i.next("all"===u);continue}if(r=e.nodeName.toLowerCase(),t&&t[r]){if("br"===r){o++,e=i.next();continue}return!1}if(F(e))return!1}if(8===n)return!1;if(3===n&&!Mo(e.nodeValue))return!1;if(3===n&&e.parentNode&&a[e.parentNode.nodeName]&&Mo(e.nodeValue))return!1;e=i.next()}while(e)}return o<=1},createRng:U,nodeIndex:au,split:function(e,t,n){var r,o,i,a=U();if(e&&t)return a.setStart(e.parentNode,au(e)),a.setEnd(t.parentNode,au(t)),r=a.extractContents(),(a=U()).setStart(t.parentNode,au(t)+1),a.setEnd(e.parentNode,au(e)+1),o=a.extractContents(),(i=e.parentNode).insertBefore(Ko(V,r),e),n?i.insertBefore(n,e):i.insertBefore(t,e),i.insertBefore(Ko(V,o),e),L(e),n||t},bind:z,unbind:H,fire:function(e,t,n){return f.fire(e,t,n)},getContentEditable:j,getContentEditableParent:function(e){for(var t=C(),n=null;e&&e!==t&&null===(n=j(e));e=e.parentNode);return n},destroy:function(){if(u.length>0)for(var e=u.length;e--;){var t=u[e];f.unbind(t[0],t[1],t[2])}le(o,function(e,t){a.unload(t),delete o[t]}),ga.setDocument&&ga.setDocument()},isChildOf:function(e,t){if(ru){for(;e;){if(t===e)return!0;e=e.parentNode}return!1}return e===t||t.contains(e)},dumpRng:function(e){return"startContainer: "+e.startContainer.nodeName+", startOffset: "+e.startOffset+", endContainer: "+e.endContainer.nodeName+", endOffset: "+e.endOffset}},$=function(e,t,n){var r=t.keep_values,o={set:function(e,r,o){t.url_converter&&null!==r&&(r=t.url_converter.call(t.url_converter_scope||n(),r,o,e[0])),e.attr("data-mce-"+o,r).attr(o,r)},get:function(e,t){return e.attr("data-mce-"+t)||e.attr(t)}},i={style:{set:function(t,n){null===n||"object"!=typeof n?(r&&t.attr("data-mce-style",n),null!==n&&"string"==typeof n?(t.removeAttr("style"),t.css(e.parse(n))):t.attr("style",n)):t.css(n)},get:function(t){var n=t.attr("data-mce-style")||t.attr("style");return n=e.serialize(e.parse(n),t[0].nodeName)}}};return r&&(i.href=i.src=o),i}(s,t,N(V));return V};uu.DOM=uu(document),uu.nodeIndex=au;var cu=uu.DOM,su=ht.each,fu=ht.grep,lu=function(){function e(e){void 0===e&&(e={}),this.states={},this.queue=[],this.scriptLoadedCallbacks={},this.queueLoadedCallbacks=[],this.loading=0,this.settings=e}return e.prototype._setReferrerPolicy=function(e){this.settings.referrerPolicy=e},e.prototype.loadScript=function(e,t,n){var r,o=cu,i=function(){o.remove(a),r&&(r.onerror=r.onload=r=null)},a=o.uniqueId();(r=document.createElement("script")).id=a,r.type="text/javascript",r.src=ht._addCacheSuffix(e),this.settings.referrerPolicy&&o.setAttrib(r,"referrerpolicy",this.settings.referrerPolicy),r.onload=function(){i(),t()},r.onerror=function(){i(),y(n)?n():"undefined"!=typeof console&&console.log&&console.log("Failed to load script: "+e)},(document.getElementsByTagName("head")[0]||document.body).appendChild(r)},e.prototype.isDone=function(e){return 2===this.states[e]},e.prototype.markDone=function(e){this.states[e]=2},e.prototype.add=function(e,t,n,r){var o=this.states[e];this.queue.push(e),void 0===o&&(this.states[e]=0),t&&(this.scriptLoadedCallbacks[e]||(this.scriptLoadedCallbacks[e]=[]),this.scriptLoadedCallbacks[e].push({success:t,failure:r,scope:n||this}))},e.prototype.load=function(e,t,n,r){return this.add(e,t,n,r)},e.prototype.remove=function(e){delete this.states[e],delete this.scriptLoadedCallbacks[e]},e.prototype.loadQueue=function(e,t,n){this.loadScripts(this.queue,e,t,n)},e.prototype.loadScripts=function(e,t,n,r){var o=this,i=[],a=function(e,t){su(o.scriptLoadedCallbacks[t],function(t){y(t[e])&&t[e].call(t.scope)}),o.scriptLoadedCallbacks[t]=void 0};o.queueLoadedCallbacks.push({success:t,failure:r,scope:n||this});var u=function(){var t=fu(e);if(e.length=0,su(t,function(e){2!==o.states[e]?3!==o.states[e]?1!==o.states[e]&&(o.states[e]=1,o.loading++,o.loadScript(e,function(){o.states[e]=2,o.loading--,a("success",e),u()},function(){o.states[e]=3,o.loading--,i.push(e),a("failure",e),u()})):a("failure",e):a("success",e)}),!o.loading){var n=o.queueLoadedCallbacks.slice(0);o.queueLoadedCallbacks.length=0,su(n,function(e){0===i.length?y(e.success)&&e.success.call(e.scope):y(e.failure)&&e.failure.call(e.scope,i)})}};u()},e.ScriptLoader=new e,e}(),du=function(e){var t=e;return{get:function(){return t},set:function(e){t=e}}},mu={},gu=du("en"),pu=function(){return be(mu,gu.get())},hu={getData:function(){return de(mu,function(e){return Re({},e)})},setCode:function(e){e&&gu.set(e)},getCode:function(){return gu.get()},add:function(e,t){var n=mu[e];n||(mu[e]=n={}),le(t,function(e,t){n[t.toLowerCase()]=e})},translate:function(e){var t,n=pu().getOr({}),r=function(e){return y(e)?Object.prototype.toString.call(e):o(e)?"":""+e},o=function(e){return""===e||null==e},i=function(e){var t=r(e);return be(n,t.toLowerCase()).map(r).getOr(t)},a=function(e){return e.replace(/{context:\w+}$/,"")};if(o(e))return"";
90if(d(t=e)&&ye(t,"raw"))return r(e.raw);if(function(e){return m(e)&&e.length>1}(e)){var u=e.slice(1);return a(i(e[0]).replace(/\{([0-9]+)\}/g,function(e,t){return ye(u,t)?r(u[t]):e}))}return a(i(e))},isRtl:function(){return pu().bind(function(e){return be(e,"_dir")}).exists(function(e){return"rtl"===e})},hasCode:function(e){return ye(mu,e)}},vu=function(){var e=[],t={},n={},r=[],o=function(e,t){var n=K(r,function(n){return n.name===e&&n.state===t});q(n,function(e){return e.callback()})},i=function(e){var t;return n[e]&&(t=n[e].dependencies),t||[]},a=function(e,t){return"object"==typeof t?t:"string"==typeof e?{prefix:"",resource:t,suffix:""}:{prefix:e.prefix,resource:t,suffix:e.suffix}},u=function(e,r,c,s,f){if(!t[e]){var l="string"==typeof r?r:r.prefix+r.resource+r.suffix;0!==l.indexOf("/")&&-1===l.indexOf("://")&&(l=vu.baseURL+"/"+l),t[e]=l.substring(0,l.lastIndexOf("/"));var d=function(){o(e,"loaded"),function(e,t,n,r){var o=i(e);q(o,function(e){var n=a(t,e);u(n.resource,n,void 0,void 0)}),n&&(r?n.call(r):n.call(lu))}(e,r,c,s)};n[e]?d():lu.ScriptLoader.add(l,d,s,f)}},c=function(e,o,i){void 0===i&&(i="added"),ye(n,e)&&"added"===i?o():ye(t,e)&&"loaded"===i?o():r.push({name:e,state:i,callback:o})};return{items:e,urls:t,lookup:n,_listeners:r,get:function(e){if(n[e])return n[e].instance},dependencies:i,requireLangPack:function(e,n){!1!==vu.languageLoad&&c(e,function(){var r=hu.getCode();!r||n&&-1===(","+(n||"")+",").indexOf(","+r+",")||lu.ScriptLoader.add(t[e]+"/langs/"+r+".js")},"loaded")},add:function(t,r,i){var a=r;return e.push(a),n[t]={instance:a,dependencies:i},o(t,"added"),a},remove:function(e){delete t[e],delete n[e]},createUrl:a,addComponents:function(e,n){var r=t[e];q(n,function(e){lu.ScriptLoader.add(r+"/"+e)})},load:u,waitFor:c}};vu.languageLoad=!0,vu.baseURL="",vu.PluginManager=vu(),vu.ThemeManager=vu();var bu=function(){var e=function(e){var t=du(I.none()),n=function(){return t.get().each(e)};return{clear:function(){n(),t.set(I.none())},isSet:function(){return t.get().isSome()},get:function(){return t.get()},set:function(e){n(),t.set(I.some(e))}}}(w);return Re(Re({},e),{on:function(t){return e.get().each(t)}})},yu=function(e,t){var n=null;return{cancel:function(){g(n)||(clearTimeout(n),n=null)},throttle:function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];g(n)&&(n=setTimeout(function(){n=null,e.apply(null,r)},t))}}},Cu=function(e,t){var n=null,r=function(){g(n)||(clearTimeout(n),n=null)};return{cancel:r,throttle:function(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];r(),n=setTimeout(function(){n=null,e.apply(null,o)},t)}}},wu=function(e,t){var n=Vn(e,t);return void 0===n||""===n?[]:n.split(" ")},xu=function(e){return void 0!==e.dom.classList},Su=function(e,t){return function(e,t,n){var r=wu(e,t).concat([n]);return Hn(e,t,r.join(" ")),!0}(e,"class",t)},Nu=function(e,t){return function(e,t,n){var r=K(wu(e,t),function(e){return e!==n});return r.length>0?Hn(e,t,r.join(" ")):Wn(e,t),!1}(e,"class",t)},Eu=function(e,t){xu(e)?e.dom.classList.add(t):Su(e,t)},ku=function(e){0===(xu(e)?e.dom.classList:function(e){return wu(e,"class")}(e)).length&&Wn(e,"class")},_u=function(e,t){return xu(e)&&e.dom.classList.contains(t)},Au=function(e,t){var n=[];return q(zt(e),function(e){t(e)&&(n=n.concat([e])),n=n.concat(Au(e,t))}),n},Ru=function(e,t){return function(e,t){var n=void 0===t?document:t.dom;return wt(n)?[]:V(n.querySelectorAll(e),bt.fromDom)}(t,e)},Du=N("mce-annotation"),Tu=N("data-mce-annotation"),Ou=N("data-mce-annotation-uid"),Bu=function(e,t){var n=e.selection.getRng(),r=bt.fromDom(n.startContainer),o=bt.fromDom(e.getBody()),i=t.fold(function(){return"."+Du()},function(e){return"["+Tu()+'="'+e+'"]'}),a=Ht(r,n.startOffset).getOr(r),u=jr(a,i,function(e){return xt(e,o)}),c=function(e,t){return $n(e,t)?I.some(Vn(e,t)):I.none()};return u.bind(function(t){return c(t,""+Ou()).bind(function(n){return c(t,""+Tu()).map(function(t){var r=Pu(e,n);return{uid:n,name:t,elements:r}})})})},Pu=function(e,t){var n=bt.fromDom(e.getBody());return Ru(n,"["+Ou()+'="'+t+'"]')},Lu=function(e,t){var n=du({}
90),r=function(){return{listeners:[],previous:bu()}},o=function(e,t){i(e,function(e){return t(e),e})},i=function(e,t){var o=n.get(),i=t(be(o,e).getOrThunk(r));o[e]=i,n.set(o)},a=Cu(function(){var t=n.get(),r=re(se(t));q(r,function(t){i(t,function(n){var r=n.previous.get();return Bu(e,I.some(t)).fold(function(){r.isSome()&&(!function(e){o(e,function(t){q(t.listeners,function(t){return t(!1,e)})})}(t),n.previous.clear())},function(e){var t=e.uid,i=e.name,a=e.elements;Mn(r,t)||(!function(e,t,n){o(e,function(r){q(r.listeners,function(r){return r(!0,e,{uid:t,nodes:V(n,function(e){return e.dom})})})})}(i,t,a),n.previous.set(t))}),{previous:n.previous,listeners:n.listeners}})})},30);e.on("remove",function(){a.cancel()}),e.on("NodeChange",function(){a.throttle()});return{addListener:function(e,t){i(e,function(e){return{previous:e.previous,listeners:e.listeners.concat([t])}})}}},Iu=function(e,t){e.on("init",function(){e.serializer.addNodeFilter("span",function(e){q(e,function(e){(function(e){return I.from(e.attr(Tu())).bind(t.lookup)})(e).each(function(t){!1===t.persistent&&e.unwrap()})})})})},Mu=0,Fu=function(e){var t=(new Date).getTime();return e+"_"+Math.floor(1e9*Math.random())+ ++Mu+String(t)},Uu=function(e,t){var n,r,o=Ot(e).dom,i=bt.fromDom(o.createDocumentFragment()),a=(n=t,(r=(o||document).createElement("div")).innerHTML=n,zt(bt.fromDom(r)));nn(i,a),rn(e),tn(e,i)},zu=function(e,t){return bt.fromDom(e.dom.cloneNode(t))},Hu=function(e){return zu(e,!1)},ju=function(e){return zu(e,!0)},Vu=function(e,t,n){void 0===n&&(n=T);var r=new Gr(e,t),o=function(e){var t;do{t=r[e]()}while(t&&!_n(t)&&!n(t));return I.from(t).filter(_n)};return{current:function(){return I.from(r.current()).filter(_n)},next:function(){return o("next")},prev:function(){return o("prev")},prev2:function(){return o("prev2")}}},qu=function(e,t){var n=t||function(t){return e.isBlock(t)||Tn(t)||Pn(t)},r=function(e,t,n,o){if(_n(e)){var i=o(e,t,e.data);if(-1!==i)return I.some({container:e,offset:i})}return n().bind(function(e){return r(e.container,e.offset,n,o)})};return{backwards:function(e,t,o,i){var a=Vu(e,i,n);return r(e,t,function(){return a.prev().map(function(e){return{container:e,offset:e.length}})},o).getOrNull()},forwards:function(e,t,o,i){var a=Vu(e,i,n);return r(e,t,function(){return a.next().map(function(e){return{container:e,offset:0}})},o).getOrNull()}}},$u=Math.round,Wu=function(e){return e?{left:$u(e.left),top:$u(e.top),bottom:$u(e.bottom),right:$u(e.right),width:$u(e.width),height:$u(e.height)}:{left:0,top:0,bottom:0,right:0,width:0,height:0}},Ku=function(e,t){return e=Wu(e),t?e.right=e.left:(e.left=e.left+e.width,e.right=e.left),e.width=0,e},Xu=function(e,t,n){return e>=0&&e<=Math.min(t.height,n.height)/2},Yu=function(e,t){var n=Math.min(t.height/2,e.height/2);return e.bottom-n<t.top||!(e.top>t.bottom)&&Xu(t.top-e.bottom,e,t)},Gu=function(e,t){return e.top>t.bottom||!(e.bottom<t.top)&&Xu(t.bottom-e.top,e,t)},Ju=function(e,t,n){return t>=e.left&&t<=e.right&&n>=e.top&&n<=e.bottom},Qu=function(e){var t=e.startContainer,n=e.startOffset;return t.hasChildNodes()&&e.endOffset===n+1?t.childNodes[n]:null},Zu=function(e,t){if(yn(e)&&e.hasChildNodes()){var n=e.childNodes;return n[(r=t,o=0,i=n.length-1,Math.min(Math.max(r,o),i))]}return e;var r,o,i},ec=new RegExp("[̀-ͯ҃-҇҈-҉֑-ֽֿׁ-ׂׄ-ׇׅؐ-ًؚ-ٰٟۖ-ۜ۟-ۤۧ-۪ۨ-ܑۭܰ-݊ަ-ް߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࣣ-ंऺ़ु-ै्॑-ॗॢ-ॣঁ়াু-ৄ্ৗৢ-ৣਁ-ਂ਼ੁ-ੂੇ-ੈੋ-੍ੑੰ-ੱੵઁ-ં઼ુ-ૅે-ૈ્ૢ-ૣଁ଼ାିୁ-ୄ୍ୖୗୢ-ୣஂாீ்ௗఀా-ీె-ైొ-్ౕ-ౖౢ-ౣಁ಼ಿೂೆೌ-್ೕ-ೖೢ-ೣഁാു-ൄ്ൗൢ-ൣ්ාි-ුූෟัิ-ฺ็-๎ັິ-ູົ-ຼ່-ໍ༘-ཱ༹༙༵༷-ཾྀ-྄྆-྇ྍ-ྗྙ-ྼ࿆ိ-ူဲ-့္-်ွ-ှၘ-ၙၞ-ၠၱ-ၴႂႅ-ႆႍႝ፝-፟ᜒ-᜔ᜲ-᜴ᝒ-ᝓᝲ-ᝳ឴-឵ិ-ួំ៉-៓៝᠋-᠍ᢩᤠ-ᤢᤧ-ᤨᤲ᤹-᤻ᨗ-ᨘᨛᩖᩘ-ᩞ᩠ᩢᩥ-ᩬᩳ-᩿᩼᪰-᪽᪾ᬀ-ᬃ᬴ᬶ-ᬺᬼᭂ᭫-᭳ᮀ-ᮁᮢ-ᮥᮨ-ᮩ᮫-ᮭ᯦ᯨ-ᯩᯭᯯ-ᯱᰬ-ᰳᰶ-᰷᳐-᳔᳒-᳢᳠-᳨᳭᳴᳸-᳹᷀-᷵᷼-᷿‌-‍⃐-⃜⃝-⃠⃡⃢-⃤⃥-⃰⳯-⵿⳱ⷠ-〪ⷿ-〭〮-゙〯-゚꙯꙰-꙲ꙴ-꙽ꚞ-ꚟ꛰-꛱ꠂ꠆ꠋꠥ-ꠦ꣄꣠-꣱ꤦ-꤭ꥇ-ꥑꦀ-ꦂ꦳ꦶ-ꦹꦼꧥꨩ-ꨮꨱ-ꨲꨵ-ꨶꩃꩌꩼꪰꪲ-ꪴꪷ-ꪸꪾ-꪿꫁ꫬ-ꫭ꫶ꯥꯨ꯭ﬞ︀-️︠-゙︯-゚]"),tc=function(e){return"string"==typeof e&&e.charCodeAt(0)>=768&&ec.test(e)},nc=yn,rc=Bo,oc=wn("display","block table"),ic=wn("float","left right"),ac=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){for(var n=0;n<e.length;n++)if(!e[n](t))return!1;return!0}}(nc,rc,A(ic)),uc=A(wn("white-space","pre pre-line pre-wrap")),cc=_n,sc=Tn,fc=uu.nodeIndex,lc=function(e,t){return t<0&&yn(e)&&e.hasChildNodes()?void 0:Zu(e,t)},dc=function(e){return"createRange"in e?e.createRange():uu.DOM.createRng()},mc=function(e){return e&&/[\r\n\t ]/.test(e)},gc=function(e){return!!e.setStart&&!!e.setEnd},pc=function(e){var t=e.startContainer,n=e.startOffset;if(mc(e.toString())&&uc(t.parentNode)&&_n(t)){var r=t.data;if(mc(r[n-1])||mc(r[n+1]))return!0}return!1},hc=function(e){return 0===e.left&&0===e.right&&0===e.top&&0===e.bottom},vc=function(e){var t,n=e.getClientRects();return t=n.length>0?Wu(n[0]):Wu(e.getBoundingClientRect()),!gc(e)&&sc(e)&&hc(t)?function(e){var t=e.ownerDocument,n=dc(t),r=t.createTextNode(" "),o=e.parentNode;o.insertBefore(r,e),n.setStart(r,0),n.setEnd(r,1);var i=Wu(n.getBoundingClientRect());return o.removeChild(r),i}(e):hc(t)&&gc(e)?function(e){var t=e.startContainer,n=e.endContainer,r=e.startOffset,o=e.endOffset;if(t===n&&_n(n)&&0===r&&1===o){var i=e.cloneRange();return i.setEndAfter(n),vc(i)}return null}(e):t},bc=function(e,t){var n=Ku(e,t);return n.width=1,n.right=n.left+1,n},yc=function(e,t,n){var r=function(){return n||(n=function(e){var t=[],n=function(e){var n,r;0!==e.height&&(t.length>0&&(n=e,r=t[t.length-1],n.left===r.left&&n.top===r.top&&n.bottom===r.bottom&&n.right===r.right)||t.push(e))},r=function(e,r){var o=dc(e.ownerDocument);if(r<e.data.length){if(tc(e.data[r]))return t;if(tc(e.data[r-1])&&(o.setStart(e,r),o.setEnd(e,r+1),!pc(o)))return n(bc(vc(o),!1)),t}r>0&&(o.setStart(e,r-1),o.setEnd(e,r),pc(o)||n(bc(vc(o),!1))),r<e.data.length&&(o.setStart(e,r),o.setEnd(e,r+1),pc(o)||n(bc(vc(o),!0)))},o=e.container(),i=e.offset();if(cc(o))return r(o,i),t;if(nc(o))if(e.isAtEnd()){var a=lc(o,i);cc(a)&&r(a,a.data.length),ac(a)&&!sc(a)&&n(bc(vc(a),!1))}else{if(a=lc(o,i),cc(a)&&r(a,0),ac(a)&&e.isAtEnd())return n(bc(vc(a),!1)),t;var u=lc(e.container(),e.offset()-1);ac(u)&&!sc(u)&&(oc(u)||oc(a)||!ac(a))&&n(bc(vc(u),!1)),ac(a)&&n(bc(vc(a),!0))}return t}(yc(e,t))),n};return{container:N(e),offset:N(t),toRange:function(){var n=dc(e.ownerDocument);return n.setStart(e,t),n.setEnd(e,t),n},getClientRects:r,isVisible:function(){return r().length>0},isAtStart:function(){return cc(e),0===t}
90,isAtEnd:function(){return cc(e)?t>=e.data.length:t>=e.childNodes.length},isEqual:function(n){return n&&e===n.container()&&t===n.offset()},getNode:function(n){return lc(e,n?t-1:t)}}};yc.fromRangeStart=function(e){return yc(e.startContainer,e.startOffset)},yc.fromRangeEnd=function(e){return yc(e.endContainer,e.endOffset)},yc.after=function(e){return yc(e.parentNode,fc(e)+1)},yc.before=function(e){return yc(e.parentNode,fc(e))},yc.isAbove=function(e,t){return Fn(ie(t.getClientRects()),ae(e.getClientRects()),Yu).getOr(!1)},yc.isBelow=function(e,t){return Fn(ae(t.getClientRects()),ie(e.getClientRects()),Gu).getOr(!1)},yc.isAtStart=function(e){return!!e&&e.isAtStart()},yc.isAtEnd=function(e){return!!e&&e.isAtEnd()},yc.isTextPosition=function(e){return!!e&&_n(e.container())},yc.isElementPosition=function(e){return!1===yc.isTextPosition(e)};var Cc,wc=function(e,t){_n(t)&&0===t.data.length&&e.remove(t)},xc=function(e,t,n){Dn(n)?function(e,t,n){var r=I.from(n.firstChild),o=I.from(n.lastChild);t.insertNode(n),r.each(function(t){return wc(e,t.previousSibling)}),o.each(function(t){return wc(e,t.nextSibling)})}(e,t,n):function(e,t,n){t.insertNode(n),wc(e,n.previousSibling),wc(e,n.nextSibling)}(e,t,n)},Sc=_n,Nc=Sn,Ec=uu.nodeIndex,kc=function(e){var t=e.parentNode;return Nc(t)?kc(t):t},_c=function(e){return e?ke(e.childNodes,function(e,t){return Nc(t)&&"BR"!==t.nodeName?e=e.concat(_c(t)):e.push(t),e},[]):[]},Ac=function(e){return function(t){return e===t}},Rc=function(e){return(Sc(e)?"text()":e.nodeName.toLowerCase())+"["+function(e){var t,n;t=_c(kc(e)),n=_e(t,Ac(e),e),t=t.slice(0,n+1);var r=ke(t,function(e,n,r){return Sc(n)&&Sc(t[r-1])&&e++,e},0);return t=Ne(t,Cn([e.nodeName])),(n=_e(t,Ac(e),e))-r}(e)+"]"},Dc=function(e,t){var n,r,o,i,a,u=[];return n=t.container(),r=t.offset(),Sc(n)?o=function(e,t){for(;(e=e.previousSibling)&&Sc(e);)t+=e.data.length;return t}(n,r):(r>=(i=n.childNodes).length?(o="after",r=i.length-1):o="before",n=i[r]),u.push(Rc(n)),a=function(e,t,n){var r=[];for(t=t.parentNode;!(t===e||n&&n(t));t=t.parentNode)r.push(t);return r}(e,n),a=Ne(a,A(Sn)),(u=u.concat(Se(a,function(e){return Rc(e)}))).reverse().join("/")+","+o},Tc=function(e,t){var n;if(!t)return null;var r=t.split(","),o=r[0].split("/");n=r.length>1?r[1]:"before";var i=ke(o,function(e,t){var n,r,o,i,a=/([\w\-\(\)]+)\[([0-9]+)\]/.exec(t);return a?("text()"===a[1]&&(a[1]="#text"),n=e,r=a[1],o=parseInt(a[2],10),i=_c(n),i=Ne(i,function(e,t){return!Sc(e)||!Sc(i[t-1])}),(i=Ne(i,Cn([r])))[o]):null},e);return i?Sc(i)?function(e,t){for(var n,r=e,o=0;Sc(r);){if(n=r.data.length,t>=o&&t<=o+n){e=r,t-=o;break}if(!Sc(r.nextSibling)){e=r,t=n;break}o+=n,r=r.nextSibling}return Sc(e)&&t>e.data.length&&(t=e.data.length),yc(e,t)}(i,parseInt(n,10)):(n="after"===n?Ec(i)+1:Ec(i),yc(i.parentNode,n)):null},Oc=Pn,Bc=function(e,t,n,r,o){var i,a=r[o?"startContainer":"endContainer"],u=r[o?"startOffset":"endOffset"],c=[],s=0,f=e.getRoot();for(_n(a)?c.push(n?function(e,t,n){var r,o;for(o=e(t.data.slice(0,n)).length,r=t.previousSibling;r&&_n(r);r=r.previousSibling)o+=e(r.data).length;return o}(t,a,u):u):(u>=(i=a.childNodes).length&&i.length&&(s=1,u=Math.max(0,i.length-1)),c.push(e.nodeIndex(i[u],n)+s));a&&a!==f;a=a.parentNode)c.push(e.nodeIndex(a,n));return c},Pc=function(e,t,n){var r=0;return ht.each(e.select(t),function(e){if("all"!==e.getAttribute("data-mce-bogus"))return e!==n&&void r++}),r},Lc=function(e,t){var n,r,o,i=t?"start":"end";n=e[i+"Container"],r=e[i+"Offset"],yn(n)&&"TR"===n.nodeName&&(n=(o=n.childNodes)[Math.min(t?r:r-1,o.length-1)])&&(r=t?0:n.childNodes.length,e["set"+(t?"Start":"End")](n,r))},Ic=function(e){return Lc(e,!0),Lc(e,!1),e},Mc=function(e,t){var n;if(yn(e)&&(e=Zu(e,t),Oc(e)))return e;if(ho(e)){if(_n(e)&&go(e)&&(e=e.parentNode),n=e.previousSibling,Oc(n))return n;if(n=e.nextSibling,Oc(n))return n}},Fc=function(e,t,n){var r=n.getNode(),o=r?r.nodeName:null,i=n.getRng();if(Oc(r)||"IMG"===o)return{name:o,index:Pc(n.dom,o,r)};var a=function(e){return Mc(e.startContainer,e.startOffset)||Mc(e.endContainer,e.endOffset)}(i);return a?{name:o=a.tagName,index:Pc(n.dom,o,a)}:function(e,t,n,r){var o=t.dom,i={};return i.start=Bc(o,e,n,r,!0),t.isCollapsed()||(i.end=Bc(o,e,n,r,!1)),No(r)&&(i.isFakeCaret=!0),i}(e,n,t,i)},Uc=function(e,t,n){var r={"data-mce-type":"bookmark",id:t,style:"overflow:hidden;line-height:0px"};return n?e.create("span",r,"&#xFEFF;"):e.create("span",r)},zc=function(e,t){var n=e.dom,r=e.getRng(),o=n.uniqueId(),i=e.isCollapsed(),a=e.getNode(),u=a.nodeName;if("IMG"===u)return{name:u,index:Pc(n,u,a)};var c=Ic(r.cloneRange());if(!i){c.collapse(!1);var s=Uc(n,o+"_end",t);xc(n,c,s)}(r=Ic(r)).collapse(!0);var f=Uc(n,o+"_start",t);return xc(n,r,f),e.moveToBookmark({id:o,keep:!0}),{id:o}},Hc=function(e,t,n){return 2===t?Fc(fo,n,e):3===t?function(e){var t=e.getRng();return{start:Dc(e.dom.getRoot(),yc.fromRangeStart(t)),end:Dc(e.dom.getRoot(),yc.fromRangeEnd(t))}}(e):t?function(e){return{rng:e.getRng()}}(e):zc(e,!1)},jc=_(Fc,E,!0),Vc=uu.DOM,qc=function(e,t,n){var r=e.getParam(t,n);if(-1!==r.indexOf("=")){var o=e.getParam(t,"","hash");return be(o,e.id).getOr(n)}return r},$c=function(e){return e.getParam("content_security_policy","")},Wc=function(e){if(e.getParam("force_p_newlines",!1))return"p";var t=e.getParam("forced_root_block","p");return!1===t?"":!0===t?"p":t},Kc=function(e){return e.getParam("forced_root_block_attrs",{})},Xc=function(e){return e.getParam("automatic_uploads",!0,"boolean")},Yc=function(e){return e.getParam("images_reuse_filename",!1,"boolean")},Gc=function(e){return e.getParam("icons","","string")},Jc=function(e){return e.getParam("images_upload_url","","string")},Qc=function(e){return e.getParam("images_upload_base_path","","string")},Zc=function(e){return e.getParam("images_upload_credentials",!1,"boolean")},es=function(e){return e.getParam("images_upload_handler",null,"function")},ts=function(e){return e.getParam("content_css_cors",!1,"boolean")},ns=function(e){return e.getParam("referrer_policy","","string")},rs=function(e){return e.getParam("language","en","string")},os=function(e){return e.getParam("indent_use_margin",!1)},is=function(e){var t=e.getParam("font_css",[]);return m(t)?t:V(t.split(","),Ue)},as=function(e){var t=e.getParam("object_resizing");return!1!==t&&!lt.iOS&&(l(t)?t:"table,img,figure.image,div,video,iframe")},us=function(e){return e.getParam("event_root")},cs=function(e){return e.getParam("theme")},ss=function(e){return e.getParam("validate")},fs=function(e){return!1!==e.getParam("inline_boundaries")},ls=function(e){return e.getParam("content_css_cors")},ds=function(e){return e.getParam("plugins","","string")},ms=yn,gs=_n,ps=function(e){var t=e.parentNode;t&&t.removeChild(e)},hs=function(e){var t=fo(e);return{count:e.length-t.length,text:t}},vs=function(e){for(var t;-1!==(t=e.data.lastIndexOf(co));)e.deleteData(t,1)},bs=function(e,t){return xs(e),t},ys=function(e,t){var n,r,o,i=t.container(),a=(n=ue(i.childNodes),r=e,o=z(n,r),-1===o?I.none():I.some(o)).map(function(e){return e<t.offset()?yc(i,t.offset()-1):t}).getOr(t);return xs(e),a},Cs=function(e,t){return gs(e)&&t.container()===e?function(e,t){var n=hs(e.data.substr(0,t.offset())),r=hs(e.data.substr(t.offset()));return(n.text+r.text).length>0?(vs(e),yc(e,t.offset()-n.count)):t}(e,t):bs(e,t)},ws=function(e,t){return yc.isTextPosition(t)?Cs(e,t):function(e,t){return t.container()===e.parentNode?ys(e,t):bs(e,t)}(e,t)},xs=function(e){ms(e)&&ho(e)&&(vo(e)?e.removeAttribute("data-mce-caret"):ps(e)),gs(e)&&(vs(e),0===e.data.length&&ps(e))},Ss=nt().browser,Ns=Pn,Es=In,ks=Ln,_s=function(e,t,n){var r,o,i=Ku(t.getBoundingClientRect(),n);if("BODY"===e.tagName){var a=e.ownerDocument.documentElement;
90r=e.scrollLeft||a.scrollLeft,o=e.scrollTop||a.scrollTop}else{var u=e.getBoundingClientRect();r=e.scrollLeft-u.left,o=e.scrollTop-u.top}i.left+=r,i.right+=r,i.top+=o,i.bottom+=o,i.width=1;var c=t.offsetWidth-t.clientWidth;return c>0&&(n&&(c*=-1),i.left+=c,i.right+=c),i},As=function(e,t,n,r){var o,i,a=bu(),u=Wc(e),c=u.length>0?u:"p",s=function(){!function(e){for(var t=Ru(bt.fromDom(e),"*[contentEditable=false],video,audio,embed,object"),n=0;n<t.length;n++){var r,o=t[n].dom,i=o.previousSibling;xo(i)&&(1===(r=i.data).length?i.parentNode.removeChild(i):i.deleteData(r.length-1,1)),i=o.nextSibling,wo(i)&&(1===(r=i.data).length?i.parentNode.removeChild(i):i.deleteData(0,1))}}(t),i&&(xs(i),i=null),a.on(function(e){eu(e.caret).remove(),a.clear()}),o&&(Kr.clearInterval(o),o=void 0)},f=function(){o=Kr.setInterval(function(){r()?eu("div.mce-visual-caret",t).toggleClass("mce-visual-caret-hidden"):eu("div.mce-visual-caret",t).addClass("mce-visual-caret-hidden")},500)};return{show:function(e,r){var o;if(s(),ks(r))return null;if(!n(r))return i=function(e,t){var n=e.ownerDocument.createTextNode(co),r=e.parentNode;if(t){if(o=e.previousSibling,mo(o)){if(ho(o))return o;if(xo(o))return o.splitText(o.data.length-1)}r.insertBefore(n,e)}else{var o=e.nextSibling;if(mo(o)){if(ho(o))return o;if(wo(o))return o.splitText(1),o}e.nextSibling?r.insertBefore(n,e.nextSibling):r.appendChild(n)}return n}(r,e),o=r.ownerDocument.createRange(),Ds(i.nextSibling)?(o.setStart(i,0),o.setEnd(i,0)):(o.setStart(i,1),o.setEnd(i,1)),o;i=Co(c,r,e);var u=_s(t,r,e);eu(i).css("top",u.top);var l=eu('<div class="mce-visual-caret" data-mce-bogus="all"></div>').css(Re({},u)).appendTo(t)[0];return a.set({caret:l,element:r,before:e}),e&&eu(l).addClass("mce-visual-caret-before"),f(),(o=r.ownerDocument.createRange()).setStart(i,0),o.setEnd(i,0),o},hide:s,getCss:function(){return".mce-visual-caret {position: absolute;background-color: black;background-color: currentcolor;}.mce-visual-caret-hidden {display: none;}*[data-mce-caret] {position: absolute;left: -1000px;right: auto;top: 0;margin: 0;padding: 0;}"},reposition:function(){a.on(function(e){var n=_s(t,e.element,e.before);eu(e.caret).css(Re({},n))})},destroy:function(){return Kr.clearInterval(o)}}},Rs=function(){return Ss.isIE()||Ss.isEdge()||Ss.isFirefox()},Ds=function(e){return Ns(e)||Es(e)},Ts=function(e){return Ds(e)||Nn(e)&&Rs()},Os=Pn,Bs=In,Ps=wn("display","block table table-cell table-caption list-item"),Ls=ho,Is=go,Ms=yn,Fs=Bo,Us=function(e){return e>0},zs=function(e){return e<0},Hs=function(e,t){for(var n;n=e(t);)if(!Is(n))return n;return null},js=function(e,t,n,r,o){var i=new Gr(e,r),a=Os(e)||Is(e);if(zs(t)){if(a&&n(e=Hs(i.prev.bind(i),!0)))return e;for(;e=Hs(i.prev.bind(i),o);)if(n(e))return e}if(Us(t)){if(a&&n(e=Hs(i.next.bind(i),!0)))return e;for(;e=Hs(i.next.bind(i),o);)if(n(e))return e}return null},Vs=function(e,t){for(;e&&e!==t;){if(Ps(e))return e;e=e.parentNode}return null},qs=function(e,t,n){return Vs(e.container(),n)===Vs(t.container(),n)},$s=function(e,t){if(!t)return null;var n=t.container(),r=t.offset();return Ms(n)?n.childNodes[r+e]:null},Ws=function(e,t){var n=t.ownerDocument.createRange();return e?(n.setStartBefore(t),n.setEndBefore(t)):(n.setStartAfter(t),n.setEndAfter(t)),n},Ks=function(e,t,n){return Vs(t,e)===Vs(n,e)},Xs=function(e,t,n){for(var r=e?"previousSibling":"nextSibling";n&&n!==t;){var o=n[r];if(Ls(o)&&(o=o[r]),Os(o)||Bs(o)){if(Ks(t,o,n))return o;break}if(Fs(o))break;n=n.parentNode}return null},Ys=_(Ws,!0),Gs=_(Ws,!1),Js=function(e,t,n){var r,o=_(Xs,!0,t),i=_(Xs,!1,t),a=n.startContainer,u=n.startOffset;if(go(a)){Ms(a)||(a=a.parentNode);var c=a.getAttribute("data-mce-caret");if("before"===c&&(r=a.nextSibling,Ts(r)))return Ys(r);if("after"===c&&(r=a.previousSibling,Ts(r)))return Gs(r)}if(!n.collapsed)return n;if(_n(a)){if(Ls(a)){if(1===e){if(r=i(a))return Ys(r);if(r=o(a))return Gs(r)}if(-1===e){if(r=o(a))return Gs(r);if(r=i(a))return Ys(r)}return n}if(xo(a)&&u>=a.data.length-1)return 1===e&&(r=i(a))?Ys(r):n;if(wo(a)&&u<=1)return-1===e&&(r=o(a))?Gs(r):n;if(u===a.data.length)return(r=i(a))?Ys(r):n;if(0===u)return(r=o(a))?Gs(r):n}return n},Qs=function(e,t){return I.from($s(e?0:-1,t)).filter(Os)},Zs=function(e,t,n){var r=Js(e,t,n);return-1===e?yc.fromRangeStart(r):yc.fromRangeEnd(r)},ef=function(e){return I.from(e.getNode()).map(bt.fromDom)},tf=function(e,t){for(;t=e(t);)if(t.isVisible())return t;return t},nf=function(e,t){var n=qs(e,t);return!(n||!Tn(e.getNode()))||n};!function(e){e[e.Backwards=-1]="Backwards",e[e.Forwards=1]="Forwards"}(Cc||(Cc={}));var rf,of=Pn,af=_n,uf=yn,cf=Tn,sf=Bo,ff=function(e){return Do(e)||function(e){return!!Po(e)&&!0!==Y(ue(e.getElementsByTagName("*")),function(e,t){return e||Eo(t)},!1)}(e)},lf=Lo,df=function(e,t){return e.hasChildNodes()&&t<e.childNodes.length?e.childNodes[t]:null},mf=function(e,t){if(Us(e)){if(sf(t.previousSibling)&&!af(t.previousSibling))return yc.before(t);if(af(t))return yc(t,0)}if(zs(e)){if(sf(t.nextSibling)&&!af(t.nextSibling))return yc.after(t);if(af(t))return yc(t,t.data.length)}return zs(e)?cf(t)?yc.before(t):yc.after(t):yc.before(t)},gf=function(e,t,n){var r,o,i,a;if(!uf(n)||!t)return null;if(t.isEqual(yc.after(n))&&n.lastChild){if(a=yc.after(n.lastChild),zs(e)&&sf(n.lastChild)&&uf(n.lastChild))return cf(n.lastChild)?yc.before(n.lastChild):a}else a=t;var u=a.container(),c=a.offset();if(af(u)){if(zs(e)&&c>0)return yc(u,--c);if(Us(e)&&c<u.length)return yc(u,++c);r=u}else{if(zs(e)&&c>0&&(o=df(u,c-1),sf(o)))return!ff(o)&&(i=js(o,e,lf,o))?af(i)?yc(i,i.data.length):yc.after(i):af(o)?yc(o,o.data.length):yc.before(o);if(Us(e)&&c<u.childNodes.length&&(o=df(u,c),sf(o)))return cf(o)?function(e,t){var n=t.nextSibling;return n&&sf(n)?af(n)?yc(n,0):yc.before(n):gf(Cc.Forwards,yc.after(t),e)}(n,o):!ff(o)&&(i=js(o,e,lf,o))?af(i)?yc(i,0):yc.before(i):af(o)?yc(o,0):yc.after(o);r=o||a.getNode()}
90if((Us(e)&&a.isAtEnd()||zs(e)&&a.isAtStart())&&(r=js(r,e,O,n,!0),lf(r,n)))return mf(e,r);o=js(r,e,lf,n);var s=Ae(K(function(e,t){for(var n=[];e&&e!==t;)n.push(e),e=e.parentNode;return n}(u,n),of));return!s||o&&s.contains(o)?o?mf(e,o):null:a=Us(e)?yc.after(s):yc.before(s)},pf=function(e){return{next:function(t){return gf(Cc.Forwards,t,e)},prev:function(t){return gf(Cc.Backwards,t,e)}}},hf=function(e){return yc.isTextPosition(e)?0===e.offset():Bo(e.getNode())},vf=function(e){if(yc.isTextPosition(e)){var t=e.container();return e.offset()===t.data.length}return Bo(e.getNode(!0))},bf=function(e,t){return!yc.isTextPosition(e)&&!yc.isTextPosition(t)&&e.getNode()===t.getNode(!0)},yf=function(e,t,n){return e?!bf(t,n)&&(r=t,!(!yc.isTextPosition(r)&&Tn(r.getNode())))&&vf(t)&&hf(n):!bf(n,t)&&hf(t)&&vf(n);var r},Cf=function(e,t,n){var r=pf(t);return I.from(e?r.next(n):r.prev(n))},wf=function(e,t,n){return Cf(e,t,n).bind(function(r){return qs(n,r,t)&&yf(e,n,r)?Cf(e,t,r):I.some(r)})},xf=function(e,t,n,r){return wf(e,t,n).bind(function(n){return r(n)?xf(e,t,n,r):I.some(n)})},Sf=function(e,t){var n,r=e?t.firstChild:t.lastChild;return _n(r)?I.some(yc(r,e?0:r.data.length)):r?Bo(r)?I.some(e?yc.before(r):Tn(n=r)?yc.before(n):yc.after(n)):function(e,t,n){var r=e?yc.before(n):yc.after(n);return Cf(e,t,r)}(e,t,r):I.none()},Nf=_(Cf,!0),Ef=_(Cf,!1),kf=_(Sf,!0),_f=_(Sf,!1),Af=function(e){return yn(e)&&"_mce_caret"===e.id},Rf=function(e,t){for(;t&&t!==e;){if("_mce_caret"===t.id)return t;t=t.parentNode}return null},Df=function(e){return ht.isArray(e.start)},Tf=function(e,t){return yn(t)&&e.isBlock(t)&&!t.innerHTML&&!lt.ie&&(t.innerHTML='<br data-mce-bogus="1" />'),t},Of=function(e,t){return _f(e).fold(T,function(e){return t.setStart(e.container(),e.offset()),t.setEnd(e.container(),e.offset()),!0})},Bf=function(e,t,n){return!(!function(e){return!1===e.hasChildNodes()}(t)||!Rf(e,t))&&(function(e,t){var n=e.ownerDocument.createTextNode(co);e.appendChild(n),t.setStart(n,0),t.setEnd(n,0)}(t,n),!0)},Pf=function(e,t,n,r){var o,i,a,u,c=n[t?"start":"end"],s=e.getRoot();if(c){for(a=c[0],i=s,o=c.length-1;o>=1;o--){if(u=i.childNodes,Bf(s,i,r))return!0;if(c[o]>u.length-1)return!!Bf(s,i,r)||Of(i,r);i=u[c[o]]}3===i.nodeType&&(a=Math.min(c[0],i.nodeValue.length)),1===i.nodeType&&(a=Math.min(c[0],i.childNodes.length)),t?r.setStart(i,a):r.setEnd(i,a)}return!0},Lf=function(e){return _n(e)&&e.data.length>0},If=function(e,t,n){var r,o,i,a,u,c,s=e.get(n.id+"_"+t),f=n.keep;if(s){if(r=s.parentNode,"start"===t?(f?s.hasChildNodes()?(r=s.firstChild,o=1):Lf(s.nextSibling)?(r=s.nextSibling,o=0):Lf(s.previousSibling)?(r=s.previousSibling,o=s.previousSibling.data.length):(r=s.parentNode,o=e.nodeIndex(s)+1):o=e.nodeIndex(s),u=r,c=o):(f?s.hasChildNodes()?(r=s.firstChild,o=1):Lf(s.previousSibling)?(r=s.previousSibling,o=s.previousSibling.data.length):(r=s.parentNode,o=e.nodeIndex(s)):o=e.nodeIndex(s),u=r,c=o),!f){for(a=s.previousSibling,i=s.nextSibling,ht.each(ht.grep(s.childNodes),function(e){_n(e)&&(e.nodeValue=e.nodeValue.replace(/\uFEFF/g,""))});s=e.get(n.id+"_"+t);)e.remove(s,!0);a&&i&&a.nodeType===i.nodeType&&_n(a)&&!lt.opera&&(o=a.nodeValue.length,a.appendData(i.nodeValue),e.remove(i),u=a,c=o)}return I.some(yc(u,c))}return I.none()},Mf=function(e,t){var n=e.dom;if(t){if(Df(t))return function(e,t){var n=e.createRng();return Pf(e,!0,t,n)&&Pf(e,!1,t,n)?I.some(n):I.none()}(n,t);if(function(e){return l(e.start)}(t))return I.some(function(e,t){var n,r=e.createRng();return n=Tc(e.getRoot(),t.start),r.setStart(n.container(),n.offset()),n=Tc(e.getRoot(),t.end),r.setEnd(n.container(),n.offset()),r}(n,t));if(function(e){return ye(e,"id")}(t))return function(e,t){var n=If(e,"start",t),r=If(e,"end",t);return Fn(n,r.or(n),function(t,n){var r=e.createRng();return r.setStart(Tf(e,t.container()),t.offset()),r.setEnd(Tf(e,n.container()),n.offset()),r})}(n,t);if(function(e){return ye(e,"name")}(t))return function(e,t){return I.from(e.select(t.name)[t.index]).map(function(t){var n=e.createRng();return n.selectNode(t),n})}(n,t);if(function(e){return ye(e,"rng")}(t))return I.some(t.rng)}return I.none()},Ff=function(e,t,n){return Hc(e,t,n)},Uf=function(e,t){Mf(e,t).each(function(t){e.setRng(t)})},zf=function(e){return yn(e)&&"SPAN"===e.tagName&&"bookmark"===e.getAttribute("data-mce-type")},Hf=(rf=" ",function(e){return rf===e}),jf=function(e){return""!==e&&-1!==" \f\n\r\t\v".indexOf(e)},Vf=function(e){return!jf(e)&&!Hf(e)},qf=function(e){return!!e.nodeType},$f=function(e,t,n){var r=n.startOffset,o=n.startContainer;if((o!==n.endContainer||!function(e){return e&&/^(IMG)$/.test(e.nodeName)}(o.childNodes[r]))&&yn(o)){var i=o.childNodes,a=void 0;r<i.length?(o=i[r],a=new Gr(o,e.getParent(o,e.isBlock))):(o=i[i.length-1],(a=new Gr(o,e.getParent(o,e.isBlock))).next(!0));for(var u=a.current();u;u=a.next())if(_n(u)&&!Yf(u))return n.setStart(u,0),void t.setRng(n)}},Wf=function(e,t,n){if(e){var r=t?"nextSibling":"previousSibling";for(e=n?e:e[r];e;e=e[r])if(yn(e)||!Yf(e))return e}},Kf=function(e,t){return qf(t)&&(t=t.nodeName),!!e.schema.getTextBlockElements()[t.toLowerCase()]},Xf=function(e,t,n){return e.schema.isValidChild(t,n)},Yf=function(e,t){if(void 0===t&&(t=!1),b(e)&&_n(e)){var n=t?e.data.replace(/ /g," "):e.data;return Mo(n)}return!1},Gf=function(e,t){return y(e)?e=e(t):b(t)&&(e=e.replace(/%(\w+)/g,function(e,n){return t[n]||e})),e},Jf=function(e,t){return t=t||"",e=""+((e=e||"").nodeName||e),t=""+(t.nodeName||t),e.toLowerCase()===t.toLowerCase()},Qf=function(e,t,n){return"color"!==n&&"backgroundColor"!==n||(t=e.toHex(t)),"fontWeight"===n&&700===t&&(t="bold"),"fontFamily"===n&&(t=t.replace(/[\'\"]/g,"").replace(/,\s+/g,",")),""+t},Zf=function(e,t,n){return Qf(e,e.getStyle(t,n),n)},el=function(e,t){var n;return e.getParent(t,function(t){return(n=e.getStyle(t,"text-decoration"))&&"none"!==n}),n},tl=function(e,t,n){return e.getParents(t,n,e.getRoot())},nl=function(e,t,n){var r=["inline","block","selector","attributes","styles","classes"],o=function(e){return he(e,function(e,t){return j(r,function(e){return e===t})})};return j(e.formatter.get(t),function(t){var r=o(t);return j(e.formatter.get(n),function(e){var t,n,i,c=o(e);return t=r,n=c,void 0===i&&(i=u),a(i).eq(t,n)})})},rl=function(e){return Ce(e,"block")},ol=function(e){return Ce(e,"selector")},il=function(e){return Ce(e,"inline")},al=function(e){return ol(e)&&!1!==e.expand&&!il(e)},ul=zf,cl=tl,sl=Yf,fl=Kf,ll=function(e,t){for(var n=t;n;){if(yn(n)&&e.getContentEditable(n))return"false"===e.getContentEditable(n)?n:t;n=n.parentNode}return t},dl=function(e,t,n,r){for(var o=t.data,i=n;e?i>=0:i<o.length;e?i--:i++)if(r(o.charAt(i)))return e?i+1:i;return-1},ml=function(e,t,n){return dl(e,t,n,function(e){return Hf(e)||jf(e)})},gl=function(e,t,n){return dl(e,t,n,Vf)},pl=function(e,t,n,r,o,i){var a,u=e.getParent(n,e.isBlock)||t,c=function(t,n,r){var i=qu(e),c=o?i.backwards:i.forwards;return I.from(c(t,n,function(e,t){return ul(e.parentNode)?-1:(a=e,r(o,e,t))},u))};return c(n,r,ml).bind(function(e){return i?c(e.container,e.offset+(o?-1:0),gl):I.some(e)}).orThunk(function(){return a?I.some({container:a,offset:o?0:a.length}):I.none()})},hl=function(e,t,n,r,o){_n(r)&&Ve(r.data)&&r[o]&&(r=r[o]);for(var i=cl(e,r),a=0;a<i.length;a++)for(var u=0;u<t.length;u++){var c=t[u];
90if((!b(c.collapsed)||c.collapsed===n.collapsed)&&(ol(c)&&e.is(i[a],c.selector)))return i[a]}return r},vl=function(e,t,n,r){var o=n,i=e.dom,a=i.getRoot(),u=t[0];if(rl(u)&&(o=u.wrapper?null:i.getParent(n,u.block,a)),!o){var c=i.getParent(n,"LI,TD,TH");o=i.getParent(_n(n)?n.parentNode:n,function(t){return t!==a&&fl(e,t)},c)}if(o&&rl(u)&&u.wrapper&&(o=cl(i,o,"ul,ol").reverse()[0]||o),!o)for(o=n;o[r]&&!i.isBlock(o[r])&&(o=o[r],!Jf(o,"br")););return o||n},bl=function(e,t,n,r){var o=n.parentNode;return!b(n[r])&&(!(o!==t&&!v(o)&&!e.isBlock(o))||bl(e,t,o,r))},yl=function(e,t,n,r,o){var i,a=n,u=o?"previousSibling":"nextSibling",c=e.getRoot();if(_n(n)&&!sl(n)&&(o?r>0:r<n.data.length))return n;for(;;){if(!t[0].block_expand&&e.isBlock(a))return a;for(var s=a[u];s;s=s[u]){var f=_n(s)&&!bl(e,c,s,u);if(!ul(s)&&(!Tn(i=s)||!i.getAttribute("data-mce-bogus")||i.nextSibling)&&!sl(s,f))return a}if(a===c||a.parentNode===c){n=a;break}a=a.parentNode}return n},Cl=function(e){return ul(e.parentNode)||ul(e)},wl=function(e,t,n,r){void 0===r&&(r=!1);var o=t.startContainer,i=t.startOffset,a=t.endContainer,u=t.endOffset,c=e.dom,s=n[0];(yn(o)&&o.hasChildNodes()&&(o=Zu(o,i),_n(o)&&(i=0)),yn(a)&&a.hasChildNodes()&&(a=Zu(a,t.collapsed?u:u-1),_n(a)&&(u=a.nodeValue.length)),o=ll(c,o),a=ll(c,a),Cl(o)&&(o=ul(o)?o:o.parentNode,o=t.collapsed?o.previousSibling||o:o.nextSibling||o,_n(o)&&(i=t.collapsed?o.length:0)),Cl(a)&&(a=ul(a)?a:a.parentNode,a=t.collapsed?a.nextSibling||a:a.previousSibling||a,_n(a)&&(u=t.collapsed?0:a.length)),t.collapsed)&&(pl(c,e.getBody(),o,i,!0,r).each(function(e){var t=e.container,n=e.offset;o=t,i=n}),pl(c,e.getBody(),a,u,!1,r).each(function(e){var t=e.container,n=e.offset;a=t,u=n}));return(il(s)||s.block_expand)&&(il(s)&&_n(o)&&0!==i||(o=yl(c,n,o,i,!0)),il(s)&&_n(a)&&u!==a.nodeValue.length||(a=yl(c,n,a,u,!1))),al(s)&&(o=hl(c,n,t,o,"previousSibling"),a=hl(c,n,t,a,"nextSibling")),(rl(s)||ol(s))&&(o=vl(e,n,o,"previousSibling"),a=vl(e,n,a,"nextSibling"),rl(s)&&(c.isBlock(o)||(o=yl(c,n,o,i,!0)),c.isBlock(a)||(a=yl(c,n,a,u,!1)))),yn(o)&&(i=c.nodeIndex(o),o=o.parentNode),yn(a)&&(u=c.nodeIndex(a)+1,a=a.parentNode),{startContainer:o,startOffset:i,endContainer:a,endOffset:u}},xl=function(e,t,n){var r=t.startOffset,o=Zu(t.startContainer,r),i=t.endOffset,a=Zu(t.endContainer,i-1),u=function(e){var t=e[0];_n(t)&&t===o&&r>=t.data.length&&e.splice(0,1);var n=e[e.length-1];return 0===i&&e.length>0&&n===a&&_n(n)&&e.splice(e.length-1,1),e},c=function(e,t,n){for(var r=[];e&&e!==n;e=e[t])r.push(e);return r},s=function(t,n){return e.getParent(t,function(e){return e.parentNode===n},n)},f=function(e,t,r){for(var o=r?"nextSibling":"previousSibling",i=e,a=i.parentNode;i&&i!==t;i=a){a=i.parentNode;var s=c(i===e?i:i[o],o);s.length&&(r||s.reverse(),n(u(s)))}};if(o===a)return n(u([o]));var l=e.findCommonAncestor(o,a);if(e.isChildOf(o,a))return f(o,l,!0);if(e.isChildOf(a,o))return f(a,l);var d=s(o,l)||o,m=s(a,l)||a;f(o,d,!0);var g=c(d===o?d:d.nextSibling,"nextSibling",m===a?m.nextSibling:m);g.length&&n(u(g)),f(a,m)},Sl=function(e){var t=[];if(e)for(var n=0;n<e.rangeCount;n++)t.push(e.getRangeAt(n));return t},Nl=function(e){return K(function(e){return Z(e,function(e){var t=Qu(e);return t?[bt.fromDom(t)]:[]})}(e),ao)},El=function(e,t){var n=Ru(t,"td[data-mce-selected],th[data-mce-selected]");return n.length>0?n:Nl(e)},kl=function(e){return El(Sl(e.selection.getSel()),bt.fromDom(e.getBody()))},_l=function(e,t){return zr(e,"table",t)},Al=function(e){return jt(e).fold(N([e]),function(t){return[e].concat(Al(t))})},Rl=function(e){return Vt(e).fold(N([e]),function(t){return"br"===Et(t)?It(t).map(function(t){return[e].concat(Rl(t))}).getOr([]):[e].concat(Rl(t))})},Dl=function(e,t){return Fn(function(e){var t=e.startContainer,n=e.startOffset;return _n(t)?0===n?I.some(bt.fromDom(t)):I.none():I.from(t.childNodes[n]).map(bt.fromDom)}(t),function(e){var t=e.endContainer,n=e.endOffset;return _n(t)?n===t.data.length?I.some(bt.fromDom(t)):I.none():I.from(t.childNodes[n-1]).map(bt.fromDom)}(t),function(t,n){var r=J(Al(e),_(xt,t)),o=J(Rl(e),_(xt,n));return r.isSome()&&o.isSome()}).getOr(!1)},Tl=function(e,t,n,r){var o=n,i=new Gr(n,o),a=he(e.schema.getMoveCaretBeforeOnEnterElements(),function(e,t){return!H(["td","th","table"],t.toLowerCase())});do{if(_n(n)&&0!==ht.trim(n.nodeValue).length)return void(r?t.setStart(n,0):t.setEnd(n,n.nodeValue.length));if(a[n.nodeName])return void(r?t.setStartBefore(n):"BR"===n.nodeName?t.setEndBefore(n):t.setEndAfter(n))}while(n=r?i.next():i.prev());"BODY"===o.nodeName&&(r?t.setStart(o,0):t.setEnd(o,o.childNodes.length))},Ol=function(e){var t=e.selection.getSel();return t&&t.rangeCount>0},Bl=function(e,t){var n=kl(e);n.length>0?q(n,function(n){var r=n.dom,o=e.dom.createRng();o.setStartBefore(r),o.setEndAfter(r),t(o,!0)}):t(e.selection.getRng(),!1)},Pl=function(e,t,n){var r=zc(e,t);n(r),e.moveToBookmark(r)},Ll=function(e,t){var n=function(t){return e(t)?I.from(t.dom.nodeValue):I.none()};return{get:function(r){if(!e(r))throw new Error("Can only get "+t+" value of a "+t+" node");return n(r).getOr("")},getOption:n,set:function(n,r){if(!e(n))throw new Error("Can only set raw "+t+" value of a "+t+" node");n.dom.nodeValue=r}}}(Rt,"text"),Il=function(e){return Ll.get(e)},Ml=function(e,t,n,r){return Lt(t).fold(function(){return"skipping"},function(o){return"br"===r||function(e){return Rt(e)&&Il(e)===co}(t)?"valid":function(e){return At(e)&&_u(e,Du())}(t)?"existing":Af(t.dom)?"caret":Xf(e,n,r)&&Xf(e,Et(o),n)?"valid":"invalid-child"})},Fl=function(e,t,n,r){var o=t.uid,i=void 0===o?Fu("mce-annotation"):o,a=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(t,["uid"]),u=bt.fromTag("span",e);Eu(u,Du()),Hn(u,""+Ou(),i),Hn(u,""+Tu(),n);var c=r(i,a),s=c.attributes,f=void 0===s?{}:s,l=c.classes,d=void 0===l?[]:l;return jn(u,f),function(e,t){q(t,function(t){Eu(e,t)})}(u,d),u},Ul=function(e,t,n,r,o){var i=[],a=Fl(e.getDoc(),o,n,r),u=bu(),c=function(){u.clear()},s=function(e){q(e,f)},f=function(t){var n,r;
90switch(Ml(e,t,"span",Et(t))){case"invalid-child":c();var o=zt(t);s(o),c();break;case"valid":var u=r.get().getOrThunk(function(){var e=Hu(a);return i.push(e),r.set(e),e});Qt(n=t,r=u),tn(r,n)}};return xl(e.dom,t,function(e){c(),function(e){var t=V(e,bt.fromDom);s(t)}(e)}),i},zl=function(e,t,n,r){e.undoManager.transact(function(){var o=e.selection,i=o.getRng(),a=kl(e).length>0;if(i.collapsed&&!a&&function(e,t){var n=wl(e,t,[{inline:"span"}]);t.setStart(n.startContainer,n.startOffset),t.setEnd(n.endContainer,n.endOffset),e.selection.setRng(t)}(e,i),o.getRng().collapsed&&!a){var u=Fl(e.getDoc(),r,t,n.decorate);Uu(u," "),o.getRng().insertNode(u.dom),o.select(u.dom)}else Pl(o,!1,function(){Bl(e,function(o){Ul(e,o,t,n.decorate,r)})})})},Hl=function(e){var t,n=(t={},{register:function(e,n){t[e]={name:e,settings:n}},lookup:function(e){return be(t,e).map(function(e){return e.settings})}});Iu(e,n);var r=Lu(e);return{register:function(e,t){n.register(e,t)},annotate:function(t,r){n.lookup(t).each(function(n){zl(e,t,n,r)})},annotationChanged:function(e,t){r.addListener(e,t)},remove:function(t){Bu(e,I.some(t)).each(function(e){var t=e.elements;q(t,an)})},getAll:function(t){var n=function(e,t){var n=bt.fromDom(e.getBody()),r=Ru(n,"["+Tu()+'="'+t+'"]'),o={};return q(r,function(e){var t=Vn(e,Ou()),n=be(o,t).getOr([]);o[t]=n.concat([e])}),o}(e,t);return de(n,function(e){return V(e,function(e){return e.dom})})}}},jl=function(e){return{getBookmark:_(Ff,e),moveToBookmark:_(Uf,e)}};jl.isBookmarkNode=zf;var Vl=function(e,t){for(;t&&t!==e;){if(Bn(t)||Pn(t))return t;t=t.parentNode}return null},ql=function(e,t,n){if(n.collapsed)return!1;if(lt.browser.isIE()&&n.startOffset===n.endOffset-1&&n.startContainer===n.endContainer){var r=n.startContainer.childNodes[n.startOffset];if(yn(r))return j(r.getClientRects(),function(n){return Ju(n,e,t)})}return j(n.getClientRects(),function(n){return Ju(n,e,t)})},$l=function(e,t,n){return e.fire(t,n)},Wl=function(e,t,n,r){return e.fire("FormatApply",{format:t,node:n,vars:r})},Kl=function(e,t,n,r){return e.fire("FormatRemove",{format:t,node:n,vars:r})},Xl={BACKSPACE:8,DELETE:46,DOWN:40,ENTER:13,ESC:27,LEFT:37,RIGHT:39,SPACEBAR:32,TAB:9,UP:38,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,modifierPressed:function(e){return e.shiftKey||e.ctrlKey||e.altKey||Xl.metaKeyPressed(e)},metaKeyPressed:function(e){return lt.mac?e.metaKey:e.ctrlKey&&!e.altKey}},Yl=Pn,Gl=function(e,t){var n,r,o,i,a,u,c,s,f,l,d,m,g,p,h,v=t.dom,y=ht.each,C=t.getDoc(),w=document,x=Math.abs,S=Math.round,N=t.getBody(),E={nw:[0,0,-1,-1],ne:[1,0,1,-1],se:[1,1,1,1],sw:[0,1,-1,1]},k=function(e){return e&&("IMG"===e.nodeName||t.dom.is(e,"figure.image"))},_=function(e){return In(e)||v.hasClass(e,"mce-preview-object")},A=function(e){var n=e.target;(function(e,t){if("longpress"===e.type||0===e.type.indexOf("touch")){var n=e.touches[0];return k(e.target)&&!ql(n.clientX,n.clientY,t)}return k(e.target)&&!ql(e.clientX,e.clientY,t)})(e,t.selection.getRng())&&!e.isDefaultPrevented()&&t.selection.select(n)},R=function(e){return v.is(e,"figure.image")?[e.querySelector("img")]:v.hasClass(e,"mce-preview-object")&&b(e.firstElementChild)?[e,e.firstElementChild]:[e]},D=function(e){var n=as(t);return!!n&&("false"!==e.getAttribute("data-mce-resize")&&(e!==t.getBody()&&(v.hasClass(e,"mce-preview-object")?Ct(bt.fromDom(e.firstElementChild),n):Ct(bt.fromDom(e),n))))},T=function(e,n,r){if(b(r)){var o=R(e);q(o,function(e){e.style[n]||!t.schema.isValid(e.nodeName.toLowerCase(),n)?v.setStyle(e,n,r):v.setAttrib(e,n,""+r)})}},O=function(e,t,n){T(e,"width",t),T(e,"height",n)},B=function(e){var a,b,y,C;a=e.screenX-u,b=e.screenY-c,m=a*i[2]+s,g=b*i[3]+f,m=m<5?5:m,g=g<5?5:g,((k(n)||_(n))&&!1!==function(e){return e.getParam("resize_img_proportional",!0,"boolean")}(t)?!Xl.modifierPressed(e):Xl.modifierPressed(e))&&(x(a)>x(b)?(g=S(m*l),m=S(g/l)):(m=S(g/l),g=S(m*l))),O(r,m,g),y=(y=i.startPos.x+a)>0?y:0,C=(C=i.startPos.y+b)>0?C:0,v.setStyles(o,{left:y,top:C,display:"block"}),o.innerHTML=m+" &times; "+g,i[2]<0&&r.clientWidth<=m&&v.setStyle(r,"left",void 0+(s-m)),i[3]<0&&r.clientHeight<=g&&v.setStyle(r,"top",void 0+(f-g)),(a=N.scrollWidth-p)+(b=N.scrollHeight-h)!==0&&v.setStyles(o,{left:y-a,top:C-b}),d||(!function(e,t,n,r,o){e.fire("ObjectResizeStart",{target:t,width:n,height:r,origin:o})}
90(t,n,s,f,"corner-"+i.name),d=!0)},P=function(){var e=d;d=!1,e&&(T(n,"width",m),T(n,"height",g)),v.unbind(C,"mousemove",B),v.unbind(C,"mouseup",P),w!==C&&(v.unbind(w,"mousemove",B),v.unbind(w,"mouseup",P)),v.remove(r),v.remove(o),v.remove(a),L(n),e&&(!function(e,t,n,r,o){e.fire("ObjectResized",{target:t,width:n,height:r,origin:o})}(t,n,m,g,"corner-"+i.name),v.setAttrib(n,"style",v.getAttrib(n,"style"))),t.nodeChanged()},L=function(e){U();var d=v.getPos(e,N),b=d.x,x=d.y,S=e.getBoundingClientRect(),k=S.width||S.right-S.left,A=S.height||S.bottom-S.top;n!==e&&(I(),n=e,m=g=0);var T=t.fire("ObjectSelected",{target:e}),L=v.getAttrib(n,"data-mce-selected","1");D(e)&&!T.isDefaultPrevented()?y(E,function(e,t){var d,m=function(d){var m,g=R(n)[0];u=d.screenX,c=d.screenY,s=g.clientWidth,f=g.clientHeight,l=f/s,(i=e).name=t,i.startPos={x:k*e[0]+b,y:A*e[1]+x},p=N.scrollWidth,h=N.scrollHeight,a=v.add(N,"div",{class:"mce-resize-backdrop","data-mce-bogus":"all"}),v.setStyles(a,{position:"fixed",left:"0",top:"0",width:"100%",height:"100%"}),r=_(m=n)?v.create("img",{src:lt.transparentSrc}):m.cloneNode(!0),v.addClass(r,"mce-clonedresizable"),v.setAttrib(r,"data-mce-bogus","all"),r.contentEditable="false",v.setStyles(r,{left:b,top:x,margin:0}),O(r,k,A),r.removeAttribute("data-mce-selected"),N.appendChild(r),v.bind(C,"mousemove",B),v.bind(C,"mouseup",P),w!==C&&(v.bind(w,"mousemove",B),v.bind(w,"mouseup",P)),o=v.add(N,"div",{class:"mce-resize-helper","data-mce-bogus":"all"},s+" &times; "+f)};(d=v.get("mceResizeHandle"+t))&&v.remove(d),d=v.add(N,"div",{id:"mceResizeHandle"+t,"data-mce-bogus":"all",class:"mce-resizehandle",unselectable:!0,style:"cursor:"+t+"-resize; margin:0; padding:0"}),11===lt.ie&&(d.contentEditable=!1),v.bind(d,"mousedown",function(e){e.stopImmediatePropagation(),e.preventDefault(),m(e)}),e.elm=d,v.setStyles(d,{left:k*e[0]+b-d.offsetWidth/2,top:A*e[1]+x-d.offsetHeight/2})}):I(),v.getAttrib(n,"data-mce-selected")||n.setAttribute("data-mce-selected",L)},I=function(){U(),n&&n.removeAttribute("data-mce-selected"),le(E,function(e,t){var n=v.get("mceResizeHandle"+t);n&&(v.unbind(n),v.remove(n))})},M=function(n){var r,o=function(e,t){if(e)do{if(e===t)return!0}while(e=e.parentNode)};d||t.removed||(y(v.select("img[data-mce-selected],hr[data-mce-selected]"),function(e){e.removeAttribute("data-mce-selected")}),r="mousedown"===n.type?n.target:e.getNode(),o(r=v.$(r).closest("table,img,figure.image,hr,video,span.mce-preview-object")[0],N)&&(z(),o(e.getStart(!0),r)&&o(e.getEnd(!0),r))?L(r):I())},F=function(e){return Yl(Vl(t.getBody(),e))},U=function(){le(E,function(e){e.elm&&(v.unbind(e.elm),delete e.elm)})},z=function(){try{t.getDoc().execCommand("enableObjectResizing",!1,"false")}catch(e){}};t.on("init",function(){if(z(),lt.browser.isIE()||lt.browser.isEdge()){t.on("mousedown click",function(e){var n=e.target,r=n.nodeName;d||!/^(TABLE|IMG|HR)$/.test(r)||F(n)||(2!==e.button&&t.selection.select(n,"TABLE"===r),"mousedown"===e.type&&t.nodeChanged())});var e=function(e){var n=function(e){Kr.setEditorTimeout(t,function(){return t.selection.select(e)})};if(F(e.target)||In(e.target))return e.preventDefault(),void n(e.target);/^(TABLE|IMG|HR)$/.test(e.target.nodeName)&&(e.preventDefault(),"IMG"===e.target.tagName&&n(e.target))};v.bind(N,"mscontrolselect",e),t.on("remove",function(){return v.unbind(N,"mscontrolselect",e)})}var r=Kr.throttle(function(e){t.composing||M(e)});t.on("NodeChange ResizeEditor ResizeWindow ResizeContent drop",r),t.on("keyup compositionend",function(e){n&&"TABLE"===n.nodeName&&r(e)}),t.on("hide blur",I),t.on("contextmenu longpress",A,!0)}),t.on("remove",U);return{isResizable:D,showResizeRect:L,hideResizeRect:I,updateResizeRect:M,destroy:function(){n=r=a=null}}},Jl=function(e){return Bn(e)||Pn(e)},Ql=function(e,t,n){var r,o,i=n;if(i.caretPositionFromPoint)(o=i.caretPositionFromPoint(e,t))&&((r=n.createRange()).setStart(o.offsetNode,o.offset),r.collapse(!0));else if(i.caretRangeFromPoint)r=i.caretRangeFromPoint(e,t);else if(i.body.createTextRange){r=i.body.createTextRange();try{r.moveToPoint(e,t),r.collapse(!0)}catch(a){r=function(e,t,n){var r,o=n.elementFromPoint(e,t),i=n.body.createTextRange();if(o&&"HTML"!==o.tagName||(o=n.body),i.moveToElementText(o),(r=(r=ht.toArray(i.getClientRects())).sort(function(e,n){return(e=Math.abs(Math.max(e.top-t,e.bottom-t)))-(n=Math.abs(Math.max(n.top-t,n.bottom-t)))})).length>0){t=(r[0].bottom+r[0].top)/2;try{return i.moveToPoint(e,t),i.collapse(!0),i}catch(a){}}return null}(e,t,n)}return function(e,t){var n=e&&e.parentElement?e.parentElement():null;return Pn(function(e,t,n){for(;e&&e!==t;){if(n(e))return e;e=e.parentNode}return null}(n,t,Jl))?null:e}(r,n.body)}return r},Zl=function(e,t){return e&&t&&e.startContainer===t.startContainer&&e.startOffset===t.startOffset&&e.endContainer===t.endContainer&&e.endOffset===t.endOffset},ed=function(e,t,n){return null!==function(e,t,n){for(;e&&e!==t;){if(n(e))return e;e=e.parentNode}return null}(e,t,n)}
90,td=function(e,t,n){return ed(e,t,function(e){return e.nodeName===n})},nd=function(e){return e&&"TABLE"===e.nodeName},rd=function(e){return e&&/^(TD|TH|CAPTION)$/.test(e.nodeName)},od=function(e,t){return ho(e)&&!1===ed(e,t,Af)},id=function(e,t,n){for(var r=new Gr(t,e.getParent(t.parentNode,e.isBlock)||e.getRoot());t=r[n?"prev":"next"]();)if(Tn(t))return!0},ad=function(e,t,n,r,o){var i,a,u=e.getRoot(),c=e.schema.getNonEmptyElements(),s=e.getParent(o.parentNode,e.isBlock)||u;if(r&&Tn(o)&&t&&e.isEmpty(s))return I.some(yc(o.parentNode,e.nodeIndex(o)));for(var f=new Gr(o,s);a=f[r?"prev":"next"]();){if("false"===e.getContentEditableParent(a)||od(a,u))return I.none();if(_n(a)&&a.nodeValue.length>0)return!1===td(a,u,"A")?I.some(yc(a,r?a.nodeValue.length:0)):I.none();if(e.isBlock(a)||c[a.nodeName.toLowerCase()])return I.none();i=a}return n&&i?I.some(yc(i,0)):I.none()},ud=function(e,t,n,r){var o,i,a,u,c=e.getRoot(),s=!1;o=r[(n?"start":"end")+"Container"],i=r[(n?"start":"end")+"Offset"];var f=yn(o)&&i===o.childNodes.length,l=e.schema.getNonEmptyElements();if(u=n,ho(o))return I.none();if(yn(o)&&i>o.childNodes.length-1&&(u=!1),Rn(o)&&(o=c,i=0),o===c){if(u&&(a=o.childNodes[i>0?i-1:0])){if(ho(a))return I.none();if(l[a.nodeName]||nd(a))return I.none()}if(o.hasChildNodes()){if(i=Math.min(!u&&i>0?i-1:i,o.childNodes.length-1),o=o.childNodes[i],i=_n(o)&&f?o.data.length:0,!t&&o===c.lastChild&&nd(o))return I.none();if(function(e,t){for(;t&&t!==e;){if(Pn(t))return!0;t=t.parentNode}return!1}(c,o)||ho(o))return I.none();if(o.hasChildNodes()&&!1===nd(o)){a=o;var d=new Gr(o,c);do{if(Pn(a)||ho(a)){s=!1;break}if(_n(a)&&a.nodeValue.length>0){i=u?0:a.nodeValue.length,o=a,s=!0;break}if(l[a.nodeName.toLowerCase()]&&!rd(a)){i=e.nodeIndex(a),o=a.parentNode,u||i++,s=!0;break}}while(a=u?d.next():d.prev())}}}return t&&(_n(o)&&0===i&&ad(e,f,t,!0,o).each(function(e){o=e.container(),i=e.offset(),s=!0}),yn(o)&&((a=o.childNodes[i])||(a=o.childNodes[i-1]),!a||!Tn(a)||function(e,t){return e.previousSibling&&e.previousSibling.nodeName===t}(a,"A")||id(e,a,!1)||id(e,a,!0)||ad(e,f,t,!0,a).each(function(e){o=e.container(),i=e.offset(),s=!0}))),u&&!t&&_n(o)&&i===o.nodeValue.length&&ad(e,f,t,!1,o).each(function(e){o=e.container(),i=e.offset(),s=!0}),s?I.some(yc(o,i)):I.none()},cd=function(e,t){var n=t.collapsed,r=t.cloneRange(),o=yc.fromRangeStart(t);return ud(e,n,!0,r).each(function(e){n&&yc.isAbove(o,e)||r.setStart(e.container(),e.offset())}),n||ud(e,n,!1,r).each(function(e){r.setEnd(e.container(),e.offset())}),n&&r.collapse(!0),Zl(t,r)?I.none():I.some(r)},sd=function(e,t){return e.splitText(t)}
90,fd=function(e){var t=e.startContainer,n=e.startOffset,r=e.endContainer,o=e.endOffset;return t===r&&_n(t)?n>0&&n<t.nodeValue.length&&(t=(r=sd(t,n)).previousSibling,o>n?(t=r=sd(r,o-=n).previousSibling,o=r.nodeValue.length,n=0):o=0):(_n(t)&&n>0&&n<t.nodeValue.length&&(t=sd(t,n),n=0),_n(r)&&o>0&&o<r.nodeValue.length&&(o=(r=sd(r,o).previousSibling).nodeValue.length)),{startContainer:t,startOffset:n,endContainer:r,endOffset:o}},ld=function(e){return{walk:function(t,n){return xl(e,t,n)},split:fd,normalize:function(t){return cd(e,t).fold(T,function(e){return t.setStart(e.startContainer,e.startOffset),t.setEnd(e.endContainer,e.endOffset),!0})}}};ld.compareRanges=Zl,ld.getCaretRangeFromPoint=Ql,ld.getSelectedNode=Qu,ld.getNode=Zu;var dd,md=function(e,t){var n=function(n){var r=t(n);if(r<=0||null===r){var o=Xn(n,e);return parseFloat(o)||0}return r},r=function(e,t){return Y(t,function(t,n){var r=Xn(e,n),o=void 0===r?0:parseInt(r,10);return isNaN(o)?t:t+o},0)};return{set:function(t,n){if(!C(n)&&!n.match(/^[0-9]+$/))throw new Error(e+".set accepts only positive integer values. Value was "+n);var r=t.dom;Un(r)&&(r.style[e]=n+"px")},get:n,getOuter:n,aggregate:r,max:function(e,t,n){var o=r(e,n);return t>o?t-o:0}}}("height",function(e){var t=e.dom;return un(e)?t.getBoundingClientRect().height:t.offsetHeight}),gd=function(e,t){return e.view(t).fold(N([]),function(t){var n=e.owner(t),r=gd(e,n);return[t].concat(r)})},pd=Object.freeze({__proto__:null,view:function(e){var t;return(e.dom===document?I.none():I.from(null===(t=e.dom.defaultView)||void 0===t?void 0:t.frameElement)).map(bt.fromDom)},owner:function(e){return Bt(e)}}),hd=function(e){var t=bt.fromDom(document),n=dn(t),r=function(e,t){var n=t.owner(e);return gd(t,n)}(e,pd),o=ln(e),i=X(r,function(e,t){var n=ln(t);return{left:e.left+n.left,top:e.top+n.top}},{left:0,top:0});return sn(i.left+o.left+n.left,i.top+o.top+n.top)},vd=function(e){return"textarea"===Et(e)},bd=function(e,t){var n=function(e){var t=e.dom.ownerDocument,n=t.body,r=t.defaultView,o=t.documentElement;if(n===e.dom)return sn(n.offsetLeft,n.offsetTop);var i=fn(null==r?void 0:r.pageYOffset,o.scrollTop),a=fn(null==r?void 0:r.pageXOffset,o.scrollLeft),u=fn(o.clientTop,n.clientTop),c=fn(o.clientLeft,n.clientLeft);return ln(e).translate(a-c,i-u)}(e),r=function(e){return md.get(e)}(e);return{element:e,bottom:n.top+r,height:r,pos:n,cleanup:t}},yd=function(e,t){var n=function(e,t){var n=zt(e);if(0===n.length||vd(e))return{element:e,offset:t};if(t<n.length&&!vd(n[t]))return{element:n[t],offset:0};var r=n[n.length-1];return vd(r)?{element:e,offset:t}:"img"===Et(r)?{element:r,offset:1}:Rt(r)?{element:r,offset:Il(r).length}:{element:r,offset:zt(r).length}}(e,t),r=bt.fromHtml('<span data-mce-bogus="all" style="display: inline-block;">\ufeff</span>');return Qt(n.element,r),bd(r,function(){return on(r)})},Cd=function(e,t,n,r){Nd(e,function(o,i){return xd(e,t,n,r)},n)},wd=function(e,t,n,r,o){var i={elm:r.element.dom,alignToTop:o};(function(e,t){return e.fire("ScrollIntoView",t).isDefaultPrevented()})(e,i)||(n(t,dn(t).top,r,o),function(e,t){e.fire("AfterScrollIntoView",t)}(e,i))},xd=function(e,t,n,r){var o=bt.fromDom(e.getBody()),i=bt.fromDom(e.getDoc());o.dom.offsetWidth;var a=yd(bt.fromDom(n.startContainer),n.startOffset);wd(e,i,t,a,r),a.cleanup()},Sd=function(e,t,n,r){var o=bt.fromDom(e.getDoc());wd(e,o,n,function(e){return bd(bt.fromDom(e),w)}(t),r)},Nd=function(e,t,n){var r=n.startContainer,o=n.startOffset,i=n.endContainer,a=n.endOffset;t(bt.fromDom(r),bt.fromDom(i));var u=e.dom.createRng();u.setStart(r,o),u.setEnd(i,a),e.selection.setRng(n)},Ed=function(e,t,n,r){var o=e.pos;if(n)mn(o.left,o.top,r);else{var i=o.top-t+e.height;mn(o.left,i,r)}},kd=function(e,t,n,r,o){var i=n+t,a=r.pos.top,u=r.bottom,c=u-a>=n;if(a<t)Ed(r,n,!1!==o,e);else if(a>i){Ed(r,n,c?!1!==o:!0===o,e)}else u>i&&!c&&Ed(r,n,!0===o,e)},_d=function(e,t,n,r){var o=e.dom.defaultView.innerHeight;kd(e,t,o,n,r)},Ad=function(e,t,n,r){var o=e.dom.defaultView.innerHeight;kd(e,t,o,n,r);var i=hd(n.element),a=hn(window);i.top<a.y?gn(n.element,!1!==r):i.top>a.bottom&&gn(n.element,!0===r)},Rd=function(e,t,n){return Cd(e,_d,t,n)},Dd=function(e,t,n){return Sd(e,t,_d,n)},Td=function(e,t,n){return Cd(e,Ad,t,n)},Od=function(e,t,n){return Sd(e,t,Ad,n)}
90,Bd=function(e,t,n){(e.inline?Rd:Td)(e,t,n)},Pd=function(e){var t=Xt(e).dom;return e.dom===t.activeElement},Ld=function(e){return void 0===e&&(e=bt.fromDom(document)),I.from(e.dom.activeElement).map(bt.fromDom)},Id=function(e,t,n,r){return{start:e,soffset:t,finish:n,foffset:r}},Md=gr([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),Fd=(Md.before,Md.on,Md.after,function(e){return e.fold(E,E,E)}),Ud=gr([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),zd={domRange:Ud.domRange,relative:Ud.relative,exact:Ud.exact,exactFromRange:function(e){return Ud.exact(e.start,e.soffset,e.finish,e.foffset)},getWin:function(e){var t=function(e){return e.match({domRange:function(e){return bt.fromDom(e.startContainer)},relative:function(e,t){return Fd(e)},exact:function(e,t,n,r){return e}})}(e);return Pt(t)},range:Id},Hd=nt().browser,jd=function(e,t){var n=Rt(t)?Il(t).length:zt(t).length+1;return e>n?n:e<0?0:e},Vd=function(e){return zd.range(e.start,jd(e.soffset,e.start),e.finish,jd(e.foffset,e.finish))},qd=function(e,t){return!bn(t.dom)&&(Nt(e,t)||xt(e,t))},$d=function(e){return function(t){return qd(e,t.start)&&qd(e,t.finish)}},Wd=function(e){return!0===e.inline||Hd.isIE()},Kd=function(e){return zd.range(bt.fromDom(e.startContainer),e.startOffset,bt.fromDom(e.endContainer),e.endOffset)},Xd=function(e){return function(e){var t=e.getSelection();return(t&&0!==t.rangeCount?I.from(t.getRangeAt(0)):I.none()).map(Kd)}(Pt(e).dom).filter($d(e))},Yd=function(e){var t=document.createRange();try{return t.setStart(e.start.dom,e.soffset),t.setEnd(e.finish.dom,e.foffset),I.some(t)}catch(n){return I.none()}},Gd=function(e){var t=Wd(e)?Xd(bt.fromDom(e.getBody())):I.none();e.bookmark=t.isSome()?t:e.bookmark},Jd=function(e){return(e.bookmark?e.bookmark:I.none()).bind(function(t){return n=bt.fromDom(e.getBody()),r=t,I.from(r).filter($d(n)).map(Vd);var n,r}).bind(Yd)},Qd={isEditorUIElement:function(e){var t=e.className.toString();return-1!==t.indexOf("tox-")||-1!==t.indexOf("mce-")}},Zd=function(e,t){nt().browser.isIE()?function(e){e.on("focusout",function(){Gd(e)})}(e):function(e,t){e.on("mouseup touchend",function(e){t.throttle()})}(e,t),e.on("keyup NodeChange",function(t){(function(e){return"nodechange"===e.type&&e.selectionChange})(t)||Gd(e)})},em=function(e){var t=yu(function(){Gd(e)},0);e.on("init",function(){e.inline&&function(e,t){var n=function(){t.throttle()};uu.DOM.bind(document,"mouseup",n),e.on("remove",function(){uu.DOM.unbind(document,"mouseup",n)})}(e,t),Zd(e,t)}),e.on("remove",function(){t.cancel()})},tm=uu.DOM,nm=function(e,t){var n=function(e){return e.getParam("custom_ui_selector","","string")}(e);return null!==tm.getParent(t,function(t){return function(e){return Qd.isEditorUIElement(e)}(t)||!!n&&e.dom.is(t,n)})},rm=function(e,t){var n=t.editor;em(n),n.on("focusin",function(){var t=e.focusedEditor;t!==n&&(t&&t.fire("blur",{focusedEditor:n}),e.setActive(n),e.focusedEditor=n,n.fire("focus",{blurredEditor:t}),n.focus(!0))}),n.on("focusout",function(){Kr.setEditorTimeout(n,function(){var t=e.focusedEditor;nm(n,function(e){try{var t=Xt(bt.fromDom(e.getElement()));return Ld(t).fold(function(){return document.body},function(e){return e.dom})}catch(n){return document.body}}(n))||t!==n||(n.fire("blur",{focusedEditor:null}),e.focusedEditor=null)})}),dd||(dd=function(t){var n=e.activeEditor;n&&function(e){if(Kt()&&b(e.target)){var t=bt.fromDom(e.target);if(At(t)&&Jt(t)&&e.composed&&e.composedPath){var n=e.composedPath();if(n)return ie(n)}}return I.from(e.target)}(t).each(function(t){t.ownerDocument===document&&(t===document.body||nm(n,t)||e.focusedEditor!==n||(n.fire("blur",{focusedEditor:null}),e.focusedEditor=null))})},tm.bind(document,"focusin",dd))},om=function(e,t){e.focusedEditor===t.editor&&(e.focusedEditor=null),e.activeEditor||(tm.unbind(document,"focusin",dd),dd=null)},im=function(e,t){return function(e){return e.collapsed?I.from(Zu(e.startContainer,e.startOffset)).map(bt.fromDom):I.none()}(t).bind(function(t){return io(t)?I.some(t):!1===Nt(e,t)?I.some(e):I.none()})},am=function(e,t){im(bt.fromDom(e.getBody()),t).bind(function(e){return kf(e.dom)}).fold(function(){e.selection.normalize()},function(t){return e.selection.setRng(t.toRange())})},um=function(e){if(e.setActive)try{e.setActive()}catch(t){e.focus()}else e.focus()},cm=function(e){return Pd(e)||(t=e,Ld(Xt(t)).filter(function(e){return t.dom.contains(e.dom)})).isSome();var t},sm=function(e){return e.inline?function(e){var t=e.getBody();return t&&cm(bt.fromDom(t))}(e):function(e){return e.iframeElement&&Pd(bt.fromDom(e.iframeElement))}(e)},fm=function(e){return sm(e)||function(e){var t=Xt(bt.fromDom(e.getElement()));return Ld(t).filter(function(t){return n=t.dom,!(void 0!==(r=n.classList)&&(r.contains("tox-edit-area")||r.contains("tox-edit-area__iframe")||r.contains("mce-content-body")))&&nm(e,t.dom);var n,r}).isSome()}(e)},lm=function(e){return e.editorManager.setActive(e)},dm=function(e,t){e.removed||(t?lm(e):function(e){var t=e.selection,n=e.getBody(),r=t.getRng();e.quirks.refreshContentEditable(),void 0!==e.bookmark&&!1===sm(e)&&Jd(e).each(function(t){e.selection.setRng(t),r=t});var o=function(e,t){return e.dom.getParent(t,function(t){return"true"===e.dom.getContentEditable(t)})}(e,t.getNode());if(e.$.contains(n,o))return um(o),am(e,r),void lm(e);e.inline||(lt.opera||um(n),e.getWin().focus()),(lt.gecko||e.inline)&&(um(n),am(e,r)),lm(e)}(e))},mm=function(e,t,n,r,o){var i=n?t.startContainer:t.endContainer,a=n?t.startOffset:t.endOffset;return I.from(i).map(bt.fromDom).map(function(e){return r&&t.collapsed?e:Ht(e,o(e,a)).getOr(e)}).bind(function(e){return At(e)?I.some(e):Lt(e).filter(At)}).map(function(e){return e.dom}).getOr(e)},gm=function(e,t,n){return mm(e,t,!0,n,function(e,t){return Math.min(qt(e),t)})},pm=function(e,t,n){return mm(e,t,!1,n,function(e,t){return t>0?t-1:t})},hm=function(e,t){for(var n=e;e&&_n(e)&&0===e.length;)e=t?e.nextSibling:e.previousSibling;return e||n},vm=function(e,t){return V(t,function(t){var n=e.fire("GetSelectionRange",{range:t});return n.range!==t?n.range:t})},bm={"#text":3,"#comment":8,"#cdata":4,"#pi":7,"#doctype":10,"#document-fragment":11},ym=function(e,t,n){var r=n?"lastChild":"firstChild",o=n?"prev":"next";if(e[r])return e[r];if(e!==t){var i=e[o];if(i)return i;for(var a=e.parent;a&&a!==t;a=a.parent)if(i=a[o])return i}},Cm=function(e){if(!Mo(e.value))return!1;var t=e.parent;return!t||"span"===t.name&&!t.attr("style")||!/^[ ]+$/.test(e.value)},wm=function(e){var t="a"===e.name&&!e.attr("href")&&e.attr("id");return e.attr("name")||e.attr("id")&&!e.firstChild||e.attr("data-mce-bookmark")||t},xm=function(){function e(e,t){this.name=e,this.type=t,1===t&&(this.attributes=[],this.attributes.map={})}return e.create=function(t,n){var r=new e(t,bm[t]||1);return n&&le(n,function(e,t){r.attr(t,e)}),r},e.prototype.replace=function(e){return e.parent&&e.remove(),this.insert(e,this),this.remove(),this},e.prototype.attr=function(e,t){var n,r=this;if("string"!=typeof e)return null!=e&&le(e,function(e,t){r.attr(t,e)}),r;
90if(n=r.attributes){if(void 0!==t){if(null===t){if(e in n.map){delete n.map[e];for(var o=n.length;o--;)if(n[o].name===e)return n.splice(o,1),r}return r}if(e in n.map){for(o=n.length;o--;)if(n[o].name===e){n[o].value=t;break}}else n.push({name:e,value:t});return n.map[e]=t,r}return n.map[e]}},e.prototype.clone=function(){var t,n=new e(this.name,this.type);if(t=this.attributes){var r=[];r.map={};for(var o=0,i=t.length;o<i;o++){var a=t[o];"id"!==a.name&&(r[r.length]={name:a.name,value:a.value},r.map[a.name]=a.value)}n.attributes=r}return n.value=this.value,n.shortEnded=this.shortEnded,n},e.prototype.wrap=function(e){return this.parent.insert(e,this),e.append(this),this},e.prototype.unwrap=function(){for(var e=this.firstChild;e;){var t=e.next;this.insert(e,this,!0),e=t}this.remove()},e.prototype.remove=function(){var e=this.parent,t=this.next,n=this.prev;return e&&(e.firstChild===this?(e.firstChild=t,t&&(t.prev=null)):n.next=t,e.lastChild===this?(e.lastChild=n,n&&(n.next=null)):t.prev=n,this.parent=this.next=this.prev=null),this},e.prototype.append=function(e){e.parent&&e.remove();var t=this.lastChild;return t?(t.next=e,e.prev=t,this.lastChild=e):this.lastChild=this.firstChild=e,e.parent=this,e},e.prototype.insert=function(e,t,n){e.parent&&e.remove();var r=t.parent||this;return n?(t===r.firstChild?r.firstChild=e:t.prev.next=e,e.prev=t.prev,e.next=t,t.prev=e):(t===r.lastChild?r.lastChild=e:t.next.prev=e,e.next=t.next,e.prev=t,t.next=e),e.parent=r,e},e.prototype.getAll=function(e){for(var t=[],n=this.firstChild;n;n=ym(n,this))n.name===e&&t.push(n);return t},e.prototype.children=function(){for(var e=[],t=this.firstChild;t;t=t.next)e.push(t);return e},e.prototype.empty=function(){if(this.firstChild){for(var e=[],t=this.firstChild;t;t=ym(t,this))e.push(t);for(var n=e.length;n--;){(t=e[n]).parent=t.firstChild=t.lastChild=t.next=t.prev=null}}return this.firstChild=this.lastChild=null,this},e.prototype.isEmpty=function(e,t,n){void 0===t&&(t={});var r=this.firstChild;if(wm(this))return!1;if(r)do{if(1===r.type){if(r.attr("data-mce-bogus"))continue;if(e[r.name])return!1;if(wm(r))return!1}if(8===r.type)return!1;if(3===r.type&&!Cm(r))return!1;if(3===r.type&&r.parent&&t[r.parent.name]&&Mo(r.value))return!1;if(n&&n(r))return!1}while(r=ym(r,this));return!0},e.prototype.walk=function(e){return ym(this,null,e)},e}(),Sm=ht.makeMap("NOSCRIPT STYLE SCRIPT XMP IFRAME NOEMBED NOFRAMES PLAINTEXT"," "),Nm=function(e){return l(e.nodeValue)&&Ie(e.nodeValue,co)},Em=function(e){return(0===e.length?"":V(e,function(e){return"["+e+"]"}).join(",")+",")+'[data-mce-bogus="all"]'},km=function(e,t,n){return document.createTreeWalker(e,t,n,!1)},_m=function(e){return km(e,NodeFilter.SHOW_COMMENT,function(e){return Nm(e)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP})},Am=function(e){return km(e,NodeFilter.SHOW_TEXT,function(e){if(Nm(e)){var t=e.parentNode;return t&&ye(Sm,t.nodeName)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}return NodeFilter.FILTER_SKIP})},Rm=function(e){return null!==_m(e).nextNode()},Dm=function(e){return null!==Am(e).nextNode()},Tm=function(e,t){return null!==t.querySelector(Em(e))},Om=function(e,t){q(function(e,t){return t.querySelectorAll(Em(e))}(e,t),function(t){var n=bt.fromDom(t);"all"===Vn(n,"data-mce-bogus")?on(n):q(e,function(e){$n(n,e)&&Wn(n,e)})})},Bm=function(e){for(var t=e.nextNode();null!==t;)t.nodeValue=null,t=e.nextNode()},Pm=x(Bm,_m),Lm=x(Bm,Am),Im=function(e,t){var n=[{condition:_(Tm,t),action:_(Om,t)},{condition:Rm,action:Pm},{condition:Dm,action:Lm}],r=e,o=!1;return q(n,function(t){var n=t.condition,i=t.action;n(r)&&(o||(r=e.cloneNode(!0),o=!0),i(r))}),r},Mm=function(e,t,n,r){var o,i=function(e,t){return Re(Re({},e),{format:t,get:!0,getInner:!0})}(t,n),a=t.no_events?i:e.fire("BeforeGetContent",i);return o="raw"===a.format?ht.trim(fo(Im(r,e.serializer.getTempAttrs()).innerHTML)):"text"===a.format?e.dom.isEmpty(r)?"":fo(r.innerText||r.textContent):"tree"===a.format?e.serializer.serialize(r,a):function(e,t){var n=Wc(e),r=new RegExp("^(<"+n+"[^>]*>(&nbsp;|&#160;|\\s| |<br \\/>|)<\\/"+n+">[\r\n]*|<br \\/>[\r\n]*)$");return t.replace(r,"")}(e,e.serializer.serialize(r,a)),H(["text","tree"],a.format)||uo(bt.fromDom(r))?a.content=o:a.content=ht.trim(o),a.no_events?a.content:e.fire("GetContent",a).content}
90,Fm=ht.each,Um=function(e){return{compare:function(t,n){if(t.nodeName!==n.nodeName)return!1;var r=function(t){var n={};return Fm(e.getAttribs(t),function(r){var o=r.nodeName.toLowerCase();0!==o.indexOf("_")&&"style"!==o&&0!==o.indexOf("data-")&&(n[o]=e.getAttrib(t,o))}),n},o=function(e,t){var n,r;for(r in e)if(ye(e,r)){if(void 0===(n=t[r]))return!1;if(e[r]!==n)return!1;delete t[r]}for(r in t)if(ye(t,r))return!1;return!0};return!(!o(r(t),r(n))||!o(e.parseStyle(e.getAttrib(t,"style")),e.parseStyle(e.getAttrib(n,"style")))||zf(t)||zf(n))}}},zm=ht.makeMap,Hm=function(e){var t=[],n=(e=e||{}).indent,r=zm(e.indent_before||""),o=zm(e.indent_after||""),i=ui.getEncodeFunc(e.entity_encoding||"raw",e.entities),a="html"===e.element_format;return{start:function(e,u,c){var s,f,l,d;if(n&&r[e]&&t.length>0&&(d=t[t.length-1]).length>0&&"\n"!==d&&t.push("\n"),t.push("<",e),u)for(s=0,f=u.length;s<f;s++)l=u[s],t.push(" ",l.name,'="',i(l.value,!0),'"');t[t.length]=!c||a?">":" />",c&&n&&o[e]&&t.length>0&&(d=t[t.length-1]).length>0&&"\n"!==d&&t.push("\n")},end:function(e){var r;t.push("</",e,">"),n&&o[e]&&t.length>0&&(r=t[t.length-1]).length>0&&"\n"!==r&&t.push("\n")},text:function(e,n){e.length>0&&(t[t.length]=n?e:i(e))},cdata:function(e){t.push("<![CDATA[",e,"]]>")},comment:function(e){t.push("\x3c!--",e,"--\x3e")},pi:function(e,r){r?t.push("<?",e," ",i(r),"?>"):t.push("<?",e,"?>"),n&&t.push("\n")},doctype:function(e){t.push("<!DOCTYPE",e,">",n?"\n":"")},reset:function(){t.length=0},getContent:function(){return t.join("").replace(/\n$/,"")}}},jm=function(e,t){void 0===t&&(t=yi());var n=Hm(e);(e=e||{}).validate=!("validate"in e)||e.validate;return{serialize:function(r){var o=e.validate,i={3:function(e){n.text(e.value,e.raw)},8:function(e){n.comment(e.value)},7:function(e){n.pi(e.name,e.value)},10:function(e){n.doctype(e.value)},4:function(e){n.cdata(e.value)},11:function(e){if(e=e.firstChild)do{a(e)}while(e=e.next)}};n.reset();var a=function(e){var r=i[e.type];if(r)r(e);else{var u=e.name,c=e.shortEnded,s=e.attributes;if(o&&s&&s.length>1){var f=[];f.map={};var l=t.getElementRule(e.name);if(l){for(var d=0,m=l.attributesOrder.length;d<m;d++)if((p=l.attributesOrder[d])in s.map){var g=s.map[p];f.map[p]=g,f.push({name:p,value:g})}for(d=0,m=s.length;d<m;d++){var p;(p=s[d].name)in f.map||(g=s.map[p],f.map[p]=g,f.push({name:p,value:g}))}s=f}}if(n.start(e.name,s,c),!c){if(e=e.firstChild)do{a(e)}while(e=e.next);n.end(u)}}};return 1!==r.type||e.inner?i[11](r):a(r),n.getContent()}}},Vm=new Set;q(["margin","margin-left","margin-right","margin-top","margin-bottom","padding","padding-left","padding-right","padding-top","padding-bottom","border","border-width","border-style","border-color","background","background-attachment","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","float","position","left","right","top","bottom","z-index","display","transform","width","max-width","min-width","height","max-height","min-height","overflow","overflow-x","overflow-y","text-overflow","vertical-align","transition","transition-delay","transition-duration","transition-property","transition-timing-function"],function(e){Vm.add(e)});var qm=["font","text-decoration","text-emphasis"],$m=function(e,t){return se(e.parseStyle(e.getAttrib(t,"style")))},Wm=function(e,t){return ee($m(e,t),function(e){return!function(e){return Vm.has(e)}(e)})},Km=function(e,t,n){var r=$m(e,t),o=$m(e,n),i=function(r){var o=e.getStyle(t,r),i=e.getStyle(n,r);return je(o)&&je(i)&&o!==i};return j(r,function(e){var t=function(t){return j(t,function(t){return t===e})};if(!t(o)&&t(qm)){var n=K(o,function(e){return j(qm,function(t){return Me(e,t)})});return j(n,i)}return i(e)})},Xm=function(e,t,n){return I.from(n.container()).filter(_n).exists(function(r){var o=e?0:-1;return t(r.data.charAt(n.offset()+o))})},Ym=_(Xm,!0,jf),Gm=_(Xm,!1,jf),Jm=function(e){var t=e.container();return _n(t)&&(0===t.data.length||so(t.data)&&jl.isBookmarkNode(t.parentNode))},Qm=function(e,t){return function(n){return I.from($s(e?0:-1,n)).filter(t).isSome()}}
90,Zm=function(e){return On(e)&&"block"===Xn(bt.fromDom(e),"display")},eg=function(e){return Pn(e)&&!function(e){return yn(e)&&"all"===e.getAttribute("data-mce-bogus")}(e)},tg=Qm(!0,Zm),ng=Qm(!1,Zm),rg=Qm(!0,In),og=Qm(!1,In),ig=Qm(!0,Nn),ag=Qm(!1,Nn),ug=Qm(!0,eg),cg=Qm(!1,eg),sg=function(e){var t=Ru(e,"br"),n=K(function(e){for(var t=[],n=e.dom;n;)t.push(bt.fromDom(n)),n=n.lastChild;return t}(e).slice(-1),to);t.length===n.length&&q(n,on)},fg=function(e){rn(e),tn(e,bt.fromHtml('<br data-mce-bogus="1">'))},lg=function(e){Vt(e).each(function(t){It(t).each(function(n){Zr(e)&&to(t)&&Zr(n)&&on(t)})})},dg=function(e,t,n){return Nt(t,e)?function(e,t){for(var n=y(t)?t:T,r=e.dom,o=[];null!==r.parentNode&&void 0!==r.parentNode;){var i=r.parentNode,a=bt.fromDom(i);if(o.push(a),!0===n(a))break;r=i}return o}(e,function(e){return n(e)||xt(e,t)}).slice(0,-1):[]},mg=function(e,t){return dg(e,t,T)},gg=function(e,t){return[e].concat(mg(e,t))},pg=function(e,t,n){return xf(e,t,n,Jm)},hg=function(e,t){return J(gg(bt.fromDom(t.container()),e),Zr)},vg=function(e,t,n){return pg(e,t.dom,n).forall(function(e){return hg(t,n).fold(function(){return!1===qs(e,n,t.dom)},function(r){return!1===qs(e,n,t.dom)&&Nt(r,bt.fromDom(e.container()))})})},bg=function(e,t,n){return hg(t,n).fold(function(){return pg(e,t.dom,n).forall(function(e){return!1===qs(e,n,t.dom)})},function(t){return pg(e,t.dom,n).isNone()})},yg=_(bg,!1),Cg=_(bg,!0),wg=_(vg,!1),xg=_(vg,!0),Sg=function(e){return ef(e).exists(to)},Ng=function(e,t,n){var r=K(gg(bt.fromDom(n.container()),t),Zr),o=ie(r).getOr(t);return Cf(e,o.dom,n).filter(Sg)},Eg=function(e,t){return ef(t).exists(to)||Ng(!0,e,t).isSome()},kg=function(e,t){return function(e){return I.from(e.getNode(!0)).map(bt.fromDom)}(t).exists(to)||Ng(!1,e,t).isSome()},_g=_(Ng,!1),Ag=_(Ng,!0),Rg=function(e){return yc.isTextPosition(e)&&!e.isAtStart()&&!e.isAtEnd()},Dg=function(e,t){var n=K(gg(bt.fromDom(t.container()),e),Zr);return ie(n).getOr(e)},Tg=function(e,t){return Rg(t)?Gm(t):Gm(t)||Ef(Dg(e,t).dom,t).exists(Gm)},Og=function(e,t){return Rg(t)?Ym(t):Ym(t)||Nf(Dg(e,t).dom,t).exists(Ym)},Bg=function(e){return ef(e).bind(function(e){return Fr(e,At)}).exists(function(e){return t=Xn(e,"white-space"),H(["pre","pre-wrap"],t);var t})},Pg=function(e,t){return function(e,t){return Ef(e.dom,t).isNone()}(e,t)||function(e,t){return Nf(e.dom,t).isNone()}(e,t)||yg(e,t)||Cg(e,t)||kg(e,t)||Eg(e,t)},Lg=function(e,t){return!Bg(t)&&(yg(e,t)||wg(e,t)||kg(e,t)||Tg(e,t))},Ig=function(e,t){return!Bg(t)&&(Cg(e,t)||xg(e,t)||Eg(e,t)||Og(e,t))},Mg=function(e,t){return Lg(e,t)||Ig(e,function(e){var t=e.container(),n=e.offset();return _n(t)&&n<t.data.length?yc(t,n+1):e}(t))},Fg=function(e,t){return Hf(e.charAt(t))},Ug=function(e){var t=e.container();return _n(t)&&Ie(t.data," ")},zg=function(e){var t=e.data,n=function(e){var t=e.split("");return V(t,function(e,n){return Hf(e)&&n>0&&n<t.length-1&&Vf(t[n-1])&&Vf(t[n+1])?" ":e}).join("")}(t);return n!==t&&(e.data=n,!0)},Hg=function(e,t){return I.some(t).filter(Ug).bind(function(t){var n=t.container();return function(e,t){var n=t.data,r=yc(t,0);return!(!Fg(n,0)||Mg(e,r)||(t.data=" "+n.slice(1),0))}(e,n)||zg(n)||function(e,t){var n=t.data,r=yc(t,n.length-1);return!(!Fg(n,n.length-1)||Mg(e,r)||(t.data=n.slice(0,-1)+" ",0))}(e,n)?I.some(t):I.none()})},jg=function(e){var t=bt.fromDom(e.getBody());e.selection.isCollapsed()&&Hg(t,yc.fromRangeStart(e.selection.getRng())).each(function(t){e.selection.setRng(t.toRange())})},Vg=function(e,t,n){if(0!==n){var r=bt.fromDom(e),o=Mr(r,Zr).getOr(r),i=e.data.slice(t,t+n),a=t+n>=e.data.length&&Ig(o,yc(e,e.data.length)),u=0===t&&Lg(o,yc(e,0));e.replaceData(t,n,function(e,t,n){return Y(e,function(r,o){return jf(o)||Hf(o)?r.previousCharIsSpace||""===r.str&&t||r.str.length===e.length-1&&n?{previousCharIsSpace:!1,str:r.str+" "}:{previousCharIsSpace:!0,str:r.str+" "}:{previousCharIsSpace:!1,str:r.str+o}},{previousCharIsSpace:!1,str:""}).str}(i,u,a))}},qg=function(e,t){var n=e.data.slice(t),r=n.length-ze(n).length;Vg(e,t,r)},$g=function(e,t){var n=e.data.slice(0,t),r=n.length-He(n).length;Vg(e,t-r,r)},Wg=function(e,t,n,r){void 0===r&&(r=!0);var o=He(e.data).length,i=r?e:t,a=r?t:e;return r?i.appendData(a.data):i.insertData(0,a.data),on(bt.fromDom(a)),n&&qg(i,o),i},Kg=function(e,t){return function(e,t){var n=e.container(),r=e.offset();return!1===yc.isTextPosition(e)&&n===t.parentNode&&r>yc.before(t).offset()}(t,e)?yc(t.container(),t.offset()-1):t},Xg=function(e){return Bo(e.previousSibling)?I.some((t=e.previousSibling,_n(t)?yc(t,t.data.length):yc.after(t))):e.previousSibling?_f(e.previousSibling):I.none();var t},Yg=function(e){return Bo(e.nextSibling)?I.some((t=e.nextSibling,_n(t)?yc(t,0):yc.before(t))):e.nextSibling?kf(e.nextSibling):I.none();var t},Gg=function(e,t){return Xg(t).orThunk(function(){return Yg(t)}).orThunk(function(){return function(e,t){var n=yc.before(t.previousSibling?t.previousSibling:t.parentNode);return Ef(e,n).fold(function(){return Nf(e,yc.after(t))},I.some)}(e,t)})},Jg=function(e,t){return Yg(t).orThunk(function(){return Xg(t)}).orThunk(function(){return function(e,t){return Nf(e,yc.after(t)).fold(function(){return Ef(e,yc.before(t))},I.some)}(e,t)})},Qg=function(e,t,n){return function(e,t,n){return e?Jg(t,n):Gg(t,n)}
90(e,t,n).map(_(Kg,n))},Zg=function(e,t,n){n.fold(function(){e.focus()},function(n){e.selection.setRng(n.toRange(),t)})},ep=function(e,t){return t&&ye(e.schema.getBlockElements(),Et(t))},tp=function(e){if(Vo(e)){var t=bt.fromHtml('<br data-mce-bogus="1">');return rn(e),tn(e,t),I.some(yc.before(t.dom))}return I.none()},np=function(e,t,n){var r,o,i,a,u=It(e).filter(Rt),c=Mt(e).filter(Rt);return on(e),(r=u,o=c,i=t,a=function(e,t,r){var o=e.dom,i=t.dom,a=o.data.length;return Wg(o,i,n),r.container()===i?yc(o,a):r},r.isSome()&&o.isSome()&&i.isSome()?I.some(a(r.getOrDie(),o.getOrDie(),i.getOrDie())):I.none()).orThunk(function(){return n&&(u.each(function(e){return $g(e.dom,e.dom.length)}),c.each(function(e){return qg(e.dom,0)})),t})},rp=function(e,t,n,r){void 0===r&&(r=!0);var o,i=Qg(t,e.getBody(),n.dom),a=Mr(n,_(ep,e),(o=e.getBody(),function(e){return e.dom===o})),u=np(n,i,function(e,t){return ye(e.schema.getTextInlineElements(),Et(t))}(e,n));e.dom.isEmpty(e.getBody())?(e.setContent(""),e.selection.setCursorLocation()):a.bind(tp).fold(function(){r&&Zg(e,t,u)},function(n){r&&Zg(e,t,I.some(n))})},op=function(e){return Ru(e,"td,th")},ip=function(e,t){return{start:e,end:t}},ap=gr([{singleCellTable:["rng","cell"]},{fullTable:["table"]},{partialTable:["cells","outsideDetails"]},{multiTable:["startTableCells","endTableCells","betweenRng"]}]),up=function(e,t){return jr(bt.fromDom(e),"td,th",t)},cp=function(e){return!xt(e.start,e.end)},sp=function(e,t){return _l(e.start,t).bind(function(n){return _l(e.end,t).bind(function(e){return t=xt(n,e),r=n,t?I.some(r):I.none();var t,r})})},fp=function(e){return function(t){return sp(t,e).map(function(e){return function(e,t,n){return{rng:e,table:t,cells:n}}(t,e,op(e))})}},lp=function(e,t,n,r){if(n.collapsed||!e.forall(cp))return I.none();if(t.isSameTable){var o=e.bind(fp(r));return I.some({start:o,end:o})}var i=up(n.startContainer,r),a=up(n.endContainer,r),u=i.bind(function(e){return function(t){return _l(t,e).bind(function(e){return ae(op(e)).map(function(e){return ip(t,e)})})}}(r)).bind(fp(r)),c=a.bind(function(e){return function(t){return _l(t,e).bind(function(e){return ie(op(e)).map(function(e){return ip(e,t)})})}}(r)).bind(fp(r));return I.some({start:u,end:c})},dp=function(e,t){return Q(e,function(e){return xt(e,t)})},mp=function(e){return Fn(dp(e.cells,e.rng.start),dp(e.cells,e.rng.end),function(t,n){return e.cells.slice(t,n+1)})},gp=function(e,t,n){return e.exists(function(e){return function(e,t){return!cp(e)&&sp(e,t).exists(function(e){var t=e.dom.rows;return 1===t.length&&1===t[0].cells.length})}(e,n)&&Dl(e.start,t)})},pp=function(e,t){var n=t.startTable,r=t.endTable,o=e.cloneRange();return n.each(function(e){return o.setStartAfter(e.dom)}),r.each(function(e){return o.setEndBefore(e.dom)}),o},hp=function(e,t){var n=function(e){return function(t){return xt(e,t)}}(e),r=function(e,t){var n=up(e.startContainer,t),r=up(e.endContainer,t);return Fn(n,r,ip)}(t,n),o=function(e,t){var n=function(e){return _l(bt.fromDom(e),t)},r=n(e.startContainer),o=n(e.endContainer),i=r.isSome(),a=o.isSome(),u=Fn(r,o,xt).getOr(!1);return{startTable:r,endTable:o,isStartInTable:i,isEndInTable:a,isSameTable:u,isMultiTable:!u&&i&&a}}(t,n);return gp(r,t,n)?r.map(function(e){return ap.singleCellTable(t,e.start)}):o.isMultiTable?function(e,t,n,r){return lp(e,t,n,r).bind(function(e){var r=e.start,o=e.end,i=r.bind(mp).getOr([]),a=o.bind(mp).getOr([]);if(i.length>0&&a.length>0){var u=pp(n,t);return I.some(ap.multiTable(i,a,u))}return I.none()})}(r,o,t,n):function(e,t,n,r){return lp(e,t,n,r).bind(function(e){var t=e.start,n=e.end;return t.or(n)}).bind(function(e){var r=t.isSameTable,o=mp(e).getOr([]);if(r&&e.cells.length===o.length)return I.some(ap.fullTable(e.table));if(o.length>0){if(r)return I.some(ap.partialTable(o,I.none()));var i=pp(n,t);return I.some(ap.partialTable(o,I.some(Re(Re({},t),{rng:i}))))}return I.none()})}(r,o,t,n)},vp=function(e){var t;return(8===kt(t=e)||"#comment"===Et(t)?It(e):Vt(e)).bind(vp).orThunk(function(){return I.some(e)})},bp=function(e){return q(e,function(e){Wn(e,"contenteditable"),fg(e)})},yp=function(e,t,n,r){var o=n.cloneRange();r?(o.setStart(n.startContainer,n.startOffset),o.setEndAfter(t.dom.lastChild)):(o.setStartBefore(t.dom.firstChild),o.setEnd(n.endContainer,n.endOffset)),Sp(e,o,t,!1)},Cp=function(e){var t=kl(e),n=bt.fromDom(e.selection.getNode());Ln(n.dom)&&Vo(n)?e.selection.setCursorLocation(n.dom,0):e.selection.collapse(!0),t.length>1&&j(t,function(e){return xt(e,n)})&&Hn(n,"data-mce-selected","1")},wp=function(e,t,n){var r=e.selection.getRng(),o=n.bind(function(n){var o=n.rng,i=n.isStartInTable,a=function(e,t){return I.from(e.dom.getParent(t,e.dom.isBlock)).map(bt.fromDom)}(e,i?o.endContainer:o.startContainer);o.deleteContents(),function(e,t,n){n.each(function(n){t?on(n):(fg(n),e.selection.setCursorLocation(n.dom,0))})}(e,i,a.filter(Vo));var u=i?t[0]:t[t.length-1];return yp(e,u,r,i),Vo(u)?I.none():I.some(i?t.slice(1):t.slice(0,-1))}).getOr(t);return bp(o),Cp(e),!0},xp=function(e,t,n,r){var o=e.selection.getRng(),i=t[0],a=n[n.length-1];yp(e,i,o,!0),yp(e,a,o,!1);var u=Vo(i)?t:t.slice(1),c=Vo(a)?n:n.slice(0,-1);return bp(u.concat(c)),r.deleteContents(),Cp(e),!0},Sp=function(e,t,n,r){void 0===r&&(r=!0),t.deleteContents();var o,i=vp(n).getOr(n),a=bt.fromDom(e.dom.getParent(i.dom,e.dom.isBlock));if(Vo(a)&&(fg(a),r&&e.selection.setCursorLocation(a.dom,0)),!xt(n,a)){var u=Mn(Lt(a),n)?[]:Lt(o=a).map(zt).map(function(e){return K(e,function(e){return!xt(o,e)})}).getOr([]);q(u.concat(zt(n)),function(e){xt(e,a)||Nt(e,a)||!Vo(e)||on(e)})}return!0},Np=function(e,t){return rp(e,!1,t),!0},Ep=function(e,t,n,r){return _p(t,r).fold(function(){return function(e,t,n){return hp(t,n).map(function(t){return t.fold(_(Sp,e),_(Np,e),_(wp,e),_(xp,e))})}
90(e,t,n)},function(t){return function(e,t){return Ap(e,t)}(e,t)}).getOr(!1)},kp=function(e,t){return J(gg(t,e),ao)},_p=function(e,t){return J(gg(t,e),(n="caption",function(e){return At(e)&&Et(e)===n}));var n},Ap=function(e,t){return fg(t),e.selection.setCursorLocation(t.dom,0),I.some(!0)},Rp=function(e,t,n,r,o){return wf(n,e.getBody(),o).bind(function(i){return function(e,t,n,r){return kf(e.dom).bind(function(o){return _f(e.dom).map(function(e){return t?n.isEqual(o)&&r.isEqual(e):n.isEqual(e)&&r.isEqual(o)})}).getOr(!0)}(r,n,o,i)?function(e,t){return Ap(e,t)}(e,r):function(e,t,n){return _p(e,bt.fromDom(n.getNode())).map(function(e){return!1===xt(e,t)})}(t,r,i)}).or(I.some(!0))},Dp=function(e,t,n,r){var o=yc.fromRangeStart(e.selection.getRng());return kp(n,r).bind(function(r){return Vo(r)?Ap(e,r):function(e,t,n,r,o){return wf(n,e.getBody(),o).bind(function(e){return kp(t,bt.fromDom(e.getNode())).map(function(e){return!1===xt(e,r)})})}(e,n,t,r,o)}).getOr(!1)},Tp=function(e,t){return e?ig(t):ag(t)},Op=function(e,t,n){var r=bt.fromDom(e.getBody());return _p(r,n).fold(function(){return Dp(e,t,r,n)||function(e,t){var n=yc.fromRangeStart(e.selection.getRng());return Tp(t,n)||Cf(t,e.getBody(),n).exists(function(e){return Tp(t,e)})}(e,t)},function(n){return function(e,t,n,r){var o=yc.fromRangeStart(e.selection.getRng());return Vo(r)?Ap(e,r):Rp(e,n,t,r,o)}(e,t,r,n).getOr(!1)})},Bp=function(e,t){var n=bt.fromDom(e.selection.getStart(!0)),r=kl(e);return e.selection.isCollapsed()&&0===r.length?Op(e,t,n):function(e,t,n){var r=bt.fromDom(e.getBody()),o=e.selection.getRng();return 0!==n.length?wp(e,n,I.none()):Ep(e,r,o,t)}(e,n,r)},Pp=function(e){var t=yc.fromRangeStart(e),n=yc.fromRangeEnd(e),r=e.commonAncestorContainer;return Cf(!1,r,n).map(function(o){return!qs(t,n,r)&&qs(t,o,r)?function(e,t,n,r){var o=document.createRange();return o.setStart(e,t),o.setEnd(n,r),o}(t.container(),t.offset(),o.container(),o.offset()):e}).getOr(e)},Lp=function(e){return e.collapsed?e:Pp(e)},Ip=function(e){return e&&e.firstChild&&e.firstChild===e.lastChild&&function(e){return" "===e.data||Tn(e)}(e.firstChild)},Mp=function(e){return e.length>0&&(!(t=e[e.length-1]).firstChild||Ip(t))?e.slice(0,-1):e;var t},Fp=function(e,t){var n=e.getParent(t,e.isBlock);return n&&"LI"===n.nodeName?n:null},Up=function(e,t){var n=yc.after(e),r=pf(t).prev(n);return r?r.toRange():null},zp=function(e,t,n){var r=e.parentNode;return ht.each(t,function(t){r.insertBefore(t,e)}),function(e,t){var n=yc.before(e),r=pf(t).next(n);return r?r.toRange():null}(e,n)},Hp=function(e,t,n,r){var o,i=function(e,t,n){var r=t.serialize(n);return function(e){var t=e.firstChild,n=e.lastChild;return t&&"META"===t.nodeName&&t.parentNode.removeChild(t),n&&"mce_marker"===n.id&&n.parentNode.removeChild(n),e}(e.createFragment(r))}(t,e,r),a=Fp(t,n.startContainer),u=Mp((o=i.firstChild,K(o.childNodes,function(e){return"LI"===e.nodeName}))),c=t.getRoot(),s=function(e){var r=yc.fromRangeStart(n),o=pf(t.getRoot()),i=1===e?o.prev(r):o.next(r);return!i||Fp(t,i.getNode())!==a};return s(1)?zp(a,u,c):s(2)?function(e,t,n,r){return r.insertAfter(t.reverse(),e),Up(t[0],n)}(a,u,c,t):function(e,t,n,r){var o=function(e,t){var n=t.cloneRange(),r=t.cloneRange();return n.setStartBefore(e),r.setEndAfter(e),[n.cloneContents(),r.cloneContents()]}(e,r),i=e.parentNode;return i.insertBefore(o[0],e),ht.each(t,function(t){i.insertBefore(t,e)}),i.insertBefore(o[1],e),i.removeChild(e),Up(t[t.length-1],n)}(a,u,c,n)},jp=Ln,Vp=function(e){var t=e.dom,n=Lp(e.selection.getRng());e.selection.setRng(n);var r=t.getParent(n.startContainer,jp);!function(e,t,n){return null!==n&&n===e.getParent(t.endContainer,jp)&&Dl(bt.fromDom(n),t)}(t,n,r)?e.getDoc().execCommand("Delete",!1,null):Sp(e,n,bt.fromDom(r))},qp=function(e,t,n){var r,o,i,a=e.selection,u=e.dom;/^ | $/.test(t)&&(t=function(e,t,n){var r=bt.fromDom(e.getRoot());return n=Lg(r,yc.fromRangeStart(t))?n.replace(/^ /,"&nbsp;"):n.replace(/^&nbsp;/," "),n=Ig(r,yc.fromRangeEnd(t))?n.replace(/(&nbsp;| )(<br( \/)>)?$/,"&nbsp;"):n.replace(/&nbsp;(<br( \/)?>)?$/," ")}(u,a.getRng(),t));var c=e.parser,s=n.merge,f=jm({validate:ss(e)},e.schema),l='<span id="mce_marker" data-mce-type="bookmark">
90&#xFEFF;</span>',d=e.fire("BeforeSetContent",{content:t,format:"html",selection:!0,paste:n.paste});if(d.isDefaultPrevented())e.fire("SetContent",{content:d.content,format:"html",selection:!0,paste:n.paste});else{t=d.content,n.preserve_zwsp||(t=fo(t)),-1===t.indexOf("{$caret}")&&(t+="{$caret}"),t=t.replace(/\{\$caret\}/,l);var m=(o=a.getRng()).startContainer||(o.parentElement?o.parentElement():null),g=e.getBody();m===g&&a.isCollapsed()&&u.isBlock(g.firstChild)&&function(e,t){return t&&!e.schema.getShortEndedElements()[t.nodeName]}(e,g.firstChild)&&u.isEmpty(g.firstChild)&&((o=u.createRng()).setStart(g.firstChild,0),o.setEnd(g.firstChild,0),a.setRng(o)),a.isCollapsed()||Vp(e);var p,h={context:(r=a.getNode()).nodeName.toLowerCase(),data:n.data,insert:!0},v=c.parse(t,h);if(!0===n.paste&&function(e,t){var n=t.firstChild,r=t.lastChild;return n&&"meta"===n.name&&(n=n.next),r&&"mce_marker"===r.attr("id")&&(r=r.prev),function(e,t){var n=e.getNonEmptyElements();return t&&(t.isEmpty(n)||function(e,t){return e.getBlockElements()[t.name]&&function(e){return e.firstChild&&e.firstChild===e.lastChild}(t)&&function(e){return"br"===e.name||" "===e.value}(t.firstChild)}(e,t))}(e,r)&&(r=r.prev),!(!n||n!==r||"ul"!==n.name&&"ol"!==n.name)}(e.schema,v)&&function(e,t){return!!Fp(e,t)}(u,r))return o=Hp(f,u,a.getRng(),v),a.setRng(o),void e.fire("SetContent",d);if(function(e){for(var t=e;t=t.walk();)1===t.type&&t.attr("data-mce-fragment","1")}(v),"mce_marker"===(i=v.lastChild).attr("id")){var y=i;for(i=i.prev;i;i=i.walk(!0))if(3===i.type||!u.isBlock(i.name)){e.schema.isValidChild(i.parent.name,"span")&&i.parent.insert(y,i,"br"===i.name);break}}if(e._selectionOverrides.showBlockCaretContainer(r),h.invalid){e.selection.setContent(l),r=a.getNode();var C=e.getBody();for(9===r.nodeType?r=i=C:i=r;i!==C;)r=i,i=i.parentNode;t=r===C?C.innerHTML:u.getOuterHTML(r),t=f.serialize(c.parse(t.replace(/<span (id="mce_marker"|id=mce_marker).+?<\/span>/i,function(){return f.serialize(v)}))),r===C?u.setHTML(C,t):u.setOuterHTML(r,t)}else!function(e,t,n){if("all"===n.getAttribute("data-mce-bogus"))n.parentNode.insertBefore(e.dom.createFragment(t),n);else{var r=n.firstChild,o=n.lastChild;!r||r===o&&"BR"===r.nodeName?e.dom.setHTML(n,t):e.selection.setContent(t)}}(e,t=f.serialize(v),r);!function(e,t){var n=e.schema.getTextInlineElements(),r=e.dom;if(t){var o=e.getBody(),i=Um(r);ht.each(r.select("*[data-mce-fragment]"),function(e){if(b(n[e.nodeName.toLowerCase()])&&Wm(r,e))for(var t=e.parentNode;b(t)&&t!==o&&!Km(r,e,t);t=t.parentNode)if(i.compare(t,e)){r.remove(e,!0);break}})}}(e,s),function(e,t){var n,r=e.dom,o=e.selection;if(t){o.scrollIntoView(t);var i=Vl(e.getBody(),t);if("false"===r.getContentEditable(i))return r.remove(t),void o.select(i);var a=r.createRng(),u=t.previousSibling;if(_n(u)){if(a.setStart(u,u.nodeValue.length),!lt.ie){var c=t.nextSibling;_n(c)&&(u.appendData(c.data),c.parentNode.removeChild(c))}}else a.setStartBefore(t),a.setEndBefore(t);var s=r.getParent(t,r.isBlock);r.remove(t),s&&r.isEmpty(s)&&(e.$(s).empty(),a.setStart(s,0),a.setEnd(s,0),jp(s)||function(e){return!!e.getAttribute("data-mce-fragment")}(s)||!(n=function(t){var n=yc.fromRangeStart(t);if(n=pf(e.getBody()).next(n))return n.toRange()}(a))?r.add(s,r.create("br",{"data-mce-bogus":"1"})):(a=n,r.remove(s))),o.setRng(a)}}(e,u.get("mce_marker")),p=e.getBody(),ht.each(p.getElementsByTagName("*"),function(e){e.removeAttribute("data-mce-fragment")}),function(e,t){I.from(e.getParent(t,"td,th")).map(bt.fromDom).each(lg)}(u,a.getStart()),e.fire("SetContent",d),e.addVisual()}},$p=function(e,t){t(e),e.firstChild&&$p(e.firstChild,t),e.next&&$p(e.next,t)},Wp=function(e,t,n){var r=function(e,t,n){var r={},o={},i=[];for(var a in n.firstChild&&$p(n.firstChild,function(n){q(e,function(e){e.name===n.name&&(r[e.name]?r[e.name].nodes.push(n):r[e.name]={filter:e,nodes:[n]})}),q(t,function(e){"string"==typeof n.attr(e.name)&&(o[e.name]?o[e.name].nodes.push(n):o[e.name]={filter:e,nodes:[n]})})}),r)ye(r,a)&&i.push(r[a]);for(var u in o)ye(o,u)&&i.push(o[u]);return i}(e,t,n);q(r,function(e){q(e.filter.callbacks,function(t){t(e.nodes,e.filter.name,{})})})},Kp=function(e){return e instanceof xm},Xp=function(e,t,n){e.dom.setHTML(e.getBody(),t),!0!==n&&function(e){sm(e)&&kf(e.getBody()).each(function(t){var n=t.getNode(),r=Nn(n)?kf(n).getOr(t):t;e.selection.setRng(r.toRange())})}(e)},Yp=function(e,t,n){var r=function(e,t){return Re(Re({format:"html"},e),{set:!0,content:Kp(t)?"":t})}(n,t),o=n.no_events?r:e.fire("BeforeSetContent",r);return Kp(t)||(t=o.content),I.from(e.getBody()).fold(N(t),function(n){return Kp(t)?function(e,t,n,r){Wp(e.parser.getNodeFilters(),e.parser.getAttributeFilters(),n);var o=jm({validate:e.validate},e.schema).serialize(n);return r.content=fo(uo(bt.fromDom(t))?o:ht.trim(o)),Xp(e,r.content,r.no_selection),r.n
90o_events||e.fire("SetContent",r),n}(e,n,t,o):function(e,t,n,r){if(0===(n=fo(n)).length||/^\s+$/.test(n)){var o='<br data-mce-bogus="1">';"TABLE"===t.nodeName?n="<tr><td>"+o+"</td></tr>":/^(UL|OL)$/.test(t.nodeName)&&(n="<li>"+o+"</li>");var i=Wc(e);i&&e.schema.isValidChild(t.nodeName.toLowerCase(),i.toLowerCase())?(n=o,n=e.dom.createHTML(i,Kc(e),n)):n||(n='<br data-mce-bogus="1">'),Xp(e,n,r.no_selection),e.fire("SetContent",r)}else"raw"!==r.format&&(n=jm({validate:e.validate},e.schema).serialize(e.parser.parse(n,{isRootContent:!0,insert:!0}))),r.content=uo(bt.fromDom(t))?n:ht.trim(n),Xp(e,r.content,r.no_selection),r.no_events||e.fire("SetContent",r);return r.content}(e,n,t,o)})},Gp=function(e,t){return function(e,t){var n=e.dom;return n.parentNode?Ur(bt.fromDom(n.parentNode),function(n){return!xt(e,n)&&t(n)}):I.none()}(e,t).isSome()},Jp=function(e){return y(e)?e:T},Qp=function(e,t,n){var r=t(e),o=Jp(n);return r.orThunk(function(){return o(e)?I.none():function(e,t,n){for(var r=e.dom,o=Jp(n);r.parentNode;){r=r.parentNode;var i=bt.fromDom(r),a=t(i);if(a.isSome())return a;if(o(i))break}return I.none()}(e,t,o)})},Zp=Jf,eh=function(e,t,n){var r=e.formatter.get(n);if(r)for(var o=0;o<r.length;o++){var i=r[o];if(ol(i)&&!1===i.inherit&&e.dom.is(t,i.selector))return!0}return!1},th=function(e,t,n,r,o){var i=e.dom.getRoot();return t!==i&&(t=e.dom.getParent(t,function(t){return!!eh(e,t,n)||(t.parentNode===i||!!oh(e,t,n,r,!0))}),!!oh(e,t,n,r,o))},nh=function(e,t,n){return!!Zp(t,n.inline)||(!!Zp(t,n.block)||(n.selector?1===t.nodeType&&e.is(t,n.selector):void 0))},rh=function(e,t,n,r,o,i){var a=n[r];if(y(n.onmatch))return n.onmatch(t,n,r);if(a)if(h(a.length)){for(var u in a)if(ye(a,u)){var c="attributes"===r?e.getAttrib(t,u):Zf(e,t,u),s=Gf(a[u],i),f=v(c)||Ve(c);if(f&&v(s))continue;if(o&&f&&!n.exact)return!1;if((!o||n.exact)&&!Zp(c,Qf(e,s,u)))return!1}}else for(var l=0;l<a.length;l++)if("attributes"===r?e.getAttrib(t,a[l]):Zf(e,t,a[l]))return!0;return!0},oh=function(e,t,n,r,o){var i=e.formatter.get(n),a=e.dom;if(i&&t)for(var u=0;u<i.length;u++){var c=i[u];if(nh(e.dom,t,c)&&rh(a,t,c,"attributes",o,r)&&rh(a,t,c,"styles",o,r)){var s=c.classes;if(s)for(var f=0;f<s.length;f++)if(!e.dom.hasClass(t,Gf(s[f],r)))return;return c}}},ih=function(e,t,n,r,o){if(r)return th(e,r,t,n,o);if(r=e.selection.getNode(),th(e,r,t,n,o))return!0;var i=e.selection.getStart();return!(i===r||!th(e,i,t,n,o))},ah=function(e,t){var n=function(t){return xt(t,bt.fromDom(e.getBody()))};return I.from(e.selection.getStart(!0)).bind(function(r){return Qp(bt.fromDom(r),function(n){return ce(t,function(t){return function(t,n){return oh(e,t.dom,n)?I.some(n):I.none()}(n,t)})},n)}).getOrNull()},uh=function(e,t,n){return Y(n,function(n,r){var o=function(e,t){return j(e.formatter.get(t),function(e){var t=function(e){return e.length>1&&"%"===e.charAt(0)};return j(["styles","attributes"],function(n){return be(e,n).exists(function(e){var n=m(e)?e:ve(e);return j(n,t)})})})}(e,r);return e.formatter.matchNode(t,r,{},o)?n.concat([r]):n},[])},ch=co,sh=function(e){return function(e){for(var t=[];e;){if(3===e.nodeType&&e.nodeValue!==ch||e.childNodes.length>1)return[];1===e.nodeType&&t.push(e),e=e.firstChild}return t}(e).length>0},fh=function(e){if(e){var t=new Gr(e,e);for(e=t.current();e;e=t.next())if(_n(e))return e}return null},lh=function(e){var t=bt.fromTag("span");return jn(t,{id:"_mce_caret","data-mce-bogus":"1","data-mce-type":"format-caret"}),e&&tn(t,bt.fromText(ch)),t},dh=function(e,t,n){void 0===n&&(n=!0);var r=e.dom,o=e.selection;if(sh(t))rp(e,!1,bt.fromDom(t),n);else{var i=o.getRng(),a=r.getParent(t,r.isBlock),u=i.startContainer,c=i.startOffset,s=i.endContainer,f=i.endOffset,l=function(e){var t=fh(e);return t&&t.nodeValue.charAt(0)===ch&&t.deleteData(0,1),t}(t);r.remove(t,!0),u===l&&c>0&&i.setStart(l,c-1),s===l&&f>0&&i.setEnd(l,f-1),a&&r.isEmpty(a)&&fg(bt.fromDom(a)),o.setRng(i)}},mh=function(e,t,n){void 0===n&&(n=!0);var r=e.dom,o=e.selection;if(t)dh(e,t,n);else if(!(t=Rf(e.getBody(),o.getStart())))for(;t=r.get("_mce_caret");)dh(e,t,!1)},gh=function(e,t){return e.appendChild(t),t},ph=function(e,t){var n=X(e,function(e,t){return gh(e,t.cloneNode(!1))},t);return gh(n,n.ownerDocument.createTextNode(ch))},hh=function(e,t,n,r){var o,i,a,u=e.dom,c=e.selection,s=[],f=c.getRng(),l=f.startContainer,d=f.startOffset;for(i=l,3===l.nodeType&&(d!==l.nodeValue.length&&(o=!0),i=i.parentNode);i;){if(oh(e,i,t,n,r)){a=i;break}i.nextSibling&&(o=!0),s.push(i),i=i.parentNode}if(a)if(o){var m=c.getBookmark();f.collapse(!0);var g=wl(e,f,e.formatter.get(t),!0);g=fd(g),e.formatter.remove(t,n,g,r),c.moveToBookmark(m)}else{var p=Rf(e.getBody(),a),h=lh(!1).dom;!function(e,t,n){var r=e.dom,o=r.getParent(n,_(Kf,e));o&&r.isEmpty(o)?n.parentNode.replaceChild(t,n):(sg(bt.fromDom(n)),r.isEmpty(n)?n.parentNode.replaceChild(t,n):r.insertAfter(t,n))}(e,h,null!==p?p:a);var v=function(e,t,n,r,o,i){var a=e.formatter,u=e.dom,c=K(se(a.get()),function(e){return e!==r&&!Ie(e,"removeformat")}),s=uh(e,n,c);if(K(s,function(t){return!nl(e,t,r)}).length>0){var f=n.cloneNode(!1);return u.add(t,f),a.remove(r,o,f,i),u.remove(f),I.some(f)}return I.none()}(e,h,a,t,n,r),b=ph(s.concat(v.toArray()),h);dh(e,p,!1),c.setCursorLocation(b,1),u.isEmpty(a)&&u.remove(a)}},vh=function(e){e.on("mouseup keydown",function(t){!function(e,t){var n=e.selection,r=e.getBody();mh(e,null,!1),8!==t&&46!==t||!n.isCollapsed()||n.getStart().innerHTML!==ch||mh(e,Rf(r,n.getStart())),37!==t&&39!==t||mh(e,Rf(r,n.getStart()))}(e,t.keyCode)}
90)},bh=function(e,t){var n=e.schema.getTextInlineElements();return ye(n,Et(t))&&!Af(t.dom)&&!Sn(t.dom)},yh={},Ch=Ne,wh=xe;!function(e,t){yh[e]||(yh[e]=[]),yh[e].push(t)}("pre",function(e){var t,n=e.selection.getRng(),r=Cn(["pre"]);n.collapsed||(t=e.selection.getSelectedBlocks(),wh(Ch(Ch(t,r),function(e){return r(e.previousSibling)&&-1!==Ee(t,e.previousSibling)}),function(e){var t,n;t=e.previousSibling,eu(n=e).remove(),eu(t).append("<br><br>").append(n.childNodes)}))});var xh=ht.each,Sh=function(e){return yn(e)&&!zf(e)&&!Af(e)&&!Sn(e)},Nh=function(e,t){for(var n=e;n;n=n[t]){if(_n(n)&&je(n.data))return e;if(yn(n)&&!zf(n))return n}return e},Eh=function(e,t,n){var r=Um(e);if(t&&n&&(t=Nh(t,"previousSibling"),n=Nh(n,"nextSibling"),r.compare(t,n))){for(var o=t.nextSibling;o&&o!==n;){var i=o;o=o.nextSibling,t.appendChild(i)}return e.remove(n),ht.each(ht.grep(n.childNodes),function(e){t.appendChild(e)}),t}return n},kh=function(e,t,n,r){if(r&&!1!==t.merge_siblings){var o=Eh(e,Wf(r),r);Eh(e,o,Wf(o,!0))}},_h=function(e,t,n){xh(e.childNodes,function(e){Sh(e)&&(t(e)&&n(e),e.hasChildNodes()&&_h(e,t,n))})},Ah=function(e,t){return function(n){return!(!n||!Zf(e,n,t))}},Rh=function(e,t,n){return function(r){e.setStyle(r,t,n),""===r.getAttribute("style")&&r.removeAttribute("style"),function(e,t){"SPAN"===t.nodeName&&0===e.getAttribs(t).length&&e.remove(t,!0)}(e,r)}},Dh=gr([{keep:[]},{rename:["name"]},{removed:[]}]),Th=/^(src|href|style)$/,Oh=ht.each,Bh=Jf,Ph=function(e,t,n){return e.isChildOf(t,n)&&t!==n&&!e.isBlock(n)},Lh=function(e,t,n){var r=t[n?"startContainer":"endContainer"],o=t[n?"startOffset":"endOffset"];if(yn(r)){var i=r.childNodes.length-1;!n&&o&&o--,r=r.childNodes[o>i?i:o]}return _n(r)&&n&&o>=r.nodeValue.length&&(r=new Gr(r,e.getBody()).next()||r),_n(r)&&!n&&0===o&&(r=new Gr(r,e.getBody()).prev()||r),r},Ih=function(e,t){var n=t?"firstChild":"lastChild";if(function(e){return/^(TR|TH|TD)$/.test(e.nodeName)}(e)&&e[n]){var r=e[n];return"TR"===e.nodeName&&r[n]||r}return e},Mh=function(e,t,n,r){var o=e.create(n,r);return t.parentNode.insertBefore(o,t),o.appendChild(t),o},Fh=function(e,t,n,r,o){var i=bt.fromDom(t),a=bt.fromDom(e.create(r,o)),u=n?Ut(i):Ft(i);return nn(a,u),n?(Qt(i,a),en(a,i)):(Zt(i,a),tn(a,i)),a.dom},Uh=function(e,t,n,r){var o=Wf(t,n,r);
90return v(o)||"BR"===o.nodeName||e.isBlock(o)},zh=function(e,t,n){var r,o=t.parentNode,i=e.dom,a=Wc(e);rl(n)&&(a?o===i.getRoot()&&(n.list_block&&Bh(t,n.list_block)||q(ue(t.childNodes),function(t){Xf(e,a,t.nodeName.toLowerCase())?r?r.appendChild(t):(r=Mh(i,t,a),i.setAttribs(r,e.settings.forced_root_block_attrs)):r=null})):i.isBlock(t)&&!i.isBlock(o)&&(Uh(i,t,!1)||Uh(i,t.firstChild,!0,!0)||t.insertBefore(i.create("br"),t.firstChild),Uh(i,t,!0)||Uh(i,t.lastChild,!1,!0)||t.appendChild(i.create("br")))),function(e){return ol(e)&&il(e)&&Mn(be(e,"mixed"),!0)}(n)&&!Bh(n.inline,t)||i.remove(t,!0)},Hh=function(e,t,n,r,o){var i,a=e.dom;if(!function(e,t,n){return!(!il(n)||!Bh(t,n.inline))||!(!rl(n)||!Bh(t,n.block))||(ol(n)?yn(t)&&e.is(t,n.selector):void 0)}(a,r,t)&&!function(e,t){return t.links&&"A"===e.nodeName}(r,t))return Dh.keep();var u=r;if(il(t)&&"all"===t.remove&&m(t.preserve_attributes)){var c=K(a.getAttribs(u),function(e){return H(t.preserve_attributes,e.name.toLowerCase())});if(a.removeAllAttribs(u),q(c,function(e){return a.setAttrib(u,e.name,e.value)}),c.length>0)return Dh.rename("span")}if("all"!==t.remove){Oh(t.styles,function(e,r){e=Qf(a,Gf(e,n),r+""),C(r)&&(r=e,o=null),(t.remove_similar||!o||Bh(Zf(a,o,r),e))&&a.setStyle(u,r,""),i=!0}),i&&""===a.getAttrib(u,"style")&&(u.removeAttribute("style"),u.removeAttribute("data-mce-style")),Oh(t.attributes,function(e,r){var i;if(e=Gf(e,n),C(r)&&(r=e,o=null),t.remove_similar||!o||Bh(a.getAttrib(o,r),e)){if("class"===r&&(e=a.getAttrib(u,r))&&(i="",q(e.split(/\s+/),function(e){/mce\-\w+/.test(e)&&(i+=(i?" ":"")+e)}),i))return void a.setAttrib(u,r,i);if(Th.test(r)&&u.removeAttribute("data-mce-"+r),"style"===r&&Cn(["li"])(u)&&"none"===a.getStyle(u,"list-style-type"))return u.removeAttribute(r),void a.setStyle(u,"list-style-type","none");"class"===r&&u.removeAttribute("className"),u.removeAttribute(r)}}),Oh(t.classes,function(e){e=Gf(e,n),o&&!a.hasClass(o,e)||a.removeClass(u,e)});for(var s=a.getAttribs(u),f=0;f<s.length;f++){var l=s[f].nodeName;if(0!==l.indexOf("_")&&0!==l.indexOf("data-"))return Dh.keep()}}return"none"!==t.remove?(zh(e,u,t),Dh.removed()):Dh.keep()},jh=function(e,t,n,r,o){return Hh(e,t,n,r,o).fold(T,function(t){return e.dom.rename(r,t),!0},O)},Vh=function(e,t,n,r){return Hh(e,t,n,r,r).fold(N(r),function(t){return e.dom.createFragment().appendChild(r),e.dom.rename(r,t)},N(null))},qh=function(e,t,n,r,o){var i=e.formatter.get(t),a=i[0],u=!0,c=e.dom,s=e.selection,f=function(r){var u=function(e,t,n,r,o){var i;return q(tl(e.dom,t.parentNode).reverse(),function(t){if(!i&&"_start"!==t.id&&"_end"!==t.id){var a=oh(e,t,n,r,o);a&&!1!==a.split&&(i=t)}}),i}(e,r,t,n,o);return function(e,t,n,r,o,i,a,u){var c,s,f,l=e.dom;if(n){for(var d=n.parentNode,m=r.parentNode;m&&m!==d;m=m.parentNode){c=l.clone(m,!1);for(var g=0;g<t.length&&null!==(c=Vh(e,t[g],u,c));g++);c&&(s&&c.appendChild(s),f||(f=c),s=c)}!i||a.mixed&&l.isBlock(n)||(r=l.split(n,r)),s&&(o.parentNode.insertBefore(s,o),f.appendChild(o),il(a)&&kh(l,a,0,s))}return r}(e,i,u,r,r,!0,a,n)},l=function(t){return j(i,function(r){return jh(e,r,n,t,t)})},d=function(t){var n=!0,r=!1;yn(t)&&c.getContentEditable(t)&&(n=u,u="true"===c.getContentEditable(t),r=!0);var o=ue(t.childNodes);if(u&&!r){var s=l(t)||j(i,function(e){return nh(c,t,e)}),f=t.parentNode;!s&&b(f)&&al(a)&&l(f)}if(a.deep&&o.length){for(var m=0;m<o.length;m++)d(o[m]);r&&(u=n)}q(["underline","line-through","overline"],function(n){yn(t)&&e.dom.getStyle(t,"text-decoration")===n&&t.parentNode&&el(c,t.parentNode)===n&&jh(e,{deep:!1,exact:!0,inline:"span",styles:{textDecoration:n}},null,t)})},m=function(e){var t=c.get(e?"_start":"_end"),n=t[e?"firstChild":"lastChild"];return function(e){return zf(e)&&yn(e)&&("_start"===e.id||"_end"===e.id)}(n)&&(n=n[e?"firstChild":"lastChild"]),_n(n)&&0===n.data.length&&(n=e?t.previousSibling||t.nextSibling:t.nextSibling||t.previousSibling),c.remove(t,!0),n},g=function(t){var n,r,o=wl(e,t,i,t.collapsed);if(a.split){if(o=fd(o),(n=Lh(e,o,!0))!==(r=Lh(e,o))){if(n=Ih(n,!0),r=Ih(r,!1),Ph(c,n,r)){var u=I.from(n.firstChild).getOr(n);return f(Fh(c,u,!0,"span",{id:"_start","data-mce-type":"bookmark"})),void m(!0)}if(Ph(c,r,n)){u=I.from(r.lastChild).getOr(r);return f(Fh(c,u,!1,"span",{id:"_end","data-mce-type":"bookmark"})),void m(!1)}n=Mh(c,n,"span",{id:"_start","data-mce-type":"bookmark"}),r=Mh(c,r,"span",{id:"_end","data-mce-type":"bookmark"});var s=c.createRng();s.setStartAfter(n),s.setEndBefore(r),xl(c,s,function(e){q(e,function(e){zf(e)||zf(e.parentNode)||f(e)})}),f(n),f(r),n=m(!0),r=m()}else n=r=f(n);o.startContainer=n.parentNode?n.parentNode:n,o.startOffset=c.nodeIndex(n),o.endContainer=r.parentNode?r.parentNode:r,o.endOffset=c.nodeIndex(r)+1}xl(c,o,function(e){q(e,d)})};if(r){if(qf(r)){var p=c.createRng();p.setStartBefore(r),p.setEndAfter(r),g(p)}else g(r);Kl(e,t,r,n)}else if("false"!==c.getContentEditable(s.getNode()))s.isCollapsed()&&il(a)&&!kl(e).length?hh(e,t,n,o):(Pl(s,!0,function(){Bl(e,g)}),il(a)&&ih(e,t,n,s.getStart())&&$f(c,s,s.getRng()),e.nodeChanged()),Kl(e,t,r,n);else{r=s.getNode();for(var h=0;h<i.length&&(!i[h].ceFalseOverride||!jh(e,i[h],n,r,r));h++);Kl(e,t,r,n)}},$h=ht.each,Wh=function(e,t,n,r){$h(t,function(t){il(t)&&$h(e.dom.select(t.inline,r),function(r){Sh(r)&&jh(e,t,n,r,t.exact?r:null)}),function(e,t,n){if(t.clear_child_styles){var r=t.links?"*:not(a)":"*";xh(e.select(r,n),function(n){Sh(n)&&xh(t.styles,function(t,r){e.setStyle(n,r,"")})})}}(e.dom,t,r)})},Kh=ht.each,Xh=function(e){return yn(e)&&!zf(e)&&!Af(e)&&!Sn(e)},Yh=function(e,t,n,r){var o=e.formatter.get(t),i=o[0],a=!r&&e.selection.isCollapsed(),u=e.dom,c=e.selection,s=function(e,t){if(void 0===t&&(t=i),y(t.onformat)&&t.onformat(e,t,n,r),Kh(t.styles,function(t,r){u.setStyle(e,r,Gf(t,n))}),t.styles){var o=u.getAttrib(e,"style");o&&u.setAttrib(e,"data-mce-style",o)}Kh(t.attributes,function(t,r){u.setAttrib(e,r,Gf(t,n))}),Kh(t.classes,function(t){t=Gf(t,n),u.hasClass(e,t)||u.addClass(e,t)})},f=function(e,t){var n=!1;return Kh(e,function(e){return!!ol(e)&&(b(e.collapsed)&&e.collapsed!==a?void 0:u.is(t,e.selector)&&!Af(t)?(s(t,e),n=!0,!1):void 0)}),n},d=function(e){if(l(e)){var t=u.create(e);return s(t),t}return null},m=function(r,a,u){var c=[],l=!0,m=i.inline||i.block,g=d(m);xl(r,a,function(a){var d,p=function(a){var h=!1,v=l,y=a.nodeName.toLowerCase(),C=a.parentNode,w=C.nodeName.toLowerCase();if(yn(a)&&r.getContentEditable(a)&&(v=l,l="true"===r.getContentEditable(a),h=!0),Tn(a)&&!function(e,t,n,r){if(function(e){return e.getParam("format_empty_lines",!1,"boolean")}(e)&&il(t)){var o=vi(e.schema),i=Gp(bt.fromDom(n),function(e){return Af(e.dom)});return Ce(o,r)&&Vo(bt.fromDom(n.parentNode),!1)&&!i}return!1}(e,i,a,w))return d=null,void(rl(i)&&r.remove(a));if(rl(i)&&i.wrapper&&oh(e,a,t,n))d=null;else{if(l&&!h&&rl(i)&&!i.wrapper&&Kf(e,y)&&Xf(e,w,m)){var x=r.rename(a,m);return s(x),c.push(x),void(d=null)}if(ol(i)){var S=f(o,a);if(!S&&b(C)&&al(i)&&(S=f(o,C)),!il(i)||S)return void(d=null)}!l||h||!Xf(e,m,y)||!Xf(e,w,m)||!u&&_n(a)&&so(a.data)||Af(a)||il(i)&&r.isBlock(a)?(d=null,q(ue(a.childNodes),p),h&&(l=v),d=null):(d||(d=r.clone(g,!1),a.parentNode.insertBefore(d,a),c.push(d)),d.appendChild(a))}};q(a,p)}),!0===i.links&&q(c,function(e){var t=function(e){"A"===e.nodeName&&s(e,i),q(ue(e.childNodes),t)};t(e)}),q(c,function(a){var u=function(e){var t=0;return q(e.childNodes,function(e){(function(e){return b(e)&&_n(e)&&0===e.length})(e)||zf(e)||t++}),t}(a);!(c.length>1)&&r.isBlock(a)||0!==u?(il(i)||rl(i)&&i.wrapper)&&(i.exact||1!==u||(a=function(e){return J(e.childNodes,Xh).filter(function(e){return nh(r,e,i)}).map(function(t){var n=r.clone(t,!1);return s(n),r.replace(n,e,!0),r.remove(t,!0),n}).getOr(e)}(a)),Wh(e,o,n,a),function(e,t,n,r,o){oh(e,o.parentNode,n,r)&&jh(e,t,r,o)||t.merge_with_parents&&e.dom.getParent(o.parentNode,function(i){if(oh(e,i,n,r))return jh(e,t,r,o),!0})}(e,i,t,n,a),function(e,t,n,r){t.styles&&t.styles.backgroundColor&&_h(r,Ah(e,"fontSize"),Rh(e,"backgroundColor",Gf(t.styles.backgroundColor,n)))}
90(r,i,n,a),function(e,t,n,r){var o=function(t){if(1===t.nodeType&&t.parentNode&&1===t.parentNode.nodeType){var n=el(e,t.parentNode);e.getStyle(t,"color")&&n?e.setStyle(t,"text-decoration",n):e.getStyle(t,"text-decoration")===n&&e.setStyle(t,"text-decoration",null)}};t.styles&&(t.styles.color||t.styles.textDecoration)&&(ht.walk(r,o,"childNodes"),o(r))}(r,i,0,a),function(e,t,n,r){!il(t)||"sub"!==t.inline&&"sup"!==t.inline||(_h(r,Ah(e,"fontSize"),Rh(e,"fontSize","")),e.remove(e.select("sup"===t.inline?"sub":"sup",r),!0))}(r,i,0,a),kh(r,i,0,a)):r.remove(a,!0)})};if("false"!==u.getContentEditable(c.getNode())){if(i){if(r)if(qf(r)){if(!f(o,r)){var g=u.createRng();g.setStartBefore(r),g.setEndAfter(r),m(u,wl(e,g,o),!0)}}else m(u,r,!0);else if(a&&il(i)&&!kl(e).length)!function(e,t,n){var r,o,i=e.selection,a=i.getRng(),u=a.startOffset,c=a.startContainer.nodeValue;(r=Rf(e.getBody(),i.getStart()))&&(o=fh(r));var s,f,l=/[^\s\u00a0\u00ad\u200b\ufeff]/;if(c&&u>0&&u<c.length&&l.test(c.charAt(u))&&l.test(c.charAt(u-1))){var d=i.getBookmark();a.collapse(!0);var m=wl(e,a,e.formatter.get(t));m=fd(m),e.formatter.apply(t,n,m),i.moveToBookmark(d)}else r&&o.nodeValue===ch?e.formatter.apply(t,n,r):(s=e.getDoc(),f=lh(!0).dom,o=(r=s.importNode(f,!0)).firstChild,a.insertNode(r),u=1,e.formatter.apply(t,n,r)),i.setCursorLocation(o,u)}(e,t,n);else{var p=c.getNode(),h=o[0];e.settings.forced_root_block||!h.defaultBlock||u.getParent(p,u.isBlock)||Yh(e,h.defaultBlock),c.setRng(Lp(c.getRng())),Pl(c,!0,function(){Bl(e,function(t,n){var r=n?t:wl(e,t,o);m(u,r,!1)})}),$f(u,c,c.getRng()),e.nodeChanged()}!function(e,t){wh(yh[e],function(e){e(t)})}(t,e)}Wl(e,t,r,n)}else{r=c.getNode();for(var v=0,C=o.length;v<C;v++){var w=o[v];if(w.ceFalseOverride&&ol(w)&&u.is(r,w.selector)){s(r,w);break}}Wl(e,t,r,n)}},Gh=function(e){return ye(e,"vars")},Jh=function(e){return e.selection.getStart()},Qh=function(e,t,n,r,o){return G(t,function(t){var i=e.formatter.matchNode(t,n,null!=o?o:{},r);return!h(i)},function(t){return!!eh(e,t,n)||!r&&b(e.formatter.matchNode(t,n,o,!0))})},Zh=function(e,t){var n=null!=t?t:Jh(e);return K(tl(e.dom,n),function(e){return yn(e)&&!Sn(e)})},ev=function(e,t,n){var r=Zh(e,t);le(n,function(n,o){var i=function(n){var i=Qh(e,r,o,n.similar,Gh(n)?n.vars:void 0),a=i.isSome();if(n.state.get()!==a){n.state.set(a);var u=i.getOr(t);Gh(n)?n.callback(a,{node:u,format:o,parents:r}):q(n.callbacks,function(e){return e(a,{node:u,format:o,parents:r})})}};q([n.withSimilar,n.withoutSimilar],i),q(n.withVars,i)})},tv=function(e,t,n,r,o,i){return null===t.get()&&function(e,t){e.set({}),t.on("NodeChange",function(n){ev(t,n.element,e.get())}),t.on("FormatApply FormatRemove",function(n){var r=I.from(n.node).map(function(e){return qf(e)?e:e.startContainer}).bind(function(e){return yn(e)?I.some(e):I.from(e.parentElement)}).getOrThunk(function(){return Jh(t)});ev(t,r,e.get())})}(t,e),function(e,t,n,r,o,i){var a=t.get();q(n.split(","),function(t){var n=be(a,t).getOrThunk(function(){var e={withSimilar:{state:du(!1),similar:!0,callbacks:[]},withoutSimilar:{state:du(!1),similar:!1,callbacks:[]},withVars:[]};return a[t]=e,e}),u=function(){var n=Zh(e);return Qh(e,n,t,o,i).isSome()};if(h(i)){var c=o?n.withSimilar:n.withoutSimilar;c.callbacks.push(r),1===c.callbacks.length&&c.state.set(u())}else n.withVars.push({state:du(u()),similar:o,vars:i,callback:r})}),t.set(a)}(e,t,n,r,o,i),{unbind:function(){return function(e,t,n){var r=e.get();q(t.split(","),function(e){return be(r,e).each(function(t){r[e]={withSimilar:Re(Re({},t.withSimilar),{callbacks:K(t.withSimilar.callbacks,function(e){return e!==n})}),withoutSimilar:Re(Re({},t.withoutSimilar),{callbacks:K(t.withoutSimilar.callbacks,function(e){return e!==n})}),withVars:K(t.withVars,function(e){return e.callback!==n})}})}),e.set(r)}(t,n,r)}}},nv=function(e,t){var n=(t||document).createDocumentFragment();return q(e,function(e){n.appendChild(e.dom)}),bt.fromDom(n)},rv=function(e,t,n){return{element:e,width:t,rows:n}},ov=function(e,t){return{element:e,cells:t}},iv=function(e,t){return{x:e,y:t}},av=function(e,t){var n=parseInt(Vn(e,t),10);return isNaN(n)?1:n},uv=function(e,t,n){var r=e.rows;return!!(r[n]?r[n].cells:[])[t]},cv=function(e){return Y(e,function(e,t){return t.cells.length>e?t.cells.length:e},0)},sv=function(e,t){for(var n=e.rows,r=0;r<n.length;r++)for(var o=n[r].cells,i=0;i<o.length;i++)if(xt(o[i],t))return I.some(iv(i,r));return I.none()},fv=function(e,t,n,r,o){for(var i=[],a=e.rows,u=n;u<=o;u++){var c=a[u].cells,s=t<r?c.slice(t,r+1):c.slice(r,t+1);i.push(ov(a[u].element,s))}return i},lv=function(e){var t=rv(Hu(e),0,[]);return q(Ru(e,"tr"),function(e,n){q(Ru(e,"td,th"),function(r,o){!function(e,t,n,r,o){for(var i=av(o,"rowspan"),a=av(o,"colspan"),u=e.rows,c=n;c<n+i;c++){u[c]||(u[c]=ov(ju(r),[]));for(var s=t;s<t+a;s++)u[c].cells[s]=c===n&&s===t?o:Hu(o)}}(t,function(e,t,n){for(;uv(e,t,n);)t++;return t}(t,o,n),n,e,r)})}),rv(t.element,cv(t.rows),t.rows)},dv=function(e){return function(e,t){var n=Hu(e.element),r=bt.fromTag("tbody");return nn(r,t),tn(n,r),n}(e,function(e){return V(e.rows,function(e){var t=V(e.cells,function(e){var t=ju(e);return Wn(t,"colspan"),Wn(t,"rowspan"),t}),n=Hu(e.element);return nn(n,t),n})}(e))},mv=function(e,t,n){return sv(e,t).bind(function(t){return sv(e,n).map(function(n){return function(e,t,n){var r=t.x,o=t.y,i=n.x,a=n.y,u=o<a?fv(e,r,o,i,a):fv(e,r,a,i,o);return rv(e.element,cv(u),u)}(e,t,n)})})},gv=function(e,t){return J(e,function(e){return"li"===Et(e)&&Dl(e,t)}).fold(N([]),function(t){return function(e){return J(e,function(e){return"ul"===Et(e)||"ol"===Et(e)})}(e).map(function(e){var t=bt.fromTag(Et(e)),n=he(Jn(e),function(e,t){return Me(t,"list-style")}
90);return Kn(t,n),[bt.fromTag("li"),t]}).getOr([])})},pv=function(e,t){var n=bt.fromDom(t.commonAncestorContainer),r=gg(n,e),o=K(r,function(e){return eo(e)||Qr(e)}),i=gv(r,t),a=o.concat(i.length?i:function(e){return oo(e)?Lt(e).filter(ro).fold(N([]),function(t){return[e,t]}):ro(e)?[e]:[]}(n));return V(a,Hu)},hv=function(){return nv([])},vv=function(e,t){return n=bt.fromDom(t.cloneContents()),r=pv(e,t),o=Y(r,function(e,t){return tn(t,e),t},n),r.length>0?nv([o]):o;var n,r,o},bv=function(e,t){return(n=e,r=t[0],zr(r,"table",_(xt,n))).bind(function(e){var n=t[0],r=t[t.length-1],o=lv(e);return mv(o,n,r).map(function(e){return nv([dv(e)])})}).getOrThunk(hv);var n,r},yv=function(e,t){var n=El(t,e);return n.length>0?bv(e,n):function(e,t){return t.length>0&&t[0].collapsed?hv():vv(e,t[0])}(e,t)},Cv=function(e,t){return t>=0&&t<e.length&&jf(e.charAt(t))},wv=function(e,t){var n=fo(e.innerText);return t?function(e){return e.replace(/^[ \f\n\r\t\v]+/,"")}(n):n},xv=function(e,t,n){void 0===n&&(n={});var r=function(e,t){return Re(Re({},e),{format:t,get:!0,selection:!0}
90)}(n,t),o=e.fire("BeforeGetContent",r);if(o.isDefaultPrevented())return e.fire("GetContent",o),o.content;if("text"===o.format)return function(e){return I.from(e.selection.getRng()).map(function(t){var n=I.from(e.dom.getParent(t.commonAncestorContainer,e.dom.isBlock)),r=e.getBody(),o=function(e){return e.map(function(e){return e.nodeName}).getOr("div").toLowerCase()}(n),i=lt.browser.isIE()&&"pre"!==o,a=e.dom.add(r,o,{"data-mce-bogus":"all",style:"overflow: hidden; opacity: 0;"},t.cloneContents()),u=wv(a,i),c=fo(a.textContent);if(e.dom.remove(a),Cv(c,0)||Cv(c,c.length-1)){var s=n.getOr(r),f=wv(s,i),l=f.indexOf(u);return-1===l?u:(Cv(f,l-1)?" ":"")+u+(Cv(f,l+u.length)?" ":"")}return u}).getOr("")}(e);o.getInner=!0;var i=function(e,t){var n=e.selection.getRng(),r=e.dom.create("body"),o=e.selection.getSel(),i=vm(e,Sl(o)),a=t.contextual?yv(bt.fromDom(e.getBody()),i).dom:n.cloneContents();return a&&r.appendChild(a),e.selection.serializer.serialize(r,t)}(e,o);return"tree"===o.format?i:(o.content=e.selection.isCollapsed()?"":i,e.fire("GetContent",o),o.content)},Sv=function(e){return yn(e)?e.outerHTML:_n(e)?ui.encodeRaw(e.data,!1):An(e)?"\x3c!--"+e.data+"--\x3e":""},Nv=function(e,t,n){var r=function(e){var t,n=document.createElement("div"),r=document.createDocumentFragment();for(e&&(n.innerHTML=e);t=n.firstChild;)r.appendChild(t);return r}(t);
90if(e.hasChildNodes()&&n<e.childNodes.length){var o=e.childNodes[n];o.parentNode.insertBefore(r,o)}else e.appendChild(r)},Ev=function(e,t){var n,r,o,i,a,u,c,s,f,l=V(ue(t.childNodes),Sv);return function(e,t){var n=0;q(e,function(e){0===e[0]?n++:1===e[0]?(Nv(t,e[1],n),n++):2===e[0]&&function(e,t){if(e.hasChildNodes()&&t<e.childNodes.length){var n=e.childNodes[t];n.parentNode.removeChild(n)}}(t,n)})}((r=e,o=(n=l).length+r.length+2,i=new Array(o),a=new Array(o),u=function(e,t,o,i,a){var c=s(e,t,o,i);if(null===c||c.start===t&&c.diag===t-i||c.end===e&&c.diag===e-o)for(var f=e,l=o;f<t||l<i;)f<t&&l<i&&n[f]===r[l]?(a.push([0,n[f]]),++f,++l):t-e>i-o?(a.push([2,n[f]]),++f):(a.push([1,r[l]]),++l);else{u(e,c.start,o,c.start-c.diag,a);for(var d=c.start;d<c.end;++d)a.push([0,n[d]]);u(c.end,t,c.end-c.diag,i,a)}},c=function(e,t,o,i){for(var a=e;a-t<i&&a<o&&n[a]===r[a-t];)++a;return function(e,t,n){return{start:e,end:t,diag:n}}(e,a,t)},s=function(e,t,o,u){var s=t-e,f=u-o;if(0===s||0===f)return null;var l,d,m,g,p,h=s-f,v=f+s,b=(v%2==0?v:v+1)/2;for(i[1+b]=e,a[1+b]=t+1,l=0;l<=b;++l){for(d=-l;d<=l;d+=2){for(m=d+b,d===-l||d!==l&&i[m-1]<i[m+1]?i[m]=i[m+1]:i[m]=i[m-1]+1,p=(g=i[m])-e+o-d;g<t&&p<u&&n[g]===r[p];)i[m]=++g,++p;if(h%2!=0&&h-l<=d&&d<=h+l&&a[m-h]<=i[m])return c(a[m-h],d+e-o,t,u)}for(d=h-l;d<=h+l;d+=2){for(m=d+b-h,d===h-l||d!==h+l&&a[m+1]<=a[m-1]?a[m]=a[m+1]-1:a[m]=a[m-1],p=(g=a[m]-1)-e+o-d;g>=e&&p>=o&&n[g]===r[p];)a[m]=g--,p--;if(h%2==0&&-l<=d&&d<=l&&a[m]<=i[m+h])return c(a[m],d+e-o,t,u)}}},f=[],u(0,n.length,0,r.length,f),f),t),t},kv=Te(function(){return document.implementation.createHTMLDocument("undo")}),_v=function(e){var t,n=e.serializer.getTempAttrs(),r=Im(e.getBody(),n);return function(e){return null!==e.querySelector("iframe")}(r)?(t=!0,{type:"fragmented",fragments:K(V(ue(r.childNodes),t?x(fo,Sv):Sv),function(e){return e.length>0}),content:"",bookmark:null,beforeBookmark:null}):{type:"complete",fragments:null,content:fo(r.innerHTML),bookmark:null,beforeBookmark:null}},Av=function(e,t,n){var r=n?t.beforeBookmark:t.bookmark;"fragmented"===t.type?Ev(t.fragments,e.getBody()):e.setContent(t.content,{format:"raw",no_selection:!b(r)||!Df(r)||!r.isFakeCaret}),e.selection.moveToBookmark(r)},Rv=function(e){return"fragmented"===e.type?e.fragments.join(""):e.content},Dv=function(e){var t=bt.fromTag("body",kv());return Uu(t,Rv(e)),q(Ru(t,"*[data-mce-bogus]"),an),t.dom.innerHTML},Tv=function(e,t){return!(!e||!t)&&(!!function(e,t){return Rv(e)===Rv(t)}(e,t)||function(e,t){return Dv(e)===Dv(t)}(e,t))},Ov=function(e){return 0===e.get()},Bv=function(e,t,n){Ov(n)&&(e.typing=t)},Pv=function(e,t){e.typing&&(Bv(e,!1,t),e.add())},Lv=function(e){return{undoManager:{beforeChange:function(t,n){return function(e,t,n){Ov(t)&&n.set(jc(e.selection))}(e,t,n)},add:function(t,n,r,o,i,a){return function(e,t,n,r,o,i,a){var u=_v(e);if(i=i||{},i=ht.extend(i,u),!1===Ov(r)||e.removed)return null;var c=t.data[n.get()];if(e.fire("BeforeAddUndo",{level:i,lastLevel:c,originalEvent:a}).isDefaultPrevented())return null;if(c&&Tv(c,i))return null;t.data[n.get()]&&o.get().each(function(e){t.data[n.get()].beforeBookmark=e});var s=function(e){return e.getParam("custom_undo_redo_levels",0,"number")}(e);if(s&&t.data.length>s){for(var f=0;f<t.data.length-1;f++)t.data[f]=t.data[f+1];t.data.length--,n.set(t.data.length)}i.bookmark=jc(e.selection),n.get()<t.data.length-1&&(t.data.length=n.get()+1),t.data.push(i),n.set(t.data.length-1);var l={level:i,lastLevel:c,originalEvent:a};return n.get()>0?(e.setDirty(!0),e.fire("AddUndo",l),e.fire("change",l)):e.fire("AddUndo",l),i}(e,t,n,r,o,i,a)},undo:function(t,n,r){return function(e,t,n,r){var o;return t.typing&&(t.add(),t.typing=!1,Bv(t,!1,n)),r.get()>0&&(r.set(r.get()-1),o=t.data[r.get()],Av(e,o,!0),e.setDirty(!0),e.fire("Undo",{level:o})),o}(e,t,n,r)},redo:function(t,n){return function(e,t,n){var r;return t.get()<n.length-1&&(t.set(t.get()+1),r=n[t.get()],Av(e,r,!1),e.setDirty(!0),e.fire("Redo",{level:r})),r}(e,t,n)},clear:function(t,n){return function(e,t,n){t.data=[],n.set(0),t.typing=!1,e.fire("ClearUndos")}(e,t,n)},reset:function(e){return function(e){e.clear(),e.add()}(e)},hasUndo:function(t,n){return function(e,t,n){return n.get()>0||t.typing&&t.data[0]&&!Tv(_v(e),t.data[0])}
90(e,t,n)},hasRedo:function(e,t){return function(e,t){return t.get()<e.data.length-1&&!e.typing}(e,t)},transact:function(e,t,n){return function(e,t,n){return Pv(e,t),e.beforeChange(),e.ignore(n),e.add()}(e,t,n)},ignore:function(e,t){return function(e,t){try{e.set(e.get()+1),t()}finally{e.set(e.get()-1)}}(e,t)},extra:function(t,n,r,o){return function(e,t,n,r,o){if(t.transact(r)){var i=t.data[n.get()].bookmark,a=t.data[n.get()-1];Av(e,a,!0),t.transact(o)&&(t.data[n.get()-1].beforeBookmark=i)}}(e,t,n,r,o)}},formatter:{match:function(t,n,r,o){return ih(e,t,n,r,o)},matchAll:function(t,n){return function(e,t,n){var r=[],o={},i=e.selection.getStart();return e.dom.getParent(i,function(i){for(var a=0;a<t.length;a++){var u=t[a];!o[u]&&oh(e,i,u,n)&&(o[u]=!0,r.push(u))}},e.dom.getRoot()),r}(e,t,n)},matchNode:function(t,n,r,o){return oh(e,t,n,r,o)},canApply:function(t){return function(e,t){var n=e.formatter.get(t),r=e.dom;if(n)for(var o=e.selection.getStart(),i=tl(r,o),a=n.length-1;a>=0;a--){var u=n[a];if(!ol(u)||b(u.defaultBlock))return!0;for(var c=i.length-1;c>=0;c--)if(r.is(i[c],u.selector))return!0}return!1}(e,t)},closest:function(t){return ah(e,t)},apply:function(t,n,r){return Yh(e,t,n,r)},remove:function(t,n,r,o){return qh(e,t,n,r,o)},toggle:function(t,n,r){return function(e,t,n,r){var o=e.formatter.get(t);!ih(e,t,n,r)||"toggle"in o[0]&&!o[0].toggle?Yh(e,t,n,r):qh(e,t,n,r)}(e,t,n,r)},formatChanged:function(t,n,r,o,i){return tv(e,t,n,r,o,i)}},editor:{getContent:function(t,n){return function(e,t,n){return I.from(e.getBody()).fold(N("tree"===t.format?new xm("body",11):""),function(r){return Mm(e,t,n,r)})}(e,t,n)},setContent:function(t,n){return Yp(e,t,n)},insertContent:function(t,n){return qp(e,t,n)},addVisual:function(t){return function(e,t){var n=e.dom,r=b(t)?t:e.getBody();h(e.hasVisual)&&(e.hasVisual=function(e){return e.getParam("visual",!0,"boolean")}(e)),q(n.select("table,a",r),function(t){switch(t.nodeName){case"TABLE":var r=function(e){return e.getParam("visual_table_class","mce-item-table","string")}(e),o=n.getAttrib(t,"border");o&&"0"!==o||!e.hasVisual?n.removeClass(t,r):n.addClass(t,r);break;case"A":if(!n.getAttrib(t,"href")){var i=n.getAttrib(t,"name")||t.id,a=function(e){return e.getParam("visual_anchor_class","mce-item-anchor","string")}(e);i&&e.hasVisual?n.addClass(t,a):n.removeClass(t,a)}}}),e.fire("VisualAid",{element:t,hasVisual:e.hasVisual})}(e,t)}},selection:{getContent:function(t,n){return xv(e,t,n)}},raw:{getModel:function(){return I.none()}}}},Iv=function(e){return ye(e.plugins,"rtc")},Mv=function(e){var t=e;return function(e){return be(e.plugins,"rtc").bind(function(e){return I.from(e.setup)})}(e).fold(function(){return t.rtcInstance=Lv(e),I.none()},function(e){var n,r;return t.rtcInstance=(n=N(null),r=N(""),{undoManager:{beforeChange:w,add:n,undo:n,redo:n,clear:w,reset:w,hasUndo:T,hasRedo:T,transact:n,ignore:w,extra:w},formatter:{match:T,matchAll:N([]),matchNode:N(void 0),canApply:T,closest:r,apply:w,remove:w,toggle:w,formatChanged:N({unbind:w})},editor:{getContent:r,setContent:r,insertContent:w,addVisual:w},selection:{getContent:r},raw:{getModel:N(I.none())}}),I.some(function(){return e().then(function(e){return t.rtcInstance=function(e){var t=function(e){return d(e)?e:{}}
90,n=e.undoManager,r=e.formatter,o=e.editor,i=e.selection,a=e.raw;return{undoManager:{beforeChange:n.beforeChange,add:n.add,undo:n.undo,redo:n.redo,clear:n.clear,reset:n.reset,hasUndo:n.hasUndo,hasRedo:n.hasRedo,transact:function(e,t,r){return n.transact(r)},ignore:function(e,t){return n.ignore(t)},extra:function(e,t,r,o){return n.extra(r,o)}},formatter:{match:function(e,n,o,i){return r.match(e,t(n),i)},matchAll:r.matchAll,matchNode:r.matchNode,canApply:function(e){return r.canApply(e)},closest:function(e){return r.closest(e)},apply:function(e,n,o){return r.apply(e,t(n))},remove:function(e,n,o,i){return r.remove(e,t(n))},toggle:function(e,n,o){return r.toggle(e,t(n))},formatChanged:function(e,t,n,o,i){return r.formatChanged(t,n,o,i)}},editor:{getContent:function(e,t){return o.getContent(e)},setContent:function(e,t){return o.setContent(e,t)},insertContent:function(e,t){return o.insertContent(e)},addVisual:o.addVisual},selection:{getContent:function(e,t){return i.getContent(t)}},raw:{getModel:function(){return I.some(a.getRawModel())}}}}(e),e.rtc.isRemote})})})},Fv=function(e){return e.rtcInstance?e.rtcInstance:Lv(e)},Uv=function(e){var t=e.rtcInstance;if(t)return t;throw new Error("Failed to get RTC instance not yet initialized.")},zv=function(e,t){return void 0===t&&(t={}),function(e,t,n){return Uv(e).selection.getContent(t,n)}(e,t.format?t.format:"html",t)},Hv=function(e){return 0===e.dom.length?(on(e),I.none()):I.some(e)},jv=function(e,t,n,r){e.bind(function(e){return(r?$g:qg)(e.dom,r?e.dom.length:0),t.filter(Rt).map(function(t){return function(e,t,n,r){var o=e.dom,i=t.dom,a=r?o.length:i.length;r?(Wg(o,i,!1,!r),n.setStart(i,a)):(Wg(i,o,!1,!r),n.setEnd(i,a))}(e,t,n,r)})}).orThunk(function(){return function(e,t){return e.filter(function(e){return jl.isBookmarkNode(e.dom)}).bind(t?Mt:It)}(t,r).or(t).filter(Rt).map(function(e){return function(e,t){Lt(e).each(function(n){var r=e.dom;t&&Lg(n,yc(r,0))?qg(r,0):!t&&Ig(n,yc(r,r.length))&&$g(r,r.length)})}(e,r)})})},Vv=function(e,t,n){void 0===n&&(n={});var r=function(e,t){return Re(Re({format:"html"},e),{set:!0,selection:!0,content:t})}(n,t),o=r;if(!r.no_events){var i=e.fire("BeforeSetContent",r);if(i.isDefaultPrevented())return void e.fire("SetContent",i);o=i}o.content=function(e,t){if("raw"!==t.format){var n=e.selection.getRng(),r=e.dom.getParent(n.commonAncestorContainer,e.dom.isBlock),o=r?{context:r.nodeName.toLowerCase()}:{},i=e.parser.parse(t.content,Re(Re({isRootContent:!0,forced_root_block:!1},o),t));return jm({validate:e.validate},e.schema).serialize(i)}return t.content}(e,o);var a=e.selection.getRng();!function(e,t){var n=I.from(t.firstChild).map(bt.fromDom),r=I.from(t.lastChild).map(bt.fromDom);e.deleteContents(),e.insertNode(t);var o=n.bind(It).filter(Rt).bind(Hv),i=r.bind(Mt).filter(Rt).bind(Hv);jv(o,n,e,!0),jv(i,r,e,!1),e.collapse(!1)}(a,a.createContextualFragment(o.content)),e.selection.setRng(a),Bd(e,a),o.no_events||e.fire("SetContent",o)},qv=function(e,t,n){if(e&&ye(e,t)){var r=K(e[t],function(e){return e!==n});0===r.length?delete e[t]:e[t]=r}};var $v=function(e){return!!e.select},Wv=function(e){return!(!e||!e.ownerDocument)&&Nt(bt.fromDom(e.ownerDocument),bt.fromDom(e))},Kv=function(e,t,n,r){var o,i,a=function(e,t){var n,r,o=function(t,n){return J(n,function(n){return e.is(n,t)})},i=function(t){return e.getParents(t,null,e.getRoot())};return{selectorChangedWithUnbind:function(e,a){return n||(n={},r={},t.on("NodeChange",function(e){var t=e.element,a=i(t),u={};ht.each(n,function(e,t){o(t,a).each(function(n){r[t]||(q(e,function(e){e(!0,{node:n,selector:t,parents:a})}),r[t]=e),u[t]=e})}),ht.each(r,function(e,n){u[n]||(delete r[n],ht.each(e,function(e){e(!1,{node:t,selector:n,parents:a})}))})})),n[e]||(n[e]=[]),n[e].push(a),o(e,i(t.selection.getStart())).each(function(){r[e]=n[e]}),{unbind:function(){qv(n,e,a),qv(r,e,a)}}}}}(e,r).selectorChangedWithUnbind,u=function(e,t){return Vv(r,e,t)},c=function(e){var t=f();t.collapse(!!e),l(t)},s=function(){return t.getSelection?t.getSelection():t.document.selection},f=function(){var n,a,u,c=function(e,t,n){try{return t.compareBoundaryPoints(e,n
90)}catch(r){return-1}},f=t.document;if(void 0!==r.bookmark&&!1===sm(r)){var l=Jd(r);if(l.isSome())return l.map(function(e){return vm(r,[e])[0]}).getOr(f.createRange())}try{(n=s())&&!bn(n.anchorNode)&&(a=n.rangeCount>0?n.getRangeAt(0):n.createRange?n.createRange():f.createRange(),a=vm(r,[a])[0])}catch(d){}return a||(a=f.createRange?f.createRange():f.body.createTextRange()),a.setStart&&9===a.startContainer.nodeType&&a.collapsed&&(u=e.getRoot(),a.setStart(u,0),a.setEnd(u,0)),o&&i&&(0===c(a.START_TO_START,a,o)&&0===c(a.END_TO_END,a,o)?a=i:(o=null,i=null)),a},l=function(e,t){var n;if(function(e){return!!e&&(!!$v(e)||Wv(e.startContainer)&&Wv(e.endContainer))}(e)){var a=$v(e)?e:null;if(a){i=null;try{a.select()}catch(c){}}else{var u=s();if(e=r.fire("SetSelectionRange",{range:e,forward:t}).range,u){i=e;try{u.removeAllRanges(),u.addRange(e)}catch(c){}!1===t&&u.extend&&(u.collapse(e.endContainer,e.endOffset),u.extend(e.startContainer,e.startOffset)),o=u.rangeCount>0?u.getRangeAt(0):null}e.collapsed||e.startContainer!==e.endContainer||!u.setBaseAndExtent||lt.ie||e.endOffset-e.startOffset<2&&e.startContainer.hasChildNodes()&&(n=e.startContainer.childNodes[e.startOffset])&&"IMG"===n.tagName&&(u.setBaseAndExtent(e.startContainer,e.startOffset,e.endContainer,e.endOffset),u.anchorNode===e.startContainer&&u.focusNode===e.endContainer||u.setBaseAndExtent(n,0,n,1)),r.fire("AfterSetSelectionRange",{range:e,forward:t})}}},d=function(){var t=s(),n=null==t?void 0:t.anchorNode,r=null==t?void 0:t.focusNode;if(!t||!n||!r||bn(n)||bn(r))return!0;var o=e.createRng();o.setStart(n,t.anchorOffset),o.collapse(!0);var i=e.createRng();return i.setStart(r,t.focusOffset),i.collapse(!0),o.compareBoundaryPoints(o.START_TO_START,i)<=0},m={bookmarkManager:null,controlSelection:null,dom:e,win:t,serializer:n,editor:r,collapse:c,setCursorLocation:function(t,n){var o=e.createRng();b(t)&&b(n)?(o.setStart(t,n),o.setEnd(t,n),l(o),c(!1)):(Tl(e,o,r.getBody(),!0),l(o))},getContent:function(e){return zv(r,e)},setContent:u,getBookmark:function(e,t){return g.getBookmark(e,t)},moveToBookmark:function(e){return g.moveToBookmark(e)},select:function(t,n){return function(e,t,n){return I.from(t).map(function(t){var r=e.nodeIndex(t),o=e.createRng();return o.setStart(t.parentNode,r),o.setEnd(t.parentNode,r+1),n&&(Tl(e,o,t,!0),Tl(e,o,t,!1)),o})}(e,t,n).each(l),t},isCollapsed:function(){var e=f(),t=s();return!(!e||e.item)&&(e.compareEndPoints?0===e.compareEndPoints("StartToEnd",e):!t||e.collapsed)},isForward:d,setNode:function(t){return u(e.getOuterHTML(t)),t},getNode:function(){return function(e,t){var n,r,o;if(!t)return e;r=t.startContainer,o=t.endContainer;var i=t.startOffset,a=t.endOffset;return n=t.commonAncestorContainer,!t.collapsed&&(r===o&&a-i<2&&r.hasChildNodes()&&(n=r.childNodes[i]),3===r.nodeType&&3===o.nodeType&&(r=r.length===i?hm(r.nextSibling,!0):r.parentNode,o=0===a?hm(o.previousSibling,!1):o.parentNode,r&&r===o))?r:n&&3===n.nodeType?n.parentNode:n}(r.getBody(),f())},getSel:s,setRng:l,getRng:f,getStart:function(e){return gm(r.getBody(),f(),e)},getEnd:function(e){return pm(r.getBody(),f(),e)},getSelectedBlocks:function(t,n){return function(e,t,n,r){var o,i=[],a=e.getRoot();if(n=e.getParent(n||gm(a,t,t.collapsed),e.isBlock),r=e.getParent(r||pm(a,t,t.collapsed),e.isBlock),n&&n!==a&&i.push(n),n&&r&&n!==r){o=n;for(var u=new Gr(n,a);(o=u.next())&&o!==r;)e.isBlock(o)&&i.push(o)}return r&&n!==r&&r!==a&&i.push(r),i}(e,f(),t,n)},normalize:function(){var t=f(),n=s();if(!(Sl(n).length>1)&&Ol(r)){var o=cd(e,t);return o.each(function(e){l(e,d())}),o.getOr(t)}return t},selectorChanged:function(e,t){return a(e,t),m},selectorChangedWithUnbind:a,getScrollContainer:function(){for(var t,n=e.getRoot();n&&"BODY"!==n.nodeName;){if(n.scrollHeight>n.clientHeight){t=n;break}n=n.parentNode}return t},scrollIntoView:function(e,t){b(e)?function(e,t,n){(e.inline?Dd:Od)(e,t,n)}(r,e,t):Bd(r,f(),t)},placeCaretAt:function(e,t){return l(Ql(e,t,r.getDoc()))},getBoundingClientRect:function(){var e=f();return e.collapsed?yc.fromRangeStart(e).getClientRects()[0]:e.getBoundingClientRect()},destroy:function(){t=o=i=null,p.destroy()}},g=jl(m),p=Gl(m,r);return m.bookmarkManager=g,m.controlSelection=p,m},Xv=function(e,t,n){e.addNodeFilter("font",function(e){q(e,function(e){var r=t.parse(e.attr("style")),o=e.attr("color"),i=e.attr("face"),a=e.attr("size");o&&(r.color=o),i&&(r["font-family"]=i),a&&(r["font-size"]=n[parseInt(e.attr("size"),10)-1]),e.name="span",e.attr("style",t.serialize(r)),function(e,t){q(t,function(t){e.attr(t,null)})}(e,["color","face","size"])})})},Yv=function(e,t){var n=wi();
90t.convert_fonts_to_spans&&Xv(e,n,ht.explode(t.font_size_legacy_values)),function(e,t){e.addNodeFilter("strike",function(e){q(e,function(e){var n=t.parse(e.attr("style"));n["text-decoration"]="line-through",e.name="span",e.attr("style",t.serialize(n))})})}(e,n)},Gv=function(e){var t,n=decodeURIComponent(e).split(","),r=/data:([^;]+)/.exec(n[0]);return r&&(t=r[1]),{type:t,data:n[1]}},Jv=function(e,t){var n;try{n=atob(t)}catch(Jk){return I.none()}for(var r=new Uint8Array(n.length),o=0;o<r.length;o++)r[o]=n.charCodeAt(o);return I.some(new Blob([r],{type:e}))},Qv=function(e){return 0===e.indexOf("blob:")?function(e){return new Vr(function(t,n){var r=function(){n("Cannot convert "+e+" to Blob. Resource might not exist or is inaccessible.")};try{var o=new XMLHttpRequest;o.open("GET",e,!0),o.responseType="blob",o.onload=function(){200===o.status?t(o.response):r()},o.onerror=r,o.send()}catch(i){r()}})}(e):0===e.indexOf("data:")?(t=e,new Vr(function(e){var n=Gv(t),r=n.type,o=n.data;Jv(r,o).fold(function(){return e(new Blob([]))},e)})):null;var t},Zv=0,eb=function(e){return(e||"blobid")+Zv++},tb=function(e,t,n,r){var o,i;if(0!==t.src.indexOf("blob:")){var a=Gv(t.src),u=a.data,c=a.type;o=u,(i=e.getByData(o,c))?n({image:t,blobInfo:i}):Qv(t.src).then(function(r){i=e.create(eb(),r,o),e.add(i),n({image:t,blobInfo:i})},function(e){r(e)})}else(i=e.getByUri(t.src))?n({image:t,blobInfo:i}):Qv(t.src).then(function(r){(function(e){return new Vr(function(t){var n=new FileReader;n.onloadend=function(){t(n.result)},n.readAsDataURL(e)})})(r).then(function(a){o=Gv(a).data,i=e.create(eb(),r,o),e.add(i),n({image:t,blobInfo:i})})},function(e){r(e)})},nb=function(e,t){var n={};return{findAll:function(r,o){o||(o=O);var i=K(function(e){return e?ue(e.getElementsByTagName("img")):[]}(r),function(t){var n=t.src;return!!lt.fileApi&&!t.hasAttribute("data-mce-bogus")&&!t.hasAttribute("data-mce-placeholder")&&!(!n||n===lt.transparentSrc)&&(0===n.indexOf("blob:")?!e.isUploaded(n)&&o(t):0===n.indexOf("data:")&&o(t))}),a=V(i,function(e){if(void 0!==n[e.src])return new Vr(function(t){n[e.src].then(function(n){if("string"==typeof n)return n;t({image:e,blobInfo:n.blobInfo})})});var r=new Vr(function(n,r){tb(t,e,n,r)}).then(function(e){return delete n[e.image.src],e}).catch(function(t){return delete n[e.src],t});return n[e.src]=r,r});return Vr.all(a)}}},rb=function(e,t){return e.replace(t.re,function(e){return be(t.uris,e).getOr(e)})},ob=function(e,t,n,r){(e.padd_empty_with_br||t.insert)&&n[r.name]?r.empty().append(new xm("br",1)).shortEnded=!0:r.empty().append(new xm("#text",3)).value=" "},ib=function(e,t){return e&&e.firstChild&&e.firstChild===e.lastChild&&e.firstChild.name===t},ab=function(e,t,n,r){return r.isEmpty(t,n,function(t){return function(e,t){var n=e.getElementRule(t.name);return n&&n.paddEmpty}(e,t)})},ub=function(e,t){var n=t.blob_cache,r=function(e){var r,o,i=e.attr("src");(function(e){return e.attr("src")===lt.transparentSrc||b(e.attr("data-mce-placeholder"))})(e)||function(e){return b(e.attr("data-mce-bogus"))}(e)||(r=i,o=/data:([^;]+);base64,([a-z0-9\+\/=\s]+)/i.exec(r),o?I.some({type:o[1],data:decodeURIComponent(o[2])}):I.none()).filter(function(){return function(e,t){if(t.images_dataimg_filter){var n=new Image;return n.src=e.attr("src"),le(e.attributes.map,function(e,t){n.setAttribute(t,e)}),t.images_dataimg_filter(n)}return!0}(e,t)}).bind(function(e){var t=e.type,r=e.data;return I.from(n.getByData(r,t)).orThunk(function(){return Jv(t,r).map(function(e){var t=n.create(eb(),e,r);return n.add(t),t})})}).each(function(t){e.attr("src",t.blobUri())})};n&&e.addAttributeFilter("src",function(e){return q(e,r)})},cb=ht.each,sb=ht.trim,fb="source protocol authority userInfo user password host port relative path directory file query anchor".split(" "),lb={ftp:21,http:80,https:443,mailto:25},db=["img","video"],mb=function(e,t,n){return!e.allow_html_data_urls&&(/^data:image\//i.test(t)?function(e,t){return b(e)?!e:!b(t)||!H(db,t)}(e.allow_svg_data_urls,n)&&/^data:image\/svg\+xml/i.test(t):/^data:/i.test(t))},gb=function(){function e(t,n){t=sb(t),this.settings=n||{};var r=this.settings.base_uri,o=this;if(/^([\w\-]+):([^\/]{2})/i.test(t)||/^\s*#/.test(t))o.source=t;else{var i=0===t.indexOf("//");if(0!==t.indexOf("/")||i||(t=(r&&r.protocol||"http")+"://mce_host"+t),!/^[\w\-]*:?\/\//.test(t)){var a=this.settings.base_uri?this.settings.base_uri.path:new e(document.location.href).directory;if(this.settings.base_uri&&""==this.settings.base_uri.protocol)t="//mce_host"+o.toAbsPath(a,t);else{var u=/([^#?]*)([#?]?.*)/.exec(t);t=(r&&r.protocol||"http")+"://mce_host"+o.toAbsPath(a,u[1])+u[2]}}t=t.replace(/@@/g,"(mce_at)");var c=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@\/]*):?([^:@\/]*))?@)?(\[[a-zA-Z0-9:.%]+\]|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(t);cb(fb,function(e,t){var n=c[t];n&&(n=n.replace(/\(mce_at\)/g,"@@")),o[e]=n}),r&&(o.protocol||(o.protocol=r.protocol),o.userInfo||(o.userInfo=r.userInfo),o.port||"mce_host"!==o.host||(o.port=r.port),o.host&&"mce_host"!==o.host||(o.host=r.host),o.source=""),i&&(o.protocol="")}}return e.parseDataUri=function(e){var t,n=decodeURIComponent(e).split(","),r=/data:([^;]+)/.exec(n[0]);return r&&(t=r[1]),{type:t,data:n[1]}},e.isDomSafe=function(e,t,n){if(void 0===n&&(n={}),n.allow_script_urls)return!0;var r=ui.decode(e).replace(/[\s\u0000-\u001F]+/g,"");try{r=decodeURIComponent(r)}catch(o){r=unescape(r)}return!/((java|vb)script|mhtml):/i.test(r)&&!mb(n,r,t)},e.getDocumentBaseUrl=function(e){var t;return t=0!==e.protocol.indexOf("http")&&"file:"!==e.protocol?e.href:e.protocol+"//"+e.host+e.pathname,/^[^:]+:\/\/\/?[^\/]+\//.test(t)&&(t=t.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,""),/[\/\\]$/.test(t)||(t+="/")),t},e.prototype.setPath=function(e){var t=/^(.*?)\/?(\w+)?$/.exec(e);this.path=t[0],this.directory=t[1],this.file=t[2],this.source="",this.getURI()},e.prototype.toRelative=function(t){var n;if("./"===t)return t;var r=new e(t,{base_uri:this});if("mce_host"!==r.host&&this.host!==r.host&&r.host||this.port!==r.port||this.protocol!==r.protocol&&""!==r.protocol)return r.getURI();var o=this.getURI(),i=r.getURI();return o===i||"/"===o.charAt(o.length-1)&&o.substr(0,o.length-1)===i?o:(n=this.toRelPath(this.path,r.path),r.query&&(n+="?"+r.query),r.anchor&&(n+="#"+r.anchor),n)},e.prototype.toAbsolute=function(t,n){var r=new e(t,{base_uri:this});return r.getURI(n&&this.isSameOrigin(r))},e.prototype.isSameOrigin=function(e){if(this.host==e.host&&this.protocol==e.protocol){if(this.port==e.port)return!0;var t=lb[this.protocol];if(t&&(this.port||t)==(e.port||t))return!0}return!1},e.prototype.toRelPath=function(e,t){var n,r,o=0,i="",a=e.substring(0,e.lastIndexOf("/")).split("/"),u=t.split("/");if(a.length>=u.length)for(n=0,r=a.length;n<r;n++)if(n>=u.length||a[n]!==u[n]){o=n+1;break}if(a.length<u.length)for(n=0,r=u.length;n<r;n++)if(n>=a.length||a[n]!==u[n]){o=n+1;break}if(1===o)return t;for(n=0,r=a.length-(o-1);n<r;n++)i+="../";
90for(n=o-1,r=u.length;n<r;n++)i+=n!==o-1?"/"+u[n]:u[n];return i},e.prototype.toAbsPath=function(e,t){var n,r,o=0,i=[],a=/\/$/.test(t)?"/":"",u=e.split("/"),c=t.split("/");for(cb(u,function(e){e&&i.push(e)}),u=i,n=c.length-1,i=[];n>=0;n--)0!==c[n].length&&"."!==c[n]&&(".."!==c[n]?o>0?o--:i.push(c[n]):o++);return 0!==(r=(n=u.length-o)<=0?te(i).join("/"):u.slice(0,n).join("/")+"/"+te(i).join("/")).indexOf("/")&&(r="/"+r),a&&r.lastIndexOf("/")!==r.length-1&&(r+=a),r},e.prototype.getURI=function(e){var t;return void 0===e&&(e=!1),this.source&&!e||(t="",e||(this.protocol?t+=this.protocol+"://":t+="//",this.userInfo&&(t+=this.userInfo+"@"),this.host&&(t+=this.host),this.port&&(t+=":"+this.port)),this.path&&(t+=this.path),this.query&&(t+="?"+this.query),this.anchor&&(t+="#"+this.anchor),this.source=t),this.source},e}(),pb=ht.makeMap("button,fieldset,form,iframe,img,image,input,object,output,select,textarea"),hb=Te(function(){return document.implementation.createHTMLDocument("parser")}),vb=function(e,t,n){for(var r=/<([!?\/])?([A-Za-z0-9\-_:.]+)/g,o=/(?:\s(?:[^'">]+(?:"[^"]*"|'[^']*'))*[^"'>]*(?:"[^">]*|'[^'>]*)?|\s*|\/)>/g,i=e.getShortEndedElements(),a=1,u=n;0!==a;)for(r.lastIndex=u;;){var c=r.exec(t);if(null===c)return u;if("!"===c[1]){u=Me(c[2],"--")?bb(t,!1,c.index+"!--".length):bb(t,!0,c.index+1);break}o.lastIndex=r.lastIndex;var s=o.exec(t);if(!g(s)&&s.index===r.lastIndex){"/"===c[1]?a-=1:ye(i,c[2])||(a+=1),u=r.lastIndex+s[0].length;break}}return u},bb=function(e,t,n){void 0===n&&(n=0);var r=e.toLowerCase();if(-1!==r.indexOf("[if ",n)&&function(e,t){return/^\s*\[if [\w\W]+\]>.*<!\[endif\](--!?)?>/.test(e.substr(t))}(r,n)){var o=r.indexOf("[endif]",n);return r.indexOf(">",o)}if(t){var i=r.indexOf(">",n);return-1!==i?i:r.length}var a=/--!?>/g;a.lastIndex=n;var u=a.exec(e);return u?u.index+u[0].length:r.length},yb=function(e,t){var n=e.exec(t);if(n){var r=n[1],o=n[2];return"string"==typeof r&&"data-mce-bogus"===r.toLowerCase()?o:null}return null},Cb=function(e,t){void 0===t&&(t=yi()),e=e||{};var n=hb(),r=n.createElement("form");!1!==e.fix_self_closing&&(e.fix_self_closing=!0);var o=e.comment?e.comment:w,i=e.cdata?e.cdata:w,a=e.text?e.text:w,u=e.start?e.start:w,c=e.end?e.end:w,s=e.pi?e.pi:w,f=e.doctype?e.doctype:w,l=function(l,d){void 0===d&&(d="html");for(var m,g,p,h,v,b,y,C,w,x,S,N,E,k,_,A,R,D,T,O=l.html,B=0,P=[],L=0,I=ui.decode,M=ht.makeMap("src,href,data,background,action,formaction,poster,xlink:href"),F="html"===d?0:1,U=function(e){var t,n;for(t=P.length;t--&&P[t].name!==e;);if(t>=0){for(n=P.length-1;n>=t;n--)(e=P[n]).valid&&c(e.name);P.length=t}},z=function(e,t){return a(rb(e,l),t)},H=function(t){""!==t&&(">"===t.charAt(0)&&(t=" "+t),e.allow_conditional_comments||"[if"!==t.substr(0,3).toLowerCase()||(t=" "+t),o(rb(t,l)))},j=function(e,t){var n=e||"",r=!Me(n,"--"),o=bb(O,r,t);return e=O.substr(t,o-t),H(r?n+e:e),o+1},V=function(t,o,i,a,u){if(i=function(e){return rb(e,l)}((o=o.toLowerCase())in X?o:I(i||a||u||"")),Y&&!C&&!1===function(e){return 0===e.indexOf("data-")||0===e.indexOf("aria-")}(o)){var c=k[o];if(!c&&_){for(var s=_.length;s--&&!(c=_[s]).pattern.test(o););-1===s&&(c=null)}if(!c)return;if(c.validValues&&!(i in c.validValues))return}("name"===o||"id"===o)&&t in pb&&(i in n||i in r)||M[o]&&!gb.isDomSafe(i,t,e)||C&&(o in M||0===o.indexOf("on"))||(h.map[o]=i,h.push({name:o,value:i}))},q=new RegExp("<(?:(?:!--([\\w\\W]*?)--!?>)|(?:!\\[CDATA\\[([\\w\\W]*?)\\]\\]>)|(?:![Dd][Oo][Cc][Tt][Yy][Pp][Ee]([\\w\\W]*?)>)|(?:!(--)?)|(?:\\?([^\\s\\/<>]+) ?([\\w\\W]*?)[?/]>)|(?:\\/([A-Za-z][A-Za-z0-9\\-_\\:\\.]*)>)|(?:([A-Za-z][A-Za-z0-9\\-_:.]*)(\\s(?:[^'\">]+(?:\"[^\"]*\"|'[^']*'))*[^\"'>]*(?:\"[^\">]*|'[^'>]*)?|\\s*|\\/)>))","g"),$=/([\w:\-]+)(?:\s*=\s*(?:(?:\"((?:[^\"])*)\")|(?:\'((?:[^\'])*)\')|([^>
90\s]+)))?/g,W=t.getShortEndedElements(),K=e.self_closing_elements||t.getSelfClosingElements(),X=t.getBoolAttrs(),Y=e.validate,G=e.remove_internals,J=e.fix_self_closing,Q=t.getSpecialElements(),Z=O+">";m=q.exec(Z);){var ee=m[0];if(B<m.index&&z(I(O.substr(B,m.index-B))),g=m[7])":"===(g=g.toLowerCase()).charAt(0)&&(g=g.substr(1)),U(g);else if(g=m[8]){if(m.index+ee.length>O.length){z(I(O.substr(m.index))),B=m.index+ee.length;continue}":"===(g=g.toLowerCase()).charAt(0)&&(g=g.substr(1)),w=g in W,J&&K[g]&&P.length>0&&P[P.length-1].name===g&&U(g);var te=yb($,m[9]);if(null!==te){if("all"===te){B=vb(t,O,q.lastIndex),q.lastIndex=B;continue}S=!1}if(!Y||(x=t.getElementRule(g))){if(S=!0,Y&&(k=x.attributes,_=x.attributePatterns),(E=m[9])?((C=-1!==E.indexOf("data-mce-type"))&&G&&(S=!1),(h=[]).map={},E.replace($,function(e,t,n,r,o){return V(g,t,n,r,o),""})):(h=[]).map={},Y&&!C){if(A=x.attributesRequired,R=x.attributesDefault,D=x.attributesForced,x.removeEmptyAttrs&&!h.length&&(S=!1),D)for(v=D.length;v--;)y=(N=D[v]).name,"{$uid}"===(T=N.value)&&(T="mce_"+L++),h.map[y]=T,h.push({name:y,value:T});if(R)for(v=R.length;v--;)(y=(N=R[v]).name)in h.map||("{$uid}"===(T=N.value)&&(T="mce_"+L++),h.map[y]=T,h.push({name:y,value:T}));if(A){for(v=A.length;v--&&!(A[v]in h.map););-1===v&&(S=!1)}if(N=h.map["data-mce-bogus"]){if("all"===N){B=vb(t,O,q.lastIndex),q.lastIndex=B;continue}S=!1}}S&&u(g,h,w)}else S=!1;if(p=Q[g]){p.lastIndex=B=m.index+ee.length,(m=p.exec(O))?(S&&(b=O.substr(B,m.index-B)),B=m.index+m[0].length):(b=O.substr(B),B=O.length),S&&(b.length>0&&z(b,!0),c(g)),q.lastIndex=B;continue}w||(E&&E.indexOf("/")===E.length-1?S&&c(g):P.push({name:g,valid:S}))}else if(g=m[1])H(g);else if(g=m[2]){if(!(1===F||e.preserve_cdata||P.length>0&&t.isValidChild(P[P.length-1].name,"#cdata"))){B=j("",m.index+2),q.lastIndex=B;continue}i(g)}else if(g=m[3])f(g);else{if((g=m[4])||"<!"===ee){B=j(g,m.index+ee.length),q.lastIndex=B;continue}if(g=m[5]){if(1!==F){B=j("?",m.index+2),q.lastIndex=B;continue}s(g,m[6])}}B=m.index+ee.length}for(B<O.length&&z(I(O.substr(B))),v=P.length-1;v>=0;v--)(g=P[v]).valid&&c(g.name)};return{parse:function(e,t){void 0===t&&(t="html"),l(function(e){for(var t,n=/data:[^;<"'\s]+;base64,([a-z0-9\+\/=\s]+)/gi,r=[],o={},i=Fu("img"),a=0,u=0;t=n.exec(e);){var c=t[0],s=i+"_"+u++;o[s]=c,a<t.index&&r.push(e.substr(a,t.index-a)),r.push(s),a=t.index+c.length}var f=new RegExp(i+"_[0-9]+","g");return 0===a?{prefix:i,uris:o,html:e,re:f}:(a<e.length&&r.push(e.substr(a)),{prefix:i,uris:o,html:r.join(""),re:f})}(e),t)}}};Cb.findEndTag=vb;var wb,xb,Sb=ht.makeMap,Nb=ht.each,Eb=ht.explode,kb=ht.extend,_b=function(e,t){void 0===t&&(t=yi());var n={},r=[],o={},i={};(e=e||{}).validate=!("validate"in e)||e.validate,e.root_name=e.root_name||"body";var a=function(e){var t=e.name;t in n&&((u=o[t])?u.push(e):o[t]=[e]);for(var a=r.length;a--;){var u,c=r[a].name;if(c in e.attributes.map)(u=i[c])?u.push(e):i[c]=[e]}return e},u={schema:t,addAttributeFilter:function(e,t){Nb(Eb(e),function(e){var n;for(n=0;n<r.length;n++)if(r[n].name===e)return void r[n].callbacks.push(t);r.push({name:e,callbacks:[t]})})},getAttributeFilters:function(){return[].concat(r)},addNodeFilter:function(e,t){Nb(Eb(e),function(e){var r=n[e];r||(n[e]=r=[]),r.push(t)})},getNodeFilters:function(){var e=[];for(var t in n)ye(n,t)&&e.push({name:t,callbacks:n[t]});return e},filterNode:a,parse:function(u,c){var s,f,l,d,m,g,p,h,v=[];c=c||{},o={},i={};var y=kb(Sb("script,style,head,html,body,title,meta,param"),t.getBlockElements()),C=vi(t),w=t.getNonEmptyElements(),x=t.children,S=e.validate,N=function(e){return!1===e?"":!0===e?"p":e}("forced_root_block"in c?c.forced_root_block:e.forced_root_block),E=t.getWhiteSpaceElements(),k=/^[ \t\r\n]+/,_=/[ \t\r\n]+$/,A=/[ \t\r\n]+/g,R=/^[ \t\r\n]+$/,D=ye(E,c.context)||ye(E,e.root_name),T=function(e,t){var r,i=new xm(e,t);return e in n&&((r=o[e])?r.push(i):o[e]=[i]),i},O=function(e){for(var n=t.getBlockElements(),r=e.prev;r&&3===r.type;){var o=r.value.replace(_,"");if(o.length>0)return void(r.value=o);var i=r.next;if(i){if(3===i.type&&i.value.length){r=r.prev;continue}if(!n[i.name]&&"script"!==i.name&&"style"!==i.name){r=r.prev;continue}}var a=r.prev;r.remove(),r=a}},B=Cb({validate:S,document:e.document,allow_html_data_urls:e.allow_html_data_urls,allow_svg_data_urls:e.allow_svg_data_urls,allow_script_urls:e.allow_script_urls,allow_conditional_comments:e.allow_conditional_comments,preserve_cdata:e.preserve_cdata,self_closing_elements:function(e){var t={};for(var n in e)"li"!==n&&"p"!==n&&(t[n]=e[n]);return t}(t.getSelfClosingElements()),cdata:function(e){h.append(T("#cdata",4)).value=e},text:function(e,t){var n;D||(e=e.replace(A," "),function(e,t){return e&&(ye(t,e.name)||"br"===e.name)}(h.lastChild,y)&&(e=e.replace(k,""))),0!==e.length&&((n=T("#text",3)).raw=!!t,h.append(n).value=e)},comment:function(e){h.append(T("#comment",8)).value=e},pi:function(e,t){h.append(T(e,7)).value=t,O(h)},doctype:function(e){h.append(T("#doctype",10)).value=e,O(h)},start:function(e,n,o){var a=S?t.getElementRule(e):{};if(a){var u=T(a.outputName||e,1);u.attributes=n,u.shortEnded=o,h.append(u);var c=x[h.name];c&&x[u.name]&&!c[u.name]&&v.push(u);for(var s=r.length;s--;){var f=r[s].name;f in n.map&&((g=i[f])?g.push(u):i[f]=[u])}y[e]&&O(u),o||(h=u),!D&&E[e]&&(D=!0)}},end:function(n){var r,o,i,a=S?t.getElementRule(n):{};if(a){if(y[n]&&!D){if((r=h.firstChild)&&3===r.type)if((o=r.value.replace(k,"")).length>0)r.value=o,r=r.next;else for(i=r.next,r.remove(),r=i;r&&3===r.type;)o=r.value,i=r.next,(0===o.length||R.test(o))&&(r.remove(),r=i),r=i;if((r=h.lastChild)&&3===r.type)if((o=r.value.replace(_,"")).length>0)r.value=o,r=r.prev;else for(i=r.prev,r.remove(),r=i;r&&3===r.type;)o=r.value,i=r.prev,(0===o.length||R.test(o))&&(r.remove(),r=i),r=i}D&&E[n]&&(D=!1);var u=ab(t,w,E,h),s=h.parent;a.paddInEmptyBlock&&u&&function(e){for(var n=e;b(n);){if(n.name in C)return ab(t,w,E,n);n=n.parent}return!1}(h)?ob(e,c,y,h):a.removeEmpty&&u?y[h.name]?h.empty().remove():h.unwrap():a.paddEmpty&&(function(e){return ib(e,"#text")&&" "===e.firstChild.value}(h)||u)&&ob(e,c,y,h),h=s}}},t),P=h=new xm(c.context||e.root_name,11);if(B.parse(u,c.format),S&&v.length&&(c.context?c.invalid=!0:function(e){for(var n=Sb("tr,td,th,tbody,thead,tfoot,table"),r=t.getNonEmptyElements(),o=t.getWhiteSpaceElements(),i=t.getTextBlockElements(),u=t.getSpecialElements(),c=function(e,n){if(void 0===n&&(n=e.parent),u[e.name])e.empty().remove();else{for(var r=0,o=e.children();r<o.length;r++){var i=o[r];t.isValidChild(n.name,i.name)||c(i,n)}e.unwrap()}},s=0;s<e.length;s++){var f=e[s],l=void 0,d=void 0,m=void 0;if(f.parent&&!f.fixed)if(i[f.name]&&"li"===f.parent.name){for(var g=f.next;g&&i[g.name];)g.name="li",g.fixed=!0,f.parent.insert(g,f.parent),g=g.next;f.unwrap()}else{var p=[f];for(l=f.parent;l&&!t.isValidChild(l.name,f.name)&&!n[l.name];l=l.parent)p.push(l);if(l&&p.length>1)if(t.isValidChild(l.name,f.name)){p.reverse();for(var h=d=a(p[0].clone()),v=0;v<p.length-1;v++){t.isValidChild(h.name,p[v].name)?(m=a(p[v].clone()),h.append(m)):m=h;for(var b=p[v].firstChild;b&&b!==p[v+1];){var y=b.next;
90m.append(b),b=y}h=m}ab(t,r,o,d)?l.insert(f,p[0],!0):(l.insert(d,p[0],!0),l.insert(f,d)),l=p[0],(ab(t,r,o,l)||ib(l,"br"))&&l.empty().remove()}else c(f);else if(f.parent){if("li"===f.name){if((g=f.prev)&&("ul"===g.name||"ol"===g.name)){g.append(f);continue}if((g=f.next)&&("ul"===g.name||"ol"===g.name)){g.insert(f,g.firstChild,!0);continue}f.wrap(a(new xm("ul",1)));continue}t.isValidChild(f.parent.name,"div")&&t.isValidChild("div",f.name)?f.wrap(a(new xm("div",1))):c(f)}}}}(v)),N&&("body"===P.name||c.isRootContent)&&function(){var n=P.firstChild,r=null,o=function(e){e&&((n=e.firstChild)&&3===n.type&&(n.value=n.value.replace(k,"")),(n=e.lastChild)&&3===n.type&&(n.value=n.value.replace(_,"")))};if(t.isValidChild(P.name,N.toLowerCase())){for(;n;){var i=n.next;3===n.type||1===n.type&&"p"!==n.name&&!y[n.name]&&!n.attr("data-mce-type")?r?r.append(n):((r=T(N,1)).attr(e.forced_root_block_attrs),P.insert(r,n),r.append(n)):(o(r),r=null),n=i}o(r)}}(),!c.invalid){for(p in o)if(ye(o,p)){for(g=n[p],d=(s=o[p]).length;d--;)s[d].parent||s.splice(d,1);for(f=0,l=g.length;f<l;f++)g[f](s,p,c)}for(f=0,l=r.length;f<l;f++)if((g=r[f]).name in i){for(d=(s=i[g.name]).length;d--;)s[d].parent||s.splice(d,1);for(d=0,m=g.callbacks.length;d<m;d++)g.callbacks[d](s,g.name,c)}}return P}};return function(e,t){var n=e.schema;t.remove_trailing_brs&&e.addNodeFilter("br",function(e,r,o){var i,a,u,c,s,f,l,d,m=e.length,g=ht.extend({},n.getBlockElements()),p=n.getNonEmptyElements(),h=n.getWhiteSpaceElements();for(g.body=1,i=0;i<m;i++)if(u=(a=e[i]).parent,g[a.parent.name]&&a===u.lastChild){for(s=a.prev;s;){if("span"!==(f=s.name)||"bookmark"!==s.attr("data-mce-type")){"br"===f&&(a=null);break}s=s.prev}a&&(a.remove(),ab(n,p,h,u)&&(l=n.getElementRule(u.name))&&(l.removeEmpty?u.remove():l.paddEmpty&&ob(t,o,g,u)))}else{for(c=a;u&&u.firstChild===c&&u.lastChild===c&&(c=u,!g[u.name]);)u=u.parent;c===u&&!0!==t.padd_empty_with_br&&((d=new xm("#text",3)).value=" ",a.replace(d))}}),e.addAttributeFilter("href",function(e){var n,r,o=e.length;if(!t.allow_unsafe_link_target)for(;o--;){var i=e[o];"a"===i.name&&"_blank"===i.attr("target")&&i.attr("rel",(n=i.attr("rel"),r=void 0,r=n?ht.trim(n):"",/\b(noopener)\b/g.test(r)?r:function(e){return e.split(" ").filter(function(e){return e.length>0}).concat(["noopener"]).sort().join(" ")}(r)))}}),t.allow_html_in_named_anchor||e.addAttributeFilter("id,name",function(e){for(var t,n,r,o,i=e.length;i--;)if("a"===(o=e[i]).name&&o.firstChild&&!o.attr("href")){r=o.parent,t=o.lastChild;do{n=t.prev,r.insert(t,o),t=n}while(t)}}),t.fix_list_elements&&e.addNodeFilter("ul,ol",function(e){for(var t,n,r=e.length;r--;)if("ul"===(n=(t=e[r]).parent).name||"ol"===n.name)if(t.prev&&"li"===t.prev.name)t.prev.append(t);else{var o=new xm("li",1);o.attr("style","list-style-type: none"),t.wrap(o)}}),t.validate&&n.getValidClasses()&&e.addAttributeFilter("class",function(e){for(var t=n.getValidClasses(),r=e.length;r--;){for(var o=e[r],i=o.attr("class").split(" "),a="",u=0;u<i.length;u++){var c=i[u],s=!1,f=t["*"];f&&f[c]&&(s=!0),f=t[o.name],!s&&f&&f[c]&&(s=!0),s&&(a&&(a+=" "),a+=c)}a.length||(a=null),o.attr("class",a)}}),ub(e,t)}(u,e),function(e,t){t.inline_styles&&Yv(e,t)}(u,e),u},Ab=function(e,t,n){return function(e,t){return e&&e.hasEventListeners("PreProcess")&&!t.no_events}(e,n)?function(e,t,n){var r,o=e.dom,i=t.cloneNode(!0),a=document.implementation;if(a.createHTMLDocument){var u=a.createHTMLDocument("");ht.each("BODY"===i.nodeName?i.childNodes:[i],function(e){u.body.appendChild(u.importNode(e,!0))}),i="BODY"!==i.nodeName?u.body.firstChild:u.body,r=o.doc,o.doc=u}return function(e,t){e.fire("PreProcess",t)}(e,Re(Re({},n),{node:i})),r&&(o.doc=r),i}(e,t,n):t},Rb=function(e,t,n){-1===ht.inArray(t,n)&&(e.addAttributeFilter(n,function(e,t){for(var n=e.length;n--;)e[n].attr(t,null)}),t.push(n))},Db=function(e,t,n,r,o){return function(e,t,n){return!t.no_events&&e?function(e,t){return e.fire("PostProcess",t)}(e,Re(Re({},t),{content:n})).content:n}(e,o,function(e,t,n){return jm(e,t).serialize(n)}(t,n,r))},Tb=function(e,t){var n=["data-mce-selected"],r=t&&t.dom?t.dom:uu.DOM,o=t&&t.schema?t.sc
90hema:yi(e);e.entity_encoding=e.entity_encoding||"named",e.remove_trailing_brs=!("remove_trailing_brs"in e)||e.remove_trailing_brs;var i=_b(e,o);!function(e,t,n){e.addAttributeFilter("data-mce-tabindex",function(e,t){for(var n=e.length;n--;){var r=e[n];r.attr("tabindex",r.attr("data-mce-tabindex")),r.attr(t,null)}}),e.addAttributeFilter("src,href,style",function(e,r){for(var o="data-mce-"+r,i=t.url_converter,a=t.url_converter_scope,u=e.length;u--;){var c=e[u],s=c.attr(o);void 0!==s?(c.attr(r,s.length>0?s:null),c.attr(o,null)):(s=c.attr(r),"style"===r?s=n.serializeStyle(n.parseStyle(s),c.name):i&&(s=i.call(a,s,r,c.name)),c.attr(r,s.length>0?s:null))}}),e.addAttributeFilter("class",function(e){for(var t=e.length;t--;){var n=e[t],r=n.attr("class");r&&(r=n.attr("class").replace(/(?:^|\s)mce-item-\w+(?!\S)/g,""),n.attr("class",r.length>0?r:null))}}),e.addAttributeFilter("data-mce-type",function(e,t,n){for(var r=e.length;r--;){var o=e[r];"bookmark"!==o.attr("data-mce-type")||n.cleanup||(I.from(o.firstChild).exists(function(e){return!so(e.value)})?o.unwrap():o.remove())}}),e.addNodeFilter("noscript",function(e){for(var t=e.length;t--;){var n=e[t].firstChild;n&&(n.value=ui.decode(n.value))}}),e.addNodeFilter("script,style",function(e,n){for(var r=function(e){return e.replace(/(<!--\[CDATA\[|\]\]-->)/g,"\n").replace(/^[\r\n]*|[\r\n]*$/g,"").replace(/^\s*((<!--)?(\s*\/\/)?\s*<!\[CDATA\[|(<!--\s*)?\/\*\s*<!\[CDATA\[\s*\*\/|(\/\/)?\s*<!--|\/\*\s*<!--\s*\*\/)\s*[\r\n]*/gi,"").replace(/\s*(\/\*\s*\]\]>\s*\*\/(-->)?|\s*\/\/\s*\]\]>(-->)?|\/\/\s*(-->)?|\]\]>|\/\*\s*-->\s*\*\/|\s*-->\s*)\s*$/g,"")},o=e.length;o--;){var i=e[o],a=i.firstChild?i.firstChild.value:"";if("script"===n){var u=i.attr("type");u&&i.attr("type","mce-no/type"===u?null:u.replace(/^mce\-/,"")),"xhtml"===t.element_format&&a.length>0&&(i.firstChild.value="// <![CDATA[\n"+r(a)+"\n// ]]>")}else"xhtml"===t.element_format&&a.length>0&&(i.firstChild.value="\x3c!--\n"+r(a)+"\n--\x3e")}}),e.addNodeFilter("#comment",function(e){for(var r=e.length;r--;){var o=e[r];t.preserve_cdata&&0===o.value.indexOf("[CDATA[")?(o.name="#cdata",o.type=4,o.value=n.decode(o.value.replace(/^\[CDATA\[|\]\]$/g,""))):0===o.value.indexOf("mce:protected ")&&(o.name="#text",o.type=3,o.raw=!0,o.value=unescape(o.value).substr(14))}}),e.addNodeFilter("xml:namespace,input",function(e,t){for(var n=e.length;n--;){var r=e[n];7===r.type?r.remove():1===r.type&&("input"!==t||r.attr("type")||r.attr("type","text"))}}),e.addAttributeFilter("data-mce-type",function(t){q(t,function(t){"format-caret"===t.attr("data-mce-type")&&(t.isEmpty(e.schema.getNonEmptyElements())?t.remove():t.unwrap())})}),e.addAttributeFilter("data-mce-src,data-mce-href,data-mce-style,data-mce-selected,data-mce-expando,data-mce-type,data-mce-resize,data-mce-placeholder",function(e,t){for(var n=e.length;n--;)e[n].attr(t,null)})}(i,e,r);return{schema:o,addNodeFilter:i.addNodeFilter,addAttributeFilter:i.addAttributeFilter,serialize:function(n,a){void 0===a&&(a={});var u=Re({format:"html"},a),c=Ab(t,n,u),s=function(e,t,n){var r=fo(n.getInner?t.innerHTML:e.getOuterHTML(t));return n.selection||uo(bt.fromDom(t))?r:ht.trim(r)}(r,c,u),f=function(e,t,n){var r=n.selection?Re({forced_root_block:!1},n):n,o=e.parse(t,r);return function(e){var t=function(e){return e&&"br"===e.name},n=e.lastChild;if(t(n)){var r=n.prev;t(r)&&(n.remove(),r.remove())}}(o),o}(i,s,u);return"tree"===u.format?f:Db(t,e,o,f,u)},addRules:o.addValidElements,setRules:o.setValidElements,addTempAttr:_(Rb,i,n),getTempAttrs:N(n),getNodeFilters:i.getNodeFilters,getAttributeFilters:i.getAttributeFilters}},Ob=function(e,t){var n=Tb(e,t);return{schema:n.schema,addNodeFilter:n.addNodeFilter,addAttributeFilter:n.addAttributeFilter,serialize:n.serialize,addRules:n.addRules,setRules:n.setRules,addTempAttr:n.addTempAttr,getTempAttrs:n.getTempAttrs,getNodeFilters:n.getNodeFilters,getAttributeFilters:n.getAttributeFilters}},Bb=function(e,t){return void 0===t&&(t={}),function(e,t,n){return Fv(e).editor.getContent(t,n)}(e,t,t.format?t.format:"html")},Pb=function(e,t,n){return void 0===n&&(n={}),function(e,t,n){return Fv(e).editor.setContent(t,n)}
90(e,t,n)},Lb=uu.DOM,Ib=function(e){return I.from(e).each(function(e){return e.destroy()})},Mb=function(e){if(!e.removed){var t=e._selectionOverrides,n=e.editorUpload,r=e.getBody(),o=e.getElement();r&&e.save({is_removing:!0}),e.removed=!0,e.unbindAllNativeEvents(),e.hasHiddenInput&&o&&Lb.remove(o.nextSibling),function(e){e.fire("remove")}(e),e.editorManager.remove(e),!e.inline&&r&&function(e){Lb.setStyle(e.id,"display",e.orgDisplay)}(e),function(e){e.fire("detach")}(e),Lb.remove(e.getContainer()),Ib(t),Ib(n),e.destroy()}},Fb=function(e,t){var n=e.selection,r=e.dom;e.destroyed||(t||e.removed?(t||(e.editorManager.off("beforeunload",e._beforeUnload),e.theme&&e.theme.destroy&&e.theme.destroy(),Ib(n),Ib(r)),function(e){var t=e.formElement;t&&(t._mceOldSubmit&&(t.submit=t._mceOldSubmit,t._mceOldSubmit=null),Lb.unbind(t,"submit reset",e.formEventDelegate))}(e),function(e){e.contentAreaContainer=e.formElement=e.container=e.editorContainer=null,e.bodyElement=e.contentDocument=e.contentWindow=null,e.iframeElement=e.targetElm=null,e.selection&&(e.selection=e.selection.win=e.selection.dom=e.selection.dom.doc=null)}(e),e.destroyed=!0):e.remove())},Ub=(wb=function(e,t){return d(e)&&d(t)?Ub(e,t):t},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(0===e.length)throw new Error("Can't merge zero objects");for(var n={},r=0;r<e.length;r++){var o=e[r];for(var i in o)ye(o,i)&&(n[i]=wb(n[i],o[i]))}return n}),zb="autoresize_on_init,content_editable_state,convert_fonts_to_spans,inline_styles,padd_empty_with_br,block_elements,boolean_attributes,editor_deselector,editor_selector,elements,file_browser_callback_types,filepicker_validator_handler,force_hex_style_colors,force_p_newlines,gecko_spellcheck,images_dataimg_filter,media_scripts,mode,move_caret_before_on_enter_elements,non_empty_elements,self_closing_elements,short_ended_elements,special,spellchecker_select_languages,spellchecker_whitelist,tab_focus,table_responsive_width,text_block_elements,text_inline_elements,toolbar_drawer,types,validate,whitespace_elements,paste_word_valid_elements,paste_retain_style_properties,paste_convert_word_fake_lists".split(","),Hb="bbcode,colorpicker,contextmenu,fullpage,legacyoutput,spellchecker,textcolor".split(","),jb="imagetools,toc".split(","),Vb=function(e){var t=K(zb,function(t){return ye(e,t)}),n=e.forced_root_block;return!1!==n&&""!==n||t.push("forced_root_block (false only)"),re(t)},qb=function(e){var t=ht.makeMap(e.plugins," "),n=function(e){return ye(t,e)},r=De(De([],K(Hb,n),!0),Z(jb,function(e){return n(e)?[e+" (moving to premium)"]:[]}),!0);return re(r)},$b=nt().deviceType,Wb=$b.isTouch(),Kb=$b.isPhone(),Xb=$b.isTablet(),Yb=["lists","autolink","autosave"],Gb={table_grid:!1,object_resizing:!1,resize:!1},Jb=function(e){var t=m(e)?e.join(" "):e,n=V(l(t)?t.split(" "):[],Ue);return K(n,function(e){return e.length>0})},Qb=function(e,t){var n,r,o=(r={},pe(t,function(t,n){return H(e,n)},ge(n={}),ge(r)),{t:n,f:r});return function(e,t){return{sections:N(e),settings:N(t)}}(o.t,o.f)},Zb=function(e,t){return ye(e.sections(),t)},ey=function(e,t){return be(e,"toolbar_mode").orThunk(function(){return be(e,"toolbar_drawer").map(function(e){return!1===e?"wrap":e})}).getOr(t)},ty=function(e,t){var n={resize:!1,toolbar_mode:ey(e,"scrolling"),toolbar_sticky:!1};return Re(Re(Re({},Gb),n),t?{menubar:!1}:{})},ny=function(e,t){var n=t.external_plugins?t.external_plugins:{};return e&&e.external_plugins?ht.extend({},e.external_plugins,n):n},ry=function(e,t,n,r){return e&&function(e,t,n){var r=e.sections();return Zb(e,t)&&r[t].theme===n}(t,"mobile","mobile")?K(r,_(H,Yb)):e&&Zb(t,"mobile")?r:n},oy=function(e,t,n,r){var o=Jb(n.forced_plugins),i=Jb(r.plugins),a=function(e,t){return Zb(e,t)?e.sections()[t]:{}}(t,"mobile"),u=a.plugins?Jb(a.plugins):i,c=function(e,t){return[].concat(Jb(e)).concat(Jb(t))}(o,ry(e,t,i,u));if(lt.browser.isIE()&&H(c,"rtc"))throw new Error("RTC plugin is not supported on IE 11.");return ht.extend(r,{plugins:c.join(" ")})},iy=function(e,t,n,r,o){var i=e?{mobile:ty(o.mobile||{},t)}:{},a=Qb(["mobile"],Ub(i,o)),u=ht.extend(n,r,a.settings(),function(e,t){return e&&Zb(t,"mobile")}(e,a)?function(e,t,n){void 0===n&&(n={});var r=e.sections(),o=be(r,t).getOr({});return ht.extend({},n,o)}(a,"mobile"):{},{validate:!0,external_plugins:ny(r,a.settings())});return oy(e,a,r,u)},ay=function(e,t,n,r,o){var i=function(e,t,n,r,o){var i={id:t,theme:"silver",toolbar_mode:ey(e,"floating"),plugins:"",document_base_url:n,add_form_submit_trigger:!0,submit_patch:!0,add_unload_trigger:!0,convert_urls:!0,relative_urls:!0,remove_script_host:!0,object_resizing:!0,doctype:"<!DOCTYPE html>",visual:!0,font_size_legacy_values:"xx-small,small,medium,large,x-large,xx-large,300%",forced_root_block:"p",hidden_input:!0,inline_styles:!0,convert_fonts_to_spans:!0,indent:!0,indent_before:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,th,ul,ol,li,dl,dt,dd,area,table,thead,tfoot,tbody,tr,section,summary,article,hgroup,aside,f
90igure,figcaption,option,optgroup,datalist",indent_after:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,th,ul,ol,li,dl,dt,dd,area,table,thead,tfoot,tbody,tr,section,summary,article,hgroup,aside,figure,figcaption,option,optgroup,datalist",entity_encoding:"named",url_converter:o.convertURL,url_converter_scope:o};return Re(Re({},i),r?Gb:{})}(o,t,n,Wb,e),a=iy(Kb||Xb,Kb,i,r,o);return!1!==a.deprecation_warnings&&function(e,t){var n=Vb(e),r=qb(t),o=r.length>0,i=n.length>0,a="mobile"===t.theme;if(o||i||a){var u=a?"\n\nThemes:\n- mobile":"",c=o?"\n\nPlugins:\n- "+r.join("\n- "):"",s=i?"\n\nSettings:\n- "+n.join("\n- "):"";console.warn("The following deprecated features are currently enabled, these will be removed in TinyMCE 6.0. See https://www.tiny.cloud/docs/release-notes/6.0-upcoming-changes/ for more information."+u+c+s)}}(o,a),a},uy=function(e,t,n){return I.from(t.settings[n]).filter(e)},cy=function(e,t,n,r){var o,i=t in e.settings?e.settings[t]:n;return"hash"===r?function(e){var t={};return"string"==typeof e?q(e.indexOf("=")>0?e.split(/[;,](?![^=;,]*(?:[;,]|$))/):e.split(","),function(e){var n=e.split("=");n.length>1?t[ht.trim(n[0])]=ht.trim(n[1]):t[ht.trim(n[0])]=ht.trim(n[0])}):t=e,t}(i):"string"===r?uy(l,e,t).getOr(n):"number"===r?uy(C,e,t).getOr(n):"boolean"===r?uy(p,e,t).getOr(n):"object"===r?uy(d,e,t).getOr(n):"array"===r?uy(m,e,t).getOr(n):"string[]"===r?uy((o=l,function(e){return m(e)&&ee(e,o)}),e,t).getOr(n):"function"===r?uy(y,e,t).getOr(n):i},sy=(xb={},{add:function(e,t){xb[e]=t},get:function(e){return xb[e]?xb[e]:{icons:{}}},has:function(e){return ye(xb,e)}}),fy=function(e,t){return t.dom[e]},ly=function(e,t){return parseInt(Xn(t,e),10)},dy=_(fy,"clientWidth"),my=_(fy,"clientHeight"),gy=_(ly,"margin-top"),py=_(ly,"margin-left"),hy=function(e,t,n){var r,o=bt.fromDom(e.getBody()),i=e.inline?o:(r=o,bt.fromDom(Bt(r).dom.documentElement)),a=function(e,t,n,r){var o=function(e){return e.dom.getBoundingClientRect()}(t);return{x:n-(e?o.left+t.dom.clientLeft+py(t):0),y:r-(e?o.top+t.dom.clientTop+gy(t):0)}}(e.inline,i,t,n);return function(e,t,n){var r=dy(e),o=my(e);return t>=0&&n>=0&&t<=r&&n<=o}(i,a.x,a.y)},vy=function(e){var t,n=e.inline?e.getBody():e.getContentAreaContainer();return(t=n,I.from(t).map(bt.fromDom)).map(un).getOr(!1)},by=function(e){var t=[],n=function(){var t,n=e.theme;return n&&n.getNotificationManagerImpl?n.getNotificationManagerImpl():{open:t=function(){throw new Error("Theme did not provide a NotificationManager implementation.")},close:t,reposition:t,getArgs:t}},r=function(){return I.from(t[0])},o=function(){t.length>0&&n().reposition(t)},i=function(e){Q(t,function(t){return t===e}).each(function(e){t.splice(e,1)})},a=function(a,u){if(void 0===u&&(u=!0),!e.removed&&vy(e))return u&&e.fire("BeforeOpenNotification",{notification:a}),J(t,function(e){return t=n().getArgs(e),r=a,!(t.type!==r.type||t.text!==r.text||t.progressBar||t.timeout||r.progressBar||r.timeout);var t,r}).getOrThunk(function(){e.editorManager.setActive(e);var u=n().open(a,function(){i(u),o(),r().fold(function(){return e.focus()},function(e){return bt.fromDom(e.getEl()).dom.focus()})});return function(e){t.push(e)}(u),o(),e.fire("OpenNotification",{notification:Re({},u)}),u})},u=N(t);return function(e){e.on("SkinLoaded",function(){var t=function(e){return e.getParam("service_message")}(e);t&&a({text:t,type:"warning",timeout:0},!1),o()}),e.on("show ResizeEditor ResizeWindow NodeChange",function(){Kr.requestAnimationFrame(o)}),e.on("remove",function(){q(t.slice(),function(e){n().close(e)})})}(e),{open:a,close:function(){r().each(function(e){n().close(e),i(e),o()})},getNotifications:u}},yy=vu.PluginManager,Cy=vu.ThemeManager;var wy=function(e){var t=[],n=function(){var t,n=e.theme;return n&&n.getWindowManagerImpl?n.getWindowManagerImpl():{open:t=function(){throw new Error("Theme did not provide a WindowManager implementation.")},openUrl:t,alert:t,confirm:t,close:t,getParams:t,setParams:t}},r=function(e,t){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return t?t.apply(e,n):void 0}},o=function(n){t.push(n),function(t){e.fire("OpenWindow",{dialog:t})}(n)},i=function(n){!function(t){e.fire("CloseWindow",{dialog:t})}(n),0===(t=K(t,function(e){return e!==n})).length&&e.focus()},a=function(t){e.editorManager.setActive(e),Gd(e);var n=t();return o(n),n};return e.on("remove",function(){q(t,function(e){n().close(e)})}),{open:function(e,t){return a(function(){return n().open(e,t,i)})},openUrl:function(e){return a(function(){return n().openUrl(e,i)})},alert:function(e,t,o){var i=n();i.alert(e,r(o||i,t))},confirm:function(e,t,o){var i=n();i.confirm(e,r(o||i,t))},close:function(){I.from(t[t.length-1]).each(function(e){n().close(e),i(e)})}}},xy=function(e,t){e.notificationManager.open({type:"error",text:t})},Sy=function(e,t){e._skinLoaded?xy(e,t):e.on("SkinLoaded",function(){xy(e,t)})},Ny=function(e,t,n){$l(e,t,{message:n}),console.error(n)},Ey=function(e,t,n){return n?"Failed to load "+e+": "+n+" from url "+t:"Failed to load "+e+" url: "+t},ky=function(e,t,n){Ny(e,"PluginLoadError",Ey("plugin",t,n))},_y=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=window.console;r&&(r.error?r.error.apply(r,De([e],t,!1)):r.log.apply(r,De([e],t,!1))
90)},Ay=function(e){return Ry(e,function(e){var t=e.getParam("content_css");return l(t)?V(t.split(","),Ue):m(t)?t:!1===t||e.inline?[]:["default"]}(e))},Ry=function(e,t){var n=e.editorManager.baseURL+"/skins/content",r="content"+e.editorManager.suffix+".css",o=!0===e.inline;return V(t,function(t){return function(e){return/^[a-z0-9\-]+$/i.test(e)}(t)&&!o?n+"/"+t+"/"+r:e.documentBaseURI.toAbsolute(t)})},Dy=function(e){e.contentCSS=e.contentCSS.concat(Ay(e),function(e){return Ry(e,is(e))}(e))},Ty=function(){var e={},t=function(e,t){return{status:e,resultUri:t}},n=function(t){return t in e};return{hasBlobUri:n,getResultUri:function(t){var n=e[t];return n?n.resultUri:null},isPending:function(t){return!!n(t)&&1===e[t].status},isUploaded:function(t){return!!n(t)&&2===e[t].status},markPending:function(n){e[n]=t(1,null)},markUploaded:function(n,r){e[n]=t(2,r)},removeFailed:function(t){delete e[t]},destroy:function(){e={}}}},Oy=0,By=function(e){return e+Oy+++(t=function(){return Math.round(4294967295*Math.random()).toString(36)},"s"+(new Date).getTime().toString(36)+t()+t()+t());var t},Py=function(e,t){var n={},r=function(e,n,r,o){var i=new XMLHttpRequest;i.open("POST",t.url),i.withCredentials=t.credentials,i.upload.onprogress=function(e){o(e.loaded/e.total*100)},i.onerror=function(){r("Image upload failed due to a XHR Transport error. Code: "+i.status)},i.onload=function(){if(i.status<200||i.status>=300)r("HTTP Error: "+i.status);else{var e,o,a=JSON.parse(i.responseText);if(a&&"string"==typeof a.location)n((e=t.basePath,o=a.location,e?e.replace(/\/$/,"")+"/"+o.replace(/^\//,""):o));else r("Invalid JSON: "+i.responseText)}};var a=new FormData;a.append("file",e.blob(),e.filename()),i.send(a)},o=function(e,t){return{url:t,blobInfo:e,status:!0}},i=function(e,t,n){return{url:"",blobInfo:e,status:!1,error:{message:t,options:n}}},a=function(e,t){ht.each(n[e],function(e){e(t)}),delete n[e]},u=function(r,u){return r=ht.grep(r,function(t){return!e.isUploaded(t.blobUri())}),Vr.all(ht.map(r,function(r){return e.isPending(r.blobUri())?function(e){var t=e.blobUri();return new Vr(function(e){n[t]=n[t]||[],n[t].push(e)})}(r):function(t,n,r){return e.markPending(t.blobUri()),new Vr(function(u){var c;try{var s=function(){c&&c.close()};n(t,function(n){s(),e.markUploaded(t.blobUri(),n),a(t.blobUri(),o(t,n)),u(o(t,n))},function(n,r){var o=r||{};s(),e.removeFailed(t.blobUri()),a(t.blobUri(),i(t,n,o)),u(i(t,n,o))},function(e){e<0||e>100||I.from(c).orThunk(function(){return I.from(r).map(R)}).each(function(t){c=t,t.progressBar.value(e)})})}catch(f){u(i(t,f.message,{}))}})}(r,t.handler,u)}))};return!1===y(t.handler)&&(t.handler=r),{upload:function(e,n){return t.url||t.handler!==r?u(e,n):new Vr(function(e){e([])})}}},Ly=function(e){return function(){return e.notificationManager.open({text:e.translate("Image uploading..."),type:"info",timeout:-1,progressBar:!0})}},Iy=function(e,t){return Py(t,{url:Jc(e),basePath:Qc(e),credentials:Zc(e),handler:es(e)})},My=function(e){var t,n,r,o,i,a,u=(t=[],n=function(e){if(!e.blob||!e.base64)throw new Error("blob and base64 representations of the image are required for BlobInfo to be created");var t,n=e.id||By("blobid"),r=e.name||n,o=e.blob;return{id:N(n),name:N(r),filename:N(e.filename||r+"."+(t=o.type,{"image/jpeg":"jpg","image/jpg":"jpg","image/gif":"gif","image/png":"png","image/apng":"apng","image/avif":"avif","image/svg+xml":"svg","image/webp":"webp","image/bmp":"bmp","image/tiff":"tiff"}[t.toLowerCase()]||"dat")),blob:N(o),base64:N(e.base64),blobUri:N(e.blobUri||URL.createObjectURL(o)),uri:N(e.uri)}},{create:function(e,t,r,o,i){if(l(e))return n({id:e,name:o,filename:i,blob:t,base64:r});if(d(e))return n(e);throw new Error("Unknown input type")},add:function(e){o(e.id())||t.push(e)},get:o=function(e){return r(function(t){return t.id()===e})},getByUri:function(e){return r(function(t){return t.blobUri()===e})},getByData:function(e,t){return r(function(n){return n.base64()===e&&n.blob().type===t})},findFirst:r=function(e){return J(t,e).getOrUndefined()},removeByUri:function(e){t=K(t,function(t){return t.blobUri()!==e||(URL.revokeObjectURL(t.blobUri()),!1)})},destroy:function(){q(t,function(e){URL.revokeObjectURL(e.blobUri())}),t=[]}}),c=Ty(),s=[],f=function(e){var t=du(null);e.on("change AddUndo",function(e){t.set(Re({},e.level))});
90return{fireIfChanged:function(){var n=e.undoManager.data;ae(n).filter(function(e){return!Tv(t.get(),e)}).each(function(t){e.setDirty(!0),e.fire("change",{level:t,lastLevel:oe(n,n.length-2).getOrNull()})})}}}(e),m=function(t){return function(n){return e.selection?t(n):[]}},g=function(e,t,n){var r=0;do{-1!==(r=e.indexOf(t,r))&&(e=e.substring(0,r)+n+e.substr(r+t.length),r+=n.length-t.length+1)}while(-1!==r);return e},p=function(e,t,n){var r='src="'+n+'"'+(n===lt.transparentSrc?' data-mce-placeholder="1"':"");return e=g(e,'src="'+t+'"',r),e=g(e,'data-mce-src="'+t+'"','data-mce-src="'+n+'"')},h=function(t,n){q(e.undoManager.data,function(e){"fragmented"===e.type?e.fragments=V(e.fragments,function(e){return p(e,t,n)}):e.content=p(e.content,t,n)})},v=function(t){return i||(i=Iy(e,c)),C().then(m(function(n){var r=V(n,function(e){return e.blobInfo});return i.upload(r,Ly(e)).then(m(function(r){var o=[],i=V(r,function(t,r){var i=n[r].blobInfo,a=n[r].image;return t.status&&function(e){return e.getParam("images_replace_blob_uris",!0,"boolean")}(e)?(u.removeByUri(a.src),Iv(e)||function(t,n){var r,o=e.convertURL(n,"src");h(t.src,n),e.$(t).attr({src:Yc(e)?(r=n,r+(-1===r.indexOf("?")?"?":"&")+(new Date).getTime()):n,"data-mce-src":o})}(a,t.url)):t.error&&(t.error.options.remove&&(h(a.getAttribute("src"),lt.transparentSrc),o.push(a)),function(e,t){Sy(e,hu.translate(["Failed to upload image: {0}",t]))}(e,t.error.message)),{element:a,status:t.status,uploadUri:t.url,blobInfo:i}});return i.length>0&&f.fireIfChanged(),o.length>0&&(Iv(e)?console.error("Removing images on failed uploads is currently unsupported for RTC"):e.undoManager.transact(function(){q(o,function(t){e.dom.remove(t),u.removeByUri(t.src)})})),t&&t(i),i}))}))},b=function(t){if(Xc(e))return v(t)},y=function(t){return!1!==ee(s,function(e){return e(t)})&&(0!==t.getAttribute("src").indexOf("data:")||function(e){return e.getParam("images_dataimg_filter",O,"function")}(e)(t))},C=function(){return a||(a=nb(c,u)),a.findAll(e.getBody(),y).then(m(function(t){return t=K(t,function(t){return"string"!=typeof t||(Sy(e,t),!1)}),Iv(e)||q(t,function(e){h(e.image.src,e.blobInfo.blobUri()),e.image.src=e.blobInfo.blobUri(),e.image.removeAttribute("data-mce-src")}),t}))},w=function(t){return t.replace(/src="(blob:[^"]+)"/g,function(t,n){var r=c.getResultUri(n);if(r)return'src="'+r+'"';var o=u.getByUri(n);return o||(o=Y(e.editorManager.get(),function(e,t){return e||t.editorUpload&&t.editorUpload.blobCache.getByUri(n)},null)),o?'src="data:'+o.blob().type+";base64,"+o.base64()+'"':t})};return e.on("SetContent",function(){Xc(e)?b():C()}),e.on("RawSaveContent",function(e){e.content=w(e.content)}),e.on("GetContent",function(e){e.source_view||"raw"===e.format||"tree"===e.format||(e.content=w(e.content))}),e.on("PostRender",function(){e.parser.addNodeFilter("img",function(e){q(e,function(e){var t=e.attr("src");if(!u.getByUri(t)){var n=c.getResultUri(t);n&&e.attr("src",n)}})})}),{blobCache:u,addFilter:function(e){s.push(e)},uploadImages:v,uploadImagesAuto:b,scanForImages:C,destroy:function(){u.destroy(),c.destroy(),a=i=null}}},Fy=function(e){var t={},n=function(e,r){e&&(l(e)?(m(r)||(r=[r]),q(r,function(e){h(e.deep)&&(e.deep=!ol(e)),h(e.split)&&(e.split=!ol(e)||il(e)),h(e.remove)&&ol(e)&&!il(e)&&(e.remove="none"),ol(e)&&il(e)&&(e.mixed=!0,e.block_expand=!0),l(e.classes)&&(e.classes=e.classes.split(/\s+/))}),t[e]=r):le(e,function(e,t){n(t,e)}))};return n(function(e){var t={valigntop:[{selector:"td,th",styles:{verticalAlign:"top"}}],valignmiddle:[{selector:"td,th",styles:{verticalAlign:"middle"}}],valignbottom:[{selector:"td,th",styles:{verticalAlign:"bottom"}}],alignleft:[{selector:"figure.image",collapsed:!1,classes:"align-left",ceFalseOverride:!0,preview:"font-family font-size"},{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"left"},inherit:!1,preview:!1,defaultBlock:"div"},{selector:"img,table,audio,video",collapsed:!1,styles:{float:"left"},preview:"font-family font-size"}],aligncenter:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"center"},inherit:!1,preview:"font-family font-size",defaultBlock:"div"},{selector:"figure.image",collapsed:!1,classes:"align-center",ceFalseOverride:!0,preview:"font-family font-size"},{selector:"img,audio,video",collapsed:!1,styles:{display:"block",marginLeft:"auto",marginRight:"auto"},preview:!1},{selector:"table",collapsed:!1,styles:{marginLeft:"auto",marginRight:"auto"},preview:"font-family font-size"}],alignright:[{selector:"figure.image",collapsed:!1,classes:"align-right",ceFalseOverride:!0,preview:"font-family font-size"},{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"right"},inherit:!1,preview:"font-family font-size",defaultBlock:"div"},{selector:"img,table,audio,video",collapsed:!1,styles:{float:"right"},preview:"font-family font-size"}],alignjustify:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"justify"},inherit:!1,defaultBlock:"div",preview:"font-family font-size"}],bold:[{inline:"strong",remove:"all",preserve_attributes:["class","style"]},{inline:"span",styles:{fontWeight:"bold"}},{inline:"b",remove:"all",preserve_attributes:["class","style"]}],italic:[{inline:"em",remove:"all",preserve_attributes:["class","style"]},{inline:"span",styles:{fontStyle:"italic"}},{inline:"i",remove:"all",preserve_attributes:["class","style"]}],underline:[{inline:"span",styles:{textDecoration:"underline"},exact:!0},{inline:"u",remove:"all",preserve_attributes:["class","style"]}
90],strikethrough:[{inline:"span",styles:{textDecoration:"line-through"},exact:!0},{inline:"strike",remove:"all",preserve_attributes:["class","style"]},{inline:"s",remove:"all",preserve_attributes:["class","style"]}],forecolor:{inline:"span",styles:{color:"%value"},links:!0,remove_similar:!0,clear_child_styles:!0},hilitecolor:{inline:"span",styles:{backgroundColor:"%value"},links:!0,remove_similar:!0,clear_child_styles:!0},fontname:{inline:"span",toggle:!1,styles:{fontFamily:"%value"},clear_child_styles:!0},fontsize:{inline:"span",toggle:!1,styles:{fontSize:"%value"},clear_child_styles:!0},lineheight:{selector:"h1,h2,h3,h4,h5,h6,p,li,td,th,div",defaultBlock:"p",styles:{lineHeight:"%value"}},fontsize_class:{inline:"span",attributes:{class:"%value"}},blockquote:{block:"blockquote",wrapper:!0,remove:"all"},subscript:{inline:"sub"},superscript:{inline:"sup"},code:{inline:"code"},link:{inline:"a",selector:"a",remove:"all",split:!0,deep:!0,onmatch:function(e,t,n){return yn(e)&&e.hasAttribute("href")},onformat:function(t,n,r){ht.each(r,function(n,r){e.setAttrib(t,r,n)})}},lang:{inline:"span",clear_child_styles:!0,remove_similar:!0,attributes:{lang:"%value","data-mce-lang":function(e){var t;return null!==(t=null==e?void 0:e.customValue)&&void 0!==t?t:null}}},removeformat:[{selector:"b,strong,em,i,font,u,strike,s,sub,sup,dfn,code,samp,kbd,var,cite,mark,q,del,ins,small",remove:"all",split:!0,expand:!1,block_expand:!0,deep:!0},{selector:"span",attributes:["style","class"],remove:"empty",split:!0,expand:!1,deep:!0},{selector:"*",attributes:["style","class"],split:!1,expand:!1,deep:!0}]};return ht.each("p h1 h2 h3 h4 h5 h6 div address pre dt dd samp".split(/\s/),function(e){t[e]={block:e,remove:"all"}}),t}(e.dom)),n(function(e){return e.getParam("formats")}(e)),{get:function(e){return b(e)?t[e]:t},has:function(e){return ye(t,e)},register:n,unregister:function(e){return e&&t[e]&&delete t[e],t}}},Uy=ht.each,zy=uu.DOM,Hy=function(e,t){var n,r,o,i=t&&t.schema||yi({}),a=function(e){r="string"==typeof e?{name:e,classes:[],attrs:{}}:e;var t=zy.create(r.name);return function(e,t){t.classes.length&&zy.addClass(e,t.classes.join(" ")),zy.setAttribs(e,t.attrs)}(t,r),t},u=function(e,t,n){var r,o,c=t.length>0&&t[0],s=c&&c.name,f=function(e,t){var n="string"!=typeof e?e.nodeName.toLowerCase():e,r=i.getElementRule(n),o=r&&r.parentsRequired;return!(!o||!o.length)&&(t&&-1!==ht.inArray(o,t)?t:o[0])}(e,s);if(f)s===f?(o=t[0],t=t.slice(1)):o=f;else if(c)o=t[0],t=t.slice(1);else if(!n)return e;return o&&(r=a(o)).appendChild(e),n&&(r||(r=zy.create("div")).appendChild(e),ht.each(n,function(t){var n=a(t);r.insertBefore(n,e)})),u(r,t,o&&o.siblings)};return e&&e.length?(r=e[0],n=a(r),(o=zy.create("div")).appendChild(u(n,e.slice(1),r.siblings)),o):""},jy=function(e){var t,n={classes:[],attrs:{}};return"*"!==(e=n.selector=ht.trim(e))&&(t=e.replace(/(?:([#\.]|::?)([\w\-]+)|(\[)([^\]]+)\]?)/g,function(e,t,r,o,i){switch(t){case"#":n.attrs.id=r;break;case".":n.classes.push(r);break;case":":-1!==ht.inArray("checked disabled enabled read-only required".split(" "),r)&&(n.attrs[r]=r)}if("["===o){var a=i.match(/([\w\-]+)(?:\=\"([^\"]+))?/);a&&(n.attrs[a[1]]=a[2])}return""})),n.name=t||"div",n},Vy=function(e,t){var n,r,o,i="",a=function(e){var t=e.getParam("preview_styles","font-family font-size font-weight font-style text-decoration text-transform color background-color border border-radius outline text-shadow");return l(t)?t:""}(e);if(""===a)return"";var u=function(e){return e.replace(/%(\w+)/g,"")};if("string"==typeof t){if(!(t=e.formatter.get(t)))return;t=t[0]}if("preview"in t){var c=be(t,"preview");if(Mn(c,!1))return"";a=c.getOr(a)}n=t.block||t.inline||"span";var s,f=(s=t.selector)&&"string"==typeof s?(s=(s=s.split(/\s*,\s*/)[0]).replace(/\s*(~\+|~|\+|>)\s*/g,"$1"),ht.map(s.split(/(?:>|\s+(?![^\[\]]+\]))/),function(e){var t=ht.map(e.split(/(?:~\+|~|\+)/),jy),n=t.pop();return t.length&&(n.siblings=t),n}).reverse()):[];f.length?(f[0].name||(f[0].name=n),n=t.selector,r=Hy(f,e)):r=Hy([n],e);var d=zy.select(n,r)[0]||r.firstChild;return Uy(t.styles,function(e,t){var n=u(e);n&&zy.setStyle(d,t,n)}),Uy(t.attributes,function(e,t){var n=u(e);n&&zy.setAttrib(d,t,n)}),Uy(t.classes,function(e){var t=u(e);zy.hasClass(d,t)||zy.addClass(d,t)}),e.fire("PreviewFormats"),zy.setStyles(r,{position:"absolute",left:-65535}),e.getBody().appendChild(r),o=zy.getStyle(e.getBody(),"fontSize",!0),o=/px$/.test(o)?parseInt(o,10):0,Uy(a.split(" "),function(t){var n=zy.getStyle(d,t,!0);
90if(!("background-color"===t&&/transparent|rgba\s*\([^)]+,\s*0\)/.test(n)&&(n=zy.getStyle(e.getBody(),t,!0),"#ffffff"===zy.toHex(n).toLowerCase())||"color"===t&&"#000000"===zy.toHex(n).toLowerCase())){if("font-size"===t&&/em|%$/.test(n)){if(0===o)return;n=parseFloat(n)/(/%$/.test(n)?100:1)*o+"px"}"border"===t&&n&&(i+="padding:0 2px;"),i+=t+":"+n+";"}}),e.fire("AfterPreviewFormats"),zy.remove(r),i},qy=function(e){var t=Fy(e),n=du(null);return function(e){e.addShortcut("meta+b","","Bold"),e.addShortcut("meta+i","","Italic"),e.addShortcut("meta+u","","Underline");for(var t=1;t<=6;t++)e.addShortcut("access+"+t,"",["FormatBlock",!1,"h"+t]);e.addShortcut("access+7","",["FormatBlock",!1,"p"]),e.addShortcut("access+8","",["FormatBlock",!1,"div"]),e.addShortcut("access+9","",["FormatBlock",!1,"address"])}(e),vh(e),{get:t.get,has:t.has,register:t.register,unregister:t.unregister,apply:function(t,n,r){!function(e,t,n,r){Uv(e).formatter.apply(t,n,r)}(e,t,n,r)},remove:function(t,n,r,o){!function(e,t,n,r,o){Uv(e).formatter.remove(t,n,r,o)}(e,t,n,r,o)},toggle:function(t,n,r){!function(e,t,n,r){Uv(e).formatter.toggle(t,n,r)}(e,t,n,r)},match:function(t,n,r,o){return function(e,t,n,r,o){return Uv(e).formatter.match(t,n,r,o)}(e,t,n,r,o)},closest:function(t){return function(e,t){return Uv(e).formatter.closest(t)}(e,t)},matchAll:function(t,n){return function(e,t,n){return Uv(e).formatter.matchAll(t,n)}(e,t,n)},matchNode:function(t,n,r,o){return function(e,t,n,r,o){return Uv(e).formatter.matchNode(t,n,r,o)}(e,t,n,r,o)},canApply:function(t){return function(e,t){return Uv(e).formatter.canApply(t)}(e,t)},formatChanged:function(t,r,o,i){return function(e,t,n,r,o,i){return Uv(e).formatter.formatChanged(t,n,r,o,i)}(e,n,t,r,o,i)},getCssText:_(Vy,e)}},$y=function(e){switch(e.toLowerCase()){case"undo":case"redo":case"mcerepaint":case"mcefocus":return!0;default:return!1}},Wy=function(e){var t=bu(),n=du(0),r=du(0),o={data:[],typing:!1,beforeChange:function(){!function(e,t,n){Uv(e).undoManager.beforeChange(t,n)}(e,n,t)},add:function(i,a){return function(e,t,n,r,o,i,a){return Uv(e).undoManager.add(t,n,r,o,i,a)}(e,o,r,n,t,i,a)},undo:function(){return function(e,t,n,r){return Uv(e).undoManager.undo(t,n,r)}(e,o,n,r)},redo:function(){return function(e,t,n){return Uv(e).undoManager.redo(t,n)}(e,r,o.data)},clear:function(){!function(e,t,n){Uv(e).undoManager.clear(t,n)}(e,o,r)},reset:function(){!function(e,t){Uv(e).undoManager.reset(t)}(e,o)},hasUndo:function(){return function(e,t,n){return Uv(e).undoManager.hasUndo(t,n)}(e,o,r)},hasRedo:function(){return function(e,t,n){return Uv(e).undoManager.hasRedo(t,n)}(e,o,r)},transact:function(t){return function(e,t,n,r){return Uv(e).undoManager.transact(t,n,r)}(e,o,n,t)},ignore:function(t){!function(e,t,n){Uv(e).undoManager.ignore(t,n)}(e,n,t)},extra:function(t,n){!function(e,t,n,r,o){Uv(e).undoManager.extra(t,n,r,o)}(e,o,r,t,n)}};return Iv(e)||function(e,t,n){var r=du(!1),o=function(e){Bv(t,!1,n),t.add({},e)};e.on("init",function(){t.add()}),e.on("BeforeExecCommand",function(e){var r=e.command;$y(r)||(Pv(t,n),t.beforeChange())}),e.on("ExecCommand",function(e){var t=e.command;$y(t)||o(e)}),e.on("ObjectResizeStart cut",function(){t.beforeChange()}),e.on("SaveContent ObjectResized blur",o),e.on("dragend",o),e.on("keyup",function(n){var i=n.keyCode;n.isDefaultPrevented()||((i>=33&&i<=36||i>=37&&i<=40||45===i||n.ctrlKey)&&(o(),e.nodeChanged()),46!==i&&8!==i||e.nodeChanged(),r.get()&&t.typing&&!1===Tv(_v(e),t.data[0])&&(!1===e.isDirty()&&(e.setDirty(!0),e.fire("change",{level:t.data[0],lastLevel:null})),e.fire("TypingUndo"),r.set(!1),e.nodeChanged()))}),e.on("keydown",function(e){var i=e.keyCode;if(!e.isDefaultPrevented())if(i>=33&&i<=36||i>=37&&i<=40||45===i)t.typing&&o(e);else{var a=e.ctrlKey&&!e.altKey||e.metaKey;!(i<16||i>20)||224===i||91===i||t.typing||a||(t.beforeChange(),Bv(t,!0,n),t.add({},e),r.set(!0))}}),e.on("mousedown",function(e){t.typing&&o(e)});e.on("input",function(e){e.inputType&&("insertReplacementText"===e.inputType||function(e){return"insertText"===e.inputType&&null===e.data}(e)||function(e){return"insertFromPaste"===e.inputType||"insertFromDrop"===e.inputType}(e))&&o(e)}),e.on("AddUndo Undo Redo ClearUndos",function(t){t.isDefaultPrevented()||e.nodeChanged()})}
90(e,o,n),function(e){e.addShortcut("meta+z","","Undo"),e.addShortcut("meta+y,meta+shift+z","","Redo")}(e),o},Ky=[9,27,Xl.HOME,Xl.END,19,20,44,144,145,33,34,45,16,17,18,91,92,93,Xl.DOWN,Xl.UP,Xl.LEFT,Xl.RIGHT].concat(lt.browser.isFirefox()?[224]:[]),Xy=function(e){return"keydown"===e.type||"keyup"===e.type},Yy=function(e){var t=e.keyCode;return t===Xl.BACKSPACE||t===Xl.DELETE},Gy=function(e){var t=e.dom,n=Wc(e),r=function(e){return e.getParam("placeholder",Vc.getAttrib(e.getElement(),"placeholder"),"string")}(e),o=function(i,a){if(!function(e){if(Xy(e)){var t=e.keyCode;return!Yy(e)&&(Xl.metaKeyPressed(e)||e.altKey||t>=112&&t<=123||H(Ky,t))}return!1}(i)){var u=e.getBody(),c=!function(e){return Xy(e)&&!(Yy(e)||"keyup"===e.type&&229===e.keyCode)}(i)&&function(e,t,n){if(Vo(bt.fromDom(t),!1)){var r=""===n,o=t.firstElementChild;return!o||!e.getStyle(t.firstElementChild,"padding-left")&&!e.getStyle(t.firstElementChild,"padding-right")&&(r?!e.isBlock(o):n===o.nodeName.toLowerCase())}return!1}(t,u,n);(""!==t.getAttrib(u,"data-mce-placeholder")!==c||a)&&(t.setAttrib(u,"data-mce-placeholder",c?r:null),t.setAttrib(u,"aria-placeholder",c?r:null),function(e,t){e.fire("PlaceholderToggle",{state:t})}(e,c),e.on(c?"keydown":"keyup",o),e.off(c?"keyup":"keydown",o))}};r&&e.on("init",function(t){o(t,!0),e.on("change SetContent ExecCommand",o),e.on("paste",function(t){return Kr.setEditorTimeout(e,function(){return o(t)})})})},Jy=/[\u0591-\u07FF\uFB1D-\uFDFF\uFE70-\uFEFC]/,Qy=function(e,t){return Ct(bt.fromDom(t),function(e){return e.getParam("inline_boundaries_selector","a[href],code,.mce-annotation","string")}(e))},Zy=function(e){return"rtl"===uu.DOM.getStyle(e,"direction",!0)||(t=e.textContent,Jy.test(t));var t},eC=function(e,t,n){var r=function(e,t,n){return K(uu.DOM.getParents(n.container(),"*",t),e)}(e,t,n);return I.from(r[r.length-1])},tC=function(e,t){if(!t)return t;var n=t.container(),r=t.offset();return e?po(n)?_n(n.nextSibling)?yc(n.nextSibling,0):yc.after(n):bo(t)?yc(n,r+1):t:po(n)?_n(n.previousSibling)?yc(n.previousSibling,n.previousSibling.data.length):yc.before(n):yo(t)?yc(n,r-1):t},nC=_(tC,!0),rC=_(tC,!1),oC=function(e){return no(e)||oo(e)},iC=function(e,t){return Nt(e,t)?Fr(t,oC,function(e){return function(t){return xt(e,bt.fromDom(t.dom.parentNode))}}(e)):I.none()},aC=function(e){e.dom.isEmpty(e.getBody())&&(e.setContent(""),function(e){var t=e.getBody(),n=t.firstChild&&e.dom.isBlock(t.firstChild)?t.firstChild:t;e.selection.setCursorLocation(n,0)}(e))},uC=function(e,t){return{from:e,to:t}},cC=function(e,t){var n=bt.fromDom(e),r=bt.fromDom(t.container());return iC(n,r).map(function(e){return function(e,t){return{block:e,position:t}}(e,t)})},sC=function(e,t,n){var r=cC(e,yc.fromRangeStart(n)),o=r.bind(function(n){return Cf(t,e,n.position).bind(function(n){return cC(e,n).map(function(n){return function(e,t,n){return Tn(n.position.getNode())&&!1===Vo(n.block)?Sf(!1,n.block.dom).bind(function(r){return r.isEqual(n.position)?Cf(t,e,r).bind(function(t){return cC(e,t)}):I.some(n)}).getOr(n):n}(e,t,n)})})});return Fn(r,o,uC).filter(function(e){return function(e){return!1===xt(e.from.block,e.to.block)}(e)&&function(e){return Lt(e.from.block).bind(function(t){return Lt(e.to.block).filter(function(e){return xt(t,e)})}).isSome()}(e)&&function(e){return!1===Pn(e.from.block.dom)&&!1===Pn(e.to.block.dom)}(e)})},fC=function(e){var t=zt(e);return Q(t,Zr).fold(N(t),function(e){return t.slice(0,e)})},lC=function(e){var t=fC(e);return q(t,on),t},dC=function(e,t){var n=gg(t,e);return J(n.reverse(),function(e){return Vo(e)}).each(on)},mC=function(e,t,n,r){if(Vo(n))return fg(n),kf(n.dom);0===K(Ft(r),function(e){return!Vo(e)}).length&&Vo(t)&&Qt(r,bt.fromTag("br"));var o=Ef(n.dom,yc.before(r.dom));return q(lC(t),function(e){Qt(r,e)}),dC(e,t),o},gC=function(e,t,n){if(Vo(n))return on(n),Vo(t)&&fg(t),kf(t.dom);var r=_f(n.dom);return q(lC(t),function(e){tn(n,e)}),dC(e,t),r},pC=function(e,t){return Nt(t,e)?function(e,t){var n=gg(t,e);return I.from(n[n.length-1])}(t,e):I.none()},hC=function(e,t){Sf(e,t.dom).map(function(e){return e.getNode()}).map(bt.fromDom).filter(to).each(on)},vC=function(e,t,n){return hC(!0,t),hC(!1,n),pC(t,n).fold(_(gC,e,t,n),_(mC,e,t,n))},bC=function(e,t,n,r){return t?vC(e,r,n):vC(e,n,r)}
90,yC=function(e,t){var n=bt.fromDom(e.getBody()),r=function(e,t,n){return n.collapsed?sC(e,t,n):I.none()}(n.dom,t,e.selection.getRng()).bind(function(e){return bC(n,t,e.from.block,e.to.block)});return r.each(function(t){e.selection.setRng(t.toRange())}),r.isSome()},CC=function(e,t){var n=bt.fromDom(t),r=_(xt,e);return Mr(n,ao,r).isSome()},wC=function(e,t){var n=Ef(e.dom,yc.fromRangeStart(t)).isNone(),r=Nf(e.dom,yc.fromRangeEnd(t)).isNone();return!function(e,t){return CC(e,t.startContainer)||CC(e,t.endContainer)}(e,t)&&n&&r},xC=function(e){var t=bt.fromDom(e.getBody()),n=e.selection.getRng();return wC(t,n)?function(e){return e.setContent(""),e.selection.setCursorLocation(),!0}(e):function(e,t){var n=t.getRng();return Fn(iC(e,bt.fromDom(n.startContainer)),iC(e,bt.fromDom(n.endContainer)),function(r,o){return!1===xt(r,o)&&(n.deleteContents(),bC(e,!0,r,o).each(function(e){t.setRng(e.toRange())}),!0)}).getOr(!1)}(t,e.selection)},SC=function(e,t){return!e.selection.isCollapsed()&&xC(e)},NC=Bn,EC=Pn,kC=function(e,t,n,r,o){return I.from(t._selectionOverrides.showCaret(e,n,r,o))},_C=function(e,t){return e.fire("BeforeObjectSelected",{target:t}).isDefaultPrevented()?I.none():I.some(function(e){var t=e.ownerDocument.createRange();return t.selectNode(e),t}(t))},AC=function(e,t,n){var r=Js(1,e.getBody(),t),o=yc.fromRangeStart(r),i=o.getNode();if(Ds(i))return kC(1,e,i,!o.isAtEnd(),!1);var a=o.getNode(!0);if(Ds(a))return kC(1,e,a,!1,!1);var u=e.dom.getParent(o.getNode(),function(e){return EC(e)||NC(e)});return Ds(u)?kC(1,e,u,!1,n):I.none()},RC=function(e,t,n){return t.collapsed?AC(e,t,n).getOr(t):t},DC=function(e){return ug(e)||rg(e)},TC=function(e){return cg(e)||og(e)},OC=function(e,t,n,r,o,i){return kC(r,e,i.getNode(!o),o,!0).each(function(n){if(t.collapsed){var r=t.cloneRange();o?r.setEnd(n.startContainer,n.startOffset):r.setStart(n.endContainer,n.endOffset),r.deleteContents()}else t.deleteContents();e.selection.setRng(n)}),function(e,t){_n(t)&&0===t.data.length&&e.remove(t)}(e.dom,n),!0},BC=function(e,t){return function(e,t){var n=e.selection.getRng();if(!_n(n.commonAncestorContainer))return!1;var r=t?Cc.Forwards:Cc.Backwards,o=pf(e.getBody()),i=_(tf,t?o.next:o.prev),a=t?DC:TC,u=Zs(r,e.getBody(),n),c=tC(t,i(u));if(!c||!nf(u,c))return!1;if(a(c))return OC(e,n,u.getNode(),r,t,c);var s=i(c);return!!(s&&a(s)&&nf(c,s))&&OC(e,n,u.getNode(),r,t,s)}(e,t)},PC=gr([{remove:["element"]},{moveToElement:["element"]},{moveToPosition:["position"]}]),LC=function(e,t,n,r){var o=r.getNode(!1===t);return iC(bt.fromDom(e),bt.fromDom(n.getNode())).map(function(e){return Vo(e)?PC.remove(e.dom):PC.moveToElement(o)}).orThunk(function(){return I.some(PC.moveToElement(o))})},IC=function(e,t,n){return Cf(t,e,n).bind(function(r){return o=r.getNode(),ao(bt.fromDom(o))||oo(bt.fromDom(o))?I.none():function(e,t,n,r){var o=function(t){return eo(bt.fromDom(t))&&!qs(n,r,e)};return Qs(!t,n).fold(function(){return Qs(t,r).fold(T,o)},o)}(e,t,n,r)?I.none():t&&Pn(r.getNode())?LC(e,t,n,r):!1===t&&Pn(r.getNode(!0))?LC(e,t,n,r):t&&cg(n)?I.some(PC.moveToPosition(r)):!1===t&&ug(n)?I.some(PC.moveToPosition(r)):I.none();var o})},MC=function(e,t,n){return function(e,t){var n=t.getNode(!1===e),r=e?"after":"before";return yn(n)&&n.getAttribute("data-mce-caret")===r}(t,n)?function(e,t){return e&&Pn(t.nextSibling)?I.some(PC.moveToElement(t.nextSibling)):!1===e&&Pn(t.previousSibling)?I.some(PC.moveToElement(t.previousSibling)):I.none()}(t,n.getNode(!1===t)).fold(function(){return IC(e,t,n)},I.some):IC(e,t,n).bind(function(t){return function(e,t,n){return n.fold(function(e){return I.some(PC.remove(e))},function(e){return I.some(PC.moveToElement(e))},function(n){return qs(t,n,e)?I.none():I.some(PC.moveToPosition(n))})}(e,n,t)})},FC=function(e,t){return I.from(Vl(e.getBody(),t))},UC=function(e,t){var n=e.selection.getNode();return FC(e,n).filter(Pn).fold(function(){return function(e,t,n){var r=Js(t?1:-1,e,n),o=yc.fromRangeStart(r),i=bt.fromDom(e);return!1===t&&cg(o)?I.some(PC.remove(o.getNode(!0))):t&&ug(o)?I.some(PC.remove(o.getNode())):!1===t&&ug(o)&&kg(i,o)?_g(i,o).map(function(e){return PC.remove(e.getNode())}):t&&cg(o)&&Eg(i,o)?Ag(i,o).map(function(e){return PC.remove(e.getNode())}):MC(e,t,o)}(e.getBody(),t,e.selection.getRng()).exists(function(n){return n.fold(function(e,t){return function(n){return e._selectionOverrides.hideFakeCaret(),rp(e,t,bt.fromDom(n)),!0}}(e,t),function(e,t){return function(n){var r=t?yc.before(n):yc.after(n);return e.selection.setRng(r.toRange()),!0}}(e,t),function(e){return function(t){return e.selection.setRng(t.toRange()),!0}}(e))})},O)},zC=function(e,t){var n=e.selection.getNode();return!(!Pn(n)||Ln(n))&&FC(e,n.parentNode).filter(Pn).fold(function(){var n;return n=bt.fromDom(e.getBody()),q(Ru(n,".mce-offscreen-selection"),on),rp(e,t,bt.fromDom(e.selection.getNode())),aC(e),!0},O)},HC=function(e){var t=e.dom,n=e.selection,r=Vl(e.getBody(),n.getNode());if(Bn(r)&&t.isBlock(r)&&t.isEmpty(r)){var o=t.create("br",{"data-mce-bogus":"1"});t.setHTML(r,""),r.appendChild(o),n.setRng(yc.before(o).toRange())}return!0},jC=function(e,t){return e.selection.isCollapsed()?UC(e,t):zC(e,t)},VC=function(e,t){return!!e.selection.isCollapsed()&&function(e,t){var n=yc.fromRangeStart(e.selection.getRng());return Cf(t,e.getBody(),n).filter(function(e){return t?tg(e):ng(e)}).bind(function(e){return I.from($s(t?0:-1,e))}).exists(function(t){return e.selection.select(t),!0})}(e,t)},qC=_n,$C=function(e){return qC(e)&&e.data[0]===co},WC=function(e){return qC(e)&&e.data[e.data.length-1]===co},KC=function(e){return e.ownerDocument.createTextNode(co)},XC=function(e,t){return e?function(e){if(qC(e.previousSibling))return WC(e.previousSibling)?e.previousSibling:(e.previousSibling.a
90ppendData(co),e.previousSibling);if(qC(e))return $C(e)?e:(e.insertData(0,co),e);var t=KC(e);return e.parentNode.insertBefore(t,e),t}(t):function(e){if(qC(e.nextSibling))return $C(e.nextSibling)?e.nextSibling:(e.nextSibling.insertData(0,co),e.nextSibling);if(qC(e))return WC(e)?e:(e.appendData(co),e);var t=KC(e);return e.nextSibling?e.parentNode.insertBefore(t,e.nextSibling):e.parentNode.appendChild(t),t}(t)},YC=_(XC,!0),GC=_(XC,!1),JC=function(e,t){return _n(e.container())?XC(t,e.container()):XC(t,e.getNode())},QC=function(e,t){var n=t.get();return n&&e.container()===n&&po(n)},ZC=function(e,t){return t.fold(function(t){xs(e.get());var n=YC(t);return e.set(n),I.some(yc(n,n.length-1))},function(t){return kf(t).map(function(t){if(QC(t,e))return yc(e.get(),1);xs(e.get());var n=JC(t,!0);return e.set(n),yc(n,1)})},function(t){return _f(t).map(function(t){if(QC(t,e))return yc(e.get(),e.get().length-1);xs(e.get());var n=JC(t,!1);return e.set(n),yc(n,n.length-1)})},function(t){xs(e.get());var n=GC(t);return e.set(n),I.some(yc(n,1))})},ew=function(e,t){for(var n=0;n<e.length;n++){var r=e[n].apply(null,t);if(r.isSome())return r}return I.none()},tw=gr([{before:["element"]},{start:["element"]},{end:["element"]},{after:["element"]}]),nw=function(e,t){var n=Vs(t,e);return n||e},rw=function(e,t,n){var r=nC(n),o=nw(t,r.container());return eC(e,o,r).fold(function(){return Nf(o,r).bind(_(eC,e,o)).map(function(e){return tw.before(e)})},I.none)},ow=function(e,t){return null===Rf(e,t)},iw=function(e,t,n){return eC(e,t,n).filter(_(ow,t))},aw=function(e,t,n){var r=rC(n);return iw(e,t,r).bind(function(e){return Ef(e,r).isNone()?I.some(tw.start(e)):I.none()})},uw=function(e,t,n){var r=nC(n);return iw(e,t,r).bind(function(e){return Nf(e,r).isNone()?I.some(tw.end(e)):I.none()})},cw=function(e,t,n){var r=rC(n),o=nw(t,r.container());return eC(e,o,r).fold(function(){return Ef(o,r).bind(_(eC,e,o)).map(function(e){return tw.after(e)})},I.none)},sw=function(e){return!1===Zy(lw(e))},fw=function(e,t,n){return ew([rw,aw,uw,cw],[e,t,n]).filter(sw)},lw=function(e){return e.fold(E,E,E,E)},dw=function(e){return e.fold(N("before"),N("start"),N("end"),N("after"))},mw=function(e){return e.fold(tw.before,tw.before,tw.after,tw.after)},gw=function(e){return e.fold(tw.start,tw.start,tw.end,tw.end)},pw=function(e,t,n,r,o,i){return Fn(eC(t,n,r),eC(t,n,o),function(t,r){return t!==r&&function(e,t,n){var r=Vs(t,e),o=Vs(n,e);return r&&r===o}(n,t,r)?tw.after(e?t:r):i}).getOr(i)},hw=function(e,t){return e.fold(O,function(e){return r=t,!(dw(n=e)===dw(r)&&lw(n)===lw(r));var n,r})},vw=function(e,t){return e?t.fold(x(I.some,tw.start),I.none,x(I.some,tw.after),I.none):t.fold(I.none,x(I.some,tw.before),I.none,x(I.some,tw.end))},bw=function(e,t,n,r){var o=tC(e,r),i=fw(t,n,o);return fw(t,n,o).bind(_(vw,e)).orThunk(function(){return function(e,t,n,r,o){var i=tC(e,o);return Cf(e,n,i).map(_(tC,e)).fold(function(){return r.map(mw)},function(o){return fw(t,n,o).map(_(pw,e,t,n,i,o)).filter(_(hw,r))}).filter(sw)}(e,t,n,i,r)})};_(bw,!1),_(bw,!0);var yw,Cw=function(e,t,n){var r=e?1:-1;return t.setRng(yc(n.container(),n.offset()+r).toRange()),t.getSel().modify("move",e?"forward":"backward","word"),!0},ww=function(e,t){var n=t.selection.getRng(),r=e?yc.fromRangeEnd(n):yc.fromRangeStart(n);return!!function(e){return y(e.selection.getSel().modify)}(t)&&(e&&bo(r)?Cw(!0,t.selection,r):!(e||!yo(r))&&Cw(!1,t.selection,r))};!function(e){e[e.Br=0]="Br",e[e.Block=1]="Block",e[e.Wrap=2]="Wrap",e[e.Eol=3]="Eol"}(yw||(yw={}));var xw,Sw=function(e,t){return e===Cc.Backwards?te(t):t},Nw=function(e,t,n){return e===Cc.Forwards?t.next(n):t.prev(n)},Ew=function(e,t,n,r){return Tn(r.getNode(t===Cc.Forwards))?yw.Br:!1===qs(n,r)?yw.Block:yw.Wrap},kw=function(e,t,n,r){for(var o=pf(n),i=r,a=[];i;){var u=Nw(t,o,i);if(!u)break;if(Tn(u.getNode(!1)))return t===Cc.Forwards?{positions:Sw(t,a).concat([u]),breakType:yw.Br,breakAt:I.some(u)}:{positions:Sw(t,a),breakType:yw.Br,breakAt:I.some(u)};if(u.isVisible()){if(e(i,u)){var c=Ew(0,t,i,u);return{positions:Sw(t,a),breakType:c,breakAt:I.some(u)}}a.push(u),i=u}else i=u}return{positions:Sw(t,a),breakType:yw.Eol,breakAt:I.none()}},_w=function(e,t,n,r){return t(n,r).breakAt.map(function(r){var o=t(n,r).positions;return e===Cc.Backwards?o.concat(r):[r].concat(o)}).getOr([])},Aw=function(e,t){return Y(e,function(e,n){return e.fold(function(){return I.some(n)},function(r){return Fn(ie(r.getClientRects()),ie(n.getClientRects()),function(e,o){var i=Math.abs(t-e.left);return Math.abs(t-o.left)<=i?n:r}).or(e)})},I.none())},Rw=function(e,t){return ie(t.getClientRects()).bind(function(t){return Aw(e,t.left)})},Dw=_(kw,yc.isAbove,-1),Tw=_(kw,yc.isBelow,1),Ow=_(_w,-1,Dw),Bw=_(_w,1,Tw),Pw=function(e){var t=function(t){return V(t,function(t){var n=Wu(t);return n.node=e,n})};if(yn(e))return t(e.getClientRects());if(_n(e)){var n=e.ownerDocument.createRange();return n.setStart(e,0),n.setEnd(e,e.data.length),t(n.getClientRects())}},Lw=function(e){return Z(e,Pw)};!function(e){e[e.Up=-1]="Up",e[e.Down=1]="Down"}(xw||(xw={}));var Iw,Mw,Fw=function(e,t,n,r,o,i){var a=0,u=[],c=function(r){var i=Lw([r]);-1===e&&(i=i.reverse());for(var c=0;c<i.length;c++){var f=i[c];if(!n(f,s)){if(u.length>0&&t(f,Ae(u))&&a++,f.line=a,o(f))return!0;u.push(f)}}}
90,s=Ae(i.getClientRects());if(!s)return u;var f=i.getNode();return c(f),function(e,t,n,r){for(;r=js(r,e,Lo,t);)if(n(r))return}(e,r,c,f),u},Uw=_(Fw,xw.Up,Yu,Gu),zw=_(Fw,xw.Down,Gu,Yu),Hw=function(e){return function(t){return function(e,t){return t.line>e}(e,t)}},jw=function(e){return function(t){return function(e,t){return t.line===e}(e,t)}},Vw=Pn,qw=js,$w=function(e,t){return Math.abs(e.left-t)},Ww=function(e,t){return Math.abs(e.right-t)},Kw=function(e,t){return e>=t.left&&e<=t.right},Xw=function(e,t){return e>=t.top&&e<=t.bottom},Yw=function(e,t,n){return void 0===n&&(n=O),ke(e,function(e,r){if(Kw(t,r))return n(r)?r:e;if(Kw(t,e))return n(e)?e:r;var o=Math.min($w(e,t),Ww(e,t)),i=Math.min($w(r,t),Ww(r,t));return i===o&&Ce(r,"node")&&Vw(r.node)?r:i<o?r:e})},Gw=function(e,t,n,r,o){var i=qw(r,e,Lo,t,!o);do{if(!i||n(i))return}while(i=qw(i,e,Lo,t))},Jw=function(e,t,n){var r=Lw(function(e){return K(ue(e.getElementsByTagName("*")),Ts)}(e)),o=K(r,_(Xw,n)),i=function(e){return!Nn(e.node)&&!In(e.node)},a=Yw(o,t,i);if(a){var u=i(a);if((a=Yw(function(e,t,n){void 0===n&&(n=!0);var r=[],o=function(e,n){var o=K(Lw([n]),function(n){return!e(n,t)});return r=r.concat(o),0===o.length};return r.push(t),Gw(xw.Up,e,_(o,Yu),t.node,n),Gw(xw.Down,e,_(o,Gu),t.node,n),r}(e,a,u),t,i))&&Ts(a.node))return function(e,t){return{node:e.node,before:$w(e,t)<Ww(e,t)}}(a,t)}return null},Qw=function(e,t){e.selection.setRng(t),Bd(e,e.selection.getRng())},Zw=function(e,t,n){return I.some(RC(e,t,n))},ex=function(e,t,n,r,o,i){var a=t===Cc.Forwards,u=pf(e.getBody()),c=_(tf,a?u.next:u.prev),s=a?r:o;if(!n.collapsed){var f=Qu(n);if(i(f))return kC(t,e,f,t===Cc.Backwards,!1)}var l=Zs(t,e.getBody(),n);if(s(l))return _C(e,l.getNode(!a));var d=tC(a,c(l)),m=No(n);if(!d)return m?I.some(n):I.none();if(s(d))return kC(t,e,d.getNode(!a),a,!1);var g=c(d);return g&&s(g)&&nf(d,g)?kC(t,e,g.getNode(!a),a,!1):m?Zw(e,d.toRange(),!1):I.none()},tx=function(e,t,n,r,o,i){var a=Zs(t,e.getBody(),n),u=Ae(a.getClientRects()),c=t===xw.Down;if(!u)return I.none();var s,f=(c?zw:Uw)(e.getBody(),Hw(1),a),l=K(f,jw(1)),d=u.left,m=Yw(l,d);if(m&&i(m.node)){var g=Math.abs(d-m.left),p=Math.abs(d-m.right);return kC(t,e,m.node,g<p,!1)}if(s=r(a)?a.getNode():o(a)?a.getNode(!0):Qu(n)){var h=function(e,t,n,r){var o,i,a,u,c=pf(t),s=[],f=0,l=function(e){return Ae(e.getClientRects())};1===e?(o=c.next,i=Gu,a=Yu,u=yc.after(r)):(o=c.prev,i=Yu,a=Gu,u=yc.before(r));var d=l(u);do{if(u.isVisible()){var m=l(u);if(!a(m,d)){s.length>0&&i(m,Ae(s))&&f++;var g=Wu(m);if(g.position=u,g.line=f,n(g))return s;s.push(g)}}}while(u=o(u));return s}(t,e.getBody(),Hw(1),s),v=Yw(K(h,jw(1)),d);if(v)return Zw(e,v.position.toRange(),!1);if(v=Ae(K(h,jw(0))))return Zw(e,v.position.toRange(),!1)}return 0===l.length?nx(e,c).filter(c?o:r).map(function(t){return RC(e,t.toRange(),!1)}):I.none()},nx=function(e,t){var n=e.selection.getRng(),r=e.getBody();if(t){var o=yc.fromRangeEnd(n),i=Tw(r,o);return ae(i.positions)}o=yc.fromRangeStart(n),i=Dw(r,o);return ie(i.positions)},rx=function(e,t,n){return nx(e,t).filter(n).exists(function(t){return e.selection.setRng(t.toRange()),!0})},ox=function(e,t){var n=e.dom.createRng();n.setStart(t.container(),t.offset()),n.setEnd(t.container(),t.offset()),e.selection.setRng(n)},ix=function(e,t){e?t.setAttribute("data-mce-selected","inline-boundary"):t.removeAttribute("data-mce-selected")},ax=function(e,t,n){return ZC(t,n).map(function(t){return ox(e,t),n})},ux=function(e,t){if(e.selection.isCollapsed()&&!0!==e.composing&&t.get()){var n=yc.fromRangeStart(e.selection.getRng());yc.isTextPosition(n)&&!1===function(e){return bo(e)||yo(e)}(n)&&(ox(e,ws(t.get(),n)),t.set(null))}},cx=function(e,t,n){return!!fs(e)&&function(e,t,n){var r=e.getBody(),o=yc.fromRangeStart(e.selection.getRng()),i=_(Qy,e);return bw(n,i,r,o).bind(function(n){return ax(e,t,n)})}(e,t,n).isSome()},sx=function(e,t,n){return!!fs(t)&&ww(e,t)},fx=function(e){var t=du(null),n=_(Qy,e);return e.on("NodeChange",function(r){var o,i,a,u,c,s;!fs(e)||lt.browser.isIE()&&r.initial||(o=n,i=e.dom,a=r.parents,u=V(Ru(bt.fromDom(i.getRoot()),'*[data-mce-selected="inline-boundary"]'),function(e){return e.dom}),c=K(u,o),s=K(a,o),q(ne(c,s),_(ix,!1)),q(ne(s,c),_(ix,!0)),ux(e,t),function(e,t,n,r){if(t.selection.isCollapsed()){var o=K(r,e);q(o,function(r){var o=yc.fromRangeStart(t.selection.getRng());fw(e,t.getBody(),o).bind(function(e){return ax(t,n,e)})})}}(n,e,t,r.parents))}),t},lx=_(sx,!0),dx=_(sx,!1),mx=function(e,t,n){if(fs(e)){var r=nx(e,t).getOrThunk(function(){var n=e.selection.getRng();return t?yc.fromRangeEnd(n):yc.fromRangeStart(n)});return fw(_(Qy,e),e.getBody(),r).exists(function(t){var r=mw(t);return ZC(n,r).exists(function(t){return ox(e,t),!0})})}return!1},gx=function(e,t){return function(n){return ZC(t,n).exists(function(t){return ox(e,t),!0})}},px=function(e,t,n,r){var o=e.getBody(),i=_(Qy,e);e.undoManager.ignore(function(){e.selection.setRng(function(e,t){var n=document.createRange();return n.setStart(e.container(),e.offset()),n.setEnd(t.container(),t.offset()),n}(n,r)),e.execCommand("Delete"),fw(i,o,yc.fromRangeStart(e.selection.getRng())).map(gw).map(gx(e,t))}),e.nodeChanged()},hx=function(e,t,n,r){var o=function(e,t){var n=Vs(t,e);return n||e}(e.getBody(),r.container()),i=_(Qy,e),a=fw(i,o,r);return a.bind(function(e){return n?e.fold(N(I.some(gw(e))),I.none,N(I.some(mw(e))),I.none):e.fold(I.none,N(I.some(mw(e))),I.none,N(I.some(gw(e))))}).map(gx(e,t)).getOrThunk(function(){var u=wf(n,o,r),c=u.bind(function(e){return fw(i,o,e)});return Fn(a,c,function(){return eC(i,o,r).exists(function(t){return!!function(e){return Fn(kf(e),_f(e),function(t,n){var r=tC(!0,t),o=tC(!1,n);return Nf(e,r).forall(function(e){return e.isEqual(o)})}).getOr(!0)}(t)&&(rp(e,n,bt.fromDom(t)),!0)})}).orThunk(function(){return c.bind(function(o){return u.map(function(o){return n?px(e,t,r,o):px(e,t,o,r),!0})})}).getOr(!1)})},vx=function(e,t,n){if(e.selection.isCollapsed()&&fs(e)){var r=yc.fromRangeStart(e.selection.getRng());return hx(e,t,n,r)}return!1},bx=function(e){return 1===qt(e)},yx=function(e,t,n,r){var o=_(bh,t),i=V(K(r,o),function(e){return e.dom});if(0===i.length)rp(t,e,n);else{var a=function(e,t){var n=lh(!1),r=ph(t,n.dom);return Qt(bt.fromDom(e),n),on(bt.fromDom(e)),yc(r,0)}(n.dom,i);t.selection.setRng(a.toRange())}}
90,Cx=function(e,t){var n=bt.fromDom(e.getBody()),r=bt.fromDom(e.selection.getStart()),o=K(function(e,t){var n=gg(t,e);return Q(n,Zr).fold(N(n),function(e){return n.slice(0,e)})}(n,r),bx);return ae(o).exists(function(n){var r,i=yc.fromRangeStart(e.selection.getRng());return!(!function(e,t,n){return Fn(kf(n),_f(n),function(r,o){var i=tC(!0,r),a=tC(!1,o),u=tC(!1,t);return e?Nf(n,u).exists(function(e){return e.isEqual(a)&&t.isEqual(i)}):Ef(n,u).exists(function(e){return e.isEqual(i)&&t.isEqual(a)})}).getOr(!0)}(t,i,n.dom)||(r=n,Af(r.dom)&&sh(r.dom)))&&(yx(t,e,n,o),!0)})},wx=function(e,t){return!!e.selection.isCollapsed()&&Cx(e,t)},xx=function(e,t,n){return e._selectionOverrides.hideFakeCaret(),rp(e,t,bt.fromDom(n)),!0},Sx=function(e,t){return e.selection.isCollapsed()?function(e,t){var n=t?rg:og,r=t?Cc.Forwards:Cc.Backwards,o=Zs(r,e.getBody(),e.selection.getRng());return n(o)?xx(e,t,o.getNode(!t)):I.from(tC(t,o)).filter(function(e){return n(e)&&nf(o,e)}).exists(function(n){return xx(e,t,n.getNode(!t))})}(e,t):function(e,t){var n=e.selection.getNode();return!!In(n)&&xx(e,t,n)}(e,t)},Nx=function(e){var t=parseInt(e,10);return isNaN(t)?0:t},Ex=function(e,t){return(e||"table"===Et(t)?"margin":"padding")+("rtl"===Xn(t,"direction")?"-right":"-left")},kx=function(e){var t=Ax(e);return!e.mode.isReadOnly()&&(t.length>1||function(e,t){return ee(t,function(t){var n=Ex(os(e),t),r=Gn(t,n).map(Nx).getOr(0);return"false"!==e.dom.getContentEditable(t.dom)&&r>0})}(e,t))},_x=function(e){return ro(e)||oo(e)},Ax=function(e){return K((t=e.selection.getSelectedBlocks(),V(t,bt.fromDom)),function(e){return!_x(e)&&!function(e){return Lt(e).exists(_x)}(e)&&Fr(e,function(e){return Bn(e.dom)||Pn(e.dom)}).exists(function(e){return Bn(e.dom)})});var t},Rx=function(e,t){var n=e.dom,r=e.selection,o=e.formatter,i=function(e){return e.getParam("indentation","40px","string")}(e),a=/[a-z%]+$/i.exec(i)[0],u=parseInt(i,10),c=os(e),s=Wc(e);e.queryCommandState("InsertUnorderedList")||e.queryCommandState("InsertOrderedList")||""!==s||n.getParent(r.getNode(),n.isBlock)||o.apply("div"),q(Ax(e),function(e){!function(e,t,n,r,o,i){var a=Ex(n,bt.fromDom(i));if("outdent"===t){var u=Math.max(0,Nx(i.style[a])-r);e.setStyle(i,a,u?u+o:"")}else u=Nx(i.style[a])+r+o,e.setStyle(i,a,u)}(n,t,c,u,a,e.dom)})},Dx=function(e,t){if(e.selection.isCollapsed()&&kx(e)){var n=e.dom,r=e.selection.getRng(),o=yc.fromRangeStart(r),i=n.getParent(r.startContainer,n.isBlock);if(null!==i&&yg(bt.fromDom(i),o))return Rx(e,"outdent"),!0}return!1},Tx=function(e,t){e.getDoc().execCommand(t,!1,null)},Ox=function(e,t){e.addCommand("delete",function(){!function(e,t){Dx(e)||jC(e,!1)||BC(e,!1)||vx(e,t,!1)||yC(e,!1)||Bp(e)||VC(e,!1)||Sx(e,!1)||SC(e)||wx(e,!1)||(Tx(e,"Delete"),aC(e))}(e,t)}),e.addCommand("forwardDelete",function(){!function(e,t){jC(e,!0)||BC(e,!0)||vx(e,t,!0)||yC(e,!0)||Bp(e)||VC(e,!0)||Sx(e,!0)||SC(e)||wx(e,!0)||Tx(e,"ForwardDelete")}(e,t)})},Bx=function(e){return void 0===e.touches||1!==e.touches.length?I.none():I.some(e.touches[0])},Px=function(e){var t=bu(),n=du(!1),r=Cu(function(t){e.fire("longpress",Re(Re({},t),{type:"longpress"})),n.set(!0)},400);e.on("touchstart",function(e){Bx(e).each(function(o){r.cancel();var i={x:o.clientX,y:o.clientY,target:e.target};r.throttle(e),n.set(!1),t.set(i)})},!0),e.on("touchmove",function(o){r.cancel(),Bx(o).each(function(r){t.on(function(o){(function(e,t){var n=Math.abs(e.clientX-t.x),r=Math.abs(e.clientY-t.y);return n>5||r>5})(r,o)&&(t.clear(),n.set(!1),e.fire("longpresscancel"))})})},!0),e.on("touchend touchcancel",function(o){r.cancel(),"touchcancel"!==o.type&&t.get().filter(function(e){return e.target.isEqualNode(o.target)}).each(function(){n.get()?o.preventDefault():e.fire("tap",Re(Re({},o),{type:"tap"}))})},!0)},Lx=function(e,t){return ye(e,t.nodeName)},Ix=function(e,t){return!!_n(t)||!!yn(t)&&(!Lx(e,t)&&!zf(t))},Mx=function(e,t){if(_n(t)){if(0===t.nodeValue.length)return!0;if(/^\s+$/.test(t.nodeValue)&&(!t.nextSibling||Lx(e,t.nextSibling)))return!0}return!1},Fx=function(e){var t,n,r,o=e.dom,i=e.selection,a=e.schema,u=a.getBlockElements(),c=i.getStart(),s=e.getBody(),f=Wc(e);if(c&&yn(c)&&f){var l=s.nodeName.toLowerCase();if(a.isValidChild(l,f.toLowerCase())&&!function(e,t,n){return j(mg(bt.fromDom(n),bt.fromDom(t)),function(t){return Lx(e,t.dom)})}(u,s,c)){var d=i.getRng(),m=d.startContainer,g=d.startOffset,p=d.endContainer,h=d.endOffset,v=sm(e);for(c=s.firstChild;c;)if(Ix(u,c)){if(Mx(u,c)){n=c,c=c.nextSibling,o.remove(n);continue}t||(t=o.create(f,Kc(e)),c.parentNode.insertBefore(t,c),r=!0),n=c,c=c.nextSibling,t.appendChild(n)}else t=null,c=c.nextSibling;r&&v&&(d.setStart(m,g),d.setEnd(p,h),i.setRng(d),e.nodeChanged())}}},Ux=function(e,t){t.hasAttribute("data-mce-caret")&&(So(t),function(e){e.selection.setRng(e.selection.getRng())}(e),e.selection.scrollIntoView(t))},zx=function(e,t){var n=function(e){return Hr(bt.fromDom(e.getBody()),"*[data-mce-caret]").map(function(e){return e.dom}).getOrNull()}(e);if(n)return"compositionstart"===t.type?(t.preventDefault(),t.stopPropagation(),void Ux(e,n)):void(vo(n)&&(Ux(e,n),e.undoManager.add()))},Hx=Pn,jx=function(e,t,n){var r=pf(e.getBody()),o=_(tf,1===t?r.next:r.prev);if(n.collapsed&&function(e){return""!==Wc(e)}(e)){var i=e.dom.getParent(n.startContainer,"PRE");if(!i)return;if(!o(yc.fromRangeStart(n))){var a=function(e){var t=e.dom.create(Wc(e));return(!lt.ie||lt.ie>=11)&&(t.innerHTML='<br data-mce-bogus="1">'),t}(e);1===t?e.$(i).after(a):e.$(i).before(a),e.selection.select(a,!0),e.selection.collapse()}}},Vx=function(e,t){var n=t?Cc.Forwards:Cc.Backwards,r=e.selection.getRng();return function(e,t,n){return ex(t,e,n,ug,cg,Hx)}(n,e,r).orThunk(function(){return jx(e,n,r),I.none()})},qx=function(e,t){var n=t?1:-1,r=e.selection.getRng();return function(e,t,n){return tx(t,e,n,function(e){return ug(e)||ig(e)},function(e){return cg(e)||ag(e)},Hx)}(n,e,r).orThunk(function(){return jx(e,n,r),I.none()})},$x=function(e,t){return Vx(e,t).exists(function(t){return Qw(e,t),!0})},Wx=function(e,t){return qx(e,t).exists(function(t){return Qw(e,t),!0})},Kx=function(e,t){return rx(e,t,t?cg:ug)},Xx=function(e){return H(["figcaption"],Et(e))},Yx=function(e){var t=document.createRange();return t.setStartBefore(e.dom),t.setEndBefore(e.dom),t},Gx=function(e,t,n){n?tn(e,t):en(e,t)},Jx=function(e,t,n,r){return""===t?function(e,t){var n=bt.fromTag("br");return Gx(e,n,t),Yx(n)}(e,r):function(e,t,n,r){var o=bt.fromTag(n),i=bt.fromTag("br");return jn(o,r),tn(o,i),Gx(e,o,t),Yx(i)}(e,r,t,n)},Qx=function(e,t,n){return t?function(e,t){return Tw(e,t).breakAt.isNone()}(e.dom,n):function(e,t){return Dw(e,t).breakAt.isNone()}(e.dom,n)}
90,Zx=function(e,t){var n=bt.fromDom(e.getBody()),r=yc.fromRangeStart(e.selection.getRng()),o=Wc(e),i=Kc(e);return function(e,t){var n=_(xt,t);return Fr(bt.fromDom(e.container()),Zr,n).filter(Xx)}(r,n).exists(function(){if(Qx(n,t,r)){var a=Jx(n,o,i,t);return e.selection.setRng(a),!0}return!1})},eS=function(e,t){return!!e.selection.isCollapsed()&&Zx(e,t)},tS=function(e,t){return Z(function(e){return V(e,function(e){return Re({shiftKey:!1,altKey:!1,ctrlKey:!1,metaKey:!1,keyCode:0,action:w},e)})}(e),function(e){return function(e,t){return t.keyCode===e.keyCode&&t.shiftKey===e.shiftKey&&t.altKey===e.altKey&&t.ctrlKey===e.ctrlKey&&t.metaKey===e.metaKey}(e,t)?[e]:[]})},nS=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return function(){return e.apply(null,t)}},rS=function(e,t){return J(tS(e,t),function(e){return e.action()})},oS=function(e,t){var n=t?Cc.Forwards:Cc.Backwards,r=e.selection.getRng();return ex(e,n,r,rg,og,In).exists(function(t){return Qw(e,t),!0})},iS=function(e,t){var n=t?1:-1,r=e.selection.getRng();return tx(e,n,r,rg,og,In).exists(function(t){return Qw(e,t),!0})},aS=function(e,t){return rx(e,t,t?og:rg)},uS=function(e,t,n,r,o){var i=Ru(bt.fromDom(n),"td,th,caption").map(function(e){return e.dom});return function(e,t,n){return Y(e,function(e,r){return e.fold(function(){return I.some(r)},function(e){var o=Math.sqrt(Math.abs(e.x-t)+Math.abs(e.y-n)),i=Math.sqrt(Math.abs(r.x-t)+Math.abs(r.y-n));return I.some(i<o?r:e)})},I.none())}(K(function(e,t){return Z(t,function(t){var n=function(e,t){return{left:e.left-t,top:e.top-t,right:e.right+2*t,bottom:e.bottom+2*t,width:e.width+t,height:e.height+t}}(Wu(t.getBoundingClientRect()),-1);return[{x:n.left,y:e(n),cell:t},{x:n.right,y:e(n),cell:t}]})}(e,i),function(e){return t(e,o)}),r,o).map(function(e){return e.cell})},cS=_(uS,function(e){return e.bottom},function(e,t){return e.y<t}),sS=_(uS,function(e){return e.top},function(e,t){return e.y>t}),fS=function(e,t){return ie(t.getClientRects()).bind(function(t){return cS(e,t.left,t.top)}).bind(function(e){return Rw(_f(n=e).map(function(e){return Dw(n,e).positions.concat(e)}).getOr([]),t);var n})},lS=function(e,t){return ae(t.getClientRects()).bind(function(t){return sS(e,t.left,t.top)}).bind(function(e){return Rw(kf(n=e).map(function(e){return[e].concat(Tw(n,e).positions)}).getOr([]),t);var n})},dS=function(e,t,n){var r=e(t,n);return function(e){return e.breakType===yw.Wrap&&0===e.positions.length}(r)||!Tn(n.getNode())&&function(e){return e.breakType===yw.Br&&1===e.positions.length}(r)?!function(e,t,n){return n.breakAt.exists(function(n){return e(t,n).breakAt.isSome()})}(e,t,r):r.breakAt.isNone()},mS=_(dS,Dw),gS=_(dS,Tw),pS=function(e,t,n,r){var o=e.selection.getRng(),i=t?1:-1;return!(!Rs()||!function(e,t,n){var r=yc.fromRangeStart(t);return Sf(!e,n).exists(function(e){return e.isEqual(r)})}(t,o,n))&&(kC(i,e,n,!t,!1).each(function(t){Qw(e,t)}),!0)},hS=function(e,t){var n=t.getNode(e);return yn(n)&&"TABLE"===n.nodeName?I.some(n):I.none()},vS=function(e,t,n){var r=hS(!!t,n),o=!1===t;r.fold(function(){return Qw(e,n.toRange())},function(r){return Sf(o,e.getBody()).filter(function(e){return e.isEqual(n)}).fold(function(){return Qw(e,n.toRange())},function(o){return function(e,t,n,r){var o=Wc(t);o?t.undoManager.transact(function(){var r=bt.fromTag(o);jn(r,Kc(t)),tn(r,bt.fromTag("br")),e?Zt(bt.fromDom(n),r):Qt(bt.fromDom(n),r);var i=t.dom.createRng();i.setStart(r.dom,0),i.setEnd(r.dom,0),Qw(t,i)}):Qw(t,r.toRange())}(t,e,r,n)})})},bS=function(e,t,n,r){var o=e.selection.getRng(),i=yc.fromRangeStart(o),a=e.getBody();if(!t&&mS(r,i)){var u=function(e,t,n){return fS(t,n).orThunk(function(){return ie(n.getClientRects()).bind(function(n){return Aw(Ow(e,yc.before(t)),n.left)})}).getOr(yc.before(t))}(a,n,i);return vS(e,t,u),!0}if(t&&gS(r,i)){u=function(e,t,n){return lS(t,n).orThunk(function(){return ie(n.getClientRects()).bind(function(n){return Aw(Bw(e,yc.after(t)),n.left)})}).getOr(yc.after(t))}(a,n,i);return vS(e,t,u),!0}return!1},yS=function(e,t,n){return I.from(e.dom.getParent(e.selection.getNode(),"td,th")).bind(function(r){return I.from(e.dom.getParent(r,"table")).map(function(o){return n(e,t,o,r)})}).getOr(!1)},CS=function(e,t){return yS(e,t,pS)},wS=function(e,t){return yS(e,t,bS)}
90,xS=function(e,t){e.on("keydown",function(n){!1===n.isDefaultPrevented()&&function(e,t,n){var r=nt().os;rS([{keyCode:Xl.RIGHT,action:nS($x,e,!0)},{keyCode:Xl.LEFT,action:nS($x,e,!1)},{keyCode:Xl.UP,action:nS(Wx,e,!1)},{keyCode:Xl.DOWN,action:nS(Wx,e,!0)},{keyCode:Xl.RIGHT,action:nS(CS,e,!0)},{keyCode:Xl.LEFT,action:nS(CS,e,!1)},{keyCode:Xl.UP,action:nS(wS,e,!1)},{keyCode:Xl.DOWN,action:nS(wS,e,!0)},{keyCode:Xl.RIGHT,action:nS(oS,e,!0)},{keyCode:Xl.LEFT,action:nS(oS,e,!1)},{keyCode:Xl.UP,action:nS(iS,e,!1)},{keyCode:Xl.DOWN,action:nS(iS,e,!0)},{keyCode:Xl.RIGHT,action:nS(cx,e,t,!0)},{keyCode:Xl.LEFT,action:nS(cx,e,t,!1)},{keyCode:Xl.RIGHT,ctrlKey:!r.isOSX(),altKey:r.isOSX(),action:nS(lx,e,t)},{keyCode:Xl.LEFT,ctrlKey:!r.isOSX(),altKey:r.isOSX(),action:nS(dx,e,t)},{keyCode:Xl.UP,action:nS(eS,e,!1)},{keyCode:Xl.DOWN,action:nS(eS,e,!0)}],n).each(function(e){n.preventDefault()})}(e,t,n)})},SS=function(e,t){e.on("keydown",function(n){!1===n.isDefaultPrevented()&&function(e,t,n){rS([{keyCode:Xl.BACKSPACE,action:nS(Dx,e,!1)},{keyCode:Xl.BACKSPACE,action:nS(jC,e,!1)},{keyCode:Xl.DELETE,action:nS(jC,e,!0)},{keyCode:Xl.BACKSPACE,action:nS(BC,e,!1)},{keyCode:Xl.DELETE,action:nS(BC,e,!0)},{keyCode:Xl.BACKSPACE,action:nS(vx,e,t,!1)},{keyCode:Xl.DELETE,action:nS(vx,e,t,!0)},{keyCode:Xl.BACKSPACE,action:nS(Bp,e,!1)},{keyCode:Xl.DELETE,action:nS(Bp,e,!0)},{keyCode:Xl.BACKSPACE,action:nS(VC,e,!1)},{keyCode:Xl.DELETE,action:nS(VC,e,!0)},{keyCode:Xl.BACKSPACE,action:nS(Sx,e,!1)},{keyCode:Xl.DELETE,action:nS(Sx,e,!0)},{keyCode:Xl.BACKSPACE,action:nS(SC,e,!1)},{keyCode:Xl.DELETE,action:nS(SC,e,!0)},{keyCode:Xl.BACKSPACE,action:nS(yC,e,!1)},{keyCode:Xl.DELETE,action:nS(yC,e,!0)},{keyCode:Xl.BACKSPACE,action:nS(wx,e,!1)},{keyCode:Xl.DELETE,action:nS(wx,e,!0)}],n).each(function(e){n.preventDefault()})}(e,t,n)}),e.on("keyup",function(t){!1===t.isDefaultPrevented()&&function(e,t){rS([{keyCode:Xl.BACKSPACE,action:nS(HC,e)},{keyCode:Xl.DELETE,action:nS(HC,e)}],t)}(e,t)})},NS=function(e,t){var n,r=t,o=e.dom,i=e.schema.getMoveCaretBeforeOnEnterElements();if(t){if(/^(LI|DT|DD)$/.test(t.nodeName)){var a=function(e){for(;e;){if(1===e.nodeType||3===e.nodeType&&e.data&&/[\r\n\s]/.test(e.data))return e;e=e.nextSibling}}(t.firstChild);a&&/^(UL|OL|DL)$/.test(a.nodeName)&&t.insertBefore(o.doc.createTextNode(" "),t.firstChild)}var u=o.createRng();if(t.normalize(),t.hasChildNodes()){for(var c=new Gr(t,t);n=c.current();){if(_n(n)){u.setStart(n,0),u.setEnd(n,0);break}if(i[n.nodeName.toLowerCase()]){u.setStartBefore(n),u.setEndBefore(n);break}r=n,n=c.next()}n||(u.setStart(r,0),u.setEnd(r,0))}else Tn(t)?t.nextSibling&&o.isBlock(t.nextSibling)?(u.setStartBefore(t),u.setEndBefore(t)):(u.setStartAfter(t),u.setEndAfter(t)):(u.setStart(t,0),u.setEnd(t,0));e.selection.setRng(u),Bd(e,u)}},ES=function(e){return I.from(e.dom.getParent(e.selection.getStart(!0),e.dom.isBlock))},kS=function(e,t){return e&&e.parentNode&&e.parentNode.nodeName===t},_S=function(e){return e&&/^(OL|UL|LI)$/.test(e.nodeName)},AS=function(e){var t=e.parentNode;return/^(LI|DT|DD)$/.test(t.nodeName)?t:e},RS=function(e,t,n){for(var r=e[n?"firstChild":"lastChild"];r&&!yn(r);)r=r[n?"nextSibling":"previousSibling"];return r===t},DS=function(e,t,n,r,o){var i=e.dom,a=e.selection.getRng();if(n!==e.getBody()){var u;_S(u=n)&&_S(u.parentNode)&&(o="LI");var c=o?t(o):i.create("BR");if(RS(n,r,!0)&&RS(n,r,!1))if(kS(n,"LI")){var s=AS(n);i.insertAfter(c,s),!function(e){var t;return(null===(t=e.parentNode)||void 0===t?void 0:t.firstChild)===e}(n)?i.remove(n):i.remove(s)}else i.replace(c,n);else if(RS(n,r,!0))kS(n,"LI")?(i.insertAfter(c,AS(n)),c.appendChild(i.doc.createTextNode(" ")),c.appendChild(n)):n.parentNode.insertBefore(c,n),i.remove(r);else if(RS(n,r,!1))i.insertAfter(c,AS(n)),i.remove(r);else{n=AS(n);var f=a.cloneRange();f.setStartAfter(r),f.setEndAfter(n);var l=f.extractContents();"LI"===o&&function(e,t){return e.firstChild&&e.firstChild.nodeName===t}(l,"LI")?(c=l.firstChild,i.insertAfter(l,n)):(i.insertAfter(l,n),i.insertAfter(c,n)),i.remove(r)}NS(e,c)}},TS=function(e,t){return t&&"A"===t.nodeName&&e.isEmpty(t)},OS=function(e){e.innerHTML='<br data-mce-bogus="1">'}
90,BS=function(e,t){return e.nodeName===t||e.previousSibling&&e.previousSibling.nodeName===t},PS=function(e,t){return t&&e.isBlock(t)&&!/^(TD|TH|CAPTION|FORM)$/.test(t.nodeName)&&!/^(fixed|absolute)/i.test(t.style.position)&&"true"!==e.getContentEditable(t)},LS=function(e,t,n){return!1===_n(t)?n:e?1===n&&t.data.charAt(n-1)===co?0:n:n===t.data.length-1&&t.data.charAt(n)===co?t.data.length:n},IS=function(e,t){var n,r,o=e.getRoot();for(n=t;n!==o&&"false"!==e.getContentEditable(n);)"true"===e.getContentEditable(n)&&(r=n),n=n.parentNode;return n!==o?r:o},MS=function(e,t){var n=Wc(e);n&&n.toLowerCase()===t.tagName.toLowerCase()&&function(e,t,n){var r=e.dom;I.from(n.style).map(r.parseStyle).each(function(e){var n=Jn(bt.fromDom(t)),o=Re(Re({},n),e);r.setStyles(t,o)});var o=I.from(n.class).map(function(e){return e.split(/\s+/)}),i=I.from(t.className).map(function(e){return K(e.split(/\s+/),function(e){return""!==e})});Fn(o,i,function(e,n){var o=K(n,function(t){return!H(e,t)}),i=De(De([],e,!0),o,!0);r.setAttrib(t,"class",i.join(" "))});var a=["style","class"],u=he(n,function(e,t){return!H(a,t)});r.setAttribs(t,u)}(e,t,Kc(e))},FS=function(e,t){var n,r,o,i,a,u,c,s,f,l,d=e.dom,m=e.schema,g=m.getNonEmptyElements(),p=e.selection.getRng(),h=function(t){var n,o,a,u=r,c=m.getTextInlineElements();if(a=n=t||"TABLE"===s||"HR"===s?d.create(t||f):i.cloneNode(!1),!1===function(e){return e.getParam("keep_styles",!0)}(e))d.setAttrib(n,"style",null),d.setAttrib(n,"class",null);else do{if(c[u.nodeName]){if(Af(u)||zf(u))continue;o=u.cloneNode(!1),d.setAttrib(o,"id",""),n.hasChildNodes()?(o.appendChild(n.firstChild),n.appendChild(o)):(a=o,n.appendChild(o))}}while((u=u.parentNode)&&u!==w);return MS(e,n),OS(a),n},v=function(e){var t,n,a=LS(e,r,o);if(_n(r)&&(e?a>0:a<r.nodeValue.length))return!1;if(r.parentNode===i&&l&&!e)return!0;if(e&&yn(r)&&r===i.firstChild)return!0;if(BS(r,"TABLE")||BS(r,"HR"))return l&&!e||!l&&e;var u=new Gr(r,i);for(_n(r)&&(e&&0===a?u.prev():e||a!==r.nodeValue.length||u.next());t=u.current();){if(yn(t)){if(!t.getAttribute("data-mce-bogus")&&(n=t.nodeName.toLowerCase(),g[n]&&"br"!==n))return!1}else if(_n(t)&&!Mo(t.nodeValue))return!1;e?u.prev():u.next()}return!0},b=function(){a=/^(H[1-6]|PRE|FIGURE)$/.test(s)&&"HGROUP"!==x?h(f):h(),function(e){return e.getParam("end_container_on_empty_block",!1)}(e)&&PS(d,c)&&d.isEmpty(i)?a=d.split(c,i):d.insertAfter(a,i),NS(e,a)};cd(d,p).each(function(e){p.setStart(e.startContainer,e.startOffset),p.setEnd(e.endContainer,e.endOffset)}),r=p.startContainer,o=p.startOffset,f=Wc(e);var y=!(!t||!t.shiftKey),C=!(!t||!t.ctrlKey);yn(r)&&r.hasChildNodes()&&(l=o>r.childNodes.length-1,r=r.childNodes[Math.min(o,r.childNodes.length-1)]||r,o=l&&_n(r)?r.nodeValue.length:0);var w=IS(d,r);if(w){(f&&!y||!f&&y)&&(r=function(e,t,n,r,o){var i,a,u,c,s,f,l=t||"P",d=e.dom,m=IS(d,r);if(!(a=d.getParent(r,d.isBlock))||!PS(d,a)){if(f=(a=a||m)===e.getBody()||function(e){return e&&/^(TD|TH|CAPTION)$/.test(e.nodeName)}(a)?a.nodeName.toLowerCase():a.parentNode.nodeName.toLowerCase(),!a.hasChildNodes())return i=d.create(l),MS(e,i),a.appendChild(i),n.setStart(i,0),n.setEnd(i,0),i;for(c=r;c.parentNode!==a;)c=c.parentNode;for(;c&&!d.isBlock(c);)u=c,c=c.previousSibling;if(u&&e.schema.isValidChild(f,l.toLowerCase())){for(i=d.create(l),MS(e,i),u.parentNode.insertBefore(i,u),c=u;c&&!d.isBlock(c);)s=c.nextSibling,i.appendChild(c),c=s;n.setStart(r,o),n.setEnd(r,o)}}return r}(e,f,p,r,o)),i=d.getParent(r,d.isBlock),c=i?d.getParent(i.parentNode,d.isBlock):null,s=i?i.nodeName.toUpperCase():"";var x=c?c.nodeName.toUpperCase():"";"LI"!==x||C||(i=c,c=c.parentNode,s=x),/^(LI|DT|DD)$/.test(s)&&d.isEmpty(i)?DS(e,h,c,i,f):f&&i===e.getBody()||(f=f||"P",go(i)?(a=So(i),d.isEmpty(i)&&OS(i),MS(e,a),NS(e,a)):v()?b():v(!0)?(a=i.parentNode.insertBefore(h(),i),NS(e,BS(i,"HR")?a:i)):((n=function(e){var t=e.cloneRange();return t.setStart(e.startContainer,LS(!0,e.startContainer,e.startOffset)),t.setEnd(e.endContainer,LS(!1,e.endContainer,e.endOffset)),t}(p).cloneRange()).setEndAfter(i),function(e){q(Au(bt.fromDom(e),Rt),function(e){var t=e.dom;t.nodeValue=fo(t.nodeValue)})}(u=n.extractContents()),function(e){do{_n(e)&&(e.nodeValue=e.nodeValue.replace(/^[\r\n]+/,"")),e=e.firstChild}while(e)}(u),a=u.firstChild,d.insertAfter(u,i),function(e,t,n){var r,o=n,i=[];if(o){for(;o=o.firstChild;){if(e.isBlock(o))return;yn(o)&&!t[o.nodeName.toLowerCase()]&&i.push(o)}for(r=i.length;r--;)!(o=i[r]).hasChildNodes()||o.firstChild===o.lastChild&&""===o.firstChild.nodeValue?e.remove(o):TS(e,o)&&e.remove(o)}}(d,g,a),function(e,t){t.normalize();var n=t.lastChild;n&&!/^(left|right)$/gi.test(e.getStyle(n,"float",!0))||e.add(t,"br")}(d,i),d.isEmpty(i)&&OS(i),a.normalize(),d.isEmpty(a)?(d.remove(a),b()):(MS(e,a),NS(e,a))),d.setAttrib(a,"id",""),e.fire("NewBlock",{newBlock:a}))}},US=function(e,t,n){var r=e.dom.createRng();n?(r.setStartBefore(t),r.setEndBefore(t)):(r.setStartAfter(t),r.setEndAfter(t)),e.selection.setRng(r),Bd(e,r)},zS=function(e,t){var n,r,o=e.selection,i=e.dom,a=o.getRng();cd(i,a).each(function(e){a.setStart(e.startContainer,e.startOffset),a.setEnd(e.endContainer,e.endOffset)});var u=a.startOffset,c=a.startContainer;if(1===c.nodeType&&c.hasChildNodes()){var s=u>c.childNodes.length-1;c=c.childNodes[Math.min(u,c.childNodes.length-1)]||c,u=s&&3===c.nodeType?c.nodeValue.length:0}var f=i.getParent(c,i.isBlock),l=f?i.getParent(f.parentNode,i.isBlock):null,d=l?l.nodeName.toUpperCase():"",m=!(!t||!t.ctrlKey);"LI"!==d||m||(f=l),c&&3===c.nodeType&&u>=c.nodeValue.length&&(function(e,t,n){for(var r,o=new Gr(t,n),i=e.getNonEmptyElements();r=o.next();)if(i[r.nodeName.toLowerCase()]||r.length>0)return!0}(e.schema,c,f)||(n=i.create("br"),a.insertNode(n),a.setStartAfter(n),a.setEndAfter(n),r=!0)),n=i.create("br"),xc(i,a,n),US(e,n,r),e.undoManager.add()},HS=function(e,t){var n=bt.fromTag("br");Qt(bt.fromDom(t),n),e.undoManager.add()},jS=function(e,t){VS(e.getBody(),t)||Zt(bt.fromDom(t),bt.fromTag("br"));var n=bt.fromTag("br");Zt(bt.fromDom(t),n),US(e,n.dom,!1),e.undoManager.add()},VS=function(e,t){return n=yc.after(t),!!Tn(n.getNode())||Nf(e,yc.after(t)).map(function(e){return Tn(e.getNode())}).getOr(!1);var n},qS=function(e){return e&&"A"===e.nodeName&&"href"in e},$S=function(e){return e.fold(T,qS,qS,T)},WS=function(e,t){t.fold(w,_(HS,e),_(jS,e),w)},KS=function(e,t){var n=function(e){var t=_(Qy,e),n=yc.fromRangeStart(e.selection.getRng());return fw(t,e.getBody(),n).filter($S)}(e);n.isSome()?n.each(_(WS,e)):zS(e,t)},XS=function(e,t){return ES(e).filter(function(e){return t.length>0&&Ct(bt.fromDom(e),t)}).isSome()},YS=gr([{br:[]},{block:[]},{none:[]}]),GS=function(e,t){return function(e){return XS(e,function(e){return e.getParam("no_newline_selector","")}(e))}(e)},JS=function(e){return function(t,n){return""===Wc(t)===e}},QS=function(e){return function(t,n){return function(e){return ES(e).filter(function(e){return oo(bt.fromDom(e))}).isSome()}(t)===e}},ZS=function(e,t){return function(n,r){return function(e){return ES(e).fold(N(""),function(e){return e.no
90deName.toUpperCase()})}(n)===e.toUpperCase()===t}},eN=function(e){return ZS("pre",e)},tN=function(e){return function(t,n){return function(e){return e.getParam("br_in_pre",!0)}(t)===e}},nN=function(e,t){return function(e){return XS(e,function(e){return e.getParam("br_newline_selector",".mce-toc h2,figcaption,caption")}(e))}(e)},rN=function(e,t){return t},oN=function(e){var t=Wc(e),n=function(e,t){var n,r,o=e.getRoot();for(n=t;n!==o&&"false"!==e.getContentEditable(n);)"true"===e.getContentEditable(n)&&(r=n),n=n.parentNode;return n!==o?r:o}(e.dom,e.selection.getStart());return n&&e.schema.isValidChild(n.nodeName,t||"P")},iN=function(e,t){return function(n,r){return Y(e,function(e,t){return e&&t(n,r)},!0)?I.some(t):I.none()}},aN=function(e,t){(function(e,t){return ew([iN([GS],YS.none()),iN([ZS("summary",!0)],YS.br()),iN([eN(!0),tN(!1),rN],YS.br()),iN([eN(!0),tN(!1)],YS.block()),iN([eN(!0),tN(!0),rN],YS.block()),iN([eN(!0),tN(!0)],YS.br()),iN([QS(!0),rN],YS.br()),iN([QS(!0)],YS.block()),iN([JS(!0),rN,oN],YS.block()),iN([JS(!0)],YS.br()),iN([nN],YS.br()),iN([JS(!1),rN],YS.br()),iN([oN],YS.block())],[e,!(!t||!t.shiftKey)]).getOr(YS.none())})(e,t).fold(function(){KS(e,t)},function(){FS(e,t)},w)},uN=function(e){e.on("keydown",function(t){t.keyCode===Xl.ENTER&&function(e,t){var n;t.isDefaultPrevented()||(t.preventDefault(),(n=e.undoManager).typing&&(n.typing=!1,n.add()),e.undoManager.transact(function(){!1===e.selection.isCollapsed()&&e.execCommand("Delete"),aN(e,t)}))}(e,t)})},cN=function(e,t){e.on("keydown",function(n){!1===n.isDefaultPrevented()&&function(e,t,n){rS([{keyCode:Xl.END,action:nS(Kx,e,!0)},{keyCode:Xl.HOME,action:nS(Kx,e,!1)},{keyCode:Xl.END,action:nS(aS,e,!0)},{keyCode:Xl.HOME,action:nS(aS,e,!1)},{keyCode:Xl.END,action:nS(mx,e,!0,t)},{keyCode:Xl.HOME,action:nS(mx,e,!1,t)}],n).each(function(e){n.preventDefault()})}(e,t,n)})},sN=nt().browser,fN=function(e){!function(e){var t=yu(function(){e.composing||jg(e)},0);sN.isIE()&&(e.on("keypress",function(e){t.throttle()}),e.on("remove",function(e){t.cancel()}))}(e),e.on("input",function(t){!1===t.isComposing&&jg(e)})},lN=nt(),dN=function(e){return e.stopImmediatePropagation()},mN=function(e){return e.keyCode===Xl.PAGE_UP||e.keyCode===Xl.PAGE_DOWN},gN=function(e,t,n){n&&!e.get()?t.on("NodeChange",dN,!0):!n&&e.get()&&t.off("NodeChange",dN),e.set(n)},pN=function(e,t){if(!lN.os.isOSX()){var n=du(!1);e.on("keydown",function(t){mN(t)&&gN(n,e,!0)}),e.on("keyup",function(r){!1===r.isDefaultPrevented()&&function(e,t,n){rS([{keyCode:Xl.PAGE_UP,action:nS(mx,e,!1,t)},{keyCode:Xl.PAGE_DOWN,action:nS(mx,e,!0,t)}],n)}(e,t,r),mN(r)&&n.get()&&(gN(n,e,!1),e.nodeChanged())})}},hN=function(e,t){var n=t.container(),r=t.offset();return _n(n)?(n.insertData(r,e),I.some(yc(n,r+e.length))):ef(t).map(function(n){var r=bt.fromText(e);return t.isAtEnd()?Zt(n,r):Qt(n,r),yc(r.dom,e.length)})},vN=_(hN," "),bN=_(hN," "),yN=function(e,t){return function(n){return function(e,t){return!Bg(t)&&(Pg(e,t)||Tg(e,t)||Og(e,t))}(e,n)?vN(t):bN(t)}},CN=function(e){var t=yc.fromRangeStart(e.selection.getRng()),n=bt.fromDom(e.getBody());if(e.selection.isCollapsed()){var r=_(Qy,e),o=yc.fromRangeStart(e.selection.getRng());return fw(r,e.getBody(),o).bind(function(e){return function(t){return t.fold(function(t){return Ef(e.dom,yc.before(t))},function(e){return kf(e)},function(e){return _f(e)},function(t){return Nf(e.dom,yc.after(t))})}}(n)).bind(yN(n,t)).exists(function(e){return function(t){return e.selection.setRng(t.toRange()),e.nodeChanged(),!0}}(e))}return!1},wN=function(e){e.on("keydown",function(t){!1===t.isDefaultPrevented()&&function(e,t){rS([{keyCode:Xl.SPACEBAR,action:nS(CN,e)}],t).each(function(e){t.preventDefault()})}(e,t)})},xN=function(e){var t=fx(e);return function(e){e.on("keyup compositionstart",_(zx,e))}(e),xS(e,t),SS(e,t),uN(e),wN(e),fN(e),cN(e,t),pN(e,t),t},SN=function(){function e(e){var t;this.lastPath=[],this.editor=e;var n=this;"onselectionchange"in e.getDoc()||e.on("NodeChange click mouseup keyup focus",function(n){var r=e.selection.getRng(),o={startContainer:r.startContainer,startOffset:r.startOffset,endContainer:r.endContainer,endOffset:r.endOffset};
90"nodechange"!==n.type&&Zl(o,t)||e.fire("SelectionChange"),t=o}),e.on("contextmenu",function(){e.fire("SelectionChange")}),e.on("SelectionChange",function(){var t=e.selection.getStart(!0);!t||!lt.range&&e.selection.isCollapsed()||Ol(e)&&!n.isSameElementPath(t)&&e.dom.isChildOf(t,e.getBody())&&e.nodeChanged({selectionChange:!0})}),e.on("mouseup",function(t){!t.isDefaultPrevented()&&Ol(e)&&("IMG"===e.selection.getNode().nodeName?Kr.setEditorTimeout(e,function(){e.nodeChanged()}):e.nodeChanged())})}return e.prototype.nodeChanged=function(e){var t,n,r,o=this.editor.selection;this.editor.initialized&&o&&!this.editor.getParam("disable_nodechange")&&!this.editor.mode.isReadOnly()&&(r=this.editor.getBody(),(t=o.getStart(!0)||r).ownerDocument===this.editor.getDoc()&&this.editor.dom.isChildOf(t,r)||(t=r),n=[],this.editor.dom.getParent(t,function(e){if(e===r)return!0;n.push(e)}),(e=e||{}).element=t,e.parents=n,this.editor.fire("NodeChange",e))},e.prototype.isSameElementPath=function(e){var t,n=this.editor.$(e).parentsUntil(this.editor.getBody()).add(e);if(n.length===this.lastPath.length){for(t=n.length;t>=0&&n[t]===this.lastPath[t];t--);if(-1===t)return this.lastPath=n,!0}return this.lastPath=n,!1},e}(),NN=function(e){!function(e){e.on("click",function(t){e.dom.getParent(t.target,"details")&&t.preventDefault()})}(e),function(e){e.parser.addNodeFilter("details",function(e){q(e,function(e){e.attr("data-mce-open",e.attr("open")),e.attr("open","open")})}),e.serializer.addNodeFilter("details",function(e){q(e,function(e){var t=e.attr("data-mce-open");e.attr("open",l(t)?t:null),e.attr("data-mce-open",null)})})}(e)},EN=function(e){return yn(e)&&no(bt.fromDom(e))},kN=function(e){e.on("click",function(t){t.detail>=3&&function(e){var t=e.selection.getRng(),n=yc.fromRangeStart(t),r=yc.fromRangeEnd(t);if(yc.isElementPosition(n)){var o=n.container();EN(o)&&kf(o).each(function(e){return t.setStart(e.container(),e.offset())})}yc.isElementPosition(r)&&(o=n.container(),EN(o)&&_f(o).each(function(e){return t.setEnd(e.container(),e.offset())}));e.selection.setRng(Lp(t))}(e)})},_N=function(e){var t=e.getBoundingClientRect(),n=e.ownerDocument,r=n.documentElement,o=n.defaultView;return{top:t.top+o.pageYOffset-r.clientTop,left:t.left+o.pageXOffset-r.clientLeft}},AN=function(e,t){return n=function(e){return e.inline?_N(e.getBody()):{left:0,top:0}}(e),r=function(e){var t=e.getBody();return e.inline?{left:t.scrollLeft,top:t.scrollTop}:{left:0,top:0}}(e),{pageX:(o=function(e,t){if(t.target.ownerDocument!==e.getDoc()){var n=_N(e.getContentAreaContainer()),r=function(e){var t=e.getBody(),n=e.getDoc().documentElement,r={left:t.scrollLeft,top:t.scrollTop},o={left:t.scrollLeft||n.scrollLeft,top:t.scrollTop||n.scrollTop};return e.inline?r:o}(e);return{left:t.pageX-n.left+r.left,top:t.pageY-n.top+r.top}}return{left:t.pageX,top:t.pageY}}(e,t)).left-n.left+r.left,pageY:o.top-n.top+r.top};var n,r,o},RN=Pn,DN=Bn,TN=function(e,t,n,r){var o=e.dom,i=t.cloneNode(!0);o.setStyles(i,{width:n,height:r}),o.setAttrib(i,"data-mce-selected",null);var a=o.create("div",{class:"mce-drag-container","data-mce-bogus":"all",unselectable:"on",contenteditable:"false"});return o.setStyles(a,{position:"absolute",opacity:.5,overflow:"hidden",border:0,padding:0,margin:0,width:n,height:r}),o.setStyles(i,{margin:0,boxSizing:"border-box"}),a.appendChild(i),a},ON=function(e){e&&e.parentNode&&e.parentNode.removeChild(e)},BN=function(e,t){return function(n){if(function(e){return 0===e.button}(n)){var r=J(t.dom.getParents(n.target),function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){for(var n=0;n<e.length;n++)if(e[n](t))return!0;return!1}}(RN,DN)).getOr(null);if(u=t.getBody(),RN(c=r)&&c!==u){var o=t.dom.getPos(r),i=t.getBody(),a=t.getDoc().documentElement;e.set({element:r,dragging:!1,screenX:n.screenX,screenY:n.screenY,maxX:(t.inline?i.scrollWidth:a.offsetWidth)-2,maxY:(t.inline?i.scrollHeight:a.offsetHeight)-2,relX:n.pageX-o.x,relY:n.pageY-o.y,width:r.offsetWidth,height:r.offsetHeight,ghost:TN(t,r,r.offsetWidth,r.offsetHeight)})}}var u,c}},PN=function(e,t){return function(n){e.on(function(e){if(e.dragging){if(function(e,t,n){return t!==n&&!e.dom.isChildOf(t,n)&&!RN(t)}(t,(a=t.selection,3===(u=a.getSel().getRangeAt(0).startContainer).nodeType?u.parentNode:u),e.element)){var r=(o=e.element,(i=o.cloneNode(!0)).removeAttribute("data-mce-selected"),i);t.fire("drop",{clientX:n.clientX,clientY:n.clientY}).isDefaultPrevented()||t.undoManager.transact(function(){ON(e.element),t.insertContent(t.dom.getOuterHTML(r)),t._selectionOverrides.hideFakeCaret()})}t.fire("dragend")}var o,i,a,u}),LN(e)}},LN=function(e){e.on(function(e){ON(e.ghost)}),e.clear()},IN=function(e){var t=bu(),n=uu.DOM,r=document,o=BN(t,e),i=function(e,t){var n=Kr.throttle(function(e,n){t._selectionOverrides.hideFakeCaret(),t.selection.placeCaretAt(e,n)},0);return t.on("remove",n.stop),function(r){return e.on(function(e){var o,i,a=Math.max(Math.abs(r.screenX-e.screenX),Math.abs(r.screenY-e.screenY));if(!e.dragging&&a>10){if(t.fire("dragstart",{target:e.element}).isDefaultPrevented())return;
90e.dragging=!0,t.focus()}if(e.dragging){var u=function(e,t){return{pageX:t.pageX-e.relX,pageY:t.pageY+5}}(e,AN(t,r));o=e.ghost,i=t.getBody(),o.parentNode!==i&&i.appendChild(o),function(e,t,n,r,o,i){var a=0,u=0;e.style.left=t.pageX+"px",e.style.top=t.pageY+"px",t.pageX+n>o&&(a=t.pageX+n-o),t.pageY+r>i&&(u=t.pageY+r-i),e.style.width=n-a+"px",e.style.height=r-u+"px"}(e.ghost,u,e.width,e.height,e.maxX,e.maxY),n(r.clientX,r.clientY)}})}}(t,e),a=PN(t,e),u=function(e,t){return function(){e.on(function(e){e.dragging&&t.fire("dragend")}),LN(e)}}(t,e);e.on("mousedown",o),e.on("mousemove",i),e.on("mouseup",a),n.bind(r,"mousemove",i),n.bind(r,"mouseup",u),e.on("remove",function(){n.unbind(r,"mousemove",i),n.unbind(r,"mouseup",u)}),e.on("keydown",function(e){e.keyCode===Xl.ESC&&u()})},MN=function(e){IN(e),function(e){e.on("drop",function(t){var n=void 0!==t.clientX?e.getDoc().elementFromPoint(t.clientX,t.clientY):null;(RN(n)||"false"===e.dom.getContentEditableParent(n))&&t.preventDefault()})}(e),function(e){return e.getParam("block_unsupported_drop",!0,"boolean")}(e)&&function(e){var t=function(t){if(!t.isDefaultPrevented()){var n=t.dataTransfer;n&&(H(n.types,"Files")||n.files.length>0)&&(t.preventDefault(),"drop"===t.type&&Sy(e,"Dropped file type is not supported"))}},n=function(n){nm(e,n.target)&&t(n)},r=function(){var r=uu.DOM,o=e.dom,i=document,a=e.inline?e.getBody():e.getDoc(),u=["drop","dragover"];q(u,function(e){r.bind(i,e,n),o.bind(a,e,t)}),e.on("remove",function(){q(u,function(e){r.unbind(i,e,n),o.unbind(a,e,t)})})};e.on("init",function(){Kr.setEditorTimeout(e,r,0)})}(e)},FN=Bn,UN=Pn,zN=function(e,t){return Vl(e.getBody(),t)},HN=function(e){var t,n=e.selection,r=e.dom,o=r.isBlock,i=e.getBody(),a=As(e,i,o,function(){return sm(e)}),u="sel-"+r.uniqueId(),c=function(e){return e!==i&&(UN(e)||In(e))&&r.isChildOf(e,i)},s=function(e){return ug(e)||cg(e)||rg(e)||og(e)},f=function(e){e&&n.setRng(e)},l=n.getRng,d=function(t,r,o,i){return void 0===i&&(i=!0),e.fire("ShowCaret",{target:r,direction:t,before:o}).isDefaultPrevented()?null:(i&&n.scrollIntoView(r,-1===t),a.show(o,r))},m=function(e){return ho(e)||wo(e)||xo(e)},g=function(e){return m(e.startContainer)||m(e.endContainer)},p=function(t){var n=e.schema.getShortEndedElements(),o=r.createRng(),i=t.startContainer,a=t.startOffset,u=t.endContainer,c=t.endOffset;return ye(n,i.nodeName.toLowerCase())?0===a?o.setStartBefore(i):o.setStartAfter(i):o.setStart(i,a),ye(n,u.nodeName.toLowerCase())?0===c?o.setEndBefore(u):o.setEndAfter(u):o.setEnd(u,c),o},h=function(o){var i=o.cloneNode(!0),a=e.fire("ObjectSelected",{target:o,targetClone:i});if(a.isDefaultPrevented())return null;var c=function(t,o,i){var a=e.$,c=Hr(bt.fromDom(e.getBody()),"#"+u).fold(function(){return a([])},function(e){return a([e.dom])});0===c.length&&(c=a('<div data-mce-bogus="all" class="mce-offscreen-selection"></div>').attr("id",u)).appendTo(e.getBody());var s=r.createRng();o===i&&lt.ie?(c.empty().append('<p style="font-size: 0" data-mce-bogus="all"> </p>').append(o),s.setStartAfter(c[0].firstChild.firstChild),s.setEndAfter(o)):(c.empty().append(" ").append(o).append(" "),s.setStart(c[0].firstChild,1),s.setEnd(c[0].lastChild,0)),c.css({top:r.getPos(t,e.getBody()).y}),c[0].focus();var f=n.getSel();return f.removeAllRanges(),f.addRange(s),s}(o,a.targetClone,i),s=bt.fromDom(o);return q(Ru(bt.fromDom(e.getBody()),"*[data-mce-selected]"),function(e){xt(s,e)||Wn(e,"data-mce-selected")}),r.getAttrib(o,"data-mce-selected")||o.setAttribute("data-mce-selected","1"),t=o,C(),c},b=function(e,t){if(!e)return null;if(e.collapsed){if(!g(e)){var n=t?1:-1,o=Zs(n,i,e),a=o.getNode(!t);if(Ts(a))return d(n,a,!!t&&!o.isAtEnd(),!1);var u=o.getNode(t);if(Ts(u))return d(n,u,!t&&!o.isAtEnd(),!1)}return null}var s=e.startContainer,f=e.startOffset,l=e.endOffset;if(3===s.nodeType&&0===f&&UN(s.parentNode)&&(s=s.parentNode,f=r.nodeIndex(s),s=s.parentNode),1!==s.nodeType)return null;if(l===f+1&&s===e.endContainer){var m=s.childNodes[f];if(c(m))return h(m)}return null},y=function(){t&&t.removeAttribute("data-mce-selected"),Hr(bt.fromDom(e.getBody()),"#"+u).each(on),t=null},C=function(){a.hide()};return lt.ceFalse&&!Iv(e)&&function(){e.on("mouseup",function(t){var n=l();n.collapsed&&hy(e,t.clientX,t.clientY)&&AC(e,n,!1).each(f)}),e.on("click",function(t){var o=zN(e,t.target);o&&(UN(o)&&(t.preventDefault(),e.focus()),FN(o)&&r.isChildOf(o,n.getNode())&&y())}),e.on("blur NewBlock",y),e.on("ResizeWindow FullscreenStateChanged",a.reposition);var m=function(t,n){var i,a,u=r.getParent(t,o),c=r.getParent(n,o);return!v(u)&&(!(t===c||!r.isChildOf(u,c)||!1!==UN(zN(e,u)))||!r.isChildOf(c,u)&&(i=u,a=c,!(r.getParent(i,o)===r.getParent(a,o)))&&function(e){var t=e.firstChild;if(v(t))return!1;var n=yc.before(t);if(Tn(n.getNode())&&1===e.childNodes.length)return!s(n);var r=pf(e).next(n);return r&&!s(r)}(u))};e.on("tap",function(t){var n=t.target,r=zN(e,n);UN(r)?(t.preventDefault(),_C(e,r).each(b)):c(n)&&_C(e,n).each(b)},!0),e.on("mousedown",function(t){var o=t.target;
90if((o===i||"HTML"===o.nodeName||r.isChildOf(o,i))&&!1!==hy(e,t.clientX,t.clientY)){var a=zN(e,o);if(a)UN(a)?(t.preventDefault(),_C(e,a).each(b)):(y(),FN(a)&&t.shiftKey||ql(t.clientX,t.clientY,n.getRng())||(C(),n.placeCaretAt(t.clientX,t.clientY)));else if(c(o))_C(e,o).each(b);else if(!1===Ts(o)){y(),C();var u=Jw(i,t.clientX,t.clientY);if(u&&!m(o,u.node)){t.preventDefault();var s=d(1,u.node,u.before,!1);f(s),e.getBody().focus()}}}}),e.on("keypress",function(e){Xl.modifierPressed(e)||UN(n.getNode())&&e.preventDefault()}),e.on("GetSelectionRange",function(e){var n=e.range;if(t){if(!t.parentNode)return void(t=null);(n=n.cloneRange()).selectNode(t),e.range=n}}),e.on("SetSelectionRange",function(e){e.range=p(e.range);var t=b(e.range,e.forward);t&&(e.range=t)});e.on("AfterSetSelectionRange",function(e){var t=e.range,n=t.startContainer.parentNode;g(t)||"mcepastebin"===n.id||C(),function(e){return r.hasClass(e,"mce-offscreen-selection")}(n)||y()}),e.on("copy",function(e){var t,n=e.clipboardData;if(!e.isDefaultPrevented()&&e.clipboardData&&!lt.ie){var o=(t=r.get(u))?t.getElementsByTagName("*")[0]:t;o&&(e.preventDefault(),n.clearData(),n.setData("text/html",o.outerHTML),n.setData("text/plain",o.outerText||o.innerText))}}),MN(e),function(e){var t=yu(function(){if(!e.removed&&e.getBody().contains(document.activeElement)){var t=e.selection.getRng();if(t.collapsed){var n=RC(e,t,!1);e.selection.setRng(n)}}},0);e.on("focus",function(){t.throttle()}),e.on("blur",function(){t.cancel()})}(e),function(e){e.on("init",function(){e.on("focusin",function(t){var n=t.target;if(In(n)){var r=Vl(e.getBody(),n),o=Pn(r)?r:n;e.selection.getNode()!==o&&_C(e,o).each(function(t){return e.selection.setRng(t)})}})})}(e)}(),{showCaret:d,showBlockCaretContainer:function(e){e.hasAttribute("data-mce-caret")&&(So(e),f(l()),n.scrollIntoView(e))},hideFakeCaret:C,destroy:function(){a.destroy(),t=null}}},jN=function(e){var t,n,r=ht.each,o=Xl.BACKSPACE,i=Xl.DELETE,a=e.dom,u=e.selection,c=e.parser,s=lt.gecko,f=lt.ie,l=lt.webkit,d=f?"Text":"URL",m=function(t,n){try{e.getDoc().execCommand(t,!1,n)}catch(r){}},g=function(e){return e.isDefaultPrevented()},p=function(){var t=function(e){var t=a.create("body"),n=e.cloneContents();return t.appendChild(n),u.serializer.serialize(t,{format:"html"})};e.on("keydown",function(n){var r,u,c,s,f,l=n.keyCode;if(!g(n)&&(l===i||l===o)){if(r=e.selection.isCollapsed(),u=e.getBody(),r&&!a.isEmpty(u))return;if(!r&&(c=e.selection.getRng(),s=t(c),(f=a.createRng()).selectNode(e.getBody()),s!==t(f)))return;n.preventDefault(),e.setContent(""),u.firstChild&&a.isBlock(u.firstChild)?e.selection.setCursorLocation(u.firstChild,0):e.selection.setCursorLocation(u,0),e.nodeChanged()}})},h=function(){e.shortcuts.add("meta+a",null,"SelectAll")},v=function(){e.inline||a.bind(e.getDoc(),"mousedown mouseup",function(t){var n;if(t.target===e.getDoc().documentElement)if(n=u.getRng(),e.getBody().focus(),"mousedown"===t.type){if(ho(n.startContainer))return;u.placeCaretAt(t.clientX,t.clientY)}else u.setRng(n)})},b=function(){Range.prototype.getClientRects||e.on("mousedown",function(t){if(!g(t)&&"HTML"===t.target.nodeName){var n=e.getBody();n.blur(),Kr.setEditorTimeout(e,function(){n.focus()})}})},y=function(){e.on("click",function(t){var n=t.target;/^(IMG|HR)$/.test(n.nodeName)&&"false"!==a.getContentEditableParent(n)&&(t.preventDefault(),e.selection.select(n),e.nodeChanged()),"A"===n.nodeName&&a.hasClass(n,"mce-item-anchor")&&(t.preventDefault(),u.select(n))})},C=function(){e.on("keydown",function(e){if(!g(e)&&e.keyCode===o&&u.isCollapsed()&&0===u.getRng().startOffset){var t=u.getNode().previousSibling;if(t&&t.nodeName&&"table"===t.nodeName.toLowerCase())return e.preventDefault(),!1}})},x=function(){(function(e){return e.getParam("readonly")})(e)||e.on("BeforeExecCommand mousedown",function(){m("StyleWithCSS",!1),m("enableInlineTableEditing",!1),as(e)||m("enableObjectResizing",!1)})},S=function(){e.on("SetContent ExecCommand",function(e){"setcontent"!==e.type&&"mceInsertLink"!==e.command||r(a.select("a"),function(e){var t=e.parentNode,n=a.getRoot();if(t.lastChild===e){for(;t&&!a.isBlock(t);){if(t.parentNode.lastChild!==t||t===n)return;t=t.parentNode}a.add(t,"br",{"data-mce-bogus":1})}})})},N=function(){e.contentStyles.push("img:-moz-broken {-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}")}
90,E=function(){e.inline||e.on("keydown",function(){document.activeElement===document.body&&e.getWin().focus()})},k=function(){e.inline||(e.contentStyles.push("body {min-height: 150px}"),e.on("click",function(t){var n;if("HTML"===t.target.nodeName){if(lt.ie>11)return void e.getBody().focus();n=e.selection.getRng(),e.getBody().focus(),e.selection.setRng(n),e.selection.normalize(),e.nodeChanged()}}))},_=function(){lt.mac&&e.on("keydown",function(t){!Xl.metaKeyPressed(t)||t.shiftKey||37!==t.keyCode&&39!==t.keyCode||(t.preventDefault(),e.selection.getSel().modify("move",37===t.keyCode?"backward":"forward","lineboundary"))})},A=function(){e.on("click",function(e){var t=e.target;do{if("A"===t.tagName)return void e.preventDefault()}while(t=t.parentNode)}),e.contentStyles.push(".mce-content-body {-webkit-touch-callout: none}")},R=function(){e.on("init",function(){e.dom.bind(e.getBody(),"submit",function(e){e.preventDefault()})})},D=function(){e.on("dragstart",function(t){!function(t){var n,r;t.dataTransfer&&(e.selection.isCollapsed()&&"IMG"===t.target.tagName&&u.select(t.target),(n=e.selection.getContent()).length>0&&(r="data:text/mce-internal,"+escape(e.id)+","+escape(n),t.dataTransfer.setData(d,r)))}(t)}),e.on("drop",function(t){if(!g(t)){var n=function(e){var t;return e.dataTransfer&&(t=e.dataTransfer.getData(d))&&t.indexOf("data:text/mce-internal,")>=0?(t=t.substr("data:text/mce-internal,".length).split(","),{id:unescape(t[0]),html:unescape(t[1])}):null}(t);if(n&&n.id!==e.id){t.preventDefault();var r=Ql(t.x,t.y,e.getDoc());u.setRng(r),o=n.html,i=!0,e.queryCommandSupported("mceInsertClipboardContent")?e.execCommand("mceInsertClipboardContent",!1,{content:o,internal:i}):e.execCommand("mceInsertContent",!1,o)}}var o,i})},T=w;return Iv(e)?(l&&(v(),y(),R(),h(),lt.iOS&&(E(),k(),A())),s&&(b(),x(),N(),_())):(e.on("keydown",function(t){var n,r;if(!g(t)&&t.keyCode===Xl.BACKSPACE){var o=(n=u.getRng()).startContainer,i=n.startOffset,c=a.getRoot();if(r=o,n.collapsed&&0===i){for(;r&&r.parentNode&&r.parentNode.firstChild===r&&r.parentNode!==c;)r=r.parentNode;"BLOCKQUOTE"===r.tagName&&(e.formatter.toggle("blockquote",null,r),(n=a.createRng()).setStart(o,0),n.setEnd(o,0),u.setRng(n))}}}),p(),lt.windowsPhone||e.on("keyup focusin mouseup",function(e){Xl.modifierPressed(e)||u.normalize()},!0),l&&(v(),y(),Wc(e)&&e.on("init",function(){m("DefaultParagraphSeparator",Wc(e))}),R(),C(),c.addNodeFilter("br",function(e){for(var t=e.length;t--;)"Apple-interchange-newline"===e[t].attr("class")&&e[t].remove()}),lt.iOS?(E(),k(),A()):h()),lt.ie>=11&&(k(),C()),lt.ie&&(h(),m("AutoUrlDetect",!1),D()),s&&(e.on("keydown",function(t){if(!g(t)&&t.keyCode===o){if(!e.getBody().getElementsByTagName("hr").length)return;if(u.isCollapsed()&&0===u.getRng().startOffset){var n=u.getNode(),r=n.previousSibling;if("HR"===n.nodeName)return a.remove(n),void t.preventDefault();r&&r.nodeName&&"hr"===r.nodeName.toLowerCase()&&(a.remove(r),t.preventDefault())}}}),b(),t=function(){var t=a.getAttribs(u.getStart().cloneNode(!1));return function(){var n=u.getStart();n!==e.getBody()&&(a.setAttrib(n,"style",null),r(t,function(e){n.setAttributeNode(e.cloneNode(!0))}))}},n=function(){return!u.isCollapsed()&&a.getParent(u.getStart(),a.isBlock)!==a.getParent(u.getEnd(),a.isBlock)},e.on("keypress",function(r){var o;if(!g(r)&&(8===r.keyCode||46===r.keyCode)&&n())return o=t(),e.getDoc().execCommand("delete",!1,null),o(),r.preventDefault(),!1}),a.bind(e.getDoc(),"cut",function(r){var o;!g(r)&&n()&&(o=t(),Kr.setEditorTimeout(e,function(){o()}))}),x(),S(),N(),_(),C())),{refreshContentEditable:T,isHidden:function(){if(!s||e.removed)return!1;var t=e.selection.getSel();return!t||!t.rangeCount||0===t.rangeCount}}},VN=uu.DOM,qN=function(e){return e.inline?e.getElement().nodeName.toLowerCase():void 0},$N=function(e){return he(e,function(e){return!1===h(e)})},WN=function(e){var t=e.settings;return $N({block_elements:t.block_elements,boolean_attributes:t.boolean_attributes,custom_elements:t.custom_elements,extended_valid_elements:t.extended_valid_elements,invalid_elements:t.invalid_elements,invalid_styles:t.invali
90d_styles,move_caret_before_on_enter_elements:t.move_caret_before_on_enter_elements,non_empty_elements:t.non_empty_elements,schema:t.schema,self_closing_elements:t.self_closing_elements,short_ended_elements:t.short_ended_elements,special:t.special,text_block_elements:t.text_block_elements,text_inline_elements:t.text_inline_elements,valid_children:t.valid_children,valid_classes:t.valid_classes,valid_elements:t.valid_elements,valid_styles:t.valid_styles,verify_html:t.verify_html,whitespace_elements:t.whitespace_elements,padd_empty_block_inline_children:t.format_empty_lines})},KN=function(e){var t=e.settings,n=e.editorUpload.blobCache;return $N({allow_conditional_comments:t.allow_conditional_comments,allow_html_data_urls:t.allow_html_data_urls,allow_svg_data_urls:t.allow_svg_data_urls,allow_html_in_named_anchor:t.allow_html_in_named_anchor,allow_script_urls:t.allow_script_urls,allow_unsafe_link_target:t.allow_unsafe_link_target,convert_fonts_to_spans:t.convert_fonts_to_spans,fix_list_elements:t.fix_list_elements,font_size_legacy_values:t.font_size_legacy_values,forced_root_block:t.forced_root_block,forced_root_block_attrs:t.forced_root_block_attrs,padd_empty_with_br:t.padd_empty_with_br,preserve_cdata:t.preserve_cdata,remove_trailing_brs:t.remove_trailing_brs,inline_styles:t.inline_styles,root_name:qN(e),validate:!0,blob_cache:n,document:e.getDoc(),images_dataimg_filter:t.images_dataimg_filter})},XN=function(e){var t=e.dom.getRoot();e.inline||Ol(e)&&e.selection.getStart(!0)!==t||kf(t).each(function(t){var n=t.getNode(),r=Nn(n)?kf(n).getOr(t):t;lt.browser.isIE()?function(e,t){var n=bt.fromDom(e.getBody()),r=(Wd(e)?I.from(t):I.none()).map(Kd).filter($d(n));e.bookmark=r.isSome()?r:e.bookmark}(e,r.toRange()):e.selection.setRng(r.toRange())})},YN=function(e){e.bindPendingEventDelegates(),e.initialized=!0,function(e){e.fire("Init")}(e),e.focus(!0),XN(e),e.nodeChanged({initial:!0}),e.execCallback("init_instance_callback",e),function(e){e.settings.auto_focus&&Kr.setEditorTimeout(e,function(){var t;(t=!0===e.settings.auto_focus?e:e.editorManager.get(e.settings.auto_focus)).destroyed||t.focus()},100)}(e)},GN=function(e){return e.inline?e.ui.styleSheetLoader:e.dom.styleSheetLoader},JN=function(e){var t=GN(e),n=is(e),r=e.contentCSS,o=function(){t.unloadAll(r),e.inline||e.ui.styleSheetLoader.unloadAll(n)},i=function(){e.removed?o():e.on("remove",o)};if(e.contentStyles.length>0){var a="";ht.each(e.contentStyles,function(e){a+=e+"\r\n"}),e.dom.addStyle(a)}var u=Vr.all(function(e,t,n){var r=[new Vr(function(n,r){return GN(e).loadAll(t,n,r)})];return e.inline?r:r.concat([new Vr(function(t,r){return e.ui.styleSheetLoader.loadAll(n,t,r)})])}(e,r,n)).then(i).catch(i);return e.settings.content_style&&function(e,t){var n=bt.fromDom(e.getBody()),r=Yt(Xt(n)),o=bt.fromTag("style");Hn(o,"type","text/css"),tn(o,bt.fromText(t)),tn(r,o),e.on("remove",function(){on(o)})}(e,e.settings.content_style),u},QN=function(e){var t=e.settings,n=e.getDoc(),r=e.getBody();!function(e){e.fire("PreInit")}(e),t.browser_spellcheck||t.gecko_spellcheck||(n.body.spellcheck=!1,VN.setAttrib(r,"spellcheck","false")),e.quirks=jN(e),function(e){e.fire("PostRender")}(e);var o=function(e){return e.getParam("directionality",hu.isRtl()?"rtl":void 0)}(e);void 0!==o&&(r.dir=o),t.protect&&e.on("BeforeSetContent",function(e){ht.each(t.protect,function(t){e.content=e.content.replace(t,function(e){return"\x3c!--mce:protected "+escape(e)+"--\x3e"})})}),e.on("SetContent",function(){e.addVisual(e.getBody())}),e.on("compositionstart compositionend",function(t){e.composing="compositionstart"===t.type})},ZN=function(e){!0!==e.removed&&(!function(e){Iv(e)||e.load({initial:!0,format:"html"}),e.startContent=e.getContent({format:"raw"})}(e),YN(e))},eE=function(e,t){var n=e.settings,r=e.getElement(),o=e.getDoc();n.inline||(e.getElement().style.visibility=e.orgVisibility),t||e.inline||(o.open(),o.write(e.iframeHTML),o.close()),e.inline&&(VN.addClass(r,"mce-content-body"),e.contentDocument=o=document,e.contentWindow=window,e.bodyElement=r,e.contentAreaContainer=r);var i=e.getBody();
90i.disabled=!0,e.readonly=!!n.readonly,e.readonly||(e.inline&&"static"===VN.getStyle(i,"position",!0)&&(i.style.position="relative"),i.contentEditable=e.getParam("content_editable_state",!0)),i.disabled=!1,e.editorUpload=My(e),e.schema=yi(WN(e)),e.dom=uu(o,{keep_values:!0,url_converter:e.convertURL,url_converter_scope:e,hex_colors:n.force_hex_style_colors,update_styles:!0,root_element:e.inline?e.getBody():null,collect:function(){return e.inline},schema:e.schema,contentCssCors:ts(e),referrerPolicy:ns(e),onSetAttrib:function(t){e.fire("SetAttrib",t)}}),e.parser=function(e){var t=_b(KN(e),e.schema);return t.addAttributeFilter("src,href,style,tabindex",function(t,n){for(var r,o,i=t.length,a=e.dom,u="data-mce-"+n;i--;)if((o=(r=t[i]).attr(n))&&!r.attr(u)){if(0===o.indexOf("data:")||0===o.indexOf("blob:"))continue;"style"===n?((o=a.serializeStyle(a.parseStyle(o),r.name)).length||(o=null),r.attr(u,o),r.attr(n,o)):"tabindex"===n?(r.attr(u,o),r.attr(n,null)):r.attr(u,e.convertURL(o,n,r.name))}}),t.addNodeFilter("script",function(e){for(var t=e.length;t--;){var n=e[t],r=n.attr("type")||"no/type";0!==r.indexOf("mce-")&&n.attr("type","mce-"+r)}}),e.settings.preserve_cdata&&t.addNodeFilter("#cdata",function(t){for(var n=t.length;n--;){var r=t[n];r.type=8,r.name="#comment",r.value="[CDATA["+e.dom.encode(r.value)+"]]"}}),t.addNodeFilter("p,h1,h2,h3,h4,h5,h6,div",function(t){for(var n=t.length,r=e.schema.getNonEmptyElements();n--;){var o=t[n];o.isEmpty(r)&&0===o.getAll("br").length&&(o.append(new xm("br",1)).shortEnded=!0)}}),t}(e),e.serializer=Ob(function(e){var t=e.settings;return Re(Re(Re({},KN(e)),WN(e)),$N({url_converter:t.url_converter,url_converter_scope:t.url_converter_scope,element_format:t.element_format,entities:t.entities,entity_encoding:t.entity_encoding,indent:t.indent,indent_after:t.indent_after,indent_before:t.indent_before}))}(e),e),e.selection=Kv(e.dom,e.getWin(),e.serializer,e),e.annotator=Hl(e),e.formatter=qy(e),e.undoManager=Wy(e),e._nodeChangeDispatcher=new SN(e),e._selectionOverrides=HN(e),Px(e),NN(e),Iv(e)||kN(e);var a=function(e){return Iv(e)?du(null):xN(e)}(e);Ox(e,a),function(e){Wc(e)&&e.on("NodeChange",_(Fx,e))}(e),Gy(e);var u=Mv(e);QN(e),u.fold(function(){JN(e).then(function(){return ZN(e)})},function(t){e.setProgressState(!0),JN(e).then(function(){t().then(function(t){e.setProgressState(!1),ZN(e)},function(t){e.notificationManager.open({type:"error",text:String(t)}),ZN(e)})})})},tE=uu.DOM,nE=function(e){var t=function(e){return e.getParam("doctype","<!DOCTYPE html>")}(e)+"<html><head>";(function(e){return e.getParam("document_base_url","")})(e)!==e.documentBaseUrl&&(t+='<base href="'+e.documentBaseURI.getURI()+'" />'),t+='<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />';var n=function(e){return qc(e,"body_id","tinymce")}(e),r=function(e){return qc(e,"body_class","")}(e),o=e.translate(function(e){return e.getParam("iframe_aria_text","Rich Text Area. Press ALT-0 for help.","string")}(e));return $c(e)&&(t+='<meta http-equiv="Content-Security-Policy" content="'+$c(e)+'" />'),t+='</head><body id="'+n+'" class="mce-content-body '+r+'" data-id="'+e.id+'" aria-label="'+o+'"><br></body></html>'},rE=function(e,t){var n,r,o,i,a=e.translate("Rich Text Area"),u=(n=e.id,r=a,t.height,o=function(e){return e.getParam("iframe_attrs",{})}(e),i=bt.fromTag("iframe"),jn(i,o),jn(i,{id:n+"_ifr",frameBorder:"0",allowTransparency:"true",title:r}),Eu(i,"tox-edit-area__iframe"),i).dom;u.onload=function(){u.onload=null,e.fire("load")};var c=function(e,t){if(document.domain!==window.location.hostname&&lt.browser.isIE()){var n=By("mce");e[n]=function(){eE(e)};var r='javascript:(function(){document.open();document.domain="'+document.domain+'";var ed = window.parent.tinymce.get("'+e.id+'");document.write(ed.iframeHTML);document.close();ed.'+n+"(true);})()";return tE.setAttrib(t,"src",r),!0}return!1}(e,u);return e.contentAreaContainer=t.iframeContainer,e.iframeElement=u,e.iframeHTML=nE(e),tE.add(t.iframeContainer,u),c},oE=uu.DOM,iE=function(e,t,n){var r=yy.get(n),o=yy.urls[n]||e.documentBaseUrl.replace(/\/$/,"");if(n=ht.trim(n),r&&-1===ht.inArray(t,n)){if(ht.each(yy.dependencies(n),function(n){iE(e,t,n)}),e.plugins[n])return;try{var i=new r(e,o,e.$);e.plugins[n]=i,i.init&&(i.init(e,o),t.push(n))}catch(Jk){!function(e,t,n){var r=hu.translate(["Failed to initialize plugin: {0}",t]);$l(e,"PluginLoadError",{message:r}),_y(r,n),Sy(e,r)}(e,n,Jk)}}},aE=function(e){return e.replace(/^\-/,"")},uE=function(e){return{editorContainer:e,iframeContainer:e,api:{}}},cE=function(e){var t=e.getElement();return e.inline?uE(null):function(e){var t=oE.create("div");return oE.insertAfter(t,e),uE(t)}(t)},sE=function(e){var t=e.getElement();return e.orgDisplay=t.style.display,l(cs(e))?function(e){return e.theme.renderUI()}(e):y(cs(e))?function(e){var t=e.getElement(),n=cs(e)(e,t);return n.editorContainer.nodeType&&(n.editorContainer.id=n.editorContainer.id||e.id+"_parent"),n.iframeC
90ontainer&&n.iframeContainer.nodeType&&(n.iframeContainer.id=n.iframeContainer.id||e.id+"_iframecontainer"),n.height=n.iframeHeight?n.iframeHeight:t.offsetHeight,n}(e):cE(e)},fE=function(e){e.fire("ScriptsLoaded"),function(e){var t=ht.trim(Gc(e)),n=e.ui.registry.getAll().icons,r=Re(Re({},sy.get("default").icons),sy.get(t).icons);le(r,function(t,r){ye(n,r)||e.ui.registry.addIcon(r,t)})}(e),function(e){var t=cs(e);if(l(t)){e.settings.theme=aE(t);var n=Cy.get(t);e.theme=new n(e,Cy.urls[t]),e.theme.init&&e.theme.init(e,Cy.urls[t]||e.documentBaseUrl.replace(/\/$/,""),e.$)}else e.theme={}}(e),function(e){var t=[];ht.each(ds(e).split(/[ ,]/),function(n){iE(e,t,aE(n))})}(e);var t=sE(e);!function(e,t){var n={show:I.from(t.show).getOr(w),hide:I.from(t.hide).getOr(w),disable:I.from(t.disable).getOr(w),isDisabled:I.from(t.isDisabled).getOr(T),enable:function(){e.mode.isReadOnly()||I.from(t.enable).map(D)}};e.ui=Re(Re({},e.ui),n)}(e,I.from(t.api).getOr({}));var n={editorContainer:t.editorContainer,iframeContainer:t.iframeContainer};return e.editorContainer=n.editorContainer?n.editorContainer:null,Dy(e),e.inline?eE(e):function(e,t){var n=rE(e,t);t.editorContainer&&(tE.get(t.editorContainer).style.display=e.orgDisplay,e.hidden=tE.isHidden(t.editorContainer)),e.getElement().style.display="none",tE.setAttrib(e.id,"aria-hidden","true"),n||eE(e)}(e,n)},lE=uu.DOM,dE=function(e){return"-"===e.charAt(0)},mE=function(e,t){var n=rs(t),r=function(e){return e.getParam("language_url","","string")}(t);if(!1===hu.hasCode(n)&&"en"!==n){var o=""!==r?r:t.editorManager.baseURL+"/langs/"+n+".js";e.add(o,w,void 0,function(){!function(e,t,n){Ny(e,"LanguageLoadError",Ey("language",t,n))}(t,o,n)})}},gE=function(e,t,n){return I.from(t).filter(function(e){return e.length>0&&!sy.has(e)}).map(function(t){return{url:e.editorManager.baseURL+"/icons/"+t+"/icons"+n+".js",name:I.some(t)}})},pE=function(e,t,n){var r=gE(t,"default",n),o=function(e){return I.from(function(e){return e.getParam("icons_url","","string")}(e)).filter(function(e){return e.length>0}).map(function(e){return{url:e,name:I.none()}})}(t).orThunk(function(){return gE(t,Gc(t),"")});q(function(e){for(var t=[],n=function(e){t.push(e)},r=0;r<e.length;r++)e[r].each(n);return t}([r,o]),function(n){e.add(n.url,w,void 0,function(){!function(e,t,n){Ny(e,"IconsLoadError",Ey("icons",t,n))}(t,n.url,n.name.getOrUndefined())})})},hE=function(e,t){var n=lu.ScriptLoader;!function(e,t,n,r){var o=cs(t);if(l(o)){if(!dE(o)&&!ye(Cy.urls,o)){var i=function(e){return e.getParam("theme_url")}(t);i?Cy.load(o,t.documentBaseURI.toAbsolute(i)):Cy.load(o,"themes/"+o+"/theme"+n+".js")}e.loadQueue(function(){Cy.waitFor(o,r)})}else r()}(n,e,t,function(){mE(n,e),pE(n,e,t),function(e,t){ht.each(function(e){return e.getParam("external_plugins")}(e),function(t,n){yy.load(n,t,w,void 0,function(){ky(e,t,n)}),e.settings.plugins+=" "+n}),ht.each(ds(e).split(/[ ,]/),function(n){if((n=ht.trim(n))&&!yy.urls[n])if(dE(n)){n=n.substr(1,n.length);var r=yy.dependencies(n);ht.each(r,function(n){var r={prefix:"plugins/",resource:n,suffix:"/plugin"+t+".js"},o=yy.createUrl(r,n);yy.load(o.resource,o,w,void 0,function(){ky(e,o.prefix+o.resource+o.suffix,o.resource)})})}else{var o={prefix:"plugins/",resource:n,suffix:"/plugin"+t+".js"};yy.load(n,o,w,void 0,function(){ky(e,o.prefix+o.resource+o.suffix,n)})}})}(e,t),n.loadQueue(function(){e.removed||fE(e)},e,function(){e.removed||fE(e)})})},vE=function(e){var t=e.id;hu.setCode(rs(e));var n=function(){lE.unbind(window,"ready",n),e.render()};if(Ti.Event.domLoaded){if(e.getElement()&&lt.contentEditable){var r=bt.fromDom(e.getElement()),o=function(e){return Y(e.dom.attributes,function(e,t){return e[t.name]=t.value,e},{})}(r);e.on("remove",function(){$(r.dom.attributes,function(e){return Wn(r,e.name)}),jn(r,o)}),e.ui.styleSheetLoader=function(e,t){return Yr.forElement(e,{contentCssCors:ls(t),referrerPolicy:ns(t)})}(r,e),!function(e){return e.getParam("inline")}(e)?(e.orgVisibility=e.getElement().style.visibility,e.getElement().style.visibility="hidden"):e.inline=!0;var i=e.getElement().form||lE.getParent(t,"form");i&&(e.formElement=i,function(e){return e.getParam("hidden_input")}(e)&&!kn(e.getElement())&&(lE.insertAfter(lE.create("input",{type:"hidden",name:t}),t),e.hasHiddenInput=!0),e.formEventDelegate=function(t){e.fire(t.type,t)},lE.bind(i,"submit reset",e.formEventDelegate),e.on("reset",function(){e.resetContent()}),!function(e){return e.getParam("submit_patch")}(e)||i.submit.nodeType||i.submit.length||i._mceOldSubmit||(i._mceOldSubmit=i.submit,i.submit=function(){return e.editorManager.triggerSave(),e.setDirty(!1),i._mceOldSubmit(i)})),e.windowManager=wy(e),e.notificationManager=by(e),function(e){return"xml"===e.getParam("encoding")}(e)&&e.on("GetContent",function(e){e.save&&(e.content=lE.encode(e.content))}),function(e){return e.getParam("add_form_submit_trigger")}(e)&&e.on("submit",function(){e.initialized&&e.save()}),function(e){return e.getParam("add_unload_trigger")}(e)&&(e._beforeUnload=function(){!e.initialized||e.destroyed||e.isHidden()||e.save({format:"raw",no_events:!0,set_dirty:!1})},e.editorManager.on("BeforeUnload",e._beforeUnload)),e.editorManager.add(e),hE(e,e.suffix)}}else lE.bind(window,"ready",n)},bE=function(e,t){return function(e,t){return Uv(e).editor.addVisual(t)}(e,t)},yE={"font-size":"size","font-family":"face"},CE=function(e,t,n){return Qp(bt.fromDom(n),function(t){return function(t){return Gn(t,e).orThunk(function(){return"font"===Et(t)?be(yE,e).bind(function(e){return qn(t,e)}):I.none()})}(t)},function(e){return xt(bt.fromDom(t),e)})},wE=function(e){return function(t,n){return I.from(n).map(bt.fromDom).filter(At).bind(function(n){return CE(e,t,n.dom).or(function(e,t){return I.from(uu.DOM.getStyle(t,e,!0))}(e,n.dom))}).getOr("")}},xE=wE("font-size"),SE=x(function(e){return e.replace(/[\'\"\\]/g,"").replace(/,\s+/g,",")},wE("font-family")),NE=function(e){return kf(e.getBody()).map(function(e){var t=e.container();return _n(t)?t.parentNode:t})},EE=function(e,t){return function(e){return I.from(e.selection.getRng()).bind(function(t){var n=e.getBody();return t.startContainer===n&&0===t.startOffset?I.none():I.from(e.selection.getStart(!0))})}(e).orThunk(_(NE,e)).map(bt.fromDom).filter(At).bind(t)},kE=function(e,t){return EE(e,S(I.some,t))},_E=function(e,t){if(/^[0-9.]+$/.test(t)){var n=parseInt(t,10);if(n>=1&&n<=7){var r=function(e){return ht.explode(e.getParam("font_size_style_values","xx-small,x-small,small,medium,large,x-large,xx-large"))}(e),o=function(e){return ht.explode(e.getParam("font_size_classes",""))}(e);return o?o[n-1]||t:r[n-1]||t}return t}return t},AE=function(e){var t=e.split(/\s*,\s*/);return V(t,function(e){return-1===e.indexOf(" ")||Me(e,'"')||Me(e,"'")?e:"'"+e+"'"}).join(",")},RE=function(e,t){var n=function(e){if("string"!=typeof e){var t=ht.extend({paste:e.paste,data:{paste:e.paste}},e);return{content:e.content,details:t}}return{content:e,details:{}}}(t);!function(e,t,n){Fv(e).editor.insertContent(t,n)}(e,n.content,n.details)},DE=ht.each,TE=ht.map,OE=ht.inArray,BE=function(){function e(e){this.commands={state:{},exec:{},value:{}},this.editor=e,this.setupCommands(e)}return e.prototype.execCommand=function(e,t,n,r){var o,i=!1,a=this;if(!a.editor.removed){var u;
90if("mcefocus"!==e.toLowerCase()&&(/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint)$/.test(e)||r&&r.skip_focus?(u=a.editor,Jd(u).each(function(e){return u.selection.setRng(e)})):a.editor.focus()),(r=a.editor.fire("BeforeExecCommand",{command:e,ui:t,value:n})).isDefaultPrevented())return!1;var c=e.toLowerCase();if(o=a.commands.exec[c])return o(c,t,n),a.editor.fire("ExecCommand",{command:e,ui:t,value:n}),!0;if(DE(this.editor.plugins,function(r){if(r.execCommand&&r.execCommand(e,t,n))return a.editor.fire("ExecCommand",{command:e,ui:t,value:n}),i=!0,!1}),i)return i;if(a.editor.theme&&a.editor.theme.execCommand&&a.editor.theme.execCommand(e,t,n))return a.editor.fire("ExecCommand",{command:e,ui:t,value:n}),!0;try{i=a.editor.getDoc().execCommand(e,t,n)}catch(s){}return!!i&&(a.editor.fire("ExecCommand",{command:e,ui:t,value:n}),!0)}},e.prototype.queryCommandState=function(e){var t;if(!this.editor.quirks.isHidden()&&!this.editor.removed){if(e=e.toLowerCase(),t=this.commands.state[e])return t(e);try{return this.editor.getDoc().queryCommandState(e)}catch(n){}return!1}},e.prototype.queryCommandValue=function(e){var t;if(!this.editor.quirks.isHidden()&&!this.editor.removed){if(e=e.toLowerCase(),t=this.commands.value[e])return t(e);try{return this.editor.getDoc().queryCommandValue(e)}catch(n){}}},e.prototype.addCommands=function(e,t){void 0===t&&(t="exec");var n=this;DE(e,function(e,r){DE(r.toLowerCase().split(","),function(r){n.commands[t][r]=e})})},e.prototype.addCommand=function(e,t,n){var r=this;e=e.toLowerCase(),this.commands.exec[e]=function(e,o,i,a){return t.call(n||r.editor,o,i,a)}},e.prototype.queryCommandSupported=function(e){if(e=e.toLowerCase(),this.commands.exec[e])return!0;try{return this.editor.getDoc().queryCommandSupported(e)}catch(t){}return!1},e.prototype.addQueryStateHandler=function(e,t,n){var r=this;e=e.toLowerCase(),this.commands.state[e]=function(){return t.call(n||r.editor)}},e.prototype.addQueryValueHandler=function(e,t,n){var r=this;e=e.toLowerCase(),this.commands.value[e]=function(){return t.call(n||r.editor)}},e.prototype.hasCustomCommand=function(e){return e=e.toLowerCase(),!!this.commands.exec[e]},e.prototype.execNativeCommand=function(e,t,n){return void 0===t&&(t=!1),void 0===n&&(n=null),this.editor.getDoc().execCommand(e,t,n)},e.prototype.isFormatMatch=function(e){return this.editor.formatter.match(e)},e.prototype.toggleFormat=function(e,t){this.editor.formatter.toggle(e,t),this.editor.nodeChanged()},e.prototype.storeSelection=function(e){this.selectionBookmark=this.editor.selection.getBookmark(e)},e.prototype.restoreSelection=function(){this.editor.selection.moveToBookmark(this.selectionBookmark)},e.prototype.setupCommands=function(e){var t=this;this.addCommands({"mceResetDesignMode,mceBeginUndoLevel":w,"mceEndUndoLevel,mceAddUndoLevel":function(){e.undoManager.add()},mceFocus:function(t,n,r){dm(e,r)},"Cut,Copy,Paste":function(n){var r,o=e.getDoc();try{t.execNativeCommand(n)}catch(a){r=!0}if("paste"!==n||o.queryCommandEnabled(n)||(r=!0),r||!o.queryCommandSupported(n)){var i=e.translate("Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X/C/V keyboard shortcuts instead.");lt.mac&&(i=i.replace(/Ctrl\+/g,"⌘+")),e.notificationManager.open({text:i,type:"error"})}},unlink:function(){if(e.selection.isCollapsed()){var t=e.dom.getParent(e.selection.getStart(),"a");t&&e.dom.remove(t,!0)}else e.formatter.remove("link")},"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull,JustifyNone":function(n){var r=n.substring(7);"full"===r&&(r="justify"),DE("left,center,right,justify".split(","),function(t){r!==t&&e.formatter.remove("align"+t)}),"none"!==r&&t.toggleFormat("align"+r)},"InsertUnorderedList,InsertOrderedList":function(n){var r;t.execNativeCommand(n);var o=e.dom.getParent(e.selection.getNode(),"ol,ul");o&&(r=o.parentNode,/^(H[1-6]|P|ADDRESS|PRE)$/.test(r.nodeName)&&(t.storeSelection(),e.dom.split(r,o),t.restoreSelection()))},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(e){t.toggleFormat(e)},"ForeColor,HiliteColor":function(e,n,r){t.toggleFormat(e,{value:r})},FontName:function(t,n,r){!function(e,t){var n=_E(e,t);e.formatter.toggle("fontname",{value:AE(n)}),e.nodeChanged()}(e,r)},FontSize:function(t,n,r){!function(e,t){e.formatter.toggle("fontsize",{value:_E(e,t)}),e.nodeChanged()}(e,r)},LineHeight:function(t,n,r){!function(e,t){e.formatter.toggle("lineheight",{value:String(t)}),e.nodeChanged()}(e,r)},Lang:function(e,n,r){t.toggleFormat(e,{value:r.code,customValue:r.customCode})},RemoveFormat:function(t){e.formatter.remove(t)},mceBlockQuote:function(){t.toggleFormat("blockquote")},FormatBlock:function(e,n,r){return t.toggleFormat(r||"p")},mceCleanup:function(){var t=e.selection.getBookmark();e.setContent(e.getContent()),e.selection.moveToBookmark(t)},mceRemoveNode:function(n,r,o){var i=o||e.selection.getNode();i!==e.getBody()&&(t.storeSelection(),e.dom.remove(i,!0),t.restoreSelection())},mceSelectNodeDepth:function(t,n,r){var o=0;e.dom.getParent(e.selection.getNode(),function(t){if(1===t.nodeType&&o++===r)return e.selection.select(t),!1},e.getBody())},mceSelectNode:function(t,n,r){e.selection.select(r)},mceInsertContent:function(t,n,r){RE(e,r)},mceInsertRawHTML:function(t,n,r){e.selection.setContent("tiny_mce_marker");var o=e.getContent();e.setContent(o.replace(/tiny_mce_marker/g,function(){return r}))},mceInsertNewLine:function(t,n,r){aN(e,r)},mceToggleFormat:function(e,n,r){t.toggleFormat(r)},mceSetContent:function(t,n,r){e.setContent(r)},"Indent,Outdent":function(t){Rx(e,t)},mceRepaint:w,InsertHorizontalRule:function(){e.execCommand("mceInsertContent",!1,"<hr />")},mceToggleVisualAid:function(){e.hasVisual=!e.hasVisual,e.addVisual()},mceReplaceContent:function(t,n,r){e.execCommand("mceInsertContent",!1,r.replace(/\{\$selection\}/g,e.selection.getContent({format:"text"})))},mceInsertLink:function(t,n,r){"string"==typeof r&&(r={href:r});var o=e.dom.getParent(e.selection.getNode(),"a");r.href=r.href.replace(/ /g,"%20"),o&&r.href||e.formatter.remove("link"),r.href&&e.formatter.apply("link",r,o)},selectAll:function(){var t=e.dom.getParent(e.selection.getStart(),Bn);if(t){var n=e.dom.createRng();n.selectNodeContents(t),e.selection.setRng(n)}},mceNewDocument:function(){e.setContent("")},InsertLineBreak:function(t,n,r){return KS(e,r),!0}});var n=function(t){return function(){var n=e.selection,r=n.isCollapsed()?[e.dom.getParent(n.getNode(),e.dom.isBlock)]:n.getSelectedBlocks(),o=TE(r,function(n){return!!e.formatter.matchNode(n,t)});return-1!==OE(o,!0)}};t.addCommands({JustifyLeft:n("alignleft"),JustifyCenter:n("aligncenter"),JustifyRight:n("alignright"),JustifyFull:n("alignjustify"),"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(e){return t.isFormatMatch(e)},mceBlockQuote:function(){return t.isFormatMatch("blockquote")},Outdent:function(){return kx(e)},"InsertUnorderedList,InsertOrderedList":function(t){var n=e.dom.getParent(e.selection.getNode(),"ul,ol");return n&&("insertunorderedlist"===t&&"UL"===n.tagName||"insertorderedlist"===t&&"OL"===n.tagName)}},"state"),t.addCommands({Undo:function(){e.undoManager.undo()},Redo:function(){e.undoManager.redo()}}),t.addQueryValueHandler("FontName",function(){return function(e){return kE(e,function(t){return SE(e.getBody(),t.dom)}).getOr("")}(e)},this),t.addQueryValueHandler("FontSize",function(){return function(e){return kE(e,function(t){return xE(e.getBody(),t.dom)}).getOr("")}(e)},this),t.addQueryValueHandler("LineHeight",function(){return function(e){return kE(e,function(t){var n=bt.fromDom(e.getBody());return Qp(t,function(e){return Gn(e,"line-height")},_(xt,n)).getOrThunk(function(){var e=parseFloat(Xn(t,"line-height")),n=parseFloat(Xn(t,"font-size"));return String(e/n)})}).getOr("")}(e)},this)},e}(),PE=function(e,t,n){_u(e,t)&&!1===n?function(e,t){xu(e)?e.dom.classList.remove(t):Nu(e,t);ku(e)}(e,t):n&&Eu(e,t)},LE=function(e,t,n){try{e.getDoc().execCommand(t,!1,String(n))}catch(r){}},IE=function(e,t){e.dom.contentEditable=t?"true":"false"},ME=function(e,t){var n=bt.fromDom(e.getBody());PE(n,"mce-content-readonly",t),t?(e.selection.controlSelection.hideResizeRect
90(),e._selectionOverrides.hideFakeCaret(),function(e){I.from(e.selection.getNode()).each(function(e){e.removeAttribute("data-mce-selected")})}(e),e.readonly=!0,IE(n,!1),q(Ru(n,'*[contenteditable="true"]'),function(e){Hn(e,"data-mce-contenteditable","true"),IE(e,!1)})):(e.readonly=!1,IE(n,!0),function(e){q(Ru(e,'*[data-mce-contenteditable="true"]'),function(e){Wn(e,"data-mce-contenteditable"),IE(e,!0)})}(n),LE(e,"StyleWithCSS",!1),LE(e,"enableInlineTableEditing",!1),LE(e,"enableObjectResizing",!1),fm(e)&&e.focus(),function(e){e.selection.setRng(e.selection.getRng())}(e),e.nodeChanged())},FE=function(e){return e.readonly},UE=function(e){e.parser.addAttributeFilter("contenteditable",function(t){FE(e)&&q(t,function(e){e.attr("data-mce-contenteditable",e.attr("contenteditable")),e.attr("contenteditable","false")})}),e.serializer.addAttributeFilter("data-mce-contenteditable",function(t){FE(e)&&q(t,function(e){e.attr("contenteditable",e.attr("data-mce-contenteditable"))})}),e.serializer.addTempAttr("data-mce-contenteditable")},zE=function(e,t){if(function(e){return"click"===e.type}(t)&&!Xl.metaKeyPressed(t)){var n=bt.fromDom(t.target);(function(e,t){return jr(t,"a",function(t){return xt(t,bt.fromDom(e.getBody()))}).bind(function(e){return qn(e,"href")})})(e,n).each(function(n){if(t.preventDefault(),/^#/.test(n)){var r=e.dom.select(n+',[name="'+(Me(o=n,i="#")?function(e,t){return e.substring(t)}(o,i.length):o)+'"]');r.length&&e.selection.scrollIntoView(r[0],!0)}else window.open(n,"_blank","rel=noopener noreferrer,menubar=yes,toolbar=yes,location=yes,status=yes,resizable=yes,scrollbars=yes");var o,i})}},HE=ht.makeMap("focus blur focusin focusout click dblclick mousedown mouseup mousemove mouseover beforepaste paste cut copy selectionchange mouseout mouseenter mouseleave wheel keydown keypress keyup input beforeinput contextmenu dragstart dragend dragover draggesture dragdrop drop drag submit compositionstart compositionend compositionupdate touchstart touchmove touchend touchcancel"," "),jE=function(){function e(e){this.bindings={},this.settings=e||{},this.scope=this.settings.scope||this,this.toggleEvent=this.settings.toggleEvent||T}return e.isNative=function(e){return!!HE[e.toLowerCase()]},e.prototype.fire=function(e,t){var n=e.toLowerCase(),r=Ni(n,t||{},this.scope);this.settings.beforeFire&&this.settings.beforeFire(r);var o=this.bindings[n];if(o)for(var i=0,a=o.length;i<a;i++){var u=o[i];if(!u.removed){if(u.once&&this.off(n,u.func),r.isImmediatePropagationStopped())return r;if(!1===u.func.call(this.scope,r))return r.preventDefault(),r}}return r},e.prototype.on=function(e,t,n,r){if(!1===t&&(t=T),t){var o={func:t,removed:!1};r&&ht.extend(o,r);for(var i=e.toLowerCase().split(" "),a=i.length;a--;){var u=i[a],c=this.bindings[u];c||(c=[],this.toggleEvent(u,!0)),c=n?De([o],c,!0):De(De([],c,!0),[o],!1),this.bindings[u]=c}}return this},e.prototype.off=function(e,t){var n=this;if(e)for(var r=e.toLowerCase().split(" "),o=r.length;o--;){var i=r[o],a=this.bindings[i];if(!i)return le(this.bindings,function(e,t){n.toggleEvent(t,!1),delete n.bindings[t]}),this;if(a){if(t){var u=W(a,function(e){return e.func===t});a=u.fail,this.bindings[i]=a,q(u.pass,function(e){e.removed=!0})}else a.length=0;a.length||(this.toggleEvent(e,!1),delete this.bindings[i])}}else le(this.bindings,function(e,t){n.toggleEvent(t,!1)}),this.bindings={};return this},e.prototype.once=function(e,t,n){return this.on(e,t,n,{once:!0})},e.prototype.has=function(e){return e=e.toLowerCase(),!(!this.bindings[e]||0===this.bindings[e].length)},e}(),VE=function(e){return e._eventDispatcher||(e._eventDispatcher=new jE({scope:e,toggleEvent:function(t,n){jE.isNative(t)&&e.toggleNativeEvent&&e.toggleNativeEvent(t,n)}})),e._eventDispatcher},qE={fire:function(e,t,n){if(this.removed&&"remove"!==e&&"detach"!==e)return t;var r=VE(this).fire(e,t);if(!1!==n&&this.parent)for(var o=this.parent();o&&!r.isPropagationStopped();)o.fire(e,r,!1),o=o.parent();return r},on:function(e,t,n){return VE(this).on(e,t,n)},off:function(e,t){return VE(this).off(e,t)},once:function(e,t){return VE(this).once(e,t)},hasEventListeners:function(e){return VE(this).has(e)}},$E=uu.DOM,WE=function(e,t){if("selectionchange"===t)return e.getDoc();if(!e.inline&&/^mouse|touch|click|contextmenu|drop|dragover|dragend/.test(t))return e.getDoc().documentElement;var n=us(e);return n?(e.eventRoot||(e.eventRoot=$E.select(n)[0]),e.eventRoot):e.getBody()},KE=function(e,t,n){!function(e){return!e.hidden&&!FE(e)}(e)?FE(e)&&zE(e,n):e.fire(t,n)},XE=function(e,t){var n;if(e.delegates||(e.delegates={}),!e.delegates[t]&&!e.removed){var r=WE(e,t);if(us(e)){if(Iw||(Iw={},e.editorManager.on("removeEditor",function(){e.editorManager.activeEditor||Iw&&(le(Iw,function(t,n){e.dom.unbind(WE(e,n
90))}),Iw=null)})),Iw[t])return;n=function(n){for(var r=n.target,o=e.editorManager.get(),i=o.length;i--;){var a=o[i].getBody();(a===r||$E.isChildOf(r,a))&&KE(o[i],t,n)}},Iw[t]=n,$E.bind(r,t,n)}else n=function(n){KE(e,t,n)},$E.bind(r,t,n),e.delegates[t]=n}},YE=Re(Re({},qE),{bindPendingEventDelegates:function(){var e=this;ht.each(e._pendingNativeEvents,function(t){XE(e,t)})},toggleNativeEvent:function(e,t){"focus"!==e&&"blur"!==e&&(this.removed||(t?this.initialized?XE(this,e):this._pendingNativeEvents?this._pendingNativeEvents.push(e):this._pendingNativeEvents=[e]:this.initialized&&(this.dom.unbind(WE(this,e),e,this.delegates[e]),delete this.delegates[e])))},unbindAllNativeEvents:function(){var e=this,t=e.getBody(),n=e.dom;e.delegates&&(le(e.delegates,function(t,n){e.dom.unbind(WE(e,n),n,t)}),delete e.delegates),!e.inline&&t&&n&&(t.onload=null,n.unbind(e.getWin()),n.unbind(e.getDoc())),n&&(n.unbind(t),n.unbind(e.getContainer()))}}),GE=["design","readonly"],JE=function(e,t,n,r){var o=n[t.get()],i=n[r];try{i.activate()}catch(Jk){return void console.error("problem while activating editor mode "+r+":",Jk)}o.deactivate(),o.editorReadOnly!==i.editorReadOnly&&ME(e,i.editorReadOnly),t.set(r),function(e,t){e.fire("SwitchMode",{mode:t})}(e,r)},QE=function(e){var t=du("design"),n=du({design:{activate:w,deactivate:w,editorReadOnly:!1},readonly:{activate:w,deactivate:w,editorReadOnly:!0}});return function(e){e.serializer?UE(e):e.on("PreInit",function(){UE(e)})}(e),function(e){e.on("ShowCaret",function(t){FE(e)&&t.preventDefault()}),e.on("ObjectSelected",function(t){FE(e)&&t.preventDefault()})}(e),{isReadOnly:function(){return FE(e)},set:function(r){return function(e,t,n,r){if(r!==n.get()){if(!ye(t,r))throw new Error("Editor mode '"+r+"' is invalid");e.initialized?JE(e,n,t,r):e.on("init",function(){return JE(e,n,t,r)})}}(e,n.get(),t,r)},get:function(){return t.get()},register:function(e,t){n.set(function(e,t,n){var r;if(H(GE,t))throw new Error("Cannot override default mode "+t);return Re(Re({},e),((r={})[t]=Re(Re({},n),{deactivate:function(){try{n.deactivate()}catch(Jk){console.error("problem while deactivating editor mode "+t+":",Jk)}}}),r))}(n.get(),e,t))}}},ZE=ht.each,ek=ht.explode,tk={f1:112,f2:113,f3:114,f4:115,f5:116,f6:117,f7:118,f8:119,f9:120,f10:121,f11:122,f12:123},nk=ht.makeMap("alt,ctrl,shift,meta,access"),rk=function(e){var t,n={};ZE(ek(e.toLowerCase(),"+"),function(e){e in nk?n[e]=!0:/^[0-9]{2,}$/.test(e)?n.keyCode=parseInt(e,10):(n.charCode=e.charCodeAt(0),n.keyCode=tk[e]||e.toUpperCase().charCodeAt(0))});var r=[n.keyCode];for(t in nk)n[t]?r.push(t):n[t]=!1;return n.id=r.join(","),n.access&&(n.alt=!0,lt.mac?n.ctrl=!0:n.shift=!0),n.meta&&(lt.mac?n.meta=!0:(n.ctrl=!0,n.meta=!1)),n},ok=function(){function e(e){this.shortcuts={},this.pendingPatterns=[],this.editor=e;var t=this;e.on("keyup keypress keydown",function(e){!t.hasModifier(e)&&!t.isFunctionKey(e)||e.isDefaultPrevented()||(ZE(t.shortcuts,function(n){if(t.matchShortcut(e,n))return t.pendingPatterns=n.subpatterns.slice(0),"keydown"===e.type&&t.executeShortcutAction(n),!0}),t.matchShortcut(e,t.pendingPatterns[0])&&(1===t.pendingPatterns.length&&"keydown"===e.type&&t.executeShortcutAction(t.pendingPatterns[0]),t.pendingPatterns.shift()))})}return e.prototype.add=function(e,t,n,r){var o=this,i=o.normalizeCommandFunc(n);return ZE(ek(ht.trim(e)),function(e){var n=o.createShortcut(e,t,i,r);o.shortcuts[n.id]=n}),!0},e.prototype.remove=function(e){var t=this.createShortcut(e);return!!this.shortcuts[t.id]&&(delete this.shortcuts[t.id],!0)},e.prototype.normalizeCommandFunc=function(e){var t=this,n=e;return"string"==typeof n?function(){t.editor.execCommand(n,!1,null)}:ht.isArray(n)?function(){t.editor.execCommand(n[0],n[1],n[2])}:n},e.prototype.createShortcut=function(e,t,n,r){var o=ht.map(ek(e,">"),rk);return o[o.length-1]=ht.extend(o[o.length-1],{func:n,scope:r||this.editor}),ht.extend(o[0],{desc:this.editor.translate(t),subpatterns:o.slice(1)})},e.prototype.hasModifier=function(e){return e.altKey||e.ctrlKey||e.metaKey},e.prototype.isFunctionKey=function(e){return"keydown"===e.type&&e.keyCode>=112&&e.keyCode<=123},e.prototype.matchShortcut=function(e,t){return!!t&&(t.ctrl===e.ctrlKey&&t.meta===e.metaKey&&(t.alt===e.altKey&&t.shift===e.shiftKey&&(!!(e.keyCode===t.keyCode||e.charCode&&e.charCode===t.charCode)&&(e.preventDefault(),!0))))},e.prototype.executeShortcutAction=function(e){return e.func?e.func.call(e.scope):null},e}(),ik=function(){var e,t,n,r,o,i,a,u,c=(t={},n={},r={},o={},i={},a={},{addButton:(u=function(e,t){return function(n,r){return e[n.toLowerCase()]=Re(Re({},r),{type:t})}})(e={},"button"),addGroupToolbarButton:u(e,"grouptoolbarbutton"),addToggleButton:u(e,"togglebutton"),addMenuButton:u(e,"menubutton"),addSplitButton:u(e,"splitbutton"),addMenuItem:u(t,"menuitem"),addNestedMenuItem:u(t,"nestedmenuitem"),addToggleMenuItem:u(t,"togglemenuitem"),addAutocompleter:u(n,"autocompleter"),addContextMenu:u(o,"contextmenu"),addContextToolbar:u(i,"contexttoolbar"),addContextForm:u(i,"contextform"),addSidebar:u(a,"sidebar"),addIcon:function(e,t){return r[e.toLowerCase()]=t},getAll:function(){return{buttons:e,menuItems:t,icons:r,popups:n,contextMenus:o,contextToolbars:i,sidebars:a}}});return{addAutocompleter:c.addAutocompleter,addButton:c.addButton,addContextForm:c.addContextForm,addContextMenu:c.addContextMenu,addContextToolbar:c.addContextToolbar,addIcon:c.addIcon,addMenuButton:c.addMenuButton,addMenuItem:c.addMenuItem,addNestedMenuItem:c.addNestedMenuItem,addSidebar:c.addSidebar,addSplitButton:c.addSplitButton,addToggleButton:c.addToggleButton,addGroupToolbarButton:c.addGroupToolbarButton,addToggleMenuItem:c.addToggleMenuItem,getAll:c.getAll}},ak=uu.DOM,uk=ht.extend,ck=ht.each,sk=ht.resolve,fk=lt.ie,lk=function(){function e(e,t,n){var r=this;this.plugins={},this.contentCSS=[],this.contentStyles=[],this.loadedCSS={},this.isNotDirty=!1,this.editorManager=n,this.documentBaseUrl=n.documentBaseURL,uk(this,YE),this.settings=ay(this,e,this.documentBaseUrl,n.defaultSettings,t),this.settings.suffix&&(n.suffix=this.settings.suffix),this.suffix=n.suffix,this.settings.base_url&&n._setBaseUrl(this.settings.base_url),this.baseUri=n.baseURI,this.settings.referrer_policy&&(lu.ScriptLoader._setReferrerPolicy(this.settings.referrer_policy),uu.DOM.styleSheetLoader._setReferrerPolicy(this.settings.referrer_policy)),vu.languageLoad=this.settings.language_load,vu.baseURL=n.baseURL,this.id=e,this.setDirty(!1),this.documentBaseURI=new gb(this.settings.document_base_url,{base_uri:this.baseUri}),this.baseURI=this.baseUri,this.inline=!!this.settings.inline,this.shortcuts=new ok(this),this.editorCommands=new BE(this),this.settings.cache_suffix&&(lt.cacheSuffix=this.settings.cache_suffix.replace(/^[\?\&]+/,"")),this.ui={registry:ik(),styleSheetLoader:void 0,show:w,hide:w,enable:w,disable:w,isDisabled:T};var o=QE(this);this.mode=o,this.setMode=o.set,n.fire("SetupEditor",{editor:this}),this.execCallback("setup",this),this.$=eu.overrideDefaults(function(){return{context:r.inline?r.getBody():r.getDoc(),element:r.getBody()}})}return e.prototype.render=function(){vE(this)}
90,e.prototype.focus=function(e){this.execCommand("mceFocus",!1,e)},e.prototype.hasFocus=function(){return sm(this)},e.prototype.execCallback=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r,o=this.settings[e];if(o)return this.callbackLookup&&(r=this.callbackLookup[e])&&(o=r.func,r=r.scope),"string"==typeof o&&(r=(r=o.replace(/\.\w+$/,""))?sk(r):0,o=sk(o),this.callbackLookup=this.callbackLookup||{},this.callbackLookup[e]={func:o,scope:r}),o.apply(r||this,t)},e.prototype.translate=function(e){return hu.translate(e)},e.prototype.getParam=function(e,t,n){return cy(this,e,t,n)},e.prototype.hasPlugin=function(e,t){return!!H(ds(this).split(/[ ,]/),e)&&(!t||void 0!==yy.get(e))},e.prototype.nodeChanged=function(e){this._nodeChangeDispatcher.nodeChanged(e)},e.prototype.addCommand=function(e,t,n){this.editorCommands.addCommand(e,t,n)},e.prototype.addQueryStateHandler=function(e,t,n){this.editorCommands.addQueryStateHandler(e,t,n)},e.prototype.addQueryValueHandler=function(e,t,n){this.editorCommands.addQueryValueHandler(e,t,n)},e.prototype.addShortcut=function(e,t,n,r){this.shortcuts.add(e,t,n,r)},e.prototype.execCommand=function(e,t,n,r){return this.editorCommands.execCommand(e,t,n,r)},e.prototype.queryCommandState=function(e){return this.editorCommands.queryCommandState(e)},e.prototype.queryCommandValue=function(e){return this.editorCommands.queryCommandValue(e)},e.prototype.queryCommandSupported=function(e){return this.editorCommands.queryCommandSupported(e)},e.prototype.show=function(){this.hidden&&(this.hidden=!1,this.inline?this.getBody().contentEditable="true":(ak.show(this.getContainer()),ak.hide(this.id)),this.load(),this.fire("show"))},e.prototype.hide=function(){var e=this.getDoc();this.hidden||(fk&&e&&!this.inline&&e.execCommand("SelectAll"),this.save(),this.inline?(this.getBody().contentEditable="false",this===this.editorManager.focusedEditor&&(this.editorManager.focusedEditor=null)):(ak.hide(this.getContainer()),ak.setStyle(this.id,"display",this.orgDisplay)),this.hidden=!0,this.fire("hide"))},e.prototype.isHidden=function(){return!!this.hidden},e.prototype.setProgressState=function(e,t){this.fire("ProgressState",{state:e,time:t})},e.prototype.load=function(e){var t,n=this.getElement();if(this.removed)return"";if(n){(e=e||{}).load=!0;var r=kn(n)?n.value:n.innerHTML;return t=this.setContent(r,e),e.element=n,e.no_events||this.fire("LoadContent",e),e.element=n=null,t}},e.prototype.save=function(e){var t,n,r=this,o=r.getElement();if(o&&r.initialized&&!r.removed)return(e=e||{}).save=!0,e.element=o,e.content=r.getContent(e),e.no_events||r.fire("SaveContent",e),"raw"===e.format&&r.fire("RawSaveContent",e),t=e.content,kn(o)?o.value=t:(!e.is_removing&&r.inline||(o.innerHTML=t),(n=ak.getParent(r.id,"form"))&&ck(n.elements,function(e){if(e.name===r.id)return e.value=t,!1})),e.element=o=null,!1!==e.set_dirty&&r.setDirty(!1),t},e.prototype.setContent=function(e,t){return Pb(this,e,t)},e.prototype.getContent=function(e){return Bb(this,e)},e.prototype.insertContent=function(e,t){t&&(e=uk({content:e},t)),this.execCommand("mceInsertContent",!1,e)},e.prototype.resetContent=function(e){void 0===e?Pb(this,this.startContent,{format:"raw"}):Pb(this,e),this.undoManager.reset(),this.setDirty(!1),this.nodeChanged()},e.prototype.isDirty=function(){return!this.isNotDirty},e.prototype.setDirty=function(e){var t=!this.isNotDirty;this.isNotDirty=!e,e&&e!==t&&this.fire("dirty")},e.prototype.getContainer=function(){return this.container||(this.container=ak.get(this.editorContainer||this.id+"_parent")),this.container},e.prototype.getContentAreaContainer=function(){return this.contentAreaContainer},e.prototype.getElement=function(){return this.targetElm||(this.targetElm=ak.get(this.id)),this.targetElm},e.prototype.getWin=function(){var e;return this.contentWindow||(e=this.iframeElement)&&(this.contentWindow=e.contentWindow),this.contentWindow},e.prototype.getDoc=function(){var e;return this.contentDocument||(e=this.getWin())&&(this.contentDocument=e.document),this.contentDocument},e.prototype.getBody=function(){var e=this.getDoc();return this.bodyElement||(e?e.body:null)},e.prototype.convertURL=function(e,t,n){var r=this.settings;return r.urlconverter_callback?this.execCallback("urlconverter_callback",e,n,!0,t):!r.convert_urls||n&&"LINK"===n.nodeName||0===e.indexOf("file:")||0===e.length?e:r.relative_urls?this.documentBaseURI.toRelative(e):e=this.documentBaseURI.toAbsolute(e,r.remove_script_host)},e.prototype.addVisual=function(e){bE(this,e)},e.prototype.remove=function(){Mb(this)},e.prototype.destroy=function(e){Fb(this,e)},e.prototype.uploadImages=function(e){return this.editorUpload.uploadImages(e)},e.prototype._scanForImages=function(){return this.editorUpload.scanForImages()},e.prototype.addButton=function(){throw new Error("editor.addButton has been removed in tinymce 5x, use editor.ui.registry.addButton or editor.ui.registry.addToggleButton or editor.ui.registry.addSplitButton instead")},e.prototype.addSidebar=function(){throw new Error("editor.addSidebar has been removed in tinymce 5x, use editor.ui.registry.addSidebar instead")},e.prototype.addMenuItem=function(){throw new Error("editor.addMenuItem has been removed in tinymce 5x, use editor.ui.registry.addMenuItem instead")},e.prototype.addContextToolbar=function(){throw new Error("editor.addContextToolbar has been removed in tinymce 5x, use editor.ui.registry.addContextToolbar instead")},e}(),dk=uu.DOM,mk=ht.explode,gk=ht.each,pk=ht.extend,hk=0,vk=!1,bk=[],yk=[],Ck=function(e){var t=e.type;gk(Nk.get(),function(n){switch(t){case"scroll":n.fire("ScrollWindow",e);break;case"resize":n.fire("ResizeWindow",e)}})},wk=function(e){e!==vk&&(e?eu(window).on("resize scroll",Ck):eu(window).off("resize scroll",Ck),vk=e)},xk=function(e){var t=yk;delete bk[e.id];for(var n=0;n<bk.length;n++)if(bk[n]===e){bk.splice(n,1);break}return yk=K(yk,function(t){return e!==t}),Nk.activeEditor===e&&(Nk.activeEditor=yk.length>0?yk[0]:null),Nk.focusedEditor===e&&(Nk.focusedEditor=null),t.length!==yk.length},Sk="CSS1Compat"!==document.compatMode,Nk=Re(Re({},qE),{baseURI:null,baseURL:null,defaultSettings:{},documentBaseURL:null,suffix:null,$:eu,majorVersion:"5",minorVersion:"10.9",releaseDate:"2023-11-15",editors:bk,i18n:hu,activeEditor:null,focusedEditor:null,settings:{},setup:function(){var e,t,n="";t=gb.getDocumentBaseUrl(document.location),/^[^:]+:\/\/\/?[^\/]+\//.test(t)&&(t=t.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,""),/[\/\\]$/.test(t)||(t+="/"));var r,o=window.tinymce||window.tinyMCEPreInit;if(o)e=o.base||o.baseURL,n=o.suffix;else{for(var i=document.getElementsByTagName("script"),a=0;a<i.length;a++){var u;if(""!==(u=i[a].src||"")){var c=u.substring(u.lastIndexOf("/"));if(/tinymce(\.full|\.jquery|)(\.min|\.dev|)\.js/.test(u)){-1!==c.indexOf(".min")&&(n=".min"),e=u.substring(0,u.lastIndexOf("/"));break}}}if(!e&&document.currentScript)-1!==(u=document.currentScript.src).indexOf(".min")&&(n=".min"),e=u.substring(0,u.lastIndexOf("/"))}this.baseURL=new gb(t).toAbsolute(e),this.documentBaseURL=t,this.baseURI=new gb(this.baseURL),this.suffix=n,
90(r=this).on("AddEditor",_(rm,r)),r.on("RemoveEditor",_(om,r))},overrideDefaults:function(e){var t=e.base_url;t&&this._setBaseUrl(t);var n=e.suffix;e.suffix&&(this.suffix=n),this.defaultSettings=e;var r=e.plugin_base_urls;void 0!==r&&le(r,function(e,t){vu.PluginManager.urls[t]=e})},init:function(e){var t,n=this,r=ht.makeMap("area base basefont br col frame hr img input isindex link meta param embed source wbr track colgroup option table tbody tfoot thead tr th td script noscript style textarea video audio iframe object menu"," "),o=function(e){var t=e.id;return t||(t=be(e,"name").filter(function(e){return!dk.get(e)}).getOrThunk(dk.uniqueId),e.setAttribute("id",t)),t},i=function(e,t){return t.constructor===RegExp?t.test(e.className):dk.hasClass(e,t)},a=function(e){t=e},u=function(){var t,c=0,s=[],f=function(e,r,o){var i=new lk(e,r,n);s.push(i),i.on("init",function(){++c===t.length&&a(s)}),i.targetElm=i.targetElm||o,i.render()};dk.unbind(window,"ready",u),function(t){var r=e[t];if(r)r.apply(n,[])}("onpageload"),t=eu.unique(function(e){var t=[];if(lt.browser.isIE()&&lt.browser.version.major<11)return _y("TinyMCE does not support the browser you are using. For a list of supported browsers please see: https://www.tinymce.com/docs/get-started/system-requirements/"),[];if(Sk)return _y("Failed to initialize the editor as the document is not in standards mode. TinyMCE requires standards mode."),[];if(e.types)return gk(e.types,function(e){t=t.concat(dk.select(e.selector))}),t;if(e.selector)return dk.select(e.selector);if(e.target)return[e.target];switch(e.mode){case"exact":var n=e.elements||"";n.length>0&&gk(mk(n),function(e){var n=dk.get(e);n?t.push(n):gk(document.forms,function(n){gk(n.elements,function(n){n.name===e&&(e="mce_editor_"+hk++,dk.setAttrib(n,"id",e),t.push(n))})})});break;case"textareas":case"specific_textareas":gk(dk.select("textarea"),function(n){e.editor_deselector&&i(n,e.editor_deselector)||e.editor_selector&&!i(n,e.editor_selector)||t.push(n)})}return t}(e)),e.types?gk(e.types,function(n){ht.each(t,function(t){return!dk.is(t,n.selector)||(f(o(t),pk({},e,n),t),!1)})}):(ht.each(t,function(e){var t;(t=n.get(e.id))&&t.initialized&&!(t.getContainer()||t.getBody()).parentNode&&(xk(t),t.unbindAllNativeEvents(),t.destroy(!0),t.removed=!0,t=null)}),0===(t=ht.grep(t,function(e){return!n.get(e.id)})).length?a([]):gk(t,function(t){!function(e,t){return e.inline&&t.tagName.toLowerCase()in r}(e,t)?f(o(t),e,t):_y("Could not initialize inline editor on invalid inline target element",t)}))};return n.settings=e,dk.bind(window,"ready",u),new Vr(function(e){t?e(t):a=function(t){e(t)}})},get:function(e){return 0===arguments.length?yk.slice(0):l(e)?J(yk,function(t){return t.id===e}).getOr(null):C(e)&&yk[e]?yk[e]:null},add:function(e){var t=this;return bk[e.id]===e?e:(null===t.get(e.id)&&("length"!==e.id&&(bk[e.id]=e),bk.push(e),yk.push(e)),wk(!0),t.activeEditor=e,t.fire("AddEditor",{editor:e}),Mw||(Mw=function(e){var n=t.fire("BeforeUnload");if(n.returnValue)return e.preventDefault(),e.returnValue=n.returnValue,n.returnValue},window.addEventListener("beforeunload",Mw)),e)},createEditor:function(e,t){return this.add(new lk(e,t,this))},remove:function(e){var t,n,r=this;if(e){if(!l(e))return n=e,g(r.get(n.id))?null:(xk(n)&&r.fire("RemoveEditor",{editor:n}),0===yk.length&&window.removeEventListener("beforeunload",Mw),n.remove(),wk(yk.length>0),n);gk(dk.select(e),function(e){(n=r.get(e.id))&&r.remove(n)})}else for(t=yk.length-1;t>=0;t--)r.remove(yk[t])},execCommand:function(e,t,n){var r=this.get(n);switch(e){case"mceAddEditor":return this.get(n)||new lk(n,this.settings,this).render(),!0;case"mceRemoveEditor":return r&&r.remove(),!0;case"mceToggleEditor":return r?(r.isHidden()?r.show():r.hide(),!0):(this.execCommand("mceAddEditor",!1,n),!0)}return!!this.activeEditor&&this.activeEditor.execCommand(e,t,n)},triggerSave:function(){gk(yk,function(e){e.save()})},addI18n:function(e,t){hu.add(e,t)},translate:function(e){return hu.translate(e)},setActive:function(e){var t=this.activeEditor;this.activeEditor!==e&&(t&&t.fire("deactivate",{relatedTarget:e}),e.fire("activate",{relatedTarget:t})),this.activeEditor=e},_setBaseUrl:function(e){this.baseURL=new gb(this.documentBaseURL).toAbsolute(e.replace(/\/+$/,"")),this.baseURI=new gb(this.baseURL)}});Nk.setup();var Ek,kk,_k,Ak,Rk=Math.min,Dk=Math.max,Tk=Math.round,Ok=function(e,t,n){var r=t.x,o=t.y,i=e.w,a=e.h,u=t.w,c=t.h,s=(n||"").split("");return"b"===s[0]&&(o+=c),"r"===s[1]&&(r+=u),"c"===s[0]&&(o+=Tk(c/2)),"c"===s[1]&&(r+=Tk(u/2)),"b"===s[3]&&(o-=a),"r"===s[4]&&(r-=i),"c"===s[3]&&(o-=Tk(a/2)),"c"===s[4]&&(r-=Tk(i/2)),Bk(r,o,i,a)},Bk=function(e,t,n,r){return{x:e,y:t,w:n,h:r}},Pk={inflate:function(e,t,n){return Bk(e.x-t,e.y-n,e.w+2*t,e.h+2*n)},relativePosition:Ok,findBestRelativePosition:function(e,t,n,r){var o,i;for(i=0;i<r.length;i++)if((o=Ok(e,t,r[i])).x>=n.x&&o.x+o.w<=n.w+n.x&&o.y>=n.y&&o.y+o.h<=n.h+n.y)return r[i];return null},intersect:function(e,t){var n=Dk(e.x,t.x),r=Dk(e.y,t.y),o=Rk(e.x+e.w,t.x+t.w),i=Rk(e.y+e.h,t.y+t.h);return o-n<0||i-r<0?null:Bk(n,r,o-n,i-r)}
90,clamp:function(e,t,n){var r=e.x,o=e.y,i=e.x+e.w,a=e.y+e.h,u=t.x+t.w,c=t.y+t.h,s=Dk(0,t.x-r),f=Dk(0,t.y-o),l=Dk(0,i-u),d=Dk(0,a-c);return r+=s,o+=f,n&&(i+=s,a+=f,r-=l,o-=d),Bk(r,o,(i-=l)-r,(a-=d)-o)},create:Bk,fromClientRect:function(e){return Bk(e.left,e.top,e.width,e.height)}},Lk=(Ek={},kk={},{load:function(e,t){var n='Script at URL "'+t+'" failed to load',r='Script at URL "'+t+"\" did not call `tinymce.Resource.add('"+e+"', data)` within 1 second";if(void 0!==Ek[e])return Ek[e];var o=new Vr(function(o,i){var a=function(e,t,n){void 0===n&&(n=1e3);var r=!1,o=null,i=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];r||(r=!0,null!==o&&(clearTimeout(o),o=null),e.apply(null,t))}},a=i(e),u=i(t);return{start:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];r||null!==o||(o=setTimeout(function(){return u.apply(null,e)},n))},resolve:a,reject:u}}(o,i);kk[e]=a.resolve,lu.ScriptLoader.loadScript(t,function(){return a.start(r)},function(){return a.reject(n)})});return Ek[e]=o,o},add:function(e,t){void 0!==kk[e]&&(kk[e](t),delete kk[e]),Ek[e]=Vr.resolve(t)}}),Ik=ht.each,Mk=ht.extend,Fk=function(){};Fk.extend=_k=function(e){var t=this.prototype,n=function(){var e,t,n;if(!Ak&&(this.init&&this.init.apply(this,arguments),t=this.Mixins))for(e=t.length;e--;)(n=t[e]).init&&n.init.apply(this,arguments)},r=function(){return this};Ak=!0;var o=new this;return Ak=!1,e.Mixins&&(Ik(e.Mixins,function(t){for(var n in t)"init"!==n&&(e[n]=t[n])}),t.Mixins&&(e.Mixins=t.Mixins.concat(e.Mixins))),e.Methods&&Ik(e.Methods.split(","),function(t){e[t]=r}),e.Properties&&Ik(e.Properties.split(","),function(t){var n="_"+t;e[t]=function(e){return void 0!==e?(this[n]=e,this):this[n]}}),e.Statics&&Ik(e.Statics,function(e,t){n[t]=e}),e.Defaults&&t.Defaults&&(e.Defaults=Mk({},t.Defaults,e.Defaults)),le(e,function(e,n){"function"==typeof e&&t[n]?o[n]=function(e,n){return function(){var r=this._super;this._super=t[e];var o=n.apply(this,arguments);return this._super=r,o}}(n,e):o[n]=e}),n.prototype=o,n.constructor=n,n.extend=_k,n};var Uk,zk=Math.min,Hk=Math.max,jk=Math.round,Vk={serialize:function(e){var t=JSON.stringify(e);return l(t)?t.replace(/[\u0080-\uFFFF]/g,function(e){var t=e.charCodeAt(0).toString(16);return"\\u"+"0000".substring(t.length)+t}):t},parse:function(e){try{return JSON.parse(e)}catch(t){}}},qk={callbacks:{},count:0,send:function(e){var t=this,n=uu.DOM,r=void 0!==e.count?e.count:t.count,o="tinymce_jsonp_"+r;t.callbacks[r]=function(i){n.remove(o),delete t.callbacks[r],e.callback(i)},n.add(n.doc.body,"script",{id:o,src:e.url,type:"text/javascript"}),t.count++}},$k=Re(Re({},qE),{send:function(e){var t,n=0,r=function(){!e.async||4===t.readyState||n++>1e4?(e.success&&n<1e4&&200===t.status?e.success.call(e.success_scope,""+t.responseText,t,e):e.error&&e.error.call(e.error_scope,n>1e4?"TIMED_OUT":"GENERAL",t,e),t=null):Kr.setTimeout(r,10)};if(e.scope=e.scope||this,e.success_scope=e.success_scope||e.scope,e.error_scope=e.error_scope||e.scope,e.async=!1!==e.async,e.data=e.data||"",$k.fire("beforeInitialize",{settings:e}),(t=new XMLHttpRequest).overrideMimeType&&t.overrideMimeType(e.content_type),t.open(e.type||(e.data?"POST":"GET"),e.url,e.async),e.crossDomain&&(t.withCredentials=!0),e.content_type&&t.setRequestHeader("Content-Type",e.content_type),e.requestheaders&&ht.each(e.requestheaders,function(e){t.setRequestHeader(e.key,e.value)}),t.setRequestHeader("X-Requested-With","XMLHttpRequest"),(t=$k.fire("beforeSend",{xhr:t,settings:e}).xhr).send(e.data),!e.async)return r();Kr.setTimeout(r,10)}}),Wk=ht.extend,Kk=function(){function e(e){this.settings=Wk({},e),this.count=0}return e.sendRPC=function(t){return(new e).send(t)},e.prototype.send=function(e){var t=e.error,n=e.success,r=Wk(this.settings,e);r.success=function(e,o){void 0===(e=Vk.parse(e))&&(e={error:"JSON Parse error."}),e.error?t.call(r.error_scope||r.scope,e.error,o):n.call(r.success_scope||r.scope,e.result)},r.error=function(e,n){t&&t.call(r.error_scope||r.scope,e,n)},r.data=Vk.serialize({id:e.id||"c"+this.count++,method:e.method,params:e.params}),r.content_type="application/json",$k.send(r)},e}();try{var Xk="__storage_test__";(Uk=window.localStorage).setItem(Xk,Xk),Uk.removeItem(Xk)}catch(Jk){Uk=function(){return e={},t=[],n={getItem:function(t){var n=e[t];return n||null},setItem:function(n,r){t.push(n),e[n]=String(r)},key:function(e){return t[e]},removeItem:function(n){t=t.filter(function(e){return e===n}),delete e[n]},clear:function(){t=[],e={}},length:0},Object.defineProperty(n,"length",{get:function(){return t.length},configurable:!1,enumerable:!1}),n;var e,t,n}()}var Yk={geom:{Rect:Pk},util:{Promise:Vr,Delay:Kr,Tools:ht,VK:Xl,URI:gb,Class:Fk,EventDispatcher:jE,Observable:qE,I18n:hu,XHR:$k,JSON:Vk,JSONRequest:Kk,JSONP:qk,LocalStorage:Uk,Color:function(e){var t={},n=0,r=0,o=0,i=function(e){var i;return"object"==typeof e?"r"in e?(n=e.r,r=e.g,o=e.b):"v"in e&&function(e,t,i){if(e=(parseInt(e,10)||0)%360,t=parseInt(t,10)/100,i=parseInt(i,10)/100,t=Hk(0,zk(t,1)),i=Hk(0,zk(i,1)),0!==t){var a=e/60,u=i*t,c=u*(1-Math.abs(a%2-1)),s=i-u;switch(Math.floor(a)){case 0:n=u,r=c,o=0;break;case 1:n=c,r=u,o=0;break;case 2:n=0,r=u,o=c;break;case 3:n=0,r=c,o=u;break;case 4:n=c,r=0,o=u;break;case 5:n=u,r=0,o=c;break;default:n=r=o=0}n=jk(255*(n+s)),r=jk(255*(r+s)),o=jk(255*(o+s))}else n=r=o=jk(255*i)}(e.h,e.s,e.v):(i=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)[^\)]*\)/gi.exec(e))?(n=parseInt(i[1],10),r=parseInt(i[2],10),o=parseInt(i[3],10)):(i=/#([0-F]{2})([0-F]{2})([0-F]{2})/gi.exec(e))?(n=parseInt(i[1],16),r=parseInt(i[2],16),o=parseInt(i[3],16)):(i=/#([0-F])([0-F])([0-F])/gi.exec(e))&&(n=parseInt(i[1]+i[1],16),r=parseInt(i[2]+i[2],16),o=parseInt(i[3]+i[3],16)),n=n<0?0:n>255?255:n,r=r<0?0:r>255?255:r,o=o<0?0:o>255?255:o,t};return e&&i(e),t.toRgb=function(){return{r:n,g:r,b:o}},t.toHsv=function(){return function(e,t,n){var r,o;o=0;var i=zk(e/=255,zk(t/=255,n/=255)),a=Hk(e,Hk(t,n));return i===a?{h:0,s:0,v:100*(o=i)}:(r=(a-i)/a,o=a,{h:jk(60*((e===i?3:n===i?1:5)-(e===i?t-n:n===i?e-t:n-e)/(a-i))),s:jk(100*r),v:jk(100*o)})}(n,r,o)},t.toHex=function(){var e=function(e){return(e=parseInt(e,10).toString(16)).length>1?e:"0"+e};return"#"+e(n)+e(r)+e(o)},t.parse=i,t},ImageUploader:function(e){var t=Ty(),n=Iy(e,t);return{upload:function(t,r){return void 0===r&&(r=!0),n.upload(t,r?Ly(e):void 0)}}}},dom:{EventUtils:Ti,Sizzle:ga,DomQuery:eu,TreeWalker:Gr,TextSeeker:qu,DOMUtils:uu,ScriptLoader:lu,RangeUtils:ld,Serializer:Ob,StyleSheetLoader:Xr,ControlSelection:Gl,BookmarkManager:jl,Selection:Kv,Event:Ti.Event},html:{Styles:wi,Entities:ui,Node:xm,Schema:yi,SaxParser:Cb,DomParser:_b,Writer:Hm,Serializer:jm},Env:lt,AddOnManager:vu,Annotator:Hl,Formatter:qy,UndoManager:Wy,EditorCommands:BE,WindowManager:wy,NotificationManager:by,EditorObservable:YE,Shortcuts:ok,Editor:lk,FocusManager:Qd,EditorManager:Nk,DOM:uu.DOM,ScriptLoader:lu.ScriptLoader,PluginManager:yy,ThemeManager:Cy,IconManager:sy,Resource:Lk,trim:ht.trim,isArray:ht.isArray,is:ht.is,toArray:ht.toArray,makeMap:ht.makeMap,each:ht.each,map:ht.map,grep:ht.grep,inArray:ht.inArray,extend:ht.extend,create:ht.create,walk:ht.walk,createNS:ht.createNS,resolve:ht.resolve,explode:ht.explode,_addCacheSuffix:ht._addCacheSuffix,isOpera:lt.opera,isWebKit:lt.webkit,isIE:lt.ie,isGecko:lt.gecko,isMac:lt.mac},Gk=ht.extend(Nk,Yk);!function(e){window.tinymce=e,window.tinyMCE=e}(Gk),function(e){if("object"==typeof module)try{module.exports=e}catch(t){}}(Gk)}();
91},{"process":"g5IB"}],"n3pW":[function(require,module,exports) {
92var process = require("process");
93var define;
94var global = arguments[3];
95var t,n=require("process"),e=arguments[3];!function(){"use strict";var t=function(t){return function(n){return o=typeof(e=n),(null===e?"null":"object"===o&&(Array.prototype.isPrototypeOf(e)||e.constructor&&"Array"===e.constructor.name)?"array":"object"===o&&(String.prototype.isPrototypeOf(e)||e.constructor&&"String"===e.constructor.name)?"string":o)===t;var e,o}},n=function(t){return function(n){return typeof n===t}},o=function(t){return function(n){return t===n}},r=t("string"),i=t("object"),u=t("array"),a=o(null),c=n("boolean"),s=o(void 0),f=function(t){return null==t},l=function(t){return!f(t)},d=n("function"),m=n("number"),g=function(t,n){if(u(t)){for(var e=0,o=t.length;e<o;++e)if(!n(t[e]))return!1;return!0}return!1},p=function(){},h=function(t,n){return function(){for(var e=[],o=0;o<arguments.length;o++)e[o]=arguments[o];return t(n.apply(null,e))}},v=function(t){return function(){return t}},b=function(t){return t},y=function(t,n){return t===n};function x(t){for(var n=[],e=1;e<arguments.length;e++)n[e-1]=arguments[e];return function(){for(var e=[],o=0;o<arguments.length;o++)e[o]=arguments[o];var r=n.concat(e);return t.apply(null,r)}}var w=function(t){return function(n){return!t(n)}},S=function(t){return function(){throw new Error(t)}},k=v(!1),C=v(!0),O=tinymce.util.Tools.resolve("tinymce.ThemeManager"),_=function(){return(_=Object.assign||function(t){for(var n,e=1,o=arguments.length;e<o;e++)for(var r in n=arguments[e])Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r]);return t}).apply(this,arguments)};function T(t,n){var e={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&n.indexOf(o)<0&&(e[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(t);r<o.length;r++)n.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(t,o[r])&&(e[o[r]]=t[o[r]])}return e}function E(t,n,e){if(e||2===arguments.length)for(var o,r=0,i=n.length;r<i;r++)!o&&r in n||(o||(o=Array.prototype.slice.call(n,0,r)),o[r]=n[r]);return t.concat(o||Array.prototype.slice.call(n))}var D,A,B=function(){return M},M={fold:function(t,n){return t()},isSome:k,isNone:C,getOr:A=b,getOrThunk:D=function(t){return t()},getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:v(null),getOrUndefined:v(void 0),or:A,orThunk:D,map:B,each:p,bind:B,exists:k,forall:C,filter:function(){return B()},toArray:function(){return[]},toString:v("none()")},F=function(t){var n=v(t),e=function(){return r},o=function(n){return n(t)},r={fold:function(n,e){return e(t)},isSome:C,isNone:k,getOr:n,getOrThunk:n,getOrDie:n,getOrNull:n,getOrUndefined:n,or:e,orThunk:e,map:function(n){return F(n(t))},each:function(n){n(t)},bind:o,exists:o,forall:o,filter:function(n){return n(t)?r:M},toArray:function(){return[t]},toString:function(){return"some("+t+")"}};return r},I={some:F,none:B,from:function(t){return null==t?M:F(t)}},R=Array.prototype.slice,N=Array.prototype.indexOf,P=Array.prototype.push,V=function(t,n){return N.call(t,n)},H=function(t,n){var e=V(t,n);return-1===e?I.none():I.some(e)},L=function(t,n){return V(t,n)>-1},z=function(t,n){for(var e=0,o=t.length;e<o;e++){if(n(t[e],e))return!0}return!1},U=function(t,n){for(var e=[],o=0;o<t;
95o++)e.push(n(o));return e},j=function(t,n){for(var e=[],o=0;o<t.length;o+=n){var r=R.call(t,o,o+n);e.push(r)}return e},W=function(t,n){for(var e=t.length,o=new Array(e),r=0;r<e;r++){var i=t[r];o[r]=n(i,r)}return o},G=function(t,n){for(var e=0,o=t.length;e<o;e++){n(t[e],e)}},X=function(t,n){for(var e=[],o=[],r=0,i=t.length;r<i;r++){var u=t[r];(n(u,r)?e:o).push(u)}return{pass:e,fail:o}},q=function(t,n){for(var e=[],o=0,r=t.length;o<r;o++){var i=t[o];n(i,o)&&e.push(i)}return e},Y=function(t,n,e){return function(t,n){for(var e=t.length-1;e>=0;e--)n(t[e],e)}(t,function(t,o){e=n(e,t,o)}),e},K=function(t,n,e){return G(t,function(t,o){e=n(e,t,o)}),e},J=function(t,n){return function(t,n,e){for(var o=0,r=t.length;o<r;o++){var i=t[o];if(n(i,o))return I.some(i);if(e(i,o))break}return I.none()}(t,n,k)},$=function(t,n){for(var e=0,o=t.length;e<o;e++){if(n(t[e],e))return I.some(e)}return I.none()},Q=function(t){for(var n=[],e=0,o=t.length;e<o;++e){if(!u(t[e]))throw new Error("Arr.flatten item "+e+" was not an array, input: "+t);P.apply(n,t[e])}return n},Z=function(t,n){return Q(W(t,n))},tt=function(t,n){for(var e=0,o=t.length;e<o;++e){if(!0!==n(t[e],e))return!1}return!0},nt=function(t){var n=R.call(t,0);return n.reverse(),n},et=function(t,n){return q(t,function(t){return!L(n,t)})},ot=function(t,n){for(var e={},o=0,r=t.length;o<r;o++){var i=t[o];e[String(i)]=n(i,o)}return e},rt=function(t){return[t]},it=function(t,n){var e=R.call(t,0);return e.sort(n),e},ut=function(t,n){return n>=0&&n<t.length?I.some(t[n]):I.none()},at=function(t){return ut(t,0)},ct=function(t){return ut(t,t.length-1)},st=d(Array.from)?Array.from:function(t){return R.call(t)},ft=function(t,n){for(var e=0;e<t.length;e++){var o=n(t[e],e);if(o.isSome())return o}return I.none()},lt=Object.keys,dt=Object.hasOwnProperty,mt=function(t,n){for(var e=lt(t),o=0,r=e.length;o<r;o++){var i=e[o];n(t[i],i)}},gt=function(t,n){return pt(t,function(t,e){return{k:e,v:n(t,e)}})},pt=function(t,n){var e={};return mt(t,function(t,o){var r=n(t,o);e[r.k]=r.v}),e},ht=function(t,n){var e,o={};return function(t,n,e,o){mt(t,function(t,r){(n(t,r)?e:o)(t,r)})}(t,n,(e=o,function(t,n){e[n]=t}),p),o},vt=function(t,n){var e=[];return mt(t,function(t,o){e.push(n(t,o))}),e},bt=function(t,n){for(var e=lt(t),o=0,r=e.length;o<r;o++){var i=e[o],u=t[i];if(n(u,i,t))return I.some(u)}return I.none()},yt=function(t){return vt(t,b)},xt=function(t,n){return wt(t,n)?I.from(t[n]):I.none()},wt=function(t,n){return dt.call(t,n)},St=function(t,n){return wt(t,n)&&void 0!==t[n]&&null!==t[n]},kt=function(t,n,e){return void 0===e&&(e=y),t.exists(function(t){return e(t,n)})},Ct=function(t){for(var n=[],e=function(t){n.push(t)},o=0;o<t.length;o++)t[o].each(e);return n},Ot=function(t,n,e){return t.isSome()&&n.isSome()?I.some(e(t.getOrDie(),n.getOrDie())):I.none()},_t=function(t,n){return t?I.some(n):I.none()},Tt=function(t,n,e){return""===n||t.length>=n.length&&t.substr(e,e+n.length)===n},Et=function(t,n){return-1!==t.indexOf(n)},Dt=function(t,n){return Tt(t,n,0)},At=function(t,n){return Tt(t,n,t.length-n.length)},Bt=function(t){return function(n){return n.replace(t,"")}}(/^\s+|\s+$/g),Mt=function(t){return t.length>0},Ft=function(t){return void 0!==t.style&&d(t.style.getPropertyValue)},It=function(t){if(null==t)throw new Error("Node cannot be null or undefined");return{dom:t}},Rt={fromHtml:function(t,n){var e=(n||document).createElement("div");if(e.innerHTML=t,!e.hasChildNodes()||e.childNodes.length>1)throw console.error("HTML does not have a single root node",t),new Error("HTML must have a single root node");return It(e.childNodes[0])},fromTag:function(t,n){var e=(n||document).createElement(t);return It(e)},fromText:function(t,n){var e=(n||document).createTextNode(t);return It(e)},fromDom:It,fromPoint:function(t,n,e){return I.from(t.dom.elementFromPoint(n,e)).map(It)}};"undefined"!=typeof window?window:Function("return this;")();var Nt,Pt=function(t){return t.dom.nodeName.toLowerCase()},Vt=function(t){return function(n){return function(t){return t.dom.nodeType}(n)===t}},Ht=Vt(1),Lt=Vt(3),zt=Vt(9),Ut=Vt(11),jt=function(t){var n,e=!1;return function(){for(var o=[],r=0;r<arguments.length;r++)o[r]=arguments[r];return e||(e=!0,n=t.apply(null,o)),n}},Wt=function(){return Gt(0,0)},Gt=function(t,n){return{major:t,minor:n}},Xt={nu:Gt,detect:function(t,n){var e=String(n).toLowerCase();return 0===t.length?Wt():function(t,n){var e=function(t,n){for(var e=0;e<t.length;e++){var o=t[e];if(o.test(n))return o}}(t,n);if(!e)return{major:0,minor:0};var o=function(t){return Number(n.replace(e,"$"+t))};return Gt(o(1),o(2))}(t,e)},unknown:Wt},qt=function(t,n){var e=String(n).toLowerCase();return J(t,function(t){return t.search(e)})},Yt=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,Kt=function(t){return function(n){return Et(n,t)}},Jt=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(t){return Et(t,"edge/")&&Et(t,"chrome")&&Et(t,"safari")&&Et(t,"applewebkit")}},{name:"Chrome",brand:"Chromium",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,Yt],search:function(t){return Et(t,"chrome")&&!Et(t,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(t){return Et(t,"msie")||Et(t,"trident")}}
95,{name:"Opera",versionRegexes:[Yt,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:Kt("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:Kt("firefox")},{name:"Safari",versionRegexes:[Yt,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(t){return(Et(t,"safari")||Et(t,"mobile/"))&&Et(t,"applewebkit")}}],$t=[{name:"Windows",search:Kt("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(t){return Et(t,"iphone")||Et(t,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:Kt("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:Kt("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:Kt("linux"),versionRegexes:[]},{name:"Solaris",search:Kt("sunos"),versionRegexes:[]},{name:"FreeBSD",search:Kt("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:Kt("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],Qt={browsers:v(Jt),oses:v($t)},Zt=function(t){var n=t.current,e=t.version,o=function(t){return function(){return n===t}};return{current:n,version:e,isEdge:o("Edge"),isChrome:o("Chrome"),isIE:o("IE"),isOpera:o("Opera"),isFirefox:o("Firefox"),isSafari:o("Safari")}},tn={unknown:function(){return Zt({current:void 0,version:Xt.unknown()})},nu:Zt,edge:v("Edge"),chrome:v("Chrome"),ie:v("IE"),opera:v("Opera"),firefox:v("Firefox"),safari:v("Safari")},nn=function(t){var n=t.current,e=t.version,o=function(t){return function(){return n===t}};return{current:n,version:e,isWindows:o("Windows"),isiOS:o("iOS"),isAndroid:o("Android"),isOSX:o("OSX"),isLinux:o("Linux"),isSolaris:o("Solaris"),isFreeBSD:o("FreeBSD"),isChromeOS:o("ChromeOS")}},en={unknown:function(){return nn({current:void 0,version:Xt.unknown()})},nu:nn,windows:v("Windows"),ios:v("iOS"),android:v("Android"),linux:v("Linux"),osx:v("OSX"),solaris:v("Solaris"),freebsd:v("FreeBSD"),chromeos:v("ChromeOS")},on=function(t,n,e){var o=Qt.browsers(),r=Qt.oses(),i=n.bind(function(t){return function(t,n){return ft(n.brands,function(n){var e=n.brand.toLowerCase();return J(t,function(t){var n;return e===(null===(n=t.brand)||void 0===n?void 0:n.toLowerCase())}).map(function(t){return{current:t.name,version:Xt.nu(parseInt(n.version,10),0)}})})}(o,t)}).orThunk(function(){return function(t,n){return qt(t,n).map(function(t){var e=Xt.detect(t.versionRegexes,n);return{current:t.name,version:e}})}(o,t)}).fold(tn.unknown,tn.nu),u=function(t,n){return qt(t,n).map(function(t){var e=Xt.detect(t.versionRegexes,n);return{current:t.name,version:e}})}(r,t).fold(en.unknown,en.nu),a=function(t,n,e,o){var r=t.isiOS()&&!0===/ipad/i.test(e),i=t.isiOS()&&!r,u=t.isiOS()||t.isAndroid(),a=u||o("(pointer:coarse)"),c=r||!i&&u&&o("(min-device-width:768px)"),s=i||u&&!c,f=n.isSafari()&&t.isiOS()&&!1===/safari/i.test(e),l=!s&&!c&&!f;return{isiPad:v(r),isiPhone:v(i),isTablet:v(c),isPhone:v(s),isTouch:v(a),isAndroid:t.isAndroid,isiOS:t.isiOS,isWebView:v(f),isDesktop:v(l)}}(u,i,t,e);return{browser:i,os:u,deviceType:a}},rn=function(t){return window.matchMedia(t).matches},un=jt(function(){return on(navigator.userAgent,I.from(navigator.userAgentData),rn)}),an=function(){return un()},cn=function(t,n){var e=t.dom;if(1!==e.nodeType)return!1;var o=e;if(void 0!==o.matches)return o.matches(n);if(void 0!==o.msMatchesSelector)return o.msMatchesSelector(n);if(void 0!==o.webkitMatchesSelector)return o.webkitMatchesSelector(n);if(void 0!==o.mozMatchesSelector)return o.mozMatchesSelector(n);throw new Error("Browser lacks native selectors")},sn=function(t){return 1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType||0===t.childElementCount},fn=function(t,n){return t.dom===n.dom},ln=function(t,n){return e=t.dom,o=n.dom,function(t,n,e){return 0!=(t.compareDocumentPosition(n)&e)}(e,o,Node.DOCUMENT_POSITION_CONTAINED_BY);var e,o},dn=function(t,n){return an().browser.isIE()?ln(t,n):function(t,n){var e=t.dom,o=n.dom;return e!==o&&e.contains(o)}(t,n)},mn=function(t){return Rt.fromDom(t.dom.ownerDocument)},gn=function(t){return zt(t)?t:mn(t)},pn=function(t){return Rt.fromDom(gn(t).dom.documentElement)},hn=function(t){return Rt.fromDom(gn(t).dom.defaultView)},vn=function(t){return I.from(t.dom.parentNode).map(Rt.fromDom)},bn=function(t){return I.from(t.dom.offsetParent).map(Rt.fromDom)},yn=function(t){return W(t.dom.childNodes,Rt.fromDom)},xn=function(t,n){var e=t.dom.childNodes;return I.from(e[n]).map(Rt.fromDom)},wn=function(t,n){return{element:t,offset:n}},Sn=function(t,n){var e=yn(t);return e.length>0&&n<e.length?wn(e[n],0):wn(t,n)},kn=function(t){return Ut(t)&&l(t.dom.host)},Cn=d(Element.prototype.attachShadow)&&d(Node.prototype.getRootNode),On=v(Cn),_n=Cn?function(t){return Rt.fromDom(t.dom.getRootNode())}:gn,Tn=function(t){return kn(t)?t:Rt.fromDom(gn(t).dom.body)},En=function(t){var n=_n(t);return kn(n)?I.some(n):I.none()},Dn=function(t){return Rt.fromDom(t.dom.host)},An=function(t){return l(t.dom.shadowRoot)},Bn=function(t){var n=Lt(t)?t.dom.parentNode:t.dom;if(null==n||null===n.ownerDocument)return!1;var e,o,r=n.ownerDocument;return En(Rt.fromDom(n)).fold(function(){return r.body.contains(n)},(e=Bn,o=Dn,function(t){return e(o(t))}))},Mn=function(){return Fn(Rt.fromDom(document))},Fn=function(t){var n=t.dom.body;if(null==n)throw new Error("Body is not available yet");return Rt.fromDom(n)},In=function(t,n,e){if(!(r(e)||c(e)||m(e)))throw console.error("Invalid call to Attribute.set. Key ",n,":: Value ",e,":: Element ",t),new Error("Attribute value was not simple");t.setAttribute(n,e+"")},Rn=function(t,n,e){In(t.dom,n,e)},Nn=function(t,n){var e=t.dom;mt(n,function(t,n){In(e,n,t)})},Pn=function(t,n){var e=t.dom.getAttribute(n);return null===e?void 0:e},Vn=function(t,n){return I.from(Pn(t,n))},Hn=function(t,n){var e=t.dom;return!(!e||!e.hasAttribute)&&e.hasAttribute(n)},Ln=function(t,n){t.dom.removeAttribute(n)},zn=function(t,n,e){if(!r(e))throw console.error("Invalid call to CSS.set. Property ",n,":: Value ",e,":: Element ",t),new Error("CSS value must be a string: "+e);Ft(t)&&t.style.setProperty(n,e)},Un=function(t,n){Ft(t)&&t.style.removeProperty(n)},jn=function(t,n,e){var o=t.dom;zn(o,n,e)},Wn=function(t,n){var e=t.dom;mt(n,function(t,n){zn(e,n,t)})},Gn=function(t,n){var e=t.dom;mt(n,function(t,n){t.fold(function(){Un(e,n)},function(t){zn(e,n,t)})})},Xn=function(t,n){var e=t.dom,o=window.getComputedStyle(e).getPropertyValue(n);return""!==o||Bn(t)?o:qn(e,n)},qn=function(t,n){return Ft(t)?t.style.getPropertyValue(n):""},Yn=function(t,n){var e=t.dom,o=qn(e,n);return I.from(o).filter(function(t){return t.length>0})},Kn=function(t){var n={},e=t.dom;if(Ft(e))for(var o=0;o<e.style.length;o++){var r=e.style.item(o);n[r]=e.style[r]}return n},Jn=function(t,n,e){var o=Rt.fromTag(t);return jn(o,n,e),Yn(o,n).isSome()},$n=function(t,n){var e=t.dom;Un(e,n),kt(Vn(t,"style").map(Bt),"")&&Ln(t,"style")},Qn=function(t){return t.dom.offsetWidth},Zn=function(t,n){var e=function(e){var o=n(e);if(o<=0||null===o){var r=Xn(e,t);return parseFloat(r)||0}return o},o=function(t,n){return K(n,function(n,e){var o=Xn(t,e),r=void 0===o?0:parseInt(o,10);return isNaN(r)?n:n+r},0)};return{set:function(n,e){if(!m(e)&&!e.match(/^[0-9]+$/))throw new Error(t+".
95set accepts only positive integer values. Value was "+e);var o=n.dom;Ft(o)&&(o.style[t]=e+"px")},get:e,getOuter:e,aggregate:o,max:function(t,n,e){var r=o(t,e);return n>r?n-r:0}}},te=Zn("height",function(t){var n=t.dom;return Bn(t)?n.getBoundingClientRect().height:n.offsetHeight}),ne=function(t){return te.get(t)},ee=function(t){return te.getOuter(t)},oe=function(t,n){return{left:t,top:n,translate:function(e,o){return oe(t+e,n+o)}}},re=oe,ie=function(t,n){return void 0!==t?t:void 0!==n?n:0},ue=function(t){var n=t.dom.ownerDocument,e=n.body,o=n.defaultView,r=n.documentElement;if(e===t.dom)return re(e.offsetLeft,e.offsetTop);var i=ie(null==o?void 0:o.pageYOffset,r.scrollTop),u=ie(null==o?void 0:o.pageXOffset,r.scrollLeft),a=ie(r.clientTop,e.clientTop),c=ie(r.clientLeft,e.clientLeft);return ae(t).translate(u-c,i-a)},ae=function(t){var n=t.dom,e=n.ownerDocument.body;return e===n?re(e.offsetLeft,e.offsetTop):Bn(t)?function(t){var n=t.getBoundingClientRect();return re(n.left,n.top)}(n):re(0,0)},ce=Zn("width",function(t){return t.dom.offsetWidth}),se=function(t){return ce.get(t)},fe=function(t){return ce.getOuter(t)},le=function(t){var n=Rt.fromDom(function(t){if(On()&&l(t.target)){var n=Rt.fromDom(t.target);if(Ht(n)&&An(n)&&t.composed&&t.composedPath){var e=t.composedPath();if(e)return at(e)}}return I.from(t.target)}(t).getOr(t.target)),e=function(){return t.stopPropagation()},o=function(){return t.preventDefault()},r=h(o,e);return function(t,n,e,o,r,i,u){return{target:t,x:n,y:e,stop:o,prevent:r,kill:i,raw:u}}(n,t.clientX,t.clientY,e,o,r,t)},de=function(t,n,e,o,r){var i=function(t,n){return function(e){t(e)&&n(le(e))}}(e,o);return t.dom.addEventListener(n,i,r),{unbind:x(me,t,n,i,r)}},me=function(t,n,e,o){t.dom.removeEventListener(n,e,o)},ge=function(t,n){vn(t).each(function(e){e.dom.insertBefore(n.dom,t.dom)})},pe=function(t,n){(function(t){return I.from(t.dom.nextSibling).map(Rt.fromDom)})(t).fold(function(){vn(t).each(function(t){ve(t,n)})},function(t){ge(t,n)})},he=function(t,n){(function(t){return xn(t,0)})(t).fold(function(){ve(t,n)},function(e){t.dom.insertBefore(n.dom,e.dom)}
95)},ve=function(t,n){t.dom.appendChild(n.dom)},be=function(t,n){G(n,function(n){ve(t,n)})},ye=function(t){t.dom.textContent="",G(yn(t),function(t){xe(t)})},xe=function(t){var n=t.dom;null!==n.parentNode&&n.parentNode.removeChild(n)},we=function(t){var n,e=yn(t);e.length>0&&(n=t,G(e,function(t){ge(n,t)})),xe(t)},Se=function(t){var n=void 0!==t?t.dom:document,e=n.body.scrollLeft||n.documentElement.scrollLeft,o=n.body.scrollTop||n.documentElement.scrollTop;return re(e,o)},ke=function(t,n,e){var o=(void 0!==e?e.dom:document).defaultView;o&&o.scrollTo(t,n)},Ce=function(t,n,e,o){return{x:t,y:n,width:e,height:o,right:t+e,bottom:n+o}},Oe=function(t){var n=void 0===t?window:t,e=n.document,o=Se(Rt.fromDom(e));return function(t){var n=void 0===t?window:t;return an().browser.isFirefox()?I.none():I.from(n.visualViewport)}(n).fold(function(){var t=n.document.documentElement,e=t.clientWidth,r=t.clientHeight;return Ce(o.left,o.top,e,r)},function(t){return Ce(Math.max(t.pageLeft,o.left),Math.max(t.pageTop,o.top),t.width,t.height)})},_e=function(t,n){return t.view(n).fold(v([]),function(n){var e=t.owner(n),o=_e(t,e);return[n].concat(o)})},Te=Object.freeze({__proto__:null,view:function(t){var n;return(t.dom===document?I.none():I.from(null===(n=t.dom.defaultView)||void 0===n?void 0:n.frameElement)).map(Rt.fromDom)},owner:function(t){return mn(t)}}),Ee=function(t){var n=Rt.fromDom(document),e=Se(n);return function(t,n){var e=n.owner(t),o=_e(n,e);return I.some(o)}(t,Te).fold(x(ue,t),function(n){var o=ae(t),r=Y(n,function(t,n){var e=ae(n);return{left:t.left+e.left,top:t.top+e.top}},{left:0,top:0});return re(r.left+o.left+e.left,r.top+o.top+e.top)})},De=function(t,n,e,o){return{x:t,y:n,width:e,height:o,right:t+e,bottom:n+o}},Ae=function(t){var n=ue(t),e=fe(t),o=ee(t);return De(n.left,n.top,e,o)},Be=function(t){var n=Ee(t),e=fe(t),o=ee(t);return De(n.left,n.top,e,o)},Me=function(){return Oe(window)},Fe=function(t){return{isValue:C,isError:k,getOr:v(t),getOrThunk:v(t),getOrDie:v(t),or:function(n){return Fe(t)},orThunk:function(n){return Fe(t)},fold:function(n,e){return e(t)},map:function(n){return Fe(n(t))},mapError:function(n){return Fe(t)},each:function(n){n(t)},bind:function(n){return n(t)},exists:function(n){return n(t)},forall:function(n){return n(t)},toOptional:function(){return I.some(t)}}},Ie=function(t){return{isValue:k,isError:C,getOr:b,getOrThunk:function(t){return t()},getOrDie:function(){return S(String(t))()},or:b,orThunk:function(t){return t()},fold:function(n,e){return n(t)},map:function(n){return Ie(t)},mapError:function(n){return Ie(n(t))},each:p,bind:function(n){return Ie(t)},exists:k,forall:C,toOptional:I.none}},Re={value:Fe,error:Ie,fromOption:function(t,n){return t.fold(function(){return Ie(n)},Fe)}};!function(t){t[t.Error=0]="Error",t[t.Value=1]="Value"}(Nt||(Nt={}));var Ne=function(t,n,e){return t.stype===Nt.Error?n(t.serror):e(t.svalue)},Pe=function(t){return{stype:Nt.Value,svalue:t}},Ve=function(t){return{stype:Nt.Error,serror:t}},He=function(t){return t.fold(Ve,Pe)},Le=function(t){return Ne(t,Re.error,Re.value)},ze=Pe,Ue=function(t){var n=[],e=[];return G(t,function(t){Ne(t,function(t){return e.push(t)},function(t){return n.push(t)})}),{values:n,errors:e}},je=Ve,We=function(t,n){return t.stype===Nt.Value?n(t.svalue):t},Ge=function(t,n){return t.stype===Nt.Error?n(t.serror):t},Xe=function(t,n){return t.stype===Nt.Value?{stype:Nt.Value,svalue:n(t.svalue)}:t},qe=function(t,n){return t.stype===Nt.Error?{stype:Nt.Error,serror:n(t.serror)}:t},Ye=Ne,Ke=function(t,n,e,o){return{tag:"field",key:t,newKey:n,presence:e,prop:o}},Je=function(t,n,e){switch(t.tag){case"field":return n(t.key,t.newKey,t.presence,t.prop);case"custom":return e(t.newKey,t.instantiator)}},$e=function(t){return function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];if(0===n.length)throw new Error("Can't merge zero objects");for(var o={},r=0;r<n.length;r++){var i=n[r];for(var u in i)wt(i,u)&&(o[u]=t(o[u],i[u]))}return o}},Qe=$e(function(t,n){return i(t)&&i(n)?Qe(t,n):n}),Ze=$e(function(t,n){return n}),to=function(t){return{tag:"defaultedThunk",process:t}},no=function(t){return to(v(t))},eo=function(t){return{tag:"mergeWithThunk",process:t}},oo=function(t){return h(je,Q)(t)},ro=function(t){var n=Ue(t);return n.errors.length>0?oo(n.errors):ze(n.values)},io=function(t){return i(t)&&lt(t).length>100?" removed due to size":JSON.stringify(t,null,2)},uo=function(t,n){return je([{path:t,getErrorInfo:n}])},ao=function(t){return{extract:function(n,e){return Ge(t(e),function(t){return function(t,n){return uo(t,v(n))}(n,t)})},toString:v("val")}},co=ao(ze),so=function(t,n,e,o){return xt(n,e).fold(function(){return function(t,n,e){return uo(t,function(){return'Could not find valid *required* value for "'+n+'" in '+io(e)})}(t,e,n)},o)},fo=function(t,n,e,o){return o(xt(t,n).getOrThunk(function(){return e(t)}))},lo=function(t,n,e,o,r){var i=function(t){return r.extract(n.concat([o]),t)},u=function(t){return t.fold(function(){return ze(I.none())},function(t){var e=r.extract(n.concat([o]),t);return Xe(e,I.some)})};switch(t.tag){case"required":return so(n,e,o,i);case"defaultedThunk":return fo(e,o,t.process,i);case"option":return function(t,n,e){return e(xt(t,n))}(e,o,u);case"defaultedOptionThunk":return function(t,n,e,o){return o(xt(t,n).map(function(n){return!0===n?e(t):n}))}(e,o,t.process,u);case"mergeWithThunk":return fo(e,o,v({}),function(n){var o=Qe(t.process(e),n);return i(o)})}},mo=function(t){return{extract:function(n,e){return t().extract(n,e)},toString:function(){return t().toString()}}},go=function(t){return lt(ht(t,l))},po=function(t){var n=ho(t),e=Y(t,function(t,n){return Je(n,function(n){var e;return Qe(t,((e={})[n]=!0,e))},v(t))},{});return{extract:function(t,o){var r=c(o)?[]:go(o),i=q(r,function(t){return!St(e,t)});return 0===i.length?n.extract(t,o):function(t,n){return uo(t,function(){return"There are unsupported fields: ["+n.join(", ")+"] specified"})}(t,i)},toString:n.toString}},ho=function(t){return{extract:function(n,e){return function(t,n,e){for(var o={},r=[],i=0,u=e;i<u.length;i++){var a=u[i];Je(a,function(e,i,u,a){var c=lo(u,t,n,e,a);Ye(c,function(t){r.push.apply(r,t)},function(t){o[i]=t})},function(t,e){o[t]=e(n)})}return r.length>0?je(r):ze(o)}(n,e,t)},toString:function(){return"obj{\n"+W(t,function(t){return Je(t,function(t,n,e,o){return t+" -> "+o.toString()},function(t,n){return"state("+t+")"})}).join("\n")+"}"}}},vo=function(t){return{extract:function(n,e){var o=W(e,function(e,o){return t.extract(n.concat(["["+o+"]"]),e)});return ro(o)},toString:function(){return"array("+t.toString()+")"}}},bo=function(t){return{extract:function(n,e){for(var o=[],r=0,i=t;r<i.length;r++){var u=i[r].extract(n,e);if(u.stype===Nt.Value)return u;o.push(u)}return ro(o)},toString:function(){return"oneOf("+W(t,function(t){return t.toString()}).join(", ")+")"}}},yo=function(t,n){return{extract:function(e,o){var r=lt(o),i=function(n,e){return vo(ao(t)).extract(n,e)}(e,r);return We(i,function(t){var r=W(t,function(t){return Ke(t,t,{tag:"required",process:{}},n)});return ho(r).extract(e,o)})},toString:function(){return"setOf("+n.toString()+")"}}},xo=h(vo,ho),wo=v(co),So=function(t,n){return ao(function(e){var o=typeof e;return t(e)?ze(e):je("Expected type: "+n+" but got: "+o)})},ko=So(m,"number"),Co=So(r,"string"),Oo=So(c,"boolean"),_o=So(d,"function"),To=function(t){if(Object(t)!==t)return!0;switch({}.toString.call(t).slice(8,-1)){case"Boolean":case"Number":case"String":case"Date":case"RegExp":case"Blob":case"FileList":case"ImageData":case"ImageBitmap":case"ArrayBuffer":return!0;case"Array":case"Object":return Object.keys(t).every(function(n){return To(t[n])});default:return!1}},Eo=ao(function(t){return To(t)?ze(t):je("Expected value to be acceptable for sending via postMessage")}),Do=function(t,n,e,o){return xt(e,o).fold(function(){return function(t,n,e){return uo(t,function(){return'The chosen schema: "'+e+'" did not exist in branches: '+io(n)})}(t,e,o)},function(e){return e.extract(t.concat(["branch: "+o]),n)})},Ao=function(t,n){return{extract:function(e,o){return xt(o,t).fold(function(){return function(t,n){return uo(t,function(){return'Choice schema did not contain choice key: "'+n+'"'})}(e,t)},function(t){return Do(e,o,n,t)})},toString:function(){return"chooseOn("+t+"). Possible values: "+lt(n)}}},Bo=function(t){return ao(function(n){return t(n).fold(je,ze)})},Mo=function(t,n){return yo(function(n){return He(t(n))},n)},Fo=function(t,n,e){return Le(function(t,n,e){var o=n.extract([t],e);return qe(o,function(t){return{input:e,errors:t}})}(t,n,e))},Io=function(t){return t.fold(function(t){throw new Error(No(t))},b)},Ro=function(t,n,e){return Io(Fo(t,n,e))},No=function(t){return"Errors: \n"+(n=t.errors,e=n.length>10?n.slice(0,10).concat([{path:[],getErrorInfo:v("... (only showing first ten failures)")}]):n,W(e,function(t){return"Failed path: ("+t.path.join(" > ")+")\n"+t.getErrorInfo()})).join("\n")+"\n\nInput object: "+io(t.input);var n,e},Po=function(t,n){return Ao(t,gt(n,ho))},Vo=Ke,Ho=function(t,n){return{tag:"custom",newKey:t,instantiator:n}},Lo=function(t){return Bo(function(n){return L(t,n)?Re.value(n):Re.error('Unsupported value: "'+n+'", choose one of "'+t.join(", ")+'".')})},zo=function(t){return Vo(t,t,{tag:"required",process:{}},wo())},Uo=function(t,n){return Vo(t,t,{tag:"required",process:{}},n)},jo=function(t){return Uo(t,Co)},Wo=function(t,n){return Vo(t,t,{tag:"required",process:{}},Lo(n))},Go=function(t){return Uo(t,_o)},Xo=function(t,n){return Vo(t,t,{tag:"required",process:{}},ho(n))},qo=function(t,n){return Vo(t,t,{tag:"required",process:{}},xo(n))},Yo=function(t,n){return Vo(t,t,{tag:"required",process:{}},vo(n))},Ko=function(t){return Vo(t,t,{tag:"option",process:{}},wo())},Jo=function(t,n){return Vo(t,t,{tag:"option",process:{}},n)},$o=function(t){return Jo(t,ko)},Qo=function(t){return Jo(t,Co)},Zo=function(t){return Jo(t,_o)},tr=function(t,n){return Jo(t,vo(n))},nr=function(t,n){return Jo(t,ho(n))},er=function(t,n){return Vo(t,t,no(n),wo())},or=function(t,n,e){return Vo(t,t,no(n),e)},rr=function(t,n){return or(t,n,ko)},ir=function(t,n){return or(t,n,Co)},ur=function(t,n,e){return or(t,n,Lo(e))},ar=function(t,n){return or(t,n,Oo)},cr=function(t,n){return or(t,n,_o)},sr=function(t,n,e){return or(t,n,vo(e))},fr=function(t,n,e){return or(t,n,ho(e))},lr=function(t){var n=t;return{get:function(){return n},set:function(t){n=t}}},dr=function(t){if(!u(t))throw new Error("cases must be an array");if(0===t.length)throw new Error("there must be at least one case");var n=[],e={};return G(t,function(o,r){var i=lt(o);if(1!==i.length)throw new Error("one and only one name per case");var a=i[0],c=o[a];if(void 0!==e[a])throw new Error("duplicate key detected:"+a);if("cata"===a)throw new Error("cannot have a case named cata (sorry
95)");if(!u(c))throw new Error("case arguments must be an array");n.push(a),e[a]=function(){for(var e=[],o=0;o<arguments.length;o++)e[o]=arguments[o];var i=e.length;if(i!==c.length)throw new Error("Wrong number of arguments to case "+a+". Expected "+c.length+" ("+c+"), got "+i);return{fold:function(){for(var n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];if(n.length!==t.length)throw new Error("Wrong number of arguments to fold. Expected "+t.length+", got "+n.length);return n[r].apply(null,e)},match:function(t){var o=lt(t);if(n.length!==o.length)throw new Error("Wrong number of arguments to match. Expected: "+n.join(",")+"\nActual: "+o.join(","));if(!tt(n,function(t){return L(o,t)}))throw new Error("Not all branches were specified when using match. Specified: "+o.join(", ")+"\nRequired: "+n.join(", "));return t[a].apply(null,e)},log:function(t){console.log(t,{constructors:n,constructor:a,params:e})}}}}),e};dr([{bothErrors:["error1","error2"]},{firstError:["error1","value2"]},{secondError:["value1","error2"]},{bothValues:["value1","value2"]}]);var mr,gr=function(t,n){return function(t,n){var e={};return mt(t,function(t,o){L(n,o)||(e[o]=t)}),e}(t,n)},pr=function(t,n){return function(t,n){var e;return(e={})[t]=n,e}(t,n)},hr=function(t){return function(t){var n={};return G(t,function(t){n[t.key]=t.value}),n}(t)},vr=function(t,n){var e,o,r=(e=[],o=[],G(t,function(t){t.fold(function(t){e.push(t)},function(t){o.push(t)})}),{errors:e,values:o});return r.errors.length>0?function(t){return Re.error(Q(t))}(r.errors):function(t,n){return 0===t.length?Re.value(n):Re.value(Qe(n,Ze.apply(void 0,t)))}(r.values,n)},br=function(t){return d(t)?t:k},yr=function(t,n,e){for(var o=t.dom,r=br(e);o.parentNode;){o=o.parentNode;var i=Rt.fromDom(o),u=n(i);if(u.isSome())return u;if(r(i))break}return I.none()},xr=function(t,n,e){var o=n(t),r=br(e);return o.orThunk(function(){return r(t)?I.none():yr(t,n,r)})},wr=function(t,n){return fn(t.element,n.event.target)},Sr={can:C,abort:k,run:p},kr=function(t){if(!St(t,"can")&&!St(t,"abort")&&!St(t,"run"))throw new Error("EventHandler defined by: "+JSON.stringify(t,null,2)+" does not have can, abort, or run!");return _(_({},Sr),t)},Cr=function(t){return{can:function(t,n){return function(){for(var e=[],o=0;o<arguments.length;o++)e[o]=arguments[o];return K(t,function(t,o){return t&&n(o).apply(void 0,e)},!0)}}(t,function(t){return t.can}),abort:function(t,n){return function(){for(var e=[],o=0;o<arguments.length;o++)e[o]=arguments[o];return K(t,function(t,o){return t||n(o).apply(void 0,e)},!1)}}(t,function(t){return t.abort}),run:function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];G(t,function(t){t.run.apply(void 0,n)})}}},Or=v,_r=Or("touchstart"),Tr=Or("touchmove"),Er=Or("touchend"),Dr=Or("touchcancel"),Ar=Or("mousedown"),Br=Or("mousemove"),Mr=Or("mouseout"),Fr=Or("mouseup"),Ir=Or("mouseover"),Rr=Or("focusin"),Nr=Or("focusout"),Pr=Or("keydown"),Vr=Or("keyup"),Hr=Or("input"),Lr=Or("change"),zr=Or("click"),Ur=Or("transitioncancel"),jr=Or("transitionend"),Wr=Or("transitionstart"),Gr=Or("selectstart"),Xr=function(t){return v("alloy."+t)},qr={tap:Xr("tap")},Yr=Xr("focus"),Kr=Xr("blur.post"),Jr=Xr("paste.post"),$r=Xr("receive"),Qr=Xr("execute"),Zr=Xr("focus.item"),ti=qr.tap,ni=Xr("longpress"),ei=Xr("sandbox.close"),oi=Xr("typeahead.cancel"),ri=Xr("system.init"),ii=Xr("system.touchmove"),ui=Xr("system.touchend"),ai=Xr("system.scroll"),ci=Xr("system.resize"),si=Xr("system.attached"),fi=Xr("system.detached"),li=Xr("system.dismissRequested"),di=Xr("system.repositionRequested"),mi=Xr("focusmanager.shifted"),gi=Xr("slotcontainer.visibility"),pi=Xr("change.tab"),hi=Xr("dismiss.tab"),vi=Xr("highlight"),bi=Xr("dehighlight"),yi=function(t,n){ki(t,t.element,n,{})},xi=function(t,n,e){ki(t,t.element,n,e)},wi=function(t){yi(t,Qr())},Si=function(t,n,e){ki(t,n,e,{})},ki=function(t,n,e,o){var r=_({target:n},o);t.getSystem().triggerEvent(e,n,r)},Ci=function(t,n,e,o){t.getSystem().triggerEvent(e,n,o.event)},Oi=function(t){return hr(t)},_i=function(t,n){return{key:t,value:kr({abort:n})}},Ti=function(t){return{key:t,value:kr({run:function(t,n){n.event.prevent()}})}},Ei=function(t,n){return{key:t,value:kr({run:n})}},Di=function(t,n,e){return{key:t,value:kr({run:function(t,o){n.apply(void 0,[t,o].concat(e))}})}},Ai=function(t){return function(n){return{key:t,value:kr({run:function(t,e){wr(t,e)&&n(t,e)}})}}},Bi=function(t,n,e){return function(t,n){return Ei(t,function(e,o){e.getSystem().getByUid(n).each(function(n){Ci(n,n.element,t,o)})})}(t,n.partUids[e])},Mi=function(t,n){return Ei(t,function(t,e){var o=e.event,r=t.getSystem().getByDom(o.target).getOrThunk(function(){return xr(o.target,function(n){return t.getSystem().getByDom(n).toOptional()},k).getOr(t)});n(t,r,e)})},Fi=function(t){return Ei(t,function(t,n){n.cut()})},Ii=function(t,n){return Ai(t)(n)},Ri=Ai(si()),Ni=Ai(fi()),Pi=Ai(ri()),Vi=function(t){return function(n){return Ei(t,n)}}(Qr()),Hi=function(t){return t.dom.innerHTML},Li=function(t,n){var e,o,r=mn(t).dom,i=Rt.fromDom(r.createDocumentFragment()),u=(e=n,(o=(r||document).createElement("div")).innerHTML=e,yn(Rt.fromDom(o)));be(i,u),ye(t),ve(t,i)},zi=function(t){return function(t,n){return Rt.fromDom(t.dom.cloneNode(n))}(t,!1)},Ui=function(t){return kn(t)?"#shadow-root":function(t){var n=Rt.fromTag("div"),e=Rt.fromDom(t.dom.cloneNode(!0));return ve(n,e),Hi(n)}(zi(t))},ji=function(t){return Ui(t)},Wi=Oi([function(t,n){return{key:t,value:kr({can:n})}}(Yr(),function(t,n){var e=n.event,o=e.originator,r=e.target;return!function(t,n,e){return fn(n,t.element)&&!fn(n,e)}
95(t,o,r)||(console.warn(Yr()+" did not get interpreted by the desired target. \nOriginator: "+ji(o)+"\nTarget: "+ji(r)+"\nCheck the "+Yr()+" event handlers"),!1)})]),Gi=Object.freeze({__proto__:null,events:Wi}),Xi=0,qi=function(t){var n=(new Date).getTime();return t+"_"+Math.floor(1e9*Math.random())+ ++Xi+String(n)},Yi=v("alloy-id-"),Ki=v("data-alloy-id"),Ji=Yi(),$i=Ki(),Qi=function(t,n){Object.defineProperty(t.dom,$i,{value:n,writable:!0})},Zi=function(t){var n=Ht(t)?t.dom[$i]:null;return I.from(n)},tu=function(t){return qi(t)},nu=b,eu=function(t){var n=function(n){return"The component must be in a context to execute: "+n+(t?"\n"+ji(t().element)+" is not in context.":"")},e=function(t){return function(){throw new Error(n(t))}},o=function(t){return function(){console.warn(n(t))}};return{debugInfo:v("fake"),triggerEvent:o("triggerEvent"),triggerFocus:o("triggerFocus"),triggerEscape:o("triggerEscape"),broadcast:o("broadcast"),broadcastOn:o("broadcastOn"),broadcastEvent:o("broadcastEvent"),build:e("build"),addToWorld:e("addToWorld"),removeFromWorld:e("removeFromWorld"),addToGui:e("addToGui"),removeFromGui:e("removeFromGui"),getByUid:e("getByUid"),getByDom:e("getByDom"),isConnected:k}},ou=eu(),ru=function(t){return W(t,function(t){return At(t,"/*")?t.substring(0,t.length-"/*".length):t})},iu=function(t,n){var e=t.toString(),o=e.indexOf(")")+1,r=e.indexOf("("),i=e.substring(r+1,o-1).split(/,\s*/);return t.toFunctionAnnotation=function(){return{name:n,parameters:ru(i)}},t},uu=qi("alloy-premade"),au=function(t){return pr(uu,t)},cu=function(t){return function(t,n){var e=n.toString(),o=e.indexOf(")")+1,r=e.indexOf("("),i=e.substring(r+1,o-1).split(/,\s*/);return t.toFunctionAnnotation=function(){return{name:"OVERRIDE",parameters:ru(i.slice(1))}},t}(function(n){for(var e=[],o=1;o<arguments.length;o++)e[o-1]=arguments[o];return t.apply(void 0,E([n.getApis(),n],e,!1))},t)},su={init:function(){return fu({readState:v("No State required")})}},fu=function(t){return t},lu=function(t,n){var e={};return mt(t,function(t,o){mt(t,function(t,r){var i=xt(e,r).getOr([]);e[r]=i.concat([n(o,t)])})}),e},du=function(t){return{classes:s(t.classes)?[]:t.classes,attributes:s(t.attributes)?{}:t.attributes,styles:s(t.styles)?{}:t.styles}},mu=function(t){return t.cHandler},gu=function(t,n){return{name:t,handler:n}},pu=function(t,n,e){var o=_(_({},e),function(t,n){var e={};return G(t,function(t){e[t.name()]=t.handlers(n)}),e}(n,t));return lu(o,gu)},hu=function(t){var n=function(t){return d(t)?{can:C,abort:k,run:t}:t}(t);return function(t,e){for(var o=[],r=2;r<arguments.length;r++)o[r-2]=arguments[r];var i=[t,e].concat(o);n.abort.apply(void 0,i)?e.stop():n.can.apply(void 0,i)&&n.run.apply(void 0,i)}},vu=function(t,n,e){var o=n[e];return o?function(t,n,e,o){try{var r=it(e,function(e,r){var i=e[n],u=r[n],a=o.indexOf(i),c=o.indexOf(u);if(-1===a)throw new Error("The ordering for "+t+" does not have an entry for "+i+".\nOrder specified: "+JSON.stringify(o,null,2));if(-1===c)throw new Error("The ordering for "+t+" does not have an entry for "+u+".\nOrder specified: "+JSON.stringify(o,null,2));return a<c?-1:c<a?1:0});return Re.value(r)}catch(i){return Re.error([i])}}("Event: "+e,"name",t,o).map(function(t){var n=W(t,function(t){return t.handler});return Cr(n)}):function(t,n){return Re.error(["The event ("+t+') has more than one behaviour that listens to it.\nWhen this occurs, you must specify an event ordering for the behaviours in your spec (e.g. [ "listing", "toggling" ]).\nThe behaviours that can trigger it are: '+JSON.stringify(W(n,function(t){return t.name}),null,2)])}(e,t)},bu=function(t,n){var e=vt(t,function(t,e){return(1===t.length?Re.value(t[0].handler):vu(t,n,e)).map(function(o){var r=hu(o),i=t.length>1?q(n[e],function(n){return z(t,function(t){return t.name===n})}).join(" > "):t[0].name;return pr(e,function(t,n){return{handler:t,purpose:n}}(r,i))})});return vr(e,{})},yu="alloy.base.behaviour",xu=ho([Vo("dom","dom",{tag:"required",process:{}},ho([zo("tag"),er("styles",{}),er("classes",[]),er("attributes",{}),Ko("value"),Ko("innerHtml")])),zo("components"),zo("uid"),er("events",{}),er("apis",{}),Vo("eventOrder","eventOrder",function(t){return eo(v(t))}((mr={},mr[Qr()]=["disabling",yu,"toggling","typeaheadevents"],mr[Yr()]=[yu,"focusing","keying"],mr[ri()]=[yu,"disabling","toggling","representing"],mr[Hr()]=[yu,"representing","streaming","invali
95dating"],mr[fi()]=[yu,"representing","item-events","tooltipping"],mr[Ar()]=["focusing",yu,"item-type-events"],mr[_r()]=["focusing",yu,"item-type-events"],mr[Ir()]=["item-type-events","tooltipping"],mr[$r()]=["receiving","reflecting","tooltipping"],mr)),wo()),Ko("domModification")]),wu=function(t){return t.events},Su=function(t,n){var e=Pn(t,n);return void 0===e||""===e?[]:e.split(" ")},ku=function(t){return void 0!==t.dom.classList},Cu=function(t,n){return function(t,n,e){var o=Su(t,n).concat([e]);return Rn(t,n,o.join(" ")),!0}(t,"class",n)},Ou=function(t,n){return function(t,n,e){var o=q(Su(t,n),function(t){return t!==e});return o.length>0?Rn(t,n,o.join(" ")):Ln(t,n),!1}(t,"class",n)},_u=function(t,n){ku(t)?t.dom.classList.add(n):Cu(t,n)},Tu=function(t){0===(ku(t)?t.dom.classList:function(t){return Su(t,"class")}(t)).length&&Ln(t,"class")},Eu=function(t,n){ku(t)?t.dom.classList.remove(n):Ou(t,n);Tu(t)},Du=function(t,n){return ku(t)&&t.dom.classList.contains(n)},Au=function(t,n){G(n,function(n){_u(t,n)})},Bu=function(t,n){G(n,function(n){Eu(t,n)})},Mu=function(t){return t.dom.value},Fu=function(t,n){if(void 0===n)throw new Error("Value.set was undefined");t.dom.value=n},Iu=function(t,n){return function(t,n){var e=W(n,function(t){return nr(t.name(),[zo("config"),er("state",su)])}),o=Fo("component.behaviours",ho(e),t.behaviours).fold(function(n){throw new Error(No(n)+"\nComplete spec:\n"+JSON.stringify(t,null,2))},b);return{list:n,data:gt(o,function(t){var n=t.map(function(t){return{config:t.config,state:t.state.init(t.config)}});return v(n)})}}(t,n)},Ru=function(t){var n=function(t){var n=xt(t,"behaviours").getOr({});return Z(lt(n),function(t){var e=n[t];return l(e)?[e.me]:[]})}(t);return Iu(t,n)},Nu=function(t,n,e){var o,r,i,u=_(_({},(o=t).dom),{uid:o.uid,domChildren:W(o.components,function(t){return t.element})}),a=function(t){return t.domModification.fold(function(){return du({})},du)}(t),c={"alloy.base.modification":a},s=n.length>0?function(t,n,e,o){var r=_({},n);G(e,function(n){r[n.name()]=n.exhibit(t,o)});var i=lu(r,function(t,n){return{name:t,modification:n}}),u=function(t){return Y(t,function(t,n){return _(_({},n.modification),t)},{})},a=Y(i.classes,function(t,n){return n.modification.concat(t)},[]),c=u(i.attributes),s=u(i.styles);return du({classes:a,attributes:c,styles:s})}(e,c,n,u):a;return i=s,_(_({},r=u),{attributes:_(_({},r.attributes),i.attributes),styles:_(_({},r.styles),i.styles),classes:r.classes.concat(i.classes)})},Pu=function(t,n,e){var o={"alloy.base.behaviour":wu(t)};return function(t,n,e,o){var r=pu(t,e,o);return bu(r,n)}(e,t.eventOrder,n,o).getOrDie()},Vu=function(t){var n=function(){return f},e=lr(ou),o=Io(function(t){return Fo("custom.definition",xu,t)}(t)),r=Ru(t),i=function(t){return t.list}(r),u=function(t){return t.data}(r),a=function(t){var n=Rt.fromTag(t.tag);Nn(n,t.attributes),Au(n,t.classes),Wn(n,t.styles),t.innerHtml.each(function(t){return Li(n,t)});var e=t.domChildren;return be(n,e),t.value.each(function(t){Fu(n,t)}),t.uid,Qi(n,t.uid),n}(Nu(o,i,u)),c=Pu(o,i,u),s=lr(o.components),f={uid:t.uid,getSystem:e.get,config:function(n){var e=u;return(d(e[n.name()])?e[n.name()]:function(){throw new Error("Could not find "+n.name()+" in "+JSON.stringify(t,null,2))})()},hasConfigured:function(t){return d(u[t.name()])},spec:t,readState:function(t){return u[t]().map(function(t){return t.state.readState()}).getOr("not enabled")},getApis:function(){return o.apis},connect:function(t){e.set(t)},disconnect:function(){e.set(eu(n))},element:a,syncComponents:function(){var t=yn(a),n=Z(t,function(t){return e.get().getByDom(t).fold(function(){return[]},rt)});s.set(n)},components:s.get,events:c};return f},Hu=function(t){var n=nu(t),e=n.events,o=T(n,["events"]),r=function(t){var n=xt(t,"components").getOr([]);return W(n,ju)}(o),i=_(_({},o),{events:_(_({},Gi),e),components:r});return Re.value(Vu(i))},Lu=function(t){var n=Rt.fromText(t);return zu({element:n})},zu=function(t){var n=Ro("external.component",po([zo("element"),Ko("uid")]),t),e=lr(eu()),o=n.uid.getOrThunk(function(){return tu("external")});Qi(n.element,o);var r={uid:o,getSystem:e.get,config:I.none,hasConfigured:k,connect:function(t){e.set(t)},disconnect:function(){e.set(eu(function(){return r}))},getApis:function(){return{}},element:n.element,spec:t,readState:v("No state"),syncComponents:p,components:v([]),events:{}};return au(r)},Uu=tu,ju=function(t){return function(t){return xt(t,uu)}(t).getOrThunk(function(){var n=function(t){return wt(t,"uid")}(t)?t:_({uid:Uu("")},t);return Hu(n).getOrDie()})},Wu=au;function Gu(t,n,e,o,r){return t(e,o)?I.some(e):d(r)&&r(e)?I.none():n(e,o,r)}var Xu,qu=function(t,n,e){for(var o=t.dom,r=d(e)?e:k;o.parentNode;){o=o.parentNode;var i=Rt.fromDom(o);if(n(i))return I.some(i);if(r(i))break}return I.none()},Yu=function(t,n,e){return Gu(function(t,n){return n(t)},qu,t,n,e)},Ku=function(t,n,e){return Yu(t,n,e).isSome()},Ju=function(t,n,e){return qu(t,function(t){return cn(t,n)},e)},$u=function(t,n){return function(t,n){return J(t.dom.childNodes,function(t){return n(Rt.fromDom(t))}).map(Rt.fromDom)}(t,function(t){return cn(t,n)})},Qu=function(t,n){return function(t,n){var e=void 0===n?document:n.dom;return sn(e)?I.none():I.from(e.querySelector(t)).map(Rt.fromDom)}(n,t)},Zu=function(t,n,e){return Gu(function(t,n){return cn(t,n)},Ju,t,n,e)},ta=function(){var t=qi("aria-owns");return{id:t,link:function(n){Rn(n,"aria-owns",t)},unlink:function(t){Ln(t,"aria-owns")}}},na=function(t,n){return function(t){return Yu(t,function(t){if(!Ht(t))return!1;var n=Pn(t,"id");return void 0!==n&&n.indexOf("aria-owns")>-1}).bind(function(t){var n=Pn(t,"id"),e=_n(t);return Qu(e,'[aria-owns="'+n+'"]')})}(n).exists(function(n){return ea(t,n)})},ea=function(t,n){return Ku(n,function(n){return fn(n,t.element)},k)||na(t,n)};!function(t){t[t.STOP=0]="STOP",t[t.NORMAL=1]="NORMAL",t[t.LOGGING=2]="LOGGING"}(Xu||(Xu={}));var oa=lr({}),ra=function(t,n,e){switch(xt(oa.get(),t).orThunk(function(){var n=lt(oa.get());return ft(n,function(n){return t.indexOf(n)>-1?I.some(oa.get()[n]):I.none()})}).getOr(Xu.NORMAL)){case Xu.NORMAL:return e(aa());case Xu.LOGGING:var o=function(t,n){var e=[],o=(new Date).getTime();return{logEventCut:function(t,n,o){e.push({outcome:"cut",target:n,purpose:o})},logEventStopped:function(t,n,o){e.push({outcome:"stopped",target:n,purpose:o})},logNoParent:function(t,n,o){e.push({outcome:"no-parent",target:n,purpose:o})},logEventNoHandlers:function(t,n){e.push({outcome:"no-handlers-left",target:n})},logEventResponse:function(t,n,o){e.push({outcome:"response",purpose:o,target:n})},write:function(){var r=(new Date).getTime();L(["mousemove","mouseover","mouseout",ri()],t)||console.log(t,{event:t,time:r-o,target:n.dom,sequence:W(e,function(t){return L(["cut","stopped","response"],t.outcome)?"{"+t.purpose+"} "+t.outcome+" at ("+ji(t.target)+")":t.outcome})})}}}(t,n),r=e(o);return o.write(),r;case Xu.STOP:return!0}},ia=["alloy/data/Fields","alloy/debugging/Debugging"],ua=function(t,n,e){return ra(t,n,e)},aa=v({logEventCut:p,logEventStopped:p,logNoParent:p,logEventNoHandlers:p,logEventResponse:p,write:p}),ca=v([zo("menu"),zo("selectedMenu")]),sa=v([zo("item"),zo("selectedItem")]);v(ho(sa().concat(ca())));
95var fa=v(ho(sa())),la=Xo("initSize",[zo("numColumns"),zo("numRows")]),da=function(){return Xo("markers",[zo("backgroundMenu")].concat(ca()).concat(sa()))},ma=function(t){return Xo("markers",W(t,zo))},ga=function(t,n,e){return function(){var t=new Error;if(void 0!==t.stack){var n=t.stack.split("\n");return J(n,function(t){return t.indexOf("alloy")>0&&!z(ia,function(n){return t.indexOf(n)>-1})}).getOr("unknown")}}(),Vo(n,n,e,Bo(function(t){return Re.value(function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];return t.apply(void 0,n)})}))},pa=function(t){return ga(0,t,no(p))},ha=function(t){return ga(0,t,no(I.none))},va=function(t){return ga(0,t,{tag:"required",process:{}})},ba=function(t){return ga(0,t,{tag:"required",process:{}})},ya=function(t,n){return Ho(t,v(n))},xa=function(t){return Ho(t,b)},wa=v(la),Sa=function(t,n,e,o,r,i,u,a){return void 0===a&&(a=!1),{x:t,y:n,bubble:e,direction:o,placement:r,restriction:i,label:u+"-"+r,alwaysFit:a}},ka=dr([{southeast:[]},{southwest:[]},{northeast:[]},{northwest:[]},{south:[]},{north:[]},{east:[]},{west:[]}]),Ca=ka.southeast,Oa=ka.southwest,_a=ka.northeast,Ta=ka.northwest,Ea=ka.south,Da=ka.north,Aa=ka.east,Ba=ka.west,Ma=function(t,n,e,o){var r=t+n;return r>o?e:r<e?o:r},Fa=function(t,n,e){return Math.min(Math.max(t,n),e)},Ia=function(t,n){return ot(["left","right","top","bottom"],function(e){return xt(n,e).map(function(n){return function(t,n){switch(n){case 1:return t.x;case 0:return t.x+t.width;case 2:return t.y;case 3:return t.y+t.height}}(t,n)})})},Ra=function(t){return t.x},Na=function(t,n){return t.x+t.width/2-n.width/2},Pa=function(t,n){return t.x+t.width-n.width},Va=function(t,n){return t.y-n.height},Ha=function(t){return t.y+t.height},La=function(t,n){return t.y+t.height/2-n.height/2},za=function(t,n,e){return Sa(Ra(t),Ha(t),e.southeast(),Ca(),"southeast",Ia(t,{left:1,top:3}),"layout")},Ua=function(t,n,e){return Sa(Pa(t,n),Ha(t),e.southwest(),Oa(),"southwest",Ia(t,{right:0,top:3}),"layout")},ja=function(t,n,e){return Sa(Ra(t),Va(t,n),e.northeast(),_a(),"northeast",Ia(t,{left:1,bottom:2}),"layout")},Wa=function(t,n,e){return Sa(Pa(t,n),Va(t,n),e.northwest(),Ta(),"northwest",Ia(t,{right:0,bottom:2}),"layout")},Ga=function(t,n,e){return Sa(Na(t,n),Va(t,n),e.north(),Da(),"north",Ia(t,{bottom:2}),"layout")},Xa=function(t,n,e){return Sa(Na(t,n),Ha(t),e.south(),Ea(),"south",Ia(t,{top:3}),"layout")},qa=function(t,n,e){return Sa(function(t){return t.x+t.width}(t),La(t,n),e.east(),Aa(),"east",Ia(t,{left:0}),"layout")},Ya=function(t,n,e){return Sa(function(t,n){return t.x-n.width}(t,n),La(t,n),e.west(),Ba(),"west",Ia(t,{right:1}),"layout")},Ka=function(){return[za,Ua,ja,Wa,Xa,Ga,qa,Ya]},Ja=function(){return[Ua,za,Wa,ja,Xa,Ga,qa,Ya]},$a=function(){return[ja,Wa,za,Ua,Ga,Xa]},Qa=function(){return[Wa,ja,Ua,za,Ga,Xa]},Za=function(){return[za,Ua,ja,Wa,Xa,Ga]},tc=function(){return[Ua,za,Wa,ja,Xa,Ga]},nc=Object.freeze({__proto__:null,events:function(t){return Oi([Ei($r(),function(n,e){var o=t.channels,r=lt(o),i=e,u=function(t,n){return n.universal?t:q(t,function(t){return L(n.channels,t)})}(r,i);G(u,function(t){var e=o[t],r=e.schema,u=Ro("channel["+t+"] data\nReceiver: "+ji(n.element),r,i.data);e.onReceive(n,u)})})])}}),ec=[Uo("channels",Mo(Re.value,po([va("onReceive"),er("schema",wo())])))],oc=function(t,n,e){return Pi(function(o,r){e(o,t,n)})},rc=function(t,n,e){return function(t,n,e){var o=e.toString(),r=o.indexOf(")")+1,i=o.indexOf("("),u=o.substring(i+1,r-1).split(/,\s*/);return t.toFunctionAnnotation=function(){return{name:n,parameters:ru(u.slice(0,1).concat(u.slice(3)))}},t}(function(o){for(var r=[],i=1;i<arguments.length;i++)r[i-1]=arguments[i];var u=[o].concat(r);return o.config({name:v(t)}).fold(function(){throw new Error("We could not find any behaviour configuration for: "+t+". Using API: "+e)},function(t){var e=Array.prototype.slice.call(u,1);return n.apply(void 0,[o,t.config,t.state].concat(e))})},e,n)},ic=function(t){return{key:t,value:void 0}},uc=function(t,n,e,o,r,i,u){var a=function(t){return St(t,e)?t[e]():I.none()}
95,c=gt(r,function(t,n){return rc(e,t,n)}),s=gt(i,function(t,n){return iu(t,n)}),f=_(_(_({},s),c),{revoke:x(ic,e),config:function(n){var o=Ro(e+"-config",t,n);return{key:e,value:{config:o,me:f,configAsRaw:jt(function(){return Ro(e+"-config",t,n)}),initialConfig:n,state:u}}},schema:v(n),exhibit:function(t,n){return Ot(a(t),xt(o,"exhibit"),function(t,e){return e(n,t.config,t.state)}).getOrThunk(function(){return du({})})},name:v(e),handlers:function(t){return a(t).map(function(t){return xt(o,"events").getOr(function(){return{}})(t.config,t.state)}).getOr({})}});return f},ac=function(t){return hr(t)},cc=po([zo("fields"),zo("name"),er("active",{}),er("apis",{}),er("state",su),er("extra",{})]),sc=function(t){var n,e,o,r,i,u,a,c,s,f,l=Ro("Creating behaviour: "+t.name,cc,t);return n=l.fields,e=l.name,o=l.active,r=l.apis,i=l.extra,u=l.state,s=po(n),f=nr(e,[(a="config",c=n,Jo(a,po(c)))]),uc(s,f,e,o,r,i,u)},fc=po([zo("branchKey"),zo("branches"),zo("name"),er("active",{}),er("apis",{}),er("state",su),er("extra",{})]),lc=function(t){var n,e,o,r,i,u,a,c,s=Ro("Creating behaviour: "+t.name,fc,t);return n=Po(s.branchKey,s.branches),e=s.name,o=s.active,r=s.apis,i=s.extra,u=s.state,a=n,c=nr(e,[Jo("config",n)]),uc(a,c,e,o,r,i,u)},dc=v(void 0),mc=sc({fields:ec,name:"receiving",active:nc}),gc=Object.freeze({__proto__:null,exhibit:function(t,n){return du({classes:[],styles:n.useFixed()?{}:{position:"relative"}})}}),pc=function(){return Rt.fromDom(document)},hc=function(t){return t.dom.focus()},vc=function(t){var n=_n(t).dom;return t.dom===n.activeElement},bc=function(t){return void 0===t&&(t=pc()),I.from(t.dom.activeElement).map(Rt.fromDom)},yc=function(t){return bc(_n(t)).filter(function(n){return t.dom.contains(n.dom)})},xc=function(t,n){var e=_n(n),o=bc(e).bind(function(t){var e,o,r=function(n){return fn(t,n)};return r(n)?I.some(n):(e=r,(o=function(t){for(var n=0;n<t.childNodes.length;n++){var r=Rt.fromDom(t.childNodes[n]);if(e(r))return I.some(r);var i=o(t.childNodes[n]);if(i.isSome())return i}return I.none()})(n.dom))}),r=t(n);return o.each(function(t){bc(e).filter(function(n){return fn(n,t)}).fold(function(){hc(t)},p)}),r},wc=function(t,n,e,o,r){var i=function(t){return t+"px"};return{position:t,left:n.map(i),top:e.map(i),right:o.map(i),bottom:r.map(i)}},Sc=function(t,n){Gn(t,function(t){return _(_({},t),{position:I.some(t.position)})}(n))},kc=dr([{none:[]},{relative:["x","y","width","height"]},{fixed:["x","y","width","height"]}]),Cc=function(t,n,e,o,r,i){var u,a,c,s,f,l,d,m,g,p=n.rect,h=p.x-e,v=p.y-o,b=r-(h+p.width),y=i-(v+p.height),x=I.some(h),w=I.some(v),S=I.some(b),k=I.some(y),C=I.none();return u=n.direction,a=function(){return wc(t,x,w,C,C)},c=function(){return wc(t,C,w,S,C)},s=function(){return wc(t,x,C,C,k)},f=function(){return wc(t,C,C,S,k)},l=function(){return wc(t,x,w,C,C)},d=function(){return wc(t,x,C,C,k)},m=function(){return wc(t,x,w,C,C)},g=function(){return wc(t,C,w,S,C)},u.fold(a,c,s,f,l,d,m,g)},Oc=function(t,n){return t.fold(function(){var t=n.rect;return wc("absolute",I.some(t.x),I.some(t.y),I.none(),I.none())},function(t,e,o,r){return Cc("absolute",n,t,e,o,r)},function(t,e,o,r){return Cc("fixed",n,t,e,o,r)})},_c=function(t,n){var e=x(Ee,n),o=t.fold(e,e,function(){var t=Se();return Ee(n).translate(-t.left,-t.top)}),r=fe(n),i=ee(n);return De(o.left,o.top,r,i)},Tc=function(t,n){return n.fold(function(){return t.fold(Me,Me,De)},function(n){return t.fold(n,n,function(){var e=n(),o=Ec(t,e.x,e.y);return De(o.left,o.top,e.width,e.height)})})},Ec=function(t,n,e){var o=re(n,e);return t.fold(v(o),v(o),function(){var t=Se();return o.translate(-t.left,-t.top)})};kc.none;var Dc,Ac=kc.relative,Bc=kc.fixed,Mc=function(t){return Vn(t,"data-alloy-placement")},Fc=dr([{fit:["reposition"]},{nofit:["reposition","visibleW","visibleH","isVisible"]}]),Ic=function(t,n,e,o){var r=t.bubble,i=r.offset,u=function(t,n,e){var o=function(o,r){return n[o].map(function(n){var i="top"===o||"bottom"===o,u=i?e.top:e.left,a=("left"===o||"top"===o?Math.max:Math.min)(n,r)+u;return i?Fa(a,t.y,t.bottom):Fa(a,t.x,t.right)}).getOr(r)},r=o("left",t.x),i=o("top",t.y),u=o("right",t.right),a=o("bottom",t.bottom);return De(r,i,u-r,a-i)}(o,t.restriction,i),a=t.x+i.left,c=t.y+i.top,s=De(a,c,n,e),f=function(t,n){var e=n.x,o=n.y,r=n.right,i=n.bottom,u=t.x,a=t.y,c=t.right,s=t.bottom,f=t.width,l=t.height;return{originInBounds:u>=e&&u<=r&&a>=o&&a<=i,sizeInBounds:c<=r&&c>=e&&s<=i&&s>=o,visibleW:Math.min(f,u>=e?r-u:c-e),visibleH:Math.min(l,a>=o?i-a:s-o)}}(s,u),l=f.originInBounds,d=f.sizeInBounds,m=f.visibleW,g=f.visibleH,p=l&&d,h=p?s:function(t,n){var e=n.x,o=n.y,r=n.right,i=n.bottom,u=t.x,a=t.y,c=t.width,s=t.height,f=Math.max(e,r-c),l=Math.max(o,i-s),d=Fa(u,e,f),m=Fa(a,o,l),g=Math.min(d+c,r)-d,p=Math.min(m+s,i)-m;return De(d,m,g,p)}(s,u),b=h.width>0&&h.height>0,y=function(t,n,e){var o,r,i,u=v(n.bottom-e.y),a=v(e.bottom-n.y),c=(o=a,r=a,i=u,t.fold(o,o,i,i,o,i,r,r)),s=v(n.right-e.x),f=v(e.right-n.x);return{maxWidth:function(t,n,e,o){return t.fold(n,o,n,o,e,e,n,o)}(t,f,f,s),maxHeight:c}}(t.direction,h,o),x=y.maxWidth,w={rect:h,maxHeight:y.maxHeight,maxWidth:x,direction:t.direction,placement:t.placement,classes:{on:r.classesOn,off:r.classesOff},layout:t.label,testY:c};return p||t.alwaysFit?Fc.fit(w):Fc.nofit(w,m,g,b)},Rc=function(t){var n=lr(I.none()),e=function(){return n.get().each(t)};return{clear:function(){e(),n.set(I.none())},isSet:function(){return n.get().isSome()},get:function(){return n.get()},set:function(t){e(),n.set(I.some(t))}}},Nc=function(){return Rc(function(t){return t.destroy()})},Pc=function(){return Rc(function(t){return t.unbind()})},Vc=function(){var t=Rc(p);return _(_({},t),{on:function(n){return t.get().each(n)}})},Hc=C,Lc=function(t,n,e){return function(t,n,e,o){return de(t,n,e,o,!1)}(t,n,Hc,e)},zc=function(t,n,e){return function(t,n,e,o){return de(t,n,e,o,!0)}(t,n,Hc,e)},Uc=le,jc=["top","bottom","right","left"],Wc="data-alloy-transition-timer",Gc=function(t,n){return function(t,n){return tt(n,function(n){return Du(t,n)})}(t,n.classes)},Xc=function(t,n){var e=function(t){return parseFloat(t).toFixed(3)};return bt(n,function(n,o){var r,i,u,a=t[o].map(e),c=n.map(e);return void 0===u&&(u=y),!Ot(r=a,i=c,u).getOr(r.isNone()&&i.isNone())}).isSome()},qc=function(t,n){var e,o=Pc(),i=Pc(),u=function(n){var e,o=null!==(e=n.raw.pseudoElement)&&void 0!==e?e:"";return fn(n.target,t)&&!Mt(o)&&L(jc,n.raw.propertyName)},a=function(r){if(f(r)||u(r)){o.clear(),i.clear();
95var a=null==r?void 0:r.raw.type;(f(a)||a===jr())&&(clearTimeout(e),Ln(t,Wc),Bu(t,n.classes))}},c=function(){o.set(Lc(t,jr(),a)),i.set(Lc(t,Ur(),a))};if("ontransitionstart"in t.dom)var s=Lc(t,Wr(),function(t){u(t)&&(s.unbind(),c())});else c();var l=function(t){var n=function(n){var e=Xn(t,n),o=r(e)?e.split(/\s*,\s*/):[];return q(o,Mt)},e=function(t){if(r(t)&&/^[\d.]+/.test(t)){var n=parseFloat(t);return At(t,"ms")?n:1e3*n}return 0},o=n("transition-delay"),i=n("transition-duration");return K(i,function(t,n,r){var i=e(o[r])+e(n);return Math.max(t,i)},0)}(t);requestAnimationFrame(function(){e=setTimeout(a,l+17),Rn(t,Wc,e)})},Yc=function(t,n,e,o,r,i){var u=function(t,n,e){return e.exists(function(e){var o=t.mode;return"all"===o||e[o]!==n[o]})}(o,r,i);if(u||Gc(t,o)){jn(t,"position",e.position);var a=_c(n,t),c=Oc(n,_(_({},r),{rect:a})),s=ot(jc,function(t){return c[t]});Xc(e,s)&&(Gn(t,s),u&&function(t,n){Au(t,n.classes),Vn(t,Wc).each(function(n){clearTimeout(parseInt(n,10)),Ln(t,Wc)}),qc(t,n)}(t,o),Qn(t))}else Bu(t,o.classes)},Kc=function(t,n,e,o){$n(n,"max-height"),$n(n,"max-width");var r,i={width:fe(r=n),height:ee(r)};return function(t,n,e,o,r,i){var u=o.width,a=o.height,c=function(n,c,s,f,l){var d=n(e,o,r,t,i),m=Ic(d,u,a,i);return m.fold(v(m),function(t,n,e,o){return(l===o?e>f||n>s:!l&&o)?m:Fc.nofit(c,s,f,l)})};return K(n,function(t,n){var e=x(c,n);return t.fold(v(t),e)},Fc.nofit({rect:e,maxHeight:o.height,maxWidth:o.width,direction:Ca(),placement:"southeast",classes:{on:[],off:[]},layout:"none",testY:e.y},-1,-1,!1)).fold(b,b)}(n,o.preference,t,i,e,o.bounds)},Jc=function(t,n){!function(t,n){Rn(t,"data-alloy-placement",n)}(t,n.placement)},$c=function(t,n){!function(t,n){var e=te.max(t,n,["margin-top","border-top-width","padding-top","padding-bottom","border-bottom-width","margin-bottom"]);jn(t,"max-height",e+"px")}(t,Math.floor(n))},Qc=v(function(t,n){$c(t,n),Wn(t,{"overflow-x":"hidden","overflow-y":"auto"})}),Zc=v(function(t,n){$c(t,n)}),ts=function(t,n,e){return void 0===t[n]?e:t[n]},ns=function(t,n,e,o){var r=Kc(t,n,e,o);return function(t,n,e){var o=Oc(e.origin,n);e.transition.each(function(r){Yc(t,e.origin,o,r,n,e.lastPlacement)}),Sc(t,o)}(n,r,o),Jc(n,r),function(t,n){var e=n.classes;Bu(t,e.off),Au(t,e.on)}(n,r),function(t,n,e){(0,e.maxHeightFunction)(t,n.maxHeight)}(n,r,o),function(t,n,e){(0,e.maxWidthFunction)(t,n.maxWidth)}(n,r,o),{layout:r.layout,placement:r.placement}},es=["valignCentre","alignLeft","alignRight","alignCentre","top","bottom","left","right","inset"],os=function(t,n,e,o){void 0===o&&(o=1);var r=t*o,i=n*o,u=function(t){return xt(e,t).getOr([])},a=function(t,n,e){var o=et(es,e);return{offset:re(t,n),classesOn:Z(e,u),classesOff:Z(o,u)}};return{southeast:function(){return a(-t,n,["top","alignLeft"])},southwest:function(){return a(t,n,["top","alignRight"])},south:function(){return a(-t/2,n,["top","alignCentre"])},northeast:function(){return a(-t,-n,["bottom","alignLeft"])},northwest:function(){return a(t,-n,["bottom","alignRight"])},north:function(){return a(-t/2,-n,["bottom","alignCentre"])},east:function(){return a(t,-n/2,["valignCentre","left"])},west:function(){return a(-t,-n/2,["valignCentre","right"])},insetNortheast:function(){return a(r,i,["top","alignLeft","inset"])},insetNorthwest:function(){return a(-r,i,["top","alignRight","inset"])},insetNorth:function(){return a(-r/2,i,["top","alignCentre","inset"])},insetSoutheast:function(){return a(r,-i,["bottom","alignLeft","inset"])},insetSouthwest:function(){return a(-r,-i,["bottom","alignRight","inset"])},insetSouth:function(){return a(-r/2,-i,["bottom","alignCentre","inset"])},insetEast:function(){return a(-r,-i/2,["valignCentre","right","inset"])},insetWest:function(){return a(r,-i/2,["valignCentre","left","inset"])}}},rs=function(){return os(0,0,{})},is=b,us=function(t,n){return function(e){return"rtl"===as(e)?n:t}},as=function(t){return"rtl"===Xn(t,"direction")?"rtl":"ltr"};!function(t){t.TopToBottom="toptobottom",t.BottomToTop="bottomtotop"}(Dc||(Dc={}));var cs="data-alloy-vertical-dir",ss=function(t){return Ku(t,function(t){return Ht(t)&&Pn(t,"data-alloy-vertical-dir")===Dc.BottomToTop})},fs=function(){return nr("layouts",[zo("onLtr"),zo("onRtl"),Ko("onBottomLtr"),Ko("onBottomRtl")])},ls=function(t,n,e,o,r,i,u){var a=u.map(ss).getOr(!1),c=n.layouts.map(function(n){return n.onLtr(t)}),s=n.layouts.map(function(n){return n.onRtl(t)}),f=a?n.layouts.bind(function(n){return n.onBottomLtr.map(function(n){return n(t)})}).or(c).getOr(r):c.getOr(e),l=a?n.layouts.bind(function(n){return n.onBottomRtl.map(function(n){return n(t)})}).or(s).getOr(i):s.getOr(o);return us(f,l)(t)},ds=[zo("hotspot"),Ko("bubble"),er("overrides",{}),fs(),ya("placement",function(t,n,e){var o=n.hotspot,r=_c(e,o.element),i=ls(t.element,n,Za(),tc(),$a(),Qa(),I.some(n.hotspot.element));return I.some(is({anchorBox:r,bubble:n.bubble.getOr(rs()),overrides:n.overrides,layouts:i,placer:I.none()}))})],ms=[zo("x"),zo("y"),er("height",0),er("width",0),er("bubble",rs()),er("overrides",{}
95),fs(),ya("placement",function(t,n,e){var o=Ec(e,n.x,n.y),r=De(o.left,o.top,n.width,n.height),i=ls(t.element,n,Ka(),Ja(),Ka(),Ja(),I.none());return I.some(is({anchorBox:r,bubble:n.bubble,overrides:n.overrides,layouts:i,placer:I.none()}))})],gs=dr([{screen:["point"]},{absolute:["point","scrollLeft","scrollTop"]}]),ps=function(t){return t.fold(b,function(t,n,e){return t.translate(-n,-e)})},hs=function(t){return t.fold(b,b)},vs=function(t){return K(t,function(t,n){return t.translate(n.left,n.top)},re(0,0))},bs=function(t){var n=W(t,hs);return vs(n)},ys=gs.screen,xs=gs.absolute,ws=function(t,n,e){var o=mn(t.element),r=Se(o),i=function(t,n,e){var o=hn(e.root).dom;return I.from(o.frameElement).map(Rt.fromDom).filter(function(n){var e=mn(n),o=mn(t.element);return fn(e,o)}).map(ue)}(t,0,e).getOr(r);return xs(i,r.left,r.top)},Ss=function(t,n,e,o){var r=ys(re(t,n));return I.some(function(t,n,e){return{point:t,width:n,height:e}}(r,e,o))},ks=function(t,n,e,o,r){return t.map(function(t){var i,u,a,c,s,f,l,d=[n,t.point],m=(i=function(){return bs(d)},u=function(){return bs(d)},a=function(){return function(t){var n=W(t,ps);return vs(n)}(d)},o.fold(i,u,a)),g=(c=m.left,s=m.top,f=t.width,l=t.height,{x:c,y:s,width:f,height:l}),p=e.showAbove?$a():Za(),h=e.showAbove?Qa():tc(),v=ls(r,e,p,h,p,h,I.none());return is({anchorBox:g,bubble:e.bubble.getOr(rs()),overrides:e.overrides,layouts:v,placer:I.none()})})},Cs=[zo("node"),zo("root"),Ko("bubble"),fs(),er("overrides",{}),er("showAbove",!1),ya("placement",function(t,n,e){var o=ws(t,0,n);return n.node.filter(Bn).bind(function(r){var i=r.dom.getBoundingClientRect(),u=Ss(i.left,i.top,i.width,i.height),a=n.node.getOr(t.element);return ks(u,o,n,e,a)})})],Os=function(t,n,e,o){return{start:t,soffset:n,finish:e,foffset:o}},_s=dr([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),Ts=(_s.before,_s.on,_s.after,function(t){return t.fold(b,b,b)}),Es=dr([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),Ds={domRange:Es.domRange,relative:Es.relative,exact:Es.exact,exactFromRange:function(t){return Es.exact(t.start,t.soffset,t.finish,t.foffset)},getWin:function(t){var n=function(t){return t.match({domRange:function(t){return Rt.fromDom(t.startContainer)},relative:function(t,n){return Ts(t)},exact:function(t,n,e,o){return t}})}(t);return hn(n)},range:Os},As=function(t,n,e){var o,r=t.document.createRange();return o=r,n.fold(function(t){o.setStartBefore(t.dom)},function(t,n){o.setStart(t.dom,n)},function(t){o.setStartAfter(t.dom)}),function(t,n){n.fold(function(n){t.setEndBefore(n.dom)},function(n,e){t.setEnd(n.dom,e)},function(n){t.setEndAfter(n.dom)})}(r,e),r},Bs=function(t,n,e,o,r){var i=t.document.createRange();return i.setStart(n.dom,e),i.setEnd(o.dom,r),i},Ms=function(t){return{left:t.left,top:t.top,right:t.right,bottom:t.bottom,width:t.width,height:t.height}},Fs=dr([{ltr:["start","soffset","finish","foffset"]},{rtl:["start","soffset","finish","foffset"]}]),Is=function(t,n,e){return n(Rt.fromDom(e.startContainer),e.startOffset,Rt.fromDom(e.endContainer),e.endOffset)},Rs=function(t,n){return function(t,n){var e=n.ltr();return e.collapsed?n.rtl().filter(function(t){return!1===t.collapsed}).map(function(t){return Fs.rtl(Rt.fromDom(t.endContainer),t.endOffset,Rt.fromDom(t.startContainer),t.startOffset)}).getOrThunk(function(){return Is(0,Fs.ltr,e)}):Is(0,Fs.ltr,e)}(0,function(t,n){return n.match({domRange:function(t){return{ltr:v(t),rtl:I.none}},relative:function(n,e){return{ltr:jt(function(){return As(t,n,e)}),rtl:jt(function(){return I.some(As(t,e,n))})}},exact:function(n,e,o,r){return{ltr:jt(function(){return Bs(t,n,e,o,r)}),rtl:jt(function(){return I.some(Bs(t,o,r,n,e))})}}})}(t,n))},Ns=function(t,n){return Rs(t,n).match({ltr:function(n,e,o,r){var i=t.document.createRange();return i.setStart(n.dom,e),i.setEnd(o.dom,r),i},rtl:function(n,e,o,r){var i=t.document.createRange();return i.setStart(o.dom,r),i.setEnd(n.dom,e),i}})};Fs.ltr,Fs.rtl;var Ps,Vs=function(t,n){var e=function(n){return t(n)?I.from(n.dom.nodeValue):I.none()};
95return{get:function(o){if(!t(o))throw new Error("Can only get "+n+" value of a "+n+" node");return e(o).getOr("")},getOption:e,set:function(e,o){if(!t(e))throw new Error("Can only set raw "+n+" value of a "+n+" node");e.dom.nodeValue=o}}}(Lt,"text"),Hs=function(t){return Vs.getOption(t)},Ls=["img","br"],zs=function(t){return Hs(t).filter(function(t){return 0!==t.trim().length||t.indexOf(" ")>-1}).isSome()||L(Ls,Pt(t))},Us=function(t,n){var e=function(t){for(var o=yn(t),r=o.length-1;r>=0;r--){var i=o[r];if(n(i))return I.some(i);var u=e(i);if(u.isSome())return u}return I.none()};return e(t)},js=function(t,n){return function(t,n){var e=void 0===n?document:n.dom;return sn(e)?[]:W(e.querySelectorAll(t),Rt.fromDom)}(n,t)},Ws=function(t,n,e,o){var r=function(t,n,e,o){var r=mn(t).dom.createRange();return r.setStart(t.dom,n),r.setEnd(e.dom,o),r}(t,n,e,o),i=fn(t,e)&&n===o;return r.collapsed&&!i},Gs=function(t){if(t.rangeCount>0){var n=t.getRangeAt(0),e=t.getRangeAt(t.rangeCount-1);return I.some(Os(Rt.fromDom(n.startContainer),n.startOffset,Rt.fromDom(e.endContainer),e.endOffset))}return I.none()},Xs=function(t){if(null===t.anchorNode||null===t.focusNode)return Gs(t);var n=Rt.fromDom(t.anchorNode),e=Rt.fromDom(t.focusNode);return Ws(n,t.anchorOffset,e,t.focusOffset)?I.some(Os(n,t.anchorOffset,e,t.focusOffset)):Gs(t)},qs=function(t){return function(t){return I.from(t.getSelection())}(t).filter(function(t){return t.rangeCount>0}).bind(Xs)},Ys=function(t,n){return function(t){var n=t.getClientRects(),e=n.length>0?n[0]:t.getBoundingClientRect();return e.width>0||e.height>0?I.some(e).map(Ms):I.none()}(Ns(t,n))},Ks=function(t,n){return function(t){var n=t.getBoundingClientRect();return n.width>0||n.height>0?I.some(n).map(Ms):I.none()}(Ns(t,n))},Js=function(t,n){return{element:t,offset:n}},$s=function(t,n){var e=yn(t);if(0===e.length)return Js(t,n);if(n<e.length)return Js(e[n],0);var o=e[e.length-1],r=Lt(o)?function(t){return Vs.get(t)}(o).length:yn(o).length;return Js(o,r)},Qs=function(t,n){return Lt(t)?Js(t,n):$s(t,n)},Zs=function(t,n){return n.getSelection.getOrThunk(function(){return function(){return qs(t)}})().map(function(t){var n=Qs(t.start,t.soffset),e=Qs(t.finish,t.foffset);return Ds.range(n.element,n.offset,e.element,e.offset)})},tf=[Ko("getSelection"),zo("root"),Ko("bubble"),fs(),er("overrides",{}),er("showAbove",!1),ya("placement",function(t,n,e){var o=hn(n.root).dom,r=ws(t,0,n),i=Zs(o,n).bind(function(t){return Ks(o,Ds.exactFromRange(t)).orThunk(function(){var n=Rt.fromText("\ufeff");ge(t.start,n);var e=Ys(o,Ds.exact(n,0,n,1));return xe(n),e}).bind(function(t){return Ss(t.left,t.top,t.width,t.height)})}),u=Zs(o,n).bind(function(t){return Ht(t.start)?I.some(t.start):(n=t.start,vn(n));var n}).getOr(t.element);return ks(i,r,n,e,u)})],nf=function(t){return t.x+t.width},ef=function(t,n){return t.x-n.width},of=function(t,n){return t.y-n.height+t.height},rf=function(t){return t.y},uf=function(t,n,e){return Sa(nf(t),rf(t),e.southeast(),Ca(),"southeast",Ia(t,{left:0,top:2}),"link-layout")},af=function(t,n,e){return Sa(ef(t,n),rf(t),e.southwest(),Oa(),"southwest",Ia(t,{right:1,top:2}),"link-layout")},cf=function(t,n,e){return Sa(nf(t),of(t,n),e.northeast(),_a(),"northeast",Ia(t,{left:0,bottom:3}),"link-layout")},sf=function(t,n,e){return Sa(ef(t,n),of(t,n),e.northwest(),Ta(),"northwest",Ia(t,{right:1,bottom:3}),"link-layout")},ff=function(){return[uf,af,cf,sf]},lf=function(){return[af,uf,sf,cf]},df=[zo("item"),fs(),er("overrides",{}),ya("placement",function(t,n,e){var o=_c(e,n.item.element),r=ls(t.element,n,ff(),lf(),ff(),lf(),I.none());return I.some(is({anchorBox:o,bubble:rs(),overrides:n.overrides,layouts:r,placer:I.none()}))})],mf=Po("type",{selection:tf,node:Cs,hotspot:ds,submenu:df,makeshift:ms}),gf=[Yo("classes",Co),ur("mode","all",["all","layout","placement"])],pf=[er("useFixed",k),Ko("getBounds")],hf=[Uo("anchor",mf),nr("transition",gf)],vf=function(t,n,e,o,r,i,u){return function(t,n,e,o,r,i,u,a){var c=ts(u,"maxHeightFunction",Qc()),s=ts(u,"maxWidthFunction",p),f=t.anchorBox,l=t.origin,d={bounds:Tc(l,i),origin:l,preference:o,maxHeightFunction:c,maxWidthFunction:s,lastPlacement:r,transition:a};return ns(f,n,e,d)}(function(t,n){return function(t,n){return{anchorBox:t,origin:n}}
95(t,n)}(e.anchorBox,n),r.element,e.bubble,e.layouts,i,o,e.overrides,u)},bf=function(t,n,e,o,r,i){var u=i.map(Ae);return yf(t,n,e,o,r,u)},yf=function(t,n,e,o,r,i){var u=Ro("placement.info",ho(hf),r),a=u.anchor,c=o.element,s=e.get(o.uid);xc(function(){jn(c,"position","fixed");var r=Yn(c,"visibility");jn(c,"visibility","hidden");var f,l=n.useFixed()?(f=document.documentElement,Bc(0,0,f.clientWidth,f.clientHeight)):function(t){var n=ue(t.element),e=t.element.dom.getBoundingClientRect();return Ac(n.left,n.top,e.width,e.height)}(t),d=a.placement,m=i.map(v).or(n.getBounds);d(t,a,l).each(function(n){var r=n.placer.getOr(vf)(t,l,n,m,o,s,u.transition);e.set(o.uid,r)}),r.fold(function(){$n(c,"visibility")},function(t){jn(c,"visibility",t)}),Yn(c,"left").isNone()&&Yn(c,"top").isNone()&&Yn(c,"right").isNone()&&Yn(c,"bottom").isNone()&&kt(Yn(c,"position"),"fixed")&&$n(c,"position")},c)},xf=Object.freeze({__proto__:null,position:function(t,n,e,o,r){bf(t,n,e,o,r,I.none())},positionWithin:bf,positionWithinBounds:yf,getMode:function(t,n,e){return n.useFixed()?"fixed":"absolute"},reset:function(t,n,e,o){var r=o.element;G(["position","left","right","top","bottom"],function(t){return $n(r,t)}),function(t){Ln(t,"data-alloy-placement")}(r),e.clear(o.uid)}}),wf=Object.freeze({__proto__:null,init:function(){var t={};return fu({readState:function(){return t},clear:function(n){l(n)?delete t[n]:t={}},set:function(n,e){t[n]=e},get:function(n){return xt(t,n)}})}}),Sf=sc({fields:pf,name:"positioning",active:gc,apis:xf,state:wf}),kf=function(t){yi(t,fi());var n=t.components();G(n,kf)},Cf=function(t){var n=t.components();G(n,Cf),yi(t,si())},Of=function(t,n){ve(t.element,n.element)},_f=function(t,n){var e=t.components();!function(t){G(t.components(),function(t){return xe(t.element)}),ye(t.element),t.syncComponents()}(t);var o=et(e,n);G(o,function(n){kf(n),t.getSystem().removeFromWorld(n)}),G(n,function(n){n.getSystem().isConnected()?Of(t,n):(t.getSystem().addToWorld(n),Of(t,n),Bn(t.element)&&Cf(n)),t.syncComponents()})},Tf=function(t,n){Ef(t,n,ve)},Ef=function(t,n,e){t.getSystem().addToWorld(n),e(t.element,n.element),Bn(t.element)&&Cf(n),t.syncComponents()},Df=function(t){kf(t),xe(t.element),t.getSystem().removeFromWorld(t)},Af=function(t){var n=vn(t.element).bind(function(n){return t.getSystem().getByDom(n).toOptional()});Df(t),n.each(function(t){t.syncComponents()})},Bf=function(t){var n=t.components();G(n,Df),ye(t.element),t.syncComponents()},Mf=function(t,n){Ff(t,n,ve)},Ff=function(t,n,e){e(t,n.element);var o=yn(n.element);G(o,function(t){n.getByDom(t).each(Cf)})},If=function(t){var n=yn(t.element);G(n,function(n){t.getByDom(n).each(kf)}),xe(t.element)},Rf=function(t,n,e,o){e.get().each(function(n){Bf(t)});var r=n.getAttachPoint(t);Tf(r,t);var i=t.getSystem().build(o);return Tf(t,i),e.set(i),i},Nf=function(t,n,e,o){var r=Rf(t,n,e,o);return n.onOpen(t,r),r},Pf=function(t,n,e){e.get().each(function(o){Bf(t),Af(t),n.onClose(t,o),e.clear()})},Vf=function(t,n,e){return e.isOpen()},Hf=function(t,n,e){var o=n.getAttachPoint(t);jn(t.element,"position",Sf.getMode(o)),function(t,n,e,o){Yn(t.element,n).fold(function(){Ln(t.element,e)},function(n){Rn(t.element,e,n)}),jn(t.element,n,o)}(t,"visibility",n.cloakVisibilityAttr,"hidden")},Lf=function(t,n,e){var o;o=t.element,z(["top","left","right","bottom"],function(t){return Yn(o,t).isSome()})||$n(t.element,"position"),function(t,n,e){Vn(t.element,e).fold(function(){return $n(t.element,n)},function(e){return jn(t.element,n,e)})}(t,"visibility",n.cloakVisibilityAttr)},zf=Object.freeze({__proto__:null,cloak:Hf,decloak:Lf,open:Nf,openWhileCloaked:function(t,n,e,o,r){Hf(t,n),Nf(t,n,e,o),r(),Lf(t,n)},close:Pf,isOpen:Vf,isPartOf:function(t,n,e,o){return Vf(0,0,e)&&e.get().exists(function(e){return n.isPartOf(t,e,o)})},getState:function(t,n,e){return e.get()},setContent:function(t,n,e,o){return e.get().map(function(){return Rf(t,n,e,o)})}}),Uf=Object.freeze({__proto__:null,events:function(t,n){return Oi([Ei(ei(),function(e,o){Pf(e,t,n)})])}}),jf=[pa("onOpen"),pa("onClose"),zo("isPartOf"),zo("getAttachPoint"),er("cloakVisibilityAttr","data-precloak-visibility")],Wf=sc({fields:jf,name:"sandboxing",active:Uf,apis:zf,state:Object.freeze({__proto__:null,init:function(){var t=Vc(),n=v("not-implemented");
95return fu({readState:n,isOpen:t.isSet,clear:t.clear,set:t.set,get:t.get})}})}),Gf=v("dismiss.popups"),Xf=v("reposition.popups"),qf=v("mouse.released"),Yf=po([er("isExtraPart",k),nr("fireEventInstead",[er("event",li())])]),Kf=function(t){var n,e=Ro("Dismissal",Yf,t);return(n={})[Gf()]={schema:po([zo("target")]),onReceive:function(t,n){Wf.isOpen(t)&&(Wf.isPartOf(t,n.target)||e.isExtraPart(t,n.target)||e.fireEventInstead.fold(function(){return Wf.close(t)},function(n){return yi(t,n.event)}))}},n},Jf=po([nr("fireEventInstead",[er("event",di())]),Go("doReposition")]),$f=function(t){var n,e=Ro("Reposition",Jf,t);return(n={})[Xf()]={onReceive:function(t){Wf.isOpen(t)&&e.fireEventInstead.fold(function(){return e.doReposition(t)},function(n){return yi(t,n.event)})}},n},Qf=function(t,n,e){n.store.manager.onLoad(t,n,e)},Zf=function(t,n,e){n.store.manager.onUnload(t,n,e)},tl=Object.freeze({__proto__:null,onLoad:Qf,onUnload:Zf,setValue:function(t,n,e,o){n.store.manager.setValue(t,n,e,o)},getValue:function(t,n,e){return n.store.manager.getValue(t,n,e)},getState:function(t,n,e){return e}}),nl=Object.freeze({__proto__:null,events:function(t,n){var e=t.resetOnDom?[Ri(function(e,o){Qf(e,t,n)}),Ni(function(e,o){Zf(e,t,n)})]:[oc(t,n,Qf)];return Oi(e)}}),el=function(){var t=lr(null);return fu({set:t.set,get:t.get,isNotSet:function(){return null===t.get()},clear:function(){t.set(null)},readState:function(){return{mode:"memory",value:t.get()}}})},ol=function(){var t=lr({}),n=lr({});return fu({readState:function(){return{mode:"dataset",dataByValue:t.get(),dataByText:n.get()}},lookup:function(e){return xt(t.get(),e).orThunk(function(){return xt(n.get(),e)})},update:function(e){var o=t.get(),r=n.get(),i={},u={};G(e,function(t){i[t.value]=t,xt(t,"meta").each(function(n){xt(n,"text").each(function(n){u[n]=t})})}),t.set(_(_({},o),i)),n.set(_(_({},r),u))},clear:function(){t.set({}),n.set({})}})},rl=Object.freeze({__proto__:null,memory:el,dataset:ol,manual:function(){return fu({readState:p})},init:function(t){return t.store.manager.state(t)}}),il=function(t,n,e,o){var r=n.store;e.update([o]),r.setValue(t,o),n.onSetValue(t,o)},ul=[Ko("initialValue"),zo("getFallbackEntry"),zo("getDataKey"),zo("setValue"),ya("manager",{setValue:il,getValue:function(t,n,e){var o=n.store,r=o.getDataKey(t);return e.lookup(r).getOrThunk(function(){return o.getFallbackEntry(r)})},onLoad:function(t,n,e){n.store.initialValue.each(function(o){il(t,n,e,o)})},onUnload:function(t,n,e){e.clear()},state:ol})],al=[zo("getValue"),er("setValue",p),Ko("initialValue"),ya("manager",{setValue:function(t,n,e,o){n.store.setValue(t,o),n.onSetValue(t,o)},getValue:function(t,n,e){return n.store.getValue(t)},onLoad:function(t,n,e){n.store.initialValue.each(function(e){n.store.setValue(t,e)})},onUnload:p,state:su.init})],cl=[Ko("initialValue"),ya("manager",{setValue:function(t,n,e,o){e.set(o),n.onSetValue(t,o)},getValue:function(t,n,e){return e.get()},onLoad:function(t,n,e){n.store.initialValue.each(function(t){e.isNotSet()&&e.set(t)})},onUnload:function(t,n,e){e.clear()},state:el})],sl=[or("store",{mode:"memory"},Po("mode",{memory:cl,manual:al,dataset:ul})),pa("onSetValue"),er("resetOnDom",!1)],fl=sc({fields:sl,name:"representing",active:nl,apis:tl,extra:{setValueFrom:function(t,n){var e=fl.getValue(n);fl.setValue(t,e)}},state:rl}),ll=function(t,n){return fr(t,{},W(n,function(n){return e=n.name(),o="Cannot configure "+n.name()+" for "+t,Vo(e,e,{tag:"option",process:{}},ao(function(t){return je("The field: "+e+" is forbidden. "+o)}));var e,o}).concat([Ho("dump",b)]))},dl=function(t){return t.dump},ml=function(t,n){return _(_({},ac(n)),t.dump)},gl=ll,pl=ml,hl=dr([{single:["required","valueThunk"]},{multiple:["required","valueThunks"]}]),vl=function(t){return wt(t,"uiType")},bl=function(t,n,e,o){return vl(e)&&"placeholder"===e.uiType?function(t,n,e,o){return t.exists(function(t){return t!==e.owner})?hl.single(!0,v(e)):xt(o,e.name).fold(function(){throw new Error("Unknown placeholder component: "+e.name+"\nKnown: ["+lt(o)+"]\nNamespace: "+t.getOr("none")+"\nSpec: "+JSON.stringify(e,null,2))},function(t){return t.replace()})}(t,0,e,o):hl.single(!1,v(e))},yl=function(t,n,e,o){return bl(t,0,e,o).fold(function(r,i){var u=vl(e)?i(n,e.config,e.validated):i(n),a=xt(u,"components").getOr([]),c=Z(a,function(e){return yl(t,n,e,o)});return[_(_({},u),{components:c})]},function(t,o){if(vl(e)){var r=o(n,e.config,e.validated);return e.validated.preprocess.getOr(b)(r)}return o(n)})},xl=function(t,n,e,o){var r=gt(o,function(t,n){return o=t,r=!1,{name:v(e=n),required:function(){return o.fold(function(t,n){return t},function(t,n){return t})},used:function(){return r},replace:function(){if(r)throw new Error("Trying to use the same placeholder more than once: "+e);return r=!0,o}};var e,o,r}),i=function(t,n,e,o){return Z(e,function(e){return yl(t,n,e,o)})}
95(t,n,e,r);return mt(r,function(e){if(!1===e.used()&&e.required())throw new Error("Placeholder: "+e.name()+" was not found in components list\nNamespace: "+t.getOr("none")+"\nComponents: "+JSON.stringify(n.components,null,2))}),i},wl=hl.single,Sl=hl.multiple,kl=v("placeholder"),Cl=dr([{required:["data"]},{external:["data"]},{optional:["data"]},{group:["data"]}]),Ol=er("factory",{sketch:b}),_l=er("schema",[]),Tl=zo("name"),El=Vo("pname","pname",to(function(t){return"<alloy."+qi(t.name)+">"}),wo()),Dl=Ho("schema",function(){return[Ko("preprocess")]}),Al=er("defaults",v({})),Bl=er("overrides",v({})),Ml=ho([Ol,_l,Tl,El,Al,Bl]),Fl=ho([Ol,_l,Tl,Al,Bl]),Il=ho([Ol,_l,Tl,El,Al,Bl]),Rl=ho([Ol,Dl,Tl,zo("unit"),El,Al,Bl]),Nl=function(t){return t.fold(I.some,I.none,I.some,I.some)},Pl=function(t){var n=function(t){return t.name};return t.fold(n,n,n,n)},Vl=function(t,n){return function(e){var o=Ro("Converting part type",n,e);return t(o)}},Hl=Vl(Cl.required,Ml),Ll=Vl(Cl.external,Fl),zl=Vl(Cl.optional,Il),Ul=Vl(Cl.group,Rl),jl=v("entirety"),Wl=Object.freeze({__proto__:null,required:Hl,external:Ll,optional:zl,group:Ul,asNamedPart:Nl,name:Pl,asCommon:function(t){return t.fold(b,b,b,b)},original:jl}),Gl=function(t,n,e,o){return Qe(n.defaults(t,e,o),e,{uid:t.partUids[n.name]},n.overrides(t,e,o))},Xl=function(t,n){var e={};return G(n,function(n){Nl(n).each(function(n){var o=ql(t,n.pname);e[n.name]=function(e){var r=Ro("Part: "+n.name+" in "+t,ho(n.schema),e);return _(_({},o),{config:e,validated:r})}})}),e},ql=function(t,n){return{uiType:kl(),owner:t,name:n}},Yl=function(t,n,e){return{uiType:kl(),owner:t,name:n,config:e,validated:{}}},Kl=function(t){return Z(t,function(t){return t.fold(I.none,I.some,I.none,I.none).map(function(t){return Xo(t.name,t.schema.concat([xa(jl())]))}).toArray()})},Jl=function(t){return W(t,Pl)},$l=function(t,n,e){return function(t,n,e){var o={},r={};return G(e,function(t){t.fold(function(t){o[t.pname]=wl(!0,function(n,e,o){return t.factory.sketch(Gl(n,t,e,o))})},function(t){var e=n.parts[t.name];r[t.name]=v(t.factory.sketch(Gl(n,t,e[jl()]),e))},function(t){o[t.pname]=wl(!1,function(n,e,o){return t.factory.sketch(Gl(n,t,e,o))})},function(t){o[t.pname]=Sl(!0,function(n,e,o){var r=n[t.name];return W(r,function(e){return t.factory.sketch(Qe(t.defaults(n,e,o),e,t.overrides(n,e)))})})})}),{internals:v(o),externals:v(r)}}(0,n,e)},Ql=function(t,n,e){return xl(I.some(t),n,n.components,e)},Zl=function(t,n,e){var o=n.partUids[e];return t.getSystem().getByUid(o).toOptional()},td=function(t,n,e){return Zl(t,n,e).getOrDie("Could not find part: "+e)},nd=function(t,n,e){var o={},r=n.partUids,i=t.getSystem();return G(e,function(t){o[t]=v(i.getByUid(r[t]))}),o},ed=function(t,n){var e=t.getSystem();return gt(n.partUids,function(t,n){return v(e.getByUid(t))})},od=function(t){return lt(t.partUids)},rd=function(t,n,e){var o={},r=n.partUids,i=t.getSystem();return G(e,function(t){o[t]=v(i.getByUid(r[t]).getOrDie())}),o},id=function(t,n){var e=Jl(n);return hr(W(e,function(n){return{key:n,value:t+"-"+n}}))},ud=function(t){return Vo("partUids","partUids",eo(function(n){return id(n.uid,t)}),wo())},ad=Object.freeze({__proto__:null,generate:Xl,generateOne:Yl,schemas:Kl,names:Jl,substitutes:$l,components:Ql,defaultUids:id,defaultUidsSchema:ud,getAllParts:ed,getAllPartNames:od,getPart:Zl,getPartOrDie:td,getParts:nd,getPartsOrDie:rd}),cd=function(t,n,e,o,r){var i=function(t,n){return(t.length>0?[Xo("parts",t)]:[]).concat([zo("uid"),er("dom",{}),er("components",[]),xa("originalSpec"),er("debug.sketcher",{})]).concat(n)}(o,r);return Ro(t+" [SpecSchema]",po(i.concat(n)),e)},sd=function(t,n,e,o,r){var i=fd(r),u=Kl(e),a=ud(e),c=cd(t,n,i,u,[a]),s=$l(0,c,e);return o(c,Ql(t,c,s.internals()),i,s.externals())},fd=function(t){return function(t){return wt(t,"uid")}(t)?t:_(_({},t),{uid:tu("uid")})},ld=po([zo("name"),zo("factory"),zo("configFields"),er("apis",{}),er("extraApis",{})]),dd=po([zo("name"),zo("factory"),zo("configFields"),zo("partFields"),er("apis",{}),er("extraApis",{})]),md=function(t){var n=Ro("Sketcher for "+t.name,ld,t),e=gt(n.apis,cu),o=gt(n.extraApis,function(t,n){return iu(t,n)});return _(_({name:n.name,configFields:n.configFields,sketch:function(t){return function(t,n,e,o){var r=fd(o);return e(cd(t,n,r,[],[]),r)}(n.name,n.configFields,n.factory,t)}},e),o)},gd=function(t){var n=Ro("Sketcher for "+t.name,dd,t),e=Xl(n.name,n.partFields),o=gt(n.apis,cu),r=gt(n.extraApis,function(t,n){return iu(t,n)});return _(_({name:n.name,partFields:n.partFields,configFields:n.configFields,sketch:function(t){return sd(n.name,n.configFields,n.partFields,n.factory,t)},parts:e},o),r)},pd=function(t){return"input"===Pt(t)&&"radio"!==Pn(t,"type")||"textarea"===Pt(t)},hd=Object.freeze({__proto__:null,getCurrent:function(t,n,e){return n.find(t)}}),vd=[zo("find")],bd=sc({fields:vd,name:"composing",apis:hd}),yd=["input","button","textarea","select"],xd=function(t,n,e){(n.disabled()?_d:Td)(t,n)},wd=function(t,n){return!0===n.useNative&&L(yd,Pt(t.element))},Sd=function(t){Rn(t.element,"disabled","disabled")},kd=function(t){Ln(t.element,"disabled")},Cd=function(t){Rn(t.element,"aria-disabled","true")},Od=function(t){Rn(t.element,"aria-disabled","false")},_d=function(t,n,e){n.disableClass.each(function(n){_u(t.element,n)}),(wd(t,n)?Sd:Cd)(t),n.onDisabled(t)},Td=function(t,n,e){n.disableClass.each(function(n){Eu(t.element,n)}),(wd(t,n)?kd:Od)(t),n.onEnabled(t)},Ed=function(t,n){return wd(t,n)?function(t){return Hn(t.element,"disabled")}(t):function(t){return"true"===Pn(t.element,"aria-disabled")}(t)},Dd=Object.freeze({__proto__:null,enable:Td,disable:_d,isDisabled:Ed,onLoad:xd,set:function(t,n,e,o){(o?_d:Td)(t,n)}}),Ad=Object.freeze({__proto__:null,exhibit:function(t,n){return du({classes:n.disabled()?n.disableClass.toArray():[]})},events:function(t,n){return Oi([_i(Qr(),function(n,e){return Ed(n,t)}),oc(t,n,xd)])}}),Bd=[cr("disabled",k),er("useNative",!0),Ko("disableClass"),pa("onDisabled"),pa("onEnabled")],Md=sc({fields:Bd,name:"disabling",active:Ad,apis:Dd}),Fd=function(t,n,e,o){var r=js(t.element,"."+n.highlightClass);G(r,function(e){z(o,function(t){return t.element===e})||(Eu(e,n.highlightClass),t.getSystem().getByDom(e).each(function(e){n.onDehighlight(t,e),yi(e,bi())}))})},Id=function(t,n,e,o){Fd(t,n,0,[o]),Rd(t,n,e,o)||(_u(o.element,n.highlightClass),n.onHighlight(t,o),yi(o,vi()))},Rd=function(t,n,e,o){return Du(o.element,n.highlightClass)},Nd=function(t,n,e,o){var r=js(t.element,"."+n.itemClass);return I.from(r[o]).fold(function(){return Re.error(new Error("No element found with index "+o))},t.getSystem().getByDom)},Pd=function(t,n,e){return Qu(t.element,"."+n.itemClass).bind(function(n){return t.getSystem().getByDom(n).toOptional()})},Vd=function(t,n,e){var o=js(t.element,"."+n.itemClass);return(o.length>0?I.some(o[o.length-1]):I.none()).bind(function(n){return t.getSystem().getByDom(n).toOptional()})},Hd=function(t,n,e,o){var r=js(t.element,"."+n.itemClass);return $(r,function(t){return Du(t,n.highlightClass)}).bind(function(n){var e=Ma(n,o,0,r.length-1);return t.getSystem().getByDom(r[e]).toOptional()})},Ld=function(t,n,e){var o=js(t.element,"."+n.itemClass);return Ct(W(o,function(n){return t.getSystem().getByDom(n).toOptional()}))},zd=Object.freeze({__proto__:null,dehighlightAll:function(t,n,e){return Fd(t,n,0,[])},dehighlight:function(t,n,e,o){Rd(t,n,e,o)&&(Eu(o.element,n.highlightClass),n.onDehighlight(t,o),yi(o,bi()))},highlight:Id,highlightFirst:function(t,n,e){Pd(t,n).each(function(o){Id(t,
95n,e,o)})},highlightLast:function(t,n,e){Vd(t,n).each(function(o){Id(t,n,e,o)})},highlightAt:function(t,n,e,o){Nd(t,n,e,o).fold(function(t){throw t},function(o){Id(t,n,e,o)})},highlightBy:function(t,n,e,o){var r=Ld(t,n);J(r,o).each(function(o){Id(t,n,e,o)})},isHighlighted:Rd,getHighlighted:function(t,n,e){return Qu(t.element,"."+n.highlightClass).bind(function(n){return t.getSystem().getByDom(n).toOptional()})},getFirst:Pd,getLast:Vd,getPrevious:function(t,n,e){return Hd(t,n,0,-1)},getNext:function(t,n,e){return Hd(t,n,0,1)},getCandidates:Ld}),Ud=[zo("highlightClass"),zo("itemClass"),pa("onHighlight"),pa("onDehighlight")],jd=sc({fields:Ud,name:"highlighting",apis:zd}),Wd=[8],Gd=[9],Xd=[13],qd=[27],Yd=[32],Kd=[37],Jd=[38],$d=[39],Qd=[40],Zd=function(t,n,e){var o=nt(t.slice(0,n)),r=nt(t.slice(n+1));return J(o.concat(r),e)},tm=function(t,n,e){var o=nt(t.slice(0,n));return J(o,e)},nm=function(t,n,e){var o=t.slice(0,n),r=t.slice(n+1);return J(r.concat(o),e)},em=function(t,n,e){var o=t.slice(n+1);return J(o,e)},om=function(t){return function(n){var e=n.raw;return L(t,e.which)}},rm=function(t){return function(n){return tt(t,function(t){return t(n)})}},im=function(t){return!0===t.raw.shiftKey},um=function(t){return!0===t.raw.ctrlKey},am=w(im),cm=function(t,n){return{matches:t,classification:n}},sm=function(t,n,e){n.exists(function(t){return e.exists(function(n){return fn(n,t)})})||xi(t,mi(),{prevFocus:n,newFocus:e})},fm=function(){var t=function(t){return yc(t.element)};return{get:t,set:function(n,e){var o=t(n);n.getSystem().triggerFocus(e,n.element);var r=t(n);sm(n,o,r)}}},lm=function(){var t=function(t){return jd.getHighlighted(t).map(function(t){return t.element})};return{get:t,set:function(n,e){var o=t(n);n.getSystem().getByDom(e).fold(p,function(t){jd.highlight(n,t)});var r=t(n);sm(n,o,r)}}};!function(t){t.OnFocusMode="onFocus",t.OnEnterOrSpaceMode="onEnterOrSpace",t.OnApiMode="onApi"}(Ps||(Ps={}));var dm,mm=function(t,n,e,o,r){var i=function(t,n,e,o,r){var i,u,a=e(t,n,o,r);return(i=a,u=n.event,J(i,function(t){return t.matches(u)}).map(function(t){return t.classification})).bind(function(e){return e(t,n,o,r)})},u={schema:function(){return t.concat([er("focusManager",fm()),or("focusInside","onFocus",Bo(function(t){return L(["onFocus","onEnterOrSpace","onApi"],t)?Re.value(t):Re.error("Invalid value for focusInside")})),ya("handler",u),ya("state",n),ya("sendFocusIn",r)])},processKey:i,toEvents:function(t,n){var u=t.focusInside!==Ps.OnFocusMode?I.none():r(t).map(function(e){return Ei(Yr(),function(o,r){e(o,t,n),r.stop()})}),a=[Ei(Pr(),function(o,u){i(o,u,e,t,n).fold(function(){!function(e,o){var i=om(Yd.concat(Xd))(o.event);t.focusInside===Ps.OnEnterOrSpaceMode&&i&&wr(e,o)&&r(t).each(function(r){r(e,t,n),o.stop()})}(o,u)},function(t){u.stop()})}),Ei(Vr(),function(e,r){i(e,r,o,t,n).each(function(t){r.stop()})})];return Oi(u.toArray().concat(a))}};return u},gm=function(t){var n=[Ko("onEscape"),Ko("onEnter"),er("selector",'[data-alloy-tabstop="true"]:not(:disabled)'),er("firstTabstop",0),er("useTabstopAt",C),Ko("visibilitySelector")].concat([t]),e=function(t,n){var e=t.visibilitySelector.bind(function(t){return Zu(n,t)}).getOr(n);return ne(e)>0},o=function(t,n,o){(function(t,n){var o=js(t.element,n.selector),r=q(o,function(t){return e(n,t)});return I.from(r[n.firstTabstop])})(t,n).each(function(e){n.focusManager.set(t,e)})},r=function(t,n,o,r,i){return i(n,o,function(t){return function(t,n){return e(t,n)&&t.useTabstopAt(n)}(r,t)}).fold(function(){return r.cyclic?I.some(!0):I.none()},function(n){return r.focusManager.set(t,n),I.some(!0)})},i=function(t,n,e,o){var i=js(t.element,e.selector);return function(t,n){return n.focusManager.get(t).bind(function(t){return Zu(t,n.selector)})}(t,e).bind(function(n){return $(i,x(fn,n)).bind(function(n){return r(t,i,n,e,o)})})},u=v([cm(rm([im,om(Gd)]),function(t,n,e){var o=e.cyclic?Zd:tm;return i(t,0,e,o)}),cm(om(Gd),function(t,n,e){var o=e.cyclic?nm:em;return i(t,0,e,o)}),cm(om(qd),function(t,n,e){return e.onEscape.bind(function(e){return e(t,n)})}),cm(rm([am,om(Xd)]),function(t,n,e){return e.onEnter.bind(function(e){return e(t,n)})})]),a=v([]);return mm(n,su.init,u,a,function(){return I.some(o)})},pm=gm(Ho("cyclic",k)),hm=gm(Ho("cyclic",C)),vm=function(t,n,e){return pd(e)&&om(Yd)(n.event)?I.none():function(t,n,e){return Si(t,e,Qr()),I.some(!0)}(t,0,e)},bm=function(t,n){return I.some(!0)},ym=[er("execute",vm),er("useSpace",!1),er("useEnter",!0),er("useControlEnter",!1),er("useDown",!1)],xm=function(t,n,e){return e.execute(t,n,t.element)},wm=mm(ym,su.init,function(t,n,e,o){var r=e.useSpace&&!pd(t.element)?Yd:[],i=e.useEnter?Xd:[],u=e.useDown?Qd:[],a=r.concat(i).c
95oncat(u);return[cm(om(a),xm)].concat(e.useControlEnter?[cm(rm([um,om(Xd)]),xm)]:[])},function(t,n,e,o){return e.useSpace&&!pd(t.element)?[cm(om(Yd),bm)]:[]},function(){return I.none()}),Sm=function(){var t=Vc();return fu({readState:function(){return t.get().map(function(t){return{numRows:String(t.numRows),numColumns:String(t.numColumns)}}).getOr({numRows:"?",numColumns:"?"})},setGridSize:function(n,e){t.set({numRows:n,numColumns:e})},getNumRows:function(){return t.get().map(function(t){return t.numRows})},getNumColumns:function(){return t.get().map(function(t){return t.numColumns})}})},km=Object.freeze({__proto__:null,flatgrid:Sm,init:function(t){return t.state(t)}}),Cm=function(t){return function(n,e,o,r){var i=t(n.element);return Em(i,n,e,o,r)}},Om=function(t,n){var e=us(t,n);return Cm(e)},_m=function(t,n){var e=us(n,t);return Cm(e)},Tm=function(t){return function(n,e,o,r){return Em(t,n,e,o,r)}},Em=function(t,n,e,o,r){return o.focusManager.get(n).bind(function(e){return t(n.element,e,o,r)}).map(function(t){return o.focusManager.set(n,t),!0})},Dm=Tm,Am=Tm,Bm=Tm,Mm=function(t){return!((n=t.dom).offsetWidth<=0&&n.offsetHeight<=0);var n},Fm=function(t,n,e){var o=js(t,e);return function(t,n){return $(t,n).map(function(n){return{index:n,candidates:t}})}(q(o,Mm),function(t){return fn(t,n)})},Im=function(t,n){return $(t,function(t){return fn(n,t)})},Rm=function(t,n,e,o){return o(Math.floor(n/e),n%e).bind(function(n){var o=n.row*e+n.column;return o>=0&&o<t.length?I.some(t[o]):I.none()})},Nm=function(t,n,e,o,r){return Rm(t,n,o,function(n,i){var u=n===e-1?t.length-n*o:o,a=Ma(i,r,0,u-1);return I.some({row:n,column:a})})},Pm=function(t,n,e,o,r){return Rm(t,n,o,function(n,i){var u=Ma(n,r,0,e-1),a=u===e-1?t.length-u*o:o,c=Fa(i,0,a-1);return I.some({row:u,column:c})})},Vm=[zo("selector"),er("execute",vm),ha("onEscape"),er("captureTab",!1),wa()],Hm=function(t,n,e){Qu(t.element,n.selector).each(function(e){n.focusManager.set(t,e)})},Lm=function(t){return function(n,e,o,r){return Fm(n,e,o.selector).bind(function(n){return t(n.candidates,n.index,r.getNumRows().getOr(o.initSize.numRows),r.getNumColumns().getOr(o.initSize.numColumns))})}},zm=function(t,n,e){return e.captureTab?I.some(!0):I.none()},Um=Lm(function(t,n,e,o){return Nm(t,n,e,o,-1)}),jm=Lm(function(t,n,e,o){return Nm(t,n,e,o,1)}),Wm=Lm(function(t,n,e,o){return Pm(t,n,e,o,-1)}),Gm=Lm(function(t,n,e,o){return Pm(t,n,e,o,1)}),Xm=v([cm(om(Kd),Om(Um,jm)),cm(om($d),_m(Um,jm)),cm(om(Jd),Dm(Wm)),cm(om(Qd),Am(Gm)),cm(rm([im,om(Gd)]),zm),cm(rm([am,om(Gd)]),zm),cm(om(qd),function(t,n,e){return e.onEscape(t,n)}),cm(om(Yd.concat(Xd)),function(t,n,e,o){return function(t,n){return n.focusManager.get(t).bind(function(t){return Zu(t,n.selector)})}(t,e).bind(function(o){return e.execute(t,n,o)})})]),qm=v([cm(om(Yd),bm)]),Ym=mm(Vm,Sm,Xm,qm,function(){return I.some(Hm)}),Km=function(t,n,e,o){var r=function(t,n,e){var i,u=Ma(n,o,0,e.length-1);return u===t?I.none():(i=e[u],"button"===Pt(i)&&"disabled"===Pn(i,"disabled")?r(t,u,e):I.from(e[u]))};return Fm(t,e,n).bind(function(t){var n=t.index,e=t.candidates;return r(n,n,e)})},Jm=[zo("selector"),er("getInitial",I.none),er("execute",vm),ha("onEscape"),er("executeOnMove",!1),er("allowVertical",!0)],$m=function(t,n,e){return function(t,n){return n.focusManager.get(t).bind(function(t){return Zu(t,n.selector)})}(t,e).bind(function(o){return e.execute(t,n,o)})},Qm=function(t,n,e){n.getInitial(t).orThunk(function(){return Qu(t.element,n.selector)}).each(function(e){n.focusManager.set(t,e)})},Zm=function(t,n,e){return Km(t,e.selector,n,-1)},tg=function(t,n,e){return Km(t,e.selector,n,1)},ng=function(t){return function(n,e,o,r){return t(n,e,o,r).bind(function(){return o.executeOnMove?$m(n,e,o):I.some(!0)})}},eg=function(t,n,e){return e.onEscape(t,n)},og=v([cm(om(Yd),bm)]),rg=mm(Jm,su.init,function(t,n,e,o){var r=Kd.concat(e.allowVertical?Jd:[]),i=$d.concat(e.allowVertical?Qd:[]);return[cm(om(r),ng(Om(Zm,tg))),cm(om(i),ng(_m(Zm,tg))),cm(om(Xd),$m),cm(om(Yd),$m),cm(om(qd),eg)]},og,function(){return I.some(Qm)}),ig=function(t,n,e){return I.from(t[n]).bind(function(t){return I.from(t[e]).map(function(t){return{rowIndex:n,columnIndex:e,cell:t}})})},ug=function(t,n,e,o){var r=t[n].length,i=Ma(e,o,0,r-1);return ig(t,n,i)},ag=function(t,n,e,o){var r=Ma(e,o,0,t.length-1),i=t[r].length,u=Fa(n,0,i-1);return ig(t,r,u)},cg=function(t,n,e,o){var r=t[n].length,i=Fa(e+o,0,r-1);return ig(t,n,i)},sg=function(t,n,e,o){var r=Fa(e+o,0,t.length-1),i=t[r].length,u=Fa(n,0,i-1);return ig(t,r,u)},fg=[Xo("selectors",[zo("row"),zo("cell")]),er("cycles",!0),er("previousSelector",I.none),er("execute",vm)],lg=function(t,n,e){n.previousSelector(t).orThunk(function(){var e=n.selectors;return Qu(t.element,e.cell)}).each(function(e){n.focusManager.set(t,e)})},dg=function(t,n){return function(e,o,r){var i=r.cycles?t:n;return Zu(o,r.selectors.row).bind(function(t){var n=js(t,r.selectors.cell);return Im(n,o).bind(function(n){var o=js(e,r.selectors.row);return Im(o,t).bind(function(t){var e=function(t,n){return W(t,function(t){return js(t,n.selectors.cell)})}(o,r);return i(e,t,n).map(function(t){return t.cell})})})})}},mg=dg(function(t,n,e){return ug(t,n,e,-1)},function(t,n,e){return cg(t,n,e,-1)}),gg=dg(function(t,n,e){return ug(t,n,e,1)},function(t,n,e){return cg(t,n,e,1)}),pg=dg(function(t,n,e){return ag(t,e,n,-1)},function(t,n,e){return sg(t,e,n,-1)}),hg=dg(function(t,n,e){return ag(t,e,n,1)},function(t,n,e){return sg(t,e,n,1)}),vg=v([cm(om(Kd),Om(mg,gg)),cm(om($d),_m(mg,gg)),cm(om(Jd),Dm(pg)),cm(om(Qd),Am(hg)),cm(om(Yd.concat(Xd)),function(t,n,e){return yc(t.element).bind(function(o){return e.execute(t,n,o)})})]),bg=v([cm(om(Yd),bm)]),yg=mm(fg,su.init,vg,bg,function(){return I.some(lg)}),xg=[zo("selector"),er("execute",vm),er("moveOnTab",!1)],wg=function(t,n,e){return e.focusManager.get(t).bind(function(o){return e.execute(t,n,o)})},Sg=function(t,n,e){Qu(t.element,n.selector).each(function(e){n.focusManager.set(t,e)})}
95,kg=function(t,n,e){return Km(t,e.selector,n,-1)},Cg=function(t,n,e){return Km(t,e.selector,n,1)},Og=v([cm(om(Jd),Bm(kg)),cm(om(Qd),Bm(Cg)),cm(rm([im,om(Gd)]),function(t,n,e,o){return e.moveOnTab?Bm(kg)(t,n,e,o):I.none()}),cm(rm([am,om(Gd)]),function(t,n,e,o){return e.moveOnTab?Bm(Cg)(t,n,e,o):I.none()}),cm(om(Xd),wg),cm(om(Yd),wg)]),_g=v([cm(om(Yd),bm)]),Tg=mm(xg,su.init,Og,_g,function(){return I.some(Sg)}),Eg=[ha("onSpace"),ha("onEnter"),ha("onShiftEnter"),ha("onLeft"),ha("onRight"),ha("onTab"),ha("onShiftTab"),ha("onUp"),ha("onDown"),ha("onEscape"),er("stopSpaceKeyup",!1),Ko("focusIn")],Dg=mm(Eg,su.init,function(t,n,e){return[cm(om(Yd),e.onSpace),cm(rm([am,om(Xd)]),e.onEnter),cm(rm([im,om(Xd)]),e.onShiftEnter),cm(rm([im,om(Gd)]),e.onShiftTab),cm(rm([am,om(Gd)]),e.onTab),cm(om(Jd),e.onUp),cm(om(Qd),e.onDown),cm(om(Kd),e.onLeft),cm(om($d),e.onRight),cm(om(Yd),e.onSpace),cm(om(qd),e.onEscape)]},function(t,n,e){return e.stopSpaceKeyup?[cm(om(Yd),bm)]:[]},function(t){return t.focusIn}),Ag=pm.schema(),Bg=hm.schema(),Mg=rg.schema(),Fg=Ym.schema(),Ig=yg.schema(),Rg=wm.schema(),Ng=Tg.schema(),Pg=Dg.schema(),Vg=lc({branchKey:"mode",branches:Object.freeze({__proto__:null,acyclic:Ag,cyclic:Bg,flow:Mg,flatgrid:Fg,matrix:Ig,execution:Rg,menu:Ng,special:Pg}),name:"keying",active:{events:function(t,n){return t.handler.toEvents(t,n)}},apis:{focusIn:function(t,n,e){n.sendFocusIn(n).fold(function(){t.getSystem().triggerFocus(t.element,t.element)},function(o){o(t,n,e)})},setGridSize:function(t,n,e,o,r){!function(t){return St(t,"setGridSize")}(e)?console.error("Layout does not support setGridSize"):e.setGridSize(o,r)}},state:km}),Hg=function(t,n,e,o){var r=t.getSystem().build(o);Ef(t,r,e)},Lg=function(t,n,e,o){var r=zg(t);J(r,function(t){return fn(o.element,t.element)}).each(Af)},zg=function(t,n){return t.components()},Ug=function(t,n,e,o,r){var i=zg(t);return I.from(i[o]).map(function(n){return Lg(t,0,0,n),r.each(function(n){Hg(t,0,function(t,n){var e,r;r=n,xn(e=t,o).fold(function(){ve(e,r)},function(t){ge(t,r)})},n)}),n})},jg=sc({fields:[],name:"replacing",apis:Object.freeze({__proto__:null,append:function(t,n,e,o){Hg(t,0,ve,o)},prepend:function(t,n,e,o){Hg(t,0,he,o)},remove:Lg,replaceAt:Ug,replaceBy:function(t,n,e,o,r){var i=zg(t);return $(i,o).bind(function(n){return Ug(t,0,0,n,r)})},set:function(t,n,e,o){xc(function(){var n=W(o,t.getSystem().build);_f(t,n)},t.element)},contents:zg})}),Wg=function(t,n){return{key:t,value:{config:{},me:function(t,n){var e=Oi(n);return sc({fields:[zo("enabled")],name:t,active:{events:v(e)}})}(t,n),configAsRaw:v({}),initialConfig:{},state:su}}},Gg=function(t,n){n.ignore||(hc(t.element),n.onFocus(t))},Xg=Object.freeze({__proto__:null,focus:Gg,blur:function(t,n){n.ignore||t.element.dom.blur()},isFocused:function(t){return vc(t.element)}}),qg=Object.freeze({__proto__:null,exhibit:function(t,n){var e=n.ignore?{}:{attributes:{tabindex:"-1"}};return du(e)},events:function(t){return Oi([Ei(Yr(),function(n,e){Gg(n,t),e.stop()})].concat(t.stopMousedown?[Ei(Ar(),function(t,n){n.event.prevent()})]:[]))}}),Yg=[pa("onFocus"),er("stopMousedown",!1),er("ignore",!1)],Kg=sc({fields:Yg,name:"focusing",active:qg,apis:Xg}),Jg=function(t,n,e){var o=n.aria;o.update(t,o,e.get())},$g=function(t,n,e){n.toggleClass.each(function(n){e.get()?_u(t.element,n):Eu(t.element,n)})},Qg=function(t,n,e){np(t,n,e,!e.get())},Zg=function(t,n,e){e.set(!0),$g(t,n,e),Jg(t,n,e)},tp=function(t,n,e){e.set(!1),$g(t,n,e),Jg(t,n,e)},np=function(t,n,e,o){(o?Zg:tp)(t,n,e)},ep=function(t,n,e){np(t,n,e,n.selected)},op=Object.freeze({__proto__:null,onLoad:ep,toggle:Qg,isOn:function(t,n,e){return e.get()},on:Zg,off:tp,set:np}),rp=Object.freeze({__proto__:null,exhibit:function(){return du({})},events:function(t,n){var e,o,r,i=(e=t,o=n,r=Qg,Vi(function(t){r(t,e,o)})),u=oc(t,n,ep);return Oi(Q([t.toggleOnExecute?[i]:[],[u]]))}}),ip=function(t,n,e){Rn(t.element,"aria-expanded",e)},up=[er("selected",!1),Ko("toggleClass"),er("toggleOnExecute",!0),or("aria",{mode:"none"},Po("mode",{pressed:[er("syncWithExpanded",!1),ya("update",function(t,n,e){Rn(t.element,"aria-pressed",e),n.syncWithExpanded&&ip(t,n,e)})],checked:[ya("update",function(t,n,e){Rn(t.element,"aria-checked",e)})],expanded:[ya("update",ip)],selected:[ya("update",function(t,n,e){Rn(t.element,"aria-selected",e)})],none:[ya("update",p)]}))],ap=sc({fields:up,name:"toggling",active:rp,apis:op,state:(dm=!1,{init:function(){var t=lr(dm);return{get:function(){return t.get()},set:function(n){return t.set(n)},clear:function(){return t.set(dm)},readState:function(){return t.get()}}}})}),cp=function(){var t=function(t,n){n.stop(),wi(t)};return[Ei(zr(),t),Ei(ti(),t),Fi(_r()),Fi(Ar())]},sp=function(t){return Oi(Q([t.map(function(t){return Vi(function(n,e){t(n),e.stop()})}).toArray(),cp()]))},fp=function(t){(yc(t.element).isNone()||Kg.isFocused(t))&&(Kg.isFocused(t)||Kg.focus(t),xi(t,"alloy.item-hover",{item:t}))},lp=function(t){xi(t,"alloy.item-focus",{item:t})},dp=v("alloy.item-hover"),mp=v("alloy.item-focus"),gp=[zo("data"),zo("components"),zo("dom"),er("hasSubmenu",!1),Ko("toggling"),gl("itemBehaviours",[ap,Kg,Vg,fl]),er("ignoreFocus",!1),er("domModification",{}),ya("builder",function(t){return{dom:t.dom,domModification:_(_({},t.domModification),{attributes:_(_(_({role:t.toggling.isSome()?"menuitemcheckbox":"menuitem"},t.domModification.attributes),{"aria-haspopup":t.hasSubmenu}),t.hasSubmenu?{"aria-expanded":!1}:{})}),behaviours:pl(t.itemBehaviours,[t.toggling.fold(ap.revoke,function(t){return ap.config(_({aria:{mode:"checked"}},t))}),Kg.config({ignore:t.ignoreFocus,stopMousedown:t.ignoreFocus,onFocus:function(t){lp(t)}}),Vg.config({mode:"execution"}),fl.config({store:{mode:"memory",initialValue:t.data}}),Wg("item-type-events",E(E([],cp(),!0),[Ei(Ir(),fp),Ei(Zr(),Kg.focus)],!1))]),components:t.components,eventOrder:t.eventOrder}}),er("eventOrder",{})],pp=[zo("dom"),zo("components"),ya("builder",function(t){return{dom:t.dom,components:t.components,events:Oi([(n=Zr(),Ei(n,function(t,n){n.stop()}))])};var n})],hp=v("item-widget"),vp=v([Hl({name:"widget",overrides:function(t){return{behaviours:ac([fl.config({store:{mode:"manual",getValue:function(n){return t.data},setValue:p}})])}}})]),bp=[zo("uid"),zo("data"),zo("components"),zo("dom"),er("autofocus",!1),er("ignoreFocus",!1),gl("widgetBehaviours",[fl,Kg,Vg]),er("domModification",{}),ud(vp()),ya("builder",function(t){var n=$l(hp(),t,vp()),e=Ql(hp(),t,n.internals()),o=function(n){return Zl(n,t,"widget").map(function(t){return Vg.focusIn(t),t})},r=function(n,e){return pd(e.event.target)?I.none():t.autofocus?(e.setSource(n.element),I.none()):I.none()};return{dom:t.dom,components:e,domModification:t.domModification,events:Oi([Vi(function(t,n){o(t).each(function(t){n.stop()})}),Ei(Ir(),fp),Ei(Zr(),function(n,e){t.autofocus?o(n):Kg.focus(n)})]),behaviours:pl(t.widgetBehaviours,[fl.config({store:{mode:"memory",initialValue:t.data}}),Kg.config({ignore:t.ignoreFocus,onFocus:function(t){lp(t)}}),Vg.config({mode:"special",focusIn:t.autofocus?function(t){o(t)}
95:dc(),onLeft:r,onRight:r,onEscape:function(n,e){return Kg.isFocused(n)||t.autofocus?t.autofocus?(e.setSource(n.element),I.none()):I.none():(Kg.focus(n),I.some(!0))}})])}})],yp=Po("type",{widget:bp,item:gp,separator:pp}),xp=v([Ul({factory:{sketch:function(t){var n=Ro("menu.spec item",yp,t);return n.builder(n)}},name:"items",unit:"item",defaults:function(t,n){return wt(n,"uid")?n:_(_({},n),{uid:tu("item")})},overrides:function(t,n){return{type:n.type,ignoreFocus:t.fakeFocus,domModification:{classes:[t.markers.item]}}}})]),wp=v([zo("value"),zo("items"),zo("dom"),zo("components"),er("eventOrder",{}),ll("menuBehaviours",[jd,fl,bd,Vg]),or("movement",{mode:"menu",moveOnTab:!0},Po("mode",{grid:[wa(),ya("config",function(t,n){return{mode:"flatgrid",selector:"."+t.markers.item,initSize:{numColumns:n.initSize.numColumns,numRows:n.initSize.numRows},focusManager:t.focusManager}})],matrix:[ya("config",function(t,n){return{mode:"matrix",selectors:{row:n.rowSelector,cell:"."+t.markers.item},focusManager:t.focusManager}}),zo("rowSelector")],menu:[er("moveOnTab",!0),ya("config",function(t,n){return{mode:"menu",selector:"."+t.markers.item,moveOnTab:n.moveOnTab,focusManager:t.focusManager}})]})),Uo("markers",fa()),er("fakeFocus",!1),er("focusManager",fm()),pa("onHighlight")]),Sp=v("alloy.menu-focus"),kp=gd({name:"Menu",configFields:wp(),partFields:xp(),factory:function(t,n,e,o){return{uid:t.uid,dom:t.dom,markers:t.markers,behaviours:ml(t.menuBehaviours,[jd.config({highlightClass:t.markers.selectedItem,itemClass:t.markers.item,onHighlight:t.onHighlight}),fl.config({store:{mode:"memory",initialValue:t.value}}),bd.config({find:I.some}),Vg.config(t.movement.config(t,t.movement))]),events:Oi([Ei(mp(),function(t,n){var e=n.event;t.getSystem().getByDom(e.target).each(function(e){jd.highlight(t,e),n.stop(),xi(t,Sp(),{menu:t,item:e})})}),Ei(dp(),function(t,n){var e=n.event.item;jd.highlight(t,e)})]),components:n,eventOrder:t.eventOrder,domModification:{attributes:{role:"menu"}}}}}),Cp=function(t,n,e,o){return xt(e,o).bind(function(o){return xt(t,o).bind(function(o){var r=Cp(t,n,e,o);return I.some([o].concat(r))})}).getOr([])},Op=function(t,n){var e={};mt(t,function(t,n){G(t,function(t){e[t]=n})});var o=n,r=pt(n,function(t,n){return{k:t,v:n}}),i=gt(r,function(t,n){return[n].concat(Cp(e,o,r,n))});return gt(e,function(t){return xt(i,t).getOr([t])})},_p=function(t){return"prepared"===t.type?I.some(t.menu):I.none()},Tp={init:function(){var t=lr({}),n=lr({}),e=lr({}),o=Vc(),r=lr({}),i=function(n,e,o){return u(n).bind(function(r){return function(n){return bt(t.get(),function(t,e){return t===n})}(n).bind(function(t){return e(t).map(function(t){return{triggeredMenu:r,triggeringItem:t,triggeringPath:o}})})})},u=function(t){return a(t).bind(_p)},a=function(t){return xt(n.get(),t)},c=function(n){return xt(t.get(),n)};return{setMenuBuilt:function(t,e){var o;n.set(_(_({},n.get()),((o={})[t]={type:"prepared",menu:e},o)))},setContents:function(i,u,a,c){o.set(i),t.set(a),n.set(u),r.set(c);var s=Op(c,a);e.set(s)},expand:function(n){return xt(t.get(),n).map(function(t){var o=xt(e.get(),n).getOr([]);return[t].concat(o)})},refresh:function(t){return xt(e.get(),t)},collapse:function(t){return xt(e.get(),t).bind(function(t){return t.length>1?I.some(t.slice(1)):I.none()})},lookupMenu:a,lookupItem:c,otherMenus:function(t){var n=r.get();return et(lt(n),t)},getPrimary:function(){return o.get().bind(u)},getMenus:function(){return n.get()},clear:function(){t.set({}),n.set({}),e.set({}),o.clear()},isClear:function(){return o.get().isNone()},getTriggeringPath:function(t,n){var r=q(c(t).toArray(),function(t){return u(t).isSome()});return xt(e.get(),t).bind(function(t){var e=nt(r.concat(t));return function(t){for(var n=[],e=0;e<t.length;e++){var o=t[e];if(!o.isSome())return I.none();n.push(o.getOrDie())}return I.some(n)}(Z(e,function(t,r){return i(t,n,e.slice(0,r+1)).fold(function(){return kt(o.get(),t)?[]:[I.none()]},function(t){return[I.some(t)]})}))})}}},extractPreparedMenu:_p},Ep=v("collapse-item"),Dp=md({name:"TieredMenu",configFields:[ba("onExecute"),ba("onEscape"),va("onOpenMenu"),va("onOpenSubmenu"),pa("onRepositionMenu"),pa("onCollapseMenu"),er("highlightImmediately",!0),Xo("data",[zo("primary"),zo("menus"),zo("expansions")]),er("fakeFocus",!1),pa("onHighlight"),pa("onHover"),da(),zo("dom"),er("navigateOnHover",!0),er("stayInDom",!1),ll("tmenuBehaviours",[Vg,jd,bd,jg]),er("eventOrder",{})],apis:{collapseMenu:function(t,n){t.collapseMenu(n)},highlightPrimary:function(t,n){t.highlightPrimary(n)},repositionMenus:function(t,n){t.repositionMenus(n)}},factory:function(t,n){var e,o=Vc(),r=Tp.init(),i=function(n){var e=function(n,e,o){return gt(o,function(o,r){var i=function(){return kp.sketch(_(_({},o),{value:r,markers:t.markers,fakeFocus:t.fakeFocus,onHighlight:t.onHighlight,focusManager:t.fakeFocus?lm():fm()}))};return r===e?{type:"prepared",menu:n.getSystem().build(i())}:{type:"notbuilt",nbMenu:i}})}(n,t.data.primary,t.data.menus),o=a();return r.setContents(t.data.primary,e,t.data.expansions,o),r.getPrimary()},u=function(t){return fl.getValue(t).value},a=function(n){return gt(t.data.menus,function(t,n){return Z(t.items,function(t){return"separator"===t.type?[]:[t.data.value]})})},c=function(t,n){jd.highlight(t,n),jd.getHighlighted(n).orThunk(function(){return jd.getFirst(n)}).each(function(n){Si(t,n.element,Zr())})},s=function(t,n){return Ct(W(n,function(n){return t.lookupMenu(n).bind(function(t){return"prepared"===t.type?I.some(t.menu):I.none()})}))},f=function(n,e,o){var r=s(e,e.otherMenus(o));G(r,function(e){Bu(e.element,[t.markers.backgroundMenu]),t.stayInDom||jg.remove(n,e)})},l=function(n,e){var r=function(n){return o.get().getOrThunk(function(){var e={},r=js(n.element,"."+t.markers.item),i=q(r,function(t){return"true"===Pn(t,"aria-haspopup")});return G(i,function(t){n.getSystem().getByDom(t).each(function(t){var n=u(t);e[n]=t})}),o.set(e),e})}(n);mt(r,function(t,n){var o=L(e,n);Rn(t.element,"aria-expanded",o)})},d=function(n,e,o){return I.from(o[0]).bind(function(r){return e.lookupMenu(r).bind(function(r){if("notbuilt"===r.type)return I.none();var i=r.menu,u=s(e,o.slice(1));return G(u,function(n){_u(n.element,t.markers.backgroundMenu)}),Bn(i.element)||jg.append(n,Wu(i)),Bu(i.element,[t.markers.backgroundMenu]),c(n,i),f(n,e,o),I.some(i)})})};!function(t){t[t.HighlightSubmenu=0]="HighlightSubmenu",t[t.HighlightParent=1]="HighlightParent"}(e||(e={}));var m=function(n,o,i){if(void 0===i&&(i=e.HighlightSubmenu),o.hasConfigured(Md)&&Md.isDisabled(o))return I.some(o);var a=u(o);return r.expand(a).bind(function(u){return l(n,u),I.from(u[0]).bind(function(a){return r.lookupMenu(a).bind(function(c){var s=function(t,n,e){if("notbuilt"===e.type){var o=t.getSystem().build(e.nbMenu());return r.setMenuBuilt(n,o),o}return e.menu}(n,a,c);return Bn(s.element)||jg.append(n,Wu(s)),t.onOpenSubmenu(n,o,s,nt(u)),i===e.HighlightSubmenu?(jd.highlightFirst(s),d(n,r,u)):(jd.dehighlightAll(s),I.some(o))})})})},g=function(n,e){var o=u(e);return r.collapse(o).bind(function(o){return l(n,o),d(n,r,o).map(function(o){return t.onCollapseMenu(n,e,o),o})})},h=function(n){return function(e,o){return Zu(o.getSource(),"."+t.markers.item).bind(function(t){return e.getSystem().getByDom(t).toOptional().bind(function(t){return n(e,t).map(C)})})}},v=Oi([Ei(Sp(),function(t,n){var e=n.event.item;r.lookupItem(u(e)).each(function(){var e=n.event.menu;jd.highlight(t,e);var o=u(n.event.item);r.refresh(o).each(function(n){return f(t,r,n)})})}),Vi(function(n,o){var r=o.event.target;n.getSystem().getByDom(r).each(function(o){0===u(o).indexOf("collapse-item")&&g(n,o),m(n,o,e.HighlightSubmenu).fold(function(){t.onExecute(n,o)},p)})}),Ri(function(n,e){i(n).each(function(e){jg.append(n,Wu(e)),t.onOpenMenu(n,e),t.highlightImmediately&&c(n,e)})})].concat(t.navigateOnHover?[Ei(dp(),function(n,o){var i=o.event.item;!function(t,n){var e=u(n);r.refresh(e).bind(function(n){return l(t,n),d(t,r,n)})}(n,i),m(n,i,e.HighlightParent),t.onHover(n,i)})]:[])),b=function(t){return jd.getHighlighted(t).bind(jd.getHighlighted)},y={collapseMenu:function(t){b(t).each(function(n){g(t,n)})},highlightPrimary:function(t){r.getPrimary().each(function(n){c(t,n)})},repositionMenus:function(n){r.getPrimary().bind(function(t){return b(n).bind(function(t){var n=u(t),e=yt(r.getMenus()),o=Ct(W(e,Tp.extractPreparedMenu));return r.getTriggeringPath(n,function(t){return n=t,ft(o,function(t){if(!t.getSystem().isConnected())return I.none();var e=jd.getCandidates(t);return J(e,function(t){return u(t)===n})});var n})}).map(function(n){return{primary:t,triggeringPath:n}})}).fold(function(){(function(t){return I.from(t.components()[0]).filter(function(t){return"menu"===Pn(t.element,"role")})})(n).each(function(e){t.onRepositionMenu(n,e,[])})},function(e){var o=e.primary,r=e.triggeringPath;t.onRepositionMenu(n,o,r)})}};return{uid:t.uid,dom:t.dom,markers:t.markers,behaviours:ml(t.tmenuBehaviours,[Vg.config({mode:"special",onRight:h(function(t,n){return pd(n.element)?I.none():m(t,n,e.HighlightSubmenu)}),onLeft:h(function(t,n){return pd(n.element)?I.none():g(t,n)}),onEscape:h(function(n,e){return g(n,e).orThunk(function(){return t.onEscape(n,e).map(function(){return n})})}),focusIn:function(t,n){r.getPrimary().each(function(n){Si(t,n.element,Zr())})}}),jd.config({highlightClass:t.markers.selectedMenu,itemClass:t.markers.menu}),bd.config({find:function(t){return jd.getHighlighted(t)}}),jg.config({})]),eventOrder:t.eventOrder,apis:y,events:v}},extraApis:{tieredData:function(t,n,e){return{primary:t,menus:n,expansions:e}},singleData:function(t,n){return{primary:t,menus:pr(t,n),expansions:{}}},collapseItem:function(t){return{value:qi(Ep()),meta:{text:t}}}}}),Ap=md({name:"InlineView",configFields:[zo("lazySink"),pa("onShow"),pa("onHide"),Zo("onEscape"),ll("inlineBehaviours",[Wf,fl,mc]),nr("fireDismissalEventInstead",[er("event",li())]),nr("fireRepositionEventInstead",[er("event",di())]),er("getRelated",I.none),er("isExtraPart",k),er("eventOrder",I.none)],factory:function(t,n){var e=function(t,n,e,r){o(t,n,e,function(){return r.map(function(t){return Ae(t)})})},o=function(n,e,o,r){var i=t.lazySink(n).getOrDie();Wf.openWhileCloaked(n,e,function(){return Sf.positionWithinBounds(i,n,o,r())}),fl.setValue(n,I.some({mode:"position",config:o,getBounds:r}))},r=function(n,e,o,r){var i=function(t,n,e,o,r){var i=function(){return t.lazySink(n)}
95,u="horizontal"===o.type?{layouts:{onLtr:function(){return Za()},onRtl:function(){return tc()}}}:{},a=function(t){return function(t){return 2===t.length}(t)?u:{}};return Dp.sketch({dom:{tag:"div"},data:o.data,markers:o.menu.markers,highlightImmediately:o.menu.highlightImmediately,onEscape:function(){return Wf.close(n),t.onEscape.map(function(t){return t(n)}),I.some(!0)},onExecute:function(){return I.some(!0)},onOpenMenu:function(t,n){Sf.positionWithinBounds(i().getOrDie(),n,e,r())},onOpenSubmenu:function(t,n,e,o){var r=i().getOrDie();Sf.position(r,e,{anchor:_({type:"submenu",item:n},a(o))})},onRepositionMenu:function(t,n,o){var u=i().getOrDie();Sf.positionWithinBounds(u,n,e,r()),G(o,function(t){var n=a(t.triggeringPath);Sf.position(u,t.triggeredMenu,{anchor:_({type:"submenu",item:t.triggeringItem},n)})})}})}(t,n,e,o,r);Wf.open(n,i),fl.setValue(n,I.some({mode:"menu",menu:i}))},i=function(n){Wf.isOpen(n)&&fl.getValue(n).each(function(e){switch(e.mode){case"menu":Wf.getState(n).each(Dp.repositionMenus);break;case"position":var o=t.lazySink(n).getOrDie();Sf.positionWithinBounds(o,n,e.config,e.getBounds())}})},u={setContent:function(t,n){Wf.setContent(t,n)},showAt:function(t,n,o){e(t,n,o,I.none())},showWithin:e,showWithinBounds:o,showMenuAt:function(t,n,e){r(t,n,e,I.none)},showMenuWithinBounds:r,hide:function(t){Wf.isOpen(t)&&(fl.setValue(t,I.none()),Wf.close(t))},getContent:function(t){return Wf.getState(t)},reposition:i,isOpen:Wf.isOpen};return{uid:t.uid,dom:t.dom,behaviours:ml(t.inlineBehaviours,[Wf.config({isPartOf:function(n,e,o){return ea(e,o)||function(n,e){return t.getRelated(n).exists(function(t){return ea(t,e)})}(n,o)},getAttachPoint:function(n){return t.lazySink(n).getOrDie()},onOpen:function(n){t.onShow(n)},onClose:function(n){t.onHide(n)}}),fl.config({store:{mode:"memory",initialValue:I.none()}}),mc.config({channels:_(_({},Kf(_({isExtraPart:n.isExtraPart},t.fireDismissalEventInstead.map(function(t){return{fireEventInstead:{event:t.event}}}).getOr({})))),$f(_(_({},t.fireRepositionEventInstead.map(function(t){return{fireEventInstead:{event:t.event}}}).getOr({})),{doReposition:i})))})]),eventOrder:t.eventOrder,apis:u}},apis:{showAt:function(t,n,e,o){t.showAt(n,e,o)},showWithin:function(t,n,e,o,r){t.showWithin(n,e,o,r)},showWithinBounds:function(t,n,e,o,r){t.showWithinBounds(n,e,o,r)},showMenuAt:function(t,n,e,o){t.showMenuAt(n,e,o)},showMenuWithinBounds:function(t,n,e,o,r){t.showMenuWithinBounds(n,e,o,r)},hide:function(t,n){t.hide(n)},isOpen:function(t,n){return t.isOpen(n)},getContent:function(t,n){return t.getContent(n)},setContent:function(t,n,e){t.setContent(n,e)},reposition:function(t,n){t.reposition(n)}}}),Bp=function(t){return t.x},Mp=function(t,n){return t.x+t.width/2-n.width/2},Fp=function(t,n){return t.x+t.width-n.width},Ip=function(t){return t.y},Rp=function(t,n){return t.y+t.height-n.height},Np=function(t,n){return t.y+t.height/2-n.height/2},Pp=function(t,n,e){return Sa(Fp(t,n),Rp(t,n),e.insetSouthwest(),Ta(),"southwest",Ia(t,{right:0,bottom:3}),"layout-inset")},Vp=function(t,n,e){return Sa(Bp(t),Rp(t,n),e.insetSoutheast(),_a(),"southeast",Ia(t,{left:1,bottom:3}),"layout-inset")},Hp=function(t,n,e){return Sa(Fp(t,n),Ip(t),e.insetNorthwest(),Oa(),"northwest",Ia(t,{right:0,top:2}),"layout-inset")},Lp=function(t,n,e){return Sa(Bp(t),Ip(t),e.insetNortheast(),Ca(),"northeast",Ia(t,{left:1,top:2}),"layout-inset")},zp=function(t,n,e){return Sa(Mp(t,n),Ip(t),e.insetNorth(),Ea(),"north",Ia(t,{top:2}),"layout-inset")},Up=function(t,n,e){return Sa(Mp(t,n),Rp(t,n),e.insetSouth(),Da(),"south",Ia(t,{bottom:3}),"layout-inset")},jp=function(t,n,e){return Sa(Fp(t,n),Np(t,n),e.insetEast(),Ba(),"east",Ia(t,{right:0}),"layout-inset")},Wp=function(t,n,e){return Sa(Bp(t),Np(t,n),e.insetWest(),Aa(),"west",Ia(t,{left:1}),"layout-inset")},Gp=function(t){switch(t){case"north":return zp;case"northeast":return Lp;case"northwest":return Hp;case"south":return Up;case"southeast":return Vp;case"southwest":return Pp;case"east":return jp;case"west":return Wp}},Xp=function(t,n,e,o,r){return Mc(o).map(Gp).getOr(zp)(t,n,e,o,r)},qp=function(t){switch(t){case"north":return Up;case"northeast":return Vp;case"northwest":return Pp;case"south":return zp;case"southeast":return Lp;case"southwest":return Hp;case"east":return Wp;case"west":return jp}},Yp=function(t,n,e,o,r){return Mc(o).map(qp).getOr(zp)(t,n,e,o,r)},Kp=tinymce.util.Tools.resolve("tinymce.util.Delay"),Jp=md({name:"Button",factory:function(t){var n=sp(t.action),e=t.dom.tag,o=function(n){return xt(t.dom,"attributes").bind(function(t){return xt(t,n)})};return{uid:t.uid,dom:t.dom,components:t.components,events:n,behaviours:pl(t.buttonBehaviours,[Kg.config({}
95),Vg.config({mode:"execution",useSpace:!0,useEnter:!0})]),domModification:{attributes:function(){if("button"===e){var t=o("type").getOr("button"),n=o("role").map(function(t){return{role:t}}).getOr({});return _({type:t},n)}return{role:o("role").getOr("button")}}()},eventOrder:t.eventOrder}},configFields:[er("uid",void 0),zo("dom"),er("components",[]),gl("buttonBehaviours",[Kg,Vg]),Ko("action"),Ko("role"),er("eventOrder",{})]}),$p=function(t){var n=Rt.fromHtml(t),e=yn(n),o=function(t){var n=void 0!==t.dom.attributes?t.dom.attributes:[];return K(n,function(t,n){var e;return"class"===n.name?t:_(_({},t),((e={})[n.name]=n.value,e))},{})}(n),r=function(t){return Array.prototype.slice.call(t.dom.classList,0)}(n),i=0===e.length?{}:{innerHtml:Hi(n)};return _({tag:Pt(n),classes:r,attributes:o},i)},Qp=function(t){var n=function(t){return void 0!==t.uid}(t)&&St(t,"uid")?t.uid:tu("memento");return{get:function(t){return t.getSystem().getByUid(n).getOrDie()},getOpt:function(t){return t.getSystem().getByUid(n).toOptional()},asSpec:function(){return _(_({},t),{uid:n})}}};function Zp(t){return(Zp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function th(t,n){return(th=Object.setPrototypeOf||function(t,n){return t.__proto__=n,t})(t,n)}function nh(t,n,e){return(nh=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}()?Reflect.construct:function(t,n,e){var o=[null];o.push.apply(o,n);var r=new(Function.bind.apply(t,o));return e&&th(r,e.prototype),r}).apply(null,arguments)}function eh(t){return function(t){if(Array.isArray(t))return oh(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,n){if(!t)return;if("string"==typeof t)return oh(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);"Object"===e&&t.constructor&&(e=t.constructor.name);if("Map"===e||"Set"===e)return Array.from(t);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return oh(t,n)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function oh(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,o=new Array(n);e<n;e++)o[e]=t[e];return o}var rh=Object.hasOwnProperty,ih=Object.setPrototypeOf,uh=Object.isFrozen,ah=Object.getPrototypeOf,ch=Object.getOwnPropertyDescriptor,sh=Object.freeze,fh=Object.seal,lh=Object.create,dh="undefined"!=typeof Reflect&&Reflect,mh=dh.apply,gh=dh.construct;mh||(mh=function(t,n,e){return t.apply(n,e)}),sh||(sh=function(t){return t}),fh||(fh=function(t){return t}),gh||(gh=function(t,n){return nh(t,eh(n))});var ph,hh=_h(Array.prototype.forEach),vh=_h(Array.prototype.pop),bh=_h(Array.prototype.push),yh=_h(String.prototype.toLowerCase),xh=_h(String.prototype.match),wh=_h(String.prototype.replace),Sh=_h(String.prototype.indexOf),kh=_h(String.prototype.trim),Ch=_h(RegExp.prototype.test),Oh=(ph=TypeError,function(){for(var t=arguments.length,n=new Array(t),e=0;e<t;e++)n[e]=arguments[e];return gh(ph,n)});function _h(t){return function(n){for(var e=arguments.length,o=new Array(e>1?e-1:0),r=1;r<e;r++)o[r-1]=arguments[r];return mh(t,n,o)}}function Th(t,n){ih&&ih(t,null);for(var e=n.length;e--;){var o=n[e];if("string"==typeof o){var r=yh(o);r!==o&&(uh(n)||(n[e]=r),o=r)}t[o]=!0}return t}function Eh(t){var n,e=lh(null);for(n in t)mh(rh,t,[n])&&(e[n]=t[n]);return e}function Dh(t,n){for(;null!==t;){var e=ch(t,n);if(e){if(e.get)return _h(e.get);if("function"==typeof e.value)return _h(e.value)}t=ah(t)}return function(t){return console.warn("fallback value for",t),null}}var Ah=sh(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Bh=sh(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Mh=sh(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Fh=sh(["animate","color-profile","cursor","discard","fedropshadow","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Ih=sh(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),Rh=sh(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Nh=sh(["#text"]),Ph=sh(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","
95spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),Vh=sh(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Hh=sh(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Lh=sh(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),zh=fh(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Uh=fh(/<%[\w\W]*|[\w\W]*%>/gm),jh=fh(/^data-[\-\w.\u00B7-\uFFFF]/),Wh=fh(/^aria-[\-\w]+$/),Gh=fh(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Xh=fh(/^(?:\w+script|data):/i),qh=fh(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Yh=fh(/^html$/i),Kh=function(){return"undefined"==typeof window?null:window},Jh=function(t,n){if("object"!==Zp(t)||"function"!=typeof t.createPolicy)return null;var e=null;n.currentScript&&n.currentScript.hasAttribute("data-tt-policy-suffix")&&(e=n.currentScript.getAttribute("data-tt-policy-suffix"));var o="dompurify"+(e?"#"+e:"");try{return t.createPolicy(o,{createHTML:function(t){return t}})}catch(r){return console.warn("TrustedTypes policy "+o+" could not be created."),null}};var $h=function t(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Kh(),e=function(n){return t(n)};if(e.version="2.3.8",e.removed=[],!n||!n.document||9!==n.document.nodeType)return e.isSupported=!1,e;var o=n.document,r=n.document,i=n.DocumentFragment,u=n.HTMLTemplateElement,a=n.Node,c=n.Element,s=n.NodeFilter,f=n.NamedNodeMap,l=void 0===f?n.NamedNodeMap||n.MozNamedAttrMap:f,d=n.HTMLFormElement,m=n.DOMParser,g=n.trustedTypes,p=c.prototype,h=Dh(p,"cloneNode"),v=Dh(p,"nextSibling"),b=Dh(p,"childNodes"),y=Dh(p,"parentNode");if("function"==typeof u){var x=r.createElement("template");x.content&&x.content.ownerDocument&&(r=x.content.ownerDocument)}var w=Jh(g,o),S=w?w.createHTML(""):"",k=r,C=k.implementation,O=k.createNodeIterator,_=k.createDocumentFragment,T=k.getElementsByTagName,E=o.importNode,D={};try{D=Eh(r).documentMode?r.documentMode:{}}catch(Ht){}var A={};e.isSupported="function"==typeof y&&C&&void 0!==C.createHTMLDocument&&9!==D;var B,M,F=zh,I=Uh,R=jh,N=Wh,P=Xh,V=qh,H=Gh,L=null,z=Th({},[].concat(eh(Ah),eh(Bh),eh(Mh),eh(Ih),eh(Nh))),U=null,j=Th({},[].concat(eh(Ph),eh(Vh),eh(Hh),eh(Lh))),W=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}}
vendor: 10,677 bytes, line 95
95)),G=null,X=null,q=!0,Y=!0,K=!1,J=!1,$=!1,Q=!1,Z=!1,tt=!1,nt=!1,et=!1,ot=!0,rt=!0,it=!1,ut={},at=null,ct=Th({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),st=null,ft=Th({},["audio","video","img","source","image","track"]),lt=null,dt=Th({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),mt="http://www.w3.org/1998/Math/MathML",gt="http://www.w3.org/2000/svg",pt="http://www.w3.org/1999/xhtml",ht=pt,vt=!1,bt=["application/xhtml+xml","text/html"],yt=null,xt=r.createElement("form"),wt=function(t){return t instanceof RegExp||t instanceof Function},St=function(t){yt&&yt===t||(t&&"object"===Zp(t)||(t={}),t=Eh(t),L="ALLOWED_TAGS"in t?Th({},t.ALLOWED_TAGS):z,U="ALLOWED_ATTR"in t?Th({},t.ALLOWED_ATTR):j,lt="ADD_URI_SAFE_ATTR"in t?Th(Eh(dt),t.ADD_URI_SAFE_ATTR):dt,st="ADD_DATA_URI_TAGS"in t?Th(Eh(ft),t.ADD_DATA_URI_TAGS):ft,at="FORBID_CONTENTS"in t?Th({},t.FORBID_CONTENTS):ct,G="FORBID_TAGS"in t?Th({},t.FORBID_TAGS):{},X="FORBID_ATTR"in t?Th({},t.FORBID_ATTR):{},ut="USE_PROFILES"in t&&t.USE_PROFILES,q=!1!==t.ALLOW_ARIA_ATTR,Y=!1!==t.ALLOW_DATA_ATTR,K=t.ALLOW_UNKNOWN_PROTOCOLS||!1,J=t.SAFE_FOR_TEMPLATES||!1,$=t.WHOLE_DOCUMENT||!1,tt=t.RETURN_DOM||!1,nt=t.RETURN_DOM_FRAGMENT||!1,et=t.RETURN_TRUSTED_TYPE||!1,Z=t.FORCE_BODY||!1,ot=!1!==t.SANITIZE_DOM,rt=!1!==t.KEEP_CONTENT,it=t.IN_PLACE||!1,H=t.ALLOWED_URI_REGEXP||H,ht=t.NAMESPACE||pt,t.CUSTOM_ELEMENT_HANDLING&&wt(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(W.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&wt(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(W.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(W.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),B=B=-1===bt.indexOf(t.PARSER_MEDIA_TYPE)?"text/html":t.PARSER_MEDIA_TYPE,M="application/xhtml+xml"===B?function(t){return t}:yh,J&&(Y=!1),nt&&(tt=!0),ut&&(L=Th({},eh(Nh)),U=[],!0===ut.html&&(Th(L,Ah),Th(U,Ph)),!0===ut.svg&&(Th(L,Bh),Th(U,Vh),Th(U,Lh)),!0===ut.svgFilters&&(Th(L,Mh),Th(U,Vh),Th(U,Lh)),!0===ut.mathMl&&(Th(L,Ih),Th(U,Hh),Th(U,Lh))),t.ADD_TAGS&&(L===z&&(L=Eh(L)),Th(L,t.ADD_TAGS)),t.ADD_ATTR&&(U===j&&(U=Eh(U)),Th(U,t.ADD_ATTR)),t.ADD_URI_SAFE_ATTR&&Th(lt,t.ADD_URI_SAFE_ATTR),t.FORBID_CONTENTS&&(at===ct&&(at=Eh(at)),Th(at,t.FORBID_CONTENTS)),rt&&(L["#text"]=!0),$&&Th(L,["html","head","body"]),L.table&&(Th(L,["tbody"]),delete G.tbody),sh&&sh(t),yt=t)},kt=Th({},["mi","mo","mn","ms","mtext"]),Ct=Th({},["foreignobject","desc","title","annotation-xml"]),Ot=Th({},["title","style","font","a","script"]),_t=Th({},Bh);Th(_t,Mh),Th(_t,Fh);var Tt=Th({},Ih);Th(Tt,Rh);var Et=function(t){bh(e.removed,{element:t});try{t.parentNode.removeChild(t)}catch(Ht){try{t.outerHTML=S}catch(Ht){t.remove()}}},Dt=function(t,n){try{bh(e.removed,{attribute:n.getAttributeNode(t),from:n})}catch(Ht){bh(e.removed,{attribute:null,from:n})}if(n.removeAttribute(t),"is"===t&&!U[t])if(tt||nt)try{Et(n)}catch(Ht){}else try{n.setAttribute(t,"")}catch(Ht){}},At=function(t){var n,e;if(Z)t="<remove></remove>"+t;else{var o=xh(t,/^[\r\n\t ]+/);e=o&&o[0]}"application/xhtml+xml"===B&&(t='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+t+"</body></html>");var i=w?w.createHTML(t):t;if(ht===pt)try{n=(new m).parseFromString(i,B)}catch(Ht){}if(!n||!n.documentElement){n=C.createDocument(ht,"template",null);try{n.documentElement.innerHTML=vt?"":i}catch(Ht){}}var u=n.body||n.documentElement;return t&&e&&u.insertBefore(r.createTextNode(e),u.childNodes[0]||null),ht===pt?T.call(n,$?"html":"body")[0]:$?n.documentElement:u},Bt=function(t){return O.call(t.ownerDocument||t,t,s.SHOW_ELEMENT|s.SHOW_COMMENT|s.SHOW_TEXT,null,!1)},Mt=function(t){return"object"===Zp(a)?t instanceof a:t&&"object"===Zp(t)&&"number"==typeof t.nodeType&&"string"==typeof t.nodeName},Ft=function(t,n,o){A[t]&&hh(A[t],function(t){t.call(e,n,o,yt)})},It=function(t){var n,o;if(Ft("beforeSanitizeElements",t,null),(o=t)instanceof d&&("string"!=typeof o.nodeName||"string"!=typeof o.textContent||"function"!=typeof o.removeChild||!(o.attributes instanceof l)||"function"!=typeof o.removeAttribute||"function"!=typeof o.setAttribute||"string"!=typeof o.namespaceURI||"function"!=typeof o.insertBefore))return Et(t),!0;if(Ch(/[\u0080-\uFFFF]/,t.nodeName))return Et(t),!0;var r=M(t.nodeName);if(Ft("uponSanitizeElement",t,{tagName:r,allowedTags:L}),t.hasChildNodes()&&!Mt(t.firstElementChild)&&(!Mt(t.content)||!Mt(t.content.firstElementChild))&&Ch(/<[/\w]/g,t.innerHTML)&&Ch(/<[/\w]/g,t.textContent))return Et(t),!0;if("select"===r&&Ch(/<template/i,t.innerHTML))return Et(t),!0;if(!L[r]||G[r]){if(!G[r]&&Nt(r)){if(W.tagNameCheck instanceof RegExp&&Ch(W.tagNameCheck,r))return!1;if(W.tagNameCheck instanceof Function&&W.tagNameCheck(r))return!1}if(rt&&!at[r]){var i=y(t)||t.parentNode,u=b(t)||t.childNodes;if(u&&i)for(var a=u.length-1;a>=0;--a)i.insertBefore(h(u[a],!0),v(t))}return Et(t),!0}return t instanceof c&&!function(t){var n=y(t);n&&n.tagName||(n={namespaceURI:pt,tagName:"template"});var e=yh(t.tagName),o=yh(n.tagName);return t.namespaceURI===gt?n.namespaceURI===pt?"svg"===e:n.namespaceURI===mt?"svg"===e&&("annotation-xml"===o||kt[o]):Boolean(_t[e]):t.namespaceURI===mt?n.namespaceURI===pt?"math"===e:n.namespaceURI===gt?"math"===e&&Ct[o]:Boolean(Tt[e]):t.namespaceURI===pt&&!(n.namespaceURI===gt&&!Ct[o])&&!(n.namespaceURI===mt&&!kt[o])&&!Tt[e]&&(Ot[e]||!_t[e])}(t)?(Et(t),!0):"noscript"!==r&&"noembed"!==r||!Ch(/<\/no(script|embed)/i,t.innerHTML)?(J&&3===t.nodeType&&(n=t.textContent,n=wh(n,F," "),n=wh(n,I," "),t.textContent!==n&&(bh(e.removed,{element:t.cloneNode()}),t.textContent=n)),Ft("afterSanitizeElements",t,null),!1):(Et(t),!0)},Rt=function(t,n,e){if(ot&&("id"===n||"name"===n)&&(e in r||e in xt))return!1;if(Y&&!X[n]&&Ch(R,n));else if(q&&Ch(N,n));else if(!U[n]||X[n]){if(!(Nt(t)&&(W.tagNameCheck instanceof RegExp&&Ch(W.tagNameCheck,t)||W.tagNameCheck instanceof Function&&W.tagNameCheck(t))&&(W.attributeNameCheck instanceof RegExp&&Ch(W.attributeNameCheck,n)||W.attributeNameCheck instanceof Function&&W.attributeNameCheck(n))||"is"===n&&W.allowCustomizedBuiltInElements&&(W.tagNameCheck instanceof RegExp&&Ch(W.tagNameCheck,e)||W.tagNameCheck instanceof Function&&W.tagNameCheck(e))))return!1}else if(lt[n]);else if(Ch(H,wh(e,V,"")));else if("src"!==n&&"xlink:href"!==n&&"href"!==n||"script"===t||0!==Sh(e,"data:")||!st[t])if(K&&!Ch(P,wh(e,V,"")));else if(e)return!1;return!0},Nt=function(t){return t.indexOf("-")>0},Pt=function(t){var n,o,r,i;Ft("beforeSanitizeAttributes",t,null);var u=t.attributes;if(u){var a={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:U};for(i=u.length;i--;){var c=n=u[i],s=c.name,f=c.namespaceURI;if(o="value"===s?n.value:kh(n.value),r=M(s),a.attrName=r,a.attrValue=o,a.keepAttr=!0,a.forceKeepAttr=void 0,Ft("uponSanitizeAttribute",t,a),o=a.attrValue,!a.forceKeepAttr&&(Dt(s,t),a.keepAttr))if(Ch(/\/>/i,o))Dt(s,t);else{J&&(o=wh(o,F," "),o=wh(o,I," "));var l=M(t.nodeName);if(Rt(l,r,o))try{f?t.setAttributeNS(f,s,o):t.setAttribute(s,o),vh(e.removed)}catch(Ht){}}}Ft("afterSanitizeAttributes",t,null)}},Vt=function t(n){var e,o=Bt(n);for(Ft("beforeSanitizeShadowDOM",n,null);e=o.nextNode();)Ft("uponSanitizeShadowNode",e,null),It(e)||(e.content instanceof i&&t(e.content),Pt(e));Ft("afterSanitizeShadowDOM",n,null)};return e.sanitize=function(t,r){var u,c,s,f,l;if((vt=!t)&&(t="\x3c!--\x3e"),"string"!=typeof t&&!Mt(t)){if("function"!=typeof t.toString)throw Oh("toString is not a function");if("string"!=typeof(t=t.toString()))throw Oh("dirty is not a string, aborting")}if(!e.isSupported){if("object"===Zp(n.toStaticHTML)||"function"==typeof n.toStaticHTML){if("string"==typeof t)return n.toStaticHTML(t);if(Mt(t))return n.toStaticHTML(t.outerHTML)}return t}if(Q||St(r),e.removed=[],"string"==typeof t&&(it=!1),it){if(t.nodeName){var d=M(t.nodeName);if(!L[d]||G[d])throw Oh("root node is forbidden and cannot be sanitized in-place")}}else if(t instanceof a)1===(c=(u=At("\x3c!----\x3e")).ownerDocument.importNode(t,!0)).nodeType&&"BODY"===c.nodeName?u=c:"HTML"===c.nodeName?u=c:u.appendChild(c);else{if(!tt&&!J&&!$&&-1===t.indexOf("<"))return w&&et?w.createHTML(t):t;if(!(u=At(t)))return tt?null:et?S:""}u&&Z&&Et(u.firstChild);for(var m=Bt(it?t:u);s=m.nextNode();)3===s.nodeType&&s===f||It(s)||(s.content instanceof i&&Vt(s.content),Pt(s),f=s);if(f=null,it)return t;if(tt){if(nt)for(l=_.call(u.ownerDocument);u.firstChild;)l.appendChild(u.firstChild);else l=u;return U.shadowroot&&(l=E.call(o,l,!0)),l}var g=$?u.outerHTML:u.innerHTML;return $&&L["!doctype"]&&u.ownerDocument&&u.ownerDocument.doctype&&u.ownerDocument.doctype.name&&Ch(Yh,u.ownerDocument.doctype.name)&&(g="<!DOCTYPE "+u.ownerDocument.doctype.name+">\n"+g),J&&(g=wh(g,F," "),g=wh(g,I," ")),w&&et?w.createHTML(g):g},e.setConfig=function(t){St(t),Q=!0},e.clearConfig=function(){yt=null,Q=!1},e.isValidAttribute=function(t,n,e){yt||St({});var o=M(t),r=M(n);return Rt(o,r,e)},e.addHook=function(t,n){"function"==typeof n&&(A[t]=A[t]||[],bh(A[t],n))},e.removeHook=function(t){if(A[t])return vh(A[t])},e.removeHooks=function(t){A[t]&&(A[t]=[])},e.removeAllHooks=function(){A={}},e}(),Qh=function(t){return $h().sanitize(t)},Zh=tinymce.util.Tools.resolve("tinymce.util.I18n"),tv={indent:!0,outdent:!0,"table-insert-column-after":!0,"table-insert-column-before":!0,"paste-column-after":!0,"paste-column-before":!0,"unordered-list":!0,"list-bull-circle":!0,"list-bull-default":!0,"list-bull-square":!0},nv=function(t){return function(){return xt(t,"temporary-placeholder").getOr("!not found!")}},ev=function(t,n){var e,o,r=t.toLowerCase();if(Zh.isRtl()){var i=At(e=r,o="-rtl")?e:function(t,n){return t+n}(e,o);return wt(n,i)?i:r}return r},ov=function(t,n){return xt(n,ev(t,n))},rv=function(t,n){var e=n();return ov(t,e).getOrThunk(nv(e))},iv=function(){return Wg("add-focusable",[Ri(function(t){$u(t.element,"svg").each(function(t){return Rn(t,"focusable","false")})})])},uv=function(t,n,e,o){var r,i,u=function(t){return!!Zh.isRtl()&&wt(tv,t)}(n)?["tox-icon--flip"]:[],a=xt(e,ev(n,e)).or(o).getOrThunk(nv(e));return{dom:{tag:t.tag,attributes:null!==(r=t.attributes)&&void 0!==r?r:{},classes:t.classes.concat(u),innerHtml:a},behaviours:ac(E(E([],null!==(i=t.behaviours)&&void 0!==i?i:[],!0),[iv()],!1))}},av=function(t,n,e,o){return void 0===o&&(o=I.none()),uv(n,t,e(),o)},cv={success:"checkmark",error:"warning",err:"error",warning:"warning",w
95arn:"warning",info:"info"},sv=md({name:"Notification",factory:function(t){var n,e,o,r,i,u=Qp({dom:$p("<p>"+Qh(t.translationProvider(t.text))+"</p>"),behaviours:ac([jg.config({})])}),a=function(t){return{dom:{tag:"div",classes:["tox-bar"],attributes:{style:"width: "+t+"%"}}}},c=function(t){return{dom:{tag:"div",classes:["tox-text"],innerHtml:t+"%"}}},s=Qp({dom:{tag:"div",classes:t.progress?["tox-progress-bar","tox-progress-indicator"]:["tox-progress-bar"]},components:[{dom:{tag:"div",classes:["tox-bar-container"]},components:[a(0)]},c(0)],behaviours:ac([jg.config({})])}),f={updateProgress:function(t,n){t.getSystem().isConnected()&&s.getOpt(t).each(function(t){jg.set(t,[{dom:{tag:"div",classes:["tox-bar-container"]},components:[a(n)]},c(n)])})},updateText:function(t,n){if(t.getSystem().isConnected()){var e=u.get(t);jg.set(e,[Lu(n)])}}},l=Q([t.icon.toArray(),t.level.toArray(),t.level.bind(function(t){return I.from(cv[t])}).toArray()]),d=Qp(Jp.sketch({dom:{tag:"button",classes:["tox-notification__dismiss","tox-button","tox-button--naked","tox-button--icon"]},components:[av("close",{tag:"div",classes:["tox-icon"],attributes:{"aria-label":t.translationProvider("Close")}},t.iconProvider)],action:function(n){t.onAction(n)}})),m=[(n=l,e={tag:"div",classes:["tox-notification__icon"]},o=t.iconProvider,r=o(),i=J(n,function(t){return wt(r,ev(t,r))}),uv(e,i.getOr("temporary-placeholder"),r,I.none())),{dom:{tag:"div",classes:["tox-notification__body"]},components:[u.asSpec()],behaviours:ac([jg.config({})])}];return{uid:t.uid,dom:{tag:"div",attributes:{role:"alert"},classes:t.level.map(function(t){return["tox-notification","tox-notification--in","tox-notification--"+t]}).getOr(["tox-notification","tox-notification--in"])},behaviours:ac([Kg.config({}),Wg("notification-events",[Ei(Rr(),function(t){d.getOpt(t).each(Kg.focus)})])]),components:m.concat(t.progress?[s.asSpec()]:[]).concat(t.closeButton?[d.asSpec()]:[]),apis:f}},configFields:[Ko("level"),zo("progress"),zo("icon"),zo("onAction"),zo("text"),zo("iconProvider"),zo("translationProvider"),ar("closeButton",!0)],apis:{updateProgress:function(t,n,e){t.updateProgress(n,e)},updateText:function(t,n,e){t.updateText(n,e)}}});function fv(t,n,e){var o=n.backstage.shared;return{open:function(n,r){var i=!n.closeButton&&n.timeout&&(n.timeout>0||n.timeout<0),u=function(){r(),Ap.hide(c)},a=ju(sv.sketch({text:n.text,level:L(["success","error","warning","warn","info"],n.type)?n.type:void 0,progress:!0===n.progressBar,icon:I.from(n.icon),closeButton:!i,onAction:u,iconProvider:o.providers.icons,translationProvider:o.providers.translate})),c=ju(Ap.sketch(_({dom:{tag:"div",classes:["tox-notifications-container"]},lazySink:o.getSink,fireDismissalEventInstead:{}},o.header.isPositionedAtTop()?{}:{fireRepositionEventInstead:{}})));e.add(c),n.timeout>0&&Kp.setTimeout(function(){u()},n.timeout);var s=function(){var n=Ae(Rt.fromDom(t.getContentAreaContainer())),e=Me(),o=Fa(e.x,n.x,n.right),r=Fa(e.y,n.y,n.bottom),i=Math.max(n.right,e.right),u=Math.max(n.bottom,e.bottom);return I.some(De(o,r,i-o,u-r))};return{close:u,moveTo:function(t,n){Ap.showAt(c,Wu(a),{anchor:{type:"makeshift",x:t,y:n}})},moveRel:function(t,n){var e=Wu(a),r={maxHeightFunction:Zc()};if("banner"!==n&&l(t)){var i=function(t){switch(t){case"bc-bc":return Up;case"tc-tc":return zp;case"tc-bc":return Ga;case"bc-tc":default:return Xa}}(n),u={type:"node",root:Mn(),node:I.some(Rt.fromDom(t)),overrides:r,layouts:{onRtl:function(){return[i]},onLtr:function(){return[i]}}};Ap.showWithinBounds(c,e,{anchor:u},s)}else{var f=_(_({},o.anchors.banner()),{overrides:r});Ap.showWithinBounds(c,e,{anchor:f},s)}},text:function(t){sv.updateText(a,t)},settings:n,getEl:function(){return a.element.dom},progressBar:{value:function(t){sv.updateProgress(a,t)}}}},close:function(t){t.close()},reposition:function(t){t.length>0&&G(t,function(n,e){0===e?n.moveRel(null,"banner"):n.moveRel(t[e-1].getEl(),"bc-tc")})},getArgs:function(t){return t.settings}}}var lv,dv=function(t,n){var e=null,o=function(){a(e)||(clearTimeout(e),e=null)};return{cancel:o,throttle:function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];o(),e=setTimeout(function(){e=null,t.apply(null,r)},n)}}},mv=tinymce.util.Tools.resolve("tinymce.dom.TextSeeker"),gv=function(t,n,e,o,r){var i=mv(t,function(n){return function(t,n){return t.isBlock(n)||L(["BR","IMG","HR","INPUT"],n.nodeName)||"false"===t.getContentEditable(n)}(t,n)});return I.from(i.backwards(n,e,o,r))},pv=function(t,n){return hv(Rt.fromDom(t.selection.getNode())).getOrThunk(function(){var e,o=Rt.fromHtml('<span data-mce-autocompleter="1" data-mce-bogus="1"></span>',t.getDoc());return ve(o,Rt.fromDom(n.extractContents())),n.insertNode(o.dom),vn(o).each(function(t){return t.dom.normalize()}),(e=o,Us(e,zs)).map(function(n){var e;t.selection.setCursorLocation(n.dom,"img"===Pt(e=n)?1:Hs(e).fold(function(){return yn(e).length},function(t){return t.length}))}),o})},hv=function(t){return Zu(t,"[data-mce-autocompleter]")},vv=function(t){return t.toString().replace(/\u00A0/g," ").replace(/\uFEFF/g,"")},bv=function(t){return""!==t&&-1!=="  \f\n\r\t\v".indexOf(t)},yv=function(t,n){return t.substring(n.length)},xv=function(t,n,e,o){if(void 0===o&&(o=0),!(r=n).collapsed||3!==r.startContainer.nodeType)return I.none();var r,i=t.getParent(n.startContainer,t.isBlock)||t.getRoot();return gv(t,n.startContainer,n.startOffset,function(t,n,o){return function(t,n,e){var o;for(o=n-1;o>=0;o--){var r=t.charAt(o);if(bv(r))return I.none();if(r===e)break}return I.some(o)}(o,n,e).getOr(n)},i).bind(function(t){var r=n.cloneRange();if(r.setStart(t.container,t.offset),r.setEnd(n.endContainer,n.endOffset),r.collapsed)return I.none();var i=vv(r);return 0!==i.lastIndexOf(e)||yv(i,e).length<o?I.none():I.some({text:yv(i,e),range:r,triggerChar:e})})},wv=function(t,n,e,o){return void 0===o&&(o=0),hv(Rt.fromDom(n.startContainer)).fold(function(){return xv(t,n,e,o)},function(n){var o=t.createRng();o.selectNode(n.dom);var r=vv(o);return I.some({range:o,text:yv(r,e),triggerChar:e})})},Sv=function(t,n){n.on("keypress compositionend",t.onKeypress.throttle),n.on("remove",t.onKeypress.cancel);var e=function(t,n){xi(t,Pr(),{raw:n})};n.on("keydown",function(n){var o=function(){return t.getView().bind(jd.getHighlighted)};8===n.which&&t.onKeypress.throttle(n),t.isActive()&&(27===n.which&&t.cancelIfNecessary(),t.isMenuOpen()?13===n.which?(o().each(wi),n.preventDefault()):40===n.which?(o().fold(function(){t.getView().each(jd.highlightFirst)},function(t){e(t,n)}),n.preventDefault(),n.stopImmediatePropagation()):37!==n.which&&38!==n.which&&39!==n.which||o().each(function(t){e(t,n),n.preventDefault(),n.stopImmediatePropagation()}):13!==n.which&&38!==n.which&&40!==n.which||t.cancelIfNecessary())}),n.on("NodeChange",function(n){t.isActive()&&!t.isProcessingAction()&&hv(Rt.fromDom(n.element)).isNone()&&t.cancelIfNecessary()})},kv=tinymce.util.Tools.resolve("tinymce.util.Promise"),Cv=function(t,n){return{container:t,offset:n}},Ov=function(t){if(function(t){return 3===t.nodeType}(t))return Cv(t,t.data.length);var n=t.childNodes;return n.length>0?Ov(n[n.length-1]):Cv(t,n.length)},_v=function(t,n){var e=t.childNodes;return e.length>0&&n<e.length?_v(e[n],0):e.length>0&&function(t){return 1===t.nodeType}(t)&&e.length===n?Ov(e[e.length-1]):Cv(t,n)},Tv=function(t){return function(n){var e=_v(n.startContainer,n.startOffset);return!function(t,n){return gv(t,n.container,n.offset,function(t,n){return 0===n?-1:n},t.getRoot()).filter(function(t){var n=t.container.data.charAt(t.offset-1);return!bv(n)}).isSome()}(t,e)}},Ev=function(t,n){var e=n(),o=t.selection.getRng();return function(t,n,e){return ft(e.triggerChars,function(e){return wv(t,n,e)})}(t.dom,o,e).bind(function(e){return Dv(t,n,e)})},Dv=function(t,n,e,o){void 0===o&&(o={});var r=n(),i=t.selection.getRng().startContainer.nodeValue,u=q(r.lookupByChar(e.triggerChar),function(n){return e.text.length>=n.minChars&&n.matches.getOrThunk(function(){return Tv(t.dom)}
95)(e.range,i,e.text)});if(0===u.length)return I.none();var a=kv.all(W(u,function(t){return t.fetch(e.text,t.maxResults,o).then(function(n){return{matchText:e.text,items:n,columns:t.columns,onAction:t.onAction,highlightOn:t.highlightOn}})}));return I.some({lookupData:a,context:e})},Av=ho([jo("type"),Qo("text")]),Bv=ho([er("type","autocompleteitem"),er("active",!1),er("disabled",!1),er("meta",{}),jo("value"),Qo("text"),Qo("icon")]),Mv=ho([jo("type"),jo("ch"),rr("minChars",1),er("columns",1),rr("maxResults",10),Zo("matches"),Go("fetch"),Go("onAction"),sr("highlightOn",[],Co)]),Fv=[ar("disabled",!1),Qo("tooltip"),Qo("icon"),Qo("text"),cr("onSetup",function(){return p})],Iv=ho([jo("type"),Go("onAction")].concat(Fv)),Rv=function(t){return Fo("toolbarbutton",Iv,t)},Nv=[ar("active",!1)].concat(Fv),Pv=ho(Nv.concat([jo("type"),Go("onAction")])),Vv=function(t){return Fo("ToggleButton",Pv,t)},Hv=[cr("predicate",k),ur("scope","node",["node","editor"]),ur("position","selection",["node","selection","line"])],Lv=Fv.concat([er("type","contextformbutton"),er("primary",!1),Go("onAction"),Ho("original",b)]),zv=Nv.concat([er("type","contextformbutton"),er("primary",!1),Go("onAction"),Ho("original",b)]),Uv=Fv.concat([er("type","contextformbutton")]),jv=Nv.concat([er("type","contextformtogglebutton")]),Wv=Po("type",{contextformbutton:Lv,contextformtogglebutton:zv}),Gv=ho([er("type","contextform"),cr("initValue",v("")),Qo("label"),Yo("commands",Wv),Jo("launch",Po("type",{contextformbutton:Uv,contextformtogglebutton:jv}))].concat(Hv)),Xv=ho([er("type","contexttoolbar"),jo("items")].concat(Hv)),qv=function(t){var n,e,o=t.ui.registry.getAll().popups,r=gt(o,function(t){return(n=t,Fo("Autocompleter",Mv,n)).fold(function(t){throw new Error(No(t))},b);var n}),i=(n=vt(r,function(t){return t.ch}),e={},G(n,function(t){e[t]={}}),lt(e)),u=yt(r);return{dataset:r,triggerChars:i,lookupByChar:function(t){return q(u,function(n){return n.ch===t})}}};!function(t){t[t.CLOSE_ON_EXECUTE=0]="CLOSE_ON_EXECUTE",t[t.BUBBLE_TO_SANDBOX=1]="BUBBLE_TO_SANDBOX"}(lv||(lv={}));var Yv,Kv=lv,Jv="tox-menu-nav__js",$v={normal:Jv,color:"tox-swatch"},Qv="tox-collection__item-label",Zv="tox-collection__item--active",tb=function(t){return xt($v,t).getOr(Jv)},nb=function(t){return"color"===t?"tox-swatches":"tox-menu"},eb=function(t){return{backgroundMenu:"tox-background-menu",selectedMenu:"tox-selected-menu",selectedItem:"tox-collection__item--active",hasIcons:"tox-menu--has-icons",menu:nb(t),tieredMenu:"tox-tiered-menu"}},ob=function(t){var n=eb(t);return{backgroundMenu:n.backgroundMenu,selectedMenu:n.selectedMenu,menu:n.menu,selectedItem:n.selectedItem,item:tb(t)}},rb=function(t,n,e){var o=eb(e);return{tag:"div",classes:Q([[o.menu,"tox-menu-"+n+"-column"],t?[o.hasIcons]:[]])}},ib=[kp.parts.items({})],ub=function(t,n,e){var o=eb(e);return{dom:{tag:"div",classes:Q([[o.tieredMenu]])},markers:ob(e)}},ab=function(t,n){return function(e){var o=j(e,n);return W(o,function(n){return{dom:t,components:n}})}},cb=function(t,n){var e=[],o=[];return G(t,function(t,r){n(t,r)?(o.length>
950&&e.push(o),o=[],wt(t.dom,"innerHtml")&&o.push(t)):o.push(t)}),o.length>0&&e.push(o),W(e,function(t){return{dom:{tag:"div",classes:["tox-collection__group"]},components:t}})},sb=function(t,n,e){return{dom:{tag:"div",classes:["tox-menu","tox-collection"].concat(1===t?["tox-collection--list"]:["tox-collection--grid"])},components:[kp.parts.items({preprocess:function(e){return"auto"!==t&&t>1?ab({tag:"div",classes:["tox-collection__group"]},t)(e):cb(e,function(t,e){return"separator"===n[e].type})}})]}},fb=function(t){return z(t,function(t){return"icon"in t&&void 0!==t.icon})},lb=function(t){return console.error(No(t)),console.log(t),I.none()},db=function(t,n,e,o,r){var i,u=(i=e,{dom:{tag:"div",classes:["tox-collection","tox-collection--horizontal"]},components:[kp.parts.items({preprocess:function(t){return cb(t,function(t,n){return"separator"===i[n].type})}})]});return{value:t,dom:u.dom,components:u.components,items:e}},mb=function(t,n,e,o,r){var i;return"color"===r?{value:t,dom:(i=function(t){return{dom:{tag:"div",classes:["tox-menu","tox-swatches-menu"]},components:[{dom:{tag:"div",classes:["tox-swatches"]},components:[kp.parts.items({preprocess:"auto"!==t?ab({tag:"div",classes:["tox-swatches__row"]},t):b})]}]}}(o)).dom,components:i.components,items:e}:"normal"===r&&"auto"===o?{value:t,dom:(i=sb(o,e)).dom,components:i.components,items:e}:"normal"===r&&1===o?{value:t,dom:(i=sb(1,e)).dom,components:i.components,items:e}:"normal"===r?{value:t,dom:(i=sb(o,e)).dom,components:i.components,items:e}:"listpreview"===r&&"auto"!==o?{value:t,dom:(i=function(t){return{dom:{tag:"div",classes:["tox-menu","tox-collection","tox-collection--toolbar","tox-collection--toolbar-lg"]},components:[kp.parts.items({preprocess:ab({tag:"div",classes:["tox-collection__group"]},t)})]}}(o)).dom,components:i.components,items:e}:{value:t,dom:rb(n,o,r),components:ib,items:e}},gb=[jo("type"),jo("src"),Qo("alt"),sr("classes",[],Co)],pb=ho(gb),hb=[jo("type"),jo("text"),Qo("name"),sr("classes",["tox-collection__item-label"],Co)],vb=ho(hb),bb=mo(function(){return Ao("type",{cardimage:pb,cardtext:vb,cardcontainer:yb})}),yb=ho([jo("type"),ir("direction","horizontal"),ir("align","left"),ir("valign","middle"),Yo("items",bb)]),xb=[ar("disabled",!1),Qo("text"),Qo("shortcut"),Vo("value","value",to(function(){return qi("menuitem-value")}),wo()),er("meta",{})],wb=ho([jo("type"),Qo("label"),Yo("items",bb),cr("onSetup",function(){return p}),cr("onAction",p)].concat(xb)),Sb=ho([jo("type"),ar("active",!1),Qo("icon")].concat(xb)),kb=[jo("type"),jo("fancytype"),cr("onAction",p)],Cb=[er("initData",{})].concat(kb),Ob=[fr("initData",{},[ar("allowCustomColors",!0),tr("colors",wo())])].concat(kb),_b=Po("fancytype",{inserttable:Cb,colorswatch:Ob}),Tb=ho([jo("type"),cr("onSetup",function(){return p}),cr("onAction",p),Qo("icon")].concat(xb)),Eb=ho([jo("type"),Go("getSubmenuItems"),cr("onSetup",function(){return p}),Qo("icon")].concat(xb)),Db=ho([jo("type"),Qo("icon"),ar("active",!1),cr("onSetup",function(){return p}),Go("onAction")].concat(xb)),Ab=function(t,n,e){var o=js(t.element,"."+e);if(o.length>0){var r=$(o,function(t){var e=t.dom.getBoundingClientRect().top,r=o[0].dom.getBoundingClientRect().top;return Math.abs(e-r)>n}).getOr(o.length);return I.some({numColumns:r,numRows:Math.ceil(o.length/r)})}return I.none()},Bb=function(t,n){return ac([Wg(t,n)])},Mb=function(t){return Bb(qi("unnamed-events"),t)},Fb=qi("tooltip.exclusive"),Ib=qi("tooltip.show"),Rb=qi("tooltip.hide"),Nb=function(t,n,e){t.getSystem().broadcastOn([Fb],{})},Pb=Object.freeze({__proto__:null,hideAllExclusive:Nb,setComponents:function(t,n,e,o){e.getTooltip().each(function(t){t.getSystem().isConnected()&&jg.set(t,o)})}}),Vb=Object.freeze({__proto__:null,events:function(t,n){var e=function(e){n.getTooltip().each(function(o){Af(o),t.onHide(e,o),n.clearTooltip()}),n.clearTimer()};return Oi(Q([[Ei(Ib,function(e){n.resetTimer(function(){!function(e){if(!n.isShowing()){Nb(e);var o=t.lazySink(e).getOrDie(),r=e.getSystem().build({dom:t.tooltipDom,components:t.tooltipComponents,events:Oi("normal"===t.mode?[Ei(Ir(),function(t){yi(e,Ib)}),Ei(Mr(),function(t){yi(e,Rb)})]:[]),behaviours:ac([jg.config({})])});n.setTooltip(r),Tf(o,r),t.onShow(e,r),Sf.position(o,r,{anchor:t.anchor(e)})}}(e)},t.delay)}),Ei(Rb,function(o){n.resetTimer(function(){e(o)},t.delay)}),Ei($r(),function(t,n){var o=n;o.universal||L(o.channels,Fb)&&e(t)}),Ni(function(t){e(t)})],"normal"===t.mode?[Ei(Rr(),function(t){yi(t,Ib)}),Ei(Kr(),function(t){yi(t,Rb)}),Ei(Ir(),function(t){yi(t,Ib)}),Ei(Mr(),function(t){yi(t,Rb)})]:[Ei(vi(),function(t,n){yi(t,Ib)}),Ei(bi(),function(t){yi(t,Rb)})]]))}}),Hb=[zo("lazySink"),zo("tooltipDom"),er("exclusive",!0),er("tooltipComponents",[]),er("delay",300),ur("mode","normal",["normal","follow-highlight"]),er("anchor",function(t){return{type:"hotspot",hotspot:t,layouts:{onLtr
95:v([Xa,Ga,za,ja,Ua,Wa]),onRtl:v([Xa,Ga,za,ja,Ua,Wa])}}}),pa("onHide"),pa("onShow")],Lb=sc({fields:Hb,name:"tooltipping",active:Vb,state:Object.freeze({__proto__:null,init:function(){var t=Vc(),n=Vc(),e=function(){t.on(clearTimeout)},o=v("not-implemented");return fu({getTooltip:n.get,isShowing:n.isSet,setTooltip:n.set,clearTooltip:n.clear,clearTimer:e,resetTimer:function(n,o){e(),t.set(setTimeout(n,o))},readState:o})}}),apis:Pb}),zb=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),Ub=tinymce.util.Tools.resolve("tinymce.EditorManager"),jb=function(t){return t.getParam("height",Math.max(t.getElement().offsetHeight,200))},Wb=function(t){return t.getParam("width",zb.DOM.getStyle(t.getElement(),"width"))},Gb=function(t){return I.from(t.getParam("min_width")).filter(m)},Xb=function(t){return I.from(t.getParam("min_height")).filter(m)},qb=function(t){return I.from(t.getParam("max_width")).filter(m)},Yb=function(t){return I.from(t.getParam("max_height")).filter(m)},Kb=function(t){return!1!==t.getParam("menubar",!0,"boolean")},Jb=function(t){var n=t.getParam("toolbar",!0),e=!0===n,o=r(n),i=u(n)&&n.length>0;return!Qb(t)&&(i||o||e)},$b=function(t){var n=U(9,function(n){return t.getParam("toolbar"+(n+1),!1,"string")}),e=q(n,function(t){return"string"==typeof t});return e.length>0?I.some(e):I.none()},Qb=function(t){return $b(t).fold(function(){return t.getParam("toolbar",[],"string[]").length>0},C)};!function(t){t.default="wrap",t.floating="floating",t.sliding="sliding",t.scrolling="scrolling"}(Yv||(Yv={}));var Zb,ty=function(t){return t.getParam("toolbar_mode","","string")};!function(t){t.auto="auto",t.top="top",t.bottom="bottom"}(Zb||(Zb={}));var ny,ey,oy=function(t){return t.getParam("toolbar_location",Zb.auto,"string")},ry=function(t){return oy(t)===Zb.bottom},iy=function(t){if(!t.inline)return I.none();var n=function(t){return t.getParam("fixed_toolbar_container","","string")}(t);if(n.length>0)return Qu(Mn(),n);var e=function(t){return t.getParam("fixed_toolbar_container_target")}(t);return l(e)?I.some(Rt.fromDom(e)):I.none()},uy=function(t){return t.inline&&iy(t).isSome()},ay=function(t){return iy(t).getOrThunk(function(){return Tn(_n(Rt.fromDom(t.getElement())))})},cy=function(t){return t.inline&&!Kb(t)&&!Jb(t)&&!Qb(t)},sy=function(t){return(t.getParam("toolbar_sticky",!1,"boolean")||t.inline)&&!uy(t)&&!cy(t)},fy=function(t){var n=t.getParam("menu");return n?gt(n,function(t){return _(_({},t),{items:t.items})}):{}},ly=function(t){return t.getParam("menubar")},dy=function(t){return t.getParam("anchor_top","#top")},my=function(t){return t.getParam("anchor_bottom","#bottom")},gy=ho([(ny="readonly",Uo(ny,Oo))]),py=function(t,n){var e=t.outerContainer.element;n&&(t.mothership.broadcastOn([Gf()],{target:e}),t.uiMothership.broadcastOn([Gf()],{target:e})),t.mothership.broadcastOn(["silver.readonly"],{readonly:n}),t.uiMothership.broadcastOn(["silver.readonly"],{readonly:n})},hy=function(t,n){t.on("init",function(){t.mode.isReadOnly()&&py(n,!0)}),t.on("SwitchMode",function(){return py(n,t.mode.isReadOnly())}),function(t){return t.getParam("readonly",!1,"boolean")}(t)&&t.setMode("readonly")},vy=function(){var t;return mc.config({channels:(t={},t["silver.readonly"]={schema:gy,onReceive:function(t,n){Md.set(t,n.readonly)}},t)})},by=function(t){return Md.config({disabled:t,disableClass:"tox-collection__item--state-disabled"})},yy=function(t){return Md.config({disabled:t})},xy=function(t){return Md.config({disabled:t,disableClass:"tox-tbtn--disabled"})},wy=function(t){return Md.config({disabled:t,disableClass:"tox-tbtn--disabled",useNative:!1})},Sy=function(t,n){var e=t.getApi(n);return function(t){t(e)}},ky=function(t,n){return Ri(function(e){Sy(t,e)(function(e){var o=t.onSetup(e);d(o)&&n.set(o)})})},Cy=function(t,n){return Ni(function(e){return Sy(t,e)(n.get())})},Oy=function(t,n){return Vi(function(e,o){Sy(t,e)(t.onAction),t.triggersSubmenu||n!==Kv.CLOSE_ON_EXECUTE||(yi(e,ei()),o.stop())})},_y=((ey={})[Qr()]=["disabling","alloy.base.behaviour","toggling","item-events"],ey),Ty=Ct,Ey=function(t,n,e,o){var r=lr(p);return{type:"item",dom:n.dom,components:Ty(n.optComponents),data:t.data,eventOrder:_y,hasSubmenu:t.triggersSubmenu,itemBehaviours:ac([Wg("item-events",[Oy(t,e),ky(t,r),Cy(t,r)]),by(function(){return t.disabled||o.isDisabled()}),vy(),jg.config({})].concat(t.itemBehaviours))}},Dy=function(t){return{value:t.value,meta:_({text:t.text.getOr("")},t.meta)}},Ay=tinymce.util.Tools.resolve("tinymce.Env"),By=function(t){var n=Ay.mac?{alt:"&#x2325;",ctrl:"&#x2303;",shift:"&#x21E7;",meta:"&#x2318;",access:"&#x2303;&#x2325;"}:{meta:"Ctrl",access:"Shift+Alt"},e=t.split("+"),o=W(e,function(t){var e=t.toLowerCase().trim();return wt(n,e)?n[e]:t});return Ay.mac?o.join(""):o.join("+")},My=function(t,n,e){return void 0===e&&(e=["tox-collection__item-icon"]),av(t,{tag:"div",classes:e},n)},Fy=function(t){return{dom:{tag:"div",classes:[Qv]},components:[Lu(Zh.translate(t))]}},Iy=function(t,n){return{dom:{tag:"div",classes:n,innerHtml:t}}},Ry=function(t,n){return{dom:{tag:"div",classes:[Qv]},components:[{dom:{tag:t.tag,styles:t.styles},components:[Lu(Zh.translate(n))]}]}},Ny=function(t){return{dom:{tag:"div",classes:["tox-collection__item-accessory"],innerHtml:By(t)}}},Py=function(t){return My("checkmark",t,["tox-collection__item-checkmark"])},Vy=function(t,n,e){var o,r,i=t.ariaLabel,u=t.value,a=t.iconContent.map(function(t){return function(t,n,e){var o=n();return ov(t,o).or(e).getOrThunk(nv(o))}(t,n.icons,e)});return{dom:(o=a.getOr(""),r={tag:"div",attributes:i.map(function(t){return{title:n.translate(t)}
95}).getOr({}),classes:["tox-swatch"]},_(_({},r),"custom"===u?{tag:"button",classes:E(E([],r.classes,!0),["tox-swatches__picker-btn"],!1),innerHtml:o}:"remove"===u?{classes:E(E([],r.classes,!0),["tox-swatch--remove"],!1),innerHtml:o}:{attributes:_(_({},r.attributes),{"data-mce-color":u}),styles:{"background-color":u}})),optComponents:[]}},Hy=function(t){var n=t.map(function(t){return{attributes:{title:Zh.translate(t)}}}).getOr({});return _({tag:"div",classes:[Jv,"tox-collection__item"]},n)},Ly=function(t,n,e,o){return void 0===o&&(o=I.none()),"color"===t.presets?Vy(t,n,o):function(t,n,e,o){var r={tag:"div",classes:["tox-collection__item-icon"]},i=e?t.iconContent.map(function(t){return av(t,r,n.icons,o)}).orThunk(function(){return I.some({dom:r})}):I.none(),u=t.checkMark,a=I.from(t.meta).fold(function(){return Fy},function(t){return wt(t,"style")?x(Ry,t.style):Fy}),c=t.htmlContent.fold(function(){return t.textContent.map(a)},function(t){return I.some(Iy(t,[Qv]))});return{dom:Hy(t.ariaLabel),optComponents:[i,c,t.shortcutContent.map(Ny),u,t.caret]}}(t,n,e,o)},zy=function(t,n){return xt(t,"tooltipWorker").map(function(t){return[Lb.config({lazySink:n.get
95Sink,tooltipDom:{tag:"div",classes:["tox-tooltip-worker-container"]},tooltipComponents:[],anchor:function(t){return{type:"submenu",item:t,overrides:{maxHeightFunction:Zc}}},mode:"follow-highlight",onShow:function(n,e){t(function(t){Lb.setComponents(n,[zu({element:Rt.fromDom(t)})])})}})]}).getOr([])},Uy=function(t,n){var e=function(t){return zb.DOM.encode(t)}(Zh.translate(t));if(n.length>0){var o=new RegExp(function(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}(n),"gi");return e.replace(o,function(t){return'<span class="tox-autocompleter-highlight">'+t+"</span>"})}return e},jy=function(t,n){return W(t,function(t){switch(t.type){case"cardcontainer":return u=t,a=jy(t.items,n),{dom:{tag:"div",classes:["tox-collection__item-container","vertical"===u.direction?"tox-collection__item-container--column":"tox-collection__item-container--row","left"===u.align?"tox-collection__item-container--align-left":"tox-collection__item-container--align-right",function(){switch(u.valign){case"top":return"tox-collection__item-container--valign-top";case"middle":return"tox-collection__item-container--valign-middle";case"bottom":return"tox-collection__item-container--valign-bottom"}}()]},components:a};case"cardimage":return o=t.src,r=t.classes,i=t.alt,{dom:{tag:"img",classes:r,attributes:{src:o,alt:i.getOr("")}}};case"cardtext":var e=t.name.exists(function(t){return L(n.cardText.highlightOn,t)})?I.from(n.cardText.matchText).getOr(""):"";return Iy(Uy(t.text,e),t.classes)}var o,r,i,u,a})},Wy=Xl(hp(),vp()),Gy=function(t){return{value:t}},Xy=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,qy=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,Yy=function(t){return Xy.test(t)||qy.test(t)},Ky=function(t){return(n=t,e="#",Dt(n,e)?function(t,n){return t.substring(n)}(n,e.length):n).toUpperCase();var n,e},Jy=function(t){var n=function(t){return{value:t.value.replace(Xy,function(t,n,e,o){return n+n+e+e+o+o})}}(t),e=qy.exec(n.value);return null===e?["FFFFFF","FF","FF","FF"]:e},$y=function(t){var n=t.toString(16);return(1===n.length?"0"+n:n).toUpperCase()},Qy=function(t){var n=$y(t.red)+$y(t.green)+$y(t.blue);return Gy(n)},Zy=Math.min,tx=Math.max,nx=Math.round,ex=/^rgb\((\d+),\s*(\d+),\s*(\d+)\)/,ox=/^rgba\((\d+),\s*(\d+),\s*(\d+),\s*(\d?(?:\.\d+)?)\)/,rx=function(t,n,e,o){return{red:t,green:n,blue:e,alpha:o}},ix=function(t){var n=parseInt(t,10);return n.toString()===t&&n>=0&&n<=255},ux=function(t){var n,e,o,r=(t.hue||0)%360,i=t.saturation/100,u=t.value/100;if(i=tx(0,Zy(i,1)),u=tx(0,Zy(u,1)),0===i)return n=e=o=nx(255*u),rx(n,e,o,1);var a=r/60,c=u*i,s=c*(1-Math.abs(a%2-1)),f=u-c;switch(Math.floor(a)){case 0:n=c,e=s,o=0;break;case 1:n=s,e=c,o=0;break;case 2:n=0,e=c,o=s;break;case 3:n=0,e=s,o=c;break;case 4:n=s,e=0,o=c;break;case 5:n=c,e=0,o=s;break;default:n=e=o=0}return n=nx(255*(n+f)),e=nx(255*(e+f)),o=nx(255*(o+f)),rx(n,e,o,1)},ax=function(t){var n=Jy(t),e=parseInt(n[1],16),o=parseInt(n[2],16),r=parseInt(n[3],16);return rx(e,o,r,1)},cx=function(t,n,e,o){var r=parseInt(t,10),i=parseInt(n,10),u=parseInt(e,10),a=parseFloat(o);return rx(r,i,u,a)},sx=function(t){if("transparent"===t)return I.some(rx(0,0,0,0));var n=ex.exec(t);if(null!==n)return I.some(cx(n[1],n[2],n[3],"1"));var e=ox.exec(t);return null!==e?I.some(cx(e[1],e[2],e[3],e[4])):I.none()},fx=function(t){return"rgba("+t.red+","+t.green+","+t.blue+","+t.alpha+")"},lx=rx(255,0,0,1),dx=function(t,n){return t.fire("ResizeContent",n)},mx=function(t,n,e){return{hue:t,saturation:n,value:e}},gx=function(t){var n,e=0,o=0,r=t.red/255,i=t.green/255,u=t.blue/255,a=Math.min(r,Math.min(i,u)),c=Math.max(r,Math.max(i,u));return a===c?mx(0,0,100*(o=a)):(e=60*((e=r===a?3:u===a?1:5)-(r===a?i-u:u===a?r-i:u-r)/(c-a)),n=(c-a)/c,o=c,mx(Math.round(e),Math.round(100*n),Math.round(100*o)))},px=function(t){return Qy(ux(t))},hx=function(t){return(n=t,Yy(n)?I.some({value:Ky(n)}):I.none()).orThunk(function(){return sx(t).map(Qy)}).getOrThunk(function(){var n=document.createElement("canvas");n.height=1,n.width=1;var e=n.getContext("2d");e.clearRect(0,0,n.width,n.height),e.fillStyle="#FFFFFF",e.fillStyle=t,e.fillRect(0,0,1,1);var o=e.getImageData(0,0,1,1).data,r=o[0],i=o[1],u=o[2],a=o[3];return Qy(rx(r,i,u,a))});var n},vx=tinymce.util.Tools.resolve("tinymce.util.LocalStorage"),bx="tinymce-custom-colors";
95var yx,xx="choiceitem",wx=[{type:xx,text:"Light Green",value:"#BFEDD2"},{type:xx,text:"Light Yellow",value:"#FBEEB8"},{type:xx,text:"Light Red",value:"#F8CAC6"},{type:xx,text:"Light Purple",value:"#ECCAFA"},{type:xx,text:"Light Blue",value:"#C2E0F4"},{type:xx,text:"Green",value:"#2DC26B"},{type:xx,text:"Yellow",value:"#F1C40F"},{type:xx,text:"Red",value:"#E03E2D"},{type:xx,text:"Purple",value:"#B96AD9"},{type:xx,text:"Blue",value:"#3598DB"},{type:xx,text:"Dark Turquoise",value:"#169179"},{type:xx,text:"Orange",value:"#E67E23"},{type:xx,text:"Dark Red",value:"#BA372A"},{type:xx,text:"Dark Purple",value:"#843FA1"},{type:xx,text:"Dark Blue",value:"#236FA1"},{type:xx,text:"Light Gray",value:"#ECF0F1"},{type:xx,text:"Medium Gray",value:"#CED4D9"},{type:xx,text:"Gray",value:"#95A5A6"},{type:xx,text:"Dark Gray",value:"#7E8C8D"},{type:xx,text:"Navy Blue",value:"#34495E"},{type:xx,text:"Black",value:"#000000"},{type:xx,text:"White",value:"#ffffff"}],Sx=function(t){void 0===t&&(t=10);var n,e=vx.getItem(bx),o=r(e)?JSON.parse(e):[],i=t-(n=o).length<0?n.slice(0,t):n,u=function(t){i.splice(t,1)};return{add:function(n){H(i,n).each(u),i.unshift(n),i.length>t&&i.pop(),vx.setItem(bx,JSON.stringify(i))},state:function(){return i.slice(0)}}}(10),kx=function(t){return!1!==t.getParam("custom_colors")},Cx=function(t){var n=function(t){return t.getParam("color_map")}(t);return void 0!==n?function(t){for(var n=[],e=0;e<t.length;e+=2)n.push({text:t[e+1],value:"#"+hx(t[e]).value,type:"choiceitem"});return n}(n):wx},Ox=function(t){Sx.add(t)},_x=function(t){return function(t,n){return t.getParam("color_cols",n,"number")}(t,function(t){return Math.max(5,Math.ceil(Math.sqrt(t)))}(Cx(t).length))},Tx=function(t){var n={type:"choiceitem",text:"Remove color",icon:"color-swatch-remove-color",value:"remove"};return t?[n,{type:"choiceitem",text:"Custom color",icon:"color-picker",value:"custom"}]:[n]},Ex=function(t,n,e,o){"custom"===e?Ix(t)(function(e){e.each(function(e){Ox(e),t.execCommand("mceApplyTextcolor",n,e),o(e)})},"#000000"):"remove"===e?(o(""),t.execCommand("mceRemoveTextcolor",n)):(o(e),t.execCommand("mceApplyTextcolor",n,e))},Dx=function(t,n){return t.concat(W(Sx.state(),function(t){return{type:xx,text:t,value:t}}).concat(Tx(n)))},Ax=function(t,n){return function(e){e(Dx(t,n))}},Bx=function(t,n,e){var o="forecolor"===n?"tox-icon-text-color__color":"tox-icon-highlight-bg-color__color";t.setIconFill(o,e)},Mx=function(t,n,e,o,r){t.ui.registry.addSplitButton(n,{tooltip:o,presets:"color",icon:"forecolor"===n?"text-color":"highlight-bg-color",select:function(n){return function(t,n){var e;return t.dom.getParents(t.selection.getStart(),function(t){var o;(o=t.style["forecolor"===n?"color":"background-color"])&&(e=e||o)}),I.from(e)}(t,e).bind(function(t){return sx(t).map(function(t){var e=Qy(t).value;return Et(n.toLowerCase(),e)})}).getOr(!1)},columns:_x(t),fetch:Ax(Cx(t),kx(t)),onAction:function(n){Ex(t,e,r.get(),p)},onItemAction:function(o,i){Ex(t,e,i,function(e){r.set(e),function(t,n){t.fire("TextColorChange",n)}(t,{name:n,color:e})})},onSetup:function(e){Bx(e,n,r.get());var o=function(t){t.name===n&&Bx(e,t.name,t.color)};return t.on("TextColorChange",o),function(){t.off("TextColorChange",o)}}})},Fx=function(t,n,e,o){t.ui.registry.addNestedMenuItem(n,{text:o,icon:"forecolor"===n?"text-color":"highlight-bg-color",getSubmenuItems:function(){return[{type:"fancymenuitem",fancytype:"colorswatch",onAction:function(n){Ex(t,e,n.value,p)}}]}})},Ix=function(t){return function(n,e){var o=!1,r={colorpicker:e};t.windowManager.open({title:"Color Picker",size:"normal",body:{type:"panel",items:[{type:"colorpicker",name:"colorpicker",label:"Color"}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:r,onAction:function(t,n){"hex-valid"===n.name&&(o=n.value)},onSubmit:function(e){var r=e.getData().colorpicker;o?(n(I.from(r)),e.close()):t.windowManager.alert(t.translate(["Invalid hex color code: {0}",r]))},onClose:p,onCancel:function(){n(I.none())}})}},Rx=function(t,n,e,o,r,i,u,a){var c=fb(n),s=Nx(n,e,o,"color"!==r?"normal":"color",i,u,a);return mb(t,c,s,o,r)},Nx=function(t,n,e,o,r,i,u){return Ct(W(t,function(a){return"choiceitem"===a.type?(c=a,Fo("choicemenuitem",Sb,c)).fold(lb,function(c){return I.some(function(t,n,e,o,r,i,u,a){void 0===a&&(a=!0);var c=Ly({presets:e,textContent:n?t.text:I.none(),htmlContent:I.none(),ariaLabel:t.text,iconContent:t.icon,shortcutContent:n?t.shortcut:I.none(),checkMark:n?I.some(Py(u.icons)):I.none(),caret:I.none(),value:t.value},u,a);return Qe(Ey({data:Dy(t),disabled:t.disabled,getApi:function(t){return{setActive:function(n){ap.set(t,n)},isActive:function(){return ap.isOn(t)},isDisabled:function(){return Md.isDisabled(t)},setDisabled:function(n){return Md.set(t,n)}}},onAction:function(n){return o(t.value)},onSetup:function(t){return t.setActive(r),p},triggersSubmenu:!1,itemBehaviours:[]},c,i,u),{toggling:{toggleClass:"tox-collection__item--enabled",toggleOnExecute:!1,selected:t.active}})}(c,1===e,o,n,i(a.value),r,u,fb(t)))}):I.none();var c}))},Px=function(t,n){var e=ob(n);return 1===t?{mode:"menu",moveOnTab:!0}:"auto"===t?{mode:"grid",selector:"."+e.item,initSize:{numColumns:1,numRows:1}}:{mode:"matrix",rowSelector:"."+("color"===n?"tox-swatches__row":"tox-collection__group")}},Vx=function(t,n){var e=t.initData.allowCustomColors&&n.colorinput.hasCustomColors();return t.initData.colors.fold(function(){return Dx(n.colorinput.getColors(),e)},function(t){return t.concat(Tx(e))})},Hx=qi("cell-over"),Lx=qi("cell-execute"),zx=function(t,n,e){var o,r=function(e){return xi(e,Lx,{row:t,col:n})},i=function(t,n){n.stop(),r(t)};return ju({dom:{tag:"div",attributes:(o={role:"button"},o["aria-labelledby"]=e,o)},behaviours:ac([Wg("insert-table-picker-cell",[Ei(Ir(),Kg.focus),Ei(Qr(),r),Ei(zr(),i),Ei(ti(),i)]),ap.config({toggleClass:"tox-insert-table-picker__selected",toggleOnExecute:!1}),Kg.config({onFocus:function(e){return xi(e,Hx,{row:t,col:n})}})])})},Ux=function(t){return Z(t,function(t){return W(t,Wu)})},jx=function(t,n){return Lu(n+"x"+t)},Wx={inserttable:function(t){var n=qi("size-label"),e=function(t,n,e){for(var o=[],r=0;r<n;r++){for(var i=[],u=0;u<e;u++)i.push(zx(r,u,t));o.push(i)}return o}(n,10,10),o=jx(0,0),r=Qp({dom:{tag:"span",classes:["tox-insert-table-picker__label"],attributes:{id:n}},components:[o],behaviours:ac([jg.config({})])});return{type:"widget",data:{value:qi("widget-id")},dom:{tag:"div",classes:["tox-fancymenuitem"]},autofocus:!0,components:[Wy.widget({dom:{tag:"div",classes:["tox-insert-table-picker"]},components:Ux(e).concat(r.asSpec()),behaviours:ac([Wg("insert-table-picker",[Ri(function(t){jg.set(r.get(t),[o])}),Mi(Hx,function(t,n,o){var i=o.event,u=i.row,a=i.col;!function(t,n,e,o,r){for(var i=0;i<o;i++)for(var u=0;u<r;u++)ap.set(t[i][u],i<=n&&u<=e)}(e,u,a,10,10),jg.set(r.get(t),[jx(u+1,a+1)])}),Mi(Lx,function(n,e,o){var r=o.event,i=r.row,u=r.col;t.onAction({numRows:i+1,numColumns:u+1}),yi(n,ei())})]),Vg.config({initSize:{numRows:10,numColumns:10},mode:"flatgrid",selector:'[role="button"]'})])})]}},colorswatch:function(t,n){var e=Vx(t,n),o=n.colorinput.getColorCols(),r=Rx(qi("menu-value"),e,function(n){t.onAction({value:n})},o,"color",Kv.CLOSE_ON_EXECUTE,k,n.shared.providers),i=_(_({},r),{markers:ob("color"),movement:Px(o,"color")});return{type:"widget",data:{value:qi("widget-id")},dom:{tag:"div",classes:["tox-fancymenuitem"]},autofocus:!0,components:[Wy.widget(kp.sketch(i))]}}},Gx=function(t,n,e,o,r,i,u,a){void 0===a&&(a=!0);var c=Ly({presets:o,textContent:I.none(),htmlContent:e?t.text.map(function(t){return Uy(t,n)}):I.none(),ariaLabel:t.text,iconContent:t.icon,shortcutContent:I.none(),checkMark:I.none(),caret:I.none(),value:t.value},u.providers,a,t.icon);return Ey({data:Dy(t),disabled:t.disabled,getApi:v({}),onAction:function(n){return r(t.value,t.meta)},onSetup:v(p),triggersSubmenu:!1,itemBehaviours:zy(t.meta,u)},c,i,u.providers)},Xx=function(t){var n=t.text.fold(function(){return{}},function(t){return{innerHtml:t}});return{type:"separator",dom:_({tag:"div",classes:["tox-collection__item","tox-collection__group-heading"]},n),components:[]}},qx=function(t,n,e,o){void 0===o&&(o=!0);var r=Ly({presets:"normal",iconContent:t.icon,textContent:t.text,htmlContent:I.none(),ariaLabel:t.text,caret:I.none(),checkMark:I.none(),shortcutContent:t.shortcut},e,o);return Ey({data:Dy(t),getApi:function(t){return{isDisabled:function(){return Md.isDisabled(t)},setDisabled:function(n){return Md.set(t,n)}}},disabled:t.disabled,onAction:t.onAction,onSetup:t.onSetup,triggersSubmenu:!1,itemBehaviours:[]},r,n,e)},Yx=function(t,n,e,o,r){void 0===o&&(o=!0),void 0===r&&(r=!1);var i,u=r?(i=e.icons,My("chevron-down",i,["tox-collection__item-caret"])):function(t){return My("chevron-right",t,["tox-collection__item-caret"])}(e.icons),a=Ly({presets:"normal",iconContent:t.icon,textContent:t.text,htmlContent:I.none(),ariaLabel:t.text,caret:I.some(u),checkMark:I.none(),shortcutContent:t.shortcut},e,o);return Ey({data:Dy(t),getApi:function(t){return{isDisabled:function(){return Md.isDisabled(t)},setDisabled:function(n){return Md.set(t,n)}}},disabled:t.disabled,onAction:p,onSetup:t.onSetup,triggersSubmenu:!0,itemBehaviours:[]},a,n,e)},Kx=function(t,n,e,o){void 0===o&&(o=!0);var r=Ly({iconContent:t.icon,textContent:t.text,htmlContent:I.none(),ariaLabel:t.text,checkMark:I.some(Py(e.icons)),caret:I.none(),shortcutContent:t.shortcut,presets:"normal",meta:t.meta},e,o);return Qe(Ey({data:Dy(t),disabled:t.disabled,getApi:function(t){return{setActive:function(n){ap.set(t,n)},isActive:function(){return ap.isOn(t)},isDisabled:function(){return Md.isDisabled(t)},setDisabled:function(n){return Md.set(t,n)}}},onAction:t.onAction,onSetup:t.onSetup,triggersSubmenu:!1,itemBehaviours:[]},r,n,e),{toggling:{toggleClass:"tox-collection__item--enabled",toggleOnExecute:!1,selected:t.active}})},Jx=function(t,n){return xt(Wx,t.fancytype).map(function(e){return e(t,n)})},$x=function(t,n,e,o){var r={dom:Hy(t.label),optComponents:[I.some({dom:{tag:"div",classes:["tox-collection__item-container","tox-collection__item-container--row"]},components:jy(t.items,o)})]};return Ey({data:Dy(_({text:I.none()},t)),disabled:t.disabled,getApi:function(t){return{isDisabled:function(){return Md.isDisabled(t)},setDisabled:function(n){Md.set(t,n),G(js(t.element,"*"),function(e){t.getSystem().getByDom(e).each(function(t){t.hasConfigured(Md)&&Md.set(t,n)})})}}},onAction:t.onAction,onSetup:t.onSetup,triggersSubmenu:!1,itemBehaviours:I.from(o.itemBehaviours).getOr([])},r,n,e.providers)};!function(t){t[t.ContentFocus=0]="ContentFocus",t[t.UiFocus=1]="UiFocus"}(yx||(yx={}));var Qx=function(t,n,e,o,r){var i,u=e.shared.providers,a=function(t){return r?_(_({},t),{shortcut:I.none(),icon:t.text.isSome()?I.none():t.icon}):t};switch(t.type){case"menuitem":return(i=t,Fo("menuitem",Tb,i)).fold(lb,function(t){return I.some(qx(a(t),n,u,o))});case"nestedmenuitem":return function(t){return Fo("nestedmenuitem",Eb,t)}(t).fold(lb,function(t){return I.some(Yx(a(t),n,u,o,r))});case"togglemenuitem":return function(t){return Fo("togglemenuitem",Db,t)}(t).fold(lb,function(t){return I.some(Kx(a(t),n,u,o))});case"separator":return function(t){return Fo("separatormenuitem",Av,t)}(t).fold(lb,function(t){return I.some(Xx(t))});case"fancymenuitem":return function(t){return Fo("fancymenuitem",_b,t)}(t).fold(lb,function(t){return Jx(a(t),e)});default:return console.error("Unknown item in general menu",t),I.none()}},Zx=function(t,n,e,o,r,i,u){var a=1===o,c=!a||fb(t);return Ct(W(t,function(t){switch(t.type){case"separator":return(o=t,Fo("Autocompleter.Separator",Av,o)).fold(lb,function(t){return I.some(Xx(t))});case"cardmenuitem":return function(t){return Fo("cardmenuitem",wb,t)}(t).fold(lb,function(t){return I.some($x(_(_({},t),{onAction:function(n){t.onAction(n),e(t.value,t.meta)}}),r,i,{itemBehaviours:zy(t.meta,i),cardText:{matchText:n,highlightOn:u}}))});case"autocompleteitem":default:return function(t){return Fo("Autocompleter.Item",Bv,t)}(t).fold(lb,function(t){return I.some(Gx(t,n,a,"normal",e,r,i,c))})}var o}))},tw=function(t,n,e,o,r){var i=fb(n),u=Ct(W(n,function(t){var n=function(t){return Qx(t,e,o,function(t){return r?!wt(t,"text"):i}(t),r)};return"nestedmenuitem"===t.type&&t.getSubmenuItems().length<=0?n(_(_({},t),{disabled:!0})):n(t)}));return(r?db:mb)(t,i,u,1,"normal")},nw=function(t){return Dp.singleData(t.value,t)},ew={register:function(t,n){var e=Vc(),o=lr(!1),r=ju(Ap.sketch({dom:{tag:"div",classes:["tox-autocompleter"]},components:[],fireDismissalEventInstead:{},inlineBehaviours:ac([Wg("dismissAutocompleter",[Ei(li(),function(){return a()}
95)])]),lazySink:n.getSink})),i=function(){return e.get().isSome()},u=function(){i()&&Ap.hide(r)},a=function(){if(i()){var n=e.get().map(function(t){return t.element});hv(n.getOr(Rt.fromDom(t.selection.getNode()))).each(we),u(),e.clear(),o.set(!1)}},c=jt(function(){return qv(t)}),s=function(n,e,o,i){n.matchLength=e.text.length;var u=ft(o,function(t){return I.from(t.columns)}).getOr(1);Ap.showAt(r,kp.sketch(function(t,n,e,o){var r=e===yx.ContentFocus?lm():fm(),i=Px(n,o),u=ob(o);return{dom:t.dom,components:t.components,items:t.items,value:t.value,markers:{selectedItem:u.selectedItem,item:u.item},movement:i,fakeFocus:e===yx.ContentFocus,focusManager:r,menuBehaviours:Mb("auto"!==n?[]:[Ri(function(t,n){Ab(t,4,u.item).each(function(n){var e=n.numColumns,o=n.numRows;Vg.setGridSize(t,o,e)})})])}}(mb("autocompleter-value",!0,i,u,"normal"),u,yx.ContentFocus,"normal")),{anchor:{type:"node",root:Rt.fromDom(t.getBody()),node:I.from(n.element)}}),Ap.getContent(r).each(jd.highlightFirst)},f=function(r){(function(n){return e.get().map(function(e){return wv(t.dom,t.selection.getRng(),e.triggerChar).bind(function(e){return Dv(t,c,e,n)})}).getOrThunk(function(){return Ev(t,c)})})(r).fold(a,function(r){!function(n){if(!i()){var r=pv(t,n.range);e.set({triggerChar:n.triggerChar,element:r,matchLength:n.text.length}),o.set(!1)}}(r.context),r.lookupData.then(function(i){e.get().map(function(e){var c,l,d,m=r.context;if(e.triggerChar===m.triggerChar){var g=(c=m.triggerChar,d=ft(l=i,function(t){return I.from(t.columns)}).getOr(1),Z(l,function(e){var r=e.items;return Zx(r,e.matchText,function(n,r){var i=t.selection.getRng();wv(t.dom,i,c).fold(function(){return console.error("Lost context. Cursor probably moved")},function(t){var i=t.range,c={hide:function(){a()},reload:function(t){u(),f(t)}};o.set(!0),e.onAction(c,i,n,r),o.set(!1)})},d,Kv.BUBBLE_TO_SANDBOX,n,e.highlightOn)}));g.length>0?s(e,m,i,g):m.text.length-e.matchLength>=10?a():u()}})})})},l={onKeypress:dv(function(t){27!==t.which&&f()},50),cancelIfNecessary:a,isMenuOpen:function(){return Ap.isOpen(r)},isActive:i,isProcessingAction:o.get,getView:function(){return Ap.getContent(r)}};!1===t.hasPlugin("rtc")&&Sv(l,t)}},ow=function(t,n,e){return Zu(t,n,e).isSome()},rw=function(t,n){var e=null;return{cancel:function(){null!==e&&(clearTimeout(e),e=null)},schedule:function(){for(var o=[],r=0;r<arguments.length;r++)o[r]=arguments[r];e=setTimeout(function(){t.apply(null,o),e=null},n)}}},iw=function(t){var n=t.raw;return void 0===n.touches||1!==n.touches.length?I.none():I.some(n.touches[0])},uw=function(t){var n=Vc(),e=lr(!1),o=rw(function(n){t.triggerEvent(ni(),n),e.set(!0)},400),r=hr([{key:_r(),value:function(t){return iw(t).each(function(r){o.cancel();var i={x:r.clientX,y:r.clientY,target:t.target};o.schedule(t),e.set(!1),n.set(i)}),I.none()}},{key:Tr(),value:function(t){return o.cancel(),iw(t).each(function(t){n.on(function(e){(function(t,n){var e=Math.abs(t.clientX-n.x),o=Math.abs(t.clientY-n.y);return e>5||o>5})(t,e)&&n.clear()})}),I.none()}},{key:Er(),value:function(r){o.cancel();return n.get().filter(function(t){return fn(t.target,r.target)}).map(function(n){return e.get()?(r.prevent(),!1):t.triggerEvent(ti(),r)})}}]);return{fireIfReady:function(t,n){return xt(r,n).bind(function(n){return n(t)})}}},aw=function(){return an().browser.isFirefox()},cw=function(t,n){var e=_({stopBackspace:!0},n),o=uw(e),r=W(["touchstart","touchmove","touchend","touchcancel","gesturestart","mousedown","mouseup","mouseover","mousemove","mouseout","click"].concat(["selectstart","input","contextmenu","change","transitionend","transitioncancel","drag","dragstart","dragend","dragenter","dragleave","dragover","drop","keyup"]),function(n){return Lc(t,n,function(t){o.fireIfReady(t,n).each(function(n){n&&t.kill()}),e.triggerEvent(n,t)&&t.kill()})}),i=Vc(),u=Lc(t,"paste",function(t){o.fireIfReady(t,"paste").each(function(n){n&&t.kill()}),e.triggerEvent("paste",t)&&t.kill(),i.set(setTimeout(function(){e.triggerEvent(Jr(),t)},0))}),a=Lc(t,"keydown",function(t){e.triggerEvent("keydown",t)?t.kill():e.stopBackspace&&function(t){return t.raw.which===Wd[0]&&!L(["input","textarea"],Pt(t.target))&&!ow(t.target,'[contenteditable="true"]')}(t)&&t.prevent()}),c=function(t,n){return aw()?zc(t,"focus",n):Lc(t,"focusin",n)}(t,function(t){e.triggerEvent("focusin",t)&&t.kill()}),s=Vc(),f=function(t,n){return aw()?zc(t,"blur",n):Lc(t,"focusout",n)}(t,function(t){e.triggerEvent("focusout",t)&&t.kill(),s.set(setTimeout(function(){e.triggerEvent(Kr(),t)},0))});return{unbind:function(){G(r,function(t){t.unbind()}),a.unbind(),c.unbind(),f.unbind(),u.unbind(),i.on(clearTimeout),s.on(clearTimeout)}}},sw=function(t,n){var e=xt(t,"target").getOr(n);return lr(e)},fw=dr([{stopped:[]},{resume:["element"]},{complete:[]}]),lw=function(t,n,e,o,r,i){var u=t(n,o),a=function(t,n){var e=lr(!1),o=lr(!1);return{stop:function(){e.set(!0)},cut:function(){o.set(!0)},isStopped:e.get,isCut:o.get,event:t,setSource:n.set,getSource:n.get}}(e,r);return u.fold(function(){return i.logEventNoHandlers(n,o),fw.complete()},function(t){var e=t.descHandler;return mu(e)(a),a.isStopped()?(i.logEventStopped(n,t.element,e.purpose),fw.stopped()):a.isCut()?(i.logEventCut(n,t.element,e.purpose),fw.complete()):vn(t.element).fold(function(){return i.logNoParent(n,t.element,e.purpose),fw.complete()},function(o){return i.logEventResponse(n,t.element,e.purpose),fw.resume(o)})})},dw=function(t,n,e,o,r,i){return lw(t,n,e,o,r,i).fold(C,function(o){return dw(t,n,e,o,r,i)},k)},mw=function(t,n,e){var o,r,i=(o=n,r=lr(!1),{stop:function(){r.set(!0)},cut:p,isStopped:r.get,isCut:k,event:o,setSource:S("Cannot set source of a broadcasted event"),getSource:S("Cannot get source of a broadcasted event")});return G(t,function(t){var n=t.descHandler;mu(n)(i)}),i.isStopped()},gw=function(t,n,e,o,r){var i=sw(e,o);return dw(t,n,e,o,i,r)},pw=function(){var t={};return{registerId:function(n,e,o){mt(o,function(o,r){var i=void 0!==t[r]?t[r]:{};i[e]=function(t,n){return e=x.apply(void 0,[t.handler].concat(n)),o=t.purpose,{cHandler:e,purpose:o};var e,o}(o,n),t[r]=i})},unregisterId:function(n){mt(t,function(t,e){wt(t,n)&&delete t[n]})},filterByType:function(n){return xt(t,n).map(function(t){return vt(t,function(t,n){return function(t,n){return{id:t,descHandler:n}}(n,t)})}).getOr([])},find:function(n,e,o){return xt(t,e).bind(function(t){return xr(o,function(n){return function(t,n){return Zi(n).bind(function(n){return xt(t,n)}).map(function(t){return function(t,n){return{element:t,descHandler:n}}(n,t)})}(t,n)},n)})}}},hw=function(){var t=pw(),n={},e=function(t){var n=t.element;return Zi(n).getOrThunk(function(){return n="uid-",e=t.element,o=qi(Ji+n),Qi(e,o),o;var n,e,o})},o=function(e){Zi(e.element).each(function(e){delete n[e],t.unregisterId(e)})};return{find:function(n,e,o){return t.find(n,e,o)},filter:function(n){return t.filterByType(n)},register:function(r){var i=e(r);St(n,i)&&function(t,e){var r=n[e];if(r!==t)throw new Error('The tagId "'+e+'" is already used by: '+ji(r.element)+"\nCannot use it for: "+ji(t.element)+"\nThe conflicting element is"+(Bn(r.element)?" ":" not ")+"already in the DOM");o(t)}(r,i);var u=[r];t.registerId(u,i,r.events),n[i]=r},unregister:o,getById:function(t){return xt(n,t)}}},vw=md({name:"Container",factory:function(t){var n=t.dom,e=n.attributes,o=T(n,["attributes"]);return{uid:t.uid,dom:_({tag:"div",attributes:_({role:"presentation"},e)},o),components:t.components,behaviours:dl(t.containerBehaviours),events:t.events,domModification:t.domModification,eventOrder:t.eventOrder}},configFields:[er("components",[]),ll("containerBehaviours",[]),er("events",{}),er("domModification",{}),er("eventOrder",{})]}),bw=function(t){var n=function(n){return vn(t.element).fold(C,function(t){return fn(n,t)})},e=hw(),o=function(t,o){return e.find(n,t,o)},r=cw(t.element,{triggerEvent:function(t,n){return ua(t,n.target,function(e){return function(t,n,e,o){return gw(t,n,e,e.target,o)}(o,t,n,e)})}}),i={debugInfo:v("real"),triggerEvent:function(t,n,e){ua(t,n,function(r){return gw(o,t,e,n,r)})},triggerFocus:function(t,n){Zi(t).fold(function(){hc(t)},function(e){ua(Yr(),t,function(e){return function(t,n,e,o,r){var i=sw(e,o);lw(t,n,e,o,i,r)}(o,Yr(),{originator:n,kill:p,prevent:p,target:t},t,e),!1})})},triggerEscape:function(t,n){i.triggerEvent("keydown",t.element,n.event)},getByUid:function(t){return g(t)},getByDom:function(t){return h(t)},build:ju,addToGui:function(t){c(t)},removeFromGui:function(t){s(t)},addToWorld:function(t){u(t)},removeFromWorld:function(t){a(t)},broadcast:function(t){l(t)},broadcastOn:function(t,n){d(t,n)},broadcastEvent:function(t,n){m(t,n)},isConnected:C},u=function(t){t.connect(i),Lt(t.element)||(e.register(t),G(t.components(),u),i.triggerEvent(ri(),t.element,{target:t.element}))},a=function(t){Lt(t.element)||(G(t.components(),a),e.unregister(t)),t.disconnect()},c=function(n){Tf(t,n)},s=function(t){Af(t)},f=function(t){var n=e.filter($r());G(n,function(n){var e=n.descHandler;mu(e)(t)})},l=function(t){f({universal:!0,data:t})},d=function(t,n){f({universal:!1,channels:t,data:n})},m=function(t,n){var o=e.filter(t);return mw(o,n)},g=function(t){return e.getById(t).fold(function(){return Re.error(new Error('Could not find component with uid: "'+t+'" in system.'))},Re.value)},h=function(t){var n=Zi(t).getOr("not found");return g(n)};return u(t),{root:t,element:t.element,destroy:function(){r.unbind(),xe(t.element)},add:c,remove:s,getByUid:g,getByDom:h,addToWorld:u,removeFromWorld:a,broadcast:l,broadcastOn:d,broadcastEvent:m}},yw=v([er("prefix","form-field"),ll("fieldBehaviours",[bd,fl])]),xw=v([zl({schema:[zo("dom")],name:"label"}),zl({factory:{sketch:function(t){return{uid:t.uid,dom:{tag:"span",styles:{display:"none"},attributes:{"aria-hidden":"true"},innerHtml:t.text}}}},schema:[zo("text")],name:"aria-descriptor"}),Hl({factory:{sketch:function(t){var n=gr(t,["factory"]);return t.factory.sketch(n)}},schema:[zo("factory")],name:"field"})]),ww=gd({name:"FormField",configFields:yw(),partFields:xw(),factory:function(t,n,e,o){var r=ml(t.fieldBehaviours,[bd.config({find:function(n){return Zl(n,t,"field")}}),fl.config({store:{mode:"manual",getValue:function(t){return bd.getCurrent(t).bind(fl.getValue)}
95,setValue:function(t,n){bd.getCurrent(t).each(function(t){fl.setValue(t,n)})}}})]),i=Oi([Ri(function(n,e){var o=nd(n,t,["label","field","aria-descriptor"]);o.field().each(function(n){var e=qi(t.prefix);o.label().each(function(t){Rn(t.element,"for",e),Rn(n.element,"id",e)}),o["aria-descriptor"]().each(function(e){var o=qi(t.prefix);Rn(e.element,"id",o),Rn(n.element,"aria-describedby",o)})})})]),u={getField:function(n){return Zl(n,t,"field")},getLabel:function(n){return Zl(n,t,"label")}};return{uid:t.uid,dom:t.dom,components:n,behaviours:r,events:i,apis:u}},apis:{getField:function(t,n){return t.getField(n)},getLabel:function(t,n){return t.getLabel(n)}}}),Sw=Object.freeze({__proto__:null,exhibit:function(t,n){return du({attributes:hr([{key:n.tabAttr,value:"true"}])})}}),kw=[er("tabAttr","data-alloy-tabstop")],Cw=sc({fields:kw,name:"tabstopping",active:Sw}),Ow=tinymce.util.Tools.resolve("tinymce.html.Entities"),_w=function(t,n,e,o){var r=Tw(t,n,e,o);return ww.sketch(r)},Tw=function(t,n,e,o){return{dom:Ew(e),components:t.toArray().concat([n]),fieldBehaviours:ac(o)}},Ew=function(t){return{tag:"div",classes:["tox-form__group"].concat(t)}},Dw=function(t,n){return ww.parts.label({dom:{tag:"label",classes:["tox-label"],innerHtml:n.translate(t)}})},Aw=qi("form-component-change"),Bw=qi("form-close"),Mw=qi("form-cancel"),Fw=qi("form-action"),Iw=qi("form-submit"),Rw=qi("form-block"),Nw=qi("form-unblock"),Pw=qi("form-tabchange"),Vw=qi("form-resize"),Hw=function(t,n){var e,o,r,i=t.label.map(function(t){return Dw(t,n)}),u=function(t){return function(n,e){Zu(e.event.target,"[data-collection-item-value]").each(function(o){t(n,e,o,Pn(o,"data-collection-item-value"))})}},a=u(function(e,o,r,i){o.stop(),n.isDisabled()||xi(e,Fw,{name:t.name,value:i})}),c=[Ei(Ir(),u(function(t,n,e){hc(e)})),Ei(zr(),a),Ei(ti(),a),Ei(Rr(),u(function(t,n,e){Qu(t.element,"."+Zv).each(function(t){Eu(t,Zv)}),_u(e,Zv)})),Ei(Nr(),u(function(t){Qu(t.element,"."+Zv).each(function(t){Eu(t,Zv)})})),Vi(u(function(n,e,o,r){xi(n,Fw,{name:t.name,value:r})}))],s=function(t,n){return W(js(t.element,".tox-collection__item"),n)},f=ww.parts.field({dom:{tag:"div",classes:["tox-collection"].concat(1!==t.columns?["tox-collection--grid"]:["tox-collection--list"])},components:[],factory:{sketch:b},behaviours:ac([Md.config({disabled:n.isDisabled,onDisabled:function(t){s(t,function(t){_u(t,"tox-collection__item--state-disabled"),Rn(t,"aria-disabled",!0)})},onEnabled:function(t){s(t,function(t){Eu(t,"tox-collection__item--state-disabled"),Ln(t,"aria-disabled")})}}),vy(),jg.config({}),fl.config({store:{mode:"memory",initialValue:[]},onSetValue:function(e,o){!function(e,o){var r=W(o,function(e){var o=Zh.translate(e.text),r=1===t.columns?'<div class="tox-collection__item-label">'+o+"</div>":"",i='<div class="tox-collection__item-icon">'+e.icon+"</div>",u={_:" "," - ":" ","-":" "},a=o.replace(/\_| \- |\-/g,function(t){return u[t]});return'<div class="tox-collection__item'+(n.isDisabled()?" tox-collection__item--state-disabled":"")+'" tabindex="-1" data-collection-item-value="'+Ow.encodeAllRaw(e.value)+'" title="'+a+'" aria-label="'+a+'">'+i+r+"</div>"}),i="auto"!==t.columns&&t.columns>1?j(r,t.columns):[r],u=W(i,function(t){return'<div class="tox-collection__group">'+t.join("")+"</div>"});Li(e.element,u.join(""))}(e,o),"auto"===t.columns&&Ab(e,5,"tox-collection__item").each(function(t){var n=t.numRows,o=t.numColumns;Vg.setGridSize(e,n,o)}),yi(e,Vw)}}),Cw.config({}),Vg.config((o=t.columns,r="normal",1===o?{mode:"menu",moveOnTab:!1,selector:".tox-collection__item"}:"auto"===o?{mode:"flatgrid",selector:".tox-collection__item",initSize:{numColumns:1,numRows:1}}:{mode:"matrix",selectors:{row:"color"===r?".tox-swatches__row":".tox-collection__group",cell:"color"===r?".tox-swatch":".tox-collection__item"}})),Wg("collection-events",c)]),eventOrder:(e={},e[Qr()]=["disabling","alloy.base.behaviour","collection-events"],e)});return _w(i,f,["tox-form__group--collection"],[])},Lw=v([Ko("data"),er("inputAttributes",{}),er("inputStyles",{}),er("tag","input"),er("inputClasses",[]),pa("onSetValue"),er("styles",{}),er("eventOrder",{}),ll("inputBehaviours",[fl,Kg]),er("selectOnFocus",!0)]),zw=function(t){return ac([Kg.config({onFocus:t.selectOnFocus?function(t){var n=t.element,e=Mu(n);n.dom.setSelectionRange(0,e.length)}:p})])},Uw=function(t){return _(_({},zw(t)),ml(t.inputBehaviours,[fl.config({store:_(_({mode:"manual"},t.data.map(function(t){return{initialValue:t}}).getOr({})),{getValue:function(t){return Mu(t.element)},setValue:function(t,n){Mu(t.element)!==n&&Fu(t.element,n)}}),onSetValue:t.onSetValue})]))},jw=function(t){return{tag:t.tag,attributes:_({type:"text"},t.inputAttributes),styles:t.inputStyles,classes:t.inputClasses}},Ww=md({name:"Input",configFields:Lw(),factory:function(t,n){return{uid:t.uid,dom:jw(t),components:[],behaviours:Uw(t),eventOrder:t.eventOrder}}}),Gw={},Xw={exports:Gw};!function(t,n,o,r){!function(e,r){"object"==typeof n&&void 0!==o?o.exports=r():"function"==typeof t&&t.amd?t(r):(e="undefined"!=typeof globalThis?globalThis:e||self).EphoxContactWrapper=r()}(this,function(){var t,n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{},o={exports:{}};t=o,function(n){var e=setTimeout;function o(){}function r(t){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],f(t,this)}function i(t,n){for(;3===t._state;)t=t._value;0!==t._state?(t._handled=!0,r._immediateFn(function(){var e=1===t._state?n.onFulfilled:n.onRejected;if(null!==e){var o;try{o=e(t._value)}catch(r){return void a(n.promise,r)}u(n.promise,o)}else(1===t._state?u:a)(n.promise,t._value)})):t._deferreds.push(n)}function u(t,n){try{if(n===t)throw new TypeError("A promise cannot be resolved with itself.");if(n&&("object"==typeof n||"function"==typeof n)){var e=n.then;if(n instanceof r)return t._state=3,t._value=n,void c(t);if("function"==typeof e)return void f((o=e,i=n,function(){o.apply(i,arguments)}),t)}t._state=1,t._value=n,c(t)}catch(u){a(t,u)}var o,i}function a(t,n){t._state=2,t._value=n,c(t)}function c(t){2===t._state&&0===t._deferreds.length&&r._immediateFn(function(){t._handled||r._unhandledRejectionFn(t._value)});for(var n=0,e=t._deferreds.length;n<e;n++)i(t,t._deferreds[n]);t._deferreds=null}function s(t,n,e){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof n?n:null,this.promise=e}function f(t,n){var e=!1;try{t(function(t){e||(e=!0,u(n,t))},function(t){e||(e=!0,a(n,t))})}catch(o){if(e)return;e=!0,a(n,o)}}r.prototype.catch=function(t){return this.then(null,t)},r.prototype.then=function(t,n){var e=new this.constructor(o);return i(this,new s(t,n,e)),e},r.all=function(t){var n=Array.prototype.slice.call(t);return new r(function(t,e){if(0===n.length)return t([]);var o=n.length;function r(i,u){try{if(u&&("object"==typeof u||"function"==typeof u)){var a=u.then;if("function"==typeof a)return void a.call(u,function(t){r(i,t)},e)}n[i]=u,0==--o&&t(n)}catch(c){e(c)}}for(var i=0;i<n.length;i++)r(i,n[i])})},r.resolve=function(t){return t&&"object"==typeof t&&t.constructor===r?t:new r(function(n){n(t)})},r.reject=function(t){return new r(function(n,e){e(t)})},r.race=function(t){return new r(function(n,e){for(var o=0,r=t.length;o<r;o++)t[o].then(n,e)})},r._immediateFn="function"==typeof setImmediate?function(t){setImmediate(t)}:function(t){e(t,0)},r._unhandledRejectionFn=function(t){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",t)},r._setImmediateFn=function(t){r._immediateFn=t},r._setUnhandledRejectionFn=function(t){r._unhandledRejectionFn=t},t.exports?t.exports=r:n.Promise||(n.Promise=r)}(n);var r=o.exports;return{boltExport:("undefined"!=typeof window?window:Function("return this;")()).Promise||r}})}(void 0,Gw,Xw);var qw,Yw=Xw.exports.boltExport,Kw=function(t){var n=I.none(),e=[],o=function(t){r()?u(t):e.push(t)},r=function(){return n.isSome()},i=function(t){G(t,u)},u=function(t){n.each(function(n){setTimeout(function(){t(n)},0)})};
95return t(function(t){r()||(n=I.some(t),i(e),e=[])}),{get:o,map:function(t){return Kw(function(n){o(function(e){n(t(e))})})},isReady:r}},Jw={nu:Kw,pure:function(t){return Kw(function(n){n(t)})}},$w=function(t){setTimeout(function(){throw t},0)},Qw=function(t){var n=function(n){t().then(n,$w)};return{map:function(n){return Qw(function(){return t().then(n)})},bind:function(n){return Qw(function(){return t().then(function(t){return n(t).toPromise()})})},anonBind:function(n){return Qw(function(){return t().then(function(){return n.toPromise()})})},toLazy:function(){return Jw.nu(n)},toCached:function(){var n=null;return Qw(function(){return null===n&&(n=t()),n})},toPromise:t,get:n}},Zw=function(t){return Qw(function(){return new Yw(t)})},tS=function(t){return Qw(function(){return Yw.resolve(t)})},nS=["input","textarea"],eS=function(t){var n=Pt(t);return L(nS,n)},oS=function(t,n){var e=n.getRoot(t).getOr(t.element);Eu(e,n.invalidClass),n.notify.each(function(n){eS(t.element)&&Rn(t.element,"aria-invalid",!1),n.getContainer(t).each(function(t){Li(t,n.validHtml)}),n.onValid(t)})},rS=function(t,n,e,o){var r=n.getRoot(t).getOr(t.element);_u(r,n.invalidClass),n.notify.each(function(n){eS(t.element)&&Rn(t.element,"aria-invalid",!0),n.getContainer(t).each(function(t){Li(t,o)}),n.onInvalid(t,o)})},iS=function(t,n,e){return n.validator.fold(function(){return tS(Re.value(!0))},function(n){return n.validate(t)})},uS=function(t,n,e){return n.notify.each(function(n){n.onValidate(t)}),iS(t,n).map(function(e){return t.getSystem().isConnected()?e.fold(function(e){return rS(t,n,0,e),Re.error(e)},function(e){return oS(t,n),Re.value(e)}):Re.error("No longer in system")})},aS=Object.freeze({__proto__:null,markValid:oS,markInvalid:rS,query:iS,run:uS,isInvalid:function(t,n){var e=n.getRoot(t).getOr(t.element);return Du(e,n.invalidClass)}}),cS=Object.freeze({__proto__:null,events:function(t,n){return t.validator.map(function(n){return Oi([Ei(n.onEvent,function(n){uS(n,t).get(b)})].concat(n.validateOnLoad?[Ri(function(n){uS(n,t).get(p)})]:[]))}).getOr({})}}),sS=[zo("invalidClass"),er("getRoot",I.none),nr("notify",[er("aria","alert"),er("getContainer",I.none),er("validHtml",""),pa("onValid"),pa("onInvalid"),pa("onValidate")]),nr("validator",[zo("validate"),er("onEvent","input"),er("validateOnLoad",!0)])],fS=sc({fields:sS,name:"invalidating",active:cS,apis:aS,extra:{validation:function(t){return function(n){var e=fl.getValue(n);return tS(t(e))}}}}),lS=Object.freeze({__proto__:null,getCoupled:function(t,n,e,o){return e.getOrCreate(t,n,o)}}),dS=[Uo("others",Mo(Re.value,wo()))],mS=sc({fields:dS,name:"coupling",apis:lS,state:Object.freeze({__proto__:null,init:function(){var t={},n=v({});return fu({readState:n,getOrCreate:function(n,e,o){var r=lt(e.others);if(r)return xt(t,o).getOrThunk(function(){var r=xt(e.others,o).getOrDie("No information found for coupled component: "+o)(n),i=n.getSystem().build(r);return t[o]=i,i});throw new Error("Cannot find coupled component: "+o+". Known coupled components: "+JSON.stringify(r,null,2))}})}})}),gS=v("sink"),pS=v(zl({name:gS(),overrides:v({dom:{tag:"div"},behaviours:ac([Sf.config({useFixed:C})]),events:Oi([Fi(Pr()),Fi(Ar()),Fi(zr())])})}));!function(t){t[t.HighlightFirst=0]="HighlightFirst",t[t.HighlightNone=1]="HighlightNone"}(qw||(qw={}));var hS,vS,bS,yS=function(t,n){var e=t.getHotspot(n).getOr(n),o=t.getAnchorOverrides();return t.layouts.fold(function(){return{type:"hotspot",hotspot:e,overrides:o}},function(t){return{type:"hotspot",hotspot:e,overrides:o,layouts:t}})},xS=function(t,n,e,o,r,i,u){return function(t,n,e,o,r,i,u){var a=function(t,n,e){return(0,t.fetch)(e).map(n)}(t,n,o),c=CS(o,t);return a.map(function(t){return t.bind(function(t){return I.from(Dp.sketch(_(_({},i.menu()),{uid:tu(""),data:t,highlightImmediately:u===qw.HighlightFirst,onOpenMenu:function(t,n){var o=c().getOrDie();Sf.position(o,n,{anchor:e}),Wf.decloak(r)},onOpenSubmenu:function(t,n,e){var o=c().getOrDie();Sf.position(o,e,{anchor:{type:"submenu",item:n}}),Wf.decloak(r)},onRepositionMenu:function(t,n,o){var r=c().getOrDie();Sf.position(r,n,{anchor:e}),G(o,function(t){Sf.position(r,t.triggeredMenu,{anchor:{type:"submenu",item:t.triggeringItem}})})},onEscape:function(){return Kg.focus(o),Wf.close(r),I.some(!0)}})))})})}(t,n,yS(t,e),e,o,r,u).map(function(t){return t.fold(function(){Wf.isOpen(o)&&Wf.close(o)},function(t){Wf.cloak(o),Wf.open(o,t),i(o)}),o})},wS=function(t,n,e,o,r,i,u){return Wf.close(o),tS(o)},SS=function(t,n,e,o,r,i){var u=mS.getCoupled(e,"sandbox");return(Wf.isOpen(u)?wS:xS)(t,n,e,u,o,r,i)},kS=function(t,n,e){var o,r,i=bd.getCurrent(n).getOr(n),u=se(t.element);e?jn(i.element,"min-width",u+"px"):(o=i.element,r=u,ce.set(o,r))},CS=function(t,n){return t.getSystem().getByUid(n.uid+"-"+gS()).map(function(t){return function(){return Re.value(t)}}).getOrThunk(function(){return n.lazySink.fold(function(){return function(){return Re.error(new Error("No internal sink is specified, nor could an external sink be found"))}},function(n){return function(){return n(t)}})})},OS=function(t){Wf.getState(t).each(function(t){Dp.repositionMenus(t)})},_S=function(t,n,e){var o=ta(),r=CS(n,t);return{dom:{tag:"div",classes:t.sandboxClasses,attributes:{id:o.id,role:"listbox"}},behaviours:pl(t.sandboxBehaviours,[fl.config({store:{mode:"memory",initialValue:n}}),Wf.config({onOpen:function(r,i){var u=yS(t,n);o.link(n.element),t.matchWidth&&kS(u.hotspot,i,t.useMinWidth),t.onOpen(u,r,i),void 0!==e&&void 0!==e.onOpen&&e.onOpen(r,i)},onClose:function(t,r){o.unlink(n.element),void 0!==e&&void 0!==e.onClose&&e.onClose(t,r)},isPartOf:function(t,e,o){return ea(e,o)||ea(n,o)},getAttachPoint:function(){return r().getOrDie()}}),bd.config({find:function(t){return Wf.getState(t).bind(function(t){return bd.getCurrent(t)})}}),mc.config({channels:_(_({},Kf({isExtraPart:k})),$f({doReposition:OS}))})])}},TS=function(t){var n=mS.getCoupled(t,"sandbox");OS(n)},ES=function(){return[er("sandboxClasses",[]),gl("sandboxBehaviours",[bd,mc,Wf,fl])]},DS=v([zo("dom"),zo("fetch"),pa("onOpen"),ha("onExecute"),er("getHotspot",I.some),er("getAnchorOverrides",v({})),fs(),ll("dropdownBehaviours",[ap,mS,Vg,Kg]),zo("toggleClass"),er("eventOrder",{}),Ko("lazySink"),er("matchWidth",!1),er("useMinWidth",!1),Ko("role")].concat(ES())),AS=v([Ll({schema:[da()],name:"menu",defaults:function(t){return{onExecute:t.onExecute}}}),pS()]),BS=gd({name:"Dropdown",configFields:DS(),partFields:AS(),factory:function(t,n,e,o){var r,i,u=function(t){Wf.getState(t).each(function(t){Dp.highlightPrimary(t)})},a={expand:function(n){ap.isOn(n)||SS(t,b,n,o,p,qw.HighlightNone).get(p)},open:function(n){ap.isOn(n)||SS(t,b,n,o,p,qw.HighlightFirst).get(p)},isOpen:ap.isOn,close:function(n){ap.isOn(n)&&SS(t,b,n,o,p,qw.HighlightFirst).get(p)},repositionMenus:function(t){ap.isOn(t)&&TS(t)}},c=function(t,n){return wi(t),I.some(!0)};return{uid:t.uid,dom:t.dom,components:n,behaviours:ml(t.dropdownBehaviours,[ap.config({toggleClass:t.toggleClass,aria:{mode:"exp
95anded"}}),mS.config({others:{sandbox:function(n){return _S(t,n,{onOpen:function(){return ap.on(n)},onClose:function(){return ap.off(n)}})}}}),Vg.config({mode:"special",onSpace:c,onEnter:c,onDown:function(t,n){if(BS.isOpen(t)){var e=mS.getCoupled(t,"sandbox");u(e)}else BS.open(t);return I.some(!0)},onEscape:function(t,n){return BS.isOpen(t)?(BS.close(t),I.some(!0)):I.none()}}),Kg.config({})]),events:sp(I.some(function(n){SS(t,b,n,o,u,qw.HighlightFirst).get(p)})),eventOrder:_(_({},t.eventOrder),(r={},r[Qr()]=["disabling","toggling","alloy.base.behaviour"],r)),apis:a,domModification:{attributes:_(_({"aria-haspopup":"true"},t.role.fold(function(){return{}},function(t){return{role:t}})),"button"===t.dom.tag?{type:(i="type",xt(t.dom,"attributes").bind(function(t){return xt(t,i)})).getOr("button")}:{})}}},apis:{open:function(t,n){return t.open(n)},expand:function(t,n){return t.expand(n)},close:function(t,n){return t.close(n)},isOpen:function(t,n){return t.isOpen(n)},repositionMenus:function(t,n){return t.repositionMenus(n)}}}),MS=Object.freeze({__proto__:null,events:function(){return Oi([_i(Gr(),C)])},exhibit:function(){return du({styles:{"-webkit-user-select":"none","user-select":"none","-ms-user-select":"none","-moz-user-select":"-moz-none"},attributes:{unselectable:"on"}})}}),FS=sc({fields:[],name:"unselecting",active:MS}),IS=qi("color-input-change"),RS=qi("color-swatch-change"),NS=qi("color-picker-cancel"),PS=function(t,n,e){var o=ww.parts.field({factory:Ww,inputClasses:["tox-textfield"],onSetValue:function(t){return fS.run(t).get(p)},inputBehaviours:ac([Md.config({disabled:n.providers.isDisabled}),vy(),Cw.config({}),fS.config({invalidClass:"tox-textbox-field-invalid",getRoot:function(t){return vn(t.element)},notify:{onValid:function(t){var n=fl.getValue(t);xi(t,IS,{color:n})}},validator:{validateOnLoad:!1,validate:function(t){var n=fl.getValue(t);if(0===n.length)return tS(Re.value(!0));var e=Rt.fromTag("span");jn(e,"background-color",n);var o=Yn(e,"background-color").fold(function(){return Re.error("blah")},function(t){return Re.value(n)});return tS(o)}}})]),selectOnFocus:!1}),r=t.label.map(function(t){return Dw(t,n.providers)}),i=function(t,n){xi(t,RS,{value:n})},u=Qp(function(t,n){return BS.sketch({dom:t.dom,components:t.components,toggleClass:"mce-active",dropdownBehaviours:ac([yy(n.providers.isDisabled),vy(),FS.config({}),Cw.config({})]),layouts:t.layouts,sandboxClasses:["tox-dialog__popups"],lazySink:n.get
95Sink,fetch:function(e){return Zw(function(n){return t.fetch(n)}).map(function(o){return I.from(nw(Qe(Rx(qi("menu-value"),o,function(n){t.onItemAction(e,n)},t.columns,t.presets,Kv.CLOSE_ON_EXECUTE,k,n.providers),{movement:Px(t.columns,t.presets)})))})},parts:{menu:ub(0,0,t.presets)}})}({dom:{tag:"span",attributes:{"aria-label":n.providers.translate("Color swatch")}},layouts:{onRtl:function(){return[Ua,za,Xa]},onLtr:function(){return[za,Ua,Xa]}},components:[],fetch:Ax(e.getColors(),e.hasCustomColors()),columns:e.getColorCols(),presets:"color",onItemAction:function(t,n){u.getOpt(t).each(function(t){"custom"===n?e.colorPicker(function(n){n.fold(function(){return yi(t,NS)},function(n){i(t,n),Ox(n)})},"#ffffff"):i(t,"remove"===n?"":n)})}},n));return ww.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:r.toArray().concat([{dom:{tag:"div",classes:["tox-color-input"]},components:[o,u.asSpec()]}]),fieldBehaviours:ac([Wg("form-field-events",[Ei(IS,function(n,e){u.getOpt(n).each(function(t){jn(t.element,"background-color",e.event.color)}),xi(n,Aw,{name:t.name})}),Ei(RS,function(t,n){ww.getField(t).each(function(e){fl.setValue(e,n.event.value),bd.getCurrent(t).each(Kg.focus)})}),Ei(NS,function(t,n){ww.getField(t).each(function(n){bd.getCurrent(t).each(Kg.focus)})})])])})},VS=zl({schema:[zo("dom")],name:"label"}),HS=function(t){return zl({name:t+"-edge",overrides:function(n){return n.model.manager.edgeActions[t].fold(function(){return{}},function(t){return{events:Oi([Di(_r(),function(n,e,o){return t(n,o)},[n]),Di(Ar(),function(n,e,o){return t(n,o)},[n]),Di(Br(),function(n,e,o){o.mouseIsDown.get()&&t(n,o)},[n])])}})}})},LS=HS("top-left"),zS=HS("top"),US=HS("top-right"),jS=HS("right"),WS=HS("bottom-right"),GS=HS("bottom"),XS=HS("bottom-left"),qS=HS("left"),YS=Hl({name:"thumb",defaults:v({dom:{styles:{position:"absolute"}}}),overrides:function(t){return{events:Oi([Bi(_r(),t,"spectrum"),Bi(Tr(),t,"spectrum"),Bi(Er(),t,"spectrum"),Bi(Ar(),t,"spectrum"),Bi(Br(),t,"spectrum"),Bi(Fr(),t,"spectrum")])}}}),KS=Hl({schema:[Ho("mouseIsDown",function(){return lr(!1)})],name:"spectrum",overrides:function(t){var n=t.model.manager,e=function(e,o){return n.getValueFromEvent(o).map(function(o){return n.setValueFrom(e,t,o)})};return{behaviours:ac([Vg.config({mode:"special",onLeft:function(e){return n.onLeft(e,t)},onRight:function(e){return n.onRight(e,t)},onUp:function(e){return n.onUp(e,t)},onDown:function(e){return n.onDown(e,t)}}),Kg.config({})]),events:Oi([Ei(_r(),e),Ei(Tr(),e),Ei(Ar(),e),Ei(Br(),function(n,o){t.mouseIsDown.get()&&e(n,o)})])}}}),JS=[VS,qS,jS,zS,GS,LS,US,XS,WS,YS,KS],$S=v("slider.change.value"),QS=function(t){var n=t.event.raw;if(function(t){return-1!==t.type.indexOf("touch")}(n)){var e=n;return void 0!==e.touches&&1===e.touches.length?I.some(e.touches[0]).map(function(t){return re(t.clientX,t.clientY)}):I.none()}var o=n;return void 0!==o.clientX?I.some(o).map(function(t){return re(t.clientX,t.clientY)}):I.none()},ZS=function(t){return t.model.minX},tk=function(t){return t.model.minY},nk=function(t){return t.model.minX-1},ek=function(t){return t.model.minY-1},ok=function(t){return t.model.maxX},rk=function(t){return t.model.maxY},ik=function(t){return t.model.maxX+1},uk=function(t){return t.model.maxY+1},ak=function(t,n,e){return n(t)-e(t)},ck=function(t){return ak(t,ok,ZS)},sk=function(t){return ak(t,rk,tk)},fk=function(t){return ck(t)/2},lk=function(t){return sk(t)/2},dk=function(t){return t.stepSize},mk=function(t){return t.snapToGrid},gk=function(t){return t.snapStart},pk=function(t){return t.rounded},hk=function(t,n){return void 0!==t[n+"-edge"]},vk=function(t){return hk(t,"left")},bk=function(t){return hk(t,"right")},yk=function(t){return hk(t,"top")},xk=function(t){return hk(t,"bottom")},wk=function(t){return t.model.value.get()},Sk=function(t){return{x:t}},kk=function(t){return{y:t}},Ck=function(t,n){return{x:t,y:n}},Ok=function(t,n){xi(t,$S(),{value:n})},_k=function(t,n,e,o){return t<n?t:t>e?e:t===n?n-1:Math.max(n,t-o)},Tk=function(t,n,e,o){return t>e?t:t<n?n:t===e?e+1:Math.min(e,t+o)},Ek=function(t,n,e){return Math.max(n,Math.min(e,t))},Dk=function(t){var n=t.min,e=t.max,o=t.range,r=t.value,i=t.step,u=t.snap,a=t.snapStart,c=t.rounded,s=t.hasMinEdge,f=t.hasMaxEdge,l=t.minBound,d=t.maxBound,m=t.screenRange,g=s?n-1:n,p=f?e+1:e;if(r<l)return g;if(r>d)return p;var h=function(t,n,e){return Math.min(e,Math.max(t,n))-n}(r,l,d),v=Ek(h/m*o+n,g,p);return u&&v>=n&&v<=e?function(t,n,e,o,r){return r.fold(function(){var r=t-n,i=Math.round(r/o)*o;return Ek(n+i,n-1,e+1)},function(n){var r=(t-n)%o,i=Math.round(r/o),u=Math.floor((t-n)/o),a=Math.floor((e-n)/o),c=n+Math.min(a,u+i)*o;return Math.max(n,c)})}(v,n,e,i,a):c?Math.round(v):v},Ak=function(t){var n=t.min,e=t.max,o=t.range,r=t.value,i=t.hasMinEdge,u=t.hasMaxEdge,a=t.maxBound,c=t.maxOffset,s=t.centerMinEdge,f=t.centerMaxEdge;return r<n?i?0:s:r>e?u?a:f:(r-n)/o*c},Bk=function(t){return t.element.dom.getBoundingClientRect()},Mk=function(t,n){return t[n]},Fk=function(t){var n=Bk(t);return Mk(n,"left")},Ik=function(t){var n=Bk(t);return Mk(n,"right")},Rk=function(t){var n=Bk(t);return Mk(n,"top")},Nk=function(t){var n=Bk(t);return Mk(n,"bottom")},Pk=function(t){var n=Bk(t);return Mk(n,"width")},Vk=function(t){var n=Bk(t);return Mk(n,"height")},Hk=function(t,n,e){return(t+n)/2-e},Lk=function(t,n){var e=Bk(t),o=Bk(n),r=Mk(e,"left"),i=Mk(e,"right"),u=Mk(o,"left");return Hk(r,i,u)}
95,zk=function(t,n){var e=Bk(t),o=Bk(n),r=Mk(e,"top"),i=Mk(e,"bottom"),u=Mk(o,"top");return Hk(r,i,u)},Uk=function(t,n){xi(t,$S(),{value:n})},jk=function(t){return{x:t}},Wk=function(t,n,e){var o={min:ZS(n),max:ok(n),range:ck(n),value:e,step:dk(n),snap:mk(n),snapStart:gk(n),rounded:pk(n),hasMinEdge:vk(n),hasMaxEdge:bk(n),minBound:Fk(t),maxBound:Ik(t),screenRange:Pk(t)};return Dk(o)},Gk=function(t){return function(n,e){return function(t,n,e){var o=(t>0?Tk:_k)(wk(e).x,ZS(e),ok(e),dk(e));return Uk(n,jk(o)),I.some(o)}(t,n,e).map(C)}},Xk=function(t,n,e,o,r,i){var u=function(t,n,e,o,r){var i=Pk(t),u=o.bind(function(n){return I.some(Lk(n,t))}).getOr(0),a=r.bind(function(n){return I.some(Lk(n,t))}).getOr(i),c={min:ZS(n),max:ok(n),range:ck(n),value:e,hasMinEdge:vk(n),hasMaxEdge:bk(n),minBound:Fk(t),minOffset:0,maxBound:Ik(t),maxOffset:i,centerMinEdge:u,centerMaxEdge:a};return Ak(c)}(n,i,e,o,r);return Fk(n)-Fk(t)+u},qk=Gk(-1),Yk=Gk(1),Kk=I.none,Jk=I.none,$k={"top-left":I.none(),top:I.none(),"top-right":I.none(),right:I.some(function(t,n){Ok(t,Sk(ik(n)))}),"bottom-right":I.none(),bottom:I.none(),"bottom-left":I.none(),left:I.some(function(t,n){Ok(t,Sk(nk(n)))})},Qk=Object.freeze({__proto__:null,setValueFrom:function(t,n,e){var o=Wk(t,n,e),r=jk(o);return Uk(t,r),o},setToMin:function(t,n){var e=ZS(n);Uk(t,jk(e))},setToMax:function(t,n){var e=ok(n);Uk(t,jk(e))},findValueOfOffset:Wk,getValueFromEvent:function(t){return QS(t).map(function(t){return t.left})},findPositionOfValue:Xk,setPositionFromValue:function(t,n,e,o){var r=wk(e),i=Xk(t,o.getSpectrum(t),r.x,o.getLeftEdge(t),o.getRightEdge(t),e),u=se(n.element)/2;jn(n.element,"left",i-u+"px")},onLeft:qk,onRight:Yk,onUp:Kk,onDown:Jk,edgeActions:$k}),Zk=function(t,n){xi(t,$S(),{value:n})},tC=function(t){return{y:t}},nC=function(t,n,e){var o={min:tk(n),max:rk(n),range:sk(n),value:e,step:dk(n),snap:mk(n),snapStart:gk(n),rounded:pk(n),hasMinEdge:yk(n),hasMaxEdge:xk(n),minBound:Rk(t),maxBound:Nk(t),screenRange:Vk(t)};return Dk(o)},eC=function(t){return function(n,e){return function(t,n,e){var o=(t>0?Tk:_k)(wk(e).y,tk(e),rk(e),dk(e));return Zk(n,tC(o)),I.some(o)}(t,n,e).map(C)}},oC=function(t,n,e,o,r,i){var u=function(t,n,e,o,r){var i=Vk(t),u=o.bind(function(n){return I.some(zk(n,t))}).getOr(0),a=r.bind(function(n){return I.some(zk(n,t))}).getOr(i),c={min:tk(n),max:rk(n),range:sk(n),value:e,hasMinEdge:yk(n),hasMaxEdge:xk(n),minBound:Rk(t),minOffset:0,maxBound:Nk(t),maxOffset:i,centerMinEdge:u,centerMaxEdge:a};return Ak(c)}(n,i,e,o,r);return Rk(n)-Rk(t)+u},rC=I.none,iC=I.none,uC=eC(-1),aC=eC(1),cC={"top-left":I.none(),top:I.some(function(t,n){Ok(t,kk(ek(n)))}),"top-right":I.none(),right:I.none(),"bottom-right":I.none(),bottom:I.some(function(t,n){Ok(t,kk(uk(n)))}),"bottom-left":I.none(),left:I.none()},sC=Object.freeze({__proto__:null,setValueFrom:function(t,n,e){var o=nC(t,n,e),r=tC(o);return Zk(t,r),o},setToMin:function(t,n){var e=tk(n);Zk(t,tC(e))},setToMax:function(t,n){var e=rk(n);Zk(t,tC(e))},findValueOfOffset:nC,getValueFromEvent:function(t){return QS(t).map(function(t){return t.top})},findPositionOfValue:oC,setPositionFromValue:function(t,n,e,o){var r=wk(e),i=oC(t,o.getSpectrum(t),r.y,o.getTopEdge(t),o.getBottomEdge(t),e),u=ne(n.element)/2;jn(n.element,"top",i-u+"px")},onLeft:rC,onRight:iC,onUp:uC,onDown:aC,edgeActions:cC}),fC=function(t,n){xi(t,$S(),{value:n})},lC=function(t,n){return{x:t,y:n}},dC=function(t,n){return function(e,o){return function(t,n,e,o){var r=t>0?Tk:_k,i=n?wk(o).x:r(wk(o).x,ZS(o),ok(o),dk(o)),u=n?r(wk(o).y,tk(o),rk(o),dk(o)):wk(o).y;return fC(e,lC(i,u)),I.some(i)}(t,n,e,o).map(C)}}
95,mC=dC(-1,!1),gC=dC(1,!1),pC=dC(-1,!0),hC=dC(1,!0),vC={"top-left":I.some(function(t,n){Ok(t,Ck(nk(n),ek(n)))}),top:I.some(function(t,n){Ok(t,Ck(fk(n),ek(n)))}),"top-right":I.some(function(t,n){Ok(t,Ck(ik(n),ek(n)))}),right:I.some(function(t,n){Ok(t,Ck(ik(n),lk(n)))}),"bottom-right":I.some(function(t,n){Ok(t,Ck(ik(n),uk(n)))}),bottom:I.some(function(t,n){Ok(t,Ck(fk(n),uk(n)))}),"bottom-left":I.some(function(t,n){Ok(t,Ck(nk(n),uk(n)))}),left:I.some(function(t,n){Ok(t,Ck(nk(n),lk(n)))})},bC=Object.freeze({__proto__:null,setValueFrom:function(t,n,e){var o=Wk(t,n,e.left),r=nC(t,n,e.top),i=lC(o,r);return fC(t,i),i},setToMin:function(t,n){var e=ZS(n),o=tk(n);fC(t,lC(e,o))},setToMax:function(t,n){var e=ok(n),o=rk(n);fC(t,lC(e,o))},getValueFromEvent:function(t){return QS(t)},setPositionFromValue:function(t,n,e,o){var r=wk(e),i=Xk(t,o.getSpectrum(t),r.x,o.getLeftEdge(t),o.getRightEdge(t),e),u=oC(t,o.getSpectrum(t),r.y,o.getTopEdge(t),o.getBottomEdge(t),e),a=se(n.element)/2,c=ne(n.element)/2;jn(n.element,"left",i-a+"px"),jn(n.element,"top",u-c+"px")},onLeft:mC,onRight:gC,onUp:pC,onDown:hC,edgeActions:vC}),yC=gd({name:"Slider",configFields:[er("stepSize",1),er("onChange",p),er("onChoose",p),er("onInit",p),er("onDragStart",p),er("onDragEnd",p),er("snapToGrid",!1),er("rounded",!0),Ko("snapStart"),Uo("model",Po("mode",{x:[er("minX",0),er("maxX",100),Ho("value",function(t){return lr(t.mode.minX)}),zo("getInitialValue"),ya("manager",Qk)],y:[er("minY",0),er("maxY",100),Ho("value",function(t){return lr(t.mode.minY)}),zo("getInitialValue"),ya("manager",sC)],xy:[er("minX",0),er("maxX",100),er("minY",0),er("maxY",100),Ho("value",function(t){return lr({x:t.mode.minX,y:t.mode.minY})}),zo("getInitialValue"),ya("manager",bC)]})),ll("sliderBehaviours",[Vg,fl]),Ho("mouseIsDown",function(){return lr(!1)})],partFields:JS,factory:function(t,n,e,o){var r,i=function(n){return td(n,t,"thumb")},u=function(n){return td(n,t,"spectrum")},a=function(n){return Zl(n,t,"left-edge")},c=function(n){return Zl(n,t,"right-edge")},s=function(n){return Zl(n,t,"top-edge")},f=function(n){return Zl(n,t,"bottom-edge")},l=t.model,d=l.manager,m=function(n,e){d.setPositionFromValue(n,e,t,{getLeftEdge:a,getRightEdge:c,getTopEdge:s,getBottomEdge:f,getSpectrum:u})},g=function(t,n){l.value.set(n);var e=i(t);m(t,e)},p=function(n){var e=t.mouseIsDown.get();t.mouseIsDown.set(!1),e&&Zl(n,t,"thumb").each(function(e){var o=l.value.get();t.onChoose(n,e,o)})},h=function(n,e){e.stop(),t.mouseIsDown.set(!0),t.onDragStart(n,i(n))},v=function(n,e){e.stop(),t.onDragEnd(n,i(n)),p(n)};return{uid:t.uid,dom:t.dom,components:n,behaviours:ml(t.sliderBehaviours,[Vg.config({mode:"special",focusIn:function(n){return Zl(n,t,"spectrum").map(Vg.focusIn).map(C)}}),fl.config({store:{mode:"manual",getValue:function(t){return l.value.get()}}}),mc.config({channels:(r={},r[qf()]={onReceive:p},r)})]),events:Oi([Ei($S(),function(n,e){!function(n,e){g(n,e);var o=i(n);t.onChange(n,o,e),I.some(!0)}(n,e.event.value)}),Ri(function(n,e){var o=l.getInitialValue();l.value.set(o);var r=i(n);m(n,r);var a=u(n);t.onInit(n,r,a,l.value.get())}),Ei(_r(),h),Ei(Er(),v),Ei(Ar(),h),Ei(Fr(),v)]),apis:{resetToMin:function(n){d.setToMin(n,t)},resetToMax:function(n){d.setToMax(n,t)},setValue:g,refresh:m},domModification:{styles:{position:"relative"}}}},apis:{setValue:function(t,n,e){t.setValue(n,e)},resetToMin:function(t,n){t.resetToMin(n)},resetToMax:function(t,n){t.resetToMax(n)},refresh:function(t,n){t.refresh(n)}}}),xC=qi("rgb-hex-update"),wC=qi("slider-update"),SC=qi("palette-update"),kC=[ll("formBehaviours",[fl])],CC=function(t){return"<alloy.field."+t+">"},OC=function(t,n){return{uid:t.uid,dom:t.dom,components:n,behaviours:ml(t.formBehaviours,[fl.config({store:{mode:"manual",getValue:function(n){var e=ed(n,t);return gt(e,function(t,n){return t().bind(function(t){var e,o,r=bd.getCurrent(t);return e=r,o=new Error("Cannot find a current component to extract the value from for form part '"+n+"': "+ji(t.element)),e.fold(function(){return Re.error(o)},Re.value)}).map(fl.getValue)})},setValue:function(n,e){mt(e,function(e,o){Zl(n,t,o).each(function(t){bd.getCurrent(t).each(function(t){fl.
95setValue(t,e)})})})}}})]),apis:{getField:function(n,e){return Zl(n,t,e).bind(bd.getCurrent)}}}},_C={getField:cu(function(t,n,e){return t.getField(n,e)}),sketch:function(t){var n,e={field:function(t,e){return n.push(t),Yl("form",CC(t),e)},record:v(n=[])},o=t(e),r=e.record(),i=W(r,function(t){return Hl({name:t,pname:CC(t)})});return sd("form",kC,i,OC,o)}},TC=qi("valid-input"),EC=qi("invalid-input"),DC=qi("validating-input"),AC=function(t,n,e,o){var r=function(e,o){return fS.config({invalidClass:n("invalid"),notify:{onValidate:function(t){xi(t,DC,{type:e})},onValid:function(t){xi(t,TC,{type:e,value:fl.getValue(t)})},onInvalid:function(t){xi(t,EC,{type:e,value:fl.getValue(t)})}},validator:{validate:function(n){var e=fl.getValue(n),r=o(e)?Re.value(!0):Re.error(t("aria.input.invalid"));return tS(r)},validateOnLoad:!1}})},i=function(e,o,i,u,a){var c=t("colorcustom.rgb.range"),s=[ww.parts.label({dom:{tag:"label",innerHtml:i,attributes:{"aria-label":u}}}),ww.parts.field({data:a,factory:Ww,inputAttributes:_({type:"text"},"hex"===o?{"aria-live":"polite"}:{}),inputClasses:[n("textfield")],inputBehaviours:ac([r(o,e),Cw.config({})]),onSetValue:function(t){fS.isInvalid(t)&&fS.run(t).get(p)}})],f="hex"!==o?[ww.parts["aria-descriptor"]({text:c})]:[];return{dom:{tag:"div",attributes:{role:"presentation"}},components:s.concat(f)}},u=function(t,n){var e=n.red,o=n.green,r=n.blue;fl.setValue(t,{red:e,green:o,blue:r})},a=Qp({dom:{tag:"div",classes:[n("rgba-preview")],styles:{"background-color":"white"},attributes:{role:"presentation"}}}),c=function(t,n){a.getOpt(t).each(function(t){jn(t.element,"background-color","#"+n.value)})};return md({factory:function(){var r={red:lr(I.some(255)),green:lr(I.some(255)),blue:lr(I.some(255)),hex:lr(I.some("ffffff"))},s=function(t){return r[t].get()},f=function(t,n){r[t].set(n)},l=function(t){var n=t.red,e=t.green,o=t.blue;f("red",I.some(n)),f("green",I.some(e)),f("blue",I.some(o))},d=function(t,n){var e=n.event;"hex"!==e.type?f(e.type,I.none()):o(t)},m=function(t,n,e){var o=parseInt(e,10);f(n,I.some(o)),s("red").bind(function(t){return s("green").bind(function(n){return s("blue").map(function(e){return rx(t,n,e,1)})})}).each(function(n){var e=function(t,n){var e=Qy(n);return _C.getField(t,"hex").each(function(n){Kg.isFocused(n)||fl.setValue(t,{hex:e.value})}),e}(t,n);xi(t,xC,{hex:e}),c(t,e)})},g=function(t,n){var o=n.event;!function(t){return"hex"===t.type}(o)?m(t,o.type,o.value):function(t,n){e(t);var o=Gy(n);f("hex",I.some(n));var r=ax(o);u(t,r),l(r),xi(t,xC,{hex:o}),c(t,o)}(t,o.value)},p=function(n){return{label:t("colorcustom.rgb."+n+".label"),description:t("colorcustom.rgb."+n+".description")}},h=p("red"),v=p("green"),b=p("blue"),y=p("hex");return Qe(_C.sketch(function(e){return{dom:{tag:"form",classes:[n("rgb-form")],attributes:{"aria-label":t("aria.color.picker")}},components:[e.field("red",ww.sketch(i(ix,"red",h.label,h.description,255))),e.field("green",ww.sketch(i(ix,"green",v.label,v.description,255))),e.field("blue",ww.sketch(i(ix,"blue",b.label,b.description,255))),e.field("hex",ww.sketch(i(Yy,"hex",y.label,y.description,"ffffff"))),a.asSpec()],formBehaviours:ac([fS.config({invalidClass:n("form-invalid")}),Wg("rgb-form-events",[Ei(TC,g),Ei(EC,d),Ei(DC,d)])])}}),{apis:{updateHex:function(t,n){fl.setValue(t,{hex:n.value}),function(t,n){var e=ax(n);u(t,e),l(e)}(t,n),c(t,n)}}})},name:"RgbForm",configFields:[],apis:{updateHex:function(t,n,e){t.updateHex(n,e)}},extraApis:{}})},BC=function(t,n){var e=yC.parts.spectrum({dom:{tag:"canvas",attributes:{role:"presentation"},classes:[n("sv-palette-spectrum")]}}),o=yC.parts.thumb({dom:{tag:"div",attributes:{role:"presentation"},classes:[n("sv-palette-thumb")],innerHtml:"<div class="+n("sv-palette-inner-thumb")+' role="presentation"></div>'}}),r=function(t,n){var e=t.width,o=t.height,r=t.getContext("2d");if(null!==r){r.fillStyle=n,r.fillRect(0,0,e,o);var i=r.createLinearGradient(0,0,e,0);i.addColorStop(0,"rgba(255,255,255,1)"),i.addColorStop(1,"rgba(255,255,255,0)"),r.fillStyle=i,r.fillRect(0,0,e,o);var u=r.createLinearGradient(0,0,0,o);u.addColorStop(0,"rgba(0,0,0,0)"),u.addColorStop(1,"rgba(0,0,0,1)"),r.fillStyle=u,r.fillRect(0,0,e,o)}};return md({factory:function(t){var i=v({x:0,y:0}),u=ac([bd.config({find:I.some}),Kg.config({})]);return yC.sketch({dom:{tag:"div",attributes:{role:"presentation"},classes:[n("sv-palette")]},model:{mode:"xy",getInitialValue:i},rounded:!1,components:[e,o],onChange:function(t,n,e){xi(t,SC,{value:e})},onInit:function(t,n,e,o){r(e.element.dom,fx(lx))},sliderBehaviours:u})},name:"SaturationBrightnessPalette",configFields:[],apis:{setHue:function(t,n,e){!function(t,n){var e=t.components()[0].element.dom,o=mx(n,100,100),i=ux(o);r(e,fx(i))}(n,e)},setThumb:function(t,n,e){!function(t,n){var e=gx(ax(n));yC.setValue(t,{x:e.saturation,y:100-e.value})}(n,e)}},extraApis:{}})},MC=function(t,n){return md({name:"ColourPicker",configFields:[zo("dom"),er("onValidHex",p),er("onInvalidHex",p)],factory:function(e){var o,r=AC(t,
95n,e.onValidHex,e.onInvalidHex),i=BC(0,n),u=function(t){return 100-t/360*100},a={paletteRgba:lr(lx),paletteHue:lr(0)},c=Qp(function(t,n){var e=yC.parts.spectrum({dom:{tag:"div",classes:[n("hue-slider-spectrum")],attributes:{role:"presentation"}}}),o=yC.parts.thumb({dom:{tag:"div",classes:[n("hue-slider-thumb")],attributes:{role:"presentation"}}});return yC.sketch({dom:{tag:"div",classes:[n("hue-slider")],attributes:{role:"presentation"}},rounded:!1,model:{mode:"y",getInitialValue:v({y:0})},components:[e,o],sliderBehaviours:ac([Kg.config({})]),onChange:function(t,n,e){xi(t,wC,{value:e})}})}(0,n)),s=Qp(i.sketch({})),f=Qp(r.sketch({})),l=function(t,n,e){s.getOpt(t).each(function(t){i.setHue(t,e)})},d=function(t,n){f.getOpt(t).each(function(t){r.updateHex(t,n)})},m=function(t,n,e){c.getOpt(t).each(function(t){yC.setValue(t,{y:u(e)})})},g=function(t,n){s.getOpt(t).each(function(t){i.setThumb(t,n)})},p=function(t,n,e,o){!function(t,n){var e=ax(t);a.paletteRgba.set(e),a.paletteHue.set(n)}(n,e),G(o,function(o){o(t,n,e)})};return{uid:e.uid,dom:e.dom,components:[s.asSpec(),c.asSpec(),f.asSpec()],behaviours:ac([Wg("colour-picker-events",[Ei(xC,(o=[l,m,g],function(t,n){var e=n.event.hex,r=function(t){return gx(ax(t))}(e);p(t,e,r.hue,o)})),Ei(SC,function(){var t=[d];return function(n,e){var o=e.event.value,r=a.paletteHue.get(),i=mx(r,o.x,100-o.y),u=px(i);p(n,u,r,t)}}()),Ei(wC,function(){var t=[l,d];return function(n,e){var o=function(t){return(100-t)/100*360}(e.event.value.y),r=a.paletteRgba.get(),i=gx(r),u=mx(o,i.saturation,i.value),c=px(u);p(n,c,o,t)}}())]),bd.config({find:function(t){return f.getOpt(t)}}),Vg.config({mode:"acyclic"})])}}})},FC=function(){return bd.config({find:I.some})},IC=function(t){return bd.config({find:t.getOpt})},RC=function(t){return bd.config({find:function(n){return xn(n.element,t).bind(function(t){return n.getSystem().getByDom(t).toOptional()})}})},NC={"colorcustom.rgb.red.label":"R","colorcustom.rgb.red.description":"Red component","colorcustom.rgb.green.label":"G","colorcustom.rgb.green.description":"Green component","colorcustom.rgb.blue.label":"B","colorcustom.rgb.blue.description":"Blue component","colorcustom.rgb.hex.label":"#","colorcustom.rgb.hex.description":"Hex color code","colorcustom.rgb.range":"Range 0 to 255","colorcustom.sb.saturation":"Saturation","colorcustom.sb.brightness":"Brightness","colorcustom.sb.picker":"Saturation and Brightness Picker","colorcustom.sb.palette":"Saturation and Brightness Palette","colorcustom.sb.instructions":"Use arrow keys to select saturation and brightness, on x and y axes","colorcustom.hue.hue":"Hue","colorcustom.hue.slider":"Hue Slider","colorcustom.hue.palette":"Hue Palette","colorcustom.hue.instructions":"Use arrow keys to select a hue","aria.color.picker":"Color Picker","aria.input.invalid":"Invalid input"},PC=function(t){return function(t){return NC[t]}(t)},VC=tinymce.util.Tools.resolve("tinymce.Resource"),HC=tinymce.util.Tools.resolve("tinymce.util.Tools"),LC=ho([er("preprocess",b),er("postprocess",b)]),zC=function(t,n,e){return fl.config(Qe({store:{mode:"manual",getValue:n,setValue:e}},t.map(function(t){return{store:{initialValue:t}}}).getOr({})))},UC=function(t,n,e){return zC(t,function(t){return n(t.element)},function(t,n){return e(t.element,n)})},jC=function(t,n){var e=Ro("RepresentingConfigs.memento processors",LC,n);return fl.config({store:{mode:"manual",getValue:function(n){var o=t.get(n),r=fl.getValue(o);return e.postprocess(r)},setValue:function(n,o){var r=e.preprocess(o),i=t.get(n);fl.setValue(i,r)}}})},WC=zC,GC=function(t){return UC(t,Hi,Li)},XC=function(t){return fl.config({store:{mode:"memory",initialValue:t}})},qC=function(t,n){var e=function(t,n){n.stop()},o=function(t){return function(n,e){G(t,function(t){t(n,e)})}},r=function(t,n){if(!Md.isDisabled(t)){var e=n.event.raw;u(t,e.dataTransfer.files)}},i=function(t,n){var e=n.event.raw.target;u(t,e.files)},u=function(e,o){fl.setValue(e,function(t,n){var e=HC.explode(n.getSetting("images_file_types","jpeg,jpg,jpe,jfi,jif,jfif,png,gif,bmp,webp","string"));return q(st(t),function(t){return z(e,function(n){return At(t.name.toLowerCase(),"."+n.toLowerCase())})})}(o,n)),xi(e,Aw,{name:t.name})},a=Qp({dom:{tag:"input",attributes:{type:"file",accept:"image/*"},styles:{display:"none"}},behaviours:ac([Wg("input-file-events",[Fi(zr()),Fi(ti())])])}),c=t.label.map(function(t){return Dw(t,n)}),s=ww.parts.field({factory:{sketch:function(t){return{uid:t.uid,dom:{tag:"div",classes:["tox-dropzone-container"]},behaviours:ac([XC([]),FC(),Md.config({}),ap.config({toggleClass:"dragenter",toggleOnExecute:!1}),Wg("dropzone-events",[Ei("dragenter",o([e,ap.toggle])),Ei("dragleave",o([e,ap.toggle])),Ei("dragover",e),Ei("drop",o([e,r])),Ei(Lr(),i)])]),components:[{dom:{tag:"div",classes:["tox-dropzone"],styles:{}},components:[{dom:{tag:"p",innerHtml:n.translate("Drop an image here")}},Jp.sketch({dom:{tag:"button",innerHtml:n.translate("Browse for an image"),styles:{position:"relative"},classes:["tox-button","tox-button--secondary"]},components:[a.asSpec()],action:function(t){a.get(t).element.dom.click()},buttonBehaviours:ac([Cw.config({}),yy(n.isDisabled),vy()])})]}]}}}});return _w(c,s,["tox-form__group--stretched"],[])},YC=qi("alloy-fake-before-tabstop"),KC=qi("alloy-fake-after-tabstop"),JC=function(t){return{dom:{tag:"div",styles:{width:"1px",height:"1px",outline:"none"},attributes:{tabindex:"0"},classes:t},behaviours:ac([Kg.config({ignore:!0}),Cw.config({})])}},$C=function(t){return{dom:{tag:"div",classes:["tox-navobj"]},components:[JC([YC]),t,JC([KC])],behaviours:ac([RC(1)])}},QC=function(t,n){xi(t,Pr(),{raw:{which:9,shiftKey:n}})},ZC=function(t,n){var e=n.element;Du(e,YC)?QC(t,!0):Du(e,KC)&&QC(t,!1)},tO=function(t){return ow(t,["."+YC,"."+KC].join(","),k)},nO=!(an().browser.isIE()||an().browser.isEdge()),eO=function(t,n){var e=nO&&t.sandboxed,o=_(_({},t.label.map(function(t){return{title:t}}).getOr({})),e?{sandbox:"allow-scripts allow-same-origin"}:{}),r=function(t){var n=lr("");return{getValue:function(t){return n.get()},setValue:function(e,o){if(t)Rn(e.element,"srcdoc",o);else{Rn(e.element,"src","javascript:''");var r=e.element.dom.contentWindow.document;r.open(),r.write(o),r.close()}n.set(o)}}}(e),i=t.label.map(function(t){return Dw(t,n)}),u=ww.parts.field({factory:{sketch:function(t){return $C({uid:t.uid,dom:{tag:"iframe",attributes:o},behaviours:ac([Cw.config({}),Kg.config({}),WC(I.none(),r.getValue,r.setValue)])})}}});return _w(i,u,["tox-form__group--stretched"],[])},oO=function(t,n){return uO(document.createElement("canvas"),t,n)},rO=function(t){var n=oO(t.width,t.height);return iO(n).drawImage(t,0,0),n},iO=function(t){return t.getContext("2d")},uO=function(t,n,e){return t.width=n,t.height=e,t}
95,aO=function(t){return t.naturalWidth||t.width},cO=function(t){return t.naturalHeight||t.height},sO=function(t){return new Yw(function(n,e){(function(t){var n=t.split(","),e=/data:([^;]+)/.exec(n[0]);if(!e)return I.none();for(var o=e[1],r=n[1],i=atob(r),u=i.length,a=Math.ceil(u/1024),c=new Array(a),s=0;s<a;++s){for(var f=1024*s,l=Math.min(f+1024,u),d=new Array(l-f),m=f,g=0;m<l;++g,++m)d[g]=i[m].charCodeAt(0);c[s]=new Uint8Array(d)}return I.some(new Blob(c,{type:o}))})(t).fold(function(){e("uri is not base64: "+t)},n)})},fO=function(t,n,e){return n=n||"image/png",d(HTMLCanvasElement.prototype.toBlob)?new Yw(function(o,r){t.toBlob(function(t){t?o(t):r()},n,e)}):sO(t.toDataURL(n,e))},lO=function(t){return function(t){return new Yw(function(n,e){var o=URL.createObjectURL(t),r=new Image,i=function(){r.removeEventListener("load",u),r.removeEventListener("error",a)},u=function(){i(),n(r)},a=function(){i(),e("Unable to load data of type "+t.type+": "+o)};r.addEventListener("load",u),r.addEventListener("error",a),r.src=o,r.complete&&setTimeout(u,0)})}(t).then(function(t){dO(t);var n=oO(aO(t),cO(t));return iO(n).drawImage(t,0,0),n})},dO=function(t){URL.revokeObjectURL(t.src)},mO=function(t,n,e){var o=n.type,r=v(o),i=v(e),u=function(n,e){return t.then(function(t){return function(t,n,e){return n=n||"image/png",t.toDataURL(n,e)}(t,n,e)})};return{getType:r,toBlob:function(){return Yw.resolve(n)},toDataURL:i,toBase64:function(){return e.split(",")[1]},toAdjustedBlob:function(n,e){return t.then(function(t){return fO(t,n,e)})},toAdjustedDataURL:u,toAdjustedBase64:function(t,n){return u(t,n).then(function(t){return t.split(",")[1]})},toCanvas:function(){return t.then(rO)}}},gO=function(t){return function(t){return new Yw(function(n){var e=new FileReader;e.onloadend=function(){n(e.result)},e.readAsDataURL(t)})}(t).then(function(n){return mO(lO(t),t,n)})},pO=function(t,n){return fO(t,n).then(function(n){return mO(Yw.resolve(t),n,t.toDataURL())})},hO=function(t,n,e){var o="string"==typeof t?parseFloat(t):t;return o>e?o=e:o<n&&(o=n),o},vO=[0,.01,.02,.04,.05,.06,.07,.08,.1,.11,.12,.14,.15,.16,.17,.18,.2,.21,.22,.24,.25,.27,.28,.3,.32,.34,.36,.38,.4,.42,.44,.46,.48,.5,.53,.56,.59,.62,.65,.68,.71,.74,.77,.8,.83,.86,.89,.92,.95,.98,1,1.06,1.12,1.18,1.24,1.3,1.36,1.42,1.48,1.54,1.6,1.66,1.72,1.78,1.84,1.9,1.96,2,2.12,2.25,2.37,2.5,2.62,2.75,2.87,3,3.2,3.4,3.6,3.8,4,4.3,4.7,4.9,5,5.5,6,6.5,6.8,7,7.3,7.5,7.8,8,8.4,8.7,9,9.4,9.6,9.8,10],bO=function(t,n){for(var e,o=[],r=new Array(25),i=0;i<5;i++){for(var u=0;u<5;u++)o[u]=n[u+5*i];for(u=0;u<5;u++){e=0;for(var a=0;a<5;a++)e+=t[u+5*a]*o[a];r[u+5*i]=e}}return r},yO=function(t,n){return t.toCanvas().then(function(e){return xO(e,t.getType(),n)})},xO=function(t,n,e){var o=iO(t),r=function(t,n){for(var e,o,r,i,u=t.data,a=n[0],c=n[1],s=n[2],f=n[3],l=n[4],d=n[5],m=n[6],g=n[7],p=n[8],h=n[9],v=n[10],b=n[11],y=n[12],x=n[13],w=n[14],S=n[15],k=n[16],C=n[17],O=n[18],_=n[19],T=0;T<u.length;T+=4)e=u[T],o=u[T+1],r=u[T+2],i=u[T+3],u[T]=e*a+o*c+r*s+i*f+l,u[T+1]=e*d+o*m+r*g+i*p+h,u[T+2]=e*v+o*b+r*y+i*x+w,u[T+3]=e*S+o*k+r*C+i*O+_;return t}(o.getImageData(0,0,t.width,t.height),e);return o.putImageData(r,0,0),pO(t,n)},wO=function(t,n,e){var o=iO(t),r=o.getImageData(0,0,t.width,t.height),i=o.getImageData(0,0,t.width,t.height);return i=function(t,n,e){for(var o=function(t,n,e){return t>e?t=e:t<n&&(t=n),t},r=Math.round(Math.sqrt(e.length)),i=Math.floor(r/2),u=t.data,a=n.data,c=t.width,s=t.height,f=0;f<s;f++)for(var l=0;l<c;l++){for(var d=0,m=0,g=0,p=0;p<r;p++)for(var h=0;h<r;h++){var v=o(l+h-i,0,c-1),b=4*(o(f+p-i,0,s-1)*c+v),y=e[p*r+h];d+=u[b]*y,m+=u[b+1]*y,g+=u[b+2]*y}var x=4*(f*c+l);a[x]=o(d,0,255),a[x+1]=o(m,0,255),a[x+2]=o(g,0,255)}return n}(r,i,e),o.putImageData(i,0,0),pO(t,n)},SO=function(t){return function(n,e){return yO(n,t([1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1],e))}},kO=function(t){return function(n){return yO(n,t)}}([-1,0,0,0,255,0,-1,0,0,255,0,0,-1,0,255,0,0,0,1,0,0,0,0,0,1]),CO=SO(function(t,n){return n=hO(255*n,-255,255),bO(t,[1,0,0,0,n,0,1,0,0,n,0,0,1,0,n,0,0,0,1,0,0,0,0,0,1])}),OO=SO(function(t,n){var e;return n=hO(n,-1,1),e=(n*=100)<0?127+n/100*127:127*(e=0==(e=n%1)?vO[n]:vO[Math.floor(n)]*(1-e)+vO[Math.floor(n)+1]*e)+127,bO(t,[e/127,0,0,0,.5*(127-e),0,e/127,0,0,.5*(127-e),0,0,e/127,0,.5*(127-e),0,0,0,1,0,0,0,0,0,1])}),_O=function(t,n,e,o){return yO(t,function(t,n,e,o){return n=hO(n,0,2),e=hO(e,0,2),o=hO(o,0,2),bO(t,[n,0,0,0,0,0,e,0,0,0,0,0,o,0,0,0,0,0,1,0,0,0,0,0,1])}([1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1],n,e,o))},TO=(hS=[0,-1,0,-1,5,-1,0,-1,0],function(t){return function(t,n){return t.toCanvas().then(function(e){return wO(e,t.getType(),n)})}(t,hS)}),EO=(vS=function(t,n){return 255*Math.pow(t/255,1-n)},function(t,n){return t.toCanvas().then(function(e){return function(t,n,e){for(var o=iO(t),r=new Array(256),i=0;i<r.length;i++)r[i]=vS(i,e);var u=function(t,n){for(var e=t.data,o=0;o<e.length;o+=4)e[o]=n[e[o]],e[o+1]=n[e[o+1]],e[o+2]=n[e[o+2]];return t}(o.getImageData(0,0,t.width,t.height),r);return o.putImageData(u,0,0),pO(t,n)}(e,t.getType(),n)})}),DO=function(t,n,e){var o=aO(t),r=cO(t),i=n/o,u=e/r,a=!1;(i<.5||i>2)&&(i=i<.5?.5:2,a=!0),(u<.5||u>2)&&(u=u<.5?.5:2,a=!0);var c=AO(t,i,u);return a?c.then(function(t){return DO(t,n,e)}):c},AO=function(t,n,e){return new Yw(function(o){var r=aO(t),i=cO(t),u=Math.floor(r*n),a=Math.floor(i*e),c=oO(u,a);iO(c).drawImage(t,0,0,r,i,0,0,u,a),o(c)})},BO=function(t,n){void 0===n&&(n=2);var e=Math.pow(10,n),o=Math.round(t*e);return Math.ceil(o/e)},MO=function(t,n,e){var o=(e<0?360+e:e)*Math.PI/180,r=t.width,i=t.height,u=Math.sin(o),a=Math.cos(o),c=BO(Math.abs(r*a)+Math.abs(i*u)),s=BO(Math.abs(r*u)+Math.abs(i*a)),f=oO(c,s),l=iO(f);return l.translate(c/2,s/2),l.rotate(o),l.drawImage(t,-r/2,-i/2),pO(f,n)},FO=function(t,n,e){var o=oO(t.width,t.height),r=iO(o);return"v"===e?(r.scale(1,-1),r.drawImage(t,0,-o.height)):(r.scale(-1,1),r.drawImage(t,-o.width,0)),pO(o,n)},IO=function(t,n,e,o,r,i){var u=oO(r,i);return iO(u).drawImage(t,-e,-o),pO(u,n)},RO=function(t){return kO(t)},NO=function(t){return TO(t)},PO=function(t,n){return EO(t,n)},VO=function(t,n){return CO(t,n)},HO=function(t,n){return OO(t,n)},LO=function(t,n){return function(t,n){return t.toCanvas().then(function(e){return FO(e,t.getType(),n)})}(t,n)},zO=function(t,n,e,o,r){return function(t,n,e,o,r){return t.toCanvas().then(function(i){return IO(i,t.getType(),n,e,o,r)})}(t,n,e,o,r)},UO=function(t,n,e){return function(t,n,e){return t.toCanvas().then(function(o){return DO(o,n,e).then(function(n){return pO(n,t.getType())})})}(t,n,e)},jO=function(t,n){return function(t,n){return t.toCanvas().then(function(e){return MO(e,t.getType(),n)})}(t,n)},WO=function(t,n,e){return av(t,{tag:"span",classes:["tox-icon","tox-tbtn__icon-wrap"],behaviours:e},n)},GO=function(t,n){return WO(t,n,[])},XO=function(t,n){return WO(t,n,[jg.config({})])},qO=function(t,n,e){return{dom:{tag:"span",innerHtml:e.translate(t),classes:[n+"__select-label"]},behaviours:ac([jg.config({})])}},YO=qi("toolbar.button.execute"),KO=((bS={})[Qr()]=["disabling","alloy.base.behaviour","toggling","toolbar-button-events"],bS),JO=qi("update-menu-text"),$O=qi("update-menu-icon"),QO=function(t,n,e){var o=lr(p),r=t.text.map(function(t){return Qp(qO(t,n,e.providers))}),i=t.icon.map(function(t){return Qp(XO(t,e.providers.icons))}),u=function(t,n){var e=fl.getValue(t);return Kg.focus(e),xi(e,"keydown",{raw:n.event.raw}),BS.close(e),I.some(!0)},a=t.role.fold(function(){return{}},function(t){return{role:t}}),c=t.tooltip.fold(function(){return{}},function(t){var n=e.providers.translate(t);return{title:n,"aria-label":n}}
95),s=av("chevron-down",{tag:"div",classes:[n+"__select-chevron"]},e.providers.icons);return Qp(BS.sketch(_(_(_({},t.uid?{uid:t.uid}:{}),a),{dom:{tag:"button",classes:[n,n+"--select"].concat(W(t.classes,function(t){return n+"--"+t})),attributes:_({},c)},components:Ty([i.map(function(t){return t.asSpec()}),r.map(function(t){return t.asSpec()}),I.some(s)]),matchWidth:!0,useMinWidth:!0,dropdownBehaviours:ac(E(E([],t.dropdownBehaviours,!0),[yy(function(){return t.disabled||e.providers.isDisabled()}),vy(),FS.config({}),jg.config({}),Wg("dropdown-events",[ky(t,o),Cy(t,o)]),Wg("menubutton-update-display-text",[Ei(JO,function(t,n){r.bind(function(n){return n.getOpt(t)}).each(function(t){jg.set(t,[Lu(e.providers.translate(n.event.text))])})}),Ei($O,function(t,n){i.bind(function(n){return n.getOpt(t)}).each(function(t){jg.set(t,[XO(n.event.icon,e.providers.icons)])})})])],!1)),eventOrder:Qe(KO,{mousedown:["focusing","alloy.base.behaviour","item-type-events","normal-dropdown-events"]}),sandboxBehaviours:ac([Vg.config({mode:"special",onLeft:u,onRight:u})]),lazySink:e.getSink,toggleClass:n+"--active",parts:{menu:ub(0,t.columns,t.presets)},fetch:function(n){return Zw(x(t.fetch,n))}}))).asSpec()},ZO=function(t){return"separator"===t.type},t_={type:"separator"},n_=function(t,n){var e=K(t,function(t,e){return function(t){return r(t)}(e)?""===e?t:"|"===e?t.length>0&&!ZO(t[t.length-1])?t.concat([t_]):t:wt(n,e.toLowerCase())?t.concat([n[e.toLowerCase()]]):t:t.concat([e])},[]);return e.length>0&&ZO(e[e.length-1])&&e.pop(),e},e_=function(t,n){return function(t){return wt(t,"getSubmenuItems")}(t)?function(t,n){var e=t.getSubmenuItems(),o=o_(e,n);return{item:t,menus:Qe(o.menus,pr(t.value,o.items)),expansions:Qe(o.expansions,pr(t.value,t.value))}}(t,n):{item:t,menus:{},expansions:{}}},o_=function(t,n){var e=n_(r(t)?t.split(" "):t,n);return Y(e,function(t,e){var o=function(t){if(ZO(t))return t;var n=xt(t,"value").getOrThunk(function(){return qi("generated-menu-item")});return Qe({value:n},t)}(e),r=e_(o,n);return{menus:Qe(t.menus,r.menus),items:[r.item].concat(t.items),expansions:Qe(t.expansions,r.expansions)}},{menus:{},expansions:{},items:[]})},r_=function(t,n,e,o){var r=qi("primary-menu"),i=o_(t,e.shared.providers.menuItems());if(0===i.items.length)return I.none();var u=tw(r,i.items,n,e,o),a=gt(i.menus,function(t,o){return tw(o,t,n,e,!1)}),c=Qe(a,pr(r,u));return I.from(Dp.tieredData(r,c,i.expansions))},i_=function(t){return{isDisabled:function(){return Md.isDisabled(t)},setDisabled:function(n){return Md.set(t,n)},setActive:function(n){var e=t.element;n?(_u(e,"tox-tbtn--enabled"),Rn(e,"aria-pressed",!0)):(Eu(e,"tox-tbtn--enabled"),Ln(e,"aria-pressed"))},isActive:function(){return Du(t.element,"tox-tbtn--enabled")}}},u_=function(t,n,e,o){return QO({text:t.text,icon:t.icon,tooltip:t.tooltip,role:o,fetch:function(n,o){t.fetch(function(t){o(r_(t,Kv.CLOSE_ON_EXECUTE,e,!1))})},onSetup:t.onSetup,getApi:i_,columns:1,presets:"normal",classes:[],dropdownBehaviours:[Cw.config({})]},n,e.shared)},a_=function(t,n,e){var o=function(t){return function(o){var r=!o.isActive();o.setActive(r),t.storage.set(r),e.shared.getSink().each(function(e){n().getOpt(e).each(function(n){hc(n.element),xi(n,Fw,{name:t.name,value:t.storage.get()})})})}},r=function(t){return function(n){n.setActive(t.storage.get())}};return function(n){n(W(t,function(t){var n=t.text.fold(function(){return{}},function(t){return{text:t}});return _(_({type:t.type,active:!1},n),{onAction:o(t),onSetup:r(t)})}))}},c_=function(t,n,e,o,r,i){void 0===e&&(e=[]);var u=n.fold(function(){return{}},function(t){return{action:t}}),a=_({buttonBehaviours:ac([yy(function(){return t.disabled||i.isDisabled()}),vy(),Cw.config({}),Wg("button press",[Ti("click"),Ti("mousedown")])].concat(e)),eventOrder:{click:["button press","alloy.base.behaviour"],mousedown:["button press","alloy.base.behaviour"]}},u),c=Qe(a,{dom:o});return Qe(c,{components:r})},s_=function(t,n,e,o){void 0===o&&(o=[]);var r={tag:"button",classes:["tox-tbtn"],attributes:t.tooltip.map(function(t){return{"aria-label":e.translate(t),title:e.translate(t)}}).getOr({})},i=t.icon.map(function(t){return GO(t,e.icons)}),u=Ty([i]);return c_(t,n,o,r,u,e)},f_=function(t,n,e,o){void 0===o&&(o=[]);var r=s_(t,I.some(n),e,o);return Jp.sketch(r)},l_=function(t,n,e,o,r){void 0===o&&(o=[]),void 0===r&&(r=[]);var i=e.translate(t.text),u=t.icon?t.icon.map(function(t){return GO(t,e.icons)}):I.none(),a=u.isSome()?Ty([u]):[],c=u.isSome()?{}:{innerHtml:i},s=E(E(E(E([],t.primary||t.borderless?["tox-button"]:["tox-button","tox-button--secondary"],!0),u.isSome()?["tox-button--icon"]:[],!0),t.borderless?["tox-button--naked"]:[],!0),r,!0),f=_(_({tag:"button",classes:s},c),{attributes:{title:i}});return c_(t,n,o,f,a,e)},d_=function(t,n,e,o,r){void 0===o&&(o=[]),void 0===r&&(r=[]);var i=l_(t,I.some(n),e,o,r);return Jp.sketch(i)},m_=function(t,n){return function(e){"custom"===n?xi(e,Fw,{name:t,value:{}}):"submit"===n?yi(e,Iw):"cancel"===n?yi(e,Mw):console.error("Unknown button type: ",n)}},g_=function(t,n,e){if(function(t,n){return"menu"===n}(0,n)){var o=t,r=_(_({},t),{onSetup:function(n){return n.setDisabled(t.disabled),p},fetch:a_(o.items,function(){return i},e)}),i=Qp(u_(r,"tox-tbtn",e,I.none()));return i.asSpec()}if(function(t,n){return"custom"===n||"cancel"===n||"submit"===n}(0,n)){var u=m_(t.name,n),a=_(_({},t),{borderless:!1});return d_(a,u,e.shared.providers,[])}console.error("Unknown footer button type: ",n)},p_=function(t,n){var e,o,r=m_(t.name,"custom");return e=I.none(),o=ww.parts.field(_({factory:Jp},l_(t,I.some(r),n,[XC(""),FC()]))),_w(e,o,[],[])},h_=v([er("field1Name","field1"),er("field2Name","field2"),va("onLockedChange"),ma(["lockClass"]),er("locked",!1),gl("coupledFieldBehaviours",[bd,fl])]),v_=function(t,n){return Hl({factory:ww,name:t,overrides:function(t){return{fieldBehaviours:ac([Wg("coupled-input-behaviour",[Ei(Hr(),function(e){(function(t,n,e){return Zl(t,n,e).bind(bd.getCurrent)})(e,t,n).each(function(n){Zl(e,t,"lock").each(function(o){ap.isOn(o)&&t.onLockedChange(e,n,o)})})})])])}}})},b_=v([v_("field1","field2"),v_("field2","field1"),Hl({factory:Jp,schema:[zo("dom")],name:"lock",overrides:function(t){return{buttonBehaviours:ac([ap.config({selected:t.locked,toggleClass:t.markers.lockClass,aria:{mode:"pressed"}})])}}})]),y_=gd({name:"FormCoupledInputs",configFields:h_(),partFields:b_(),factory:function(t,n,e,o){return{uid:t.uid,dom:t.dom,components:n,behaviours:pl(t.coupledFieldBehaviours,[bd.config({find:I.some}),fl.config({store:{mode:"manual",getValue:function(n){var e,o=rd(n,t,["field1","field2"]);return(e={})[t.field1Name]=fl.getValue(o.field1()),e[t.field2Name]=fl.getValue(o.field2()),e},setValue:function(n,e){var o=rd(n,t,["field1","field2"]);St(e,t.field1Name)&&fl.setValue(o.field1(),e[t.field1Name]),St(e,t.field2Name)&&fl.setValue(o.field2(),e[t.field2Name])}}})]),apis:{getField1:function(n){return Zl(n,t,"field1")},getField2:function(n){return Zl(n,t,"field2")},getLock:function(n){return Zl(n,t,"lock")}}}},apis:{getField1:function(t,n){return t.getField1(n)},getField2:function(t,n){return t.getField2(n)},getLock:function(t,n){return t.getLock(n)}}}),x_=function(t){var n=/^\s*(\d+(?:\.\d+)?)\s*(|cm|mm|in|px|pt|pc|em|ex|ch|rem|vw|vh|vmin|vmax|%)\s*$/.exec(t);if(null!==n){var e=parseFloat(n[1]),o=n[2];return Re.value({value:e,unit:o})}return Re.error(t)},w_=function(t,n){var e={"":96,px:96,pt:72,cm:2.54,pc:12,mm:25.4,in:1},o=function(t){return wt(e,t)};return t.unit===n?I.some(t.value):o(t.unit)&&o(n)?e[t.unit]===e[n]?I.some(t.value):I.some(t.value/e[t.unit]*e[n]):I.none()},S_=function(t){return I.none()},k_=function(t,n){var e=x_(t).toOptional(),o=x_(n).toOptional();return Ot(e,o,function(t,n){return w_(t,n.unit).map(function(t){return n.value/t}).map(function(t){return e=t,o=n.unit,function(t){return w_(t,o).map(function(t){return{value:t*e,unit:o}})};var e,o}).getOr(S_)}).getOr(S_)},C_=function(t,n){var e=S_,o=qi("ratio-event"),r=function(t){return av(t,{tag:"span",classes:["tox-icon","tox-lock-icon__"+t]},n.icons)},i=y_.parts.lock({dom:{tag:"button",classes:["tox-lock","tox-button","tox-button--naked","tox-button--icon"],attributes:{title:n.translate(t.label.getOr("Constrain proportions"))}},components:[r("lock"),r("unlock")],buttonBehaviours:ac([Md.config({disabled:function(){return t.disabled||n.isDisabled()}}),vy(),Cw.config({})])}),u=function(t){return{dom:{tag:"div",classes:["tox-form__group"]},components:t}},a=function(e){return ww.parts.field({factory:Ww,inputClasses:["tox-textfield"],inputBehaviours:ac([Md.config({disabled:function(){return t.disabled||n.isDisabled()}}),vy(),Cw.config({}),Wg("size-input-events",[Ei(Rr(),function(t,n){xi(t,o,{isField1:e})}),Ei(Lr(),function(n,e){xi(n,Aw,{name:t.name})})])]),selectOnFocus:!1})},c=function(t){return{dom:{tag:"label",classes:["tox-label"],innerHtml:n.translate(t)}
95}},s=y_.parts.field1(u([ww.parts.label(c("Width")),a(!0)])),f=y_.parts.field2(u([ww.parts.label(c("Height")),a(!1)]));return y_.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:[{dom:{tag:"div",classes:["tox-form__controls-h-stack"]},components:[s,f,u([c("&nbsp;"),i])]}],field1Name:"width",field2Name:"height",locked:!0,markers:{lockClass:"tox-locked"},onLockedChange:function(t,n,o){x_(fl.getValue(t)).each(function(t){e(t).each(function(t){var e,o,r,i;fl.setValue(n,(r={"":0,px:0,pt:1,mm:1,pc:2,ex:2,em:2,ch:2,rem:2,cm:3,in:4,"%":4},-1!==(i=(e=t).value.toFixed((o=e.unit)in r?r[o]:1)).indexOf(".")&&(i=i.replace(/\.?0*$/,"")),i+e.unit))})})},coupledFieldBehaviours:ac([Md.config({disabled:function(){return t.disabled||n.isDisabled()},onDisabled:function(t){y_.getField1(t).bind(ww.getField).each(Md.disable),y_.getField2(t).bind(ww.getField).each(Md.disable),y_.getLock(t).each(Md.disable)},onEnabled:function(t){y_.getField1(t).bind(ww.getField).each(Md.enable),y_.getField2(t).bind(ww.getField).each(Md.enable),y_.getLock(t).each(Md.enable)}}),vy(),Wg("size-input-events2",[Ei(o,function(t,n){var o=n.event.isField1,r=o?y_.getField1(t):y_.getField2(t),i=o?y_.getField2(t):y_.getField1(t),u=r.map(fl.getValue).getOr(""),a=i.map(fl.getValue).getOr("");e=k_(u,a)})])])})},O_={undo:v(qi("undo")),redo:v(qi("redo")),zoom:v(qi("zoom")),back:v(qi("back")),apply:v(qi("apply")),swap:v(qi("swap")),transform:v(qi("transform")),tempTransform:v(qi("temp-transform")),transformApply:v(qi("transform-apply"))},__=v("save-state"),T_=v("disable"),E_=v("enable"),D_={formActionEvent:Fw,saveState:__,disable:T_,enable:E_},A_=function(t,n){var e=function(t,e,o,r){return Qp(d_({name:t,text:t,disabled:o,primary:r,icon:I.none(),borderless:!1},e,n))},o=function(t,e,o,r){return Qp(f_({name:t,icon:I.some(t),tooltip:I.some(e),disabled:r,primary:!1,borderless:!1},o,n))},r=function(t,n){t.map(function(t){var e=t.get(n);e.hasConfigured(Md)&&Md.disable(e)})},i=function(t,n){t.map(function(t){var e=t.get(n);e.hasConfigured(Md)&&Md.enable(e)})},u={tag:"div",classes:["tox-image-tools__toolbar","tox-image-tools-edit-panel"]},a=p,c=function(t,n,e){xi(t,n,e)},s=function(t){return yi(t,D_.disable())},f=function(t){return yi(t,D_.enable())},l=function(t,n){s(t),c(t,O_.transform(),{transform:n}),f(t)},d=function(t){return function(){tt.getOpt(t).each(function(t){jg.set(t,[Q])})}},m=function(t,n){s(t),c(t,O_.transformApply(),{transform:n,swap:d(t)}),f(t)},g=function(){return e("Back",function(t){return c(t,O_.back(),{swap:d(t)})},!1,!1)},h=function(){return Qp({dom:{tag:"div",classes:["tox-spacer"]},behaviours:ac([Md.config({})])})},b=function(){return e("Apply",function(t){return c(t,O_.apply(),{swap:d(t)})},!0,!0)},y=[g(),h(),e("Apply",function(n){m(n,function(n){var e=t.getRect();return zO(n,e.x,e.y,e.w,e.h)}),t.hideCrop()},!1,!0)],x=vw.sketch({dom:u,components:y.map(function(t){return t.asSpec()}),containerBehaviours:ac([Wg("image-tools-crop-buttons-events",[Ei(D_.disable(),function(t,n){r(y,t)}),Ei(D_.enable(),function(t,n){i(y,t)})])])}),w=Qp(C_({name:"size",label:I.none(),constrain:!0,disabled:!1},n)),S=[g(),h(),w,h(),e("Apply",function(t){w.getOpt(t).each(function(n){var e=fl.getValue(n),o=function(t,n){return function(e){return UO(e,t,n)}}(parseInt(e.width,10),parseInt(e.height,10));m(t,o)})},!1,!0)],k=vw.sketch({dom:u,components:S.map(function(t){return t.asSpec()}),containerBehaviours:ac([Wg("image-tools-resize-buttons-events",[Ei(D_.disable(),function(t,n){r(S,t)}),Ei(D_.enable(),function(t,n){i(S,t)})])])}),C=function(t,n){return function(e){return t(e,n)}},O=C(LO,"h"),_=C(LO,"v"),T=C(jO,-90),E=C(jO,90),D=function(t,n){!function(t,n){s(t),c(t,O_.tempTransform(),{transform:n}),f(t)}(t,n)},A=[g(),h(),o("flip-horizontally","Flip horizontally",function(t){D(t,O)}
95,!1),o("flip-vertically","Flip vertically",function(t){D(t,_)},!1),o("rotate-left","Rotate counterclockwise",function(t){D(t,T)},!1),o("rotate-right","Rotate clockwise",function(t){D(t,E)},!1),h(),b()],B=vw.sketch({dom:u,components:A.map(function(t){return t.asSpec()}),containerBehaviours:ac([Wg("image-tools-fliprotate-buttons-events",[Ei(D_.disable(),function(t,n){r(A,t)}),Ei(D_.enable(),function(t,n){i(A,t)})])])}),M=function(t,e,o,r,i){var u=yC.parts.label({dom:{tag:"label",classes:["tox-label"],innerHtml:n.translate(t)}}),a=yC.parts.spectrum({dom:{tag:"div",classes:["tox-slider__rail"],attributes:{role:"presentation"}}}),c=yC.parts.thumb({dom:{tag:"div",classes:["tox-slider__handle"],attributes:{role:"presentation"}}});return Qp(yC.sketch({dom:{tag:"div",classes:["tox-slider"],attributes:{role:"presentation"}},model:{mode:"x",minX:o,maxX:i,getInitialValue:v({x:r})},components:[u,a,c],sliderBehaviours:ac([Kg.config({})]),onChoose:e}))},F=function(t,n,e,o,r){return M(t,function(t,e,o){var r=C(n,o.x/100);l(t,r)},e,o,r)},R=function(t,n,e,o,a){var c=function(t,n,e,o,r){return[g(),F(t,n,e,o,r),b()]}(t,n,e,o,a);return vw.sketch({dom:u,components:c.map(function(t){return t.asSpec()}),containerBehaviours:ac([Wg("image-tools-filter-panel-buttons-events",[Ei(D_.disable(),function(t,n){r(c,t)}),Ei(D_.enable(),function(t,n){i(c,t)})])])})},N=[g(),h(),b()],P=vw.sketch({dom:u,components:N.map(function(t){return t.asSpec()})}),V=R("Brightness",VO,-100,0,100),H=R("Contrast",HO,-100,0,100),L=R("Gamma",PO,-100,0,100),z=function(t,n,e){return function(o){return function(t,n,e,o){return _O(t,n,e,o)}(o,t,n,e)}},U=function(t){return M(t,function(t,n,e){var o=j.getOpt(t),r=G.getOpt(t),i=W.getOpt(t);o.each(function(n){r.each(function(e){i.each(function(o){var r=fl.getValue(n).x/100,i=fl.getValue(o).x/100,u=fl.getValue(e).x/100,a=z(r,i,u);l(t,a)})})})},0,100,200)},j=U("R"),W=U("G"),G=U("B"),X=[g(),j,W,G,b()],q=vw.sketch({dom:u,components:X.map(function(t){return t.asSpec()})}),Y=function(t,n,e){return function(o){c(o,O_.swap(),{transform:n,swap:function(){tt.getOpt(o).each(function(n){jg.set(n,[t]),e(n)})}})}},K=I.some(NO),J=I.some(RO),$=[o("crop","Crop",Y(x,I.none(),function(n){t.showCrop()}),!1),o("resize","Resize",Y(k,I.none(),function(n){w.getOpt(n).each(function(n){var e=t.getMeasurements(),o=e.width,r=e.height;fl.setValue(n,{width:o,height:r})})}),!1),o("orientation","Orientation",Y(B,I.none(),a),!1),o("brightness","Brightness",Y(V,I.none(),a),!1),o("sharpen","Sharpen",Y(P,K,a),!1),o("contrast","Contrast",Y(H,I.none(),a),!1),o("color-levels","Color levels",Y(q,I.none(),a),!1),o("gamma","Gamma",Y(L,I.none(),a),!1),o("invert","Invert",Y(P,J,a),!1)],Q=vw.sketch({dom:u,components:$.map(function(t){return t.asSpec()})}),Z=vw.sketch({dom:{tag:"div"},components:[Q],containerBehaviours:ac([jg.config({})])}),tt=Qp(Z);return{memContainer:tt,getApplyButton:function(t){return tt.getOpt(t).map(function(t){var n=t.components()[0];return n.components()[n.components().length-1]})}}},B_=tinymce.util.Tools.resolve("tinymce.geom.Rect"),M_=tinymce.util.Tools.resolve("tinymce.util.Observable"),F_=tinymce.util.Tools.resolve("tinymce.util.VK"),I_=function(t){var n=Math.max,e=t.documentElement,o=t.body,r=n(e.scrollWidth,o.scrollWidth),i=n(e.clientWidth,o.clientWidth),u=n(e.offsetWidth,o.offsetWidth),a=n(e.scrollHeight,o.scrollHeight),c=n(e.clientHeight,o.clientHeight);return{width:r<u?i:r,height:a<n(e.offsetHeight,o.offsetHeight)?c:a}},R_=function(t){if(function(t){return l(t.changedTouches)}(t))for(var n="screenX screenY pageX pageY clientX clientY".split(" "),e=0;e<n.length;e++)t[n[e]]=t.changedTouches[0][n[e]]};var N_=0,P_=function(t,n,e,o,r){var i,u=[],a="tox-crid-"+N_++,c=Rt.fromDom(o),s=[{name:"move",xMul:0,yMul:0,deltaX:1,deltaY:1,deltaW:0,deltaH:0,label:"Crop Mask"},{name:"nw",xMul:0,yMul:0,deltaX:1,deltaY:1,deltaW:-1,deltaH:-1,label:"Top Left Crop Handle"},{name:"ne",xMul:1,yMul:0,deltaX:0,deltaY:1,deltaW:1,deltaH:-1,label:"Top Right Crop Handle"},{name:"sw",xMul:0,yMul:1,deltaX:1,deltaY:0,deltaW:-1,deltaH:1,label:"Bottom Left Crop Handle"},{name:"se",xMul:1,yMul:1,deltaX:0,deltaY:0,deltaW:1,deltaH:1,label:"Bottom Right Crop Handle"}],f=["top","right","bottom","left"],d=function(t,n){return{x:n.x-t.x,y:n.y-t.y,w:n.w,h:n.h}},m=function(n,o,r,i){var u=o.x+r*n.deltaX,a=o.y+i*n.deltaY,c=Math.max(20,o.w+r*n.deltaW),s=Math.max(20,o.h+i*n.deltaH),f=t=B_.clamp({x:u,y:a,w:c,h:s},e,"move"===n.name);f=d(e,f),v.fire("updateRect",{rect:f}),h(f)},g=function(t){var e=function(t,n){Qu(c,"#"+a+"-"+t).each(function(t){Wn(t,{left:n.x+"px",top:n.y+"px",width:Math.max(0,n.w)+"px",height:Math.max(0,n.h)+"px"})})};G(s,function(n){Qu(c,"#"+a+"-"+n.name).each(function(e){Wn(e,{left:t.w*n.xMul+t.x+"px",top:t.h*n.yMul+t.y+"px"})})}),e("top",{x:n.x,y:n.y,w:n.w,h:t.y-n.y}),e("right",{x:t.x+t.w,y:t.y,w:n.w-t.x-t.w+n.x,h:t.h}),e("bottom",{x:n.x,y:t.y+t.h,w:n.w,h:n.h-t.y-t.h+n.y}),e("left",{x:n.x,y:t.y,w:t.x-n.x,h:t.h}),e("move",t)},p=function(n){g(t=n)},h=function(t){var n,o;p((n=e,{x:(o=t).x+n.x,y:o.y+n.y,w:o.w,h:o.h}))};!function(){var n=Rt.fromTag("div");Nn(n,{id:a,class:"tox-croprect-container",role:"grid","aria-dropeffect":"execute"}),ve(c,n),G(f,function(t){Qu(c,"#"+a).each(function(n){var e=Rt.fromTag("div");Nn(e,{id:a+"-"+t,class:"tox-croprect-block","data-mce-bogus":"all"}),jn(e,"display","none"),ve(n,e)})}),G(s,function(t){Qu(c,"#"+a).each(function(n){var e=Rt.fromTag("div");Nn(e,{id:a+"-"+t.name,"aria-label":t.label,"aria-grabbed":"false","data-mce-bogus":"all",role:"gridcell",tabindex:"-1",title:t.label}),Au(e,["tox-croprect-handle","tox-croprect-handle-"+t.name]),jn(e,"display","none"),ve(n,e)})}),i=W(s,function(n){var e;return function(t,n){var e,o,r,i,u,a,c,s=[],f=[],d=null!==(e=n.document)&&void 0!==e?e:document,m=null!==(o=n.root)&&void 0!==o?o:d,g=Rt.fromDom(d),p=Rt.fromDom(m.getElementById(null!==(r=n.handle)&&void 0!==r?r:t)),h=function(t){var e=t.raw,o=I_(d);R_(e),t.prevent(),u=e.button,a=e.screenX,c=e.screenY;var r=Xn(p,"cursor");i=Rt.fromTag("div",d),Wn(i,{position:"absolute",top:"0",left:"0",width:o.width+"px",height:o.height+"px","z-index":"2147483647",opacity:"0.0001",cursor:r}),ve(Fn(g),i),f.push(Lc(g,"mousemove",v),Lc(g,"touchmove",v),Lc(g,"mouseup",b),Lc(g,"touchend",b)),n.start(e)},v=function(t){var e=t.raw;if(R_(e),e.button!==u)return b(t);e.deltaX=e.screenX-a,e.deltaY=e.screenY-c,t.prevent(),n.drag(e)},b=function(t){R_(t.raw),G(f,function(t){return t.unbind()}),f=[],xe(i),n.stop&&n.stop(t.raw)};return s.push(Lc(p,"mousedown",h),Lc(p,"touchstart",h)),{destroy:function(){G(f.concat(s),function(t){return t.unbind()}),f=[],s=[],l(i)&&xe(i)}}}(a,{document:o.ownerDocument,root:_n(c).dom,handle:a+"-"+n.name,start:function(){e=t},drag:function(t){m(n,e,t.deltaX,t.deltaY)}})}),g(t);var e=function(t){Rn(t.target,"aria-grabbed","focus"===t.raw.type?"true":"false")};
95u.push(Lc(c,"focusin",e),Lc(c,"focusout",e),Lc(c,"keydown",function(n){var e;G(s,function(t){if(Pn(n.target,"id")===a+"-"+t.name)return e=t,!1});var o=function(t,n,o,r,i){t.stopPropagation(),t.preventDefault(),m(e,o,r,i)};switch(n.raw.keyCode){case F_.LEFT:o(n,0,t,-10,0);break;case F_.RIGHT:o(n,0,t,10,0);break;case F_.UP:o(n,0,t,0,-10);break;case F_.DOWN:o(n,0,t,0,10);break;case F_.ENTER:case F_.SPACEBAR:n.prevent(),r()}}))}();var v=_(_({},M_),{toggleVisibility:function(t){var n=E(E([],W(s,function(t){return"#"+a+"-"+t.name}),!0),W(f,function(t){return"#"+a+"-"+t}),!0).join(","),e=js(c,n);G(e,t?function(t){return $n(t,"display")}:function(t){return jn(t,"display","none")})},setClampRect:function(n){e=n,g(t)},setRect:p,getInnerRect:function(){return d(e,t)},setInnerRect:h,setViewPortRect:function(e){n=e,g(t)},destroy:function(){G(i,function(t){return t.destroy()}),i=[],G(u,function(t){return t.unbind()}),u=[]}});return v},V_=function(t){var n,e=Qp({dom:{tag:"div",classes:["tox-image-tools__image-bg"],attributes:{role:"presentation"}}}),o=lr(1),r=(n=Nc(),_(_({},n),{run:function(t){return n.get().each(t)}})),i=lr({x:0,y:0,w:1,h:1}),u=lr({x:0,y:0,w:1,h:1}),a=function(t,n){f.getOpt(t).each(function(t){var u=o.get(),a=se(t.element),c=ne(t.element),s=n.dom.naturalWidth*u,f=n.dom.naturalHeight*u,l=Math.max(0,a/2-s/2),d=Math.max(0,c/2-f/2),m={left:l.toString()+"px",top:d.toString()+"px",width:s.toString()+"px",height:f.toString()+"px",position:"absolute"};Wn(n,m),e.getOpt(t).each(function(t){Wn(t.element,m)}),r.run(function(t){var n=i.get();t.setRect({x:n.x*u+l,y:n.y*u+d,w:n.w*u,h:n.h*u}),t.setClampRect({x:l,y:d,w:s,h:f}),t.setViewPortRect({x:0,y:0,w:a,h:c})})})},c=function(t,n){var e,r=Rt.fromTag("img");return Rn(r,"src",n),(e=r.dom,new kv(function(t){var n=function(){e.removeEventListener("load",n),t(e)};e.complete?t(e):e.addEventListener("load",n)})).then(function(){t.getSystem().isConnected()&&f.getOpt(t).map(function(t){var n=zu({element:r});jg.replaceAt(t,1,I.some(n));var e=u.get(),c={x:0,y:0,w:r.dom.naturalWidth,h:r.dom.naturalHeight};u.set(c);var s=B_.inflate(c,-20,-20);i.set(s),e.w===c.w&&e.h===c.h||function(t,n){f.getOpt(t).each(function(t){var e=se(t.element),r=ne(t.element),i=n.dom.naturalWidth,u=n.dom.naturalHeight,a=Math.min(e/i,r/u);a>=1?o.set(1):o.set(a)})}(t,r),a(t,r)})})},s=vw.sketch({dom:{tag:"div",classes:["tox-image-tools__image"]},components:[e.asSpec(),{dom:{tag:"img",attributes:{src:t}}},{dom:{tag:"div"},behaviours:ac([Wg("image-panel-crop-events",[Ri(function(t){f.getOpt(t).each(function(t){var n=t.element.dom,e=P_({x:10,y:10,w:100,h:100},{x:0,y:0,w:200,h:200},{x:0,y:0,w:200,h:200},n,p);e.toggleVisibility(!1),e.on("updateRect",function(t){var n=t.rect,e=o.get(),r={x:Math.round(n.x/e),y:Math.round(n.y/e),w:Math.round(n.w/e),h:Math.round(n.h/e)};i.set(r)}),r.set(e)})}),Ni(function(){r.clear()})])])}],containerBehaviours:ac([jg.config({}),Wg("image-panel-events",[Ri(function(n){c(n,t)})])])}),f=Qp(s);return{memContainer:f,updateSrc:c,zoom:function(t,n){var e=o.get(),r=n>0?Math.min(2,e+.1):Math.max(.1,e-.1);o.set(r),f.getOpt(t).each(function(t){var n=t.components()[1].element;a(t,n)})},showCrop:function(){r.run(function(t){t.toggleVisibility(!0)})},hideCrop:function(){r.run(function(t){t.toggleVisibility(!1)})},getRect:function(){return i.get()},getMeasurements:function(){var t=u.get();return{width:t.w,height:t.h}}}},H_=function(t,n,e,o,r){return f_({name:t,icon:I.some(n),disabled:e,tooltip:I.some(t),primary:!1,borderless:!1},o,r)},L_=function(t,n){n?Md.enable(t):Md.disable(t)};var z_,U_=function(t){var n,e,o,r,i=lr(t),u=Vc(),a=(e=-1,{data:n=[],add:function(t){var o=n.splice(++e);return n.push(t),{state:t,removed:o}},undo:function(){if(o())return n[--e]},redo:function(){if(r())return n[++e]},canUndo:o=function(){return e>0},canRedo:r=function(){return-1!==e&&e<n.length-1}});a.add(t);var c=function(t){i.set(t)},s=function(t){return{blob:t,url:URL.createObjectURL(t)}},f=function(t){URL.revokeObjectURL(t.url)},l=function(){u.on(f),u.clear()},d=function(t){var n=s(t);c(n);var e,o=a.add(n).removed;return e=o,HC.each(e,f),n.url};return{getBlobState:function(){return i.get()},setBlobState:c,addBlobState:d,getTempState:function(){return u.get().getOrThunk(i.get)},updateTempState:function(t){var n=s(t);return l(),u.set(n),n.url},addTempState:function(t){var n=s(t);return u.set(n),n.url},applyTempState:function(t){return u.get().fold(p,function(n){d(n.blob),t()})},destroyTempState:l,undo:function(){var t=a.undo();return c(t),t.url},redo:function(){var t=a.redo();return c(t),t.url},getHistoryStates:function(){return{undoEnabled:a.canUndo(),redoEnabled:a.canRedo()}}}},j_=function(t,n){var e=U_(t.currentState),o=function(t){var n=e.getHistoryStates();d.updateButtonUndoStates(t,n.undoEnabled,n.redoEnabled),xi(t,D_.formActionEvent,{name:D_.saveState(),value:n.undoEnabled})},r=function(t){return t.toBlob()},i=function(t){xi(t,D_.formActionEvent,{name:D_.disable(),value:{}})},u=function(t){m.getApplyButton(t).each(function(t){Md.enable(t)}
95),xi(t,D_.formActionEvent,{name:D_.enable(),value:{}})},a=function(t,n){return i(t),l.updateSrc(t,n)},c=function(t,n,e,c,s){i(t),function(t){return gO(t)}(n).then(e).then(r).then(c).then(function(n){return a(t,n)}).then(function(){o(t),s(),u(t)}).catch(function(n){console.log(n),t.getSystem().isConnected()&&u(t)})},s=function(t,n,o){var r=e.getBlobState().blob;c(t,r,n,function(t){return e.updateTempState(t)},o)},f=function(t){var n=e.getBlobState().url;return e.destroyTempState(),o(t),n},l=V_(t.currentState.url),d=function(t){var n=Qp(H_("Undo","undo",!0,function(t){xi(t,O_.undo(),{direction:1})},t)),e=Qp(H_("Redo","redo",!0,function(t){xi(t,O_.redo(),{direction:1})},t));return{container:vw.sketch({dom:{tag:"div",classes:["tox-image-tools__toolbar","tox-image-tools__sidebar"]},components:[n.asSpec(),e.asSpec(),H_("Zoom in","zoom-in",!1,function(t){xi(t,O_.zoom(),{direction:1})},t),H_("Zoom out","zoom-out",!1,function(t){xi(t,O_.zoom(),{direction:-1})},t)]}),updateButtonUndoStates:function(t,o,r){n.getOpt(t).each(function(t){L_(t,o)}),e.getOpt(t).each(function(t){L_(t,r)})}}}(n),m=A_(l,n);return{dom:{tag:"div",attributes:{role:"presentation"}},components:[m.memContainer.asSpec(),l.memContainer.asSpec(),d.container],behaviours:ac([fl.config({store:{mode:"manual",getValue:function(){return e.getBlobState()}}}),Wg("image-tools-events",[Ei(O_.undo(),function(t,n){var r=e.undo();a(t,r).then(function(n){u(t),o(t)})}),Ei(O_.redo(),function(t,n){var r=e.redo();a(t,r).then(function(n){u(t),o(t)})}),Ei(O_.zoom(),function(t,n){var e=n.event.direction;l.zoom(t,e)}),Ei(O_.back(),function(t,n){!function(t){var n=f(t);a(t,n).then(function(n){u(t)})}(t),(0,n.event.swap)(),l.hideCrop()}),Ei(O_.apply(),function(t,n){e.applyTempState(function(){f(t),(0,n.event.swap)()})}),Ei(O_.transform(),function(t,n){return s(t,n.event.transform,p)}),Ei(O_.tempTransform(),function(t,n){return function(t,n){var o=e.getTempState().blob;c(t,o,n,function(t){return e.addTempState(t)},p)}(t,n.event.transform)}),Ei(O_.transformApply(),function(t,n){return function(t,n,o){var r=e.getBlobState().blob;c(t,r,n,function(n){var o=e.addBlobState(n);return f(t),o},o)}(t,n.event.transform,n.event.swap)}),Ei(O_.swap(),function(t,n){!function(t){d.updateButtonUndoStates(t,!1,!1)}(t);var e=n.event.transform,o=n.event.swap;e.fold(function(){o()},function(n){s(t,n,o)})})]),FC()])}},W_=function(t){return!wt(t,"items")},G_=function(t,n,e,o){return W(e,function(e){return W_(e)?{type:"togglemenuitem",text:e.text,value:e.value,active:e.value===o,onAction:function(){fl.setValue(t,e.value),xi(t,Aw,{name:n}),Kg.focus(t)}}:{type:"nestedmenuitem",text:e.text,getSubmenuItems:function(){return G_(t,n,e.items,o)}}})},X_=function(t,n){return ft(t,function(t){return W_(t)?_t(t.value===n,t):X_(t.items,n)})},q_=md({name:"HtmlSelect",configFields:[zo("options"),ll("selectBehaviours",[Kg,fl]),er("selectClasses",[]),er("selectAttributes",{}),Ko("data")],factory:function(t,n){var e=W(t.options,function(t){return{dom:{tag:"option",value:t.value,innerHtml:t.text}}}),o=t.data.map(function(t){return pr("initialValue",t)}).getOr({});return{uid:t.uid,dom:{tag:"select",classes:t.selectClasses,attributes:t.selectAttributes},components:e,behaviours:ml(t.selectBehaviours,[Kg.config({}),fl.config({store:_({mode:"manual",getValue:function(t){return Mu(t.element)},setValue:function(n,e){J(t.options,function(t){return t.value===e}).isSome()&&Fu(n.element,e)}},o)})])}}}),Y_=function(t,n){var e=t.label.map(function(t){return Dw(t,n)}),o=[Md.config({disabled:function(){return t.disabled||n.isDisabled()}}),vy(),Vg.config({mode:"execution",useEnter:!0!==t.multiline,useControlEnter:!0===t.multiline,execute:function(t){return yi(t,Iw),I.some(!0)}}),Wg("textfield-change",[Ei(Hr(),function(n,e){xi(n,Aw,{name:t.name})}),Ei(Jr(),function(n,e){xi(n,Aw,{name:t.name})})]),Cw.config({})],r=t.validation.map(function(t){return fS.config({getRoot:function(t){return vn(t.element)},invalidClass:"tox-invalid",validator:{validate:function(n){var e=fl.getValue(n),o=t.validator(e);return tS(!0===o?Re.value(e):Re.error(o))},validateOnLoad:t.validateOnLoad}})}).toArray(),i=t.placeholder.fold(v({}),function(t){return{placeholder:n.translate(t)}
95}),u=t.inputMode.fold(v({}),function(t){return{inputmode:t}}),a=_(_({},i),u),c=ww.parts.field({tag:!0===t.multiline?"textarea":"input",inputAttributes:a,inputClasses:[t.classname],inputBehaviours:ac(Q([o,r])),selectOnFocus:!1,factory:Ww}),s=(t.flex?["tox-form__group--stretched"]:[]).concat(t.maximized?["tox-form-group--maximize"]:[]),f=[Md.config({disabled:function(){return t.disabled||n.isDisabled()},onDisabled:function(t){ww.getField(t).each(Md.disable)},onEnabled:function(t){ww.getField(t).each(Md.enable)}}),vy()];return _w(e,c,s,f)},K_=Object.freeze({__proto__:null,events:function(t,n){var e=t.stream.streams.setup(t,n);return Oi([Ei(t.event,e),Ni(function(){return n.cancel()})].concat(t.cancelEvent.map(function(t){return[Ei(t,function(){return n.cancel()})]}).getOr([])))}}),J_=function(t){var n=lr(null);return fu({readState:function(){return{timer:null!==n.get()?"set":"unset"}},setTimer:function(t){n.set(t)},cancel:function(){var t=n.get();null!==t&&t.cancel()}})},$_=Object.freeze({__proto__:null,throttle:J_,init:function(t){return t.stream.streams.state(t)}}),Q_=[Uo("stream",Po("mode",{throttle:[zo("delay"),er("stopEvent",!0),ya("streams",{setup:function(t,n){var e=t.stream,o=dv(t.onStream,e.delay);return n.setTimer(o),function(t,n){o.throttle(t,n),e.stopEvent&&n.stop()}},state:J_})]})),er("event","input"),Ko("cancelEvent"),va("onStream")],Z_=sc({fields:Q_,name:"streaming",active:K_,state:$_}),tT=function(t,n,e){var o=fl.getValue(e);fl.setValue(n,o),eT(n)},nT=function(t,n){var e=t.element,o=Mu(e),r=e.dom;"number"!==Pn(e,"type")&&n(r,o)},eT=function(t){nT(t,function(t,n){return t.setSelectionRange(n.length,n.length)})},oT=function(t,n,e){if(t.selectsOver){var o=fl.getValue(n),r=t.getDisplayText(o),i=fl.getValue(e);return 0===t.getDisplayText(i).indexOf(r)?I.some(function(){tT(0,n,e),function(t,n){nT(t,function(t,e){return t.setSelectionRange(n,e.length)})}(n,r.length)}):I.none()}return I.none()},rT=v("alloy.typeahead.itemexecute"),iT=v([Ko("lazySink"),zo("fetch"),er("minChars",5),er("responseTime",1e3),pa("onOpen"),er("getHotspot",I.some),er("getAnchorOverrides",v({})),er("layouts",I.none()),er("eventOrder",{}),fr("model",{},[er("getDisplayText",function(t){return void 0!==t.meta&&void 0!==t.meta.text?t.meta.text:t.value}),er("selectsOver",!0),er("populateFromBrowse",!0)]),pa("onSetValue"),ha("onExecute"),pa("onItemExecute"),er("inputClasses",[]),er("inputAttributes",{}),er("inputStyles",{}),er("matchWidth",!0),er("useMinWidth",!1),er("dismissOnBlur",!0),ma(["openClass"]),Ko("initialData"),ll("typeaheadBehaviours",[Kg,fl,Z_,Vg,ap,mS]),Ho("previewing",function(){return lr(!0)})].concat(Lw()).concat(ES())),uT=v([Ll({schema:[da()],name:"menu",overrides:function(t){return{fakeFocus:!0,onHighlight:function(n,e){t.previewing.get()?n.getSystem().getByUid(t.uid).each(function(o){oT(t.model,o,e).fold(function(){return jd.dehighlight(n,e)},function(t){return t()})}):n.getSystem().getByUid(t.uid).each(function(n){t.model.populateFromBrowse&&tT(t.model,n,e)}),t.previewing.set(!1)},onExecute:function(n,e){return n.getSystem().getByUid(t.uid).toOptional().map(function(t){return xi(t,rT(),{item:e}),!0})},onHover:function(n,e){t.previewing.set(!1),n.getSystem().getByUid(t.uid).each(function(n){t.model.populateFromBrowse&&tT(t.model,n,e)})}}}})]),aT=gd({name:"Typeahead",configFields:iT(),partFields:uT(),factory:function(t,n,e,o){var r=function(n,e,r){t.previewing.set(!1);var i=mS.getCoupled(n,"sandbox");Wf.isOpen(i)?bd.getCurrent(i).each(function(t){jd.getHighlighted(t).fold(function(){r(t)},function(){Ci(i,t.element,"keydown",e)})}):xS(t,u(n),n,i,o,function(t){bd.getCurrent(t).each(r)},qw.HighlightFirst).get(p)},i=zw(t),u=function(t){return function(n){return n.map(function(n){var e=yt(n.menus),o=Z(e,function(t){return q(t.items,function(t){return"item"===t.type})});return fl.getState(t).update(W(o,function(t){return t.data})),n})}},a=[Kg.config({}),fl.config({onSetValue:t.onSetValue,store:_({mode:"dataset",getDataKey:function(t){return Mu(t.element)},getFallbackEntry:function(t){return{value:t,meta:{}}},setValue:function(n,e){Fu(n.element,t.model.getDisplayText(e))}},t.initialData.map(function(t){return pr("initialValue",t)}).getOr({}))}
95),Z_.config({stream:{mode:"throttle",delay:t.responseTime,stopEvent:!1},onStream:function(n,e){var r=mS.getCoupled(n,"sandbox");if(Kg.isFocused(n)&&Mu(n.element).length>=t.minChars){var i=bd.getCurrent(r).bind(function(t){return jd.getHighlighted(t).map(fl.getValue)});t.previewing.set(!0),xS(t,u(n),n,r,o,function(n){bd.getCurrent(r).each(function(n){i.fold(function(){t.model.selectsOver&&jd.highlightFirst(n)},function(t){jd.highlightBy(n,function(n){return fl.getValue(n).value===t.value}),jd.getHighlighted(n).orThunk(function(){return jd.highlightFirst(n),I.none()})})})},qw.HighlightFirst).get(p)}},cancelEvent:oi()}),Vg.config({mode:"special",onDown:function(t,n){return r(t,n,jd.highlightFirst),I.some(!0)},onEscape:function(t){var n=mS.getCoupled(t,"sandbox");return Wf.isOpen(n)?(Wf.close(n),I.some(!0)):I.none()},onUp:function(t,n){return r(t,n,jd.highlightLast),I.some(!0)},onEnter:function(n){var e=mS.getCoupled(n,"sandbox"),o=Wf.isOpen(e);if(o&&!t.previewing.get())return bd.getCurrent(e).bind(function(t){return jd.getHighlighted(t)}).map(function(t){return xi(n,rT(),{item:t}),!0});var r=fl.getValue(n);return yi(n,oi()),t.onExecute(e,n,r),o&&Wf.close(e),I.some(!0)}}),ap.config({toggleClass:t.markers.openClass,aria:{mode:"expanded"}}),mS.config({others:{sandbox:function(n){return _S(t,n,{onOpen:function(){return ap.on(n)},onClose:function(){return ap.off(n)}})}}}),Wg("typeaheadevents",[Vi(function(n){var e=p;SS(t,u(n),n,o,e,qw.HighlightFirst).get(p)}),Ei(rT(),function(n,e){var o=mS.getCoupled(n,"sandbox");tT(t.model,n,e.event.item),yi(n,oi()),t.onItemExecute(n,o,e.event.item,fl.getValue(n)),Wf.close(o),eT(n)})].concat(t.dismissOnBlur?[Ei(Kr(),function(t){var n=mS.getCoupled(t,"sandbox");yc(n.element).isNone()&&Wf.close(n)})]:[]))];return{uid:t.uid,dom:jw(Qe(t,{inputAttributes:{role:"combobox","aria-autocomplete":"list","aria-haspopup":"true"}})),behaviours:_(_({},i),ml(t.typeaheadBehaviours,a)),eventOrder:t.eventOrder}}}),cT=function(t){return _(_({},t),{toCached:function(){return cT(t.toCached())},bindFuture:function(n){return cT(t.bind(function(t){return t.fold(function(t){return tS(Re.error(t))},function(t){return n(t)})}))},bindResult:function(n){return cT(t.map(function(t){return t.bind(n)}))},mapResult:function(n){return cT(t.map(function(t){return t.map(n)}))},mapError:function(n){return cT(t.map(function(t){return t.mapError(n)}))},foldResult:function(n,e){return t.map(function(t){return t.fold(n,e)})},withTimeout:function(n,e){return cT(Zw(function(o){var r=!1,i=setTimeout(function(){r=!0,o(Re.error(e()))},n);t.get(function(t){r||(clearTimeout(i),o(t))})}))}})},sT=function(t){return cT(Zw(t))},fT=sT,lT={type:"separator"},dT=function(t){return{type:"menuitem",value:t.url,text:t.title,meta:{attach:t.attach},onAction:p}},mT=function(t,n){return{type:"menuitem",value:n,text:t,meta:{attach:void 0},onAction:p}},gT=function(t,n){return function(t){return W(t,dT)}(function(t,n){return q(n,function(n){return n.type===t})}(t,n))},pT=function(t){return gT("header",t.targets)},hT=function(t){return gT("anchor",t.targets)},vT=function(t){return I.from(t.anchorTop).map(function(t){return mT("<top>",t)}).toArray()},bT=function(t){return I.from(t.anchorBottom).map(function(t){return mT("<bottom>",t)}).toArray()},yT=function(t,n){var e=t.toLowerCase();return q(n,function(t){var n=void 0!==t.meta&&void 0!==t.meta.text?t.meta.text:t.text;return Et(n.toLowerCase(),e)||Et(t.value.toLowerCase(),e)})},xT=function(t,n,e){var o=fl.getValue(n),r=void 0!==o.meta.text?o.meta.text:o.value;return e.getLinkInformation().fold(function(){return[]},function(n){var o,i=yT(r,function(t){return W(t,function(t){return mT(t,t)})}(e.getHistory(t)));return"file"===t?(o=[i,yT(r,pT(n)),yT(r,Q([vT(n),hT(n),bT(n)]))],K(o,function(t,n){return 0===t.length||0===n.length?t.concat(n):t.concat(lT,n)},[])):i})},wT=qi("aria-invalid"),ST=function(t){return function(n,e,o){return xt(e,"name").fold(function(){return t(e,o)},function(r){return n.field(r,t(e,o))})}},kT={bar:ST(function(t,n){return function(t,n){return{dom:{tag:"div",classes:["tox-bar","tox-form__controls-h-stack"]},components:W(t.items,n.interpreter)}}
95(t,n.shared)}),collection:ST(function(t,n){return Hw(t,n.shared.providers)}),alertbanner:ST(function(t,n){return function(t,n){return vw.sketch({dom:{tag:"div",attributes:{role:"alert"},classes:["tox-notification","tox-notification--in","tox-notification--"+t.level]},components:[{dom:{tag:"div",classes:["tox-notification__icon"]},components:[Jp.sketch({dom:{tag:"button",classes:["tox-button","tox-button--naked","tox-button--icon"],innerHtml:rv(t.icon,n.icons),attributes:{title:n.translate(t.iconTooltip)}},action:function(n){xi(n,Fw,{name:"alert-banner",value:t.url})},buttonBehaviours:ac([iv()])})]},{dom:{tag:"div",classes:["tox-notification__body"],innerHtml:n.translate(t.text)}}]})}(t,n.shared.providers)}),input:ST(function(t,n){return function(t,n){return Y_({name:t.name,multiline:!1,label:t.label,inputMode:t.inputMode,placeholder:t.placeholder,flex:!1,disabled:t.disabled,classname:"tox-textfield",validation:I.none(),maximized:t.maximized},n)}(t,n.shared.providers)}),textarea:ST(function(t,n){return function(t,n){return Y_({name:t.name,multiline:!0,label:t.label,inputMode:I.none(),placeholder:t.placeholder,flex:!0,disabled:t.disabled,classname:"tox-textarea",validation:I.none(),maximized:t.maximized},n)}(t,n.shared.providers)}),label:ST(function(t,n){return function(t,n){var e={dom:{tag:"label",innerHtml:n.providers.translate(t.label),classes:["tox-label"]}},o=W(t.items,n.interpreter);return{dom:{tag:"div",classes:["tox-form__group"]},components:[e].concat(o),behaviours:ac([FC(),jg.config({}),GC(I.none()),Vg.config({mode:"acyclic"})])}}(t,n.shared)}),iframe:function(t){return function(n,e,o){var r=Qe(e,{source:"dynamic"});return ST(t)(n,r,o)}}(function(t,n){return eO(t,n.shared.providers)}),button:ST(function(t,n){return p_(t,n.shared.providers)}),checkbox:ST(function(t,n){return function(t,n){var e=fl.config({store:{mode:"manual",getValue:function(t){return t.element.dom.checked},setValue:function(t,n){t.element.dom.checked=n}}}),o=function(t){return t.element.dom.click(),I.some(!0)},r=ww.parts.field({factory:{sketch:b},dom:{tag:"input",classes:["tox-checkbox__input"],attributes:{type:"checkbox"}},behaviours:ac([FC(),Md.config({disabled:function(){return t.disabled||n.isDisabled()}}),Cw.config({}),Kg.config({}),e,Vg.config({mode:"special",onEnter:o,onSpace:o,stopSpaceKeyup:!0}),Wg("checkbox-events",[Ei(Lr(),function(n,e){xi(n,Aw,{name:t.name})})])])}),i=ww.parts.label({dom:{tag:"span",classes:["tox-checkbox__label"],innerHtml:n.translate(t.label)},behaviours:ac([FS.config({})])}),u=function(t){return av("checked"===t?"selected":"unselected",{tag:"span",classes:["tox-icon","tox-checkbox-icon__"+t]},n.icons)},a=Qp({dom:{tag:"div",classes:["tox-checkbox__icons"]},components:[u("checked"),u("unchecked")]});return ww.sketch({dom:{tag:"label",classes:["tox-checkbox"]},components:[r,a.asSpec(),i],fieldBehaviours:ac([Md.config({disabled:function(){return t.disabled||n.isDisabled()},disableClass:"tox-checkbox--disabled",onDisabled:function(t){ww.getField(t).each(Md.disable)},onEnabled:function(t){ww.getField(t).each(Md.enable)}}),vy()])})}(t,n.shared.providers)}),colorinput:ST(function(t,n){return PS(t,n.shared,n.colorinput)}),colorpicker:ST(function(t){var n=function(t){return"tox-"+t},e=MC(PC,n),o=Qp(e.sketch({dom:{tag:"div",classes:[n("color-picker-container")],attributes:{role:"presentation"}},onValidHex:function(t){xi(t,Fw,{name:"hex-valid",value:!0})},onInvalidHex:function(t){xi(t,Fw,{name:"hex-valid",value:!1})}}));return{dom:{tag:"div"},components:[o.asSpec()],behaviours:ac([fl.config({store:{mode:"manual",getValue:function(t){var n=o.get(t);return bd.getCurrent(n).bind(function(t){return fl.getValue(t).hex}).map(function(t){return"#"+t}).getOr("")},setValue:function(t,n){var e=/^#([a-fA-F0-9]{3}(?:[a-fA-F0-9]{3})?)/.exec(n),r=o.get(t);bd.getCurrent(r).fold(function(){console.log("Can not find form")},function(t){fl.setValue(t,{hex:I.from(e[1]).getOr("")}),_C.getField(t,"hex").each(function(t){yi(t,Hr())})})}}}),FC()])}}),dropzone:ST(function(t,n){return qC(t,n.shared.providers)}),grid:ST(function(t,n){return function(t,n){return{dom:{tag:"div",classes:["tox-form__grid","tox-form__grid--"+t.columns+"col"]},components:W(t.items,n.interpreter)}}
95(t,n.shared)}),listbox:ST(function(t,n){return function(t,n){var e=n.shared.providers,o=at(t.items).filter(W_),r=t.label.map(function(t){return Dw(t,e)}),i={dom:{tag:"div",classes:["tox-listboxfield"]},components:[ww.parts.field({dom:{},factory:{sketch:function(e){return QO({uid:e.uid,text:o.map(function(t){return t.text}),icon:I.none(),tooltip:t.label,role:I.none(),fetch:function(e,o){var r=G_(e,t.name,t.items,fl.getValue(e));o(r_(r,Kv.CLOSE_ON_EXECUTE,n,!1))},onSetup:v(p),getApi:v({}),columns:1,presets:"normal",classes:[],dropdownBehaviours:[Cw.config({}),fl.config({store:{mode:"manual",initialValue:o.map(function(t){return t.value}).getOr(""),getValue:function(t){return Pn(t.element,"data-value")},setValue:function(n,e){X_(t.items,e).each(function(t){Rn(n.element,"data-value",t.value),xi(n,JO,{text:t.text})})}}})]},"tox-listbox",n.shared)}}})]};return ww.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:Q([r.toArray(),[i]]),fieldBehaviours:ac([Md.config({disabled:v(t.disabled),onDisabled:function(t){ww.getField(t).each(Md.disable)},onEnabled:function(t){ww.getField(t).each(Md.enable)}})])})}(t,n)}),selectbox:ST(function(t,n){return function(t,n){var e=W(t.items,function(t){return{text:n.translate(t.text),value:t.value}}),o=t.label.map(function(t){return Dw(t,n)}),r=ww.parts.field({dom:{},selectAttributes:{size:t.size},options:e,factory:q_,selectBehaviours:ac([Md.config({disabled:function(){return t.disabled||n.isDisabled()}}),Cw.config({}),Wg("selectbox-change",[Ei(Lr(),function(n,e){xi(n,Aw,{name:t.name})})])])}),i=t.size>1?I.none():I.some(av("chevron-down",{tag:"div",classes:["tox-selectfield__icon-js"]},n.icons)),u={dom:{tag:"div",classes:["tox-selectfield"]},components:Q([[r],i.toArray()])};return ww.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:Q([o.toArray(),[u]]),fieldBehaviours:ac([Md.config({disabled:function(){return t.disabled||n.isDisabled()},onDisabled:function(t){ww.getField(t).each(Md.disable)},onEnabled:function(t){ww.getField(t).each(Md.enable)}}),vy()])})}(t,n.shared.providers)}),sizeinput:ST(function(t,n){return C_(t,n.shared.providers)}),urlinput:ST(function(t,n){return function(t,n,e){var o,r,i,u,a,c=n.shared.providers,s=function(n){var o=fl.getValue(n);e.addToHistory(o.value,t.filetype)},f=ww.parts.field({factory:aT,dismissOnBlur:!0,inputClasses:["tox-textfield"],sandboxClasses:["tox-dialog__popups"],inputAttributes:{"aria-errormessage":wT,type:"url"},minChars:0,responseTime:0,fetch:function(o){var r=xT(t.filetype,o,e),i=r_(r,Kv.BUBBLE_TO_SANDBOX,n,!1);return tS(i)},getHotspot:function(t){return v.getOpt(t)},onSetValue:function(t,n){t.hasConfigured(fS)&&fS.run(t).get(p)},typeaheadBehaviours:ac(Q([e.getValidationHandler().map(function(n){return fS.config({getRoot:function(t){return vn(t.element)},invalidClass:"tox-control-wrap--status-invalid",notify:{onInvalid:function(t,n){d.getOpt(t).each(function(t){Rn(t.element,"title",c.translate(n))})}},validator:{validate:function(e){var o=fl.getValue(e);return fT(function(e){n({type:t.filetype,url:o.value},function(t){if("invalid"===t.status){var n=Re.error(t.message);e(n)}else{var o=Re.value(t.message);e(o)}})})},validateOnLoad:!1}})}).toArray(),[Md.config({disabled:function(){return t.disabled||c.isDisabled()}}),Cw.config({}),Wg("urlinput-events",Q(["file"===t.filetype?[Ei(Hr(),function(n){xi(n,Aw,{name:t.name})})]:[],[Ei(Lr(),function(n){xi(n,Aw,{name:t.name}),s(n)}),Ei(Jr(),function(n){xi(n,Aw,{name:t.name}),s(n)})]]))]])),eventOrder:(o={},o[Hr()]=["streaming","urlinput-events","invalidating"],o),model:{getDisplayText:function(t){return t.value},selectsOver:!1,populateFromBrowse:!1},markers:{openClass:"tox-textfield--popup-open"},lazySink:n.shared.getSink,parts:{menu:ub(0,0,"normal")},onExecute:function(t,n,e){xi(n,Iw,{})},onItemExecute:function(n,e,o,r){s(n),xi(n,Aw,{name:t.name})}}),l=t.label.map(function(t){return Dw(t,c)}),d=Qp((r="invalid",i=I.some(wT),void 0===(u="warning")&&(u=r),void 0===a&&(a=r),av(u,{tag:"div",classes:["tox-icon","tox-control-wrap__status-icon-"+r],attributes:_({title:c.translate(a),"aria-live":"polite"},i.fold(function(){return{}},function(t){return{id:t}}))},c.icons))),m=Qp({dom:{tag:"div",classes:["tox-control-wrap__status-icon-wrap"]},components:[d.asSpec()]}),g=e.getUrlPicker(t.filetype),h=qi("browser.url.event"),v=Qp({dom:{tag:"div",classes:["tox-control-wrap"]},components:[f,m.asSpec()],behaviours:ac([Md.config({disabled:function(){return t.disabled||c.isDisabled()}})])}),b=Qp(d_({name:t.name,icon:I.some("browse"),text:t.label.getOr(""),disabled:t.disabled,primary:!1,borderless:!0},function(t){return yi(t,h)},c,[],["tox-browse-url"]));return ww.sketch({dom:Ew([]),components:l.toArray().concat([{dom:{tag:"div",classes:["tox-form__controls-h-stack"]},components:Q([[v.asSpec()],g.map(function(){return b.asSpec()}).toArray()])}]),fieldBehaviours:ac([Md.config({disabled:function(){return t.disabled||c.isDisabled()},onDisabled:function(t){ww.getField(t).each(Md.disable),b.getOpt(t).each(Md.disable)},onEnabled:function(t){ww.getField(t).each(Md.enable),b.getOpt(t).each(Md.enable)}}),vy(),Wg("url-input-events",[Ei(h,function(n){bd.getCurrent(n).each(function(e){var o=fl.getValue(e),r=_({fieldname:t.name},o);g.each(function(o){o(r).get(function(o){fl.setValue(e,o),xi(n,Aw,{name:t.name})})})})})])])})}(t,n,n.urlinput)}),customeditor:ST(function(t){var n=Vc(),e=Qp({dom:{tag:t.tag}}),o=Vc();return{dom:{tag:"div",classes:["tox-custom-editor"]},behaviours:ac([Wg("custom-editor-events",[Ri(function(r){e.getOpt(r).each(function(e){(!function(t){return wt(t,"init")}(t)?VC.load(t.scriptId,t.scriptUrl).then(function(n){return n(e.element.dom,t.settings)}):t.init(e.element.dom)).then(function(t){o.on(function(n){t.setValue(n)}),o.clear(),n.set(t)})})})]),fl.config({store:{mode:"manual",getValue:function(){return n.get().fold(function(){return o.get().getOr("")},function(t){return t.getValue()})},setValue:function(t,e){n.get().fold(function(){o.set(e)},function(t){return t.setValue(e)})}}}),FC()]),components:[e.asSpec()]}}),htmlpanel:ST(function(t){return"presentation"===t.presets?vw.sketch({dom:{tag:"div",classes:["tox-form__group"],innerHtml:t.html}}):vw.sketch({dom:{tag:"div",classes:["tox-form__group"],innerHtml:t.html,attributes:{role:"document"}},containerBehaviours:ac([Cw.config({}),Kg.config({})])})}),imagetools:ST(function(t,n){return j_(t,n.shared.providers)}),table:ST(function(t,n){return function(t,n){var e,o,r=function(t){return{dom:{tag:"th",innerHtml:n.translate(t)}
95}},i=function(t){return{dom:{tag:"td",innerHtml:n.translate(t)}}},u=function(t){return{dom:{tag:"tr"},components:W(t,i)}};return{dom:{tag:"table",classes:["tox-dialog__table"]},components:[(o=t.header,{dom:{tag:"thead"},components:[{dom:{tag:"tr"},components:W(o,r)}]}),(e=t.cells,{dom:{tag:"tbody"},components:W(e,u)})],behaviours:ac([Cw.config({}),Kg.config({})])}}(t,n.shared.providers)}),panel:ST(function(t,n){return function(t,n){return{dom:{tag:"div",classes:t.classes},components:W(t.items,n.shared.interpreter)}}(t,n)})},CT={field:function(t,n){return n}},OT=function(t,n,e){var o=Qe(e,{shared:{interpreter:function(n){return _T(t,n,o)}}});return _T(t,n,o)},_T=function(t,n,e){return xt(kT,n.type).fold(function(){return console.error('Unknown factory type "'+n.type+'", defaulting to container: ',n),n},function(o){return o(t,n,e)})},TT={valignCentre:[],alignCentre:[],alignLeft:[],alignRight:[],right:[],left:[],bottom:[],top:[]},ET=function(t,n,e){var o={maxHeightFunction:Zc()};return function(){return e()?{type:"node",root:Tn(t()),node:I.from(t()),bubble:os(12,12,TT),layouts:{onRtl:function(){return[Lp]},onLtr:function(){return[Hp]}},overrides:o}:{type:"hotspot",hotspot:n(),bubble:os(-12,12,TT),layouts:{onRtl:function(){return[za]},onLtr:function(){return[Ua]}},overrides:o}}},DT=function(t,n,e){return function(){return e()?{type:"node",root:Tn(t()),node:I.from(t()),layouts:{onRtl:function(){return[zp]},onLtr:function(){return[zp]}}}:{type:"hotspot",hotspot:n(),layouts:{onRtl:function(){return[Xa]},onLtr:function(){return[Xa]}}}}},AT=function(t,n){return function(){return{type:"selection",root:n(),getSelection:function(){var n=t.selection.getRng();return I.some(Ds.range(Rt.fromDom(n.startContainer),n.startOffset,Rt.fromDom(n.endContainer),n.endOffset))}}}},BT=function(t){return function(n){return{type:"node",root:t(),node:n}}},MT=function(t,n,e){var o=uy(t),r=function(){return Rt.fromDom(t.getBody())},i=function(){return Rt.fromDom(t.getContentAreaContainer())},u=function(){return o||!e()};return{inlineDialog:ET(i,n,u),banner:DT(i,n,u),cursor:AT(t,r),node:BT(r)}},FT=function(t){return function(n,e){Ix(t)(n,e)}},IT=function(t){return function(){return kx(t)}},RT=function(t){return function(){return Cx(t)}},NT=function(t){return function(){return _x(t)}},PT=function(t){return{colorPicker:FT(t),hasCustomColors:IT(t),getColors:RT(t),getColorCols:NT(t)}},VT=function(t){return function(){return function(t){return t.getParam("draggable_modal",!1,"boolean")}(t)}},HT=function(t){return{isDraggableModal:VT(t)}},LT=[{title:"Headings",items:[{title:"Heading 1",format:"h1"},{title:"Heading 2",format:"h2"},{title:"Heading 3",format:"h3"},{title:"Heading 4",format:"h4"},{title:"Heading 5",format:"h5"},{title:"Heading 6",format:"h6"}]},{title:"Inline",items:[{title:"Bold",format:"bold"},{title:"Italic",format:"italic"},{title:"Underline",format:"underline"},{title:"Strikethrough",format:"strikethrough"},{title:"Superscript",format:"superscript"},{title:"Subscript",format:"subscript"},{title:"Code",format:"code"}]},{title:"Blocks",items:[{title:"Paragraph",format:"p"},{title:"Blockquote",format:"blockquote"},{title:"Div",format:"div"},{title:"Pre",format:"pre"}]},{title:"Align",items:[{title:"Left",format:"alignleft"},{title:"Center",format:"aligncenter"},{title:"Right",format:"alignright"},{title:"Justify",format:"alignjustify"}]}],zT=function(t){return K(t,function(t,n){if(wt(n,"items")){var e=zT(n.items);return{customFormats:t.customFormats.concat(e.customFormats),formats:t.formats.concat([{title:n.title,items:e.formats}])}}if(function(t){return wt(t,"inline")}(n)||function(t){return wt(t,"block")}(n)||function(t){return wt(t,"selector")}(n)){var o="custom-"+(r(n.name)?n.name:n.title.toLowerCase());return{customFormats:t.customFormats.concat([{name:o,format:n}]),formats:t.formats.concat([{title:n.title,format:o,icon:n.icon}])}}return _(_({},t),{formats:t.formats.concat(n)})},{customFormats:[],formats:[]})},UT=function(t){return function(t){return I.from(t.getParam("style_formats")).filter(u)}(t).map(function(n){var e=function(t,n){var e=zT(n),o=function(n){G(n,function(n){t.formatter.has(n.name)||t.formatter.register(n.name,n.format)})};return t.formatter?o(e.customFormats):t.on("init",function(){o(e.customFormats)}),e.formats}(t,n);return function(t){return t.getParam("style_formats_merge",!1,"boolean")}(t)?LT.concat(e):e}).getOr(LT)},jT=function(t,n,e){var o={type:"formatter",isSelected:n(t.format),getStylePreview:e(t.format)};return Qe(t,o)},WT=function(t,n,e,o){var i=function(n){return W(n,function(n){var u=lt(n);if(St(n,"items")){var a=i(n.items);return Qe(function(t){return Qe(t,{type:"submenu"})}
95(n),{getStyleItems:v(a)})}return St(n,"format")?function(t){return jT(t,e,o)}(n):1===u.length&&L(u,"title")?Qe(n,{type:"separator"}):function(n){var i=r(n.name)?n.name:qi(n.title),u="custom-"+i,a={type:"formatter",format:u,isSelected:e(u),getStylePreview:o(u)},c=Qe(n,a);return t.formatter.register(i,c),c}(n)})};return i(n)},GT=function(t){var n=function(n){return function(){return t.formatter.match(n)}},e=function(n){return function(){var e=t.formatter.get(n);return void 0!==e?I.some({tag:e.length>0&&(e[0].inline||e[0].block)||"div",styles:t.dom.parseStyle(t.formatter.getCssText(n))}):I.none()}},o=function(t){var n=t.items;return void 0!==n&&n.length>0?Z(n,o):[t.format]},r=lr([]),i=lr([]),u=lr([]),a=lr([]),c=lr(!1);t.on("PreInit",function(u){var a=UT(t),c=WT(t,a,n,e);r.set(c),i.set(Z(c,o))}),t.on("addStyleModifications",function(r){var i=WT(t,r.items,n,e);u.set(i),c.set(r.replace),a.set(Z(i,o))});return{getData:function(){var t=c.get()?[]:r.get(),n=u.get();return t.concat(n)},getFlattenedKeys:function(){var t=c.get()?[]:i.get(),n=a.get();return t.concat(n)}}},XT=HC.trim,qT=function(t){return function(n){if(function(t){return l(t)&&1===t.nodeType}(n)){if(n.contentEditable===t)return!0;if(n.getAttribute("data-mce-contenteditable")===t)return!0}return!1}},YT=qT("true"),KT=qT("false"),JT=function(t,n,e,o,r){return{type:t,title:n,url:e,level:o,attach:r}},$T=function(t){return t.innerText||t.textContent},QT=function(t){return function(t){return t&&"A"===t.nodeName&&void 0!==(t.id||t.name)}(t)&&tE(t)},ZT=function(t){return t&&/^(H[1-6])$/.test(t.nodeName)},tE=function(t){return function(t){for(;t=t.parentNode;){var n=t.contentEditable;if(n&&"inherit"!==n)return YT(t)}return!1}(t)&&!KT(t)},nE=function(t){return ZT(t)&&tE(t)},eE=function(t){var n=function(t){return t.id?t.id:qi("h")}(t);return JT("header",$T(t),"#"+n,function(t){return ZT(t)?parseInt(t.nodeName.substr(1),10):0}(t),function(){t.id=n})},oE=function(t){var n=t.id||t.name,e=$T(t);return JT("anchor",e||"#"+n,"#"+n,0,p)},rE=function(t){var n,e;return n="h1,h2,h3,h4,h5,h6,a:not([href])",e=t,W(js(Rt.fromDom(e),n),function(t){return t.dom})},iE=function(t){return XT(t.title).length>0},uE=function(t){var n=rE(t);return q(function(t){return W(q(t,nE),eE)}(n).concat(function(t){return W(q(t,QT),oE)}(n)),iE)},aE="tinymce-url-history",cE=function(t){return r(t)&&/^https?/.test(t)},sE=function(t){return i(t)&&bt(t,function(t){return!(u(n=t)&&n.length<=5&&tt(n,cE));var n}).isNone()},fE=function(){var t,n=vx.getItem(aE);if(null===n)return{};try{t=JSON.parse(n)}catch(e){if(e instanceof SyntaxError)return console.log("Local storage "+aE+" was not valid JSON",e),{};throw e}return sE(t)?t:(console.log("Local storage "+aE+" was not valid format",t),{})},lE=function(t){var n=fE();return xt(n,t).getOr([])},dE=function(t,n){if(cE(t)){var e=fE(),o=xt(e,n).getOr([]),r=q(o,function(n){return n!==t});e[n]=[t].concat(r).slice(0,5),function(t){if(!sE(t))throw new Error("Bad format for history:\n"+JSON.stringify(t));vx.setItem(aE,JSON.stringify(t))}(e)}},mE=function(t){return!!t},gE=function(t){return gt(HC.makeMap(t,/[, ]/),mE)},pE=function(t){return I.from(function(t){return t.getParam("file_picker_callback")}(t)).filter(d)},hE=function(t,n){var e=function(t){var n=I.some(function(t){return t.getParam("file_picker_types")}(t)).filter(mE),e=I.some(function(t){return t.getParam("file_browser_callback_types")}(t)).filter(mE),o=n.or(e).map(gE);return pE(t).fold(k,function(t){return o.fold(C,function(t){return lt(t).length>0&&t})})}(t);return c(e)?e?pE(t):I.none():e[n]?pE(t):I.none()},vE=function(t){return I.from(t).filter(r).getOrUndefined()},bE=function(t){return{getHistory:lE,addToHistory:dE,getLinkInformation:function(){return function(t){return function(t){return!1===t.getParam("typeahead_urls")}(t)?I.none():I.some({targets:uE(t.getBody()),anchorTop:vE(dy(t)),anchorBottom:vE(my(t))})}(t)},getValidationHandler:function(){return function(t){return I.from(function(t){var n=t.getParam("file_picker_validator_handler",void 0,"function");return void 0===n?t.getParam("filepicker_validator_handler",void 0,"function"):n}(t))}(t)},getUrlPicker:function(n){return function(t,n){return hE(t,n).map(function(e){return function(o){return Zw(function(u){var a=_({filetype:n,fieldname:o.fieldname},I.from(o.meta).getOr({}));e.call(t,function(t,n){if(!r(t))throw new Error("Expected value to be string");if(void 0!==n&&!i(n))throw new Error("Expected meta to be a object");u({value:t,meta:n})},o.value,a)})}})}
95(t,n)}}},yE=function(t,n,e){var o=lr(!1),r=function(t){var n=lr(ry(t)?"bottom":"top");return{isPositionedAtTop:function(){return"top"===n.get()},getDockingMode:n.get,setDockingMode:n.set}}(n),i={shared:{providers:{icons:function(){return n.ui.registry.getAll().icons},menuItems:function(){return n.ui.registry.getAll().menuItems},translate:Zh.translate,isDisabled:function(){return n.mode.isReadOnly()||n.ui.isDisabled()},getSetting:n.getParam.bind(n)},interpreter:function(t){return function(t,n){return _T(CT,t,n)}(t,i)},anchors:MT(n,e,r.isPositionedAtTop),header:r,getSink:function(){return Re.value(t)}},urlinput:bE(n),styleselect:GT(n),colorinput:PT(n),dialog:HT(n),isContextMenuOpen:function(){return o.get()},setContextMenuState:function(t){return o.set(t)}};return i},xE=ad,wE=Wl,SE=v([er("shell",!1),zo("makeItem"),er("setupItem",p),gl("listBehaviours",[jg])]),kE=zl({name:"items",overrides:function(){return{behaviours:ac([jg.config({})])}}}),CE=v([kE]),OE=v("CustomList"),_E=gd({name:OE(),configFields:SE(),partFields:CE(),factory:function(t,n,e,o){var r=t.shell?{behaviours:[jg.config({})],components:[]}:{behaviours:[],components:n},i=function(n){return t.shell?I.some(n):Zl(n,t,"items")};return{uid:t.uid,dom:t.dom,components:r.components,behaviours:ml(t.listBehaviours,r.behaviours),apis:{setItems:function(n,e){i(n).fold(function(){throw console.error("Custom List was defined to not be a shell, but no item container was specified in components"),new Error("Custom List was defined to not be a shell, but no item container was specified in components")},function(o){var r=jg.contents(o),i=e.length,u=i-r.length,a=u>0?U(u,function(){return t.makeItem()}):[],c=r.slice(i);G(c,function(t){return jg.remove(o,t)}),G(a,function(t){return jg.append(o,t)});var s=jg.contents(o);G(s,function(o,r){t.setupItem(n,o,e[r],r)})})}}}},apis:{setItems:function(t,n,e){t.setItems(n,e)}}}),TE=v([zo("dom"),er("shell",!0),ll("toolbarBehaviours",[jg])]),EE=v([zl({name:"groups",overrides:function(){return{behaviours:ac([jg.config({})])}}})]),DE=gd({name:"Toolbar",configFields:TE(),partFields:EE(),factory:function(t,n,e,o){var r=function(n){return t.shell?I.some(n):Zl(n,t,"groups")},i=t.shell?{behaviours:[jg.config({})],components:[]}:{behaviours:[],components:n};return{uid:t.uid,dom:t.dom,components:i.components,behaviours:ml(t.toolbarBehaviours,i.behaviours),apis:{setGroups:function(t,n){r(t).fold(function(){throw console.error("Toolbar was defined to not be a shell, but no groups container was specified in components"),new Error("Toolbar was defined to not be a shell, but no groups container was specified in components")},function(t){jg.set(t,n)})}},domModification:{attributes:{role:"group"}}}},apis:{setGroups:function(t,n,e){t.setGroups(n,e)}}}),AE=p,BE=k,ME=v([]),FE=Object.freeze({__proto__:null,setup:AE,isDocked:BE,getBehaviours:ME}),IE=function(t){return(kt(Yn(t,"position"),"fixed")?I.none():bn(t)).orThunk(function(){var n=Rt.fromTag("span");return vn(t).bind(function(t){ve(t,n);var e=bn(n);return xe(n),e})})},RE=function(t){return IE(t).map(ue).getOrThunk(function(){return re(0,0)})},NE=dr([{static:[]},{absolute:["positionCss"]},{fixed:["positionCss"]}]),PE=function(t,n){var e=t.element;_u(e,n.transitionClass),Eu(e,n.fadeOutClass),_u(e,n.fadeInClass),n.onShow(t)},VE=function(t,n){var e=t.element;_u(e,n.transitionClass),Eu(e,n.fadeInClass),_u(e,n.fadeOutClass),n.onHide(t)},HE=function(t,n,e){return tt(t,function(t){switch(t){case"bottom":return function(t,n){return t.bottom<=n.bottom}(n,e);case"top":return function(t,n){return t.y>=n.y}(n,e)}})},LE=function(t,n){return n.getInitialPos().map(function(n){return De(n.bounds.x,n.bounds.y,se(t),ne(t))})},zE=function(t,n,e){return e.getInitialPos().bind(function(o){switch(e.clearInitialPos(),o.position){case"static":return I.some(NE.static());case"absolute":var r=IE(t).map(Ae).getOrThunk(function(){return Ae(Mn())});return I.some(NE.absolute(wc("absolute",xt(o.style,"left").map(function(t){return n.x-r.x}),xt(o.style,"top").map(function(t){return n.y-r.y}),xt(o.style,"right").map(function(t){return r.right-n.right}),xt(o.style,"bottom").map(function(t){return r.bottom-n.bottom}))));default:return I.none()}})},UE=function(t,n,e){var o=Ae(t);if(HE(e.getModes(),o,n))return I.none();!function(t,n,e){e.setInitialPos({style:Kn(t),position:Xn(t,"position")||"static",boun
95ds:n})}(t,o,e);var r=Me(),i=o.x-r.x,u=n.y-r.y,a=r.bottom-n.bottom,c=o.y<=n.y;return I.some(NE.fixed(wc("fixed",I.some(i),c?I.some(u):I.none(),I.none(),c?I.none():I.some(a))))},jE=function(t,n,e){var o=t.element;return kt(Yn(o,"position"),"fixed")?function(t,n,e){return LE(t,e).filter(function(t){return HE(e.getModes(),t,n)}).bind(function(n){return zE(t,n,e)})}(o,n,e):UE(o,n,e)},WE=function(t,n,e){e.setDocked(!1),G(["left","right","top","bottom","position"],function(n){return $n(t.element,n)}),n.onUndocked(t)},GE=function(t,n,e,o){var r="fixed"===o.position;e.setDocked(r),Sc(t.element,o),(r?n.onDocked:n.onUndocked)(t)},XE=function(t,n,e,o,r){void 0===r&&(r=!1),n.contextual.each(function(n){n.lazyContext(t).each(function(i){var u=function(t,n){return t.y<n.bottom&&t.bottom>n.y}(i,o);u!==e.isVisible()&&(e.setVisible(u),r&&!u?(Au(t.element,[n.fadeOutClass]),n.onHide(t)):(u?PE:VE)(t,n))})})},qE=function(t,n,e){var o=t.element;e.setDocked(!1),function(t,n){var e=t.element;return LE(e,n).bind(function(t){return zE(e,t,n)})}(t,e).each(function(o){o.fold(function(){return WE(t,n,e)},function(o){return GE(t,n,e,o)},p)}),e.setVisible(!0),n.contextual.each(function(n){Bu(o,[n.fadeInClass,n.fadeOutClass,n.transitionClass]),n.onShow(t)}),YE(t,n,e)},YE=function(t,n,e){t.getSystem().isConnected()&&function(t,n,e){var o=n.lazyViewport(t);e.isDocked()&&XE(t,n,e,o),jE(t,o,e).each(function(r){r.fold(function(){return WE(t,n,e)},function(o){return GE(t,n,e,o)},function(r){XE(t,n,e,o,!0),GE(t,n,e,r)})})}(t,n,e)},KE=function(t,n,e){e.isDocked()&&qE(t,n,e)},JE=Object.freeze({__proto__:null,refresh:YE,reset:KE,isDocked:function(t,n,e){return e.isDocked()},getModes:function(t,n,e){return e.getModes()},setModes:function(t,n,e,o){return e.setModes(o)}}),$E=Object.freeze({__proto__:null,events:function(t,n){return Oi([Ii(jr(),function(e,o){t.contextual.each(function(t){Du(e.element,t.transitionClass)&&(Bu(e.element,[t.transitionClass,t.fadeInClass]),(n.isVisible()?t.onShown:t.onHidden)(e)),o.stop()})}),Ei(ai(),function(e,o){YE(e,t,n)}),Ei(ci(),function(e,o){KE(e,t,n)})])}}),QE=[nr("contextual",[jo("fadeInClass"),jo("fadeOutClass"),jo("transitionClass"),Go("lazyContext"),pa("onShow"),pa("onShown"),pa("onHide"),pa("onHidden")]),cr("lazyViewport",Me),sr("modes",["top","bottom"],Co),pa("onDocked"),pa("onUndocked")],ZE=sc({fields:QE,name:"docking",active:$E,apis:JE,state:Object.freeze({__proto__:null,init:function(t){var n=lr(!1),e=lr(!0),o=Vc(),r=lr(t.modes);return fu({isDocked:n.get,setDocked:n.set,getInitialPos:o.get,setInitialPos:o.set,clearInitialPos:o.clear,isVisible:e.get,setVisible:e.set,getModes:r.get,setModes:r.set,readState:function(){return"docked:  "+n.get()+", visible: "+e.get()+", modes: "+r.get().join(",")}})}})}),tD=v(qi("toolbar-height-change")),nD={fadeInClass:"tox-editor-dock-fadein",fadeOutClass:"tox-editor-dock-fadeout",transitionClass:"tox-editor-dock-transition"},eD=function(t,n){return L(ZE.getModes(t),n)},oD=function(t){var n=t.element;vn(n).each(function(e){var o="padding-"+ZE.getModes(t)[0];if(ZE.isDocked(t)){var r=se(e);jn(n,"width",r+"px"),jn(e,o,function(t){return ee(t)+(parseInt(Xn(t,"margin-top"),10)||0)+(parseInt(Xn(t,"margin-bottom"),10)||0)}(n)+"px")}else $n(n,"width"),$n(e,o)})},rD=function(t,n){n?(Eu(t,nD.fadeOutClass),Au(t,[nD.transitionClass,nD.fadeInClass])):(Eu(t,nD.fadeInClass),Au(t,[nD.fadeOutClass,nD.transitionClass]))},iD=function(t,n){var e=Rt.fromDom(t.getContainer());n?(_u(e,"tox-tinymce--toolbar-sticky-on"),Eu(e,"tox-tinymce--toolbar-sticky-off")):(_u(e,"tox-tinymce--toolbar-sticky-off"),Eu(e,"tox-tinymce--toolbar-sticky-on"))},uD=function(t,n){var e,o=Vc(),r=n.getSink,i=function(t){r().each(function(n){return t(n.element)})},u=function(n){t.inline||oD(n),iD(t,ZE.isDocked(n)),n.getSystem().broadcastOn([Xf()],{}),r().each(function(t){return t.getSystem().broadcastOn([Xf()],{})})},a=t.inline?[]:[mc.config({channels:(e={},e[tD()]={onReceive:oD},e)})];return E([Kg.config({}),ZE.config({contextual:_({lazyContext:function(n){var e=ee(n.element),o=t.inline?t.getContentAreaContainer():t.getContainer(),r=Ae(Rt.fromDom(o)),i=r.height-e,u=r.y+(eD(n,"top")?0:e);return I.some(De(r.x,u,r.width,i))},onShow:function(){i(function(t){return rD(t,!0)})},onShown:function(t){i(function(t){return Bu(t,[nD.transitionClass,nD.fadeInClass])}),o.get().each(function(n){var e,r,i;e=t.element,i=mn(r=n),bc(i).filter(function(t){return!fn(r,t)}).filter(function(t){return fn(t,Rt.fromDom(i.dom.body))||dn(e,t)}).each(function(){return hc(r)}),o.clear()})},onHide:function(t){(function(t,n){return yc(t).orThunk(function(){return n().toOptional().bind(function(t){return yc(t.element)})})})(t.element,r).fold(o.clear,o.set),i(function(t){return rD(t,!1)})},onHidden:function(){i(function(t){return Bu(t,[nD.transitionClass])})}},nD),lazyViewport:function(n){var e=Me(),o=function(t){return t.getParam("toolbar_sticky_offset",0,"number")}(t),r=e.y+(eD(n,"top")?o:0),i=e.height-(eD(n,"bottom")?o:0);return De(e.x,r,e.width,i)},modes:[n.header.getDockingMode()],onDocked:u,onUndocked:u})],a,!0)},aD=Object.freeze({__proto__:null,setup:function(t,n,e){t.inline||(n.header.isPositionedAtTop()||t.on("ResizeEditor",function(){e().each(ZE.reset)}),t.on("ResizeWindow ResizeEditor",function(){e().each(oD)}),t.on("SkinLoaded",function(){e().each(function(t){ZE.isDocked(t)?ZE.reset(t):ZE.refresh(t)})}),t.on("FullscreenStateChanged",function(){e().each(ZE.reset)})),t.on("AfterScrollIntoView",function(t){e().each(function(n){ZE.refresh(n);var e=n.element;Mm(e)&&function(t,n){var e=mn(n),o=e.dom.defaultView.innerHeight,r=Se(e),i=Rt.fromDom(t.elm),u=Be(i),a=ne(i),c=u.y,s=c+a,f=ue(n),l=ne(n),d=f.top,m=d+l,g=Math.abs(d-r.top)<2,p=Math.abs(m-(r.top+o))<2;if(g&&c<m)ke(r.left,c-l,e);else if(p&&s>d){var h=c-o+a+l;ke(r.left,h,e)}}(t,e)})}),t.on("PostRender",function(){iD(t,!1)})},isDocked:function(t){return t().map(ZE.isDocked).getOr(!1)},getBehaviours:uD}),cD=ho([jo("type"),Uo("items",bo([xo([jo("name"),Yo("items",Co)]),Co]))].c
95oncat(Fv)),sD=[Qo("text"),Qo("tooltip"),Qo("icon"),Go("fetch"),cr("onSetup",function(){return p})],fD=ho(E([jo("type")],sD,!0)),lD=function(t){return Fo("menubutton",fD,t)},dD=ho([jo("type"),Qo("tooltip"),Qo("icon"),Qo("text"),Zo("select"),Go("fetch"),cr("onSetup",function(){return p}),ur("presets","normal",["normal","color","listpreview"]),er("columns",1),Go("onAction"),Go("onItemAction")]),mD=md({factory:function(t,n){var e={focus:Vg.focusIn,setMenus:function(t,e){var o=W(e,function(t){var e={type:"menubutton",text:t.text,fetch:function(n){n(t.getItems())}},o=lD(e).mapError(function(t){return No(t)}).getOrDie();return u_(o,"tox-mbtn",n.backstage,I.some("menuitem"))});jg.set(t,o)}};return{uid:t.uid,dom:t.dom,components:[],behaviours:ac([jg.config({}),Wg("menubar-events",[Ri(function(n){t.onSetup(n)}),Ei(Ir(),function(t,n){Qu(t.element,".tox-mbtn--active").each(function(e){Zu(n.event.target,".tox-mbtn").each(function(n){fn(e,n)||t.getSystem().getByDom(e).each(function(e){t.getSystem().getByDom(n).each(function(t){BS.expand(t),BS.close(e),Kg.focus(t)})})})})}),Ei(mi(),function(t,n){n.event.prevFocus.bind(function(n){return t.getSystem().getByDom(n).toOptional()}).each(function(e){n.event.newFocus.bind(function(n){return t.getSystem().getByDom(n).toOptional()}).each(function(t){BS.isOpen(e)&&(BS.expand(t),BS.close(e))})})})]),Vg.config({mode:"flow",selector:".tox-mbtn",onEscape:function(n){return t.onEscape(n),I.some(!0)}}),Cw.config({})]),apis:e,domModification:{attributes:{role:"menubar"}}}},name:"silver.Menubar",configFields:[zo("dom"),zo("uid"),zo("onEscape"),zo("backstage"),er("onSetup",p)],apis:{focus:function(t,n){t.focus(n)},setMenus:function(t,n,e){t.setMenus(n,e)}}}),gD=function(t,n){return n.getAnimationRoot.fold(function(){return t.element},function(n){return n(t)})},pD=function(t){return t.dimension.property},hD=function(t,n){return t.dimension.getDimension(n)},vD=function(t,n){var e=gD(t,n);Bu(e,[n.shrinkingClass,n.growingClass])},bD=function(t,n){Eu(t.element,n.openClass),_u(t.element,n.closedClass),jn(t.element,pD(n),"0px"),Qn(t.element)},yD=function(t,n){Eu(t.element,n.closedClass),_u(t.element,n.openClass),$n(t.element,pD(n))},xD=function(t,n,e,o){e.setCollapsed(),jn(t.element,pD(n),hD(n,t.element)),Qn(t.element),vD(t,n),bD(t,n),n.onStartShrink(t),n.onShrunk(t)},wD=function(t,n,e,o){var r=o.getOrThunk(function(){return hD(n,t.element)});e.setCollapsed(),jn(t.element,pD(n),r),Qn(t.element);var i=gD(t,n);Eu(i,n.growingClass),_u(i,n.shrinkingClass),bD(t,n),n.onStartShrink(t)},SD=function(t,n,e){var o=hD(n,t.element);("0px"===o?xD:wD)(t,n,e,I.some(o))},kD=function(t,n,e){var o=gD(t,n),r=Du(o,n.shrinkingClass),i=hD(n,t.element);yD(t,n);var u=hD(n,t.element);(r?function(){jn(t.element,pD(n),i),Qn(t.element)}:function(){bD(t,n)})(),Eu(o,n.shrinkingClass),_u(o,n.growingClass),yD(t,n),jn(t.element,pD(n),u),e.setExpanded(),n.onStartGrow(t)},CD=function(t,n,e){var o=gD(t,n);return!0===Du(o,n.growingClass)},OD=function(t,n,e){var o=gD(t,n);return!0===Du(o,n.shrinkingClass)},_D=Object.freeze({__proto__:null,refresh:function(t,n,e){if(e.isExpanded()){$n(t.element,pD(n));var o=hD(n,t.element);jn(t.element,pD(n),o)}},grow:function(t,n,e){e.isExpanded()||kD(t,n,e)},shrink:function(t,n,e){e.isExpanded()&&SD(t,n,e)},immediateShrink:function(t,n,e){e.isExpanded()&&xD(t,n,e)},hasGrown:function(t,n,e){return e.isExpanded()},hasShrunk:function(t,n,e){return e.isCollapsed()},isGrowing:CD,isShrinking:OD,isTransitioning:function(t,n,e){return CD(t,n)||OD(t,n)},toggleGrow:function(t,n,e){(e.isExpanded()?SD:kD)(t,n,e)},disableTransitions:vD}),TD=Object.freeze({__proto__:null,exhibit:function(t,n,e){var o=n.expanded;return du(o?{classes:[n.openClass],styles:{}}:{classes:[n.closedClass],styles:pr(n.dimension.property,"0px")})},events:function(t,n){return Oi([Ii(jr(),function(e,o){o.event.raw.propertyName===t.dimension.property&&(vD(e,t),n.isExpanded()&&$n(e.element,t.dimension.property),(n.isExpanded()?t.onGrown:t.onShrunk)(e))})])}}),ED=[zo("closedClass"),zo("openClass"),zo("shrinkingClass"),zo("growingClass"),Ko("getAnimationRoot"),pa("onShrunk"),pa("onStartShrink"),pa("onGrown"),pa("onStartGrow"),er("expanded",!1),Uo("dimension",Po("property",{width:[ya("property","width"),ya("getDimension",function(t){return se(t)+"px"})],height:[ya("property","height"),ya("getDimension",function(t){return ne(t)+"px"})]}))],DD=sc({fields:ED,name:"sliding",active:TD,apis:_D,state:Object.freeze({__proto__:null,init:function(t){var n=lr(t.expanded);return fu({isExpanded:function(){return!0===n.get()},isCollapsed:function(){return!1===n.get()},setCollapsed:x(n.set,!1),setExpanded:x(n.set,!0),readState:function(){return"expanded: "+n.get()}})}})}),AD=[ll("slotBehaviours",[])],BD=function(t){return"<alloy.field."+t+">"},MD=function(t,n){var e,o=function(n){return od(t)},r=function(n,e){return function(o,r){return Zl(o,t,r).map(function(t){return n(t,r)}
95).getOr(e)}},i=function(t,n){return"true"!==Pn(t.element,"aria-hidden")},u=r(i,!1),a=r(function(t,n){if(i(t)){var e=t.element;jn(e,"display","none"),Rn(e,"aria-hidden","true"),xi(t,gi(),{name:n,visible:!1})}}),c=(e=a,function(t,n){G(n,function(n){return e(t,n)})}),s=r(function(t,n){if(!i(t)){var e=t.element;$n(e,"display"),Ln(e,"aria-hidden"),xi(t,gi(),{name:n,visible:!0})}}),f={getSlotNames:o,getSlot:function(n,e){return Zl(n,t,e)},isShowing:u,hideSlot:a,hideAllSlots:function(t){return c(t,o())},showSlot:s};return{uid:t.uid,dom:t.dom,components:n,behaviours:dl(t.slotBehaviours),apis:f}},FD=gt({getSlotNames:function(t,n){return t.getSlotNames(n)},getSlot:function(t,n,e){return t.getSlot(n,e)},isShowing:function(t,n,e){return t.isShowing(n,e)},hideSlot:function(t,n,e){return t.hideSlot(n,e)},hideAllSlots:function(t,n){return t.hideAllSlots(n)},showSlot:function(t,n,e){return t.showSlot(n,e)}},function(t){return cu(t)}),ID=_(_({},FD),{sketch:function(t){var n,e={slot:function(t,e){return n.push(t),Yl("container",BD(t),e)},record:v(n=[])},o=t(e),r=e.record(),i=W(r,function(t){return Hl({name:t,pname:BD(t)})});return sd("container",AD,i,MD,o)}}),RD=ho([Qo("icon"),Qo("tooltip"),cr("onShow",p),cr("onHide",p),cr("onSetup",function(){return p})]),ND=function(t){return{element:function(){return t.element.dom}}},PD=function(t,n){var e=W(lt(n),function(t){var e=n[t],o=Io(function(t){return Fo("sidebar",RD,t)}(e));return{name:t,getApi:ND,onSetup:o.onSetup,onShow:o.onShow,onHide:o.onHide}});return W(e,function(n){var o=lr(p);return t.slot(n.name,{dom:{tag:"div",classes:["tox-sidebar__pane"]},behaviours:Mb([ky(n,o),Cy(n,o),Ei(gi(),function(t,n){var o=n.event;J(e,function(t){return t.name===o.name}).each(function(n){(o.visible?n.onShow:n.onHide)(n.getApi(t))})})])})})},VD=function(t){return ID.sketch(function(n){return{dom:{tag:"div",classes:["tox-sidebar__pane-container"]},components:PD(n,t),slotBehaviours:Mb([Ri(function(t){return ID.hideAllSlots(t)})])}})},HD=function(t){return bd.getCurrent(t).bind(function(t){return DD.isGrowing(t)||DD.hasGrown(t)?bd.getCurrent(t).bind(function(t){return J(ID.getSlotNames(t),function(n){return ID.isShowing(t,n)})}):I.none()})},LD=qi("FixSizeEvent"),zD=qi("AutoSizeEvent"),UD=Object.freeze({__proto__:null,block:function(t,n,e,o){Rn(t.element,"aria-busy",!0);var r=n.getRoot(t).getOr(t),i=ac([Vg.config({mode:"special",onTab:function(){return I.some(!0)},onShiftTab:function(){return I.some(!0)}}),Kg.config({})]),u=o(r,i),a=r.getSystem().build(u);jg.append(r,Wu(a)),a.hasConfigured(Vg)&&n.focus&&Vg.focusIn(a),e.isBlocked()||n.onBlock(t),e.blockWith(function(){return jg.remove(r,a)})},unblock:function(t,n,e){Ln(t.element,"aria-busy"),e.isBlocked()&&n.onUnblock(t),e.clear()}}),jD=[cr("getRoot",I.none),ar("focus",!0),pa("onBlock"),pa("onUnblock")],WD=sc({fields:jD,name:"blocking",apis:UD,state:Object.freeze({__proto__:null,init:function(){var t=Nc();return fu({readState:t.isSet,blockWith:function(n){t.set({destroy:n})},clear:t.clear,isBlocked:t.isSet})}})}),GD=function(t){return bd.getCurrent(t).each(function(t){return hc(t.element)})},XD=function(t,n,e,o){var r=n.element;if(function(t,n){I.from(t.iframeElement).map(Rt.fromDom).each(function(t){n?(Vn(t,"tabindex").each(function(n){return Rn(t,"data-mce-tabindex",n)}),Rn(t,"tabindex",-1)):(Ln(t,"tabindex"),Vn(t,"data-mce-tabindex").each(function(n){Rn(t,"tabindex",n),Ln(t,"data-mce-tabindex")}))})}(t,e),e)WD.block(n,function(t){return function(n,e){return{dom:{tag:"div",attributes:{"aria-label":t.translate("Loading..."),tabindex:"0"},classes:["tox-throbber__busy-spinner"]},components:[{dom:$p('<div class="tox-spinner"><div></div><div></div><div></div></div>')}]}}}(o)),$n(r,"display"),Ln(r,"aria-hidden"),t.hasFocus()&&GD(n);else{var i=bd.getCurrent(n).exists(function(t){return vc(t.element)});WD.unblock(n),jn(r,"display","none"),Rn(r,"aria-hidden","true"),i&&t.focus()}},qD=function(t,n,e){var o=lr(!1),r=Vc(),i=function(e){var r;!o.get()||function(t){return"focusin"===t.type}(r=e)&&(r.composed?at(r.composedPath()):I.from(r.target)).map(Rt.fromDom).filter(Ht).exists(function(t){return Du(t,"mce-pastebin")})||(e.preventDefault(),GD(n()),t.editorManager.setActive(t))};t.inline||t.on("PreInit",function(){t.dom.bind(t.getWin(),"focusin",i),t.on("BeforeExecCommand",function(t){"mcefocus"===t.command.toLowerCase()&&!0!==t.value&&i(t)})});var u=function(r){r!==o.get()&&(o.set(r),XD(t,n(),r,e.providers),t.fire("AfterProgressState",{state:r}))};t.on("ProgressState",function(n){if(r.on(Kp.clearTimeout),m(n.time)){var e=Kp.setEditorTimeout(t,function(){return u(n.state)},n.time);r.set(e)}else u(n.state),r.clear()})},YD=function(t,n,e){return{within:t,extra:n,withinWidth:e}},KD=function(t,n,e){var o,r=(o=function(t,n){var o=e(t);return I.some({element:t,start:n,finish:n+o,width:o})},K(t,function(t,n){return o(n,t.len).fold(v(t),function(n){return{len:n.finish,list:t.list.concat([n])}})},{len:0,list:[]}).list),i=q(r,function(t){return t.finish<=n}),u=Y(i,function(t,n){return t+n.width},0);return{within:i,extra:r.slice(i.length),withinWidth:u}},JD=function(t){return W(t,function(t){return t.element})},$D=function(t,n,e,o){var r=function(t,n,e){var o=KD(n,t,e);return 0===o.extra.length?I.some(o):I.none()}(t,n,e).getOrThunk(function(){return KD(n,t-e(o),e)}),i=r.within,u=r.extra,a=r.withinWidth;return 1===u.length&&u[0].width<=e(o)?function(t,n,e){var o=JD(t.concat(n));return YD(o,[],e)}(i,u,a):u.length>=1?function(t,n,e,o){var r=JD(t).concat([e]);return YD(r,JD(n),o)}(i,u,o,a):function(t,n,e){return YD(JD(t),[],e)}(i,0,a)},QD=function(t,n){var e=W(n,function(t){return Wu(t)});DE.setGroups(t,e)},ZD=function(t,n,e){var o=n.builtGroups.get();if(0!==o.length){var r=td(t,n,"primary"),i=mS.getCoupled(t,"overflowGroup");jn(r.element,"visibility","hidden");var u=o.concat([i]),a=ft(u,function(t){return yc(t.element).bind(function(n){return t.getSystem().getByDom(n).toOptional()})});e([]),QD(r,u);var c=se(r.element),s=$D(c,n.builtGroups.get(),function(t){return se(t.element)},i);0===s.extra.length?(jg.remove(r,i),e([])):(QD(r,s.within),e(s.extra)),$n(r.element,"visibility"),Qn(r.element),a.each(Kg.focus)}},tA=v([ll("splitToolbarBehaviours",[mS]),Ho("builtGroups",function(){return lr([])})]),nA=v([ma(["overflowToggledClass"]),Zo("getOverflowBounds"),zo("lazySink"),Ho("overflowGroups",function(){return lr([])})].concat(tA())),eA=v([Hl({factory:DE,schema:TE(),name:"primary"}),Ll({schema:TE(),name:"overflow"}),Ll({name:"overflow-button"}),Ll({name:"overflow-group"}
95)]),oA=v(function(t,n){!function(t,n){var e=ce.max(t,n,["margin-left","border-left-width","padding-left","padding-right","border-right-width","margin-right"]);jn(t,"max-width",e+"px")}(t,Math.floor(n))}),rA=v([ma(["toggledClass"]),zo("lazySink"),Go("fetch"),Zo("getBounds"),nr("fireDismissalEventInstead",[er("event",li())]),fs()]),iA=v([Ll({name:"button",overrides:function(t){return{dom:{attributes:{"aria-haspopup":"true"}},buttonBehaviours:ac([ap.config({toggleClass:t.markers.toggledClass,aria:{mode:"expanded"},toggleOnExecute:!1})])}}}),Ll({factory:DE,schema:TE(),name:"toolbar",overrides:function(t){return{toolbarBehaviours:ac([Vg.config({mode:"cyclic",onEscape:function(n){return Zl(n,t,"button").each(Kg.focus),I.none()}})])}}})]),uA=function(t,n){var e=mS.getCoupled(t,"toolbarSandbox");Wf.isOpen(e)?Wf.close(e):Wf.open(e,n.toolbar())},aA=function(t,n,e,o){var r=e.getBounds.map(function(t){return t()}),i=e.lazySink(t).getOrDie();Sf.positionWithinBounds(i,n,{anchor:{type:"hotspot",hotspot:t,layouts:o,overrides:{maxWidthFunction:oA()}}},r)},cA=function(t,n,e,o,r){DE.setGroups(n,r),aA(t,n,e,o),ap.on(t)},sA=gd({name:"FloatingToolbarButton",factory:function(t,n,e,o){return _(_({},Jp.sketch(_(_({},o.button()),{action:function(t){uA(t,o)},buttonBehaviours:pl({dump:o.button().buttonBehaviours},[mS.config({others:{toolbarSandbox:function(n){return function(t,n,e){var o=ta();return{dom:{tag:"div",attributes:{id:o.id}},behaviours:ac([Vg.config({mode:"special",onEscape:function(t){return Wf.close(t),I.some(!0)}}),Wf.config({onOpen:function(r,i){e.fetch().get(function(r){cA(t,i,e,n.layouts,r),o.link(t.element),Vg.focusIn(i)})},onClose:function(){ap.off(t),Kg.focus(t),o.unlink(t.element)},isPartOf:function(n,e,o){return ea(e,o)||ea(t,o)},getAttachPoint:function(){return e.lazySink(t).getOrDie()}}),mc.config({channels:_(_({},Kf(_({isExtraPart:k},e.fireDismissalEventInstead.map(function(t){return{fireEventInstead:{event:t.event}}}).getOr({})))),$f({doReposition:function(){Wf.getState(mS.getCoupled(t,"toolbarSandbox")).each(function(o){aA(t,o,e,n.layouts)})}}))})])}}(n,e,t)}}})])}))),{apis:{setGroups:function(n,o){Wf.getState(mS.getCoupled(n,"toolbarSandbox")).each(function(r){cA(n,r,t,e.layouts,o)})},reposition:function(n){Wf.getState(mS.getCoupled(n,"toolbarSandbox")).each(function(o){aA(n,o,t,e.layouts)})},toggle:function(t){uA(t,o)},getToolbar:function(t){return Wf.getState(mS.getCoupled(t,"toolbarSandbox"))},isOpen:function(t){return Wf.isOpen(mS.getCoupled(t,"toolbarSandbox"))}}})},configFields:rA(),partFields:iA(),apis:{setGroups:function(t,n,e){t.setGroups(n,e)},reposition:function(t,n){t.reposition(n)},toggle:function(t,n){t.toggle(n)},getToolbar:function(t,n){return t.getToolbar(n)},isOpen:function(t,n){return t.isOpen(n)}}}),fA=v([zo("items"),ma(["itemSelector"]),ll("tgroupBehaviours",[Vg])]),lA=v([Ul({name:"items",unit:"item"})]),dA=gd({name:"ToolbarGroup",configFields:fA(),partFields:lA(),factory:function(t,n,e,o){return{uid:t.uid,dom:t.dom,components:n,behaviours:ml(t.tgroupBehaviours,[Vg.config({mode:"flow",selector:t.markers.itemSelector})]),domModification:{attributes:{role:"toolbar"}}}}}),mA=function(t){return W(t,function(t){return Wu(t)})},gA=function(t,n,e){ZD(t,e,function(o){e.overflowGroups.set(o),n.getOpt(t).each(function(t){sA.setGroups(t,mA(o))})})},pA=gd({name:"SplitFloatingToolbar",configFields:nA(),partFields:eA(),factory:function(t,n,e,o){var r=Qp(sA.sketch({fetch:function(){return Zw(function(n){n(mA(t.overflowGroups.get()))})},layouts:{onLtr:function(){return[Ua,za]},onRtl:function(){return[za,Ua]},onBottomLtr:function(){return[Wa,ja]},onBottomRtl:function(){return[ja,Wa]}},getBounds:e.getOverflowBounds,lazySink:t.lazySink,fireDismissalEventInstead:{},markers:{toggledClass:t.markers.overflowToggledClass},parts:{button:o["overflow-button"](),toolbar:o.overflow()}}));return{uid:t.uid,dom:t.dom,components:n,behaviours:ml(t.splitToolbarBehaviours,[mS.config({others:{overflowGroup:function(){return dA.sketch(_(_({},o["overflow-group"]()),{items:[r.asSpec()]}))}}})]),apis:{setGroups:function(n,e){t.builtGroups.set(W(e,n.getSystem().build)),gA
95(n,r,t)},refresh:function(n){return gA(n,r,t)},toggle:function(t){r.getOpt(t).each(function(t){sA.toggle(t)})},isOpen:function(t){return r.getOpt(t).map(sA.isOpen).getOr(!1)},reposition:function(t){r.getOpt(t).each(function(t){sA.reposition(t)})},getOverflow:function(t){return r.getOpt(t).bind(sA.getToolbar)}},domModification:{attributes:{role:"group"}}}},apis:{setGroups:function(t,n,e){t.setGroups(n,e)},refresh:function(t,n){t.refresh(n)},reposition:function(t,n){t.reposition(n)},toggle:function(t,n){t.toggle(n)},isOpen:function(t,n){return t.isOpen(n)},getOverflow:function(t,n){return t.getOverflow(n)}}}),hA=v([ma(["closedClass","openClass","shrinkingClass","growingClass","overflowToggledClass"]),pa("onOpened"),pa("onClosed")].concat(tA())),vA=v([Hl({factory:DE,schema:TE(),name:"primary"}),Hl({factory:DE,schema:TE(),name:"overflow",overrides:function(t){return{toolbarBehaviours:ac([DD.config({dimension:{property:"height"},closedClass:t.markers.closedClass,openClass:t.markers.openClass,shrinkingClass:t.markers.shrinkingClass,growingClass:t.markers.growingClass,onShrunk:function(n){Zl(n,t,"overflow-button").each(function(t){ap.off(t),Kg.focus(t)}),t.onClosed(n)},onGrown:function(n){Vg.focusIn(n),t.onOpened(n)},onStartGrow:function(n){Zl(n,t,"overflow-button").each(ap.on)}}),Vg.config({mode:"acyclic",onEscape:function(n){return Zl(n,t,"overflow-button").each(Kg.focus),I.some(!0)}})])}}}),Ll({name:"overflow-button",overrides:function(t){return{buttonBehaviours:ac([ap.config({toggleClass:t.markers.overflowToggledClass,aria:{mode:"pressed"},toggleOnExecute:!1})])}}}),Ll({name:"overflow-group"})]),bA=function(t,n){Zl(t,n,"overflow-button").bind(function(){return Zl(t,n,"overflow")}).each(function(e){yA(t,n),DD.toggleGrow(e)})},yA=function(t,n){Zl(t,n,"overflow").each(function(e){ZD(t,n,function(t){var n=W(t,function(t){return Wu(t)});DE.setGroups(e,n)}),Zl(t,n,"overflow-button").each(function(t){DD.hasGrown(e)&&ap.on(t)}),DD.refresh(e)})},xA=gd({name:"SplitSlidingToolbar",configFields:hA(),partFields:vA(),factory:function(t,n,e,o){return{uid:t.uid,dom:t.dom,components:n,behaviours:ml(t.splitToolbarBehaviours,[mS.config({others:{overflowGroup:function(t){return dA.sketch(_(_({},o["overflow-group"]()),{items:[Jp.sketch(_(_({},o["overflow-button"]()),{action:function(n){yi(t,"alloy.toolbar.toggle")}}))]}))}}}),Wg("toolbar-toggle-events",[Ei("alloy.toolbar.toggle",function(n){bA(n,t)})])]),apis:{setGroups:function(n,e){!function(n,e){var o=W(e,n.getSystem().build);t.builtGroups.set(o)}(n,e),yA(n,t)},refresh:function(n){return yA(n,t)},toggle:function(n){return bA(n,t)},isOpen:function(n){return function(t,n){return Zl(t,n,"overflow").map(DD.hasGrown).getOr(!1)}(n,t)}},domModification:{attributes:{role:"group"}}}},apis:{setGroups:function(t,n,e){t.setGroups(n,e)},refresh:function(t,n){t.refresh(n)},toggle:function(t,n){t.toggle(n)},isOpen:function(t,n){return t.isOpen(n)}}}),wA=function(t){var n=t.title.fold(function(){return{}},function(t){return{attributes:{title:t}}});return{dom:_({tag:"div",classes:["tox-toolbar__group"]},n),components:[dA.parts.items({})],items:t.items,markers:{itemSelector:"*:not(.tox-split-button) > .tox-tbtn:not([disabled]), .tox-split-button:not([disabled]), .tox-toolbar-nav-js:not([disabled])"},tgroupBehaviours:ac([Cw.config({}),Kg.config({})])}},SA=function(t){return dA.sketch(wA(t))},kA=function(t,n){var e=Ri(function(n){var e=W(t.initGroups,SA);DE.setGroups(n,e)});return ac([wy(t.providers.isDisabled),vy(),Vg.config({mode:n,onEscape:t.onEscape,selector:".tox-toolbar__group"}),Wg("toolbar-events",[e])])},CA=function(t){var n=t.cyclicKeying?"cyclic":"acyclic";return{uid:t.uid,dom:{tag:"div",classes:["tox-toolbar-overlord"]},parts:{"overflow-group":wA({title:I.none(),items:[]}),"overflow-button":s_({name:"more",icon:I.some("more-drawer"),disabled:!1,tooltip:I.some("More..."),primary:!1,borderless:!1},I.none(),t.providers)},splitToolbarBehaviours:kA(t,n)}},OA=function(t){var n=CA(t),e=pA.parts.primary({dom:{tag:"div",classes:["tox-toolbar__primary"]}});return pA.sketch(_(_({},n),{lazySink:t.getSink,getOverflowBounds:function(){var n=t.moreDrawerData.lazyHeader().element,e=Be(n),o=pn(n),r=Be(o),i=Math.max(o.dom.scrollHeight,r.height);return De(e.x+4,r.y,e.width-8,i)},parts:_(_({},n.parts),{overflow:{dom:{tag:"div",classes:["tox-toolbar__overflow"],attributes:t.attributes}}}),components:[e],markers:{overflowToggledClass:"tox-tbtn--enabled"}}))},_A=function(t){var n=xA.parts.primary({dom:{tag:"div",classes:["tox-toolbar__primary"]}}),e=xA.parts.overflow({dom:{tag:"div",classes:["tox-toolbar__overflow"]}}),o=CA(t);return xA.sketch(_(_({},o),{components:[n,e],markers:{openClass:"tox-toolbar__overflow--open",closedClass:"tox-toolbar__overflow--closed",growingClass:"tox-toolbar__overflow--growing",shrinkingClass:"tox-toolbar__overflow--shrinking",overflowToggledClass:"tox-tbtn--enabled"},onOpened:function(t){t.getSystem().broadcastOn([tD()],{type:"opened"})},onClosed:function(t){t.getSystem().broadcastOn([tD()],{type:"closed"})}}))},TA=function(t){var n=t.cyclicKeying?"cyclic":"acyclic";return DE.sketch({uid:t.uid,dom:{tag:"div",classes:["tox-toolbar"].concat(t.type===Yv.scrolling?["tox-toolbar--scrolling"]:[])},components:[DE.parts.groups({})],toolbarBehaviours:kA(t,n)})},EA=wE.optional({factory:mD,name:"menubar",schema:[zo("backstage")]}),DA=wE.optional({factory:{sketch:function(t){return _E.sketch({uid:t.uid,dom:t.dom,listBehaviours:ac([Vg.config({mode:"acyclic",selector:".tox-toolbar"})]),makeItem:function(){return TA({type:t.type,uid:qi("multiple-toolbar-item"),cyclicKeying:!1,initGroups:[],providers:t.providers,onEscape:function(){return t.onEscape(),I.some(!0)}})},setupItem:function(t,n,e,o){DE.setGroups(n,e)},shell:!0})}},name:"multiple-toolbar",schema:[zo("dom"),zo("onEscape")]}),AA=wE.optional({factory:{sketch:function(t){return function(t){return t.type===Yv.sliding?_A:t.type===Yv.floating?OA:TA}(t)({type:t.type,uid:t.uid,onEscape:function(){return t.onEscape(),I.some(!0)},cyclicKeying:!1,initGroups:[],getSink:t.getSink,providers:t.providers,moreDrawerData:{lazyToolbar:t.lazyToolbar,lazyMoreButton:t.lazyMoreButton,lazyHeader:t.lazyHeader},attributes:t.attributes})}},name:"toolbar",schema:[zo("dom"),zo("onEscape"),zo("getSink")]}),BA=wE.optional({factory:{sketch:function(t){var n=t.editor,e=t.sticky?uD:ME;return{uid:t.uid,dom:t.dom,components:t.components,behaviours:ac(e(n,t.sharedBackstage))}}},name:"header",schema:[zo("dom")]}),MA=wE.optional({name:"socket",schema:[zo("dom")]}),FA=wE.optional({factory:{sketch:function(t){return{uid:t.uid,dom:{tag:"div",classes:["tox-sidebar"],attributes:{role:"complementary"}},components:[{dom:{tag:"div",classes:["tox-sidebar__slider"]},components:[],behaviours:ac([Cw.config({}),Kg.config({}),DD.config({dimension:{property:"width"},closedClass:"tox-sidebar--sliding-closed",openClass:"tox-sidebar--sliding-open",shrinkingClass:"tox-sidebar--sliding-shrinking",growingClass:"tox-sidebar--sliding-growing",onShrunk:function(t){bd.getCurrent(t).each(ID.hideAllSlots),yi(t,zD)},onGrown:function(t){yi(t,zD)},onStartGrow:function(t){xi(t,LD,{width:Yn(t.element,"width").getOr("")})},onStartShrink:function(t){xi(t,LD,{width:se(t.element)+"px"})}}),jg.config({}),bd.config({find:function(t){var n=jg.contents(t);return at(n)}})])}],behaviours:ac([RC(0),Wg("sidebar-sliding-events",[Ei(LD,function(t,n){jn(t.element,"width",n.event.width)}),Ei(zD,function(t,n){$n(t.element,"width")})])])}}},name:"sidebar",schema:[zo("dom")]}),IA=wE.optional({factory:{sketch:function(t){return{uid:t.uid,dom:{tag:"div",attributes:{"aria-hidden":"true"},classes:["tox-throbber"],styles:{display:"none"}},behaviours:ac([jg.config({}),WD.config({focus:!1}),bd.config({find:function(t){return at(t.components())}})]),components:[]}}},name:"throbber",schema:[zo("dom")]}),RA=gd({name:"OuterContainer",factory:function(t,n,e){var o={getSocket:function(n){return xE.getPart(n,t,"socket")},setSidebar:function(n,e){xE.getPart(n,t,"sidebar").each(function(t){return function(t,n){bd.getCurrent(t).each(function(t){return jg.set(t,[VD(n)])})}(t,e)})},toggleSidebar:function(n,e){xE.getPart(n,t,"sidebar").each(function(t){return function(t,n){bd.getCurrent(t).each(function(t){bd.getCurrent(t).each(function(e){DD.hasGrown(t)?ID.isShowing(e,n)?DD.shrink(t):(ID.hideAllSlots(e),ID.showSlot(e,n)):(ID.hideAllSlots(e),ID.showSlot(e,n),DD.grow(t))})})}(t,e)})},whichSidebar:function(n){return xE.getPart(n,t,"sidebar").bind(HD).getOrNull()},getHeader:function(n){return xE.getPart(n,t,"header")},getToolbar:function(n){return xE.getPart(n,t,"toolbar")},setToolbar:function(n,e){xE.getPart(n,t,"toolbar").each(function(t){t.getApis().setGroups(t,e)})},setToolbars:function(n,e){xE.getPart(n,t,"multiple-toolbar").each(function(t){_E.setItems(t,e)})},refreshToolbar:function(n){xE.getPart(n,t,"toolbar").each(function(t){return t.getApis().refresh(t)})},toggleToolbarDrawer:function(n){xE.getPart(n,t,"toolbar").each(function(t){var n,e;n=t.getApis().toggle,e=function(n){return n(t)},null!=n?I.some(e(n)):I.none()})},isToolbarDrawerToggled:function(n){return xE.getPart(n,t,"toolbar").bind(function(t){return I.from(t.getApis().isOpen).map(function(n){return n(t)})}).getOr(!1)},getThrobber:function(n){return xE.getPart(n,t,"throbber")},focusToolbar:function(n){xE.getPart(n,t,"toolbar").orThunk(function(){return xE.getPart(n,t,"multiple-toolbar")}).each(function(t){Vg.focusIn(t)})},setMenubar:function(n,e){xE.getPart(n,t,"menubar").each(function(t){mD.setMenus(t,e)})},focusMenubar:function(n){xE.getPart(n,t,"menubar").each(function(t){mD.focus(t)})}};return{uid:t.uid,dom:t.dom,components:n,apis:o,behaviours:t.behaviours}},configFields:[zo("dom"),zo("behaviours")],partFields:[BA,EA,AA,DA,MA,FA,IA],apis:{getSocket:function(t,n){return t.getSocket(n)},setSidebar:function(t,n,e){t.setSidebar(n,e)},toggleSidebar:function(t,n,e){t.toggleSidebar(n,e)},whichSidebar:function(t,n){return t.whichSidebar(n)},getHeader:function(t,n){return t.getHeader(n)},getToolbar:function(t,n){return t.getToolbar(n)},setToolbar:function(t,n,e){var o=W(e,function(t){return SA(t)});t.setToolbar(n,o)},setToolbars:function(t,n,e){var o=W(e,function(t){return W(t,SA)});t.setToolbars(n,o)},refreshToolbar:function(t,n){return t.refreshToolbar(n)},toggleToolbarDrawer:function(t,n){t.toggleToolbarDrawer(n)},isToolbarDrawerToggled:function(t,n){return t.isToolbarDrawerToggled(n)},getThrobber:function(t,n){return t.getThrobber(n)},setMenubar:function(t,n,e){t.setMenubar(n,e)},focusMenubar:function(t,n){t.focusMenubar(n)},focusToolbar:function(t,n){t.focusToolbar(n)}}}),NA={file:{title:"File",items:"newdocument restoredraft | preview | export print | deleteallconversations"}
95,edit:{title:"Edit",items:"undo redo | cut copy paste pastetext | selectall | searchreplace"},view:{title:"View",items:"code | visualaid visualchars visualblocks | spellchecker | preview fullscreen | showcomments"},insert:{title:"Insert",items:"image link media addcomment pageembed template codesample inserttable | charmap emoticons hr | pagebreak nonbreaking anchor toc | insertdatetime"},format:{title:"Format",items:"bold italic underline strikethrough superscript subscript codeformat | formats blockformats fontformats fontsizes align lineheight | forecolor backcolor | language | removeformat"},tools:{title:"Tools",items:"spellchecker spellcheckerlanguage | a11ycheck code wordcount"},table:{title:"Table",items:"inserttable | cell row column | advtablesort | tableprops deletetable"},help:{title:"Help",items:"help"}},PA=function(t){return"string"==typeof t?t.split(" "):t},VA=function(t,n){var e=_(_({},NA),n.menus),o=lt(n.menus).length>0,r=void 0===n.menubar||!0===n.menubar?PA("file edit view insert format tools table help"):PA(!1===n.menubar?"":n.menubar),i=q(r,function(t){var e=wt(NA,t);return o?e||xt(n.menus,t).exists(function(t){return wt(t,"items")}):e}),u=W(i,function(o){var r=e[o];return function(t,n,e){var o=function(t){return t.getParam("removed_menuitems","")}(e).split(/[ ,]/);return{text:t.title,getItems:function(){return Z(t.items,function(t){var e=t.toLowerCase();return 0===e.trim().length?[]:z(o,function(t){return t===e})?[]:"separator"===e||"|"===e?[{type:"separator"}]:n.menuItems[e]?[n.menuItems[e]]:[]})}}}({title:r.title,items:PA(r.items)},n,t)});return q(u,function(t){return t.getItems().length>0&&z(t.getItems(),function(t){return"separator"!==t.type})})},HA=function(t){var n=function(){t._skinLoaded=!0,function(t){t.fire("SkinLoaded")}(t)};return function(){t.initialized?n():t.on("init",n)}},LA=function(t,n,e){return new kv(function(o,r){e.load(n,o,r),t.on("remove",function(){return e.unload(n)})})},zA=function(t,n){return LA(t,n+"/skin.min.css",t.ui.styleSheetLoader)},UA=function(t,n){var e;return(e=Rt.fromDom(t.getElement()),En(e).isSome())?LA(t,n+"/skin.shadowdom.min.css",zb.DOM.styleSheetLoader):kv.resolve()},jA=function(t,n){var e=function(t){var n=t.getParam("skin"),e=t.getParam("skin_url");if(!1!==n){var o=n||"oxide";e=e?t.documentBaseURI.toAbsolute(e):Ub.baseURL+"/skins/ui/"+o}return e}(n);e&&n.contentCSS.push(e+(t?"/content.inline":"/content")+".min.css"),!1===function(t){return!1===t.getParam("skin")}(n)&&r(e)?kv.all([zA(n,e),UA(n,e)]).then(HA(n),function(t,n){return function(){return function(t,n){return t.fire("SkinLoadError",n)}(t,{message:n})}}(n,"Skin could not be loaded")):HA(n)()},WA=x(jA,!1),GA=x(jA,!0),XA=function(t,n){return function(e){var o=Pc(),r=function(){e.setActive(t.formatter.match(n));var r=t.formatter.formatChanged(n,e.setActive);o.set(r)};return t.initialized?r():t.once("init",r),function(){t.off("init",r),o.clear()}}},qA=function(t,n,e){return function(o){var r=function(){return e(o)},i=function(){e(o),t.on(n,r)};return t.initialized?i():t.once("init",i),function(){t.off("init",i),t.off(n,r)}}},YA=function(t){return function(n){return function(){t.undoManager.transact(function(){t.focus(),t.execCommand("mceToggleFormat",!1,n.format)})}}},KA=function(t,n){return function(){return t.execCommand(n)}},JA=function(t,n,e){var o=function(t,o,i,u){var a=n.shared.providers.translate(t.title);if("separator"===t.type)return I.some({type:"separator",text:a});if("submenu"===t.type){var c=Z(t.getStyleItems(),function(t){return r(t,o,u)});return 0===o&&c.length<=0?I.none():I.some({type:"nestedmenuitem",text:a,disabled:c.length<=0,getSubmenuItems:function(){return Z(t.getStyleItems(),function(t){return r(t,o,u)})}})}return I.some(_({type:"togglemenuitem",text:a,icon:t.icon,active:t.isSelected(u),disabled:i,onAction:e.onAction(t)},t.getStylePreview().fold(function(){return{}},function(t){return{meta:{style:t}}})))},r=function(t,n,r){var i="formatter"===t.type&&e.isInvalid(t);return 0===n?i?[]:o(t,n,!1,r).toArray():o(t,n,i,r).toArray()},i=function(t){var n=e.getCurrentValue(),o=e.shouldHide?0:1;return Z(t,function(t){return r(t,o,n)})};return{validateItems:i,getFetch:function(t,n){return function(e,o){var r=n(),u=i(r);o(r_(u,Kv.CLOSE_ON_EXECUTE,t,!1))}}}},$A=function(t,n,e){var o=e.dataset,r="basic"===o.type?function(){return W(o.data,function(t){return jT(t,e.isSelectedFor,e.getPreviewFor)})}:o.getData;return{items:JA(0,n,e),getStyleItems:r}},QA=function(t,n,e){var o=$A(0,n,e),r=o.items,i=o.getStyleItems,u=qA(t,"NodeChange",function(t){var n=t.getComponent();e.updateText(n)});return QO({text:e.icon.isSome()?I.none():e.text,icon:e.icon,tooltip:I.from(e.tooltip),role:I.none(),fetch:r.getFetch(n,i),onSetup:u,getApi:function(t){return{getComponent:v(t)}},columns:1,presets:"normal",classes:e.icon.isSome()?[]:["bespoke"],dropdownBehaviours:[]},"tox-tbtn",n.shared)};!function(t){t[t.SemiColon=0]="SemiColon",t[t.Space=1]="Space"}(z_||(z_={}));var ZA,tB,nB,eB=function(t,n,e,o){return{type:"basic",data:function(t){return W(t,function(t){var n=t,e=t,o=t.split("=");return o.length>1&&(n=o[0],e=o[1]),{title:n,format:e}})}(function(t,n){return n===z_.SemiColon?t.replace(/;$/,"").split(";"):t.split(" ")}(t.getParam(n,e,"string"),o))}},oB=[{title:"Left",icon:"align-left",format:"alignleft",command:"JustifyLeft"},{title:"Center",icon:"align-center",format:"aligncenter",command:"JustifyCenter"},{title:"Right",icon:"align-right",format:"alignright",command:"JustifyRight"},{title:"Justify",icon:"align-justify",format:"alignjustify",command:"JustifyFull"}],rB=function(t){var n={type:"basic",data:oB};return{tooltip:"Align",text:I.none(),icon:I.some("align-left"),isSelectedFor:function(n){return function(){return t.formatter.match(n)}},getCurrentValue:I.none,getPreviewFor:function(t){return I.none},onAction:function(n){return function(){return J(oB,function(t){return t.format===n.format}).each(function(n){return t.execCommand(n.command)})}},updateText:function(n){var e=J(oB,function(n){return t.formatter.match(n.format)}).fold(v("left"),function(t){return t.title.toLowerCase()});xi(n,$O,{icon:"align-"+e})},dataset:n,shouldHide:!1,isInvalid:function(n){return!t.formatter.canApply(n.format)}}},iB=["-apple-system","Segoe UI","Roboto","Helvetica Neue","sans-serif"],uB=function(t){var n=t.split(/\s*,\s*/);return W(n,function(t){return t.replace(/^['"]+|['"]+$/g,"")})},aB=function(t){var n=function(){var n=function(t){return t?uB(t)[0]:""},o=t.queryCommandValue("FontName"),r=e.data,i=o?o.toLowerCase():"";return{matchOpt:J(r,function(t){var e=t.format;return e.toLowerCase()===i||n(e).toLowerCase()===n(i).toLowerCase()}).orThunk(function(){return _t(0===(t=i).indexOf("-apple-system")&&(n=uB(t.toLowerCase()),tt(iB,function(t){return n.indexOf(t.toLowerCase())>-1})),{title:"System Font",format:i});var t,n}),font:o}},e=eB(t,"font_formats","Andale Mono=andale mono,monospace;Arial=arial,helvetica,sans-serif;Arial Black=arial black,sans-serif;Book Antiqua=book antiqua,palatino,serif;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,palatino,serif;Helvetica=helvetica,arial,sans-serif;Impact=impact,sans-serif;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco,monospace;Times New Roman=times new roman,times,serif;Trebuchet MS=trebuchet ms,geneva,sans-serif;Verdana=verdana,geneva,sans-serif;Webdings=webdings;Wingdings=wingdings,zapf dingbats",z_.SemiColon);return{tooltip:"Fonts",text:I.some("System Font"),icon:I.none(),isSelectedFor:function(t){return function(n){return n.exists(function(n){return n.format===t})}},getCurrentValue:function(){return n().matchOpt},getPreviewFor:function(t){return function(){return I.some({tag:"div",styles:-1===t.indexOf("dings")?{"font-family":t}:{}})}}
95,onAction:function(n){return function(){t.undoManager.transact(function(){t.focus(),t.execCommand("FontName",!1,n.format)})}},updateText:function(t){var e=n(),o=e.matchOpt,r=e.font,i=o.fold(v(r),function(t){return t.title});xi(t,JO,{text:i})},dataset:e,shouldHide:!1,isInvalid:k}},cB={"8pt":"1","10pt":"2","12pt":"3","14pt":"4","18pt":"5","24pt":"6","36pt":"7"},sB={"xx-small":"7pt","x-small":"8pt",small:"10pt",medium:"12pt",large:"14pt","x-large":"18pt","xx-large":"24pt"},fB=function(t,n){return/[0-9.]+px$/.test(t)?function(t,n){var e=Math.pow(10,n);return Math.round(t*e)/e}(72*parseInt(t,10)/96,n||0)+"pt":xt(sB,t).getOr(t)},lB=function(t){var n=function(){var n=I.none(),e=o.data,r=t.queryCommandValue("FontSize");if(r)for(var i=function(t){var o=fB(r,t),i=function(t){return xt(cB,t).getOr("")}(o);n=J(e,function(t){return t.format===r||t.format===o||t.format===i})},u=3;n.isNone()&&u>=0;u--)i(u);return{matchOpt:n,size:r}},e=v(I.none),o=eB(t,"fontsize_formats","8pt 10pt 12pt 14pt 18pt 24pt 36pt",z_.Space);return{tooltip:"Font sizes",text:I.some("12pt"),icon:I.none(),isSelectedFor:function(t){return function(n){return n.exists(function(n){return n.format===t})}},getPreviewFor:e,getCurrentValue:function(){return n().matchOpt},onAction:function(n){return function(){t.undoManager.transact(function(){t.focus(),t.execCommand("FontSize",!1,n.format)})}},updateText:function(t){var e=n(),o=e.matchOpt,r=e.size,i=o.fold(v(r),function(t){return t.title});xi(t,JO,{text:i})},dataset:o,shouldHide:!1,isInvalid:k}},dB=function(t,n){var e=n(),o=W(e,function(t){return t.format});return I.from(t.formatter.closest(o)).bind(function(t){return J(e,function(n){return n.format===t})}).orThunk(function(){return _t(t.formatter.match("p"),{title:"Paragraph",format:"p"})})},mB=function(t){var n=eB(t,"block_formats","Paragraph=p;Heading 1=h1;Heading 2=h2;Heading 3=h3;Heading 4=h4;Heading 5=h5;Heading 6=h6;Preformatted=pre",z_.SemiColon);return{tooltip:"Blocks",text:I.some("Paragraph"),icon:I.none(),isSelectedFor:function(n){return function(){return t.formatter.match(n)}},getCurrentValue:I.none,getPreviewFor:function(n){return function(){var e=t.formatter.get(n);return I.some({tag:e.length>0&&(e[0].inline||e[0].block)||"div",styles:t.dom.parseStyle(t.formatter.getCssText(n))})}},onAction:YA(t),updateText:function(e){var o=dB(t,function(){return n.data}).fold(v("Paragraph"),function(t){return t.title});xi(e,JO,{text:o})},dataset:n,shouldHide:!1,isInvalid:function(n){return!t.formatter.canApply(n.format)}}},gB=function(t,n){return{tooltip:"Formats",text:I.some("Paragraph"),icon:I.none(),isSelectedFor:function(n){return function(){return t.formatter.match(n)}},getCurrentValue:I.none,getPreviewFor:function(n){return function(){var e=t.formatter.get(n);return void 0!==e?I.some({tag:e.length>0&&(e[0].inline||e[0].block)||"div",styles:t.dom.parseStyle(t.formatter.getCssText(n))}):I.none()}},onAction:YA(t),updateText:function(n){var e=function(t){var n=t.items;return void 0!==n&&n.length>0?Z(n,e):[{title:t.title,format:t.format}]},o=Z(UT(t),e),r=dB(t,v(o)).fold(v("Paragraph"),function(t){return t.title});xi(n,JO,{text:r})},shouldHide:t.getParam("style_formats_autohide",!1,"boolean"),isInvalid:function(n){return!t.formatter.canApply(n.format)},dataset:n}},pB=Object.freeze({__proto__:null,events:function(t,n){var e=function(e,o){t.updateState.each(function(t){var r=t(e,o);n.set(r)}),t.renderComponents.each(function(t){var r=t(o,n.get()),i=W(r,e.getSystem().build);_f(e,i)})};return Oi([Ei($r(),function(n,o){var r=o;if(!r.universal){var i=t.channel;L(r.channels,i)&&e(n,r.data)}}),Ri(function(n,o){t.initialData.each(function(t){e(n,t)})})])}}),hB=Object.freeze({__proto__:null,getState:function(t,n,e){return e}}),vB=[zo("channel"),Ko("renderComponents"),Ko("updateState"),Ko("initialData")],bB=Object.freeze({__proto__:null,init:function(){var t=lr(I.none());return{readState:function(){return t.get().getOr("none")},get:t.get,set:t.set,clear:function(){return t.set(I.none())}}}}),yB=sc({fields:vB,name:"reflecting",active:pB,apis:hB,state:bB}),xB=v([zo("toggleClass"),zo("fetch"),va("onExecute"),er("getHotspot",I.some),er("getAnchorOverrides",v({})),fs(),va("onItemExecute"),Ko("lazySink"),zo("dom"),pa("onOpen"),ll("splitDropdownBehaviours",[mS,Vg,Kg]),er("matchWidth",!1),er("useMinWidth",!1),er("eventOrder",{}),Ko("role")].concat(ES())),wB=Hl({factory:Jp,schema:[zo("dom")],name:"arrow",defaults:function(){return{buttonBehaviours:ac([Kg.revoke()])}},overrides:function(t){return{dom:{tag:"span",attributes:{role:"presentation"}},action:function(n){n.getSystem().getByUid(t.uid).each(wi)},buttonBehaviours:ac([ap.config({toggleOnExecute:!1,toggleClass:t.toggleClass})])}}}),SB=Hl({factory:Jp,schema:[zo("dom")],name:"button",defaults:function(){return{buttonBehaviours:ac([Kg.revoke()])}},overrides:function(t){return{dom:{tag:"span",attributes:{role:"presentation"}},action:function(n){n.getSystem().getByUid(t.uid).each(function(e){t.onExecute(e,n)})}}}}),kB=v([wB,SB,zl({factory:{sketch:function(t){return{uid:t.uid,dom:{tag:"span",styles:{display:"none"},attributes:{"aria-hidden":"true"},innerHtml:t.text}}}},schema:[zo("text")],name:"aria-descriptor"}),Ll({schema:[da()],name:"menu",defaults:function(t){return{onExecute:function(n,e){n.getSystem().getByUid(t.uid).each(function(o){t.onItemExecute(o,n,e)})}}}}),pS()]),CB=gd({name:"SplitDropdown",configFields:xB(),partFields:kB(),factory:function(t,n,e,o){var r,i=function(t){bd.getCurrent(t).each(function(t){jd.highlightFirst(t),Vg.focusIn(t)})},u=function(n){SS(t,b,n,o,i,qw.HighlightFirst).get(p)},a=function(n){var e=td(n,t,"button");return wi(e),I.some(!0)},c=_(_({},Oi([Ri(function(n,e){Zl(n,t,"aria-descriptor").each(function(t){var e=qi("aria");Rn(t.element,"id",e),Rn(n.element,"aria-describedby",e)})})])),sp(I.some(u))),s={repositionMenus:function(t){ap.isOn(t)&&TS(t)}};return{uid:t.uid,dom:t.dom,components:n,apis:s,eventOrder:_(_({},t.eventOrder),(r={},r[Qr()]=["disabling","toggling","alloy.base.behaviour"],r)),events:c,behaviours:ml(t.splitDropdownBehaviours,[mS.config({others:{sandbox:function(n){var e=td(n,t,"arrow");return _S(t,n,{onOpen:function(){ap.on(e),ap.on(n)},onClose:function(){ap.off(e),ap.off(n)}})}}}),Vg.config({mode:"special",onSpace:a,onEnter:a,onDown:function(t){return u(t),I.some(!0)}}),Kg.config({}
95),ap.config({toggleOnExecute:!1,aria:{mode:"expanded"}})]),domModification:{attributes:{role:t.role.getOr("button"),"aria-haspopup":!0}}}},apis:{repositionMenus:function(t,n){return t.repositionMenus(n)}}}),OB=function(t){return{isDisabled:function(){return Md.isDisabled(t)},setDisabled:function(n){return Md.set(t,n)}}},_B=function(t){return{setActive:function(n){ap.set(t,n)},isActive:function(){return ap.isOn(t)},isDisabled:function(){return Md.isDisabled(t)},setDisabled:function(n){return Md.set(t,n)}}},TB=function(t,n){return t.map(function(t){return{"aria-label":n.translate(t),title:n.translate(t)}}).getOr({})},EB=qi("focus-button"),DB=function(t,n,e,o,r,i){var u;return{dom:{tag:"button",classes:["tox-tbtn"].concat(n.isSome()?["tox-tbtn--select"]:[]),attributes:TB(e,i)},components:Ty([t.map(function(t){return GO(t,i.icons)}),n.map(function(t){return qO(t,"tox-tbtn",i)})]),eventOrder:(u={},u[Ar()]=["focusing","alloy.base.behaviour","common-button-display-events"],u),buttonBehaviours:ac([wy(i.isDisabled),vy(),Wg("common-button-display-events",[Ei(Ar(),function(t,n){n.event.prevent(),yi(t,EB)})])].concat(o.map(function(e){return yB.config({channel:e,initialData:{icon:t,text:n},renderComponents:function(t,n){return Ty([t.icon.map(function(t){return GO(t,i.icons)}),t.text.map(function(t){return qO(t,"tox-tbtn",i)})])}})}).toArray()).concat(r.getOr([])))}},AB=function(t,n,e){var o,r=lr(p),i=DB(t.icon,t.text,t.tooltip,I.none(),I.none(),e);return Jp.sketch({dom:i.dom,components:i.components,eventOrder:KO,buttonBehaviours:ac([Wg("toolbar-button-events",[(o={onAction:t.onAction,getApi:n.getApi},Vi(function(t,n){Sy(o,t)(function(n){xi(t,YO,{buttonApi:n}),o.onAction(n)})})),ky(n,r),Cy(n,r)]),wy(function(){return t.disabled||e.isDisabled()}),vy()].concat(n.toolbarButtonBehaviours))})},BB=function(t,n,e){return AB(t,{toolbarButtonBehaviours:[].concat(e.length>0?[Wg("toolbarButtonWith",e)]:[]),getApi:OB,onSetup:t.onSetup},n)},MB=function(t,n,e){return Qe(AB(t,{toolbarButtonBehaviours:[jg.config({}),ap.config({toggleClass:"tox-tbtn--enabled",aria:{mode:"pressed"},toggleOnExecute:!1})].concat(e.length>0?[Wg("toolbarToggleButtonWith",e)]:[]),getApi:_B,onSetup:t.onSetup},n))},FB=function(t,n,e){return function(o){return Zw(function(t){return n.fetch(t)}).map(function(r){return I.from(nw(Qe(Rx(qi("menu-value"),r,function(e){n.onItemAction(t(o),e)},n.columns,n.presets,Kv.CLOSE_ON_EXECUTE,n.select.getOr(k),e),{movement:Px(n.columns,n.presets),menuBehaviours:Mb("auto"!==n.columns?[]:[Ri(function(t,e){Ab(t,4,tb(n.presets)).each(function(n){var e=n.numRows,o=n.numColumns;Vg.setGridSize(t,e,o)})})])})))})}},IB=[{name:"history",items:["undo","redo"]},{name:"styles",items:["styleselect"]},{name:"formatting",items:["bold","italic"]},{name:"alignment",items:["alignleft","aligncenter","alignright","alignjustify"]},{name:"indentation",items:["outdent","indent"]},{name:"permanent pen",items:["permanentpen"]},{name:"comments",items:["addcomment"]}],RB=function(t,n){return function(e,o,r){var i=t(e).mapError(function(t){return No(t)}).getOrDie();return n(i,o,r)}},NB={button:RB(Rv,function(t,n){return e=t,o=n.backstage.shared.providers,BB(e,o,[]);var e,o}),togglebutton:RB(Vv,function(t,n){return e=t,o=n.backstage.shared.providers,MB(e,o,[]);var e,o}),menubutton:RB(lD,function(t,n){return u_(t,"tox-tbtn",n.backstage,I.none())}),splitbutton:RB(function(t){return Fo("SplitButton",dD,t)},function(t,n){return e=t,o=n.backstage.shared,i=qi("channel-update-split-dropdown-display"),u=function(t){return{isDisabled:function(){return Md.isDisabled(t)},setDisabled:function(n){return Md.set(t,n)},setIconFill:function(n,e){Qu(t.element,'svg path[id="'+n+'"], rect[id="'+n+'"]').each(function(t){Rn(t,"fill",e)})},setIconStroke:function(n,e){Qu(t.element,'svg path[id="'+n+'"], rect[id="'+n+'"]').each(function(t){Rn(t,"stroke",e)})},setActive:function(n){Rn(t.element,"aria-pressed",n),Qu(t.element,"span").each(function(e){t.getSystem().getByDom(e).each(function(t){return ap.set(t,n)})})},isActive:function(){return Qu(t.element,"span").exists(function(n){return t.getSystem().getByDom(n).exists(ap.isOn)})}}},a=lr(p),c={getApi:u,onSetup:e.onSetup},CB.sketch({dom:{tag:"div",classes:["tox-split-button"],attributes:_({"aria-pressed":!1},TB(e.tooltip,o.providers))},onExecute:function(t){e.onAction(u(t))},onItemExecute:function(t,n,e){},splitDropdownBehaviours:ac([xy(o.providers.isDisabled),vy(),Wg("split-dropdown-events",[Ei(EB,Kg.focus),ky(c,a),Cy(c,a)]),FS.config({})]),eventOrder:(r={},r[si()]=["alloy.base.behaviour","split-dropdown-events"],r),toggleClass:"tox-tbtn--enabled",lazySink:o.getSink,fetch:FB(u,e,o.providers),parts:{menu:ub(0,e.columns,e.presets)},components:[CB.parts.button(DB(e.icon,e.text,I.none(),I.some(i),I.some([ap.config({toggleClass:"tox-tbtn--enabled",toggleOnExecute:!1})]),o.providers)),CB.parts.arrow({dom:{tag:"button",classes:["tox-tbtn","tox-split-button__chevron"],innerHtml:rv("chevron-down",o.providers.icons)},buttonBehaviours:ac([xy(o.providers.isDisabled),vy(),iv()])}),CB.parts["aria-descriptor"]({text:o.providers.translate("To open the popup, press Shift+Enter")})]});var e,o,r,i,u,a,c}),grouptoolbarbutton:RB(function(t){return Fo("GroupToolbarButton",cD,t)},function(t,n,e){var o,r=e.ui.registry.getAll().buttons,i=((o={})[cs]=n.backstage.shared.header.isPositionedAtTop()?Dc.TopToBottom:Dc.BottomToTop,o);switch(ty(e)){case Yv.floating:return function(t,n,e,o){var r=n.shared;return sA.sketch({lazySink:r.getSink,fetch:function(){return Zw(function(n){n(W(e(t.items),SA))})},markers:{toggledClass:"tox-tbtn--enabled"},parts:{button:DB(t.icon,t.text,t.tooltip,I.none(),I.none(),r.providers),toolbar:{dom:{tag:"div",classes:["tox-toolbar__overflow"],attributes:o}}}})}
95(t,n.backstage,function(t){return LB(e,{buttons:r,toolbar:t,allowToolbarGroups:!1},n,I.none())},i);default:throw new Error("Toolbar groups are only supported when using floating toolbar mode")}}),styleSelectButton:function(t,n){return function(t,n){var e=_({type:"advanced"},n.styleselect);return QA(t,n,gB(t,e))}(t,n.backstage)},fontsizeSelectButton:function(t,n){return function(t,n){return QA(t,n,lB(t))}(t,n.backstage)},fontSelectButton:function(t,n){return function(t,n){return QA(t,n,aB(t))}(t,n.backstage)},formatButton:function(t,n){return function(t,n){return QA(t,n,mB(t))}(t,n.backstage)},alignMenuButton:function(t,n){return function(t,n){return QA(t,n,rB(t))}(t,n.backstage)}},PB={styleselect:NB.styleSelectButton,fontsizeselect:NB.fontsizeSelectButton,fontselect:NB.fontSelectButton,formatselect:NB.formatButton,align:NB.alignMenuButton},VB=function(t){var n,e=t.toolbar,o=t.buttons;return!1===e?[]:void 0===e||!0===e?function(t){var n=W(IB,function(n){var e=q(n.items,function(n){return wt(t,n)||wt(PB,n)});return{name:n.name,items:e}});return q(n,function(t){return t.items.length>0})}(o):r(e)?(n=e.split("|"),W(n,function(t){return{items:t.trim().split(" ")}})):function(t){return g(t,function(t){return wt(t,"name")&&wt(t,"items")})}(e)?e:(console.error("Toolbar type should be string, string[], boolean or ToolbarGroup[]"),[])},HB=function(t,n,e,o,r,i){return xt(n,e.toLowerCase()).orThunk(function(){return i.bind(function(t){return ft(t,function(t){return xt(n,t+e.toLowerCase())})})}).fold(function(){return xt(PB,e.toLowerCase()).map(function(n){return n(t,r)}).orThunk(function(){return I.none()})},function(n){return"grouptoolbarbutton"!==n.type||o?function(t,n,e){return xt(NB,t.type).fold(function(){return console.error("skipping button defined by",t),I.none()},function(o){return I.some(o(t,n,e))})}(n,r,t):(console.warn("Ignoring the '"+e+"' toolbar button. Group toolbar buttons are only supported when using floating toolbar mode and cannot be nested."),I.none())})},LB=function(t,n,e,o){var r=VB(n),i=W(r,function(r){var i=Z(r.items,function(r){return 0===r.trim().length?[]:HB(t,n.buttons,r,n.allowToolbarGroups,e,o).toArray()});return{title:I.from(t.translate(r.name)),items:i}});return q(i,function(t){return t.items.length>0})},zB=function(t,n,e,o){var i=n.outerContainer,u=e.toolbar,a=e.buttons;if(g(u,r)){var c=u.map(function(n){var r={toolbar:n,buttons:a,allowToolbarGroups:e.allowToolbarGroups};return LB(t,r,{backstage:o},I.none())});RA.setToolbars(i,c)}else RA.setToolbar(i,LB(t,e,{backstage:o},I.none()))},UB=an(),jB=UB.os.isiOS()&&UB.os.version.major<=12,WB=Object.freeze({__proto__:null,render:function(t,n,e,o,r){var i=lr(0),u=n.outerContainer;WA(t);var c,s,f=Rt.fromDom(r.targetNode),l=Tn(_n(f));c=f,s=n.mothership,Ff(c,s,pe),Mf(l,n.uiMothership),t.on("PostRender",function(){zB(t,n,e,o),i.set(t.getWin().innerWidth),RA.setMenubar(u,VA(t,e)),RA.setSidebar(u,e.sidebar),function(t,n){var e=t.dom,o=t.getWin(),r=t.getDoc().documentElement,i=lr(re(o.innerWidth,o.innerHeight)),u=lr(re(r.offsetWidth,r.offsetHeight)),a=function(){var n=i.get();n.left===o.innerWidth&&n.top===o.innerHeight||(i.set(re(o.innerWidth,o.innerHeight)),dx(t))},c=function(){var n=t.getDoc().documentElement,e=u.get();e.left===n.offsetWidth&&e.top===n.offsetHeight||(u.set(re(n.offsetWidth,n.offsetHeight)),dx(t))},s=function(n){return function(t,n){return t.fire("ScrollContent",n)}(t,n)};e.bind(o,"resize",a),e.bind(o,"scroll",s);var f=zc(Rt.fromDom(t.getBody()),"load",c),l=n.uiMothership.element;t.on("hide",function(){jn(l,"display","none")}),t.on("show",function(){$n(l,"display")}),t.on("NodeChange",c),t.on("remove",function(){f.unbind(),e.unbind(o,"resize",a),e.unbind(o,"scroll",s),o=null})}(t,n)});var d,m,g,p=RA.getSocket(u).getOrDie("Could not find expected socket element");if(jB){Wn(p.element,{overflow:"scroll","-webkit-overflow-scrolling":"touch"});var h=(d=function(){t.fire("ScrollContent")},m=20,g=null,{cancel:function(){a(g)||(clearTimeout(g),g=null)},throttle:function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];a(g)&&(g=setTimeout(function(){g=null,d.apply(null,t)},m))}}),v=Lc(p.element,"scroll",h.throttle);t.on("remove",v.unbind)}hy(t,n),t.addCommand("ToggleSidebar",function(n,e){RA.toggleSidebar(u,e),t.fire("ToggleSidebar")}),t.addQueryValueHandler("ToggleSidebar",function(){return RA.whichSidebar(u)});var b=ty(t);b!==Yv.sliding&&b!==Yv.floating||t.on("ResizeWindow ResizeEditor ResizeContent",function(){var e=t.getWin().innerWidth;e!==i.get()&&(RA.refreshToolbar(n.outerContainer),i.set(e))});var y={enable:function(){py(n,!1)},disable:function(){py(n,!0)},isDisabled:function(){return Md.isDisabled(u)}};return{iframeContainer:p.element.dom,editorContainer:u.element.dom,api:y}}}),GB=function(t){return/^[0-9\.]+(|px)$/i.test(""+t)?I.some(parseInt(""+t,10)):I.none()},XB=function(t){return m(t)?t+"px":t},qB=function(t,n,e){var o=n.filter(function(n){return t<n}),r=e.filter(function(n){return t>n});return o.or(r).getOr(t)},YB=function(t){return function(t){var n=jb(t),e=Xb(t),o=Yb(t);return GB(n).map(function(t){return qB(t,e,o)})}(t).getOr(jb(t))},KB=function(t){var n=Wb(t),e=Gb(t),o=qb(t);return GB(n).map(function(t){return qB(t,e,o)})},JB=function(t,n,e,o,r){var i=e.uiMothership,u=e.outerContainer,a=zb.DOM,c=uy(t),s=sy(t),f=qb(t).or(KB(t)),l=o.shared.header,d=l.isPositionedAtTop,m=ty(t),g=m===Yv.sliding||m===Yv.floating,p=lr(!1),h=function(){return p.get()&&!t.removed},b=function(t){return g?t.fold(v(0),function(t){return t.components().length>1?ne(t.components()[1].element):0}):0},y=function(){i.broadcastOn([Xf()],{})},x=function(t){if(void 0===t&&(t=!1),h()){var e,o,i,a,l;if(c||(e=f.getOrThunk(function(){var t=GB(Xn(Mn(),"margin-left")).getOr(0);return se(Mn())-ue(n).left+t}),jn(r.get().element,"max-width",e+"px")),g&&RA.refreshToolbar(u),c||(o=RA.getToolbar(u),i=b(o),a=Ae(n),l=d()?Math.max(a.y-ne(r.get().element)+i,0):a.bottom,Wn(u.element,{position:"absolute",top:Math.round(l)+"px",left:Math.round(a.x)+"px"})),s){var m=r.get();t?ZE.reset(m):ZE.refresh(m)}y()}},w=function(e){if(void 0===e&&(e=!0),!c&&s&&h()){var o=l.getDockingMode(),i=function(e){switch(oy(t)){case Zb.auto:var o=RA.getToolbar(u),r=b(o),i=ne(e.element)-r,a=Ae(n);if(a.y>i)return"top";var c=pn(n),s=Math.max(c.dom.scrollHeight,ne(c));return a.bottom<s-i?"bottom":Me().bottom<a.bottom-i?"bottom":"top";case Zb.bottom:return"bottom";case Zb.top:default:return"top"}}(r.get());i!==o&&(!function(t){var n=r.get();ZE.setModes(n,[t]),l.setDockingMode(t);var e=d()?Dc.TopToBottom:Dc.BottomToTop;Rn(n.element,cs,e)}(i),e&&x(!0))}};return{isVisible:h,isPositionedAtTop:d,show:function(){p.set(!0),jn(u.element,"display","flex"),a.addClass(t.getBody(),"mce-edit-focus"),$n(i.element,"display"),w(!1),x()},hide:function(){p.set(!1),e.outerContainer&&(jn(u.element,"display","none"),a.removeClass(t.getBody(),"mce-edit-focus")),jn(i.element,"display","none")},update:x,updateMode:w,repositionPopups:y}},$B=function(t,n){var e=Ae(t);return{pos:n?e.y:e.bottom,bounds:e}},QB=Object.freeze({__proto__:null,render:function(t,n,e,o,r){var i=n.mothership,u=n.uiMothership,a=n.outerContainer,c=lr(null),s=Rt.fromDom(r.targetNode),f=JB(t,s,n,o,c),l=function(t){return t.getParam("toolbar_persist",!1,"boolean")}(t);GA(t);var d=function(){if(c.get())f.show();else{c.set(RA.getHeader(a).getOrDie());var r=ay(t);Mf(r,i),Mf(r,u),zB(t,n,e,o),RA.setMenubar(a,VA(t,e)),f.show(),function(t,n,e,o){var r=lr($B(n,e.isPositionedAtTop())),i=function(o){var i=$B(n,e.isPositionedAtTop()),u=i.pos,a=i.bounds,c=r.get(),s=c.pos,f=c.bounds,l=a.height!==f.height||a.width!==f.width;r.set({pos:u,bounds:a}),l&&dx(t,o),e.isVisible()&&(s!==u?e.update(!0):l&&(e.updateMode(),e.repositionPopups()))};o||(t.on("activate",e.show),t.on("deactivate",e.hide)),t.on("SkinLoaded ResizeWindow",function(){return e.update(!0)}),t.on("NodeChange keydown",function(t){Kp.requestAnimationFrame(function(){return i(t)})}),t.on("ScrollWindow",function(){return e.updateMode()});var u=Pc();u.set(zc(Rt.fromDom(t.getBody()),"load",i)),t.on("remove",function(){u.clear()})}(t,s,f,l),t.nodeChanged()}};t.on("show",d),t.on("hide",f.hide),l||(t.on("focus",d),t.on("blur",f.hide)),t.on("init",function(){(t.hasFocus()||l)&&d()}),hy(t,n);var m={show:function(){f.show()},hide:function(){f.hide()},enable:function(){py(n,!1)},disable:function(){py(n,!0)},isDisabled:function(){return Md.isDisabled(a)}};return{editorContainer:a.element.dom,api:m}}}),ZB=function(t,n){return Ei(YO,function(e,o){var r=function(t){return{hide:function(){return yi(t,ei())},getValue:function(){return fl.getValue(t)}}}(t.get(e));n.onAction(r,o.event.buttonApi)})},tM=function(t,n,e){var o={backstage:{shared:{providers:e}}};return"contextformtogglebutton"===n.type?function(t,n,e){var o=n.original;o.primary;var r=T(o,["primary"]),i=Io(Vv(_(_({},r),{type:"togglebutton",onAction:p})));return MB(i,e.backstage.shared.providers,[ZB(t,n)])}
95(t,n,o):function(t,n,e){var o=n.original;o.primary;var r=T(o,["primary"]),i=Io(Rv(_(_({},r),{type:"button",onAction:p})));return BB(i,e.backstage.shared.providers,[ZB(t,n)])}(t,n,o)},nM=function(t,n){var e=t.label.fold(function(){return{}},function(t){return{"aria-label":t}}),o=Qp(Ww.sketch({inputClasses:["tox-toolbar-textfield","tox-toolbar-nav-js"],data:t.initValue(),inputAttributes:e,selectOnFocus:!0,inputBehaviours:ac([Vg.config({mode:"special",onEnter:function(t){return r.findPrimary(t).map(function(t){return wi(t),!0})},onLeft:function(t,n){return n.cut(),I.none()},onRight:function(t,n){return n.cut(),I.none()}})])})),r=function(t,n,e){var o=W(n,function(n){return Qp(tM(t,n,e))});return{asSpecs:function(){return W(o,function(t){return t.asSpec()})},findPrimary:function(t){return ft(n,function(n,e){return n.primary?I.from(o[e]).bind(function(n){return n.getOpt(t)}).filter(w(Md.isDisabled)):I.none()})}}}(o,t.commands,n);return[{title:I.none(),items:[o.asSpec()]},{title:I.none(),items:r.asSpecs()}]},eM=nM,oM=function(t,n,e){return void 0===e&&(e=.01),n.bottom-t.y>=e&&t.bottom-n.y>=e},rM=function(t){var n=function(t){var n=t.getBoundingClientRect();if(n.height<=0&&n.width<=0){var e=Sn(Rt.fromDom(t.startContainer),t.startOffset).element;return(Lt(e)?vn(e):I.some(e)).filter(Ht).map(function(t){return t.dom.getBoundingClientRect()}).getOr(n)}return n}(t.selection.getRng());if(t.inline){var e=Se();return De(e.left+n.left,e.top+n.top,n.width,n.height)}var o=Be(Rt.fromDom(t.getBody()));return De(o.x+n.left,o.y+n.top,n.width,n.height)},iM=function(t,n,e,o){void 0===o&&(o=0);var r=Oe(window),i=Ae(Rt.fromDom(t.getContentAreaContainer())),u=Kb(t)||Jb(t)||Qb(t),a=function(t,n,e){var o=Math.max(t.x+e,n.x);return{x:o,width:Math.min(t.right-e,n.right)-o}}(i,r,o),c=a.x,s=a.width;if(t.inline&&!u)return De(c,r.y,s,r.height);var f=function(t,n,e,o,r,i){var u=Rt.fromDom(t.getContainer()),a=Qu(u,".tox-editor-header").getOr(u),c=Ae(a),s=c.y>=n.bottom,f=o&&!s;if(t.inline&&f)return{y:Math.max(c.bottom+i,e.y),bottom:e.bottom};if(t.inline&&!f)return{y:e.y,bottom:Math.min(c.y-i,e.bottom)};var l="line"===r?Ae(u):n;return f?{y:Math.max(c.bottom+i,e.y),bottom:Math.min(l.bottom-i,e.bottom)}:{y:Math.max(l.y+i,e.y),bottom:Math.min(c.y-i,e.bottom)}}(t,i,r,n.header.isPositionedAtTop(),e,o),l=f.y,d=f.bottom;return De(c,l,s,d-l)},uM={valignCentre:[],alignCentre:[],alignLeft:["tox-pop--align-left"],alignRight:["tox-pop--align-right"],right:["tox-pop--right"],left:["tox-pop--left"],bottom:["tox-pop--bottom"],top:["tox-pop--top"],inset:["tox-pop--inset"]},aM={maxHeightFunction:Zc(),maxWidthFunction:oA()},cM=function(t){return"node"===t},sM=function(t,n,e,o,r){var i=rM(t),u=o.lastElement().exists(function(t){return fn(e,t)});return function(t,n){var e=t.selection.getRng(),o=Sn(Rt.fromDom(e.startContainer),e.startOffset);return e.startContainer===e.endContainer&&e.startOffset===e.endOffset-1&&fn(o.element,n)}(t,e)?u?Xp:zp:u?function(t,n,e){var o=Yn(t,"position");jn(t,"position",n);var r=e(t);return o.each(function(n){return jn(t,"position",n)}),r}(n,o.getMode(),function(){return oM(i,Ae(n))&&!o.isReposition()?Yp:Xp}):("fixed"===o.getMode()?r.y+Se().top:r.y)+(ne(n)+12)<=i.y?zp:Up},fM=function(t,n,e,o){var r=function(n){return function(o,r,i,u,a){var c=sM(t,u,n,e,a),s=_(_({},o),{y:a.y,height:a.height});return _(_({},c(s,r,i,u,a)),{alwaysFit:!0})}},i=function(t){return cM(o)?[r(t)]:[]};
95return n?{onLtr:function(t){return[Xa,za,Ua,ja,Wa,Ga].concat(i(t))},onRtl:function(t){return[Xa,Ua,za,Wa,ja,Ga].concat(i(t))}}:{onLtr:function(t){return[Ga,Xa,ja,za,Wa,Ua].concat(i(t))},onRtl:function(t){return[Ga,Xa,Wa,Ua,ja,za].concat(i(t))}}},lM=function(t,n){var e=q(n,function(n){return n.predicate(t.dom)}),o=X(e,function(t){return"contexttoolbar"===t.type});return{contextToolbars:o.pass,contextForms:o.fail}},dM=function(t,n,e){var o=lM(t,n);if(o.contextForms.length>0)return I.some({elem:t,toolbars:[o.contextForms[0]]});var r=lM(t,e);if(r.contextForms.length>0)return I.some({elem:t,toolbars:[r.contextForms[0]]});if(o.contextToolbars.length>0||r.contextToolbars.length>0){var i=function(t){if(t.length<=1)return t;var n=function(n){return z(t,function(t){return t.position===n})},e=function(n){return q(t,function(t){return t.position===n})},o=n("selection"),r=n("node");if(o||r){if(r&&o){var i=e("node"),u=W(e("selection"),function(t){return _(_({},t),{position:"node"})});return i.concat(u)}return e(o?"selection":"node")}return e("line")}(o.contextToolbars.concat(r.contextToolbars));return I.some({elem:t,toolbars:i})}return I.none()},mM=function(t,n,e){return t(n)?I.none():yr(n,function(t){if(Ht(t)){var n=lM(t,e.inNodeScope),o=n.contextToolbars,r=n.contextForms,i=r.length>0?r:function(t){if(t.length<=1)return t;var n=function(n){return J(t,function(t){return t.position===n})};return n("selection").orThunk(function(){return n("node")}).orThunk(function(){return n("line")}).map(function(t){return t.position}).fold(function(){return[]},function(n){return q(t,function(t){return t.position===n})})}(o);return i.length>0?I.some({elem:t,toolbars:i}):I.none()}return I.none()},t)},gM=function(t,n){var e={},o=[],r=[],i={},u={},a=function(t,a){var c=Io(Fo("ContextForm",Gv,a));e[t]=c,c.launch.map(function(e){i["form:"+t]=_(_({},a.launch),{type:"contextformtogglebutton"===e.type?"togglebutton":"button",onAction:function(){n(c)}})}),"editor"===c.scope?r.push(c):o.push(c),u[t]=c},c=function(t,n){var e;(e=n,Fo("ContextToolbar",Xv,e)).each(function(e){"editor"===n.scope?r.push(e):o.push(e),u[t]=e})},s=lt(t);return G(s,function(n){var e=t[n];"contextform"===e.type?a(n,e):"contexttoolbar"===e.type&&c(n,e)}),{forms:e,inNodeScope:o,inEditorScope:r,lookupTable:u,formNavigators:i}},pM=qi("forward-slide"),hM=qi("backward-slide"),vM=qi("change-slide-event"),bM=function(t,n,e,o){var r,i,u=o.backstage,a=u.shared,c=an().deviceType.isTouch,s=Vc(),f=Vc(),l=Vc(),d=ju((r={sink:e,onEscape:function(){return t.focus(),I.some(!0)}},i=lr([]),Ap.sketch({dom:{tag:"div",classes:["tox-pop"]},fireDismissalEventInstead:{event:"doNotDismissYet"},onShow:function(t){i.set([]),Ap.getContent(t).each(function(t){$n(t.element,"visibility")}),Eu(t.element,"tox-pop--resizing"),$n(t.element,"width")},inlineBehaviours:ac([Wg("context-toolbar-events",[Ii(jr(),function(t,n){"width"===n.event.raw.propertyName&&(Eu(t.element,"tox-pop--resizing"),$n(t.element,"width"))}),Ei(vM,function(t,n){var e=t.element;$n(e,"width");var o=se(e);Ap.setContent(t,n.event.contents),_u(e,"tox-pop--resizing");var r=se(e);jn(e,"width",o+"px"),Ap.getContent(t).each(function(t){n.event.focus.bind(function(t){return hc(t),yc(e)}).orThunk(function(){return Vg.focusIn(t),bc(_n(e))})}),Kp.setTimeout(function(){jn(t.element,"width",r+"px")},0)}),Ei(pM,function(t,n){Ap.getContent(t).each(function(n){i.set(i.get().concat([{bar:n,focus:bc(_n(t.element))}]))}),xi(t,vM,{contents:n.event.forwardContents,focus:I.none()})}),Ei(hM,function(t,n){ct(i.get()).each(function(n){i.set(i.get().slice(0,i.get().length-1)),xi(t,vM,{contents:Wu(n.bar),focus:n.focus})})})]),Vg.config({mode:"special",onEscape:function(t){return ct(i.get()).fold(function(){return r.onEscape()},function(n){return yi(t,hM),I.some(!0)})}})]),lazySink:function(){return Re.value(r.sink)}}))),m=function(){var n=l.get().getOr("node"),e=cM(n)?1:0;return iM(t,a,n,e)},g=function(){return!(t.removed||c()&&u.isContextMenuOpen())},h=function(){if(g()){var n=m(),e=kt(l.get(),"node")?function(t,n){return n.filter(Bn).map(Be).getOrThunk(function(){return rM(t)})}(t,s.get()):rM(t);return n.height<=0||!oM(e,n)}return!0},v=function(){s.clear(),f.clear(),l.clear(),Ap.hide(d)}
95,b=function(){if(Ap.isOpen(d)){var t=d.element;$n(t,"display"),h()?jn(t,"display","none"):(f.set(0),Ap.reposition(d))}},y=function(n){return{dom:{tag:"div",classes:["tox-pop__dialog"]},components:[n],behaviours:ac([Vg.config({mode:"acyclic"}),Wg("pop-dialog-wrap-events",[Ri(function(n){t.shortcuts.add("ctrl+F9","focus statusbar",function(){return Vg.focusIn(n)})}),Ni(function(n){t.shortcuts.remove("ctrl+F9")})])])}},x=jt(function(){return gM(n,function(t){var n=w([t]);xi(d,pM,{forwardContents:y(n)})})}),w=function(n){var e=t.ui.registry.getAll().buttons,r=x(),i=_(_({},e),r.formNavigators),u=ty(t)===Yv.scrolling?Yv.scrolling:Yv.default,c=Q(W(n,function(n){return"contexttoolbar"===n.type?function(n,e){return LB(t,{buttons:n,toolbar:e.items,allowToolbarGroups:!1},o,I.some(["form:"]))}(i,n):function(t,n){return eM(t,n)}(n,a.providers)}));return TA({type:u,uid:qi("context-toolbar"),initGroups:c,onEscape:I.none,cyclicKeying:!0,providers:a.providers})},S=function(n,o){var r="node"===n?a.anchors.node(o):a.anchors.cursor(),i=function(t,n,e,o){return"line"===n?{bubble:os(12,0,uM),layouts:{onLtr:function(){return[qa]},onRtl:function(){return[Ya]}},overrides:aM}:{bubble:os(0,12,uM,1/12),layouts:fM(t,e,o,n),overrides:aM}}(t,n,c(),{lastElement:s.get,isReposition:function(){return kt(f.get(),0)},getMode:function(){return Sf.getMode(e)}});return Qe(r,i)},k=function(t,n){if(C.cancel(),g()){var o=w(t),r=t[0].position,i=S(r,n);l.set(r),f.set(1);var u=d.element;$n(u,"display"),function(t){return kt(Ot(t,s.get(),fn),!0)}(n)||(Eu(u,"tox-pop--transition"),Sf.reset(e,d)),Ap.showWithinBounds(d,y(o),{anchor:i,transition:{classes:["tox-pop--transition"],mode:"placement"}},function(){return I.some(m())}),n.fold(s.clear,s.set),h()&&jn(u,"display","none")}},C=dv(function(){t.hasFocus()&&!t.removed&&(Du(d.element,"tox-pop--transition")?C.throttle():function(t,n){var e=Rt.fromDom(n.getBody()),o=function(t){return fn(t,e)},r=Rt.fromDom(n.selection.getNode());return function(t){return!o(t)&&!dn(e,t)}(r)?I.none():dM(r,t.inNodeScope,t.inEditorScope).orThunk(function(){return mM(o,r,t)})}(x(),t).fold(v,function(t){k(t.toolbars,I.some(t.elem))}))},17);t.on("init",function(){t.on("remove",v),t.on("ScrollContent ScrollWindow ObjectResized ResizeEditor longpress",b),t.on("click keyup focus SetContent",C.throttle),t.on("contexttoolbar-hide",v),t.on("contexttoolbar-show",function(n){var e=x();xt(e.lookupTable,n.toolbarKey).each(function(e){k([e],_t(n.target!==t,n.target)),Ap.getContent(d).each(Vg.focusIn)})}),t.on("focusout",function(n){Kp.setEditorTimeout(t,function(){yc(e.element).isNone()&&yc(d.element).isNone()&&v()},0)}),t.on("SwitchMode",function(){t.mode.isReadOnly()&&v()}),t.on("AfterProgressState",function(n){n.state?v():t.hasFocus()&&C.throttle()}),t.on("NodeChange",function(t){yc(d.element).fold(C.throttle,p)})})},yM={unsupportedLength:["em","ex","cap","ch","ic","rem","lh","rlh","vw","vh","vi","vb","vmin","vmax","cm","mm","Q","in","pc","pt","px"],fixed:["px","pt"],relative:["%"],empty:[""]},xM=(tB=["Infinity","[0-9]+\\."+(ZA=function(t){return"(?:"+t+")?"})("[0-9]+")+ZA("[eE][+-]?[0-9]+"),"\\.[0-9]+"+ZA("[eE][+-]?[0-9]+"),"[0-9]+"+ZA("[eE][+-]?[0-9]+")].join("|"),new RegExp("^([+-]?(?:"+tB+"))(.*)$")),wM=function(t,n){return I.from(xM.exec(t)).bind(function(t){var e=Number(t[1]),o=t[2];return function(t,n){return z(n,function(n){return z(yM[n],function(n){return t===n})})}(o,n)?I.some({value:e,unit:o}):I.none()})},SM=function(t,n){var e=function(){var e=n.getOptions(t),o=n.getCurrent(t).map(n.hash),r=Vc();return W(e,function(e){return{type:"togglemenuitem",text:n.display(e),onSetup:function(i){var u=function(t){t&&(r.on(function(t){return t.setActive(!1)}),r.set(i)),i.setActive(t)};u(kt(o,n.hash(e)));var a=n.watcher(t,e,u);return function(){r.clear(),a()}},onAction:function(){return n.setCurrent(t,e)}}})};t.ui.registry.addMenuButton(n.name,{tooltip:n.text,icon:n.icon,fetch:function(t){return t(e())},onSetup:n.onToolbarSetup}),t.ui.registry.addNestedMenuItem(n.name,{type:"nestedmenuitem",text:n.text,getSubmenuItems:e,onSetup:n.onMenuSetup})},kM={name:"lineheight",text:"Line height",icon:"line-height",getOptions:function(t){return t.getParam("lineheight_formats","1 1.1 1.2 1.3 1.4 1.5 2","string").split(" ")},hash:function(t){return function(t,n){return wM(t,n).map(function(t){return t.value+t.unit})}(t,["fixed","relative","empty"]).getOr(t)},display:b,watcher:function(t,n,e){return t.formatter.formatChanged("lineheight",e,!1,{value:n}).unbind},getCurrent:function(t){return I.from(t.queryCommandValue("LineHeight"))},setCurrent:function(t,n){return t.execCommand("LineHeight",!1,n)}},CM=function(t){SM(t,kM),function(t){return I.from(function(t){return t.getParam("content_langs",void 0,"array")}(t)).map(function(n){return{name:"language",text:"Language",icon:"language",getOptions:v(n),hash:function(t){return s(t.customCode)?t.code:t.code+"/"+t.customCode},display:function(t){return t.title},watcher:function(t,n,e){return t.formatter.formatChanged("lang",e,!1,{value:n.code,customValue:n.customCode}).unbind},getCurrent:function(t){var n=Rt.fromDom(t.selection.getNode());return xr(n,function(t){return I.some(t).filter(Ht).bind(function(t){return Vn(t,"lang").map(function(n){return{code:n,customCode:Vn(t,"data-mce-lang").getOrUndefined(),title:""}})})})},setCurrent:function(t,n){return t.execCommand("Lang",!1,n)},onToolbarSetup:function(n){var e=Pc();return n.setActive(t.formatter.match("lang",{},void 0,!0)),e.set(t.formatter.formatChanged("lang",n.setActive,!0)),e.clear}}})}(t).each(function(n){return SM(t,n)})},OM=function(t,n){!function(t,n){var e=$A(0,n,rB(t));t.ui.registry.addNestedMenuItem("align",{text:n.shared.providers.translate("Align"),get
95SubmenuItems:function(){return e.items.validateItems(e.getStyleItems())}})}(t,n),function(t,n){var e=$A(0,n,aB(t));t.ui.registry.addNestedMenuItem("fontformats",{text:n.shared.providers.translate("Fonts"),getSubmenuItems:function(){return e.items.validateItems(e.getStyleItems())}})}(t,n),function(t,n){var e=_({type:"advanced"},n.styleselect),o=$A(0,n,gB(t,e));t.ui.registry.addNestedMenuItem("formats",{text:"Formats",getSubmenuItems:function(){return o.items.validateItems(o.getStyleItems())}})}(t,n),function(t,n){var e=$A(0,n,mB(t));t.ui.registry.addNestedMenuItem("blockformats",{text:"Blocks",getSubmenuItems:function(){return e.items.validateItems(e.getStyleItems())}})}(t,n),function(t,n){var e=$A(0,n,lB(t));t.ui.registry.addNestedMenuItem("fontsizes",{text:"Font sizes",getSubmenuItems:function(){return e.items.validateItems(e.getStyleItems())}})}(t,n)},_M=function(t){return qA(t,"NodeChange",function(n){n.setDisabled(!t.queryCommandState("outdent"))})},TM=function(t){!function(t){t.ui.registry.addButton("outdent",{tooltip:"Decrease indent",icon:"outdent",onSetup:_M(t),onAction:KA(t,"outdent")}),t.ui.registry.addButton("indent",{tooltip:"Increase indent",icon:"indent",onAction:KA(t,"indent")})}(t)},EM=function(t,n){return function(){t.execCommand("mceToggleFormat",!1,n)}},DM=function(t){!function(t){HC.each([{name:"bold",text:"Bold",icon:"bold"},{name:"italic",text:"Italic",icon:"italic"},{name:"underline",text:"Underline",icon:"underline"},{name:"strikethrough",text:"Strikethrough",icon:"strike-through"},{name:"subscript",text:"Subscript",icon:"subscript"},{name:"superscript",text:"Superscript",icon:"superscript"}],function(n,e){t.ui.registry.addToggleButton(n.name,{tooltip:n.text,icon:n.icon,onSetup:XA(t,n.name),onAction:EM(t,n.name)})});for(var n=1;n<=6;n++){var e="h"+n;t.ui.registry.addToggleButton(e,{text:e.toUpperCase(),tooltip:"Heading "+n,onSetup:XA(t,e),onAction:EM(t,e)})}}(t),function(t){HC.each([{name:"cut",text:"Cut",action:"Cut",icon:"cut"},{name:"copy",text:"Copy",action:"Copy",icon:"copy"},{name:"paste",text:"Paste",action:"Paste",icon:"paste"},{name:"help",text:"Help",action:"mceHelp",icon:"help"},{name:"selectall",text:"Select all",action:"SelectAll",icon:"select-all"},{name:"newdocument",text:"New document",action:"mceNewDocument",icon:"new-document"},{name:"removeformat",text:"Clear formatting",action:"RemoveFormat",icon:"remove-formatting"},{name:"remove",text:"Remove",action:"Delete",icon:"remove"}],function(n){t.ui.registry.addButton(n.name,{tooltip:n.text,icon:n.icon,onAction:KA(t,n.action)})})}(t),function(t){HC.each([{name:"blockquote",text:"Blockquote",action:"mceBlockQuote",icon:"quote"}],function(n){t.ui.registry.addToggleButton(n.name,{tooltip:n.text,icon:n.icon,onAction:KA(t,n.action),onSetup:XA(t,n.name)})})}(t)},AM=function(t){DM(t),function(t){HC.each([{name:"bold",text:"Bold",action:"Bold",icon:"bold",shortcut:"Meta+B"},{name:"italic",text:"Italic",action:"Italic",icon:"italic",shortcut:"Meta+I"},{name:"underline",text:"Underline",action:"Underline",icon:"underline",shortcut:"Meta+U"},{name:"strikethrough",text:"Strikethrough",action:"Strikethrough",icon:"strike-through",shortcut:""},{name:"subscript",text:"Subscript",action:"Subscript",icon:"subscript",shortcut:""},{name:"superscript",text:"Superscript",action:"Superscript",icon:"superscript",shortcut:""},{name:"removeformat",text:"Clear formatting",action:"RemoveFormat",icon:"remove-formatting",shortcut:""},{name:"newdocument",text:"New document",action:"mceNewDocument",icon:"new-document",shortcut:""},{name:"cut",text:"Cut",action:"Cut",icon:"cut",shortcut:"Meta+X"},{name:"copy",text:"Copy",action:"Copy",icon:"copy",shortcut:"Meta+C"},{name:"paste",text:"Paste",action:"Paste",icon:"paste",shortcut:"Meta+V"},{name:"selectall",text:"Select all",action:"SelectAll",icon:"select-all",shortcut:"Meta+A"}],function(n){t.ui.registry.addMenuItem(n.name,{text:n.text,icon:n.icon,shortcut:n.shortcut,onAction:KA(t,n.action)})}),t.ui.registry.addMenuItem("codeformat",{text:"Code",icon:"sourcecode",onAction:EM(t,"code")})}(t)},BM=function(t,n){return qA(t,"Undo Redo AddUndo TypingUndo ClearUndos SwitchMode",function(e){e.setDisabled(t.mode.isReadOnly()||!t.undoManager[n]())})},MM=function(t){!function(t){t.ui.registry.addMenuItem("undo",{text:"Undo",icon:"undo",shortcut:"Meta+Z",onSetup:BM(t,"hasUndo"),onAction:KA(t,"undo")}),t.ui.registry.addMenuItem("redo",{text:"Redo",icon:"redo",shortcut:"Meta+Y",onSetup:BM(t,"hasRedo"),onAction:KA(t,"redo")})}
95(t),function(t){t.ui.registry.addButton("undo",{tooltip:"Undo",icon:"undo",disabled:!0,onSetup:BM(t,"hasUndo"),onAction:KA(t,"undo")}),t.ui.registry.addButton("redo",{tooltip:"Redo",icon:"redo",disabled:!0,onSetup:BM(t,"hasRedo"),onAction:KA(t,"redo")})}(t)},FM=function(t){return qA(t,"VisualAid",function(n){n.setActive(t.hasVisual)})},IM=function(t){!function(t){t.ui.registry.addButton("visualaid",{tooltip:"Visual aids",text:"Visual aids",onAction:KA(t,"mceToggleVisualAid")})}(t),function(t){t.ui.registry.addToggleMenuItem("visualaid",{text:"Visual aids",onSetup:FM(t),onAction:KA(t,"mceToggleVisualAid")})}(t)},RM=function(t,n){!function(t){G([{name:"alignleft",text:"Align left",cmd:"JustifyLeft",icon:"align-left"},{name:"aligncenter",text:"Align center",cmd:"JustifyCenter",icon:"align-center"},{name:"alignright",text:"Align right",cmd:"JustifyRight",icon:"align-right"},{name:"alignjustify",text:"Justify",cmd:"JustifyFull",icon:"align-justify"}],function(n){t.ui.registry.addToggleButton(n.name,{tooltip:n.text,icon:n.icon,onAction:KA(t,n.cmd),onSetup:XA(t,n.name)})}),t.ui.registry.addButton("alignnone",{tooltip:"No alignment",icon:"align-none",onAction:KA(t,"JustifyNone")})}(t),AM(t),OM(t,n),MM(t),function(t){!function(t){t.addCommand("mceApplyTextcolor",function(n,e){!function(t,n,e){t.undoManager.transact(function(){t.focus(),t.formatter.apply(n,{value:e}),t.nodeChanged()})}(t,n,e)}),t.addCommand("mceRemoveTextcolor",function(n){!function(t,n){t.undoManager.transact(function(){t.focus(),t.formatter.remove(n,{value:null},null,!0),t.nodeChanged()})}(t,n)})}(t);var n=lr("#000000"),e=lr("#000000");Mx(t,"forecolor","forecolor","Text color",n),Mx(t,"backcolor","hilitecolor","Background color",e),Fx(t,"forecolor","forecolor","Text color"),Fx(t,"backcolor","hilitecolor","Background color")}(t),IM(t),TM(t),CM(t)},NM=function(t,n){return{type:"makeshift",x:t,y:n}},PM=function(t){return"longpress"===t.type||0===t.type.indexOf("touch")},VM=function(t,n){var e=zb.DOM.getPos(t);return function(t,n,e){return NM(t.x+n,t.y+e)}(n,e.x,e.y)},HM=function(t,n){return"contextmenu"===n.type||"longpress"===n.type?t.inline?function(t){if(PM(t)){var n=t.touches[0];return NM(n.pageX,n.pageY)}return NM(t.pageX,t.pageY)}(n):VM(t.getContentAreaContainer(),function(t){if(PM(t)){var n=t.touches[0];return NM(n.clientX,n.clientY)}return NM(t.clientX,t.clientY)}(n)):LM(t)},LM=function(t){return{type:"selection",root:Rt.fromDom(t.selection.getNode())}},zM=function(t,n,e){switch(e){case"node":return function(t){return{type:"node",node:I.some(Rt.fromDom(t.selection.getNode())),root:Rt.fromDom(t.getBody())}}(t);case"point":return HM(t,n);case"selection":return LM(t)}},UM=function(t,n,e,o,r,i){var u=e(),a=zM(t,n,i);r_(u,Kv.CLOSE_ON_EXECUTE,o,!1).map(function(t){n.preventDefault(),Ap.showMenuAt(r,{anchor:a},{menu:{markers:ob("normal")},data:t})})},jM={onLtr:function(){return[Xa,za,Ua,ja,Wa,Ga,zp,Up,Lp,Vp,Hp,Pp]},onRtl:function(){return[Xa,Ua,za,Wa,ja,Ga,zp,Up,Hp,Pp,Lp,Vp]}},WM={valignCentre:[],alignCentre:[],alignLeft:["tox-pop--align-left"],alignRight:["tox-pop--align-right"],right:["tox-pop--right"],left:["tox-pop--left"],bottom:["tox-pop--bottom"],top:["tox-pop--top"]},GM=function(t,n,e,o,r,i,u){var a=function(t,n,e){var o=zM(t,n,e);return _({bubble:os(0,"point"===e?12:0,WM),layouts:jM,overrides:{maxWidthFunction:oA(),maxHeightFunction:Zc()}},o)}(t,n,i);r_(e,Kv.CLOSE_ON_EXECUTE,o,!0).map(function(e){n.preventDefault(),Ap.showMenuWithinBounds(r,{anchor:a},{menu:{markers:ob("normal"),highlightImmediately:u},data:e,type:"horizontal"},function(){return I.some(iM(t,o.shared,"node"===i?"node":"selection"))}),t.fire("contexttoolbar-hide")})},XM=function(t,n,e,o,r,i){var u=an(),a=u.os.isiOS(),c=u.os.isOSX(),s=u.os.isAndroid(),f=u.deviceType.isTouch(),l=function(){var u=e();GM(t,n,u,o,r,i,!(s||a||c&&f))};if((c||a)&&"node"!==i){var d=function(){!function(t){var n=t.selection.getRng(),e=function(){Kp.setEditorTimeout(t,function(){t.selection.setRng(n)},10),i()};t.once("touchend",e);var o=function(t){t.preventDefault(),t.stopImmediatePropagation()};t.on("mousedown",o,!0);var r=function(){return i()};t.once("longpresscancel",r);var i=function(){t.off("touchend",e),t.off("longpresscancel",r),t.off("mousedown",o)}}(t),l()};!function(t,n){var e=t.selection;if(e.isCollapsed()||n.touches.length<1)return!1;var o=n.touches[0],r=e.getRng();return Ys(t.getWin(),Ds.domRange(r)).exists(function(t){return t.left<=o.clientX&&t.right>=o.clientX&&t.top<=o.clientY&&t.bottom>=o.clientY})}(t,n)?(t.once("selectionchange",d),t.once("touchend",function(){return t.off("selectionchange",d)})):d()}else l()},qM=function(t){return"string"==typeof t?t.split(/[ ,]/):t},YM=function(t){return t.getParam("contextmenu_never_use_native",!1,"boolean")},KM=function(t){return function(t,n,e){var o=t.ui.registry.getAll().contextMenus;return I.from(t.getParam(n)).map(qM).getOrThunk(function(){return q(qM(e),function(t){return wt(o,t)}
95)})}(t,"contextmenu","link linkchecker image imagetools table spellchecker configurepermanentpen")},JM=function(t){return r(t)?"|"===t:"separator"===t.type},$M={type:"separator"},QM=function(t){var n,e=function(t){return{text:t.text,icon:t.icon,disabled:t.disabled,shortcut:t.shortcut}};if(r(t))return t;switch(t.type){case"separator":return $M;case"submenu":return _(_({type:"nestedmenuitem"},e(t)),{getSubmenuItems:function(){var n=t.getSubmenuItems();return r(n)?n:W(n,QM)}});default:return _(_({type:"menuitem"},e(t)),{onAction:(n=t.onAction,function(){return n()})})}},ZM=function(t,n){if(0===n.length)return t;var e=ct(t).filter(function(t){return!JM(t)}).fold(function(){return[]},function(t){return[$M]});return t.concat(e).concat(n).concat([$M])},tF=function(t,n){return"longpress"!==n.type&&(2!==n.button||n.target===t.getBody()&&""===n.pointerType)},nF=function(t,n){return tF(t,n)?t.selection.getStart(!0):n.target},eF=function(t,n,e){var o=an().deviceType.isTouch,i=ju(Ap.sketch({dom:{tag:"div"},lazySink:n,onEscape:function(){return t.focus()},onShow:function(){return e.setContextMenuState(!0)},onHide:function(){return e.setContextMenuState(!1)},fireDismissalEventInstead:{},inlineBehaviours:ac([Wg("dismissContextMenu",[Ei(li(),function(n,e){Wf.close(n),t.focus()})])])})),u=function(t){return Ap.hide(i)},a=function(n){if(YM(t)&&n.preventDefault(),!function(t,n){return n.ctrlKey&&!YM(t)}(t,n)&&!function(t){return!1===t.getParam("contextmenu")}(t)){var u=function(t,n){var e=function(t){return t.getParam("contextmenu_avoid_overlap","","string")}(t),o=tF(t,n)?"selection":"point";if(Mt(e)){var r=nF(t,n);return ow(Rt.fromDom(r),e)?"node":o}return o}(t,n);(o()?XM:UM)(t,n,function(){var e=nF(t,n),o=t.ui.registry.getAll(),i=KM(t);return function(t,n,e){var o=K(n,function(n,o){return xt(t,o.toLowerCase()).map(function(t){var o=t.update(e);if(r(o))return ZM(n,o.split(" "));if(o.length>0){var i=W(o,QM);return ZM(n,i)}return n}).getOrThunk(function(){return n.concat([o])})},[]);return o.length>0&&JM(o[o.length-1])&&o.pop(),o}(o.contextMenus,i,e)},e,i,u)}};t.on("init",function(){var n="ResizeEditor ScrollContent ScrollWindow longpresscancel"+(o()?"":" ResizeWindow");t.on(n,u),t.on("longpress contextmenu",a)})},oF=dr([{offset:["x","y"]},{absolute:["x","y"]},{fixed:["x","y"]}]),rF=function(t){return function(n){return n.translate(-t.left,-t.top)}},iF=function(t){return function(n){return n.translate(t.left,t.top)}},uF=function(t){return function(n,e){return K(t,function(t,n){return n(t)},re(n,e))}},aF=function(t,n,e){return t.fold(uF([iF(e),rF(n)]),uF([rF(n)]),uF([]))},cF=function(t,n,e){return t.fold(uF([iF(e)]),uF([]),uF([iF(n)]))},sF=function(t,n,e){return t.fold(uF([]),uF([rF(e)]),uF([iF(n),rF(e)]))},fF=function(t,n,e){var o=t.fold(function(t,n){return{position:I.some("absolute"),left:I.some(t+"px"),top:I.some(n+"px")}},function(t,n){return{position:I.some("absolute"),left:I.some(t-e.left+"px"),top:I.some(n-e.top+"px")}},function(t,n){return{position:I.some("fixed"),left:I.some(t+"px"),top:I.some(n+"px")}});return _({right:I.none(),bottom:I.none()},o)},lF=function(t,n,e,o){var r=function(t,r){return function(i,u){var a=t(n,e,o);return r(i.getOr(a.left),u.getOr(a.top))}};return t.fold(r(sF,dF),r(cF,mF),r(aF,gF))},dF=oF.offset,mF=oF.absolute,gF=oF.fixed,pF=function(t,n){var e=Pn(t,n);return s(e)?NaN:parseInt(e,10)},hF=function(t,n,e,o){return function(t,n){var e=t.element,o=pF(e,n.leftAttr),r=pF(e,n.topAttr);return isNaN(o)||isNaN(r)?I.none():I.some(re(o,r))}(t,n).fold(function(){return e},function(t){return gF(t.left+o.left,t.top+o.top)})},vF=function(t,n,e,o,r,i){var u=hF(t,n,e,o),a=n.mustSnap?xF(t,n,u,r,i):wF(t,n,u,r,i),c=aF(u,r,i);return function(t,n,e){var o=t.element;Rn(o,n.leftAttr,e.left+"px"),Rn(o,n.topAttr,e.top+"px")}(t,n,c),a.fold(function(){return{coord:gF(c.left,c.top),extra:I.none()}},function(t){return{coord:t.output,extra:t.extra}})},bF=function(t,n){!function(t,n){var e=t.element;Ln(e,n.leftAttr),Ln(e,n.topAttr)}(t,n)},yF=function(t,n,e,o){return ft(t,function(t){var r=t.sensor;return function(t,n,e,o,r,i){var u=cF(t,r,i),a=cF(n,r,i);return Math.abs(u.left-a.left)<=e&&Math.abs(u.top-a.top)<=o}(n,r,t.range.left,t.range.top,e,o)?I.some({output:lF(t.output,n,e,o),extra:t.extra}):I.none()})},xF=function(t,n,e,o,r){var i=n.getSnapPoints(t);return yF(i,e,o,r).orThunk(function(){return K(i,function(t,n){var i=n.sensor,u=function(t,n,e,o,r,i){var u=cF(t,r,i),a=cF(n,r,i),c=Math.abs(u.left-a.left),s=Math.abs(u.top-a.top);return re(c,s)}(e,i,n.range.left,n.range.top,o,r);return t.deltas.fold(function(){return{deltas:I.some(u),snap:I.some(n)}},function(e){return(u.left+u.top)/2<=(e.left+e.top)/2?{deltas:I.some(u),snap:I.some(n)}:t})},{deltas:I.none(),snap:I.none()}).snap.map(function(t){return{output:lF(t.output,e,o,r),extra:t.extra}})})},wF=function(t,n,e,o,r){var i=n.getSnapPoints(t);return yF(i,e,o,r)},SF=Object.freeze({__proto__:null,snapTo:function(t,n,e,o){var r=n.getTarget(t.element);if(n.repositionTarget){var i=mn(t.element),u=Se(i),a=RE(r),c=function(t,n,e){return{coord:lF(t.output,t.output,n,e),extra:t.extra}}(o,u,a),s=fF(c.coord,0,a);Gn(r,s)}}}),kF=function(t,n){t.getSystem().addToGui(n),function(t){vn(t.element).filter(Ht).each(function(n){Yn(n,"z-index").each(function(t){Rn(n,"data-initial-z-index",t)}),jn(n,"z-index",Xn(t.element,"z-index"))})}(n)},CF=function(t){!function(t){vn(t.element).filter(Ht).each(function(t){Vn(t,"data-initial-z-index").fold(function(){return $n(t,"z-index")},function(n){return jn(t,"z-index",n)}),Ln(t,"data-initial-z-index")})}(t),t.getSystem().removeFromGui(t)},OF=function(t,n,e){return t.getSystem().build(vw.sketch({dom:{styles:{left:"0px",top:"0px",width:"100%",height:"100%",position:"fixed","z-index":"1000000000000000"},classes:[n]},events:e}))},_F=nr("snaps",[zo("getSnapPoints"),pa("onSensor"),zo("leftAttr"),zo("topAttr"),er("lazyViewport",Me),er("mustSnap",!1)]),TF=[er("useFixed",k),zo("blockerClass"),er("getTarget",b),er("onDrag",p),er("repositionTarget",!0),er("onDrop",p),cr("getBounds",Me),_F],EF=function(t){return(n=Yn(t,"left"),e=Yn(t,"top"),o=Yn(t,"position"),r=function(t,n,e){return("fixed"===e?gF:dF)(parseInt(t,10),parseInt(n,10))},n.isSome()&&e.isSome()&&o.isSome()?I.some(r(n.getOrDie(),e.getOrDie(),o.getOrDie())):I.none()).getOrThunk(function(){var n=ue(t);return mF(n.left,n.top)});var n,e,o,r},DF=function(t,n,e,o,r,i,u){return function(t,n,e,o,r){var i=r.boun
95ds,u=cF(n,e,o),a=Fa(u.left,i.x,i.x+i.width-r.width),c=Fa(u.top,i.y,i.y+i.height-r.height),s=mF(a,c);return n.fold(function(){var t=sF(s,e,o);return dF(t.left,t.top)},v(s),function(){var t=aF(s,e,o);return gF(t.left,t.top)})}(0,n.fold(function(){var t,n,u,a=(t=e,n=i.left,u=i.top,t.fold(function(t,e){return dF(t+n,e+u)},function(t,e){return mF(t+n,e+u)},function(t,e){return gF(t+n,e+u)})),c=aF(a,o,r);return gF(c.left,c.top)},function(n){var u=vF(t,n,e,i,o,r);return u.extra.each(function(e){n.onSensor(t,e)}),u.coord}),o,r,u)},AF=function(t,n){return{bounds:t.getBounds(),height:ee(n.element),width:fe(n.element)}},BF=function(t,n,e,o,r){var i=e.update(o,r),u=e.getStartData().getOrThunk(function(){return AF(n,t)});i.each(function(e){!function(t,n,e,o){var r=n.getTarget(t.element);if(n.repositionTarget){var i=mn(t.element),u=Se(i),a=RE(r),c=EF(r),s=DF(t,n.snaps,c,u,a,o,e),f=fF(s,0,a);Gn(r,f)}n.onDrag(t,r,o)}(t,n,u,e)})},MF=function(t,n,e,o){n.each(CF),e.snaps.each(function(n){bF(t,n)});var r=e.getTarget(t.element);o.reset(),e.onDrop(t,r)},FF=function(t){return function(n,e){var o=function(t){e.setStartData(AF(n,t))};return Oi(E([Ei(ai(),function(t){e.getStartData().each(function(){return o(t)})})],t(n,e,o),!0))}},IF=Object.freeze({__proto__:null,getData:function(t){return I.from(re(t.x,t.y))},getDelta:function(t,n){return re(n.left-t.left,n.top-t.top)}}),RF=function(t,n,e){return[Ei(Ar(),function(o,r){if(0===r.event.raw.button){r.stop();var i=function(){return MF(o,I.some(c),t,n)},u=rw(i,200),a={drop:i,delayDrop:u.schedule,forceDrop:i,move:function(e){u.cancel(),BF(o,t,n,IF,e)}},c=OF(o,t.blockerClass,function(t){return Oi([Ei(Ar(),t.forceDrop),Ei(Fr(),t.drop),Ei(Br(),function(n,e){t.move(e.event)}),Ei(Mr(),t.delayDrop)])}(a));e(o),kF(o,c)}})]},NF=E(E([],TF,!0),[ya("dragger",{handlers:FF(RF)})],!1),PF=Object.freeze({__proto__:null,getData:function(t){var n=t.raw.touches;return 1===n.length?function(t){var n=t[0];return I.some(re(n.clientX,n.clientY))}(n):I.none()},getDelta:function(t,n){return re(n.left-t.left,n.top-t.top)}}),VF=function(t,n,e){var o=Vc(),r=function(e){MF(e,o.get(),t,n),o.clear()};return[Ei(_r(),function(i,u){u.stop();var a=function(){return r(i)},c={drop:a,delayDrop:p,forceDrop:a,move:function(e){BF(i,t,n,PF,e)}},s=OF(i,t.blockerClass,function(t){return Oi([Ei(_r(),t.forceDrop),Ei(Er(),t.drop),Ei(Dr(),t.drop),Ei(Tr(),function(n,e){t.move(e.event)})])}(c));o.set(s);e(i),kF(i,s)}),Ei(Tr(),function(e,o){o.stop(),BF(e,t,n,PF,o.event)}),Ei(Er(),function(t,n){n.stop(),r(t)}),Ei(Dr(),r)]},HF=NF,LF=E(E([],TF,!0),[ya("dragger",{handlers:FF(VF)})],!1),zF=E(E([],TF,!0),[ya("dragger",{handlers:FF(function(t,n,e){return E(E([],RF(t,n,e),!0),VF(t,
95n,e),!0)})})],!1),UF=lc({branchKey:"mode",branches:Object.freeze({__proto__:null,mouse:HF,touch:LF,mouseOrTouch:zF}),name:"dragging",active:{events:function(t,n){return t.dragger.handlers(t,n)}},extra:{snap:function(t){return{sensor:t.sensor,range:t.range,output:t.output,extra:I.from(t.extra)}}},state:Object.freeze({__proto__:null,init:function(){var t=I.none(),n=I.none(),e=v({});return fu({readState:e,reset:function(){t=I.none(),n=I.none()},update:function(n,e){return n.getData(e).bind(function(e){return function(n,e){var o=t.map(function(t){return n.getDelta(t,e)});return t=I.some(e),o}(n,e)})},getStartData:function(){return n},setStartData:function(t){n=I.some(t)}})}}),apis:SF}),jF=function(t,n,e,o,r,i){return t.fold(function(){return UF.snap({sensor:mF(e-20,o-20),range:re(r,i),output:mF(I.some(e),I.some(o)),extra:{td:n}})},function(t){var r=e-20,i=o-20,u=t.element.dom.getBoundingClientRect();return UF.snap({sensor:mF(r,i),range:re(40,40),output:mF(I.some(e-u.width/2),I.some(o-u.height/2)),extra:{td:n}})})},WF=function(t,n,e){return{getSnapPoints:t,leftAttr:"data-drag-left",topAttr:"data-drag-top",onSensor:function(t,o){var r=o.td;(function(t,n){return t.exists(function(t){return fn(t,n)})})(n.get(),r)||(n.set(r),e(r))},mustSnap:!0}},GF=function(t){return Qp(Jp.sketch({dom:{tag:"div",classes:["tox-selector"]},buttonBehaviours:ac([UF.config({mode:"mouseOrTouch",blockerClass:"blocker",snaps:t}),FS.config({})]),eventOrder:{mousedown:["dragging","alloy.base.behaviour"],touchstart:["dragging","alloy.base.behaviour"]}}))},XF=function(t,n){var e=lr([]),o=lr([]),r=lr(!1),i=Vc(),u=Vc(),a=function(t){var e=Be(t);return jF(l.getOpt(n),t,e.x,e.y,e.width,e.height)},c=function(t){var e=Be(t);return jF(d.getOpt(n),t,e.right,e.bottom,e.width,e.height)},s=WF(function(){return W(e.get(),function(t){return a(t)})},i,function(n){u.get().each(function(e){t.fire("TableSelectorChange",{start:n,finish:e})})}),f=WF(function(){return W(o.get(),function(t){return c(t)})},u,function(n){i.get().each(function(e){t.fire("TableSelectorChange",{start:e,finish:n})})}),l=GF(s),d=GF(f),m=ju(l.asSpec()),g=ju(d.asSpec()),p=function(n,e,o,r){var i=o(e);UF.snapTo(n,i);!function(n,e,o,r){var i=e.dom.getBoundingClientRect();$n(n.element,"display");var u=hn(Rt.fromDom(t.getBody())).dom.innerHeight,a=o(i),c=r(i,u);(a||c)&&jn(n.element,"display","none")}(n,e,function(t){return t[r]<0},function(t,n){return t[r]>n})},h=function(t){return p(m,t,a,"top")},v=function(t){return p(g,t,c,"bottom")};an().deviceType.isTouch()&&(t.on("TableSelectionChange",function(t){r.get()||(Tf(n,m),Tf(n,g),r.set(!0)),i.set(t.start),u.set(t.finish),t.otherCells.each(function(n){e.set(n.upOrLeftCells),o.set(n.downOrRightCells),h(t.start),v(t.finish)})}),t.on("ResizeEditor ResizeWindow ScrollContent",function(){i.get().each(h),u.get().each(v)}),t.on("TableSelectionClear",function(){r.get()&&(Af(m),Af(g),r.set(!1)),i.clear(),u.clear()}))},qF=function(t){if(1===t.nodeType){if("BR"===t.nodeName||t.getAttribute("data-mce-bogus"))return!0;if("bookmark"===t.getAttribute("data-mce-type"))return!0}return!1},YF=function(t,n,e){n.delimiter||(n.delimiter="»");return{dom:{tag:"div",classes:["tox-statusbar__path"],attributes:{role:"navigation"}},behaviours:ac([Vg.config({mode:"flow",selector:"div[role=button]"}),Md.config({disabled:e.isDisabled}),vy(),Cw.config({}),jg.config({}),Wg("elementPathEvents",[Ri(function(o,r){t.shortcuts.add("alt+F11","focus statusbar elementpath",function(){return Vg.focusIn(o)}),t.on("NodeChange",function(r){var i,u,a=function(n){for(var e=[],o=n.length;o-- >0;){var r=n[o];if(1===r.nodeType&&!qF(r)){var i=t.fire("ResolveName",{name:r.nodeName.toLowerCase(),target:r});if(i.isDefaultPrevented()||e.push({name:i.name,element:r}),i.isPropagationStopped())break}}return e}(r.parents);a.length>0?jg.set(o,(i=W(a||[],function(n,o){return Jp.sketch({dom:{tag:"div",classes:["tox-statusbar__path-item"],attributes:{role:"button","data-index":o,"tab-index":-1,"aria-level":o+1},innerHtml:n.name},action:function(e){t.focus(),t.selection.select(n.element),t.nodeChanged()},buttonBehaviours:ac([yy(e.isDisabled),vy()])})}),u={dom:{tag:"div",classes:["tox-statusbar__path-divider"],attributes:{"aria-hidden":!0},innerHtml:" "+n.delimiter+" "}},K(i.slice(1),function(t,n){var e=t;return e.push(u),e.push(n),e},[i[0]]))):jg.set(o,[])})})])]),components:[]}};!function(t){t[t.None=0]="None",t[t.Both=1]="Both",t[t.Vertical=2]="Vertical"}(nB||(nB={}));var KF=function(t,n,e){var o=Rt.fromDom(t.getContainer()),r=function(t,n,e,o,r){var i={};return i.height=qB(o+n.top,Xb(t),Yb(t)),e===nB.Both&&(i.width=qB(r+n.left,Gb(t),qb(t))),i}(t,n,e,ne(o),se(o));mt(r,function(t,n){return jn(o,n,XB(t))}),function(t){t.fire("ResizeEditor")}(t)},JF=function(t,n,e,o){var r=re(20*e,20*o);return KF(t,r,n),I.some(!0)},$F=function(t,n){var e=function(t){var n=!t.hasPlugin("autoresize"),e=t.getParam("resize",n);return!1===e?nB.None:"both"===e?nB.Both:nB.Vertical}(t);return e===nB.None?I.none():I.some(av("resize-handle",{tag:"div",classes:["tox-statusbar__resize-handle"],attributes:{title:n.translate("Resize")},behaviours:[UF.config({mode:"mouse",repositionTarget:!1,onDrag:function(n,o,r){return KF(t,r,e)},blockerClass:"tox-blocker"}),Vg.config({mode:"special",onLeft:function(){return JF(t,e,-1,0)},onRight:function(){return JF(t,e,1,0)},onUp:function(){return JF(t,e,0,-1)},onDown:function(){return JF(t,e,0,1)}}),Cw.config({}),Kg.config({})]},n.icons))},QF=function(t,n){var e,o,r=function(){var e,o=[];return t.getParam("elementpath",!0,"boolean")&&o.push(YF(t,{},n)),t.hasPlugin("wordcount")&&o.push(function(t,n){var e,o=function(t,e,o){return jg.set(t,[Lu(n.translate(["{0} "+o,e[o]]))])};return Jp.sketch({dom:{tag:"button",classes:["tox-statusbar__wordcount"]},components:[],buttonBehaviours:ac([yy(n.isDisabled),vy(),Cw.config({}),jg.config({}),fl.config({store:{mode:"memory",initialValue:{mode:"words",count:{words:0,characters:0}}}}),Wg("wordcount-events",[Vi(function(t){var n=fl.getValue(t),e="words"===n.mode?"characters":"words";fl.setValue(t,{mode:e,count:n.count}),o(t,n.count,e)}),Ri(function(n){t.on("wordCountUpdate",function(t){var e=fl.getValue(n).mode;fl.setValue(n,{mode:e,count:t.wordCount}
95),o(n,t.wordCount,e)})})])]),eventOrder:(e={},e[Qr()]=["disabling","alloy.base.behaviour","wordcount-events"],e)})}(t,n)),t.getParam("branding",!0,"boolean")&&o.push({dom:{tag:"span",classes:["tox-statusbar__branding"],innerHtml:'<a href="https://www.tiny.cloud/?utm_campaign=editor_referral&amp;utm_medium=poweredby&amp;utm_source=tinymce&amp;utm_content=v5" rel="noopener" target="_blank" tabindex="-1" aria-label="'+(e=Zh.translate(["Powered by {0}","Tiny"]))+'">'+e+"</a>"}}),o.length>0?[{dom:{tag:"div",classes:["tox-statusbar__text-container"]},components:o}]:[]};return{dom:{tag:"div",classes:["tox-statusbar"]},components:(e=r(),o=$F(t,n),e.concat(o.toArray()))}},ZF=function(t){var n,e,o,r,i=t.inline,u=i?QB:WB,a=sy(t)?aD:FE,c=I.none(),s=an(),f=s.browser.isIE()?["tox-platform-ie"]:[],l=s.deviceType.isTouch()?["tox-platform-touch"]:[],d=ry(t),m=ay(t),g=Zh.isRtl()?{attributes:{dir:"rtl"}}:{},h={attributes:(n={},n[cs]=d?Dc.BottomToTop:Dc.TopToBottom,n)},v=function(){return c.bind(RA.getHeader)},b=function(){jn(X.element,"width",document.body.clientWidth+"px")},y=ju((e=fn(Mn(),m)&&"grid"===Xn(m,"display"),o={dom:_({tag:"div",classes:["tox","tox-silver-sink","tox-tinymce-aux"].concat(f).concat(l)},g),behaviours:ac([Sf.config({useFixed:function(){return a.isDocked(v)}})])},r={dom:{styles:{width:document.body.clientWidth+"px"}},events:Oi([Ei(ci(),b)])},Qe(o,e?r:{}))),x=function(){return Re.value(y)},w=Qp({dom:{tag:"div",classes:["tox-anchorbar"]}}),S=function(){return c.bind(function(t){return RA.getThrobber(t)}).getOrDie("Could not find throbber element")},k=yE(y,t,function(){return c.bind(function(t){return w.getOpt(t)}).getOrDie("Could not find a anchor bar element")}),C=RA.parts.menubar({dom:{tag:"div",classes:["tox-menubar"]},backstage:k,onEscape:function(){t.focus()}}),O=ty(t),T=RA.parts.toolbar(_({dom:{tag:"div",classes:["tox-toolbar"]},getSink:x,providers:k.shared.providers,onEscape:function(){t.focus()},type:O,lazyToolbar:function(){return c.bind(function(t){return RA.getToolbar(t)}).getOrDie("Could not find more toolbar element")},lazyHeader:function(){return v().getOrDie("Could not find header element")}},h)),E=RA.parts["multiple-toolbar"]({dom:{tag:"div",classes:["tox-toolbar-overlord"]},providers:k.shared.providers,onEscape:function(){t.focus()},type:O}),D=RA.parts.socket({dom:{tag:"div",classes:["tox-edit-area"]}}),A=RA.parts.sidebar({dom:{tag:"div",classes:["tox-sidebar"]}}),B=RA.parts.throbber({dom:{tag:"div",classes:["tox-throbber"]},backstage:k}),M=t.getParam("statusbar",!0,"boolean")&&!i?I.some(QF(t,k.shared.providers)):I.none(),F={dom:{tag:"div",classes:["tox-sidebar-wrap"]},components:[D,A]},R=Qb(t),N=Jb(t),P=Kb(t),V=RA.parts.header({dom:_({tag:"div",classes:["tox-editor-header"]},h),components:Q([P?[C]:[],R?[E]:N?[T]:[],uy(t)?[]:[w.asSpec()]]),sticky:sy(t),editor:t,sharedBackstage:k.shared}),H=Q([d?[]:[V],i?[]:[F],d?[V]:[]]),L=Q([[{dom:{tag:"div",classes:["tox-editor-container"]},components:H}],i?[]:M.toArray(),[B]]),z=cy(t),U=_(_({role:"application"},Zh.isRtl()?{dir:"rtl"}:{}),z?{"aria-hidden":"true"}:{}),j=ju(RA.sketch({dom:{tag:"div",classes:["tox","tox-tinymce"].concat(i?["tox-tinymce-inline"]:[]).concat(d?["tox-tinymce--toolbar-bottom"]:[]).concat(l).concat(f),styles:_({visibility:"hidden"},z?{opacity:"0",border:"0"}:{}),attributes:U},components:L,behaviours:ac([vy(),Md.config({disableClass:"tox-tinymce--disabled"}),Vg.config({mode:"cyclic",selector:".tox-menubar, .tox-toolbar, .tox-toolbar__primary, .tox-toolbar__overflow--open, .tox-sidebar__overflow--open, .tox-statusbar__path, .tox-statusbar__wordcount, .tox-statusbar__branding a, .tox-statusbar__resize-handle"})])}));c=I.some(j),t.shortcuts.add("alt+F9","focus menubar",function(){RA.focusMenubar(j)}),t.shortcuts.add("alt+F10","focus toolbar",function(){RA.focusToolbar(j)}),t.addCommand("ToggleToolbarDrawer",function(){RA.toggleToolbarDrawer(j)}),t.addQueryStateHandler("ToggleToolbarDrawer",function(){return RA.isToolbarDrawerToggled(j)});var W=bw(j),X=bw(y);!function(t,n,e){var o=function(t,o){G([n,e],function(n){n.broadcastEvent(t,o)})},r=function(t,o){G([n,e],function(n){n.broadcastOn([t],o)})},i=function(t){return r(Gf(),{target:t.target})},u=pc(),a=Lc(u,"touchstart",i),c=Lc(u,"touchmove",function(t){return o(ii(),t)}),s=Lc(u,"touchend",function(t){return o(ui(),t)}),f=Lc(u,"mousedown",i),l=Lc(u,"mouseup",function(t){0===t.raw.button&&r(qf(),{target:t.target})}),d=function(t){return r(Gf(),{target:Rt.fromDom(t.target)})},m=function(t){0===t.button&&r(qf(),{target:Rt.fromDom(t.target)})},g=function(){G(t.editorManager.get(),function(n){t!==n&&n.fire("DismissPopups",{relatedTarget:t})})},p=function(t){return o(ai(),Uc(t))},h=function(t){r(Xf(),{}),o(ci(),Uc(t))},v=function(){return r(Xf(),{})},b=function(n){n.state&&r(Gf(),{target:Rt.fromDom(t.getContainer())})},y=function(t){r(Gf(),{target:Rt.fromDom(t.relatedTarget.getContainer())})};t.on("PostRender",function(){t.on("click",d),t.on("tap",d),t.on("mouseup",m),t.on("mousedown",g),t.on("ScrollWindow",p),t.on("ResizeWindow",h),t.on("ResizeEditor",v),t.on("AfterProgressState",b),t.on("DismissPopups",y)}),t.on("remove",function(){t.off("click",d),t.off("tap",d),t.off("mouseup",m),t.off("mousedown",g),t.off("ScrollWindow",p),t.off("ResizeWindow",h),t.off("ResizeEditor",v),t.off("AfterProgressState",b),t.off("DismissPopups",y),f.unbind(),a.unbind(),c.unbind(),s.unbind(),l.unbind()}),t.on("detach",function(){If(n),If(e),n.destroy(),e.destroy()})}(t,W,X);var q=function(){var n=XB(YB(t)),e=XB(function(t){return KB(t).getOr(Wb(t))}(t));return t.inline||(Jn("div","width",e)&&jn(j.element,"width",e),Jn("div","height",n)?jn(j.element,"height",n):jn(j.element,"height","200px")),n};return{mothership:W,uiMothership:X,backstage:k,renderUI:function(){a.setup(t,k.shared,v),RM(t,k),eF(t,x,k),function(t){var n=t.ui.registry.getAll().sidebars;G(lt(n),function(e){var o=n[e],r=function(){return kt(I.from(t.queryCommandValue("ToggleSidebar")),e)};t.ui.registry.addToggleButton(e,{icon:o.icon,tooltip:o.tooltip,onAction:function(n){t.execCommand("ToggleSidebar",!1,e),n.setActive(r())},onSetup:function(n){var e=function(){return n.setActive(r())};return t.on("ToggleSidebar",e),function(){t.off("ToggleSidebar",e)}}})})}(t),qD(t,S,k.shared),gt(function(t){return t.getParam("toolbar_groups",{},"object")}(t),function(n,e){t.ui.registry.addGroupToolbarButton(e,n)});var n=t.ui.registry.getAll(),e=n.buttons,o=n.menuItems,r=n.contextToolbars,i=n.sidebars,c=$b(t),s={menuItems:o,menus:fy(t),menubar:ly(t),toolbar:c.getOrThunk(function(){return function(t){return t.getParam("toolbar",!0)}(t)}),allowToolbarGroups:O===Yv.floating,buttons:e,sidebar:i};bM(t,r,y,{backstage:k}),XF(t,y);var f=t.getElement(),l=q(),d={mothership:W,uiMothership:X,outerContainer:j},m={targetNode:f,height:l};return u.render(t,d,s,k,m)},getUi:function(){return{channels:{broadcastAll:X.broadcast,broadcastOn:X.broadcastOn,register:p}}}}},tI=v([zo("lazySink"),Ko("dragBlockClass"),cr("getBounds",Me),er("useTabstopAt",C),er("eventOrder",{}),ll("modalBehaviours",[Vg]),ha("onExecute"),ba("onEscape")]),nI={sketch:b},eI=v([zl({name:"draghandle",overrides:function(t,n){return{behaviours:ac([UF.config({mode:"mouse",getTarget:function(t){return Ju(t,'[role="dialog"]').getOr(t)},blockerClass:t.dragBlockClass.getOrDie(new Error("The drag blocker class was not specified for a dialog with a drag handle: \n"+JSON.stringify(n,null,2)).message),getBounds:t.getDragBounds})])}}}),Hl({schema:[zo("dom")],name:"title"}),Hl({factory:nI,schema:[zo("dom")],name:"close"}),Hl({factory:nI,schema:[zo("dom")],name:"body"}),zl({factory:nI,schema:[zo("dom")],name:"footer"}),Ll({factory:{sketch:function(t,n){return _(_({},t),{dom:n.dom,components:n.components})}},schema:[er("dom",{tag:"div",styles:{position:"fixed",left:"0px",top:"0px",right:"0px",bottom:"0px"}}),er("components",[])],name:"blocker"})]),oI=gd({name:"ModalDialog",configFields:tI(),partFields:eI(),factory:function(t,n,e,o){var r,i=Vc(),u=qi("modal-events"),a=_(_({},t.eventOrder),((r={})[si()]=[u].concat(t.eventOrder["alloy.system.attached"]||[]),r));return{uid:t.uid,dom:t.dom,components:n,apis:{show:function(n){i.set(n);var e=t.lazySink(n).getOrDie(),r=o.blocker(),u=e.getSystem().build(_(_({}
95,r),{components:r.components.concat([Wu(n)]),behaviours:ac([Kg.config({}),Wg("dialog-blocker-events",[Ii(Rr(),function(){Vg.focusIn(n)})])])}));Tf(e,u),Vg.focusIn(n)},hide:function(t){i.clear(),vn(t.element).each(function(n){t.getSystem().getByDom(n).each(function(t){Af(t)})})},getBody:function(n){return td(n,t,"body")},getFooter:function(n){return td(n,t,"footer")},setIdle:function(t){WD.unblock(t)},setBusy:function(t,n){WD.block(t,n)}},eventOrder:a,domModification:{attributes:{role:"dialog","aria-modal":"true"}},behaviours:ml(t.modalBehaviours,[jg.config({}),Vg.config({mode:"cyclic",onEnter:t.onExecute,onEscape:t.onEscape,useTabstopAt:t.useTabstopAt}),WD.config({getRoot:i.get}),Wg(u,[Ri(function(n){var e,o,r,i,u,a;e=n.element,o=td(n,t,"title").element,r=Vn(e,"id").fold(function(){var t=qi("dialog-label");return Rn(o,"id",t),t},b),Rn(e,"aria-labelledby",r),i=n.element,u=td(n,t,"body").element,a=I.from(Pn(i,"id")).fold(function(){var t=qi("dialog-describe");return Rn(u,"id",t),t},b),Rn(i,"aria-describedby",a)})])])}},apis:{show:function(t,n){t.show(n)},hide:function(t,n){t.hide(n)},getBody:function(t,n){return t.getBody(n)},getFooter:function(t,n){return t.getFooter(n)},setBusy:function(t,n,e){t.setBusy(n,e)},setIdle:function(t,n){t.setIdle(n)}}}),rI=ho([jo("type"),jo("name")].concat(xb)),iI=Oo,uI=[Vo("name","name",to(function(){return qi("button-name")}),Co),Qo("icon"),ur("align","end",["start","end"]),ar("primary",!1),ar("disabled",!1)],aI=E(E([],uI,!0),[jo("text")],!1),cI=E([Wo("type",["submit","cancel","custom"])],aI,!0),sI=E([Wo("type",["menu"]),Qo("text"),Qo("tooltip"),Qo("icon"),Yo("items",rI)],uI,!0),fI=Po("type",{submit:cI,cancel:cI,custom:cI,menu:sI}),lI=[jo("type"),jo("text"),Wo("level",["info","warn","error","success"]),jo("icon"),er("url","")],dI=ho(lI),mI=[jo("type"),jo("text"),ar("disabled",!1),ar("primary",!1),Vo("name","name",to(function(){return qi("button-name")}),Co),Qo("icon"),ar("borderless",!1)],gI=ho(mI),pI=[jo("type"),jo("name"),jo("label"),ar("disabled",!1)],hI=ho(pI),vI=Oo,bI=[jo("type"),jo("name")],yI=bI.concat([Qo("label")]),xI=yI.concat([er("columns","auto")]),wI=ho(xI),SI=xo([jo("value"),jo("text"),jo("icon")]),kI=ho(yI),CI=Co,OI=ho(yI),_I=Co,TI=bI.concat([ir("tag","textarea"),jo("scriptId"),jo("scriptUrl"),function(t,n){return or(t,n,Eo)}("settings",void 0)]),EI=bI.concat([ir("tag","textarea"),Go("init")]),DI=Bo(function(t){return Fo("customeditor.old",po(EI),t).orThunk(function(){return Fo("customeditor.new",po(TI),t)})}),AI=Co,BI=ho(yI),MI=vo(co),FI=function(t){return[jo("type"),(n="columns",Uo(n,ko)),t];var n},II=[jo("type"),jo("html"),ur("presets","presentation",["presentation","document"])],RI=ho(II),NI=yI.concat([ar("sandboxed",!0)]),PI=ho(NI),VI=Co,HI=yI.concat([Uo("currentState",ho([zo("blob"),jo("url")]))]),LI=ho(HI),zI=yI.concat([Qo("inputMode"),Qo("placeholder"),ar("maximized",!1),ar("disabled",!1)]),UI=ho(zI),jI=Co,WI=function(t){return[jo("type"),jo("label"),t]},GI=[jo("text"),jo("value")],XI=[jo("text"),Yo("items",function(t,n){return e=jt(n),{extract:function(t,n){return e().extract(t,n)},toString:function(){return e().toString()}};var e}(0,function(){return qI}))],qI=bo([ho(GI),ho(XI)]),YI=yI.concat([Yo("items",qI),ar("disabled",!1)]),KI=ho(YI),JI=Co,$I=yI.concat([qo("items",[jo("text"),jo("value")]),rr("size",1),ar("disabled",!1)]),QI=ho($I),ZI=Co,tR=yI.concat([ar("constrain",!0),ar("disabled",!1)]),nR=ho(tR),eR=ho([jo("width"),jo("height")]),oR=[jo("type"),Yo("header",Co),Yo("cells",vo(Co))],rR=ho(oR),iR=yI.concat([Qo("placeholder"),ar("maximized",!1),ar("disabled",!1)]),uR=ho(iR),aR=Co,cR=yI.concat([ur("filetype","file",["image","media","file"]),er("disabled",!1)]),sR=ho(cR),fR=ho([jo("value"),er("meta",{})]),lR=function(t){return Vo("items","items",{tag:"required",process:{}},vo(Bo(function(n){return Fo("Checking item of "+t,dR,n).fold(function(t){return Re.error(No(t))},function(t){return Re.value(t)})})))},dR=mo(function(){return Ao("type",{alertbanner:dI,bar:ho((t=lR("bar"),[jo("type"),t])),button:gI,checkbox:hI,colorinput:kI,colorpicker:OI,dropzone:BI,grid:ho(FI(lR("grid"))),iframe:PI,input:UI,listbox:KI,selectbox:QI,sizeinput:nR,textarea:uR,urlinput:sR,customeditor:DI,htmlpanel:RI,imagetools:LI,collection:wI,label:ho(WI(lR("label"))),table:rR,panel:gR});var t}),mR=[jo("type"),er("classes",[]),Yo("items",dR)],gR=ho(mR),pR=[Vo("name","name",to(function(){return qi("tab-name")}),Co),jo("title"),Yo("items",dR)],hR=[jo("type"),qo("tabs",pR)],vR=ho(hR),bR=aI,yR=fI,xR=ho([jo("title"),Uo("body",Ao("type",{panel:gR,tabpanel:vR})),ir("size","normal"),Yo("buttons",yR),er("initialData",{}),cr("onAction",p),cr("onChange",p),cr("onSubmit",p),cr("onClose",p),cr("onCancel",p),er("onTabChange",p)]),wR=ho(E([Wo("type",["cancel","custom"])],bR,!0)),SR=ho([jo("title"),jo("url"),$o("height"),$o("width"),tr("buttons",wR),cr("onAction",p),cr("onCancel",p),cr("onClose",p),cr("onMessage",p)]),kR=function(t){return i(t)?[t].concat(Z(yt(t),kR)):u(t)?Z(t,kR):[]},CR=function(t){return r(t.type)&&r(t.name)}
95,OR={checkbox:vI,colorinput:CI,colorpicker:_I,dropzone:MI,input:jI,iframe:VI,sizeinput:eR,selectbox:ZI,listbox:JI,size:eR,textarea:aR,urlinput:fR,customeditor:AI,collection:SI,togglemenuitem:iI},_R=function(t){var n=function(t){return q(kR(t),CR)}(t),e=Z(n,function(t){return function(t){return I.from(OR[t.type])}(t).fold(function(){return[]},function(n){return[Uo(t.name,n)]})});return ho(e)},TR=function(t){return{internalDialog:Io(Fo("dialog",xR,t)),dataValidator:_R(t),initialData:t.initialData}},ER={open:function(t,n){var e=TR(n);return t(e.internalDialog,e.initialData,e.dataValidator)},openUrl:function(t,n){return t(Io(Fo("dialog",SR,n)))},redial:function(t){return TR(t)}},DR=function(t){var n=[],e={};return mt(t,function(t,o){t.fold(function(){n.push(o)},function(t){e[o]=t})}),n.length>0?Re.error(n):Re.value(e)},AR=function(t,n){var e=Qp(_C.sketch(function(e){return{dom:{tag:"div",classes:["tox-form"].concat(t.classes)},components:W(t.items,function(t){return OT(e,t,n)})}}));return{dom:{tag:"div",classes:["tox-dialog__body"]},components:[{dom:{tag:"div",classes:["tox-dialog__body-content"]},components:[e.asSpec()]}],behaviours:ac([Vg.config({mode:"acyclic",useTabstopAt:w(tO)}),IC(e),jC(e,{postprocess:function(t){return DR(t).fold(function(t){return console.error(t),{}},b)}})])}},BR=md({name:"TabButton",configFields:[er("uid",void 0),zo("value"),Vo("dom","dom",eo(function(){return{attributes:{role:"tab",id:qi("aria"),"aria-selected":"false"}}}),wo()),Ko("action"),er("domModification",{}),ll("tabButtonBehaviours",[Kg,Vg,fl]),zo("view")],factory:function(t,n){return{uid:t.uid,dom:t.dom,components:t.components,events:sp(t.action),behaviours:ml(t.tabButtonBehaviours,[Kg.config({}),Vg.config({mode:"execution",useSpace:!0,useEnter:!0}),fl.config({store:{mode:"memory",initialValue:t.value}})]),domModification:t.domModification}}}),MR=v([zo("tabs"),zo("dom"),er("clickToDismiss",!1),ll("tabbarBehaviours",[jd,Vg]),ma(["tabClass","selectedClass"])]),FR=Ul({factory:BR,name:"tabs",unit:"tab",overrides:function(t){var n=function(t,n){jd.dehighlight(t,n),xi(t,hi(),{tabbar:t,button:n})},e=function(t,n){jd.highlight(t,n),xi(t,pi(),{tabbar:t,button:n})};return{action:function(o){var r=o.getSystem().getByUid(t.uid).getOrDie(),i=jd.isHighlighted(r,o);(i&&t.clickToDismiss?n:i?p:e)(r,o)},domModification:{classes:[t.markers.tabClass]}}}}),IR=v([FR]),RR=gd({name:"Tabbar",configFields:MR(),partFields:IR(),factory:function(t,n,e,o){return{uid:t.uid,dom:t.dom,components:n,"debug.sketcher":"Tabbar",domModification:{attributes:{role:"tablist"}},behaviours:ml(t.tabbarBehaviours,[jd.config({highlightClass:t.markers.selectedClass,itemClass:t.markers.tabClass,onHighlight:function(t,n){Rn(n.element,"aria-selected","true")},onDehighlight:function(t,n){Rn(n.element,"aria-selected","false")}}),Vg.config({mode:"flow",getInitial:function(t){return jd.getHighlighted(t).map(function(t){return t.element})},selector:"."+t.markers.tabClass,executeOnMove:!0})])}}}),NR=md({name:"Tabview",configFields:[ll("tabviewBehaviours",[jg])],factory:function(t,n){return{uid:t.uid,dom:t.dom,behaviours:ml(t.tabviewBehaviours,[jg.config({})]),domModification:{attributes:{role:"tabpanel"}}}}}),PR=v([er("selectFirst",!0),pa("onChangeTab"),pa("onDismissTab"),er("tabs",[]),ll("tabSectionBehaviours",[])]),VR=Hl({factory:RR,schema:[zo("dom"),Xo("markers",[zo("tabClass"),zo("selectedClass")])],name:"tabbar",defaults:function(t){return{tabs:t.tabs}}}),HR=Hl({factory:NR,name:"tabview"}),LR=v([VR,HR]),zR=gd({name:"TabSection",configFields:PR(),partFields:LR(),factory:function(t,n,e,o){var r=function(n,e){Zl(n,t,"tabbar").each(function(t){e(t).each(wi)})};return{uid:t.uid,dom:t.dom,components:n,behaviours:dl(t.tabSectionBehaviours),events:Oi(Q([t.selectFirst?[Ri(function(t,n){r(t,jd.getFirst)})]:[],[Ei(pi(),function(n,e){!function(n){var e=fl.getValue(n);Zl(n,t,"tabview").each(function(o){J(t.tabs,function(t){return t.value===e}).each(function(e){var r=e.view();Vn(n.element,"id").each(function(t){Rn(o.element,"aria-labelledby",t)}),jg.set(o,r),t.onChangeTab(o,n,r)})})}(e.event.button)}),Ei(hi(),function(n,e){var o=e.event.button;t.onDismissTab(n,o)})]])),apis:{getViewItems:function(n){return Zl(n,t,"tabview").map(function(t){return jg.contents(t)}).getOr([])},showTab:function(t,n){r(t,function(t){var e=jd.getCandidates(t);return J(e,function(t){return fl.getValue(t)===n}).filter(function(n){return!jd.isHighlighted(t,n)})})}}}},apis:{getViewItems:function(t,n){return t.getViewItems(n)},showTab:function(t,n,e){t.showTab(n,e)}}}),UR=function(t,n){jn(t,"height",n+"px"),an().browser.isIE()?$n(t,"flex-basis"):jn(t,"flex-basis",n+"px")},jR=function(t,n,e){Ju(t,'[role="dialog"]').each(function(t){Qu(t,'[role="tablist"]').each(function(o){e.get().map(function(e){return jn(n,"height","0"),jn(n,"flex-basis","0"),Math.min(e,function(t,n,e){var o,r=pn(t).dom,i=Ju(t,".tox-dialog-wrap").getOr(t);o="fixed"===Xn(i,"position")?Math.max(r.clientHeight,window.innerHeight):Math.max(r.offsetHeight,r.scrollHeight);var u=ne(n),a=n.dom.offsetLeft>=e.dom.offsetLeft+se(e)?Math.max(ne(e),u):u,c=parseInt(Xn(t,"margin-top"),10)||0,s=parseInt(Xn(t,"margin-bottom"),10)||0;return o-(ne(t)+c+s-a)}(t,n,o))}).each(function(t){UR(n,t)})})})},WR=function(t){return Qu(t,'[role="tabpanel"]')},GR=function(t){var n;return{smartTabHeight:(n=Vc(),{extraEvents:[Ri(function(e){var o=e.element;WR(o).each(function(r){jn(r,"visibility","hidden"),e.getSystem().getByDom(r).toOptional().each(function(e){(function(t){return at(it(t,function(t,n){return t>n?-1:t<n?1:0}))})(function(t,n,e){return W(t,function(o,r){jg.set(e,t[r].view());var i=n.dom.getBoundingClientRect();return jg.set(e,[]),i.height})}(t,r,e)).fold(n.clear,n.set)}),jR(o,r,n),$n(r,"visibility"),function(t,n){at(t).each(function(t){return zR.showTab(n,t.value)})}(t,e),Kp.requestAnimationFrame(function(){jR(o,r,n)})})}),Ei(ci(),function(t){var e=t.element;WR(e).each(function(t){jR(e,t,n)})}),Ei(Vw,function(t,e){var o=t.element;WR(o).each(function(t){var e=bc(_n(t));jn(t,"visibility","hidden");var r=Yn(t,"height").map(function(t){return parseInt(t,10)});$n(t,"height"),$n(t,"flex-basis");var i=t.dom.getBoundingClientRect().height;r.forall(function(t){return i>t})?(n.set(i),jR(o,t,n)):r.each(function(n){UR(t,n)}),$n(t,"visibility"),e.each(hc)})})],selectFirst:!1}),naiveTabHeight:{extraEvents:[],selectFirst:!0}}},XR=function(t,n){var e=lr({}),o=function(t){var n=fl.getValue(t),o=DR(n).getOr({}),r=e.get(),i=Qe(r,o);e.set(i)},r=function(t){var n=e.get();fl.setValue(t,n)},i=lr(null),u=W(t.tabs,function(t){return{value:t.name,dom:{tag:"div",classes:["tox-dialog__body-nav-item"],innerHtml:n.shared.providers.translate(t.title)},view:function(){return[_C.sketch(function(e){return{dom:{tag:"div",classes:["tox-form"]}
95,components:W(t.items,function(t){return OT(e,t,n)}),formBehaviours:ac([Vg.config({mode:"acyclic",useTabstopAt:w(tO)}),Wg("TabView.form.events",[Ri(r),Ni(o)]),mc.config({channels:hr([{key:"send-data-to-section",value:{onReceive:o}},{key:"send-data-to-view",value:{onReceive:r}}])})])}})]}}}),a=GR(u).smartTabHeight;return zR.sketch({dom:{tag:"div",classes:["tox-dialog__body"]},onChangeTab:function(t,n,e){var o=fl.getValue(n);xi(t,Pw,{name:o,oldName:i.get()}),i.set(o)},tabs:u,components:[zR.parts.tabbar({dom:{tag:"div",classes:["tox-dialog__body-nav"]},components:[RR.parts.tabs({})],markers:{tabClass:"tox-tab",selectedClass:"tox-dialog__body-nav-item--active"},tabbarBehaviours:ac([Cw.config({})])}),zR.parts.tabview({dom:{tag:"div",classes:["tox-dialog__body-content"]}})],selectFirst:a.selectFirst,tabSectionBehaviours:ac([Wg("tabpanel",a.extraEvents),Vg.config({mode:"acyclic"}),bd.config({find:function(t){return at(zR.getViewItems(t))}}),fl.config({store:{mode:"manual",getValue:function(t){return t.getSystem().broadcastOn(["send-data-to-section"],{}),e.get()},setValue:function(t,n){e.set(n),t.getSystem().broadcastOn(["send-data-to-view"],{})}}})])})},qR=qi("update-dialog"),YR=qi("update-title"),KR=qi("update-body"),JR=qi("update-footer"),$R=qi("body-send-message"),QR=function(t,n,e,o){return{dom:{tag:"div",classes:["tox-dialog__content-js"],attributes:_(_({},n.map(function(t){return{id:t}}).getOr({})),o?{"aria-live":"polite"}:{})},components:[],behaviours:ac([RC(0),yB.config({channel:KR,updateState:function(t,n){return I.some({isTabPanel:function(){return"tabpanel"===n.body.type}})},renderComponents:function(t){switch(t.body.type){case"tabpanel":return[XR(t.body,e)];default:return[AR(t.body,e)]}},initialData:t})])}},ZR=Ay.deviceType.isTouch(),tN=function(t,n){return{dom:{tag:"div",styles:{display:"none"},classes:["tox-dialog__header"]},components:[t,n]}},nN=function(t,n){return oI.parts.close(Jp.sketch({dom:{tag:"button",classes:["tox-button","tox-button--icon","tox-button--naked"],attributes:{type:"button","aria-label":n.translate("Close")}},action:t,buttonBehaviours:ac([Cw.config({})])}))},eN=function(){return oI.parts.title({dom:{tag:"div",classes:["tox-dialog__title"],innerHtml:"",styles:{display:"none"}}})},oN=function(t,n){return oI.parts.body({dom:{tag:"div",classes:["tox-dialog__body"]},components:[{dom:{tag:"div",classes:["tox-dialog__body-content"]},components:[{dom:$p("<p>"+Qh(n.translate(t))+"</p>")}]}]})},rN=function(t){return oI.parts.footer({dom:{tag:"div",classes:["tox-dialog__footer"]},components:t})},iN=function(t,n){return[vw.sketch({dom:{tag:"div",classes:["tox-dialog__footer-start"]},components:t}),vw.sketch({dom:{tag:"div",classes:["tox-dialog__footer-end"]},components:n})]},uN=function(t){var n,e="tox-dialog",o=e+"-wrap",r=o+"__backdrop",i=e+"__disable-scroll";return oI.sketch({lazySink:t.lazySink,onEscape:function(n){return t.onEscape(n),I.some(!0)},useTabstopAt:function(t){return!tO(t)},dom:{tag:"div",classes:[e].concat(t.extraClasses),styles:_({position:"relative"},t.extraStyles)},components:E([t.header,t.body],t.footer.toArray(),!0),parts:{blocker:{dom:$p('<div class="'+o+'"></div>'),components:[{dom:{tag:"div",classes:ZR?[r,r+"--opaque"]:[r]}}]}},dragBlockClass:o,modalBehaviours:ac(E([Kg.config({}),Wg("dialog-events",t.dialogEvents.concat([Ii(Rr(),function(t,n){Vg.focusIn(t)})])),Wg("scroll-lock",[Ri(function(){_u(Mn(),i)}),Ni(function(){Eu(Mn(),i)})])],t.extraBehaviours,!0)),eventOrder:_((n={},n[Qr()]=["dialog-events"],n[si()]=["scroll-lock","dialog-events","alloy.base.behaviour"],n[fi()]=["alloy.base.behaviour","dialog-events","scroll-lock"],n),t.eventOrder)})},aN=function(t){return Jp.sketch({dom:{tag:"button",classes:["tox-button","tox-button--icon","tox-button--naked"],attributes:{type:"button","aria-label":t.translate("Close"),title:t.translate("Close")}},components:[av("close",{tag:"div",classes:["tox-icon"]},t.icons)],action:function(t){yi(t,Mw)}})},cN=function(t,n,e){var o=function(t){return[Lu(e.translate(t.title))]};return{dom:{tag:"div",classes:["tox-dialog__title"],attributes:_({},n.map(function(t){return{id:t}}).getOr({}))},components:o(t),behaviours:ac([yB.config({channel:YR,renderComponents:o})])}},sN=function(){return{dom:$p('<div class="tox-dialog__draghandle"></div>')}},fN=function(t,n){return e={title:n.shared.providers.translate(t),draggable:n.dialog.isDraggableModal()},o=n.shared.providers,r=oI.parts.title(cN(e,I.none(),o)),i=oI.parts.draghandle(sN()),u=oI.parts.close(aN(o)),a=[r].concat(e.draggable?[i]:[]).concat([u]),vw.sketch({dom:$p('<div class="tox-dialog__header"></div>'),components:a});var e,o,r,i,u,a},lN=function(t,n,e){return{dom:{tag:"div",classes:["tox-dialog__busy-spinner"],attributes:{"aria-label":e.translate(t)}
95,styles:{left:"0px",right:"0px",bottom:"0px",top:"0px",position:"absolute"}},behaviours:n,components:[{dom:$p('<div class="tox-spinner"><div></div><div></div><div></div></div>')}]}},dN=function(t,n,e){return{onClose:function(){return e.closeWindow()},onBlock:function(e){oI.setBusy(t(),function(t,o){return lN(e.message,o,n)})},onUnblock:function(){oI.setIdle(t())}}},mN=function(t,n,e,o){var r;return ju(uN(_(_({},t),{lazySink:o.shared.getSink,extraBehaviours:E([yB.config({channel:qR,updateState:function(t,n){return I.some(n)},initialData:n}),XC({})],t.extraBehaviours,!0),onEscape:function(t){yi(t,Mw)},dialogEvents:e,eventOrder:(r={},r[$r()]=[yB.name(),mc.name()],r[si()]=["scroll-lock",yB.name(),"messages","dialog-events","alloy.base.behaviour"],r[fi()]=["alloy.base.behaviour","dialog-events","messages",yB.name(),"scroll-lock"],r)})))},gN=function(t){return W(t,function(t){return"menu"===t.type?function(t){var n=W(t.items,function(t){var n=lr(!1);return _(_({},t),{storage:n})});return _(_({},t),{items:n})}(t):t})},pN=function(t){return K(t,function(t,n){return"menu"===n.type?K(n.items,function(t,n){return t[n.name]=n.storage,t},t):t},{})},hN=function(t,n){return[Mi(Rr(),ZC),t(Bw,function(t,e){n.onClose(),e.onClose()}),t(Mw,function(t,n,e,o){n.onCancel(t),yi(o,Bw)}),Ei(Nw,function(t,e){return n.onUnblock()}),Ei(Rw,function(t,e){return n.onBlock(e.event)})]},vN=function(t,n){var e=function(n,e){return Ei(n,function(n,r){o(n,function(o,i){e(t(),o,r.event,n)})})},o=function(t,n){yB.getState(t).get().each(function(e){n(e,t)})};return E(E([],hN(e,n),!0),[e(Fw,function(t,n,e){n.onAction(t,{name:e.name})})],!1)},bN=function(t,n,e){var o=function(n,e){return Ei(n,function(n,o){r(n,function(r,i){e(t(),r,o.event,n)})})},r=function(t,n){yB.getState(t).get().each(function(e){n(e.internalDialog,t)})};return E(E([],hN(o,n),!0),[o(Iw,function(t,n){return n.onSubmit(t)}),o(Aw,function(t,n,e){n.onChange(t,{name:e.name})}),o(Fw,function(t,n,o,r){var i=function(){return Vg.focusIn(r)},u=function(t){return Hn(t,"disabled")||Vn(t,"aria-disabled").exists(function(t){return"true"===t})},a=_n(r.element),c=bc(a);n.onAction(t,{name:o.name,value:o.value}),bc(a).fold(i,function(t){u(t)?i():c.exists(function(n){return dn(t,n)&&u(n)})?i():e().toOptional().filter(function(n){return!dn(n.element,t)}).each(i)})}),o(Pw,function(t,n,e){n.onTabChange(t,{newTabName:e.name,oldTabName:e.oldName})}),Ni(function(n){var e=t();fl.setValue(n,e.getData())})],!1)},yN=function(t,n){var e=n.map(function(t){return t.footerButtons}).getOr([]),o=X(e,function(t){return"start"===t.align}),r=function(t,n){return vw.sketch({dom:{tag:"div",classes:["tox-dialog__footer-"+t]},components:W(n,function(t){return t.memento.asSpec()})})};return[r("start",o.pass),r("end",o.fail)]},xN=function(t,n){return{dom:$p('<div class="tox-dialog__footer"></div>'),components:[],behaviours:ac([yB.config({channel:JR,initialData:t,updateState:function(t,e){var o=W(e.buttons,function(t){var e=Qp(function(t,n){return g_(t,t.type,n)}(t,n));return{name:t.name,align:t.align,memento:e}});return I.some({lookupByName:function(t,n){return function(t,n,e){return J(n,function(t){return t.name===e}).bind(function(n){return n.memento.getOpt(t)})}(t,o,n)},footerButtons:o})},renderComponents:yN})])}},wN=function(t,n){return oI.parts.footer(xN(t,n))},SN=function(t,n){if(t.getRoot().getSystem().isConnected()){var e=bd.getCurrent(t.getFormWrapper()).getOr(t.getFormWrapper());return _C.getField(e,n).fold(function(){var o=t.getFooter();return yB.getState(o).get().bind(function(t){return t.lookupByName(e,n)})},function(t){return I.some(t)})}return I.none()},kN=function(t,n,e){var o=function(n){var e=t.getRoot();e.getSystem().isConnected()&&n(e)},i={getData:function(){var n=t.getRoot(),o=n.getSystem().isConnected()?t.getFormWrapper():n,r=fl.getValue(o),i=gt(e,function(t){return t.get()});return _(_({},r),i)},setData:function(n){o(function(o){var r=i.getData(),u=_(_({},r),n),a=function(t,n){var e=t.getRoot();return yB.getState(e).get().map(function(t){return Io(Fo("data",t.dataValidator,n))}).getOr(n)}(t,u),c=t.getFormWrapper();fl.setValue(c,a),mt(e,function(t,n){wt(u,n)&&t.set(u[n])})})},disable:function(n){SN(t,n).each(Md.disable)},enable:function(n){SN(t,n).each(Md.enable)},focus:function(n){SN(t,n).each(Kg.focus)},block:function(t){if(!r(t))throw new Error("The dialogInstanceAPI.block function should be passed a blocking message of type string as an argument");o(function(n){xi(n,Rw,{message:t})})},unblock:function(){o(function(t){yi(t,Nw)})},showTab:function(n){o(function(e){var o=t.getBody();yB.getState(o).get().exists(function(t){return t.isTabPanel()})&&bd.getCurrent(o).each(function(t){zR.showTab(t,n)})})},redial:function(t){o(function(e){var o=n(t);e.getSystem().broadcastOn([qR],o),e.getSystem().broadcastOn([YR],o.internalDialog),e.getSystem().broadcastOn([KR],o.internalDialog),e.getSystem().broadcastOn([JR],o.internalDialog),i.setData(o.initialData)})},close:function(){o(function(t){yi(t,Bw)})}};return i},CN=function(t,n,e){var o=fN(t.internalDialog.title,e),r=function(t,n){var e=QR(t,I.none(),n,!1);return oI.parts.body(e)}({body:t.internalDialog.body},e),i=gN(t.internalDialog.buttons),u=pN(i),a=wN({buttons:i},e),c=bN(function(){return m},dN(function(){return l},e.shared.providers,n),e.shared.getSink),s=function(t){switch(t){case"large":return["tox-dialog--width-lg"];case"medium":return["tox-dialog--width-md"];default:return[]}}
95(t.internalDialog.size),f={header:o,body:r,footer:I.some(a),extraClasses:s,extraBehaviours:[],extraStyles:{}},l=mN(f,t,c,e),d={getRoot:v(l),getBody:function(){return oI.getBody(l)},getFooter:function(){return oI.getFooter(l)},getFormWrapper:function(){var t=oI.getBody(l);return bd.getCurrent(t).getOr(t)}},m=kN(d,n.redial,u);return{dialog:l,instanceApi:m}},ON=function(t,n,e,o){var r,i,u,a,c,s=qi("dialog-label"),f=qi("dialog-content"),l=Qp((u={title:t.internalDialog.title,draggable:!0},a=s,c=e.shared.providers,vw.sketch({dom:$p('<div class="tox-dialog__header"></div>'),components:[cN(u,I.some(a),c),sN(),aN(c)],containerBehaviours:ac([UF.config({mode:"mouse",blockerClass:"blocker",getTarget:function(t){return Zu(t,'[role="dialog"]').getOrDie()},snaps:{getSnapPoints:function(){return[]},leftAttr:"data-drag-left",topAttr:"data-drag-top"}})])}))),d=Qp(function(t,n,e,o){return QR(t,I.some(n),e,o)}({body:t.internalDialog.body},f,e,o)),m=gN(t.internalDialog.buttons),g=pN(m),p=Qp(function(t,n){return xN(t,n)}({buttons:m},e)),h=bN(function(){return y},{onBlock:function(t){WD.block(b,function(n,o){return lN(t.message,o,e.shared.providers)})},onUnblock:function(){WD.unblock(b)},onClose:function(){return n.closeWindow()}},e.shared.getSink),b=ju({dom:{tag:"div",classes:["tox-dialog","tox-dialog-inline"],attributes:(r={role:"dialog"},r["aria-labelledby"]=s,r["aria-describedby"]=f,r)},eventOrder:(i={},i[$r()]=[yB.name(),mc.name()],i[Qr()]=["execute-on-form"],i[si()]=["reflecting","execute-on-form"],i),behaviours:ac([Vg.config({mode:"cyclic",onEscape:function(t){return yi(t,Bw),I.some(!0)},useTabstopAt:function(t){return!tO(t)&&("button"!==Pt(t)||"disabled"!==Pn(t,"disabled"))}}),yB.config({channel:qR,updateState:function(t,n){return I.some(n)},initialData:t}),Kg.config({}),Wg("execute-on-form",h.concat([Ii(Rr(),function(t,n){Vg.focusIn(t)})])),WD.config({getRoot:function(){return I.some(b)}}),jg.config({}),XC({})]),components:[l.asSpec(),d.asSpec(),p.asSpec()]}),y=kN({getRoot:v(b),getFooter:function(){return p.get(b)},getBody:function(){return d.get(b)},getFormWrapper:function(){var t=d.get(b);return bd.getCurrent(t).getOr(t)}},n.redial,g);return{dialog:b,instanceApi:y}},_N=tinymce.util.Tools.resolve("tinymce.util.URI"),TN=["insertContent","setContent","execCommand","close","block","unblock"],EN=function(t){return i(t)&&-1!==TN.indexOf(t.mceAction)},DN=function(t,n,e,o){var u,a,s,f=fN(t.title,o),l=function(t){var n={dom:{tag:"div",classes:["tox-dialog__content-js"]},components:[{dom:{tag:"div",classes:["tox-dialog__body-iframe"]},components:[$C({dom:{tag:"iframe",attributes:{src:t.url}},behaviours:ac([Cw.config({}),Kg.config({})])})]}],behaviours:ac([Vg.config({mode:"acyclic",useTabstopAt:w(tO)})])};return oI.parts.body(n)}(t),d=t.buttons.bind(function(t){return 0===t.length?I.none():I.some(wN({buttons:t},o))}),m=vN(function(){return S},dN(function(){return x},o.shared.providers,n)),g=_(_({},t.height.fold(function(){return{}},function(t){return{height:t+"px","max-height":t+"px"}})),t.width.fold(function(){return{}},function(t){return{width:t+"px","max-width":t+"px"}})),p=t.width.isNone()&&t.height.isNone()?["tox-dialog--width-lg"]:[],h=new _N(t.url,{base_uri:new _N(window.location.href)}),v=h.protocol+"://"+h.host+(h.port?":"+h.port:""),b=Pc(),y=[Wg("messages",[Ri(function(){var n=Lc(Rt.fromDom(window),"message",function(n){if(h.isSameOrigin(new _N(n.raw.origin))){var o=n.raw.data;EN(o)?function(t,n,e){switch(e.mceAction){case"insertContent":t.insertContent(e.content);break;case"setContent":t.setContent(e.content);break;case"execCommand":var o=!!c(e.ui)&&e.ui;t.execCommand(e.cmd,o,e.value);break;case"close":n.close();break;case"block":n.block(e.message);break;case"unblock":n.unblock()}}(e,S,o):function(t){return!EN(t)&&i(t)&&wt(t,"mceAction")}(o)&&t.onMessage(S,o)}});b.set(n)}),Ni(b.clear)]),mc.config({channels:(u={},u[$R]={onReceive:function(t,n){Qu(t.element,"iframe").each(function(t){t.dom.contentWindow.postMessage(n,v)})}},u)})],x=mN({header:f,body:l,footer:d,extraClasses:p,extraBehaviours:y,extraStyles:g},t,m,o),S=(a=x,s=function(t){a.getSystem().isConnected()&&t(a)},{block:function(t){if(!r(t))throw new Error("The urlDialogInstanceAPI.block function should be passed a blocking message of type string as an argument");s(function(n){xi(n,Rw,{message:t})})},unblock:function(){s(function(t){yi(t,Nw)})},close:function(){s(function(t){yi(t,Bw)})},sendMessage:function(t){s(function(n){n.getSystem().broadcastOn([$R],t)})}});return{dialog:x,instanceApi:S}},AN=function(t,n,e){return n&&e?[]:[ZE.config({contextual:{lazyContext:function(){return I.some(Ae(Rt.fromDom(t.getContentAreaContainer())))},fadeInClass:"tox-dialog-dock-fadein",fadeOutClass:"tox-dialog-dock-fadeout",transitionClass:"tox-dialog-dock-transition"},modes:["top"]})]},BN=function(t){var n=t.backstage,e=t.editor,o=sy(e),r=function(t){var n=t.backstage.shared;return{open:function(e,o){var r=function(){oI.hide(c),o()},i=Qp(g_({name:"close-alert",text:"OK",primary:!0,align:"end",disabled:!1,icon:I.none()},"cancel",t.backstage)),u=eN(),a=nN(r,n.providers),c=ju(uN({lazySink:function(){return n.getSink()},header:tN(u,a),body:oN(e,n.providers),footer:I.some(rN(iN([],[i.asSpec()]))),onEscape:r,extraClasse
95s:["tox-alert-dialog"],extraBehaviours:[],extraStyles:{},dialogEvents:[Ei(Mw,r)],eventOrder:{}}));oI.show(c);var s=i.get(c);Kg.focus(s)}}}(t),i=function(t){var n=t.backstage.shared;return{open:function(e,o){var r=function(t){oI.hide(s),o(t)},i=Qp(g_({name:"yes",text:"Yes",primary:!0,align:"end",disabled:!1,icon:I.none()},"submit",t.backstage)),u=g_({name:"no",text:"No",primary:!1,align:"end",disabled:!1,icon:I.none()},"cancel",t.backstage),a=eN(),c=nN(function(){return r(!1)},n.providers),s=ju(uN({lazySink:function(){return n.getSink()},header:tN(a,c),body:oN(e,n.providers),footer:I.some(rN(iN([],[u,i.asSpec()]))),onEscape:function(){return r(!1)},extraClasses:["tox-confirm-dialog"],extraBehaviours:[],extraStyles:{},dialogEvents:[Ei(Mw,function(){return r(!1)}),Ei(Iw,function(){return r(!0)})],eventOrder:{}}));oI.show(s);var f=i.get(s);Kg.focus(f)}}}(t),u=function(t,o){return ER.openUrl(function(t){var r=DN(t,{closeWindow:function(){oI.hide(r.dialog),o(r.instanceApi)}},e,n);return oI.show(r.dialog),r.instanceApi},t)},a=function(t,e){return ER.open(function(t,o,r){var i=o,u=CN({dataValidator:r,initialData:i,internalDialog:t},{redial:ER.redial,closeWindow:function(){oI.hide(u.dialog),e(u.instanceApi)}},n);return oI.show(u.dialog),u.instanceApi.setData(i),u.instanceApi},t)},c=function(t,r,i,u){return ER.open(function(t,a,c){var s=Io(Fo("data",c,a)),f=Vc(),l=n.shared.header.isPositionedAtTop(),d=function(){return f.on(function(t){Ap.reposition(t),ZE.refresh(t)})},m=ON({dataValidator:c,initialData:s,internalDialog:t},{redial:ER.redial,closeWindow:function(){f.on(Ap.hide),e.off("ResizeEditor",d),f.clear(),i(m.instanceApi)}},n,u),g=ju(Ap.sketch(_(_({lazySink:n.shared.getSink,dom:{tag:"div",classes:[]},fireDismissalEventInstead:{}},l?{}:{fireRepositionEventInstead:{}}),{inlineBehaviours:ac(E([Wg("window-manager-inline-events",[Ei(li(),function(t,n){yi(m.dialog,Mw)})])],AN(e,o,l),!0)),isExtraPart:function(t,n){return function(t){return ow(t,".tox-alert-dialog")||ow(t,".tox-confirm-dialog")}(n)}})));return f.set(g),Ap.showWithin(g,Wu(m.dialog),{anchor:r},I.some(Mn())),o&&l||(ZE.refresh(g),e.on("ResizeEditor",d)),m.instanceApi.setData(s),Vg.focusIn(m.dialog),m.instanceApi},t)};return{open:function(t,e,o){return void 0!==e&&"toolbar"===e.inline?c(t,n.shared.anchors.inlineDialog(),o,e.ariaAttrs):void 0!==e&&"cursor"===e.inline?c(t,n.shared.anchors.cursor(),o,e.ariaAttrs):a(t,o)},openUrl:function(t,n){return u(t,n)},alert:function(t,n){r.open(t,function(){n()})},close:function(t){t.close()},confirm:function(t,n){i.open(t,function(t){n(t)})}}};O.add("silver",function(t){var n=ZF(t),e=n.uiMothership,o=n.backstage,r=n.renderUI,i=n.getUi;ew.register(t,o.shared);var u=BN({editor:t,backstage:o});return{renderUI:r,getWindowManagerImpl:v(u),getNotificationManagerImpl:function(){return fv(t,{backstage:o},e)},ui:i()}})}();
96},{"process":"g5IB"}],"wAqg":[function(require,module,exports) {
97require("./theme.js");
98},{"./theme.js":"n3pW"}],"xPuB":[function(require,module,exports) {
99tinymce.addI18n("pl",{Redo:"Powtórz",Undo:"Cofnij",Cut:"Wytnij",Copy:"Kopiuj",Paste:"Wklej","Select all":"Zaznacz wszystko","New document":"Nowy dokument",Ok:"Ok",Cancel:"Anuluj","Visual aids":"Pomoce wizualne",Bold:"Pogrubienie",Italic:"Kursywa",Underline:"Podkreślenie",Strikethrough:"Przekreślenie",Superscript:"Indeks górny",Subscript:"Indeks dolny","Clear formatting":"Wyczyść formatowanie","Align left":"Wyrównaj do lewej","Align center":"Wyrównaj do środka","Align right":"Wyrównaj do prawej",Justify:"Wyjustuj","Bullet list":"Lista wypunktowana","Numbered list":"Lista numerowana","Decrease indent":"Zmniejsz wcięcie","Increase indent":"Zwiększ wcięcie",Close:"Zamknij",Formats:"Formaty","Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X/C/V keyboard shortcuts instead.":"Twoja przeglądarka nie obsługuje bezpośredniego dostępu do schowka. Użyj zamiast tego kombinacji klawiszy Ctrl+X/C/V.",Headers:"Nagłówki","Header 1":"Nagłówek 1","Header 2":"Nagłówek 2","Header 3":"Nagłówek 3","Header 4":"Nagłówek 4","Header 5":"Nagłówek 5","Header 6":"Nagłówek 6",Headings:"Nagłówki","Heading 1":"Nagłówek 1","Heading 2":"Nagłówek 2","Heading 3":"Nagłówek 3","Heading 4":"Nagłówek 4","Heading 5":"Nagłówek 5","Heading 6":"Nagłówek 6",Preformatted:"Wstępne formatowanie",Div:"Div",Pre:"Pre",Code:"Kod",Paragraph:"Akapit",Blockquote:"Blok cytatu",Inline:"W tekście",Blocks:"Bloki","Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.":"Wklejanie jest w trybie tekstowym. Zawartość zostanie wklejona jako zwykły tekst dopóki nie wyłączysz tej opcji.",Fonts:"Fonty","Font Sizes":"Rozmiar fontu",Class:"Klasa","Browse for an image":"Przeglądaj za zdjęciem",OR:"LUB","Drop an image here":"Upuść obraz tutaj",Upload:"Prześlij",Block:"Zablokuj",Align:"Wyrównaj",Default:"Domyślne",Circle:"Kółko",Disc:"Dysk",Square:"Kwadrat","Lower Alpha":"Małe litery","Lower Greek":"Małe greckie","Lower Roman":"Małe rzymskie","Upper Alpha":"Wielkie litery","Upper Roman":"Wielkie rzymskie","Anchor...":"Kotwica...",Name:"Nazwa",Id:"Identyfikator","Id should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores.":"Identyfikator powinien zaczynać się literą, dozwolone są tylko litery, numery, ukośniki, kropki, dwukropki i podkreślniki - tzw. podłogi","You have unsaved changes are you sure you want to navigate away?":"Masz niezapisane zmiany. 
99Czy na pewno chcesz opuścić stronę?","Restore last draft":"Przywróć ostatni szkic","Special character...":"Znak specjalny...","Source code":"Kod źródłowy","Insert/Edit code sample":"Dodaj/Edytuj przykładowy kod",Language:"Język","Code sample...":"Przykład kodu...","Color Picker":"Selektor kolorów",R:"R",G:"G",B:"B","Left to right":"Od lewej do prawej","Right to left":"Od prawej do lewej","Emoticons...":"Emotikony...","Metadata and Document Properties":"Metadane i właściwości dokumentu",Title:"Tytuł",Keywords:"Słowa kluczowe",Description:"Opis",Robots:"Roboty",Author:"Autor",Encoding:"Kodowanie",Fullscreen:"Pełny ekran",Action:"Akcja",Shortcut:"Skrót",Help:"Pomoc",Address:"Adres","Focus to menubar":"Skup się na pasku menu","Focus to toolbar":"Skupić się na pasku","Focus to element path":"Skup się na ścieżce elementu","Focus to contextual toolbar":"Skupić się na pasku narzędzi kontekstowych","Insert link (if link plugin activated)":"Wstaw łącze (jeśli włączysz wtyczkę linków)","Save (if save plugin activated)":"Zapisz (jeśli aktywowana jest wtyczka do zapisu)","Find (if searchreplace plugin activated)":"Znajdź (jeśli włączysz wtyczkę do wyszukiwania)","Plugins installed ({0}):":"Zainstalowane wtyczki ({0}):","Premium plugins:":"Wtyczki Premium:","Learn more...":"Dowiedz się więcej...","You are using {0}":"Używasz {0}",Plugins:"Pluginy","Handy Shortcuts":"Przydatne skróty","Horizontal line":"Pozioma linia","Insert/edit image":"Wstaw/edytuj obrazek","Image description":"Opis obrazka",Source:"Źródło",Dimensions:"Wymiary","Constrain proportions":"Zachowaj proporcje",General:"Ogólne",Advanced:"Zaawansowane",Style:"Styl","Vertical space":"Odstęp pionowy","Horizontal space":"Odstęp poziomy",Border:"Ramka","Insert image":"Wstaw obrazek","Image...":"Obraz...","Image list":"Lista obrazków","Rotate counterclockwise":"Obróć w lewo","Rotate clockwise":"Obróć w prawo","Flip vertically":"Przerzuć w pionie","Flip horizontally":"Przerzuć w poziomie","Edit image":"Edytuj obrazek","Image options":"Opcje obrazu","Zoom in":"Powiększ","Zoom out":"Pomniejsz",Crop:"Przytnij",Resize:"Zmiana rozmiaru",Orientation:"Orientacja",Brightness:"Jasność",Sharpen:"Wyostrz",Contrast:"Kontrast","Color levels":"Poziom koloru",Gamma:"Gamma",Invert:"Odwróć",Apply:"Zaakceptuj",Back:"Cofnij","Insert date/time":"Wstaw datę/czas","Date/time":"Data/Czas","Insert/Edit Link":"Wstaw/Edytuj łącze","Insert/edit link":"Wstaw/edytuj łącze","Text to display":"Tekst do wyświetlenia",Url:"URL","Open link in...":"Otwórz łącze w...","Current window":"Bieżące okno",None:"Żaden","New window":"Nowe okno","Remove link":"Usuń łącze",Anchors:"Kotwice","Link...":"Łącze...","Paste or type a link":"Wklej lub wpisz adres łącza","The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?":"URL, który wprowadziłeś wygląda na adres e-mail. Czy chcesz dodać mailto: jako prefiks?","The URL you entered seems to be an external link. Do you want to add the required http:// prefix?":"URL, który wprowadziłeś wygląda na link zewnętrzny. Czy chcesz dodać http:// jako prefiks?","Link list":"Lista linków","Insert video":"Wstaw wideo","Insert/edit video":"Wstaw/edytuj wideo","Insert/edit media":"Wstaw/Edytuj media","Alternative source":"Alternatywne źródło","Alternative source URL":"Alternatywny URL źródła","Media poster (Image URL)":"Plakat (URL obrazu)","Paste your embed code below:":"Wklej tutaj kod do osadzenia:",Embed:"Osadź","Media...":"Multimedia...","Nonbreaking space":"Niełamliwa spacja","Page break":"Podział strony","Paste as text":"Wklej jako zwykły tekst",Preview:"Podgląd","Print...":"Drukuj...",Save:"Zapisz",Find:"Znajdź","Replace with":"Zamień na",Replace:"Zamień","Replace all":"Zamień wszystko",Previous:"Poprzedni",Next:"Nast.","Find and replace...":"Znajdź i zamień...","Could not find the specified string.":"Nie znaleziono szukanego tekstu.","Match case":"Dopasuj wielkość liter","Find whole words only":"Znajdź tylko całe wyrazy","Spell check":"Sprawdź pisownię",Ignore:"Ignoruj","Ignore all":"Ignoruj wszystko",Finish:"Zakończ","Add to Dictionary":"Dod
99aj do słownika","Insert table":"Wstaw tabelę","Table properties":"Właściwości tabeli","Delete table":"Usuń tabelę",Cell:"Komórka",Row:"Wiersz",Column:"Kolumna","Cell properties":"Właściwości komórki","Merge cells":"Łącz komórki","Split cell":"Podziel komórkę","Insert row before":"Wstaw wiersz przed","Insert row after":"Wstaw wiersz po","Delete row":"Usuń wiersz","Row properties":"Właściwości wiersza","Cut row":"Wytnij wiersz","Copy row":"Kopiuj wiersz","Paste row before":"Wklej wiersz przed","Paste row after":"Wklej wiersz po","Insert column before":"Wstaw kolumnę przed","Insert column after":"Wstaw kolumnę po","Delete column":"Usuń kolumnę",Cols:"Kol.",Rows:"Wiersz.",Width:"Szerokość",Height:"Wysokość","Cell spacing":"Odstępy komórek","Cell padding":"Dopełnienie komórki","Show caption":"Pokaż podpis",Left:"Lewo",Center:"Środek",Right:"Prawo","Cell type":"Typ komórki",Scope:"Kontekst",Alignment:"Wyrównanie","H Align":"Wyrównanie w pionie","V Align":"Wyrównanie w poziomie",Top:"Góra",Middle:"Środek",Bottom:"Dół","Header cell":"Komórka nagłówka","Row group":"Grupa wierszy","Column group":"Grupa kolumn","Row type":"Typ wiersza",Header:"Nagłówek",Body:"Treść",Footer:"Stopka","Border color":"Kolor ramki","Insert template...":"Wstaw szablon...",Templates:"Szablony",Template:"Szablon","Text color":"Kolor tekstu","Background color":"Kolor tła","Custom...":"Niestandardowy...","Custom color":"Kolor niestandardowy","No color":"Bez koloru","Remove color":"Usuń kolor","Table of Contents":"Spis treści","Show blocks":"Pokaż bloki","Show invisible characters":"Pokaż niewidoczne znaki","Word count":"Liczba słów",Count:"Liczba",Document:"Dokument",Selection:"Zaznaczenie",Words:"Słowa","Words: {0}":"Słów: {0}","{0} words":"{0} słów",File:"Plik",Edit:"Edycja",Insert:"Wstaw",View:"Widok",Format:"Format",Table:"Tabela",Tools:"Narzędzia","Powered by {0}":"Powered by {0}","Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help":"Obszar Edycji. ALT-F9 - menu. ALT-F10 - pasek narzędzi. ALT-0 - pomoc","Image title":"Tytuł obrazu","Border width":"Grubość ramki","Border style":"Styl ramki",Error:"Błąd",Warn:"Ostrzeżenie",Valid:"Prawidłowe","To open the popup, press Shift+Enter":"Aby otworzyć okienko, naciśnij Shift+Enter","Rich Text Area. Press ALT-0 for help.":"Obszar tekstu sformatowanego. Naciśnij ALT-0, aby uzyskać pomoc.","System Font":"Font systemowy","Failed to upload image: {0}":"Nie udało się przesłać obrazu: {0}","Failed to load plugin: {0} from url {1}":"Nie udało się załadować dodatku: {0} spod adresu url {1}","Failed to load plugin url: {0}
99":"Nie udało się załadować adresu url dodatku: {0}","Failed to initialize plugin: {0}":"Nie można zainicjować dodatku: {0}",example:"przykład",Search:"Wyszukaj",All:"Wszystkie",Currency:"Waluta",Text:"Tekst",Quotations:"Cudzysłowy",Mathematical:"Matematyczne","Extended Latin":"Rozszerzony łaciński",Symbols:"Symbole",Arrows:"Strzałki","User Defined":"Własny","dollar sign":"znak dolara","currency sign":"znak waluty","euro-currency sign":"znak euro","colon sign":"znak colon","cruzeiro sign":"znak cruzeiro","french franc sign":"znak franka francuskiego","lira sign":"znak liry","mill sign":"znak mill","naira sign":"znak nairy","peseta sign":"znak pesety","rupee sign":"znak rupii","won sign":"znak wona","new sheqel sign":"znak nowego szekla","dong sign":"znak donga","kip sign":"znak kipa","tugrik sign":"znak tugrika","drachma sign":"znak drachmy","german penny symbol":"znak feniga","peso sign":"znak peso","guarani sign":"znak guarani","austral sign":"znak australa","hryvnia sign":"znak hrywny","cedi sign":"znak cedi","livre tournois sign":"znak livre tournois","spesmilo sign":"znak spesmilo","tenge sign":"znak tenge","indian rupee sign":"znak rupii indyjskiej","turkish lira sign":"znak liry tureckiej","nordic mark sign":"znak nordic mark","manat sign":"znak manata","ruble sign":"znak rubla","yen character":"znak jena","yuan character":"znak juana","yuan character, in hong 
99kong and taiwan":"znak juana w Hongkongu i na Tajwanie","yen/yuan character variant one":"jen/juan, wariant pierwszy","Loading emoticons...":"Ładowanie emotikonów...","Could not load emoticons":"Nie można załadować emotikonów",People:"Ludzie","Animals and Nature":"Zwierzęta i natura","Food and Drink":"Jedzenie i picie",Activity:"Aktywność","Travel and Places":"Podróże i miejsca",Objects:"Obiekty",Flags:"Flagi",Characters:"Znaki","Characters (no spaces)":"Znaki (bez spacji)","{0} characters":"{0} znaków","Error: Form submit field collision.":"Błąd: kolizja pola przesyłania formularza.","Error: No form element found.":"Błąd: nie znaleziono elementu formularza.",Update:"Aktualizuj","Color swatch":"Próbka koloru",Turquoise:"Turkusowy",Green:"Zielony",Blue:"Niebieski",Purple:"Purpurowy","Navy Blue":"Ciemnoniebieski","Dark Turquoise":"Ciemnoturkusowy","Dark Green":"Ciemnozielony","Medium Blue":"Średnioniebieski","Medium Purple":"Średniopurpurowy","Midnight Blue":"Nocny błękit",Yellow:"Żółty",Orange:"Pomarańczowy",Red:"Czerwony","Light Gray":"Jasnoszary",Gray:"Szary","Dark Yellow":"Ciemnożółty","Dark Orange":"Ciemnopomarańczowy","Dark Red":"Ciemnoczerwony","Medium Gray":"Średnioszary","Dark Gray":"Ciemnoszary","Light Green":"Jasnozielony","Light Yellow":"Jasnożółty","Light Red":"Jasnoczerwony","Light Purple":"Jasnopurpurowy","Light Blue":"Jasnoniebieski","Dark Purple":"Ciemnopurpurowy","Dark Blue":"Ciemnoniebieski",Black:"Czarny",White:"Biały","Switch to or from fullscreen mode":"Włącz lub wyłącz tryb pełnoekranowy","Open help dialog":"Otwórz okno dialogowe pomocy",history:"historia",styles:"style",formatting:"formatowanie",alignment:"wyrównanie",indentation:"wcięcie","permanent pen":"marker",comments:"komentarze","Format Painter":"Malarz formatów","Insert/edit iframe":"Wstaw/edytuj iframe",Capitalization:"Jak w zdaniu",lowercase:"małe litery",UPPERCASE:"WIELKIE LITERY","Title Case":"Jak Nazwy Własne","Permanent Pen Properties":"Właściwości markera","Permanent pen properties...":"Właściwości markera...",Font:"Font",Size:"Rozmiar","More...":"Więcej...","Spellcheck Language":"Język sprawdzania pisowni","Select...":"Wybierz...",Preferences:"Ustawienia",Yes:"Tak",No:"Nie","Keyboard Navigation":"Nawigacja za pomocą klawiatury",Version:"Wersja",Anchor:"Kotwica","Special character":"Znak specjalny","Code sample":"Przykład kodu źródłowego",Color:"Kolor",Emoticons:"Ikony emocji","Document properties":"Właściwości dokumentu",Image:"Obraz","Insert link":"Wstaw łącze",Target:"Cel",Link:"Adres łącza",Poster:"Plakat",Media:"Media",Print:"Drukuj",Prev:"Poprz.","Find and replace":"Znajdź i zamień","Whole words":"Całe słowa",Spellcheck:"Sprawdzanie pisowni",Caption:"Tytuł","Insert template":"Wstaw szablon"});
100},{}],"Adhb":[function(require,module,exports) {
101
102},{"./..\\images\\clock-bg-sm.png":[["clock-bg-sm.98a0e3ed.png","iPar"],"iPar"]}],"E26t":[function(require,module,exports) {
103var define;
104var e;function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}!function(n){"use strict";if("function"==typeof e&&e.amd)e(["jquery","moment"],n);else if("object"==("undefined"==typeof exports?"undefined":t(exports)))module.exports=n(require("jquery"),require("moment"));else{if("undefined"==typeof jQuery)throw"bootstrap-datetimepicker requires jQuery to be loaded first";if("undefined"==typeof moment)throw"bootstrap-datetimepicker requires Moment.js to be loaded first";n(jQuery,moment)}}(function(e,n){"use strict";if(!n)throw new Error("bootstrap-datetimepicker requires Moment.js to be loaded first");var a=function(t,a){var r,i,o,s,d,l,c,p,u,f={},m=!0,h=!1,y=!1,b=0,w=[{clsName:"days",navFnc:"M",navStep:1},{clsName:"months",navFnc:"y",navStep:1},{clsName:"years",navFnc:"y",navStep:10},{clsName:"decades",navFnc:"y",navStep:100}],g=["days","months","years","decades"],v=["top","bottom","auto"],k=["left","right","auto"],D=["default","to
104p","bottom"],x={up:38,38:"up",down:40,40:"down",left:37,37:"left",right:39,39:"right",tab:9,9:"tab",escape:27,27:"escape",enter:13,13:"enter",pageUp:33,33:"pageUp",pageDown:34,34:"pageDown",shift:16,16:"shift",control:17,17:"control",space:32,32:"space",t:84,84:"t",delete:46,46:"delete"},C={},T="<td></td>",M=function(e){return'<td colspan="3"><span class="bdpw-clock-digit center'+("h"==e?" cursor":"")+'" title="Pick Hour" data-action="showHours" data-time-component="hours">10</span><span class="bdpw-timepicker-colon">:</span><span class="bdpw-clock-digit center'+("m"==e?" cursor":"")+'" title="Pick Minute" data-action="showMinutes" data-time-component="minutes">30</span><span class="bdpw-timepicker-colon">:</span><span class="bdpw-clock-digit center'+("s"==e?" cursor":"")+'" title="Pick Second" data-action="showSeconds" data-time-component="seconds">20</span><span class="bdpw-clock-digit center" title="Pick Second" data-action="togglePeriod" data-time-component="period">AM</span></td>'},S='<td><a href="#" tabindex="-1" title="Increment Hour" data-action="incrementHours"><span class="bdpw-timepicker-btn '+a.icons.up+'"></span></a></td>',P='<td><a href="#" tabindex="-1" title="Decrement Hour" data-action="decrementHours"><span class="bdpw-timepicker-btn '+a.icons.down+'"></span></a></td>',O='<td><a href="#" tabindex="-1" title="Increment Minute" data-action="incrementMinutes"><span class="bdpw-timepicker-btn '+a.icons.up+'"></span></a></td>',E='<td><a href="#" tabindex="-1" title="Decrement Minute" data-action="decrementMinutes"><span class="bdpw-timepicker-btn '+a.icons.down+'"></span></a></td>',H='<td><a href="#" tabindex="-1" title="Increment Second" data-action="incrementSeconds"><span class="bdpw-timepicker-btn '+a.icons.up+'"></span></a></td>',I='<td><a href="#" tabindex="-1" title="Decrement Second" data-action="decrementSeconds"><span class="bdpw-timepicker-btn '+a.icons.down+'"></span></a></td>',Y=function(e,t){if(s){var n=e.hour(),a=12==n?12:n+12;return'<td><span class="bdpw-clock-digit am-digit '+(t||"")+(R(e,"h")?"":" disabled")+'" title="Select Hour" data-action="selectHour">'+n+"</span>"+(a='<span class="bdpw-clock-digit pm-digit '+(t||"")+(R(e.hour(a),"h")?"":" disabled")+'" title="Select Hour" data-action="selectHour">'+a+"</span>")+"</td>"}return'<td><span class="bdpw-clock-digit '+(t||"")+(R(e,"h")?"":" disabled")+'" title="Select Hour" data-action="selectHour">'+e.format("h")+"</span></td>"},q=function(e,t){return'<td><span class="bdpw-clock-digit '+(t||"")+(R(e,"m")?"":" disabled")+'" title="Select Minute" data-action="selectMinute">'+e.minute()+"</span></td>"},B=function(e,t){return'<td><span class="bdpw-clock-digit '+(t||"")+(R(e,"s")?"":" disabled")+'" title="Select Second" data-action="selectSecond">'+e.second()+"</span></td>"},j=function(){return void 0!==n.tz&&void 0!==a.timeZone&&null!==a.timeZone&&""!==a.timeZone},A=function(e){var t;return t=null==e?n():n.isDate(e)||n.isMoment(e)?n(e):j()?n.tz(e,l,a.useStrict,a.timeZone):n(e,l,a.useStrict),j()&&t.tz(a.timeZone),t},F=function(e){if("string"!=typeof e||1<e.length)throw new TypeError("isEnabled expects a single character string parameter");switch(e){case"y":return-1!==d.indexOf("Y");case"M":return-1!==d.indexOf("M");case"d":return-1!==d.toLowerCase().indexOf("d");case"h":case"H":return-1!==d.toLowerCase().indexOf("h");case"m":return-1!==d.indexOf("m");case"s":return-1!==d.indexOf("s");default:return!1}},L=function(){return F("h")||F("m")||F("s")},W=function(){return F("y")||F("M")||F("d")},z=function(){var n,r=(h||t).position(),i=(h||t).offset(),o=a.widgetPositioning.vertical,s=a.widgetPositioning.horizontal;if(a.widgetParent)n=a.widgetParent.append(y);else if(t.is("input"))n=t.after(y).parent();else{if(a.inline)return void(n=t.append(y));(n=t).children().first().after(y)}if("auto"===o&&(o=i.top+1.5*y.height()>=e(window).height()+e(window).scrollTop()&&y.height()+t.outerHeight()<i.top?"top":"bottom"),"auto"===s&&(s=n.width()<i.left+y.outerWidth()/2&&i.left+y.outerWidth()>e(window).width()?"right":"left"),"top"===o?y.addClass("top").removeClass("bottom"):y.addClass("bottom").removeClass("top"),"right"===s?y.addClass("pull-right"):y.removeClass("pull-right"),"static"===n.css("position")&&(n=n.parents().filter(function(){return"static"!==e(this).css("position")}).first()),0===n.length)throw new Error("datetimepicker component should be placed within a non-static positioned container");y.css({top:"top"===o?"auto":r.top+t.outerHeight(),bottom:"top"===o?n.outerHeight()-(n===t?0:r.top):"auto",left:"left"===s?n===t?0:r.left:"auto",right:"left"
vendor: 4,274 bytes, line 104
104===s?"auto":n.outerWidth()-t.outerWidth()-(n===t?0:r.left)})},N=function(e){"dp.change"===e.type&&(e.date&&e.date.isSame(e.oldDate)||!e.date&&!e.oldDate)||t.trigger(e)},V=function(e){"y"===e&&(e="YYYY"),N({type:"dp.update",change:e,viewDate:i.clone()})},Z=function(e){y&&(e&&(c=Math.max(b,Math.min(3,c+e))),y.find(".datepicker > div").hide().filter(".datepicker-"+w[c].clsName).show())},R=function(t,n){if(!t.isValid())return!1;if(a.disabledDates&&"d"===n&&(r=t,!0===a.disabledDates[r.format("YYYY-MM-DD")]))return!1;var r,i,o,s;if(a.enabledDates&&"d"===n&&(i=t,!0!==a.enabledDates[i.format("YYYY-MM-DD")]))return!1;if(a.minDate&&t.isBefore(a.minDate,n))return!1;if(a.maxDate&&t.isAfter(a.maxDate,n))return!1;if(a.daysOfWeekDisabled&&"d"===n&&-1!==a.daysOfWeekDisabled.indexOf(t.day()))return!1;if(a.disabledHours&&("h"===n||"m"===n||"s"===n)&&(o=t,!0===a.disabledHours[o.format("H")]))return!1;if(a.enabledHours&&("h"===n||"m"===n||"s"===n)&&(s=t,!0!==a.enabledHours[s.format("H")]))return!1;if(a.disabledTimeIntervals&&("h"===n||"m"===n||"s"===n)){var d=!1;if(e.each(a.disabledTimeIntervals,function(){if(t.isBetween(this[0],this[1]))return!(d=!0)}),d)return!1}return!0},Q=function(){var t,o,s,d=y.find(".datepicker-days"),l=d.find("th"),c=[],p=[];if(W()){for(l.eq(0).find("span").attr("title",a.tooltips.prevMonth),l.eq(1).attr("title",a.tooltips.selectMonth),l.eq(2).find("span").attr("title",a.tooltips.nextMonth),d.find(".disabled").removeClass("disabled"),l.eq(1).text(i.format(a.dayViewHeaderFormat)),R(i.clone().subtract(1,"M"),"M")||l.eq(0).addClass("disabled"),R(i.clone().add(1,"M"),"M")||l.eq(2).addClass("disabled"),t=i.clone().startOf("M").startOf("w").startOf("d"),s=0;s<42;s++)0===t.weekday()&&(o=e("<tr>"),a.calendarWeeks&&o.append('<td class="cw">'+t.week()+"</td>"),c.push(o)),p=["day"],t.isBefore(i,"M")&&p.push("old"),t.isAfter(i,"M")&&p.push("new"),t.isSame(r,"d")&&!m&&p.push("active"),R(t,"d")||p.push("disabled"),t.isSame(A(),"d")&&p.push("today"),0!==t.day()&&6!==t.day()||p.push("weekend"),N({type:"dp.classify",date:t,classNames:p}),o.append('<td data-action="selectDay" data-day="'+t.format("L")+'" class="'+p.join(" ")+'">'+t.date()+"</td>"),t.add(1,"d");var u,f,h;d.find("tbody").empty().append(c),f=(u=y.find(".datepicker-months")).find("th"),h=u.find("tbody").find("span"),f.eq(0).find("span").attr("title",a.tooltips.prevYear),f.eq(1).attr("title",a.tooltips.selectYear),f.eq(2).find("span").attr("title",a.tooltips.nextYear),u.find(".disabled").removeClass("disabled"),R(i.clone().subtract(1,"y"),"y")||f.eq(0).addClass("disabled"),f.eq(1).text(i.year()),R(i.clone().add(1,"y"),"y")||f.eq(2).addClass("disabled"),h.removeClass("active"),r.isSame(i,"y")&&!m&&h.eq(r.month()).addClass("active"),h.each(function(t){R(i.clone().month(t),"M")||e(this).addClass("disabled")}),function(){var e=y.find(".datepicker-years"),t=e.find("th"),n=i.clone().subtract(5,"y"),o=i.clone().add(6,"y"),s="";for(t.eq(0).find("span").attr("title",a.tooltips.prevDecade),t.eq(1).attr("title",a.tooltips.selectDecade),t.eq(2).find("span").attr("title",a.tooltips.nextDecade),e.find(".disabled").removeClass("disabled"),a.minDate&&a.minDate.isAfter(n,"y")&&t.eq(0).addClass("disabled"),t.eq(1).text(n.year()+"-"+o.year()),a.maxDate&&a.maxDate.isBefore(o,"y")&&t.eq(2).addClass("disabled");!n.isAfter(o,"y");)s+='<span data-action="selectYear" class="year'+(n.isSame(r,"y")&&!m?" active":"")+(R(n,"y")?"":" disabled")+'">'+n.year()+"</span>",n.add(1,"y");e.find("td").html(s)}(),function(){var e,t=y.find(".datepicker-decades"),o=t.find("th"),s=n({y:i.year()-i.year()%100-1}),d=s.clone().add(100,"y"),l=s.clone(),c=!1,p=!1,u="";for(o.eq(0).find("span").attr("title",a.tooltips.prevCentury),o.eq(2).find("span").attr("title",a.tooltips.nextCentury),t.find(".disabled").removeClass("disabled"),(s.isSame(n({y:1900}))||a.minDate&&a.minDate.isAfter(s,"y"))&&o.eq(0).addClass("disabled"),o.eq(1).text(s.year()+"-"+d.year()),(s.isSame(n({y:2e3}))||a.maxDate&&a.maxDate.isBefore(d,"y"))&&o.eq(2).addClass("disabled");!s.isAfter(d,"y");)e=s.year()+12,c=a.minDate&&a.minDate.isAfter(s,"y")&&a.minDate.year()<=e,p=a.maxDate&&a.maxDate.isAfter(s,"y")&&a.maxDate.year()<=e,u+='<span data-action="selectDecade" class="decade'+(r.isAfter(s)&&r.year()<=e?" active":"")+(R(s,"y")||
104c||p?"":" disabled")+'" data-selection="'+(s.year()+6)+'">'+(s.year()+1)+" - "+(s.year()+12)+"</span>",s.add(12,"y");u+="<span></span><span></span><span></span>",t.find("td").html(u),o.eq(1).text(l.year()+1+"-"+s.year())}()}},U=function(){y&&(Q(),function(){var e,t,n,a,o,d,l,c,p,u,f;s||(e=y.find(".timepicker [data-action=togglePeriod]"),t=r.clone().add(12<=r.hours()?-12:12,"h"),R(t,"h")?e.removeClass("disabled"):e.addClass("disabled")),n=y.find(".timepicker-hours table>tbody"),a=i.clone(),o="",o+="<tr>"+T+Y(a.hour(11))+Y(a.hour(12),"top")+Y(a.hour(1))+T+"</tr>",o+="<tr>"+Y(a.hour(10))+T+S+T+Y(a.hour(2))+"</tr>",o+="<tr>"+Y(a.hour(9),"left")+M("h")+Y(a.hour(3),"right")+"</tr>",o+="<tr>"+Y(a.hour(8))+T+P+T+Y(a.hour(4))+"</tr>",o+="<tr>"+T+Y(a.hour(7))+Y(a.hour(6),"bottom")+Y(a.hour(5))+T+"</tr>",n.empty().html(o),d=y.find(".timepicker-minutes table>tbody"),l=i.clone(),c="",c+="<tr>"+T+q(l.minute(55))+q(l.minute(0),"top")+q(l.minute(5))+T+"</tr>",c+="<tr>"+q(l.minute(50))+T+O+T+q(l.minute(10))+"</tr>",c+="<tr>"+q(l.minute(45),"left")+M("m")+q(l.minute(15),"right")+"</tr>",c+="<tr>"+q(l.minute(40))+T+E+T+q(l.minute(20))+"</tr>",c+="<tr>"+T+q(l.minute(35))+q(l.minute(30),"bottom")+q(l.minute(25))+T+"</tr>",d.empty().html(c),p=y.find(".timepicker-seconds table>tbody"),u=i.clone(),f="",f+="<tr>
vendor: 25,196 bytes, line 104
104"+T+B(u.second(55))+B(u.second(0),"top")+B(u.second(5))+T+"</tr>",f+="<tr>"+B(u.second(50))+T+H+T+B(u.second(10))+"</tr>",f+="<tr>"+B(u.second(45),"left")+M("s")+B(u.second(15),"right")+"</tr>",f+="<tr>"+B(u.second(40))+T+I+T+B(u.second(20))+"</tr>",f+="<tr>"+T+B(u.second(35))+B(u.second(30),"bottom")+B(u.second(25))+T+"</tr>",p.empty().html(f);var m=y.find(".timepicker span[data-time-component]");m.filter("[data-time-component=hours]").text(r.format(s?"HH":"hh")),m.filter("[data-time-component=minutes]").text(r.format("mm")),m.filter("[data-time-component=seconds]").text(r.format("ss")),m.filter("[data-time-component=period]").text(r.format("A")),"PM"==r.format("A")?y.find(".timepicker").addClass("pm-view"):y.find(".timepicker").removeClass("pm-view")}())},G=function(e){var n=m?null:r;if(!e)return m=!0,o.val(""),t.data("date",""),N({type:"dp.change",date:!1,oldDate:n}),void U();if(e=e.clone().locale(a.locale),j()&&e.tz(a.timeZone),1!==a.stepping)for(e.minutes(Math.round(e.minutes()/a.stepping)*a.stepping).seconds(0);a.minDate&&e.isBefore(a.minDate);)e.add(a.stepping,"minutes");R(e)?(i=(r=e).clone(),o.val(r.format(d)),t.data("date",r.format(d)),m=!1,U(),N({type:"dp.change",date:r.clone(),oldDate:n})):(a.keepInvalid?N({type:"dp.change",date:e,oldDate:n}):o.val(m?"":r.format(d)),N({type:"dp.error",date:e,oldDate:n}))},J=function(){var t=!1;return y?(y.find(".collapse").each(function(){var n=e(this).data("collapse");return!n||!n.transitioning||!(t=!0)}),t||(h&&h.hasClass("btn")&&h.toggleClass("active"),y.hide(),e(window).off("resize",z),y.off("click","[data-action]"),y.off("mousedown",!1),y.remove(),y=!1,N({type:"dp.hide",date:r.clone()}),o.blur(),i=r.clone()),f):f},K=function(){G(null)},X=function(e){return void 0===a.parseInputDate?(!n.isMoment(e)||e instanceof Date)&&(e=A(e)):e=a.parseInputDate(e),e},$={next:function(){var e=w[c].navFnc;i.add(w[c].navStep,e),Q(),V(e)},previous:function(){var e=w[c].navFnc;i.subtract(w[c].navStep,e),Q(),V(e)},pickerSwitch:function(){Z(1)},selectMonth:function(t){var n=e(t.target).closest("tbody").find("span").index(e(t.target));i.month(n),c===b?(G(r.clone().year(i.year()).month(i.month())),a.inline||J()):(Z(-1),Q()),V("M")},selectYear:function(t){var n=parseInt(e(t.target).text(),10)||0;i.year(n),c===b?(G(r.clone().year(i.year())),a.inline||J()):(Z(-1),Q()),V("YYYY")},selectDecade:function(t){var n=parseInt(e(t.target).data("selection"),10)||0;i.year(n),c===b?(G(r.clone().year(i.year())),a.inline||J()):(Z(-1),Q()),V("YYYY")},selectDay:function(t){var n=i.clone();e(t.target).is(".old")&&n.subtract(1,"M"),e(t.target).is(".new")&&n.add(1,"M"),G(n.date(parseInt(e(t.target).text(),10))),L()||a.keepOpen||a.inline||J()},incrementHours:function(){var e=r.clone().add(1,"h");R(e,"h")&&G(e)},incrementMinutes:function(){var e=r.clone().add(a.stepping,"m");R(e,"m")&&G(e)},incrementSeconds:function(){var e=r.clone().add(1,"s");R(e,"s")&&G(e)},decrementHours:function(){var e=r.clone().subtract(1,"h");R(e,"h")&&G(e)},decrementMinutes:function(){var e=r.clone().subtract(a.stepping,"m");R(e,"m")&&G(e)},decrementSeconds:function(){var e=r.clone().subtract(1,"s");R(e,"s")&&G(e)},togglePeriod:function(){G(r.clone().add(12<=r.hours()?-12:12,"h"))},togglePicker:function(t){var n,r=e(t.target),i=r.closest("ul"),o=i.find(".collapse.in"),s=i.find(".collapse:not(.in)");if(o&&o.length){if((n=o.data("collapse"))&&n.transitioning)return;o.collapse?(o.collapse("hide"),s.collapse("show")):(o.removeClass("in show"),s.addClass("in show")),r.is("span")?r.toggleClass(a.icons.time+" "+a.icons.date):r.find("span").toggleClass(a.icons.time+" "+a.icons.date)}},showPicker:function(){y.find(".timepicker > div:not(.timepicker-picker)").hide(),y.find(".timepicker .timepicker-picker").show()},showHours:function(){y.find(".timepicker > div:not(.timepicker-hours)").hide(),y.find(".timepicker .timepicker-hours").show()},showMinutes:function(){y.find(".timepicker > div:not(.timepicker-minutes)").hide(),y.find(".timepicker .timepicker-minutes").show()},showSeconds:function(){y.find(".timepicker > div:not(.timepicker-seconds)").hide(),y.find(".timepicker .timepicker-seconds").show()},selectHour:function(t){var n=parseInt(e(t.target).text(),10);s||(12<=r.hours()?12!==n&&(n+=12):12===n&&(n=0)),G(r.clone().hours(n)),$.showMinutes.call(f)},selectMinute:function(t){G(r.clone().minutes(parseInt(e(t.target).text(),10))),F("s")&&$.showSeconds.call(f)},selectSecond:function(t){G(r.clone().seconds(parseInt(e(t.target).text(),10)))},clear:K,today:function(){var e=A();R(e,"d")&&G(e)},close:J},_=function(t){return e(t.currentTarget).is(".disabled")||$[e(t.currentTarget).data("action")].apply(f,arguments),!1},ee=function(){var t;return o.prop("disabled")||!a.ignoreReadonly&&o.prop("readonly")||y||(void 0!==o.val()&&0!==o.val().trim().length?G(X(o.val().trim())):m&&a.useCurrent&&(a.inline||o.is("input")&&0===o.val().trim().length)&&(t=A(),"string"==typeof a.useCurrent&&(t={year:function(e){return e.month(0).date(1).hours(0).seconds(0).minutes(0)},month:function(e){return e.date(1).hours(0).seconds(0).minutes(0)},day:function(e){return e.hours(0).seconds(0).minutes(0)},hour:function(e){return e.seconds(0).minutes(0)},minute:function(e){return e.seconds(0)}}[a.useCurrent](t)),G(t)),y=function(){var t,n,r,i,o=e("<div>").addClass("bootstrap-datetimepicker-widget dropdown-menu"),d=e("<div>").addClass("datepicker").append((r=e("<thead>").append(e("<tr>").append(e("<th>").addClass("prev").attr("data-action","previous").append(e("<span>").addClass(a.icons.previous))).append(e("<th>").addClass("picker-switch").attr("data-action","pickerSwitch").attr("colspan",a.calendarWeeks?"6":"5")).append(e("<th>").addClass("next").attr("data-action","next").append(e("<span>").addClass(a.icons.next)))),i=e("<tbody>").append(e("<tr>").append(e("<td>").attr("colspan",a.calendarWeeks?"8":"7"))),[e("<div>").addClass("datepicker-days").append(e("<table>").addClass("table-condensed").append(r).append(e("<tbody>"))),e("<div>").addClass("datepicker-months").append(e("<table>").addClass("table-condensed").append(r.clone()).append(i.clone())),e("<div>").addClass("datepicker-years").append(e("<table>").addClass("table-condensed").append(r.clone()).append(i.clone())),e("<div>").addClass("datepicker-decades").append(e("<table>").addClass("table-condensed").append(r.clone()).append(i.clone()))])),l=e("<div>").addClass("timepicker").append((n=[],F("h")&&n.push(e("<div>").addClass("timepicker-hours").append(e("<table>").append("<tbody>").addClass("table-condensed"))),F("m")&&n.push(e("<div>").addClass("timepicker-minutes").append(e("<table>").append("<tbody>").addClass("table-condensed"))),F("s")&&n.push(e("<div>").addClass("timepicker-seconds").append(e("<table>").append("<tbody>").addClass("table-condensed"))),n)),c=e("<ul>").addClass("list-unstyled"),p=e("<li>").addClass("picker-switch"+(a.collapse?" accordion-toggle":"")).append((t=[],a.showTodayButton&&t.push(e("<td>").append(e("<a>").attr({href:"#","data-action":"today",title:a.tooltips.today}).append(e("<span>").addClass(a.icons.today)))),!a.sideBySide&&W()&&L()&&t.push(e("<td>").append(e("<a>").attr({href:"#","data-action":"togglePicker",title:a.tooltips.selectTime}).append(e("<span>").addClass(a.icons.time)))),a.showClear&&t.push(e("<td>").append(e("<a>").attr({href:"#","data-action":"clear",title:a.tooltips.clear}).append(e("<span>").addClass(a.icons.clear)))),a.showClose&&t.push(e("<td>").append(e("<a>").attr({href:"#","data-action":"close",title:a.tooltips.close}).append(e("<span>").addClass(a.icons.close)))),e("<table>").addClass("table-condensed").append(e("<tbody>").append(e("<tr>").append(t)))));return a.inline&&o.removeClass("dropdown-menu"),s&&o.addClass("usetwentyfour"),F("s")&&!s&&o.addClass("wider"),a.sideBySide&&W()&&L()?(o.addClass("timepicker-sbs"),"top"===a.toolbarPlacement&&o.append(p),o.append(e("<div>").addClass("row").append(d.addClass("col-md-6")).append(l.addClass("col-md-6"))),"bottom"===a.toolbarPlacement&&o.append(p),o):("top"===a.toolbarPlacement&&c.append(p),W()&&c.append(e("<li>").addClass(a.collapse&&L()?"collapse in show":"").append(d)),"default"===a.toolbarPlacement&&c.append(p),L()&&c.append(e("<li>").addClass(a.collapse&&W()?"collapse":"").append(l)),"bottom"===a.toolbarPlacement&&c.append(p),c.find(".collapse").on("show.bs.collapse",function(t){e(t.target).addClass("in show")}).on("hidden.bs.collapse",function(t){e(t.target).removeClass("in show")}),o.append(c))}(),function(){var t=e("<tr>"),n=i.clone().startOf("w").startOf("d");for(!0===a.calendarWeeks&&t.append(e("<th>").addClass("cw").text("#"));n.isBefore(i.clone().endOf("w"));)t.append(e("<th>").addClass("dow").text(n.format("dd"))),n.add(1,"d");y.find(".datepicker-days thead").append(t)}(),function(){for(var t=[],n=i.clone().startOf("y").startOf("d");n.isSame(i,"y");)t.push(e("<span>").attr("data-action","selectMonth").addClass("month").text(n.format("MMM"))),n.add(1,"M");y.find(".datepicker-months td").empty().append(t)}(),y.find(".timepicker-minutes").hide(),y.find(".timepicker-seconds").hide(),U(),Z(),e(window).on("resize",z),y.on("click","[data-action]",_),y.on("mousedown",!1),h&&h.hasClass("btn")&&h.toggleClass("active"),z(),y.show(),a.focusOnShow&&!o.is(":focus")&&o.focus(),N({type:"dp.show"})),f},te=function(){return y?J():ee()},ne=function(e){var t,n,r,i,o=null,s=[],d={},l=e.which;for(t in C[l]="p",C)C.hasOwnProperty(t)&&"p"===C[t]&&(s.push(t),parseInt(t,10)!==l&&(d[t]=!0));for(t in a.keyBinds)if(a.keyBinds.hasOwnProperty(t)&&"function"==typeof a.keyBinds[t]&&(r=t.split(" ")).length===s.length&&x[l]===r[r.length-1]){for(i=!0,n=r.length-2;0<=n;n--)if(!(x[r[n]]in d)){i=!1;break}if(i){o=a.keyBinds[t];break}}o&&(o.call(f,y),e.stopPropagation(),e.preventDefault())},ae=function(e){C[e.which]="r",e.stopPropagation(),e.preventDefault()},re=function(t){var n=e(t.target).val().trim(),a=n?X(n):null;return G(a),t.stopImmediatePropagation(),!1},ie=function(t){var n={};return e.each(t,function(){var e=X(this);e.isValid()&&(n[e.format("YYYY-MM-DD")]=!0)}),!!Object.keys(n).length&&n},oe=function(t){var n={};return e.each(t,function(){n[this]=!0}),!!Object.keys(n).length&&n},se=function(){var e=a.format||"L LT";d=e.replace(/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,function(e){return(r.localeData().longDateFormat(e)||e).replace(/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,function(e){return r.localeData().longDateFormat(e)||e})}),(l=a.extraFormats?a.extraFormats.slice():[]).indexOf(e)<0&&l.indexOf(d)<0&&l.push(d),s=d.toLowerCase().indexOf("a")<1&&d.replace(/\[.*?\]/g,"").indexOf("h")<1,F("y")&&(b=2),F("M")&&(b=1),F("d")&&(b=0),c=Math.max(b,c),m||G(r)};if(f.destroy=function(){J(),o.off({change:re,blur:blur,keydown:ne,keyup:ae,focus:a.allowInputToggle?J:""}),t.is("input")?o.off({focus:ee}):h&&(h.off("click",te),h.off("mousedown",!1)),t.removeData("DateTimePicker"),t.removeData("date")},f.toggle=te,f.show=ee,f.hide=J,f.disable=function(){return J(),h&&h.hasClass("btn")&&h.addClass("disabled"),o.prop("disabled",!0),f},f.enable=function(){return h&&h.hasClass("btn")&&h.removeClass("disabled"),o.prop("disabled",!1),f},f.ignoreReadonly=function(e){if(0===arguments.length)return a.ignoreReadonly;if("boolean"!=typeof e)throw new TypeError("ignoreReadonly () expects a boolean parameter");return a.ignoreReadonly=e,f},f.options=function(t){if(0===arguments.length)return e.extend(!0,{},a);if(!(t instanceof Object))throw new TypeError("options() options parameter should be an object");return e.extend(!0,a,t),e.each(a,function(e,t){if(void 0===f[e])throw new TypeError("option "+e+" is not recognized!");f[e](t)}),f},f.date=function(e){if(0===arguments.length)return m?null:r.clone();if(!(null===e||"string"==typeof e||n.isMoment(e)||e instanceof Date))throw new TypeError("date() parameter must be one of [null, string, moment or Date]");return G(null===e?null:X(e)),f},f.format=function(e){if(0===arguments.length)return a.format;if("string"!=typeof e&&("boolean"!=typeof e||!1!==e))throw new TypeError("format() expects a string or boolean:false parameter "+e);return a.format=e,d&&se(),f},f.timeZone=function(e){if(0===arguments.length)return a.timeZone;if("string"!=typeof e)throw new TypeError("newZone() expects a string parameter");return a.timeZone=e,f},f.dayViewHeaderFormat=function(e){if(0===arguments.length)return a.dayViewHeaderFormat;if("string"!=typeof e)throw new TypeError("dayViewHeaderFormat() expects a string parameter");return a.dayViewHeaderFormat=e,f},f.extraFormats=function(e){if(0===arguments.length)return a.extraFormats;if(!1!==e&&!(e instanceof Array))throw new TypeError("extraFormats() expects an array or false parameter");return a.extraFormats=e,l&&se(),f},f.disabledDates=function(t){if(0===arguments.length)return a.disabledDates?e.extend({},a.disabledDates):a.disabledDates;if(!t)return a.disabledDates=!1,U(),f;if(!(t instanceof Array))throw new TypeError("disabledDates() expects an array parameter");return a.disabledDates=ie(t),a.enabledDates=!1,U(),f},f.enabledDates=function(t){if(0===arguments.length)return a.enabledDates?e.extend({},a.enabledDates):a.enabledDates;if(!t)return a.enabledDates=!1,U(),f;if(!(t instanceof Array))throw new TypeError("enabledDates() expects an array parameter");return a.enabledDates=ie(t),a.disabledDates=!1,U(),f},f.daysOfWeekDisabled=function(e){if(0===arguments.length)return a.daysOfWeekDisabled.splice(0);if("boolean"==typeof e&&!e)return a.daysOfWeekDisabled=!1,U(),f;if(!(e instanceof Array))throw new TypeError("daysOfWeekDisabled() expects an array parameter");if(a.daysOfWeekDisabled=e.reduce(function(e,t){return 6<(t=parseInt(t,10))||t<0||isNaN(t)||-1===e.indexOf(t)&&e.push(t),e},[]).sort(),a.useCurrent&&!a.keepInvalid){for(var t=0;!R(r,"d");){if(r.add(1,"d"),31===t)throw"Tried 31 times to find a valid date";t++}G(r)}return U(),f},f.maxDate=function(e){if(0===arguments.length)return a.maxDate?a.maxDate.clone():a.maxDate;if("boolean"==typeof e&&!1===e)return a.maxDate=!1,U(),f;"string"==typeof e&&("now"!==e&&"moment"!==e||(e=A()));var t=X(e);if(!t.isValid())throw new TypeError("maxDate() Could not parse date parameter: "+e);if(a.minDate&&t.isBefore(a.minDate))throw new TypeError("maxDate() date parameter is before options.minDate: "+t.format(d));return a.maxDate=t,a.useCurrent&&!a.keepInvalid&&r.isAfter(e)&&G(a.maxDate),i.isAfter(t)&&(i=t.clone().subtract(a.stepping,"m")),U(),f},f.minDate=function(e){if(0===arguments.length)return a.minDate?a.minDate.clone():a.minDate;if("boolean"==typeof e&&!1===e)return a.minDate=!1,U(),f;"string"==typeof e&&("now"!==e&&"moment"!==e||(e=A()));var t=X(e);if(!t.isValid())throw new TypeError("minDate() Could not parse date parameter: "+e);if(a.maxDate&&t.isAfter(a.maxDate))throw new TypeError("minDate() date parameter is after options.maxDate: "+t.format(d));return a.minDate=t,a.useCurrent&&!a.keepInvalid&&r.isBefore(e)&&G(a.minDate),i.isBefore(t)&&(i=t.clone().add(a.stepping,"m")),U(),f},f.defaultDate=function(e){if(0===arguments.length)return a.defaultDate?a.defaultDate.clone():a.defaultDate;if(!e)return a.defaultDate=!1,f;"string"==typeof e&&(e="now"===e||"moment"===e?A():A(e));var t=X(e);if(!t.isValid())throw new TypeError("defaultDate() Could not parse date parameter: "+e);if(!R(t))throw new TypeError("defaultDate() date passed is invalid according to component setup validations");return a.defaultDate=t,(a.defaultDate&&a.inline||""===o.val().trim())&&G(a.defaultDate),f},f.locale=function(e){if(0===arguments.length)return a.locale;if(!n.localeData(e))throw new TypeError("locale() locale "+e+" is not loaded from moment locales!");return a.locale=e,r.locale(a.locale),i.locale(a.locale),d&&se(),y&&(J(),ee()),f},f.stepping=function(e){return 0===arguments.length?a.stepping:(e=parseInt(e,10),(isNaN(e)||e<1)&&(e=1),a.stepping=e,f)},f.useCurrent=function(e){var t=["year","month","day","hour","minute"];if(0===arguments.length)return a.useCurrent;if("boolean"!=typeof e&&"string"!=typeof e)throw new TypeError("useCurrent() expects a boolean or string parameter");if("string"==typeof e&&-1===t.indexOf(e.toLowerCase()))throw new TypeError("useCurrent() expects a string parameter of "+t.join(", "));return a.useCurrent=e,f},f.collapse=function(e){if(0===arguments.length)return a.collapse;if("boolean"!=typeof e)throw new TypeError("collapse() expects a boolean parameter");return a.collapse===e||(a.collapse=e,y&&(J(),ee())),f},f.icons=function(t){if(0===arguments.length)return e.extend({},a.icons);if(!(t instanceof Object))throw new TypeError("icons() expects parameter to be an Object");return e.extend(a.icons,t),y&&(J(),ee()),f},f.tooltips=function(t){if(0===arguments.length)return e.extend({},a.tooltips);if(!(t instanceof Object))throw new TypeError("tooltips() expects parameter to be an Object");return e.extend(a.tooltips,t),y&&(J(),ee()),f},f.useStrict=function(e){if(0===arguments.length)return a.useStrict;if("boolean"!=typeof e)throw new TypeError("useStrict() expects a boolean parameter");return a.useStrict=e,f},f.sideBySide=function(e){if(0===arguments.length)return a.sideBySide;if("boolean"!=typeof e)throw new TypeError("sideBySide() expects a boolean parameter");return a.sideBySide=e,y&&(J(),ee()),f},f.viewMode=function(e){if(0===arguments.length)return a.viewMode;if("string"!=typeof e)throw new TypeError("viewMode() expects a string parameter");if(-1===g.indexOf(e))throw new TypeError("viewMode() parameter must be one of ("+g.join(", ")+") value");return a.viewMode=e,c=Math.max(g.indexOf(e),b),Z(),f},f.toolbarPlacement=function(e){if(0===arguments.length)return a.toolbarPlacement;if("string"!=typeof e)throw new TypeError("toolbarPlacement() expects a string parameter");if(-1===D.indexOf(e))throw new TypeError("toolbarPlacement() parameter must be one of ("+D.join(", ")+") value");return a.toolbarPlacement=e,y&&(J(),ee()),f},f.widgetPositioning=function(t){if(0===arguments.length)return e.extend({},a.widgetPositioning);if("[object Object]"!=={}.toString.call(t))throw new TypeError("widgetPositioning() expects an object variable");if(t.horizontal){if("string"!=typeof t.horizontal)throw new TypeError("widgetPositioning() horizontal variable must be a string");if(t.horizontal=t.horizontal.toLowerCase(),-1===k.indexOf(t.horizontal))throw new TypeError("widgetPositioning() expects horizontal parameter to be one of ("+k.join(", ")+")");a.widgetPositioning.horizontal=t.horizontal}if(t.vertical){if("string"!=typeof t.vertical)throw new TypeError("widgetPositioning() vertical variable must be a string");if(t.vertical=t.vertical.toLowerCase(),-1===v.indexOf(t.vertical))throw new TypeError("widgetPositioning() expects vertical parameter to be one of ("+v.join(", ")+")");a.widgetPositioning.vertical=t.vertical}return U(),f},f.calendarWeeks=function(e){if(0===arguments.length)return a.calendarWeeks;if("boolean"!=typeof e)throw new TypeError("calendarWeeks() expects parameter to be a boolean value");return a.calendarWeeks=e,U(),f},f.showTodayButton=function(e){if(0===arguments.length)return a.showTodayButton;if("boolean"!=typeof e)throw new TypeError("showTodayButton() expects a boolean parameter");return a.showTodayButton=e,y&&(J(),ee()),f},f.showClear=function(e){if(0===arguments.length)return a.showClear;if("boolean"!=typeof e)throw new TypeError("showClear() expects a boolean parameter");return a.showClear=e,y&&(J(),ee()),f},f.widgetParent=function(t){if(0===arguments.length)return a.widgetParent;if("string"==typeof t&&(t=e(t)),null!==t&&"string"!=typeof t&&!(t instanceof e))throw new TypeError("widgetParent() expects a string or a jQuery object parameter");return a.widgetParent=t,y&&(J(),ee()),f},f.keepOpen=function(e){if(0===arguments.length)return a.keepOpen;if("boolean"!=typeof e)throw new TypeError("keepOpen() expects a boolean parameter");return a.keepOpen=e,f},f.focusOnShow=function(e){if(0===arguments.length)return a.focusOnShow;if("boolean"!=typeof e)throw new TypeError("focusOnShow() expects a boolean parameter");return a.focusOnShow=e,f},f.inline=function(e){if(0===arguments.length)return a.inline;if("boolean"!=typeof e)throw new TypeError("inline() expects a boolean parameter");return a.inline=e,f},f.clear=function(){return K(),f},f.keyBinds=function(e){return 0===arguments.length?a.keyBinds:(a.keyBinds=e,f)},f.getMoment=function(e){return A(e)},f.debug=function(e){if("boolean"!=typeof e)throw new TypeError("debug() expects a boolean parameter");return a.debug=e,f},f.allowInputToggle=function(e){if(0===arguments.length)return a.allowInputToggle;if("boolean"!=typeof e)throw new TypeError("allowInputToggle() expects a boolean parameter");return a.allowInputToggle=e,f},f.showClose=function(e){if(0===arguments.length)return a.showClose;if("boolean"!=typeof e)throw new TypeError("showClose() expects a boolean parameter");return a.showClose=e,f},f.keepInvalid=function(e){if(0===arguments.length)return a.keepInvalid;if("boolean"!=typeof e)throw new TypeError("keepInvalid() expects a boolean parameter");return a.keepInvalid=e,f},f.datepickerInput=function(e){if(0===arguments.length)return a.datepickerInput;if("string"!=typeof e)throw new TypeError("datepickerInput() expects a string parameter");return a.datepickerInput=e,f},f.parseInputDate=function(e){if(0===arguments.length)return a.parseInputDate;if("function"!=typeof e)throw new TypeError("parseInputDate() sholud be as function");return a.parseInputDate=e,f},f.disabledTimeIntervals=function(t){if(0===arguments.length)return a.disabledTimeIntervals?e.extend({},a.disabledTimeIntervals):a.disabledTimeIntervals;if(!t)return a.disabledTimeIntervals=!1,U(),f;if(!(t instanceof Array))throw new TypeError("disabledTimeIntervals() expects an array parameter");return a.disabledTimeIntervals=t,U(),f},f.disabledHours=function(t){if(0===arguments.length)return a.disabledHours?e.extend({},a.disabledHours):a.disabledHours;if(!t)return a.disabledHours=!1,U(),f;if(!(t instanceof Array))throw new TypeError("disabledHours() expects an array parameter");if(a.disabledHours=oe(t),a.enabledHours=!1,a.useCurrent&&!a.keepInvalid){for(var n=0;!R(r,"h");){if(r.add(1,"h"),24===n)throw"Tried 24 times to find a valid date";n++}G(r)}return U(),f},f.enabledHours=function(t){if(0===arguments.length)return a.enabledHours?e.extend({},a.enabledHours):a.enabledHours;if(!t)return a.enabledHours=!1,U(),f;if(!(t instanceof Array))throw new TypeError("enabledHours() expects an array parameter");if(a.enabledHours=oe(t),a.disabledHours=!1,a.useCurrent&&!a.keepInvalid){for(var n=0;!R(r,"h");){if(r.add(1,"h"),24===n)throw"Tried 24 times to find a valid date";n++}G(r)}return U(),f},f.viewDate=function(e){if(0===arguments.length)return i.clone();if(!e)return i=r.clone(),f;if(!("string"==typeof e||n.isMoment(e)||e instanceof Date))throw new TypeError("viewDate() parameter must be one of [string, moment or Date]");return i=X(e),V(),f},t.is("input"))o=t;else if(0===(o=t.find(a.datepickerInput)).length)o=t.find("input");else if(!o.is("input"))throw new Error('CSS class "'+a.datepickerInput+'" cannot be applied to non input element');if(t.hasClass("input-group")&&(h=0===t.find(".datepickerbutton").length?t.find(".input-group-addon"):t.find(".datepickerbutton")),!a.inline&&!o.is("input"))throw new Error("Could not initialize DateTimePicker without an input element");return r=A(),i=r.clone(),e.extend(!0,a,(u={},(p=t.is("input")||a.inline?t.data():t.find("input").data()).dateOptions&&p.dateOptions instanceof Object&&(u=e.extend(!0,u,p.dateOptions)),e.each(a,function(e){var t="date"+e.charAt(0).toUpperCase()+e.slice(1);void 0!==p[t]&&(u[e]=p[t])}),u)),f.options(a),se(),o.on({change:re,blur:a.debug?"":J,keydown:ne,keyup:ae,focus:a.allowInputToggle?ee:""}),t.is("input")?o.on({focus:ee}):h&&(h.on("click",te),h.on("mousedown",!1)),o.prop("disabled")&&f.disable(),o.is("input")&&0!==o.val().trim().length?G(X(o.val().trim())):a.defaultDate&&void 0===o.attr("placeholder")&&G(a.defaultDate),a.inline&&ee(),f};return e.fn.datetimepicker=function(n){n=n||{};var r,i=Array.prototype.slice.call(arguments,1),o=!0;if("object"==t(n))return this.each(function(){var t,r=e(this);r.data("DateTimePicker")||(t=e.extend(!0,{},e.fn.datetimepicker.defaults,n),r.data("DateTimePicker",a(r,t)))});if("string"==typeof n)return this.each(function(){var t=e(this).data("DateTimePicker");if(!t)throw new Error('bootstrap-datetimepicker("'+n+'") method was called on an element that is not using DateTimePicker');r=t[n].apply(t,i),o=r===t}),o||-1<e.inArray(n,["destroy","hide","show","toggle"])?this:r;throw new TypeError("Invalid arguments for DateTimePicker: "+n)},e.fn.datetimepicker.defaults={timeZone:"",format:!1,dayViewHeaderFormat:"MMMM YYYY",extraFormats:!1,stepping:1,minDate:!1,maxDate:!1,useCurrent:!0,collapse:!0,locale:n.locale(),defaultDate:!1,disabledDates:!1,enabledDates:!1,icons:{time:"glyphicon glyphicon-time fa fa-clock-o",date:"glyphicon glyphicon-calendar fa fa-calendar",up:"glyphicon glyphicon-chevron-up fa fa-chevron-up",down:"glyphicon glyphicon-chevron-down fa fa-chevron-down",previous:"glyphicon glyphicon-chevron-left fa fa-chevron-left",next:"glyphicon glyphicon-chevron-right fa fa-chevron-right",today:"glyphicon glyphicon-screenshot fa fa-calendar-check-o",clear:"glyphicon glyphicon-trash fa fa-tras
104h",close:"glyphicon glyphicon-remove fa fa-times"},tooltips:{today:"Go to today",clear:"Clear selection",close:"Close the picker",selectMonth:"Select Month",prevMonth:"Previous Month",nextMonth:"Next Month",selectYear:"Select Year",prevYear:"Previous Year",nextYear:"Next Year",selectDecade:"Select Decade",prevDecade:"Previous Decade",nextDecade:"Next Decade",prevCentury:"Previous Century",nextCentury:"Next Century",pickHour:"Pick Hour",incrementHour:"Increment Hour",decrementHour:"Decrement Hour",pickMinute:"Pick Minute",incrementMinute:"Increment Minute",decrementMinute:"Decrement Minute",pickSecond:"Pick Second",incrementSecond:"Increment Second",decrementSecond:"Decrement Second",togglePeriod:"Toggle Period",selectTime:"Select Time"},useStrict:!1,sideBySide:!1,daysOfWeekDisabled:!1,calendarWeeks:!1,viewMode:"days",toolbarPlacement:"default",showTodayButton:!1,showClear:!1,showClose:!1,widgetPositioning:{horizontal:"auto",vertical:"auto"},widgetParent:null,ignoreReadonly:!1,keepOpen:!1,focusOnShow:!0,inline:!1,keepInvalid:!1,datepickerInput:".datepickerinput",keyBinds:{up:function(e){if(e){var t=this.date()||this.getMoment();e.find(".datepicker").is(":visible")?this.date(t.clone().subtract(7,"d")):this.date(t.clone().add(this.stepping(),"m"))}},down:function(e){if(e){var t=this.date()||this.getMoment();e.find(".datepicker").is(":visible")?this.date(t.clone().add(7,"d")):this.date(t.clone().subtract(this.stepping(),"m"))}else this.show()},"control up":function(e){if(e){var t=this.date()||this.getMoment();e.find(".datepicker").is(":visible")?this.date(t.clone().subtract(1,"y")):this.date(t.clone().add(1,"h"))}},"control down":function(e){if(e){var t=this.date()||this.getMoment();e.find(".datepicker").is(":visible")?this.date(t.clone().add(1,"y")):this.date(t.clone().subtract(1,"h"))}},left:function(e){if(e){var t=this.date()||this.getMoment();e.find(".datepicker").is(":visible")&&this.date(t.clone().subtract(1,"d"))}},right:function(e){if(e){var t=this.date()||this.getMoment();e.find(".datepicker").is(":visible")&&this.date(t.clone().add(1,"d"))}},pageUp:function(e){if(e){var t=this.date()||this.getMoment();e.find(".datepicker").is(":visible")&&this.date(t.clone().subtract(1,"M"))}},pageDown:function(e){if(e){var t=this.date()||this.getMoment();e.find(".datepicker").is(":visible")&&this.date(t.clone().add(1,"M"))}},enter:function(){this.hide()},escape:function(){this.hide()},"control space":function(e){e&&e.find(".timepicker").is(":visible")&&e.find('.btn[data-action="togglePeriod"]').click()},t:function(){this.date(this.getMoment())},delete:function(){this.clear()}},debug:!1,allowInputToggle:!1,disabledTimeIntervals:!1,disabledHours:!1,enabledHours:!1,viewDate:!1},e.fn.datetimepicker});
105},{"jquery":"HlZQ","moment":"iROh"}],"w4x1":[function(require,module,exports) {
106var define;
107var e;!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof e&&e.amd?e("whatInput",[],n):"object"==typeof exports?exports.whatInput=n():t.whatInput=n()}(this,function(){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var i=t[o]={exports:{},id:o,loaded:!1};return e[o].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}return n.m=e,n.c=t,n.p="",n(0)}([function(e,t){"use strict";e.exports=function(){if("undefined"==typeof document||"undefined"==typeof window)return{ask:function(){return"initial"},element:function(){return null},ignoreKeys:function(){},specificKeys:function(){},registerOnChange:function(){},unRegisterOnChange:function(){}};var e=document.documentElement,t=null,n="initial",o=n,i=Date.now(),r=!1,u=["button","input","select","textarea"],a=[],s=[16,17,18,91,93],d=[],c={keydown:"keyboard",keyup:"keyboard",mousedown:"mouse",mousemove:"mouse",MSPointerDown:"pointer",MSPointerMove:"pointer",pointerdown:"pointer",pointermove:"pointer",touchstart:"touch",touchend:"touch"},w=!1,p={x:null,y:null},f={2:"touch",3:"touch",4:"mouse"},l=!1;try{var m=Object.defineProperty({},"passive",{get:function(){l=!0}});window.addEventListener("test",null,m)}catch(I){}var h=function(){var e=!l||{passive:!0,capture:!0};document.addEventListener("DOMContentLoaded",v,!0),window.PointerEvent?(window.addEventListener("pointerdown",y,!0),window.addEventListener("pointermove",E,!0)):window.MSPointerEvent?(window.addEventListener("MSPointerDown",y,!0),window.addEventListener("MSPointerMove",E,!0)):(window.addEventListener("mousedown",y,!0),window.addEventListener("mousemove",E,!0),"ontouchstart"in window&&(window.addEventListener("touchstart",y,e),window.addEventListener("touchend",y,!0))),window.addEventListener(O(),E,e),window.addEventListener("keydown",y,!0),window.addEventListener("keyup",y,!0),window.addEventListener("focusin",L,!0),window.addEventListener("focusout",b,!0)},v=function(){if(r=!("false"===e.getAttribute("data-whatpersist")||"false"===document.body.getAttribute("data-whatpersist")))try{window.sessionStorage.getItem("what-input")&&(n=window.sessionStorage.getItem("what-input")),window.sessionStorage.getItem("what-intent")&&(o=window.sessionStorage.getItem("what-intent"))}catch(I){}g("input"),g("intent")},y=function(e){var t=e.which,i=c[e.type];"pointer"===i&&(i=S(e));var r=!d.length&&-1===s.indexOf(t),a=d.length&&-1!==d.indexOf(t),w="keyboard"===i&&t&&(r||a)||"mouse"===i||"touch"===i;if(M(i)&&(w=!1),w&&n!==i&&(x("input",n=i),g("input")),w&&o!==i){var p=document.activeElement;p&&p.nodeName&&(-1===u.indexOf(p.nodeName.toLowerCase())||"button"===p.nodeName.toLowerCase()&&!C(p,"form"))&&(x("intent",o=i),g("intent"))}}
107,g=function(t){e.setAttribute("data-what"+t,"input"===t?n:o),k(t)},E=function(e){var t=c[e.type];"pointer"===t&&(t=S(e)),A(e),(!w&&!M(t)||w&&"wheel"===e.type||"mousewheel"===e.type||"DOMMouseScroll"===e.type)&&o!==t&&(x("intent",o=t),g("intent"))},L=function(n){n.target.nodeName?(t=n.target.nodeName.toLowerCase(),e.setAttribute("data-whatelement",t),n.target.classList&&n.target.classList.length&&e.setAttribute("data-whatclasses",n.target.classList.toString().replace(" ",","))):b()},b=function(){t=null,e.removeAttribute("data-whatelement"),e.removeAttribute("data-whatclasses")},x=function(e,t){if(r)try{window.sessionStorage.setItem("what-"+e,t)}catch(I){}},S=function(e){return"number"==typeof e.pointerType?f[e.pointerType]:"pen"===e.pointerType?"touch":e.pointerType},M=function(e){var t=Date.now(),o="mouse"===e&&"touch"===n&&t-i<200;return i=t,o},O=function(){return"onwheel"in document.createElement("div")?"wheel":void 0!==document.onmousewheel?"mousewheel":"DOMMouseScroll"},k=function(e){for(var t=0,i=a.length;t<i;t++)a[t].type===e&&a[t].fn.call(void 0,"input"===e?n:o)},A=function(e){p.x!==e.screenX||p.y!==e.screenY?(w=!1,p.x=e.screenX,p.y=e.screenY):w=!0},C=function(e,t){var n=window.Element.prototype;if(n.matches||(n.matches=n.msMatchesSelector||n.webkitMatchesSelector),n.closest)return e.closest(t);do{if(e.matches(t))return e;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null};return"addEventListener"in window&&Array.prototype.indexOf&&(c[O()]="mouse",h()),{ask:function(e){return"intent"===e?o:n},element:function(){return t},ignoreKeys:function(e){s=e},specificKeys:function(e){d=e},registerOnChange:function(e,t){a.push({fn:e,type:t||"input"})},unRegisterOnChange:function(e){var t=function(e){for(var t=0,n=a.length;t<n;t++)if(a[t].fn===e)return t}(e);(t||0===t)&&a.splice(t,1)},clearStorage:function(){window.sessionStorage.clear()}}}()}])});
108},{}],"DDda":[function(require,module,exports) {
109"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=function(){function e(){this.disposed=!1}return e.prototype.dispose=function(){this.disposed||(this.disposed=!0,this.disposeInternal())},e.prototype.disposeInternal=function(){},e}(),t=exports.default=e;
110},{}],"luEr":[function(require,module,exports) {
111"use strict";function r(r,n,t){for(var u,o,i=t||e,f=0,a=r.length,s=!1;f<a;)(o=+i(r[u=f+(a-f>>1)],n))<0?f=u+1:(a=u,s=!o);return s?f:~f}function e(r,e){return r>e?1:r<e?-1:0}function n(r,e){return r.indexOf(e)>=0}function t(r,e,n){var t=r.length;if(r[0]<=e)return 0;if(e<=r[t-1])return t-1;var u=void 0;if(n>0){for(u=1;u<t;++u)if(r[u]<e)return u-1}else if(n<0){for(u=1;u<t;++u)if(r[u]<=e)return u}else for(u=1;u<t;++u){if(r[u]==e)return u;if(r[u]<e)return"function"==typeof n?n(e,r[u-1],r[u])>0?u-1:u:r[u-1]-e<e-r[u]?u-1:u}return t-1}function u(r,e,n){for(;e<n;){var t=r[e];r[e]=r[n],r[n]=t,++e,--n}}function o(r,e){for(var n=Array.isArray(e)?e:[e],t=n.length,u=0;u<t;u++)r[r.length]=n[u]}function i(r,e){var n=r.indexOf(e),t=n>-1;return t&&r.splice(n,1),t}function f(r,e){for(var n,t=r.length>>>0,u=0;u<t;u++)if(e(n=r[u],u,r))return n;return null}function a(r,e){var n=r.length;if(n!==e.length)return!1;for(var t=0;t<n;t++)if(r[t]!==e[t])return!1;return!0}function s(r,e){var n,t=r.length,u=Array(r.length);for(n=0;n<t;n++)u[n]={index:n,value:r[n]};for(u.sort(function(r,n){return e(r.value,n.value)||r.index-n.index}),n=0;n<r.length;n++)r[n]=u[n].value}function l(r,e){var n;return!r.every(function(t,u){return n=u,!e(t,u,r)})?n:-1}function v(r,n,t){var u=n||e;return r.every(function(e,n){if(0===n)return!0;var o=u(r[n-1],e);return!(o>0||t&&0===o)})}Object.defineProperty(exports,"__esModule",{value:!0}),exports.binarySearch=r,exports.equals=a,exports.extend=o,exports.find=f,exports.findIndex=l,exports.includes=n,exports.isSorted=v,exports.linearFindNearest=t,exports.numberSafeCompareFunction=e,exports.remove=i,exports.reverseSubArray=u,exports.stableSort=s;
112},{}],"RgA2":[function(require,module,exports) {
113"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.FALSE=t,exports.TRUE=e,exports.VOID=n,exports.memoizeOne=o,exports.toPromise=s;var r=require("./array.js");function e(){return!0}function t(){return!1}function n(){}function o(e){var t,n,o,s=!1;return function(){var i=Array.prototype.slice.call(arguments);return s&&this===o&&(0,r.equals)(i,n)||(s=!0,o=this,n=i,t=e.apply(this,arguments)),t}}function s(r){return function(){var e;try{e=r()}catch(t){return Promise.reject(t)}return e instanceof Promise?e:Promise.resolve(e)}()}
114},{"./array.js":"luEr"}],"KniQ":[function(require,module,exports) {
115"use strict";function t(){return function(){throw new Error("Unimplemented abstract method.")}()}Object.defineProperty(exports,"__esModule",{value:!0}),exports.VERSION=void 0,exports.abstract=t,exports.getUid=r;var e=0;function r(t){return t.ol_uid||(t.ol_uid=String(++e))}var o=exports.VERSION="6.15.1";
116},{}],"f3Nv":[function(require,module,exports) {
117"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.WORKER_OFFSCREEN_CANVAS=exports.WEBKIT=exports.SAFARI_BUG_237906=exports.SAFARI=exports.PASSIVE_EVENT_LISTENERS=exports.MAC=exports.IMAGE_DECODE=exports.FIREFOX=exports.DEVICE_PIXEL_RATIO=void 0;var e="undefined"!=typeof navigator&&void 0!==navigator.userAgent?navigator.userAgent.toLowerCase():"",o=exports.FIREFOX=-1!==e.indexOf("firefox"),t=exports.SAFARI=-1!==e.indexOf("safari")&&-1==e.indexOf("chrom"),r=exports.SAFARI_BUG_237906=t&&!!(e.indexOf("version/15.4")>=0||e.match(/cpu (os|iphone os) 15_4 like mac os x/)),n=exports.WEBKIT=-1!==e.indexOf("webkit")&&-1==e.indexOf("edge"),i=exports.MAC=-1!==e.indexOf("macintosh"),s=exports.DEVICE_PIXEL_RATIO="undefined"!=typeof devicePixelRatio?devicePixelRatio:1,E=exports.WORKER_OFFSCREEN_CANVAS="undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof OffscreenCanvas&&self instanceof WorkerGlobalScope,p=exports.IMAGE_DECODE="undefined"!=typeof Image&&Image.prototype.decode,d=exports.PASSIVE_EVENT_LISTENERS=function(){var e=!1;try{var o=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("_",null,o),window.removeEventListener("_",null,o)}catch(t){}return e}();
118},{}],"ygGQ":[function(require,module,exports) {
119"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=require("./util.js"),r=function(){var t=function(r,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&(t[e]=r[e])})(r,e)};return function(r,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=r}t(r,e),r.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}}(),e=function(e){function o(r){var o=this,n="Assertion failed. See https://openlayers.org/en/"+("latest"===t.VERSION?t.VERSION:"v"+t.VERSION.split("-")[0])+"/doc/errors/#"+r+" for details.";return(o=e.call(this,n)||this).code=r,o.name="AssertionError",o.message=n,o}return r(o,e),o}(Error),o=exports.default=e;
120},{"./util.js":"KniQ"}],"fLG6":[function(require,module,exports) {
121"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.assert=t;var e=r(require("./AssertionError.js"));
vendor: 7,487 bytes, lines 121-127
121function r(e){return e&&e.__esModule?e:{default:e}}function t(r,t){if(!r)throw new e.default(t)}
122},{"./AssertionError.js":"ygGQ"}],"P4eA":[function(require,module,exports) {
123"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.apply=c,exports.compose=v,exports.composeCssTransform=l,exports.create=o,exports.determinant=h,exports.invert=y,exports.makeInverse=d,exports.makeScale=x,exports.multiply=u,exports.reset=s,exports.rotate=p,exports.scale=f,exports.set=a,exports.setFromArray=i,exports.toString=M,exports.translate=m;var r,t=require("./has.js"),e=require("./asserts.js"),n=new Array(6);function o(){return[1,0,0,1,0,0]}function s(r){return a(r,1,0,0,1,0,0)}function u(r,t){var e=r[0],n=r[1],o=r[2],s=r[3],u=r[4],a=r[5],i=t[0],c=t[1],p=t[2],f=t[3],x=t[4],m=t[5];return r[0]=e*i+o*c,r[1]=n*i+s*c,r[2]=e*p+o*f,r[3]=n*p+s*f,r[4]=e*x+o*m+u,r[5]=n*x+s*m+a,r}function a(r,t,e,n,o,s,u){return r[0]=t,r[1]=e,r[2]=n,r[3]=o,r[4]=s,r[5]=u,r}function i(r,t){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r[4]=t[4],r[5]=t[5],r}function c(r,t){var e=t[0],n=t[1];return t[0]=r[0]*e+r[2]*n+r[4],t[1]=r[1]*e+r[3]*n+r[5],t}function p(r,t){var e=Math.cos(t),o=Math.sin(t);return u(r,a(n,e,o,-o,e,0,0))}function f(r,t,e){return u(r,a(n,t,0,0,e,0,0))}function x(r,t,e){return a(r,t,0,0,e,0,0)}function m(r,t,e){return u(r,a(n,1,0,0,1,t,e))}function v(r,t,e,n,o,s,u,a){var i=Math.sin(s),c=Math.cos(s);return r[0]=n*c,r[1]=o*i,r[2]=-n*i,r[3]=o*c,r[4]=u*n*c-a*n*i+t,r[5]=u*o*i+a*o*c+e,r}function l(r,t,e,n,s,u,a){return M(v(o(),r,t,e,n,s,u,a))}function y(r){return d(r,r)}function d(r,t){var n=h(t);(0,e.assert)(0!==n,32);var o=t[0],s=t[1],u=t[2],a=t[3],i=t[4],c=t[5];return r[0]=a/n,r[1]=-s/n,r[2]=-u/n,r[3]=o/n,r[4]=(u*c-a*i)/n,r[5]=-(o*c-s*i)/n,r}function h(r){return r[0]*r[3]-r[1]*r[2]}function M(e){var n="matrix("+e.join(", ")+")";if(t.WORKER_OFFSCREEN_CANVAS)return n;var o=r||(r=document.createElement("div"));return o.style.transform=n,o.style.transform}
124},{"./has.js":"f3Nv","./asserts.js":"fLG6"}],"bUAS":[function(require,module,exports) {
125"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=exports.default={UNKNOWN:0,INTERSECTING:1,ABOVE:2,RIGHT:4,BELOW:8,LEFT:16};
126},{}],"QDir":[function(require,module,exports) {
127"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.applyTransform=k,exports.approximatelyEquals=E,exports.boundingExtent=n,exports.buffer=u,exports.clone=a,exports.closestSquaredDistanceXY=i,exports.containsCoordinate=s,exports.containsExtent=f,exports.containsXY=p,exports.coordinateRelationship=c,exports.createEmpty=x,exports.createOrUpdate=l,exports.createOrUpdateEmpty=d,exports.createOrUpdateFromCoordinate=h,exports.createOrUpdateFromCoordinates=g,exports.createOrUpdateFromFlatCoordinates=m,exports.createOrUpdateFromRings=v,exports.equals=M,exports.extend=O,exports.extendCoordinate=T,exports.extendCoordinates=C,exports.extendFlatCoordinates=F,exports.extendRings=R,exports.extendXY=N,exports.forEachCorner=I,exports.getArea=y,exports.getBottomLeft=b,exports.getBottomRight=U,exports.getCenter=A,exports.getCorner=B,exports.getEnlargedArea=L,exports.getForViewAndSize=S,exports.getHeight=X,exports.getIntersection=q,exports.getIntersectionArea=G,exports.getMargin=V,exports.getRotatedViewport=W,exports.getSize=w,exports.getTopLeft=H,exports.getTopRight=_,exports.getWidth=j,exports.intersects=Y,exports.intersectsSegment=P,exports.isEmpty=z,exports.returnOrUpdate=K,exports.scaleFromCenter=D,exports.wrapAndSliceX=Q,exports.wrapX=J;var t=r(require("./extent/Relationship.js")),e=require("./asserts.js");function r(t){return t&&t.__esModule?t:{default:t}}function n(t){for(var e=x(),r=0,n=t.length;r<n;++r)T(e,t[r]);return e}function o(t,e,r){return l(Math.min.apply(null,t),Math.min.apply(null,e),Math.max.apply(null,t),Math.max.apply(null,e),r)}function u(t,e,r){return r?(r[0]=t[0]-e,r[1]=t[1]-e,r[2]=t[2]+e,r[3]=t[3]+e,r):[t[0]-e,t[1]-e,t[2]+e,t[3]+e]}function a(t,e){return e?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e):t.slice()}function i(t,e,r){var n,o;return(n=e<t[0]?t[0]-e:t[2]<e?e-t[2]:0)*n+(o=r<t[1]?t[1]-r:t[3]<r?r-t[3]:0)*o}function s(t,e){return p(t,e[0],e[1])}function f(t,e){return t[0]<=e[0]&&e[2]<=t[2]&&t[1]<=e[1]&&e[3]<=t[3]}function p(t,e,r){return t[0]<=e&&e<=t[2]&&t[1]<=r&&r<=t[3]}function c(e,r){var n=e[0],o=e[1],u=e[2],a=e[3],i=r[0],s=r[1],f=t.default.UNKNOWN;return i<n?f|=t.default.LEFT:i>u&&(f|=t.default.RIGHT),s<o?f|=t.default.BELOW:s>a&&(f|=t.default.ABOVE),f===t.default.UNKNOWN&&(f=t.default.INTERSECTING),f}function x(){return[1/0,1/0,-1/0,-1/0]}function l(t,e,r,n,o){return o?(o[0]=t,o[1]=e,o[2]=r,o[3]=n,o):[t,e,r,n]}function d(t){return l(1/0,1/0,-1/0,-1/0,t)}function h(t,e){var r=t[0],n=t[1];return l(r,n,r,n,e)}function g(t,e){return C(d(e),t)}function m(t,e,r,n,o){return F(d(o),t,e,r,n)}function v(t,e){return R(d(e),t)}function M(t,e){return t[0]==e[0]&&t[2]==e[2]&&t[1]==e[1]&&t[3]==e[3]}function E(t,e,r){return Math.abs(t[0]-e[0])<r&&Math.abs(t[2]-e[2])<r&&Math.abs(t[1]-e[1])<r&&Math.abs(t[3]-e[3])<r}function O(t,e){return e[0]<t[0]&&(t[0]=e[0]),e[2]>t[2]&&(t[2]=e[2]),e[1]<t[1]&&(t[1]=e[1]),e[3]>t[3]&&(t[3]=e[3]),t}function T(t,e){e[0]<t[0]&&(t[0]=e[0]),e[0]>t[2]&&(t[2]=e[0]),e[1]<t[1]&&(t[1]=e[1]),e[1]>t[3]&&(t[3]=e[1])}function C(t,e){for(var r=0,n=e.length;r<n;++r)T(t,e[r]);return t}function F(t,e,r,n,o){for(;r<n;r+=o)N(t,e[r],e[r+1]);return t}function R(t,e){for(var r=0,n=e.length;r<n;++r)C(t,e[r]);return t}function N(t,e,r){t[0]=Math.min(t[0],e),t[1]=Math.min(t[1],r),t[2]=Math.max(t[2],e),t[3]=Math.max(t[3],r)}function I(t,e){var r;return(r=e(b(t)))?r:(r=e(U(t)))?r:(r=e(_(t)))?r:(r=e(H(t)))||!1}function y(t){var e=0;return z(t)||(e=j(t)*X(t)),e}function b(t){return[t[0],t[1]]}function U(t){return[t[2],t[1]]}function A(t){return[(t[0]+t[2])/2,(t[1]+t[3])/2]}function B(t,r){var n;return"bottom-left"===r?n=b(t):"bottom-right"===r?n=U(t):"top-left"===r?n=H(t):"top-right"===r?n=_(t):(0,e.assert)(!1,13),n}function L(t,e){var r=Math.min(t[0],e[0]),n=Math.min(t[1],e[1]);return(Math.max(t[2],e[2])-r)*(Math.max(t[3],e[3])-n)}function S(t,e,r,n,o){var u=W(t,e,r,n),a=u[0],i=u[1],s=u[2],f=u[3],p=u[4],c=u[5],x=u[6],d=u[7];return l(Math.min(a,s,p,x),Math.min(i,f,c,d),Math.max(a,s,p,x),Math.max(i,f,c,d),o)}function W(t,e,r,n){var o=e*n[0]/2,u=e*n[1]/2,a=Math.cos(r),i=Math.sin(r),s=o*a,f=o*i,p=u*a,c=u*i,x=t[0],l=t[1];return[x-s+c,l-f-p,x-s-c,l-f+p,x+s-c,l+f+p,x+s+c,l+f-p,x-s+c,l-f-p]}function X(t){return t[3]-t[1]}function G(t,e){return y(q(t,e))}function q(t,e,r){var n=r||x();return Y(t,e)?(t[0]>e[0]?n[0]=t[0]:n[0]=e[0],t[1]>e[1]?n[1]=t[1]:n[1]=e[1],t[2]<e[2]?n[2]=t[2]:n[2]=e[2],t[3]<e[3]?n[3]=t[3]:n[3]=e[3]):d(n),n}function V(t){return j(t)+X(t)}function w(t){return[t[2]-t[0],t[3]-t[1]]}function H(t){return[t[0],t[3]]}function _(t){return[t[2],t[3]]}function j(t){return t[2]-t[0]}function Y(t,e){return t[0]<=e[2]&&t[2]>=e[0]&&t[1]<=e[3]&&t[3]>=e[1]}function z(t){return t[2]<t[0]||t[3]<t[1]}function K(t,e){return e?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e):t}function D(t,e){var r=(t[2]-t[0])/2*(e-1),n=(t[3]-t[1])/2*(e-1);t[0]-=r,t[2]+=r,t[1]-=n,t[3]+=n}function P(e,r,n){var o=!1,u=c(e,r),a=c(e,n);if(u===t.default.INTERSECTING||a===t.default.INTERSECTING)o=!0;else{var i=e[0],s=e[1],f=e[2],p=e[3],x=r[0],l=r[1],d=n[0],h=n[1],g=(h-l)/(d-x),m=void 0,v=void 0;a&t.default.ABOVE&&!(u&t.default.ABOVE)&&(o=(m=d-(h-p)/g)>=i&&m<=f),o||!(a&t.default.RIGHT)||u&t.default.RIGHT||(o=(v=h-(d-f)*g)>
127=s&&v<=p),o||!(a&t.default.BELOW)||u&t.default.BELOW||(o=(m=d-(h-s)/g)>=i&&m<=f),o||!(a&t.default.LEFT)||u&t.default.LEFT||(o=(v=h-(d-i)*g)>=s&&v<=p)}return o}function k(t,e,r,n){var u=[];if(n>1)for(var a=t[2]-t[0],i=t[3]-t[1],s=0;s<n;++s)u.push(t[0]+a*s/n,t[1],t[2],t[1]+i*s/n,t[2]-a*s/n,t[3],t[0],t[3]-i*s/n);else u=[t[0],t[1],t[2],t[1],t[2],t[3],t[0],t[3]];e(u,u,2);for(var f=[],p=[],c=(s=0,u.length);s<c;s+=2)f.push(u[s]),p.push(u[s+1]);return o(f,p,r)}function J(t,e){var r=e.getExtent(),n=A(t);if(e.canWrapX()&&(n[0]<r[0]||n[0]>=r[2])){var o=j(r),u=Math.floor((n[0]-r[0])/o)*o;t[0]-=u,t[2]-=u}return t}function Q(t,e){if(e.canWrapX()){var r=e.getExtent();if(!isFinite(t[0])||!isFinite(t[2]))return[[r[0],t[1],r[2],t[3]]];J(t,e);var n=j(r);if(j(t)>n)return[[r[0],t[1],r[2],t[3]]];if(t[0]<r[0])return[[t[0]+n,t[1],r[2],t[3]],[r[0],t[1],t[2],t[3]]];if(t[2]>r[2])return[[t[0],t[1],r[2],t[3]],[r[0],t[1],t[2]-n,t[3]]]}return[t]}
128},{"./extent/Relationship.js":"bUAS","./asserts.js":"fLG6"}],"B96G":[function(require,module,exports) {
129"use strict";function r(r,t,o){return Math.min(Math.max(r,t),o)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.ceil=x,exports.clamp=r,exports.cosh=void 0,exports.floor=p,exports.lerp=c,exports.log2=void 0,exports.modulo=i,exports.round=h,exports.solveLinearSystem=a,exports.squaredDistance=n,exports.squaredSegmentDistance=e,exports.toDegrees=u,exports.toFixed=f,exports.toRadians=s;var t=exports.cosh="cosh"in Math?Math.cosh:function(r){var t=Math.exp(r);return(t+1/t)/2},o=exports.log2="log2"in Math?Math.log2:function(r){return Math.log(r)*Math.LOG2E};function e(r,t,o,e,a,u){var s=a-o,i=u-e;if(0!==s||0!==i){var c=((r-o)*s+(t-e)*i)/(s*s+i*i);c>1?(o=a,e=u):c>0&&(o+=s*c,e+=i*c)}return n(r,t,o,e)}function n(r,t,o,e){var n=o-r,a=e-t;return n*n+a*a}function a(r){for(var t=r.length,o=0;o<t;o++){for(var e=o,n=Math.abs(r[o][o]),a=o+1;a<t;a++){var u=Math.abs(r[a][o]);u>n&&(n=u,e=a)}if(0===n)return null;var s=r[e];r[e]=r[o],r[o]=s;for(var i=o+1;i<t;i++)for(var c=-r[i][o]/r[o][o],f=o;f<t+1;f++)o==f?r[i][f]=0:r[i][f]+=c*r[o][f]}for(var h=new Array(t),p=t-1;p>=0;p--){h[p]=r[p][t]/r[p][p];for(var x=p-1;x>=0;x--)r[x][t]-=r[x][p]*h[p]}return h}function u(r){return 180*r/Math.PI}function s(r){return r*Math.PI/180}function i(r,t){var o=r%t;return o*t<0?o+t:o}function c(r,t,o){return r+o*(t-r)}function f(r,t){var o=Math.pow(10,t);return Math.round(r*o)/o}function h(r,t){return Math.round(f(r,t))}function p(r,t){return Math.floor(f(r,t))}function x(r,t){return Math.ceil(f(r,t))}
130},{}],"eucy":[function(require,module,exports) {
131"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.asArray=i,exports.asString=s,exports.fromString=void 0,exports.isStringColor=l,exports.normalize=p,exports.toString=c;var r=require("./asserts.js"),e=require("./math.js"),t=/^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i,n=/^([a-z]*)$|^hsla?\(.*\)$/i;function s(r){return"string"==typeof r?r:c(r)}function a(r){var e=document.createElement("div");if(e.style.color=r,""!==e.style.color){document.body.appendChild(e);var t=getComputedStyle(e).color;return document.body.removeChild(e),t}return""}var o=exports.fromString=function(){var r={},e=0;return function(t){var n;if(r.hasOwnProperty(t))n=r[t];else{if(e>=1024){var s=0;for(var a in r)0==(3&s++)&&(delete r[a],--e)}n=u(t),r[t]=n,++e}return n}}();function i(r){return Array.isArray(r)?r:o(r)}function u(e){var s,o,i,u,c;if(n.exec(e)&&(e=a(e)),t.exec(e)){var l=e.length-1,f=void 0;f=l<=4?1:2;var d=4===l||8===l;s=parseInt(e.substr(1+0*f,f),16),o=parseInt(e.substr(1+1*f,f),16),i=parseInt(e.substr(1+2*f,f),16),u=d?parseInt(e.substr(1+3*f,f),16):255,1==f&&(s=(s<<4)+s,o=(o<<4)+o,i=(i<<4)+i,d&&(u=(u<<4)+u)),c=[s,o,i,u/255]}else 0==e.indexOf("rgba(")?p(c=e.slice(5,-1).split(",").map(Number)):0==e.indexOf("rgb(")?((c=e.slice(4,-1).split(",").map(Number)).push(1),p(c)):(0,r.assert)(!1,14);return c}function p(r){return r[0]=(0,e.clamp)(r[0]+.5|0,0,255),r[1]=(0,e.clamp)(r[1]+.5|0,0,255),r[2]=(0,e.clamp)(r[2]+.5|0,0,255),r[3]=(0,e.clamp)(r[3],0,1),r}function c(r){var e=r[0];e!=(0|e)&&(e=e+.5|0);var t=r[1];t!=(0|t)&&(t=t+.5|0);var n=r[2];return n!=(0|n)&&(n=n+.5|0),"rgba("+e+","+t+","+n+","+(void 0===r[3]?1:Math.round(100*r[3])/100)+")"}function l(r){return n.test(r)&&(r=a(r)),t.test(r)||0===r.indexOf("rgba(")||0===r.indexOf("rgb(")}
132},{"./asserts.js":"fLG6","./math.js":"B96G"}],"V0oB":[function(require,module,exports) {
133"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.shared=exports.default=void 0;var e=require("../color.js"),t=function(){function e(){this.cache_={},this.cacheSize_=0,this.maxCacheSize_=32}return e.prototype.clear=function(){this.cache_={},this.cacheSize_=0},e.prototype.canExpireCache=function(){return this.cacheSize_>this.maxCacheSize_},e.prototype.expire=function(){if(this.canExpireCache()){var e=0;for(var t in this.cache_){var i=this.cache_[t];0!=(3&e++)||i.hasListener()||(delete this.cache_[t],--this.cacheSize_)}}},e.prototype.get=function(e,t,c){var r=i(e,t,c);return r in this.cache_?this.cache_[r]:null},e.prototype.set=function(e,t,c,r){var h=i(e,t,c);this.cache_[h]=r,++this.cacheSize_},e.prototype.setSize=function(e){this.maxCacheSize_=e,this.expire()},e}();function i(t,i,c){return i+":"+t+":"+(c?(0,e.asString)(c):"null")}var c=exports.default=t,r=exports.shared=new t;
134},{"../color.js":"eucy"}],"fKNg":[function(require,module,exports) {
135"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0,exports.preventDefault=o,exports.stopPropagation=e;
135var t=function(){function t(t){this.propagationStopped,this.defaultPrevented,this.type=t,this.target=null}return t.prototype.preventDefault=function(){this.defaultPrevented=!0},t.prototype.stopPropagation=function(){this.propagationStopped=!0},t}();function e(t){t.stopPropagation()}function o(t){t.preventDefault()}var p=exports.default=t;
136},{}],"zehl":[function(require,module,exports) {
137"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=exports.default={PROPERTYCHANGE:"propertychange"};
138},{}],"mH6q":[function(require,module,exports) {
139"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.assign=void 0,exports.clear=r,exports.getValues=void 0,exports.isEmpty=n;var e=exports.assign="function"==typeof Object.assign?Object.assign:function(e,r){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1,o=arguments.length;n<o;++n){var s=arguments[n];if(null!=s)for(var i in s)s.hasOwnProperty(i)&&(t[i]=s[i])}return t};function r(e){for(var r in e)delete e[r]}var t=exports.getValues="function"==typeof Object.values?Object.values:function(e){var r=[];for(var t in e)r.push(e[t]);return r};function n(e){var r;for(r in e)return!1;return!r}
140},{}],"CR4Y":[function(require,module,exports) {
141"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=r(require("../Disposable.js")),t=r(require("./Event.js")),n=require("../functions.js"),i=require("../obj.js");function r(e){return e&&e.__esModule?e:{default:e}}var s=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),o=function(e){function r(t){var n=e.call(this)||this;return n.eventTarget_=t,n.pendingRemovals_=null,n.dispatching_=null,n.listeners_=null,n}return s(r,e),r.prototype.addEventListener=function(e,t){if(e&&t){var n=this.listeners_||(this.listeners_={}),i=n[e]||(n[e]=[]);-1===i.indexOf(t)&&i.push(t)}},r.prototype.dispatchEvent=function(e){var i="string"==typeof e,r=i?e:e.type,s=this.listeners_&&this.listeners_[r];if(s){var o=i?new t.default(e):e;o.target||(o.target=this.eventTarget_||this);var l,a=this.dispatching_||(this.dispatching_={}),p=this.pendingRemovals_||(this.pendingRemovals_={});r in a||(a[r]=0,p[r]=0),++a[r];for(var u=0,h=s.length;u<h;++u)if(!1===(l="handleEvent"in s[u]?s[u].handleEvent(o):s[u].call(this,o))||o.propagationStopped){l=!1;break}if(0==--a[r]){var c=p[r];for(delete p[r];c--;)this.removeEventListener(r,n.VOID);delete a[r]}return l}},r.prototype.disposeInternal=function(){this.listeners_&&(0,i.clear)(this.listeners_)},r.prototype.getListeners=function(e){return this.listeners_&&this.listeners_[e]||void 0},r.prototype.hasListener=function(e){return!!this.listeners_&&(e?e in this.listeners_:Object.keys(this.listeners_).length>0)},r.prototype.removeEventListener=function(e,t){var i=this.listeners_&&this.listeners_[e];if(i){var r=i.indexOf(t);-1!==r&&(this.pendingRemovals_&&e in this.pendingRemovals_?(i[r]=n.VOID,++this.pendingRemovals_[e]):(i.splice(r,1),0===i.length&&delete this.listeners_[e]))}},r}(e.default),l=exports.default=o;
142},{"../Disposable.js":"DDda","./Event.js":"fKNg","../functions.js":"RgA2","../obj.js":"mH6q"}],"C8cu":[function(require,module,exports) {
143"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=exports.default={CHANGE:"change",ERROR:"error",BLUR:"blur",CLEAR:"clear",CONTEXTMENU:"contextmenu",CLICK:"click",DBLCLICK:"dblclick",DRAGENTER:"dragenter",DRAGOVER:"dragover",DROP:"drop",FOCUS:"focus",KEYDOWN:"keydown",KEYPRESS:"keypress",LOAD:"load",RESIZE:"resize",TOUCHMOVE:"touchmove",WHEEL:"wheel"};
144},{}],"UqnM":[function(require,module,exports) {
145"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.listen=t,exports.listenOnce=r,exports.unlistenByKey=n;var e=require("./obj.js");function t(e,t,r,n,i){if(n&&n!==e&&(r=r.bind(n)),i){var s=r;r=function(){e.removeEventListener(t,r),s.apply(this,arguments)}}var o={target:e,type:t,listener:r};return e.addEventListener(t,r),o}function r(e,r,n,i){return t(e,r,n,i,!0)}function n(t){t&&t.target&&(t.target.removeEventListener(t.type,t.listener),(0,e.clear)(t))}
146},{"./obj.js":"mH6q"}],"IdSm":[function(require,module,exports) {
147"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0,exports.unByKey=s;var e=n(require("./events/Target.js")),t=n(require("./events/EventType.js")),r=require("./events.js");
147function n(e){return e&&e.__esModule?e:{default:e}}var o=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),i=function(e){function n(){var t=e.call(this)||this;return t.on=t.onInternal,t.once=t.onceInternal,t.un=t.unInternal,t.revision_=0,t}return o(n,e),n.prototype.changed=function(){++this.revision_,this.dispatchEvent(t.default.CHANGE)},n.prototype.getRevision=function(){return this.revision_},n.prototype.onInternal=function(e,t){if(Array.isArray(e)){for(var n=e.length,o=new Array(n),i=0;i<n;++i)o[i]=(0,r.listen)(this,e[i],t);return o}return(0,r.listen)(this,e,t)},n.prototype.onceInternal=function(e,t){var n;if(Array.isArray(e)){var o=e.length;n=new Array(o);for(var i=0;i<o;++i)n[i]=(0,r.listenOnce)(this,e[i],t)}else n=(0,r.listenOnce)(this,e,t);return t.ol_key=n,n},n.prototype.unInternal=function(e,t){var r=t.ol_key;if(r)s(r);else if(Array.isArray(e))for(var n=0,o=e.length;n<o;++n)this.removeEventListener(e[n],t);else this.removeEventListener(e,t)},n}(e.default);function s(e){if(Array.isArray(e))for(var t=0,n=e.length;t<n;++t)(0,r.unlistenByKey)(e[t]);else(0,r.unlistenByKey)(e)}i.prototype.on,i.prototype.once,i.prototype.un;var u=exports.default=i;
148},{"./events/Target.js":"CR4Y","./events/EventType.js":"C8cu","./events.js":"UqnM"}],"PhPh":[function(require,module,exports) {
149"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.ObjectEvent=void 0;var t=o(require("./events/Event.js")),e=o(require("./ObjectEventType.js")),n=o(require("./Observable.js")),r=require("./obj.js"),s=require("./util.js");function o(t){return t&&t.__esModule?t:{default:t}}var i=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),u=exports.ObjectEvent=function(t){function e(e,n,r){var s=t.call(this,e)||this;return s.key=n,s.oldValue=r,s}return i(e,t),e}(t.default),a=function(t){function n(e){var n=t.call(this)||this;return n.on,n.once,n.un,(0,s.getUid)(n),n.values_=null,void 0!==e&&n.setProperties(e),n}return i(n,t),n.prototype.get=function(t){var e;return this.values_&&this.values_.hasOwnProperty(t)&&(e=this.values_[t]),e},n.prototype.getKeys=function(){return this.values_&&Object.keys(this.values_)||[]},n.prototype.getProperties=function(){return this.values_&&(0,r.assign)({},this.values_)||{}},n.prototype.hasProperties=function(){return!!this.values_},n.prototype.notify=function(t,n){var r;r="change:".concat(t),this.hasListener(r)&&this.dispatchEvent(new u(r,t,n)),r=e.default.PROPERTYCHANGE,this.hasListener(r)&&this.dispatchEvent(new u(r,t,n))},n.prototype.addChangeListener=function(t,e){this.addEventListener("change:".concat(t),e)},n.prototype.removeChangeListener=function(t,e){this.removeEventListener("change:".concat(t),e)},n.prototype.set=function(t,e,n){var r=this.values_||(this.values_={});if(n)r[t]=e;else{var s=r[t];r[t]=e,s!==e&&this.notify(t,s)}},n.prototype.setProperties=function(t,e){for(var n in t)this.set(n,t[n],e)},n.prototype.applyProperties=function(t){t.values_&&(0,r.assign)(this.values_||(this.values_={}),t.values_)},n.prototype.unset=function(t,e){if(this.values_&&t in this.values_){var n=this.values_[t];delete this.values_[t],(0,r.isEmpty)(this.values_)&&(this.values_=null),e||this.notify(t,n)}},n}(n.default),l=exports.default=a;
150},{"./events/Event.js":"fKNg","./ObjectEventType.js":"zehl","./Observable.js":"IdSm","./obj.js":"mH6q","./ut
150il.js":"KniQ"}],"HbeD":[function(require,module,exports) {
151"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=exports.default={OPACITY:"opacity",VISIBLE:"visible",EXTENT:"extent",Z_INDEX:"zIndex",MAX_RESOLUTION:"maxResolution",MIN_RESOLUTION:"minResolution",MAX_ZOOM:"maxZoom",MIN_ZOOM:"minZoom",SOURCE:"source",MAP:"map"};
152},{}],"T6DQ":[function(require,module,exports) {
153"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=s(require("../Object.js")),e=s(require("./Property.js")),o=require("../util.js"),n=require("../asserts.js"),r=require("../obj.js"),i=require("../math.js");function s(t){return t&&t.__esModule?t:{default:t}}var u=function(){var t=function(e,o){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),a=function(t){function s(o){var i=t.call(this)||this;i.on,i.once,i.un,i.background_=o.background;var s=(0,r.assign)({},o);return"object"==typeof o.properties&&(delete s.properties,(0,r.assign)(s,o.properties)),s[e.default.OPACITY]=void 0!==o.opacity?o.opacity:1,(0,n.assert)("number"==typeof s[e.default.OPACITY],64),s[e.default.VISIBLE]=void 0===o.visible||o.visible,s[e.default.Z_INDEX]=o.zIndex,s[e.default.MAX_RESOLUTION]=void 0!==o.maxResolution?o.maxResolution:1/0,s[e.default.MIN_RESOLUTION]=void 0!==o.minResolution?o.minResolution:0,s[e.default.MIN_ZOOM]=void 0!==o.minZoom?o.minZoom:-1/0,s[e.default.MAX_ZOOM]=void 0!==o.maxZoom?o.maxZoom:1/0,i.className_=void 0!==s.className?s.className:"ol-layer",delete s.className,i.setProperties(s),i.state_=null,i}return u(s,t),s.prototype.getBackground=function(){return this.background_},s.prototype.getClassName=function(){return this.className_},s.prototype.getLayerState=function(t){var e=this.state_||{layer:this,managed:void 0===t||t},o=this.getZIndex();return e.opacity=(0,i.clamp)(Math.round(100*this.getOpacity())/100,0,1),e.visible=this.getVisible(),e.extent=this.getExtent(),e.zIndex=void 0!==o||e.managed?o:1/0,e.maxResolution=this.getMaxResolution(),e.minResolution=Math.max(this.getMinResolution(),0),e.minZoom=this.getMinZoom(),e.maxZoom=this.getMaxZoom(),this.state_=e,e},s.prototype.getLayersArray=function(t){return(0,o.abstract)()},s.prototype.getLayerStatesArray=function(t){return(0,o.abstract)()},s.prototype.getExtent=function(){return this.get(e.default.EXTENT)},s.prototype.getMaxResolution=function(){return this.get(e.default.MAX_RESOLUTION)},s.prototype.getMinResolution=function(){return this.get(e.default.MIN_RESOLUTION)},s.prototype.getMinZoom=function(){return this.get(e.default.MIN_ZOOM)},s.prototype.getMaxZoom=function(){return this.get(e.default.MAX_ZOOM)},s.prototype.getOpacity=function(){return this.get(e.default.OPACITY)},s.prototype.getSourceState=function(){return(0,o.abstract)()},s.prototype.getVisible=function(){return this.get(e.default.VISIBLE)},s.prototype.getZIndex=function(){return this.get(e.default.Z_INDEX)},s.prototype.setBackground=function(t){this.background_=t,this.changed()},s.prototype.setExtent=function(t){this.set(e.default.EXTENT,t)},s.prototype.setMaxResolution=function(t){this.set(e.default.MAX_RESOLUTION,t)},s.prototype.setMinResolution=function(t){this.set(e.default.MIN_RESOLUTION,t)},s.prototype.setMaxZoom=function(t){this.set(e.default.MAX_ZOOM,t)},s.prototype.setMinZoom=function(t){this.set(e.default.MIN_ZOOM,t)},s.prototype.setOpacity=function(t){(0,n.assert)("number"==typeof t,64),this.set(e.default.OPACITY,t)},s.prototype.setVisible=function(t){this.set(e.default.VISIBLE,t)},s.prototype.setZIndex=function(t){this.set(e.default.Z_INDEX,t)},s.prototype.disposeInternal=function(){this.state_&&(this.state_.layer=null,this.state_=null),t.prototype.disposeInternal.call(this)},s}(t.default),p=exports.default=a;
154},{"../Object.js":"PhPh","./Property.js":"HbeD","../util.js":"KniQ","../asserts.js":"fLG6","../obj.js":"mH6q","../math.js":"B96G"}],"z39m":[function(require,module,exports) {
155"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=exports.default={PRERENDER:"prerender",POSTRENDER:"postrender",PRECOMPOSE:"precompose",POSTCOMPOSE:"postcompose",RENDERCOMPLETE:"rendercomplete"};
156},{}],"GCgv":[function(require,module,exports) {
157"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0,exports.inView=c;var e=i(require("./Base.js")),t=i(require("../events/EventType.js")),r=i(require("./Property.js")),n=i(require("../render/EventType.js")),o=require("../asserts.js"),s=require("../obj.js"),u=require("../events.js");
157function i(e){return e&&e.__esModule?e:{default:e}}var a=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),p=function(e){function i(t){var n=this,o=(0,s.assign)({},t);delete o.source,(n=e.call(this,o)||this).on,n.once,n.un,n.mapPrecomposeKey_=null,n.mapRenderKey_=null,n.sourceChangeKey_=null,n.renderer_=null,n.rendered=!1,t.render&&(n.render=t.render),t.map&&n.setMap(t.map),n.addChangeListener(r.default.SOURCE,n.handleSourcePropertyChange_);var u=t.source?t.source:null;return n.setSource(u),n}return a(i,e),i.prototype.getLayersArray=function(e){var t=e||[];return t.push(this),t},i.prototype.getLayerStatesArray=function(e){var t=e||[];return t.push(this.getLayerState()),t},i.prototype.getSource=function(){return this.get(r.default.SOURCE)||null},i.prototype.getRenderSource=function(){return this.getSource()},i.prototype.getSourceState=function(){var e=this.getSource();return e?e.getState():"undefined"},i.prototype.handleSourceChange_=function(){this.changed()},i.prototype.handleSourcePropertyChange_=function(){this.sourceChangeKey_&&((0,u.unlistenByKey)(this.sourceChangeKey_),this.sourceChangeKey_=null);var e=this.getSource();e&&(this.sourceChangeKey_=(0,u.listen)(e,t.default.CHANGE,this.handleSourceChange_,this)),this.changed()},i.prototype.getFeatures=function(e){return this.renderer_?this.renderer_.getFeatures(e):new Promise(function(e){return e([])})},i.prototype.getData=function(e){return this.renderer_&&this.rendered?this.renderer_.getData(e):null},i.prototype.render=function(e,t){var r=this.getRenderer();if(r.prepareFrame(e))return this.rendered=!0,r.renderFrame(e,t)},i.prototype.unrender=function(){this.rendered=!1},i.prototype.setMapInternal=function(e){e||this.unrender(),this.set(r.default.MAP,e)},i.prototype.getMapInternal=function(){return this.get(r.default.MAP)},i.prototype.setMap=function(e){this.mapPrecomposeKey_&&((0,u.unlistenByKey)(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),e||this.changed(),this.mapRenderKey_&&((0,u.unlistenByKey)(this.mapRenderKey_),this.mapRenderKey_=null),e&&(this.mapPrecomposeKey_=(0,u.listen)(e,n.default.PRECOMPOSE,function(e){var t=e.frameState.layerStatesArray,r=this.getLayerState(!1);(0,o.assert)(!t.some(function(e){return e.layer===r.layer}),67),t.push(r)},this),this.mapRenderKey_=(0,u.listen)(this,t.default.CHANGE,e.render,e),this.changed())},i.prototype.setSource=function(e){this.set(r.default.SOURCE,e)},i.prototype.getRenderer=function(){return this.renderer_||(this.renderer_=this.createRenderer()),this.renderer_},i.prototype.hasRenderer=function(){return!!this.renderer_},i.prototype.createRenderer=function(){return null},i.prototype.disposeInternal=function(){this.renderer_&&(this.renderer_.dispose(),delete this.renderer_),this.setSource(null),e.prototype.disposeInternal.call(this)},i}(e.default);function c(e,t){if(!e.visible)return!1;var r=t.resolution;if(r<e.minResolution||r>=e.maxResolution)return!1;var n=t.zoom;return n>e.minZoom&&n<=e.maxZoom}var h=exports.default=p;
158},{"./Base.js":"T6DQ","../events/EventType.js":"C8cu","./Property.js":"HbeD","../render/EventType.js":"z39m","../asserts.js":"fLG6","../obj.js":"mH6q","../events.js":"UqnM"}],"AiCK":[function(require,module,exports) {
159"use strict";function e(e,r,t){var n=void 0!==t?e.toFixed(t):""+e,i=n.indexOf(".");return(i=-1===i?n.length:i)>r?n:new Array(1+r-i).join("0")+n}function r(e,r){for(var t=(""+e).split("."),n=(""+r).split("."),i=0;i<Math.max(t.length,n.length);i++){var o=parseInt(t[i]||"0",10),s=parseInt(n[i]||"0",10);if(o>s)return 1;if(s>o)return-1}return 0}Object.defineProperty(exports,"__esModule",{value:!0}),exports.compareVersions=r,exports.padNumber=e;
160},{}],"nGsj":[function(require,module,exports) {
161"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.add=n,exports.closestOnCircle=o,exports.closestOnSegment=a,exports.createStringXY=u,exports.degreesToStringHDMS=s,exports.distance=d,exports.equals=c,exports.format=i,exports.getWorldsAway=v,exp
161orts.rotate=f,exports.scale=p,exports.squaredDistance=x,exports.squaredDistanceToSegment=g,exports.toStringHDMS=l,exports.toStringXY=h,exports.wrapX=M;var t=require("./extent.js"),r=require("./math.js"),e=require("./string.js");function n(t,r){return t[0]+=+r[0],t[1]+=+r[1],t}function o(t,r){var e=r.getRadius(),n=r.getCenter(),o=n[0],a=n[1],u=t[0]-o,s=t[1]-a;0===u&&0===s&&(u=1);var i=Math.sqrt(u*u+s*s);return[o+e*u/i,a+e*s/i]}function a(t,r){var e,n,o=t[0],a=t[1],u=r[0],s=r[1],i=u[0],c=u[1],f=s[0],p=s[1],x=f-i,d=p-c,g=0===x&&0===d?0:(x*(o-i)+d*(a-c))/(x*x+d*d||0);return g<=0?(e=i,n=c):g>=1?(e=f,n=p):(e=i+g*x,n=c+g*d),[e,n]}function u(t){return function(r){return h(r,t)}}function s(t,n,o){var a=(0,r.modulo)(n+180,360)-180,u=Math.abs(3600*a),s=o||0,i=Math.pow(10,s),c=Math.floor(u/3600),f=Math.floor((u-3600*c)/60),p=u-3600*c-60*f;return(p=Math.ceil(p*i)/i)>=60&&(p=0,f+=1),f>=60&&(f=0,c+=1),c+"° "+(0,e.padNumber)(f,2)+"′ "+(0,e.padNumber)(p,2,s)+"″"+(0==a?"":" "+t.charAt(a<0?1:0))}function i(t,r,e){return t?r.replace("{x}",t[0].toFixed(e)).replace("{y}",t[1].toFixed(e)):""}function c(t,r){for(var e=!0,n=t.length-1;n>=0;--n)if(t[n]!=r[n]){e=!1;break}return e}function f(t,r){var e=Math.cos(r),n=Math.sin(r),o=t[0]*e-t[1]*n,a=t[1]*e+t[0]*n;return t[0]=o,t[1]=a,t}function p(t,r){return t[0]*=r,t[1]*=r,t}function x(t,r){var e=t[0]-r[0],n=t[1]-r[1];return e*e+n*n}function d(t,r){return Math.sqrt(x(t,r))}function g(t,r){return x(t,a(t,r))}function l(t,r){return t?s("NS",t[1],r)+" "+s("EW",t[0],r):""}function h(t,r){return i(t,"{x}, {y}",r)}function M(r,e){if(e.canWrapX()){var n=(0,t.getWidth)(e.getExtent()),o=v(r,e,n);o&&(r[0]-=o*n)}return r}function v(r,e,n){var o=e.getExtent(),a=0;if(e.canWrapX()&&(r[0]<o[0]||r[0]>o[2])){var u=n||(0,t.getWidth)(o);a=Math.floor((r[0]-o[0])/u)}return a}
162},{"./extent.js":"QDir","./math.js":"B96G","./string.js":"AiCK"}],"oIh9":[function(require,module,exports) {
163"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=c(require("../Disposable.js")),t=require("../functions.js"),r=require("../util.js"),n=require("../transform.js"),o=require("../extent.js"),a=require("../style/IconImageCache.js"),i=require("../layer/Layer.js"),u=require("../coordinate.js");function c(e){return e&&e.__esModule?e:{default:e}}var s=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),p=function(e){function c(t){var r=e.call(this)||this;return r.map_=t,r}return s(c,e),c.prototype.dispatchRenderEvent=function(e,t){(0,r.abstract)()},c.prototype.calculateMatrices2D=function(e){var t=e.viewState,r=e.coordinateToPixelTransform,o=e.pixelToCoordinateTransform;(0,n.compose)(r,e.size[0]/2,e.size[1]/2,1/t.resolution,-1/t.resolution,-t.rotation,-t.center[0],-t.center[1]),(0,n.makeInverse)(o,r)},c.prototype.forEachFeatureAtCoordinate=function(e,t,r,n,a,c,s,p){var f,l=t.viewState;function d(e,t,r,n){return a.call(c,t,e?r:null,n)}var h=l.projection,y=(0,u.wrapX)(e.slice(),h),v=[[0,0]];if(h.canWrapX()&&n){var g=h.getExtent(),_=(0,o.getWidth)(g);v.push([-_,0],[_,0])}for(var j=t.layerStatesArray,m=j.length,x=[],q=[],E=0;E<v.length;E++)for(var b=m-1;b>=0;--b){var C=j[b],w=C.layer;if(w.hasRenderer()&&(0,i.inView)(C,l)&&s.call(p,w)){var S=w.getRenderer(),A=w.getSource();if(S&&A){var F=A.getWrapX()?y:e,O=d.bind(null,C.managed);q[0]=F[0]+v[E][0],q[1]=F[1]+v[E][1],f=S.forEachFeatureAtCoordinate(q,t,r,O,x)}if(f)return f}}if(0!==x.length){var T=1/x.length;return x.forEach(function(e,t){return e.distanceSq+=t*T}),x.sort(function(e,t){return e.distanceSq-t.distanceSq}),x.some(function(e){return f=e.callback(e.feature,e.layer,e.geometry)}),f}},c.prototype.forEachLayerAtPixel=function(e,t,n,o,a){return(0,r.abstract)()},c.prototype.hasFeatureAtCoordinate=function(e,r,n,o,a,i){return void 0!==this.forEachFeatureAtCoordinate(e,r,n,o,t.TRUE,this,a,i)},c.prototype.getMap=function(){return this.map_},c.prototype.renderFrame=function(e){(0,r.abstract)()},c.prototype.scheduleExpireIconCache=function(e){a.shared.canExpireCache()&&e.postRenderFunctions.push(f)},c}(e.default);function f(e,t){a.shared.expire()}var l=exports.default=p;
164},{"../Disposable.js":"DDda","../functions.js":"RgA2","../util.js":"KniQ","../transform.js":"P4eA","../extent.js":"QDir","../style/IconImageCache.js":"V0oB","../layer/Layer.js":"GCgv","../coordinate.js":"nGsj"}],"EB6P":[function(require,module,exports) {
165"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=e(require("../events/Event.js"));function e(t){return t&&t.__esModule?t:{default:t}}var r=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),n=function(t){function e(e,r,n,o){var u=t.call(this,e)||this;return u.inversePixelTransform=r,u.frameState=n,u.context=o,u}return r(e,t),e}(t.default),o=exports.default=n;
166},{"../events/Event.js":"fKNg"}],"HgMV":[function(require,module,exports) {
167"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getFontParameters=exports.CLASS_UNSUPPORTED=exports.CLASS_UNSELECTABLE=exports.CLASS_SELECTABLE=exports.CLASS_HIDDEN=exports.CLASS_CONTROL=exports.CLASS_COLLAPSED=void 0;var e=exports.CLASS_HIDDEN="ol-hidden",r=exports.CLASS_SELECTABLE="ol-selectable",t=exports.CLASS_UNSELECTABLE="ol-unselectable",s=exports.CLASS_UNSUPPORTED="ol-unsupported",l=exports.CLASS_CONTROL="ol-control",o=exports.CLASS_COLLAPSED="ol-collapsed",a=new RegExp(["^\\s*(?=(?
167:(?:[-a-z]+\\s*){0,2}(italic|oblique))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(small-caps))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(bold(?:er)?|lighter|[1-9]00 ))?)","(?:(?:normal|\\1|\\2|\\3)\\s*){0,3}((?:xx?-)?","(?:small|large)|medium|smaller|larger|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx]))","(?:\\s*\\/\\s*(normal|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx])?))","?\\s*([-,\\\"\\'\\sa-z]+?)\\s*$"].join(""),"i"),S=["style","variant","weight","size","lineHeight","family"],i=function(e){var r=e.match(a);if(!r)return null;for(var t={lineHeight:"normal",size:"1.2em",style:"normal",weight:"normal",variant:"normal"},s=0,l=S.length;s<l;++s){var o=r[s+1];void 0!==o&&(t[S[s]]=o)}return t.families=t.family.split(/,\s?/),t};exports.getFontParameters=i;
168},{}],"Xno5":[function(require,module,exports) {
169"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.createCanvasContext2D=t,exports.outerHeight=o,exports.outerWidth=n,exports.releaseCanvas=r,exports.removeChildren=s,exports.removeNode=i,exports.replaceChildren=d,exports.replaceNode=a;var e=require("./has.js");function t(t,r,n,o){var a;return a=n&&n.length?n.shift():e.WORKER_OFFSCREEN_CANVAS?new OffscreenCanvas(t||300,r||300):document.createElement("canvas"),t&&(a.width=t),r&&(a.height=r),a.getContext("2d",o)}function r(e){var t=e.canvas;t.width=1,t.height=1,e.clearRect(0,0,1,1)}function n(e){var t=e.offsetWidth,r=getComputedStyle(e);return t+=parseInt(r.marginLeft,10)+parseInt(r.marginRight,10)}function o(e){var t=e.offsetHeight,r=getComputedStyle(e);return t+=parseInt(r.marginTop,10)+parseInt(r.marginBottom,10)}function a(e,t){var r=t.parentNode;r&&r.replaceChild(e,t)}function i(e){return e&&e.parentNode?e.parentNode.removeChild(e):null}function s(e){for(;e.lastChild;)e.removeChild(e.lastChild)}function d(e,t){for(var r=e.childNodes,n=0;;++n){var o=r[n],a=t[n];if(!o&&!a)break;o!==a&&(o?a?e.insertBefore(a,o):(e.removeChild(o),--n):e.appendChild(a))}}
170},{"./has.js":"f3Nv"}],"iAG7":[function(require,module,exports) {
171"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.defaultTextBaseline=exports.defaultTextAlign=exports.defaultStrokeStyle=exports.defaultPadding=exports.defaultMiterLimit=exports.defaultLineWidth=exports.defaultLineJoin=exports.defaultLineDashOffset=exports.defaultLineDash=exports.defaultLineCap=exports.defaultFont=exports.defaultFillStyle=exports.checkedFonts=void 0,exports.drawImageOrLabel=I,exports.getTextDimensions=j,exports.labelCache=void 0,exports.measureAndCacheTextWidth=M,exports.measureTextHeight=void 0,exports.measureTextWidth=H,exports.registerFont=void 0,exports.rotateAtOffset=S,exports.textHeights=void 0;var e=o(require("../Object.js")),t=o(require("../events/Target.js")),r=require("../has.js"),n=require("../obj.js"),s=require("../dom.js"),a=require("../css.js");function o(e){return e&&e.__esModule?e:{default:e}}var i=exports.defaultFont="10px sans-serif",l=exports.defaultFillStyle="#000",u=exports.defaultLineCap="round",d=exports.defaultLineDash=[],f=exports.defaultLineDashOffset=0,p=exports.defaultLineJoin="round",x=exports.defaultMiterLimit=10,c=exports.defaultStrokeStyle="#000",h=exports.defaultTextAlign="center",g=exports.defaultTextBaseline="middle",v=exports.defaultPadding=[0,0,0,0],m=exports.defaultLineWidth=1,y=exports.checkedFonts=new e.default,b=exports.labelCache=new t.default;b.setSize=function(){console.warn("labelCache is deprecated.")};var L,T=null,w=exports.textHeights={},C=exports.registerFont=function(){var e,t,r=100,s="32px ",o=["monospace","serif"],i=o.length,l="wmytzilWMYTZIL@#/&?$%10";function u(e,r,n){for(var a=!0,u=0;u<i;++u){var d=o[u];if(t=H(e+" "+r+" "+s+d,l),n!=d){var f=H(e+" "+r+" "+s+n+","+d,l);a=a&&f!=t}}return!!a}function d(){for(var t=!0,s=y.getKeys(),a=0,o=s.length;a<o;++a){var i=s[a];y.get(i)<r&&(u.apply(this,i.split("\n"))?((0,n.clear)(w),T=null,L=void 0,y.set(i,r)):(y.set(i,y.get(i)+1,!0),t=!1))}t&&(clearInterval(e),e=void 0)}return function(t){var n=(0,a.getFontParameters)(t);if(n)for(var s=n.families,o=0,i=s.length;o<i;++o){var l=s[o],f=n.style+"\n"+n.weight+"\n"+l;void 0===y.get(f)&&(y.set(f,r,!0),u(n.style,n.weight,l)||(y.set(f,0,!0),void 0===e&&(e=setInterval(d,32))))}}}(),F=exports.measureTextHeight=function(){var e;return function(t){var n=w[t];if(null==n){if(r.WORKER_OFFSCREEN_CANVAS){var s=(0,a.getFontParameters)(t),o=A(t,"Žg");n=(isNaN(Number(s.lineHeight))?1.2:Number(s.lineHeight))*(o.actualBoundingBoxAscent+o.actualBoundingBoxDescent)}else e||((e=document.createElement("div")).innerHTML="M",e.style.minHeight="0",e.style.maxHeight="none",e.style.height="auto",e.style.padding="0",e.style.border="none",e.style.position="absolute",e.style.display="block",e.style.left="-99999px"),e.style.font=t,document.body.appendChild(e),n=e.offsetHeight,document.body.removeChild(e);w[t]=n}return n}}();function A(e,t){return T||(T=(0,s.createCanvasContext2D)(1,1)),e!=L&&(T.font=e,L=T.font),T.measureText(t)}
171function H(e,t){return A(e,t).width}function M(e,t,r){if(t in r)return r[t];var n=t.split("\n").reduce(function(t,r){return Math.max(t,H(e,r))},0);return r[t]=n,n}function j(e,t){for(var r=[],n=[],s=[],a=0,o=0,i=0,l=0,u=0,d=t.length;u<=d;u+=2){var f=t[u];if("\n"!==f&&u!==d){var p=t[u+1]||e.font,x=H(p,f);r.push(x),o+=x;var c=F(p);n.push(c),l=Math.max(l,c)}else a=Math.max(a,o),s.push(o),o=0,i+=l}return{width:a,height:i,widths:r,heights:n,lineWidths:s}}function S(e,t,r,n){0!==t&&(e.translate(r,n),e.rotate(t),e.translate(-r,-n))}function I(e,t,r,n,s,a,o,i,l,u,d){e.save(),1!==r&&(e.globalAlpha*=r),t&&e.setTransform.apply(e,t),n.contextInstructions?(e.translate(l,u),e.scale(d[0],d[1]),O(n,e)):d[0]<0||d[1]<0?(e.translate(l,u),e.scale(d[0],d[1]),e.drawImage(n,s,a,o,i,0,0,o,i)):e.drawImage(n,s,a,o,i,l,u,o*d[0],i*d[1]),e.restore()}function O(e,t){for(var r=e.contextInstructions,n=0,s=r.length;n<s;n+=2)Array.isArray(r[n+1])?t[r[n]].apply(t,r[n+1]):t[r[n]]=r[n+1]}
172},{"../Object.js":"PhPh","../events/Target.js":"CR4Y","../has.js":"f3Nv","../obj.js":"mH6q","../dom.js":"Xno5","../css.js":"HgMV"}],"MHsB":[function(require,module,exports) {
173"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=d(require("./Map.js")),t=d(require("../ObjectEventType.js")),r=d(require("../render/Event.js")),n=d(require("../render/EventType.js")),i=require("../css.js"),s=require("../render/canvas.js"),a=require("../layer/Layer.js"),l=require("../events.js"),o=require("../dom.js");function d(e){return e&&e.__esModule?e:{default:e}}var u=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),c=function(e){function d(r){var n=e.call(this,r)||this;n.fontChangeListenerKey_=(0,l.listen)(s.checkedFonts,t.default.PROPERTYCHANGE,r.redrawText.bind(r)),n.element_=document.createElement("div");var a=n.element_.style;a.position="absolute",a.width="100%",a.height="100%",a.zIndex="0",n.element_.className=i.CLASS_UNSELECTABLE+" ol-layers";var o=r.getViewport();return o.insertBefore(n.element_,o.firstChild||null),n.children_=[],n.renderedVisible_=!0,n}return u(d,e),d.prototype.dispatchRenderEvent=function(e,t){var n=this.getMap();if(n.hasListener(e)){var i=new r.default(e,void 0,t);n.dispatchEvent(i)}},d.prototype.disposeInternal=function(){(0,l.unlistenByKey)(this.fontChangeListenerKey_),this.element_.parentNode.removeChild(this.element_),e.prototype.disposeInternal.call(this)},d.prototype.renderFrame=function(e){if(e){this.calculateMatrices2D(e),this.dispatchRenderEvent(n.default.PRECOMPOSE,e);var t=e.layerStatesArray.sort(function(e,t){return e.zIndex-t.zIndex}),r=e.viewState;this.children_.length=0;for(var i=[],s=null,l=0,d=t.length;l<d;++l){var u=t[l];e.layerIndex=l;var c=u.layer,h=c.getSourceState();if(!(0,a.inView)(u,r)||"ready"!=h&&"undefined"!=h)c.unrender();else{var p=c.render(e,s);p&&(p!==s&&(this.children_.push(p),s=p),"getDeclutter"in c&&i.push(c))}}for(l=i.length-1;l>=0;--l)i[l].renderDeclutter(e);(0,o.replaceChildren)(this.element_,this.children_),this.dispatchRenderEvent(n.default.POSTCOMPOSE,e),this.renderedVisible_||(this.element_.style.display="",this.renderedVisible_=!0),this.scheduleExpireIconCache(e)}else this.renderedVisible_&&(this.element_.style.display="none",this.renderedVisible_=!1)},d.prototype.forEachLayerAtPixel=function(e,t,r,n,i){for(var s=t.viewState,l=t.layerStatesArray,o=l.length-1;o>=0;--o){var d=l[o],u=d.layer;if(u.hasRenderer()&&(0,a.inView)(d,s)&&i(u)){var c=u.getRenderer().getDataAtPixel(e,t,r);if(c){var h=n(u,c);if(h)return h}}}},d}(e.default),h=exports.default=c;
174},{"./Map.js":"oIh9","../ObjectEventType.js":"zehl","../render/Event.js":"EB6P","../render/EventType.js":"z39m","../css.js":"HgMV","../render/canvas.js":"iAG7","../layer/Layer.js":"GCgv","../events.js":"UqnM","../dom.js":"Xno5"}],"BTrx":[function(require,module,exports) {
175"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=exports.default={ADD:"add",REMOVE:"remove"};
176},{}],"FnDa":[function(require,module,exports) {
177"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.CollectionEvent=void 0;var t=o(require("./AssertionError.js")),e=o(require("./Object.js")),r=o(require("./CollectionEventType.js")),n=o(require("./events/Event.js"));function o(t){return t&&t.__esModule?t:{default:t}}var i=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),s={LENGTH:"length"},u=exports.CollectionEvent=function(t){function e(e,r,n){var o=t.call(this,e)||this;return o.element=r,o.index=n,o}return i(e,t),e}(n.default),a=function(e){function n(t,r){var n=e.call(this)||this;n.on,n.once,n.un;var o=r||{};if(n.unique_=!!o.unique,n.array_=t||[],n.unique_)for(var i=0,s=n.array_.length;i<s;++i)n.assertUnique_(n.array_[i],i);return n.updateLength_(),n}return i(n,e),n.prototype.clear=function(){for(;this.getLength()>0;)this.pop()},n.prototype.extend=function(t){for(var e=0,r=t.length;e<r;++e)this.push(t[e]);return this},n.prototype.forEach=function(t){for(var e=this.array_,r=0,n=e.length;r<n;++r)t(e[r],r,e)},n.prototype.getArray=function(){return this.array_},n.prototype.item=function(t){return this.array_[t]},n.prototype.getLength=function(){return this.get(s.LENGTH)},n.prototype.insertAt=function(t,e){this.unique_&&this.assertUnique_(e),this.array_.splice(t,0,e),this.updateLength_(),this.dispatchEvent(new u(r.default.ADD,e,t))},n.prototype.pop=function(){return this.removeAt(this.getLength()-1)},n.prototype.push=function(t){this.unique_&&this.assertUnique_(t);var e=this.getLength();return this.insertAt(e,t),this.getLength()},n.prototype.remove=function(t){for(var e=this.array_,r=0,n=e.length;r<n;++r)if(e[r]===t)return this.removeAt(r)},n.prototype.removeAt=function(t){var e=this.array_[t];return this.array_.splice(t,1),this.updateLength_(),this.dispatchEvent(new u(r.default.REMOVE,e,t)),e},n.prototype.setAt=function(t,e){var n=this.getLength();if(t<n){this.unique_&&this.assertUnique_(e,t);var o=this.array_[t];this.array_[t]=e,this.dispatchEvent(new u(r.default.REMOVE,o,t)),this.dispatchEvent(new u(r.default.ADD,e,t))}else{for(var i=n;i<t;++i)this.insertAt(i,void 0);this.insertAt(t,e)}},n.prototype.updateLength_=function(){this.set(s.LENGTH,this.array_.length)},n.prototype.assertUnique_=function(e,r){for(var n=0,o=this.array_.length;n<o;++n)if(this.array_[n]===e&&n!==r)throw new t.default(58)},n}(e.default),h=exports.default=a;
178},{"./AssertionError.js":"ygGQ","./Object.js":"PhPh","./CollectionEventType.js":"BTrx","./events/Event.js":"fKNg"}],"q0nK":[function(require,module,exports) {
179"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.GroupEvent=void 0;var e=h(require("./Base.js")),t=h(require("../Collection.js")),r=h(require("../CollectionEventType.js")),n=h(require("../events/Event.js")),s=h(require("../events/EventType.js")),i=h(require("../ObjectEventType.js")),a=require("../asserts.js"),o=require("../obj.js"),y=require("../extent.js"),l=require("../util.js"),u=require("../events.js");
179function h(e){return e&&e.__esModule?e:{default:e}}var d=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),c=exports.GroupEvent=function(e){function t(t,r){var n=e.call(this,t)||this;return n.layer=r,n}return d(t,e),t}(n.default),p={LAYERS:"layers"},v=function(e){function n(r){var n=this,s=r||{},i=(0,o.assign)({},s);delete i.layers;var y=s.layers;return(n=e.call(this,i)||this).on,n.once,n.un,n.layersListenerKeys_=[],n.listenerKeys_={},n.addChangeListener(p.LAYERS,n.handleLayersChanged_),y?Array.isArray(y)?y=new t.default(y.slice(),{unique:!0}):(0,a.assert)("function"==typeof y.getArray,43):y=new t.default(void 0,{unique:!0}),n.setLayers(y),n}return d(n,e),n.prototype.handleLayerChange_=function(){this.changed()},n.prototype.handleLayersChanged_=function(){this.layersListenerKeys_.forEach(u.unlistenByKey),this.layersListenerKeys_.length=0;var e=this.getLayers();for(var t in this.layersListenerKeys_.push((0,u.listen)(e,r.default.ADD,this.handleLayersAdd_,this),(0,u.listen)(e,r.default.REMOVE,this.handleLayersRemove_,this)),this.listenerKeys_)this.listenerKeys_[t].forEach(u.unlistenByKey);(0,o.clear)(this.listenerKeys_);for(var n=e.getArray(),s=0,i=n.length;s<i;s++){var a=n[s];this.registerLayerListeners_(a),this.dispatchEvent(new c("addlayer",a))}this.changed()},n.prototype.registerLayerListeners_=function(e){var t=[(0,u.listen)(e,i.default.PROPERTYCHANGE,this.handleLayerChange_,this),(0,u.listen)(e,s.default.CHANGE,this.handleLayerChange_,this)];e instanceof n&&t.push((0,u.listen)(e,"addlayer",this.handleLayerGroupAdd_,this),(0,u.listen)(e,"removelayer",this.handleLayerGroupRemove_,this)),this.listenerKeys_[(0,l.getUid)(e)]=t},n.prototype.handleLayerGroupAdd_=function(e){this.dispatchEvent(new c("addlayer",e.layer))},n.prototype.handleLayerGroupRemove_=function(e){this.dispatchEvent(new c("removelayer",e.layer))},n.prototype.handleLayersAdd_=function(e){var t=e.element;this.registerLayerListeners_(t),this.dispatchEvent(new c("addlayer",t)),this.changed()},n.prototype.handleLayersRemove_=function(e){var t=e.element,r=(0,l.getUid)(t);this.listenerKeys_[r].forEach(u.unlistenByKey),delete this.listenerKeys_[r],this.dispatchEvent(new c("removelayer",t)),this.changed()},n.prototype.getLayers=function(){return this.get(p.LAYERS)},n.prototype.setLayers=function(e){var t=this.getLayers();if(t)for(var r=t.getArray(),n=0,s=r.length;n<s;++n)this.dispatchEvent(new c("removelayer",r[n]));this.set(p.LAYERS,e)},n.prototype.getLayersArray=function(e){var t=void 0!==e?e:[];return this.getLayers().forEach(function(e){e.getLayersArray(t)}),t},n.prototype.getLayerStatesArray=function(e){var t=void 0!==e?e:[],r=t.length;this.getLayers().forEach(function(e){e.getLayerStatesArray(t)});var n=this.getLayerState(),s=n.zIndex;e||void 0!==n.zIndex||(s=0);for(var i=r,a=t.length;i<a;i++){var o=t[i];o.opacity*=n.opacity,o.visible=o.visible&&n.visible,o.maxResolution=Math.min(o.maxResolution,n.maxResolution),o.minResolution=Math.max(o.minResolution,n.minResolution),o.minZoom=Math.max(o.minZoom,n.minZoom),o.maxZoom=Math.min(o.maxZoom,n.maxZoom),void 0!==n.extent&&(void 0!==o.extent?o.extent=(0,y.getIntersection)(o.extent,n.extent):o.extent=n.extent),void 0===o.zIndex&&(o.zIndex=s)}return t},n.prototype.getSourceState=function(){return"ready"},n}(e.default),f=exports.default=v;
180},{"./Base.js":"T6DQ","../Collection.js":"FnDa","../CollectionEventType.js":"BTrx","../events/Event.js":"fKNg","../events/EventType.js":"C8cu","../ObjectEventType.js":"zehl","../asserts.js":"fLG6","../obj.js":"mH6q","../extent.js":"QDir","../util.js":"KniQ","../events.js":"UqnM"}],"vFcA":[function(require,module,exports) {
181"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=e(require("./events/Event.js"));function e(t){return t&&t.__esModule?t:{default:t}}var r=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function o(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),o=function(t){function e(e,r,o){var n=t.call(this,e)||this;return n.map=r,n.frameState=void 0!==o?o:null,n}return r(e,t),e}(t.default),n=exports.default=o;
182},{"./events/Event.js":"fKNg"}],"HMLS":[function(require,module,exports) {
183"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=e(require("./MapEvent.js"));function e(t){return t&&t.__esModule?t:{default:t}}var o=function(){var t=function(e,o){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),n=function(t){function e(e,o,n,i,r,a){var p=t.call(this,e,o,r)||this;return p.originalEvent=n,p.pixel_=null,p.coordinate_=null,p.dragging=void 0!==i&&i,p.activePointers=a,p}return o(e,t),Object.defineProperty(e.prototype,"pixel",{get:function(){return this.pixel_||(this.pixel_=this.map.getEventPixel(this.originalEvent)),this.pixel_},set:function(t){this.pixel_=t}
183,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"coordinate",{get:function(){return this.coordinate_||(this.coordinate_=this.map.getCoordinateFromPixel(this.pixel)),this.coordinate_},set:function(t){this.coordinate_=t},enumerable:!1,configurable:!0}),e.prototype.preventDefault=function(){t.prototype.preventDefault.call(this),"preventDefault"in this.originalEvent&&this.originalEvent.preventDefault()},e.prototype.stopPropagation=function(){t.prototype.stopPropagation.call(this),"stopPropagation"in this.originalEvent&&this.originalEvent.stopPropagation()},e}(t.default),i=exports.default=n;
184},{"./MapEvent.js":"vFcA"}],"YhDM":[function(require,module,exports) {
185"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=t(require("./events/EventType.js"));function t(e){return e&&e.__esModule?e:{default:e}}var r=exports.default={SINGLECLICK:"singleclick",CLICK:e.default.CLICK,DBLCLICK:e.default.DBLCLICK,POINTERDRAG:"pointerdrag",POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"};
186},{"./events/EventType.js":"C8cu"}],"TaSm":[function(require,module,exports) {
187"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=exports.default={POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"};
188},{}],"ohHk":[function(require,module,exports) {
189"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=h(require("./events/EventType.js")),t=h(require("./MapBrowserEvent.js")),i=h(require("./MapBrowserEventType.js")),n=h(require("./pointer/EventType.js")),o=h(require("./events/Target.js")),s=require("./has.js"),r=require("./functions.js"),a=require("./obj.js"),l=require("./events.js");function h(e){return e&&e.__esModule?e:{default:e}}var u=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),d=function(o){function h(t,i){var r=o.call(this,t)||this;r.map_=t,r.clickTimeoutId_,r.emulateClicks_=!1,r.dragging_=!1,r.dragListenerKeys_=[],r.moveTolerance_=void 0===i?1:i,r.down_=null;var a=r.map_.getViewport();return r.activePointers_=[],r.trackedTouches_={},r.element_=a,r.pointerdownListenerKey_=(0,l.listen)(a,n.default.POINTERDOWN,r.handlePointerDown_,r),r.originalPointerMoveEvent_,r.relayedListenerKey_=(0,l.listen)(a,n.default.POINTERMOVE,r.relayMoveEvent_,r),r.boundHandleTouchMove_=r.handleTouchMove_.bind(r),r.element_.addEventListener(e.default.TOUCHMOVE,r.boundHandleTouchMove_,!!s.PASSIVE_EVENT_LISTENERS&&{passive:!1}),r}return u(h,o),h.prototype.emulateClick_=function(e){var n=new t.default(i.default.CLICK,this.map_,e);this.dispatchEvent(n),void 0!==this.clickTimeoutId_?(clearTimeout(this.clickTimeoutId_),this.clickTimeoutId_=void 0,n=new t.default(i.default.DBLCLICK,this.map_,e),this.dispatchEvent(n)):this.clickTimeoutId_=setTimeout(function(){this.clickTimeoutId_=void 0;var n=new t.default(i.default.SINGLECLICK,this.map_,e);this.dispatchEvent(n)}.bind(this),250)},h.prototype.updateActivePointers_=function(e){var t=e,n=t.pointerId;if(t.type==i.default.POINTERUP||t.type==i.default.POINTERCANCEL){for(var o in delete this.trackedTouches_[n],this.trackedTouches_)if(this.trackedTouches_[o].target!==t.target){delete this.trackedTouches_[o];break}}else t.type!=i.default.POINTERDOWN&&t.type!=i.default.POINTERMOVE||(this.trackedTouches_[n]=t);this.activePointers_=(0,a.getValues)(this.trackedTouches_)},h.prototype.handlePointerUp_=function(e){this.updateActivePointers_(e);var n=new t.default(i.default.POINTERUP,this.map_,e,void 0,void 0,this.activePointers_);this.dispatchEvent(n),this.emulateClicks_&&!n.defaultPrevented&&!this.dragging_&&this.isMouseActionButton_(e)&&this.emulateClick_(this.down_),0===this.activePointers_.length&&(this.dragListenerKeys_.forEach(l.unlistenByKey),this.dragListenerKeys_.length=0,this.dragging_=!1,this.down_=null)},h.prototype.isMouseActionButton_=function(e){return 0===e.button},h.prototype.handlePointerDown_=function(e){this.emulateClicks_=0===this.activePointers_.length,this.updateActivePointers_(e);var n=new t.default(i.default.POINTERDOWN,this.map_,e,void 0,void 0,this.activePointers_);for(var o in this.dispatchEvent(n),this.down_={},e){var s=e[o];this.down_[o]="function"==typeof s?r.VOID:s}if(0===this.dragListenerKeys_.length){var a=this.map_.getOwnerDocument();this.dragListenerKeys_.push((0,l.listen)(a,i.default.POINTERMOVE,this.handlePointerMove_,this),(0,l.listen)(a,i.default.POINTERUP,this.handlePointerUp_,this),(0,l.listen)(this.element_,i.default.POINTERCANCEL,this.handlePointerUp_,this)),this.element_.getRootNode&&this.element_.getRootNode()!==a&&this.dragListenerKeys_.push((0,l.listen)(this.element_.getRootNode(),i.default.POINTERUP,this.handlePointerUp_,this))}},h.prototype.handlePointerMove_=function(e){if(this.isMoving_(e)){this.updateActivePointers_(e),this.dragging_=!0;var n=new t.default(i.default.POINTERDRAG,this.map_,e,this.dragging_,void 0,this.activePointers_);this.dispatchEvent(n)}},h.prototype.relayMoveEvent_=function(e){this.originalPointerMoveEvent_=e;var n=!(!this.down_||!this.isMoving_(e));this.dispatchEvent(new t.default(i.default.POINTERMOVE,this.map_,e,n))},h.prototype.handleTouchMove_=function(e){var t=this.originalPointerMoveEvent_;t&&!t.defaultPrevented||"boolean"==typeof e.cancelable&&!0!==e.cancelable||e.preventDefault()},h.prototype.isMoving_=function(e){return this.dragging_||Math.abs(e.clientX-this.down_.clientX)>this.moveTolerance_||Math.abs(e.clientY-this.down_.clientY)>this.moveTolerance_},h.prototype.disposeInternal=function(){this.relayedListenerKey_&&((0,l.unlistenByKey)(this.relayedListenerKey_),this.relayedListenerKey_=null),this.element_.removeEventListener(e.default.TOUCHMOVE,this.boundHandleTouchMove_),this.pointerdownListenerKey_&&((0,l.unlistenByKey)(this.pointerdownListenerKey_),this.pointerdownListenerKey_=null),this.dragListenerKeys_.forEach(l.unlistenByKey),this.dragListenerKeys_.length=0,this.element_=null,o.prototype.disposeInternal.call(this)},h}(o.default),_=exports.default=d;
190},{"./events/EventType.js":"C8cu","./MapBrowserEvent.js":"HMLS","./MapBrowserEventType.js":"YhDM","./pointer/EventType.js":"TaSm","./events/Target.js":"CR4Y","./has.js":"f3Nv","./functions.js":"RgA2","./obj.js":"mH6q","./events.js":"UqnM"}],"xLGm":[function(require,module,exports) {
191"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=exports.default={POSTRENDER:"postrender",MOVESTART:"movestart",MOVEEND:"moveend",LOADSTART:"loadstart",LOADEND:"loadend"};
192},{}],"zlNQ":[function(require,module,exports) {
193"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=exports.default={LAYERGROUP:"layergroup",SIZE:"size",TARGET:"target",VIEW:"view"};
194},{}],"RQLY":[function(require,module,exports) {
195"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.DROP=void 0;var t=require("../asserts.js"),e=require("../obj.js"),i=exports.DROP=1/0,n=function(){function n(t,e){this.priorityFunction_=t,this.keyFunction_=e,this.elements_=[],this.priorities_=[],this.queuedElements_={}}return n.prototype.clear=function(){this.elements_.length=0,this.priorities_.length=0,(0,e.clear)(this.queuedElements_)},n.prototype.dequeue=function(){var t=this.elements_,e=this.priorities_,i=t[0];1==t.length?(t.length=0,e.length=0):(t[0]=t.pop(),e[0]=e.pop(),this.siftUp_(0));var n=this.keyFunction_(i);return delete this.queuedElements_[n],i},n.prototype.enqueue=function(e){(0,t.assert)(!(this.keyFunction_(e)in this.queuedElements_),31);var n=this.priorityFunction_(e);
195return n!=i&&(this.elements_.push(e),this.priorities_.push(n),this.queuedElements_[this.keyFunction_(e)]=!0,this.siftDown_(0,this.elements_.length-1),!0)},n.prototype.getCount=function(){return this.elements_.length},n.prototype.getLeftChildIndex_=function(t){return 2*t+1},n.prototype.getRightChildIndex_=function(t){return 2*t+2},n.prototype.getParentIndex_=function(t){return t-1>>1},n.prototype.heapify_=function(){var t;for(t=(this.elements_.length>>1)-1;t>=0;t--)this.siftUp_(t)},n.prototype.isEmpty=function(){return 0===this.elements_.length},n.prototype.isKeyQueued=function(t){return t in this.queuedElements_},n.prototype.isQueued=function(t){return this.isKeyQueued(this.keyFunction_(t))},n.prototype.siftUp_=function(t){for(var e=this.elements_,i=this.priorities_,n=e.length,s=e[t],r=i[t],o=t;t<n>>1;){var u=this.getLeftChildIndex_(t),h=this.getRightChildIndex_(t),p=h<n&&i[h]<i[u]?h:u;e[t]=e[p],i[t]=i[p],t=p}e[t]=s,i[t]=r,this.siftDown_(o,t)},n.prototype.siftDown_=function(t,e){for(var i=this.elements_,n=this.priorities_,s=i[e],r=n[e];e>t;){var o=this.getParentIndex_(e);if(!(n[o]>r))break;i[e]=i[o],n[e]=n[o],e=o}i[e]=s,n[e]=r},n.prototype.reprioritize=function(){var t,e,n,s=this.priorityFunction_,r=this.elements_,o=this.priorities_,u=0,h=r.length;for(e=0;e<h;++e)(n=s(t=r[e]))==i?delete this.queuedElements_[this.keyFunction_(t)]:(o[u]=n,r[u++]=t);r.length=u,o.length=u,this.heapify_()},n}(),s=exports.default=n;
196},{"../asserts.js":"fLG6","../obj.js":"mH6q"}],"Xz9x":[function(require,module,exports) {
197"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=exports.default={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4};
198},{}],"tHOl":[function(require,module,exports) {
199"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0,exports.getTilePriority=s;var e=o(require("./events/EventType.js")),t=i(require("./structs/PriorityQueue.js")),n=o(require("./TileState.js"));function r(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(r=function(e){return e?n:t})(e)}function i(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=r(t);if(n&&n.has(e))return n.get(e);var i={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&{}.hasOwnProperty.call(e,a)){var u=o?Object.getOwnPropertyDescriptor(e,a):null;u&&(u.get||u.set)?Object.defineProperty(i,a,u):i[a]=e[a]}return i.default=e,n&&n.set(e,i),i}function o(e){return e&&e.__esModule?e:{default:e}}var a=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),u=function(t){function r(e,n){var r=t.call(this,function(t){return e.apply(null,t)},function(e){return e[0].getKey()})||this;return r.boundHandleTileChange_=r.handleTileChange.bind(r),r.tileChangeCallback_=n,r.tilesLoading_=0,r.tilesLoadingKeys_={},r}return a(r,t),r.prototype.enqueue=function(n){var r=t.prototype.enqueue.call(this,n);r&&n[0].addEventListener(e.default.CHANGE,this.boundHandleTileChange_);return r},r.prototype.getTilesLoading=function(){return this.tilesLoading_},r.prototype.handleTileChange=function(t){var r=t.target,i=r.getState();if(i===n.default.LOADED||i===n.default.ERROR||i===n.default.EMPTY){r.removeEventListener(e.default.CHANGE,this.boundHandleTileChange_);var o=r.getKey();o in this.tilesLoadingKeys_&&(delete this.tilesLoadingKeys_[o],--this.tilesLoading_),this.tileChangeCallback_()}},r.prototype.loadMoreTiles=function(e,t){for(var r,i,o=0;this.tilesLoading_<e&&o<t&&this.getCount()>0;)i=(r=this.dequeue()[0]).getKey(),r.getState()!==n.default.IDLE||i in this.tilesLoadingKeys_||(this.tilesLoadingKeys_[i]=!0,++this.tilesLoading_,++o,r.load())},r}(t.default),l=exports.default=u;function s(e,n,r,i,o){if(!(e&&r in e.wantedTiles))return t.DROP;if(!e.wantedTiles[r][n.getKey()])return t.DROP;var a=e.viewState.center,u=i[0]-a[0],l=i[1]-a[1];return 65536*Math.log(o)+Math.sqrt(u*u+l*l)/o}
200},{"./events/EventType.js":"C8cu","./structs/PriorityQueue.js":"RQLY","./TileState.js":"
200Xz9x"}],"yZx6":[function(require,module,exports) {
201"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.METERS_PER_UNIT=void 0,exports.fromCode=t;var E={RADIANS:"radians",DEGREES:"degrees",FEET:"ft",METERS:"m",PIXELS:"pixels",TILE_PIXELS:"tile-pixels",USFEET:"us-ft"},e={9001:E.METERS,9002:E.FEET,9003:E.USFEET,9101:E.RADIANS,9102:E.DEGREES};function t(E){return e[E]}var r=exports.METERS_PER_UNIT={};r[E.RADIANS]=6370997/(2*Math.PI),r[E.DEGREES]=2*Math.PI*6370997/360,r[E.FEET]=.3048,r[E.METERS]=1,r[E.USFEET]=1200/3937;var S=exports.default=E;
202},{}],"cuLW":[function(require,module,exports) {
203"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=exports.default={ANIMATING:0,INTERACTING:1};
204},{}],"cE7c":[function(require,module,exports) {
205"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=exports.default={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"};
206},{}],"mOEX":[function(require,module,exports) {
207"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.DEFAULT_TILE_SIZE=exports.DEFAULT_MAX_ZOOM=void 0;var e=exports.DEFAULT_MAX_ZOOM=42,_=exports.DEFAULT_TILE_SIZE=256;
208},{}],"WUar":[function(require,module,exports) {
209var global = arguments[3];
210var t=arguments[3];Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=require("./Units.js"),n=function(){function t(t){this.code_=t.code,this.units_=t.units,this.extent_=void 0!==t.extent?t.extent:null,this.worldExtent_=void 0!==t.worldExtent?t.worldExtent:null,this.axisOrientation_=void 0!==t.axisOrientation?t.axisOrientation:"enu",this.global_=void 0!==t.global&&t.global,this.canWrapX_=!(!this.global_||!this.extent_),this.getPointResolutionFunc_=t.getPointResolution,this.defaultTileGrid_=null,this.metersPerUnit_=t.metersPerUnit}return t.prototype.canWrapX=function(){return this.canWrapX_},t.prototype.getCode=function(){return this.code_},t.prototype.getExtent=function(){return this.extent_},t.prototype.getUnits=function(){return this.units_},t.prototype.getMetersPerUnit=function(){return this.metersPerUnit_||e.METERS_PER_UNIT[this.units_]},t.prototype.getWorldExtent=function(){return this.worldExtent_},t.prototype.getAxisOrientation=function(){return this.axisOrientation_},t.prototype.isGlobal=function(){return this.global_},t.prototype.setGlobal=function(t){this.global_=t,this.canWrapX_=!(!t||!this.extent_)},t.prototype.getDefaultTileGrid=function(){return this.defaultTileGrid_},t.prototype.setDefaultTileGrid=function(t){this.defaultTileGrid_=t},t.prototype.setExtent=function(t){this.extent_=t,this.canWrapX_=!(!this.global_||!t)},t.prototype.setWorldExtent=function(t){this.worldExtent_=t},t.prototype.setGetPointResolution=function(t){this.getPointResolutionFunc_=t},t.prototype.getPointResolutionFunc=function(){return this.getPointResolutionFunc_},t}(),i=exports.default=n;
211},{"./Units.js":"yZx6"}],"lohs":[function(require,module,exports) {
212"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.WORLD_EXTENT=exports.RADIUS=exports.PROJECTIONS=exports.MAX_SAFE_Y=exports.HALF_SIZE=exports.EXTENT=void 0,exports.fromEPSG4326=f,exports.toEPSG4326=E;var t=o(require("./Projection.js")),e=o(require("./Units.js")),r=require("../math.js");function o(t){return t&&t.__esModule?t:{default:t}}var n=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function o(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),s=exports.RADIUS=6378137,a=exports.HALF_SIZE=Math.PI*s,u=exports.EXTENT=[-a,-a,a,a],i=exports.WORLD_EXTENT=[-180,-85,180,85],p=exports.MAX_SAFE_Y=s*Math.log(Math.tan(Math.PI/2)),c=function(t){function o(o){return t.call(this,{code:o,units:e.default.METERS,extent:u,global:!0,worldExtent:i,getPointResolution:function(t,e){return t/(0,r.cosh)(e[1]/s)}})||this}return n(o,t),o}(t.default),l=exports.PROJECTIONS=[new c("EPSG:3857"),new c("EPSG:102100"),new c("EPSG:102113"),new c("EPSG:900913"),new c("http://www.opengis.net/def/crs/EPSG/0/3857"),new c("http://www.opengis.net/gml/srs/epsg.xml#3857")];function f(t,e,r){var o=t.length,n=r>1?r:2,u=e;void 0===u&&(u=n>2?t.slice():new Array(o));for(var i=0;i<o;i+=n){u[i]=a*t[i]/180;var c=s*Math.log(Math.tan(Math.PI*(+t[i+1]+90)/360));c>p?c=p:c<-p&&(c=-p),u[i+1]=c}return u}function E(t,e,r){var o=t.length,n=r>1?r:2,u=e;void 0===u&&(u=n>2?t.slice():new Array(o));for(var i=0;i<o;i+=n)u[i]=180*t[i]/a,u[i+1]=360*Math.atan(Math.exp(t[i+1]/s))/Math.PI-90;return u}
213},{"./Projection.js":"WUar","./Units.js":"yZx6","../math.js":"B96G"}],"ZniN":[function(require,module,exports) {
214"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.RADIUS=exports.PROJECTIONS=exports.METERS_PER_UNIT=exports.EXTENT=void 0;var t=n(require("./Projection.js")),e=n(require("./Units.js"));function n(t){return t&&t.__esModule?t:{default:t}}var r=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),o=exports.RADIUS=6378137,s=exports.EXTENT=[-180,-90,180,90],u=exports.METERS_PER_UNIT=Math.PI*o/180,i=function(t){function n(n,r){return t.call(this,{code:n,units:e.default.DEGREES,extent:s,axisOrientation:r,global:!0,metersPerUnit:u,worldExtent:s})||this}return r(n,t),n}(t.default),c=exports.PROJECTIONS=[new i("CRS:84"),new i("EPSG:4326","neu"),new i("urn:ogc:def:crs:OGC:1.3:CRS84"),new i("urn:ogc:def:crs:OGC:2:84"),new i("http://www.opengis.net/def/crs/OGC/1.3/CRS84"),new i("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new i("http://www.opengis.net/def/crs/EPSG/0/4326","neu")];
215},{"./Projection.js":"WUar","./Units.js":"yZx6"}],"tlE8":[function(require,module,exports) {
216"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.add=n,exports.clear=r,exports.get=t;var e={};function r(){e={}}function t(r){return e[r]||e[r.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/,"EPSG:$3")]||null}function n(r,t){e[r]=t}
217},{}],"uhlP":[function(require,module,exports) {
218"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.add=o,exports.clear=r,exports.get=i,exports.remove=n;var e=require("../obj.js"),t={};function r(){t={}}function o(e,r,o){var n=e.getCode(),i=r.getCode();n in t||(t[n]={}),t[n][i]=o}function n(r,o){var n=r.getCode(),i=o.getCode(),d=t[n][i];return delete t[n][i],(0,e.isEmpty)(t[n])&&delete t[n],d}function i(e,r){var o;return e in t&&r in t[e]&&(o=t[e][r]),o}
219},{"../obj.js":"mH6q"}],"q4ER":[function(require,module,exports) {
220"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.DEFAULT_RADIUS=void 0,exports.getArea=s,exports.getDistance=a,exports.getLength=o,exports.offset=i;var t=require("./math.js"),e=exports.DEFAULT_RADIUS=6371008.8;function a(a,r,o){var n=o||e,s=(0,t.toRadians)(a[1]),i=(0,t.toRadians)(r[1]),h=(i-s)/2,c=(0,t.toRadians)(r[0]-a[0])/2,g=Math.sin(h)*Math.sin(h)+Math.sin(c)*Math.sin(c)*Math.cos(s)*Math.cos(i);return 2*n*Math.atan2(Math.sqrt(g),Math.sqrt(1-g))}function r(t,e){for(var r=0,o=0,n=t.length;o<n-1;++o)r+=a(t[o],t[o+1],e);return r}function o(t,a){var n=a||{},s=n.radius||e,i=n.projection||"EPSG:3857",h=t.getType();"GeometryCollection"!==h&&(t=t.clone().transform(i,"EPSG:4326"));var c,g,M,l,u,f,d=0;switch(h){case"Point":case"MultiPoint":break;case"LineString":case"LinearRing":d=r(c=t.getCoordinates(),s);break;case"MultiLineString":case"Polygon":for(M=0,l=(c=t.getCoordinates()).length;M<l;++M)d+=r(c[M],s);break;case"MultiPolygon":for(M=0,l=(c=t.getCoordinates()).length;M<l;++M)for(u=0,f=(g=c[M]).length;u<f;++u)d+=r(g[u],s);break;case"GeometryCollection":var p=t.getGeometries();for(M=0,l=p.length;M<l;++M)d+=o(p[M],a);break;default:throw new Error("Unsupported geometry type: "+h)}return d}function n(e,a){for(var r=0,o=e.length,n=e[o-1][0],s=e[o-1][1],i=0;i<o;i++){var h=e[i][0],c=e[i][1];r+=(0,t.toRadians)(h-n)*(2+Math.sin((0,t.toRadians)(s))+Math.sin((0,t.toRadians)(c))),n=h,s=c}return r*a*a/2}function s(t,a){var r=a||{},o=r.radius||e,i=r.projection||"EPSG:3857",h=t.getType();"GeometryCollection"!==h&&(t=t.clone().transform(i,"EPSG:4326"));var c,g,M,l,u,f,d=0;switch(h){case"Point":case"MultiPoint":case"LineString":case"MultiLineString":case"LinearRing":break;case"Polygon":for(c=t.getCoordinates(),d=Math.abs(n(c[0],o)),M=1,l=c.length;M<l;++M)d-=Math.abs(n(c[M],o));break;case"MultiPolygon":for(M=0,l=(c=t.getCoordinates()).length;M<l;++M)for(g=c[M],d+=Math.abs(n(g[0],o)),u=1,f=g.length;u<f;++u)d-=Math.abs(n(g[u],o));break;case"GeometryCollection":var p=t.getGeometries();for(M=0,l=p.length;M<l;++M)d+=s(p[M],a);break;default:throw new Error("Unsupported geometry type: "+h)}return d}function i(a,r,o,n){var s=n||e,i=(0,t.toRadians)(a[1]),h=(0,t.toRadians)(a[0]),c=r/s,g=Math.asin(Math.sin(i)*Math.cos(c)+Math.cos(i)*Math.sin(c)*Math.cos(o)),M=h+Math.atan2(Math.sin(o)*Math.sin(c)*Math.cos(i),Math.cos(c)-Math.sin(i)*Math.sin(g));return[(0,t.toDegrees)(M),(0,t.toDegrees)(g)]}
221},{"./math.js":"B96G"}],"Diht":[function(require,module,exports) {
222"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"METERS_PER_UNIT",{enumerable:!0,get:function(){return r.METERS_PER_UNIT}}),Object.defineProperty(exports,"Projection",{enumerable:!0,get:function(){return e.default}}),exports.addCommon=H,exports.addCoordinateTransforms=h,exports.addEquivalentProjections=T,exports.addEquivalentTransforms=U,exports.addProjection=x,exports.addProjections=v,exports.clearAllProjections=R,exports.clearUserProjection=W,exports.cloneTransform=g,exports.createProjection=_,exp
222orts.createSafeCoordinateTransform=B,exports.createTransformFromCoordinateTransform=S,exports.disableCoordinateWarning=E,exports.equivalent=C,exports.fromLonLat=O,exports.fromUserCoordinate=L,exports.fromUserExtent=F,exports.fromUserResolution=z,exports.get=j,exports.getPointResolution=m,exports.getTransform=q,exports.getTransformFromProjections=M,exports.getUserProjection=D,exports.identityTransform=P,exports.setUserProjection=w,exports.toLonLat=y,exports.toUserCoordinate=J,exports.toUserExtent=A,exports.toUserResolution=X,exports.transform=G,exports.transformExtent=I,exports.transformWithProjections=N,exports.useGeographic=k;var e=p(require("./proj/Projection.js")),r=l(require("./proj/Units.js")),t=require("./proj/epsg3857.js"),n=require("./proj/epsg4326.js"),o=require("./proj/projections.js"),i=require("./proj/transforms.js"),s=require("./extent.js"),u=require("./math.js"),a=require("./coordinate.js"),f=require("./sphere.js");function c(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap,t=new WeakMap;return(c=function(e){return e?t:r})(e)}function l(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c(r);if(t&&t.has(e))return t.get(e);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.hasOwnProperty.call(e,i)){var s=o?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(n,i,s):n[i]=e[i]}return n.default=e,t&&t.set(e,n),n}function p(e){return e&&e.__esModule?e:{default:e}}var d=!0;function E(e){d=!(void 0===e||e)}function g(e,r,t){var n;if(void 0!==r){for(var o=0,i=e.length;o<i;++o)r[o]=e[o];n=r}else n=e.slice();return n}function P(e,r,t){if(void 0!==r&&e!==r){for(var n=0,o=e.length;n<o;++n)r[n]=e[n];e=r}return e}function x(e){(0,o.add)(e.getCode(),e),(0,i.add)(e,e,g)}function v(e){e.forEach(x)}function j(e){return"string"==typeof e?(0,o.get)(e):e||null}function m(e,t,n,o){var i,s=(e=j(e)).getPointResolutionFunc();if(s){if(i=s(t,n),o&&o!==e.getUnits())(a=e.getMetersPerUnit())&&(i=i*a/r.METERS_PER_UNIT[o])}else{var u=e.getUnits();if(u==r.default.DEGREES&&!o||o==r.default.DEGREES)i=t;else{var a,c=M(e,j("EPSG:4326"));if(c===P&&u!==r.default.DEGREES)i=t*e.getMetersPerUnit();else{var l=[n[0]-t/2,n[1],n[0]+t/2,n[1],n[0],n[1]-t/2,n[0],n[1]+t/2];l=c(l,l,2),i=((0,f.getDistance)(l.slice(0,2),l.slice(2,4))+(0,f.getDistance)(l.slice(4,6),l.slice(6,8)))/2}void 0!==(a=o?r.METERS_PER_UNIT[o]:e.getMetersPerUnit())&&(i/=a)}}return i}function T(e){v(e),e.forEach(function(r){e.forEach(function(e){r!==e&&(0,i.add)(r,e,g)})})}function U(e,r,t,n){e.forEach(function(e){r.forEach(function(r){(0,i.add)(e,r,t),(0,i.add)(r,e,n)})})}function R(){(0,o.clear)(),(0,i.clear)()}function _(e,r){return e?"string"==typeof e?j(e):e:j(r)}function S(e){return function(r,t,n){for(var o=r.length,i=void 0!==n?n:2,s=void 0!==t?t:new Array(o),u=0;u<o;u+=i)for(var a=e(r.slice(u,u+i)),f=a.length,c=0,l=i;c<l;++c)s[u+c]=c>=f?r[u+c]:a[c];return s}}function h(e,r,t,n){var o=j(e),s=j(r);(0,i.add)(o,s,S(t)),(0,i.add)(s,o,S(n))}function O(e,r){return E(),G(e,"EPSG:4326",void 0!==r?r:"EPSG:3857")}function y(e,r){var t=G(e,void 0!==r?r:"EPSG:3857","EPSG:4326"),n=t[0];return(n<-180||n>180)&&(t[0]=(0,u.modulo)(n+180,360)-180),t}function C(e,r){if(e===r)return!0;var t=e.getUnits()===r.getUnits();return e.getCode()===r.getCode()?t:M(e,r)===g&&t}function M(e,r){var t=e.getCode(),n=r.getCode(),o=(0,i.get)(t,n);return o||(o=P),o}function q(e,r){return M(j(e),j(r))}function G(e,r,t){return q(r,t)(e,void 0,e.length)}function I(e,r,t,n){var o=q(r,t);return(0,s.applyTransform)(e,o,void 0,n)}function N(e,r,t){return M(r,t)(e)}var b=null;function w(e){b=j(e)}function W(){b=null}function D(){return b}function k(){w("EPSG:4326")}function J(e,r){return b?G(e,r,b):e}function L(e,r){return b?G(e,b,r):(d&&!(0,a.equals)(e,[0,0])&&e[0]>=-180&&e[0]<=180&&e[1]>=-90&&e[1]<=90&&(d=!1,console.warn("Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.")),e)}function A(e,r){return b?I(e,r,b):e}function F(e,r){return b?I(e,b,r):e}function X(e,t){if(!b)return e;var n=j(t).getUnits(),o=b.getUnits();return n&&o?e*r.METERS_PER_UNIT[n]/r.METERS_PER_UNIT[o]:e}function z(e,t){if(!b)return e;var n=j(t).getUnits(),o=b.getUnits();return n&&o?e*r.METERS_PER_UNIT[o]/r.METERS_PER_UNIT[n]:e}function B(e,r,t){return function(n){var o,i;if(e.canWrapX()){var f=e.getExtent(),c=(0,s.getWidth)(f);n=n.slice(0),(i=(0,a.getWorldsAway)(n,e,c))&&(n[0]=n[0]-i*c),n[0]=(0,u.clamp)(n[0],f[0],f[2]),n[1]=(0,u.clamp)(n[1],f[1],f[3]),o=t(n)}else o=t(n);return i&&r.canWrapX()&&(o[0]+=i*(0,s.getWidth)(r.getExtent())),o}}function H(){T(t.PROJECTIONS),T(n.PROJECTIONS),U(n.PROJECTIONS,t.PROJECTIONS,t.fromEPSG4326,t.toEPSG4326)}H();
223},{"./proj/Projection.js":"WUar","./proj/Units.js":"yZx6","./proj/epsg3857.js":"lohs","./proj/epsg4326.js":"ZniN","./proj/projections.js":"tlE8","./proj/transforms.js":"uhlP","./extent.js":"QDir","./math.js":"B96G","./coordinate.js":"nGsj","./sphere.js":"q4ER"}],"Rc7z":[function(require,module,exports) {
224"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.createExtent=a,exports.none=e;var t=require("./math.js");function a(a,e,r){return function(n,o,u,h,i){if(n){if(!o&&!e)return n;var M=e?0:u[0]*o,c=e?0:u[1]*o,l=i?i[0]:0,x=i?i[1]:0,f=a[0]+M/2+l,m=a[2]-M/2+l,s=a[1]+c/2+x,p=a[3]-c/2+x;f>m&&(m=f=(m+f)/2),s>p&&(p=s=(p+s)/2);var v=(0,t.clamp)(n[0],f,m),g=(0,t.clamp)(n[1],s,p);if(h&&r&&o){var d=30*o;v+=-d*Math.log(1+Math.max(0,f-n[0])/d)+d*Math.log(1+Math.max(0,n[0]-m)/d),g+=-d*Math.log(1+Math.max(0,s-n[1])/d)+d*Math.log(1+Math.max(0,n[1]-p)/d)}return[v,g]}}}function e(t){return t}
225},{"./math.js":"B96G"}],"o7nl":[function(require,module,exports) {
226"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.createMinMaxResolution=h,exports.createSnapToPower=o,exports.createSnapToResolutions=i;var t=require("./math.js"),a=require("./extent.js"),r=require("./array.js");function e(t,r,e,n){var i=(0,a.getWidth)(r)/e[0],o=(0,a.getHeight)(r)/e[1];return n?Math.min(t,Math.max(i,o)):Math.min(t,Math.min(i,o))}function n(a,r,e){var n=Math.min(a,r);return n*=Math.log(1+50*Math.max(0,a/r-1))/50+1,e&&(n=Math.max(n,e),n/=Math.log(1+50*Math.max(0,e/a-1))/50+1),(0,t.clamp)(n,e/2,2*r)}function i(a,i,o,h){return function(u,M,l,c){if(void 0!==u){var m=a[0],f=a[a.length-1],v=o?e(m,o,l,h):m;if(c)return void 0===i||i?n(u,v,f):(0,t.clamp)(u,f,v);var s=Math.min(v,u),p=Math.floor((0,r.linearFindNearest)(a,s,M));return a[p]>v&&p<a.length-1?a[p+1]:a[p]}}}function o(a,r,i,o,h,u){return function(M,l,c,m){if(void 0!==M){var f=h?e(r,h,c,u):r,v=void 0!==i?i:0;if(m)return void 0===o||o?n(M,f,v):(0,t.clamp)(M,v,f);var s=Math.ceil(Math.log(r/f)/Math.log(a)-1e-9),p=-l*(.5-1e-9)+.5,d=Math.min(f,M),g=Math.floor(Math.log(r/d)/Math.log(a)+p),x=Math.max(s,g),j=r/Math.pow(a,x);return(0,t.clamp)(j,v,f)}}}function h(a,r,i,o,h){return function(u,M,l,c){if(void 0!==u){var m=o?e(a,o,l,h):a;return(void 0===i||i)&&c?n(u,m,r):(0,t.clamp)(u,r,m)}}}
227},{"./math.js":"B96G","./extent.js":"QDir","./array.js":"luEr"}],"EKd0":[function(require,module,exports) {
228"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.createSnapToN=t,exports.createSnapToZero=n,exports.disable=e,exports.none=o;var r=require("./math.js");function e(r){return void 0!==r?0:void 0}function o(r){return void 0!==r?r:void 0}function t(r){var e=2*Math.PI/r;
228return function(r,o){return o?r:void 0!==r?r=Math.floor(r/e+.5)*e:void 0}}function n(e){var o=e||(0,r.toRadians)(5);return function(r,e){return e?r:void 0!==r?Math.abs(r)<=o?0:r:void 0}}
229},{"./math.js":"B96G"}],"IeCz":[function(require,module,exports) {
230"use strict";function e(e){return Math.pow(e,3)}function t(t){return 1-e(1-t)}function n(e){return 3*e*e-2*e*e*e}function r(e){return e}function u(e){return e<.5?n(2*e):1-n(2*(e-.5))}Object.defineProperty(exports,"__esModule",{value:!0}),exports.easeIn=e,exports.easeOut=t,exports.inAndOut=n,exports.linear=r,exports.upAndDown=u;
231},{}],"Utvi":[function(require,module,exports) {
232"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=exports.default={XY:"XY",XYZ:"XYZ",XYM:"XYM",XYZM:"XYZM"};
233},{}],"LGwr":[function(require,module,exports) {
234"use strict";function r(r,t,e,n,o,a){for(var f=a||[],s=0,l=t;l<e;l+=n){var u=r[l],v=r[l+1];f[s++]=o[0]*u+o[2]*v+o[4],f[s++]=o[1]*u+o[3]*v+o[5]}return a&&f.length!=s&&(f.length=s),f}function t(r,t,e,n,o,a,f){for(var s=f||[],l=Math.cos(o),u=Math.sin(o),v=a[0],h=a[1],c=0,g=t;g<e;g+=n){var i=r[g]-v,p=r[g+1]-h;s[c++]=v+i*l-p*u,s[c++]=h+i*u+p*l;for(var x=g+2;x<g+n;++x)s[c++]=r[x]}return f&&s.length!=c&&(s.length=c),s}function e(r,t,e,n,o,a,f,s){for(var l=s||[],u=f[0],v=f[1],h=0,c=t;c<e;c+=n){var g=r[c]-u,i=r[c+1]-v;l[h++]=u+o*g,l[h++]=v+a*i;for(var p=c+2;p<c+n;++p)l[h++]=r[p]}return s&&l.length!=h&&(l.length=h),l}function n(r,t,e,n,o,a,f){for(var s=f||[],l=0,u=t;u<e;u+=n){s[l++]=r[u]+o,s[l++]=r[u+1]+a;for(var v=u+2;v<u+n;++v)s[l++]=r[v]}return f&&s.length!=l&&(s.length=l),s}Object.defineProperty(exports,"__esModule",{value:!0}),exports.rotate=t,exports.scale=e,exports.transform2D=r,exports.translate=n;
235},{}],"F8sI":[function(require,module,exports) {
236"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=u(require("../Object.js")),e=u(require("../proj/Units.js")),r=require("../util.js"),n=require("../transform.js"),o=require("../extent.js"),i=require("../proj.js"),s=require("../functions.js"),a=require("./flat/transform.js");function u(t){return t&&t.__esModule?t:{default:t}}var p=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),c=(0,n.create)(),f=function(t){function u(){var e=t.call(this)||this;return e.extent_=(0,o.createEmpty)(),e.extentRevision_=-1,e.simplifiedGeometryMaxMinSquaredTolerance=0,e.simplifiedGeometryRevision=0,e.simplifyTransformedInternal=(0,s.memoizeOne)(function(t,e,r){if(!r)return this.getSimplifiedGeometry(e);var n=this.clone();return n.applyTransform(r),n.getSimplifiedGeometry(e)}),e}return p(u,t),u.prototype.simplifyTransformed=function(t,e){return this.simplifyTransformedInternal(this.getRevision(),t,e)},u.prototype.clone=function(){return(0,r.abstract)()},u.prototype.closestPointXY=function(t,e,n,o){return(0,r.abstract)()},u.prototype.containsXY=function(t,e){var r=this.getClosestPoint([t,e]);return r[0]===t&&r[1]===e},u.prototype.getClosestPoint=function(t,e){var r=e||[NaN,NaN];return this.closestPointXY(t[0],t[1],r,1/0),r},u.prototype.intersectsCoordinate=function(t){return this.containsXY(t[0],t[1])},u.prototype.computeExtent=function(t){return(0,r.abstract)()},u.prototype.getExtent=function(t){if(this.extentRevision_!=this.getRevision()){var e=this.computeExtent(this.extent_);(isNaN(e[0])||isNaN(e[1]))&&(0,o.createOrUpdateEmpty)(e),this.extentRevision_=this.getRevision()}return(0,o.returnOrUpdate)(this.extent_,t)},u.prototype.rotate=function(t,e){(0,r.abstract)()},u.prototype.scale=function(t,e,n){(0,r.abstract)()},u.prototype.simplify=function(t){return this.getSimplifiedGeometry(t*t)},u.prototype.getSimplifiedGeometry=function(t){return(0,r.abstract)()},u.prototype.getType=function(){return(0,r.abstract)()},u.prototype.applyTransform=function(t){(0,r.abstract)()},u.prototype.intersectsExtent=function(t){return(0,r.abstract)()},u.prototype.translate=function(t,e){(0,r.abstract)()},u.prototype.transform=function(t,r){var s=(0,i.get)(t),u=s.getUnits()==e.default.TILE_PIXELS?function(t,e,u){var p=s.getExtent(),f=s.getWorldExtent(),l=(0,o.getHeight)(f)/(0,o.getHeight)(p);
236return(0,n.compose)(c,f[0],f[3],l,-l,0,0,0),(0,a.transform2D)(t,0,t.length,u,c,e),(0,i.getTransform)(s,r)(t,e,u)}:(0,i.getTransform)(s,r);return this.applyTransform(u),this},u}(t.default),l=exports.default=f;
237},{"../Object.js":"PhPh","../proj/Units.js":"yZx6","../util.js":"KniQ","../transform.js":"P4eA","../extent.js":"QDir","../proj.js":"Diht","../functions.js":"RgA2","./flat/transform.js":"LGwr"}],"pnrv":[function(require,module,exports) {
238"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0,exports.getStrideForLayout=l,exports.transformGeom2D=f;var t=n(require("./Geometry.js")),e=n(require("./GeometryLayout.js")),r=require("../util.js"),o=require("../extent.js"),i=require("./flat/transform.js");function n(t){return t&&t.__esModule?t:{default:t}}var a=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function o(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),s=function(t){function n(){var r=t.call(this)||this;return r.layout=e.default.XY,r.stride=2,r.flatCoordinates=null,r}return a(n,t),n.prototype.computeExtent=function(t){return(0,o.createOrUpdateFromFlatCoordinates)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)},n.prototype.getCoordinates=function(){return(0,r.abstract)()},n.prototype.getFirstCoordinate=function(){return this.flatCoordinates.slice(0,this.stride)},n.prototype.getFlatCoordinates=function(){return this.flatCoordinates},n.prototype.getLastCoordinate=function(){return this.flatCoordinates.slice(this.flatCoordinates.length-this.stride)},n.prototype.getLayout=function(){return this.layout},n.prototype.getSimplifiedGeometry=function(t){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),t<0||0!==this.simplifiedGeometryMaxMinSquaredTolerance&&t<=this.simplifiedGeometryMaxMinSquaredTolerance)return this;var e=this.getSimplifiedGeometryInternal(t);return e.getFlatCoordinates().length<this.flatCoordinates.length?e:(this.simplifiedGeometryMaxMinSquaredTolerance=t,this)},n.prototype.getSimplifiedGeometryInternal=function(t){return this},n.prototype.getStride=function(){return this.stride},n.prototype.setFlatCoordinates=function(t,e){this.stride=l(t),this.layout=t,this.flatCoordinates=e},n.prototype.setCoordinates=function(t,e){(0,r.abstract)()},n.prototype.setLayout=function(t,r,o){var i;if(t)i=l(t);else{for(var n=0;n<o;++n){if(0===r.length)return this.layout=e.default.XY,void(this.stride=2);r=r[0]}t=u(i=r.length)}this.layout=t,this.stride=i},n.prototype.applyTransform=function(t){this.flatCoordinates&&(t(this.flatCoordinates,this.flatCoordinates,this.stride),this.changed())},n.prototype.rotate=function(t,e){var r=this.getFlatCoordinates();if(r){var o=this.getStride();(0,i.rotate)(r,0,r.length,o,t,e,r),this.changed()}},n.prototype.scale=function(t,e,r){var n=e;void 0===n&&(n=t);var a=r;a||(a=(0,o.getCenter)(this.getExtent()));var s=this.getFlatCoordinates();if(s){var u=this.getStride();(0,i.scale)(s,0,s.length,u,t,n,a,s),this.changed()}},n.prototype.translate=function(t,e){var r=this.getFlatCoordinates();if(r){var o=this.getStride();(0,i.translate)(r,0,r.length,o,t,e,r),this.changed()}},n}(t.default);function u(t){var r;return 2==t?r=e.default.XY:3==t?r=e.default.XYZ:4==t&&(r=e.default.XYZM),r}function l(t){var r;return t==e.default.XY?r=2:t==e.default.XYZ||t==e.default.XYM?r=3:t==e.default.XYZM&&(r=4),r}function f(t,e,r){var o=t.getFlatCoordinates();if(o){var n=t.getStride();return(0,i.transform2D)(o,0,o.length,n,e,r)}return null}var d=exports.default=s;
239},{"./Geometry.js":"F8sI","./GeometryLayout.js":"Utvi","../util.js":"KniQ","../extent.js":"QDir","./flat/transform.js":"LGwr"}],"rMra":[function(require,module,exports) {
240"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.arrayMaxSquaredDelta=a,exports.assignClosestArrayPoint=o,exports.assignClosestMultiArrayPoint=i,exports.assignClosestPoint=s,exports.maxSquaredDelta=t,exports.multiArrayMaxSquaredDelta=n;var r=require("../../math.js");function e(e,t,a,n,s,o,i){var u,f=e[t],l=e[t+1],v=e[a]-f,h=e[a+1]-l;if(0===v&&0===h)u=t;else{var g=((s-f)*v+(o-l)*h)/(v*v+h*h);if(g>1)u=a;else{if(g>0){for(var c=0;c<n;++c)i[c]=(0,r.lerp)(e[t+c],e[a+c],g);return void(i.length=n)}u=t}}for(c=0;c<n;++c)i[c]=e[u+c];i.length=n}function t(e,t,a,n,s){var o=e[t],i=e[t+1];for(t+=n;t<a;t+=n){var u=e[t],f=e[t+1],l=(0,r.squaredDistance)(o,i,u,f);l>s&&(s=l),o=u,i=f}return s}function a(r,e,a,n,s){for(var o=0,i=a.length;o<i;++o){var u=a[o];s=t(r,e,u,n,s),e=u}return s}function n(r,e,t,n,s){for(var o=0,i=t.length;o<i;++o){var u=t[o];s=a(r,e,u,n,s),e=u[u.length-1]}return s}function s(t,a,n,s,o,i,u,f,l,v,h){if(a==n)return v;var g,c;if(0===o){if((c=(0,r.squaredDistance)(u,f,t[a],t[a+1]))<v){for(g=0;g<s;++g)l[g]=t[a+g];return l.length=s,c}return v}for(var N=h||[NaN,NaN],x=a+s;x<n;)if(e(t,x-s,x,s,u,f,N),(c=(0,r.squaredDistance)(u,f,N[0],N[1]))<v){for(v=c,g=0;g<s;++g)l[g]=N[g];l.length=s,x+=s}else x+=s*Math.max((Math.sqrt(c)-Math.sqrt(v))/o|0,1);if(i&&(e(t,n-s,a,s,u,f,N),(c=(0,r.squaredDistance)(u,f,N[0],N[1]))<v)){for(v=c,g=0;g<s;++g)l[g]=N[g];l.length=s}return v}function o(r,e,t,a,n,o,i,u,f,l,v){for(var h=v||[NaN,NaN],g=0,c=t.length;g<c;++g){var N=t[g];l=s(r,e,N,a,n,o,i,u,f,l,h),e=N}return l}function i(r,e,t,a,n,s,i,u,f,l,v){for(var h=v||[NaN,NaN],g=0,c=t.length;g<c;++g){var N=t[g];l=o(r,e,N,a,n,s,i,u,f,l,h),e=N[N.length-1]}return l}
241},{"../../math.js":"B96G"}],"FNhl":[function(require,module,exports) {
242"use strict";function e(e,r,t,n){for(var o=0,a=t.length;o<a;++o)e[r++]=t[o];return r}function r(e,r,t,n){for(var o=0,a=t.length;o<a;++o)for(var f=t[o],l=0;l<n;++l)e[r++]=f[l];return r}function t(e,t,n,o,a){for(var f=a||[],l=0,u=0,i=n.length;u<i;++u){var s=r(e,t,n[u],o);f[l++]=s,t=s}return f.length=l,f}function n(e,r,n,o,a){for(var f=a||[],l=0,u=0,i=n.length;u<i;++u){var s=t(e,r,n[u],o,f[l]);f[l++]=s,r=s[s.length-1]}return f.length=l,f}Object.defineProperty(exports,"__esModule",{value:!0}),exports.deflateCoordinate=e,exports.deflateCoordinates=r,exports.deflateCoordinatesArray=t,exports.deflateMultiCoordinatesArray=n;
243},{}],"IEpt":[function(require,module,exports) {
244"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.douglasPeucker=t,exports.douglasPeuckerArray=n,exports.douglasPeuckerMultiArray=u,exports.quantize=i,exports.quantizeArray=s,exports.quantizeMultiArray=f,exports.radialDistance=a,exports.simplifyLineString=e,exports.snap=o;var r=require("../../math.js");function e(r,e,n,u,o,i,s){var f=void 0!==s?s:[];
vendor: 4,070 bytes, lines 244-250
244return i||(n=a(r,e,n,u,o,f,0),r=f,e=0,u=2),f.length=t(r,e,n,u,o,f,0),f}function t(e,t,n,u,a,o,i){var s=(n-t)/u;if(s<3){for(;t<n;t+=u)o[i++]=e[t],o[i++]=e[t+1];return i}var f=new Array(s);f[0]=1,f[s-1]=1;for(var p=[t,n-u],v=0;p.length>0;){for(var l=p.pop(),c=p.pop(),h=0,g=e[c],d=e[c+1],x=e[l],y=e[l+1],q=c+u;q<l;q+=u){var A=e[q],M=e[q+1],P=(0,r.squaredSegmentDistance)(A,M,g,d,x,y);P>h&&(v=q,h=P)}h>a&&(f[(v-t)/u]=1,c+u<v&&p.push(c,v),v+u<l&&p.push(v,l))}for(q=0;q<s;++q)f[q]&&(o[i++]=e[t+q*u],o[i++]=e[t+q*u+1]);return i}function n(r,e,n,u,a,o,i,s){for(var f=0,p=n.length;f<p;++f){var v=n[f];i=t(r,e,v,u,a,o,i),s.push(i),e=v}return i}function u(r,e,t,u,a,o,i,s){for(var f=0,p=t.length;f<p;++f){var v=t[f],l=[];i=n(r,e,v,u,a,o,i,l),s.push(l),e=v[v.length-1]}return i}function a(e,t,n,u,a,o,i){if(n<=t+u){for(;t<n;t+=u)o[i++]=e[t],o[i++]=e[t+1];return i}var s=e[t],f=e[t+1];o[i++]=s,o[i++]=f;var p=s,v=f;for(t+=u;t<n;t+=u)p=e[t],v=e[t+1],(0,r.squaredDistance)(s,f,p,v)>a&&(o[i++]=p,o[i++]=v,s=p,f=v);return p==s&&v==f||(o[i++]=p,o[i++]=v),i}function o(r,e){return e*Math.round(r/e)}function i(r,e,t,n,u,a,i){if(e==t)return i;var s,f,p=o(r[e],u),v=o(r[e+1],u);e+=n,a[i++]=p,a[i++]=v;do{if(s=o(r[e],u),f=o(r[e+1],u),(e+=n)==t)return a[i++]=s,a[i++]=f,i}while(s==p&&f==v);for(;e<t;){var l=o(r[e],u),c=o(r[e+1],u);if(e+=n,l!=s||c!=f){var h=s-p,g=f-v,d=l-p,x=c-v;h*x==g*d&&(h<0&&d<h||h==d||h>0&&d>h)&&(g<0&&x<g||g==x||g>0&&x>g)?(s=l,f=c):(a[i++]=s,a[i++]=f,p=s,v=f,s=l,f=c)}}return a[i++]=s,a[i++]=f,i}function s(r,e,t,n,u,a,o,s){for(var f=0,p=t.length;f<p;++f){var v=t[f];o=i(r,e,v,n,u,a,o),s.push(o),e=v}return o}function f(r,e,t,n,u,a,o,i){for(var f=0,p=t.length;f<p;++f){var v=t[f],l=[];o=s(r,e,v,n,u,a,o,l),i.push(l),e=v[v.length-1]}return o}
245},{"../../math.js":"B96G"}],"znXl":[function(require,module,exports) {
246"use strict";function e(e,r,t,n,o){for(var i=void 0!==o?o:[],a=0,l=r;l<t;l+=n)i[a++]=e.slice(l,l+n);return i.length=a,i}function r(r,t,n,o,i){for(var a=void 0!==i?i:[],l=0,s=0,f=n.length;s<f;++s){var u=n[s];a[l++]=e(r,t,u,o,a[l]),t=u}return a.length=l,a}function t(e,t,n,o,i){for(var a=void 0!==i?i:[],l=0,s=0,f=n.length;s<f;++s){var u=n[s];a[l++]=r(e,t,u,o,a[l]),t=u[u.length-1]}return a.length=l,a}Object.defineProperty(exports,"__esModule",{value:!0}),exports.inflateCoordinates=e,exports.inflateCoordinatesArray=r,exports.inflateMultiCoordinatesArray=t;
247},{}],"EOSm":[function(require,module,exports) {
248"use strict";function r(r,e,n,t){for(var o=0,i=r[n-t],a=r[n-t+1];e<n;e+=t){var s=r[e],u=r[e+1];o+=a*s-i*u,i=s,a=u}return o/2}function e(e,n,t,o){for(var i=0,a=0,s=t.length;a<s;++a){var u=t[a];i+=r(e,n,u,o),n=u}return i}function n(r,n,t,o){for(var i=0,a=0,s=t.length;a<s;++a){var u=t[a];i+=e(r,n,u,o),n=u[u.length-1]}return i}Object.defineProperty(exports,"__esModule",{value:!0}),exports.linearRing=r,exports.linearRings=e,exports.linearRingss=n;
249},{}],"jRgU":[function(require,module,exports) {
250"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=l(require("./GeometryLayout.js")),e=l(require("./SimpleGeometry.js")),o=require("./flat/closest.js"),r=require("../extent.js"),i=require("./flat/deflate.js"),n=require("./flat/simplify.js"),s=require("./flat/inflate.js"),a=require("./flat/area.js");function l(t){return t&&t.__esModule?t:{default:t}}var u=function(){var t=function(e,o){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function r(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),f=function(e){function l(t,o){var r=e.call(this)||this;return r.maxDelta_=-1,r.maxDeltaRevision_=-1,void 0===o||Array.isArray(t[0])?r.setCoordinates(t,o):r.setFlatCoordinates(o,t),r}return u(l,e),l.prototype.clone=function(){return new l(this.flatCoordinates.slice(),this.layout)}
250,l.prototype.closestPointXY=function(t,e,i,n){return n<(0,r.closestSquaredDistanceXY)(this.getExtent(),t,e)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt((0,o.maxSquaredDelta)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),(0,o.assignClosestPoint)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!0,t,e,i,n))},l.prototype.getArea=function(){return(0,a.linearRing)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},l.prototype.getCoordinates=function(){return(0,s.inflateCoordinates)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},l.prototype.getSimplifiedGeometryInternal=function(e){var o=[];return o.length=(0,n.douglasPeucker)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e,o,0),new l(o,t.default.XY)},l.prototype.getType=function(){return"LinearRing"},l.prototype.intersectsExtent=function(t){return!1},l.prototype.setCoordinates=function(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=(0,i.deflateCoordinates)(this.flatCoordinates,0,t,this.stride),this.changed()},l}(e.default),d=exports.default=f;
251},{"./GeometryLayout.js":"Utvi","./SimpleGeometry.js":"pnrv","./flat/closest.js":"rMra","../extent.js":"QDir","./flat/deflate.js":"FNhl","./flat/simplify.js":"IEpt","./flat/inflate.js":"znXl","./flat/area.js":"EOSm"}],"gLcY":[function(require,module,exports) {
252"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=n(require("./SimpleGeometry.js")),e=require("../extent.js"),o=require("./flat/deflate.js"),r=require("../math.js");function n(t){return t&&t.__esModule?t:{default:t}}var i=function(){var t=function(e,o){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function r(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),s=function(t){function n(e,o){var r=t.call(this)||this;return r.setCoordinates(e,o),r}return i(n,t),n.prototype.clone=function(){var t=new n(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t},n.prototype.closestPointXY=function(t,e,o,n){var i=this.flatCoordinates,s=(0,r.squaredDistance)(t,e,i[0],i[1]);if(s<n){for(var a=this.stride,u=0;u<a;++u)o[u]=i[u];return o.length=a,s}return n},n.prototype.getCoordinates=function(){return this.flatCoordinates?this.flatCoordinates.slice():[]},n.prototype.computeExtent=function(t){return(0,e.createOrUpdateFromCoordinate)(this.flatCoordinates,t)},n.prototype.getType=function(){return"Point"},n.prototype.intersectsExtent=function(t){return(0,e.containsXY)(t,this.flatCoordinates[0],this.flatCoordinates[1])},n.prototype.setCoordinates=function(t,e){this.setLayout(e,t,0),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=(0,o.deflateCoordinate)(this.flatCoordinates,0,t,this.stride),this.changed()},n}(t.default),a=exports.default=s;
253},{"./SimpleGeometry.js":"pnrv","../extent.js":"QDir","./flat/deflate.js":"FNhl","../math.js":"B96G"}],"dzdN":[function(require,module,exports) {
254"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.linearRingContainsExtent=n,exports.linearRingContainsXY=e,exports.linearRingsContainsXY=t,exports.linearRingssContainsXY=i;var r=require("../../extent.js");function n(n,t,i,o,u){return!(0,r.forEachCorner)(u,function(r){return!e(n,t,i,o,r[0],r[1])})}function e(r,n,e,t,i,o){for(var u=0,a=r[e-t],s=r[e-t+1];n<e;n+=t){var f=r[n],l=r[n+1];s<=o?l>o&&(f-a)*(o-s)-(i-a)*(l-s)>0&&u++:l<=o&&(f-a)*(o-s)-(i-a)*(l-s)<0&&u--,a=f,s=l}return 0!==u}function t(r,n,t,i,o,u){if(0===t.length)return!1;if(!e(r,n,t[0],i,o,u))return!1;for(var a=1,s=t.length;a<s;++a)if(e(r,t[a-1],t[a],i,o,u))return!1;return!0}function i(r,n,e,i,o,u){if(0===e.length)return!1;for(var a=0,s=e.length;a<s;++a){var f=e[a];if(t(r,n,f,i,o,u))return!0;n=f[f.length-1]}return!1}
255},{"../../extent.js":"QDir"}],"UDvN":[function(require,module,exports) {
256"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getInteriorPointOfArray=t,exports.getInteriorPointsOfMultiArray=n;var r=require("./contains.js"),e=require("../../array.js");function t(t,n,a,o,i,s,u){for(var f,l,v,g,h,p,c,y=i[s+1],N=[],b=0,j=a.length;b<j;++b){var x=a[b];for(g=t[x-o],p=t[x-o+1],f=n;f<x;f+=o)h=t[f],c=t[f+1],(y<=p&&c<=y||p<=y&&y<=c)&&(v=(y-p)/(c-p)*(h-g)+g,N.push(v)),g=h,p=c}var M=NaN,O=-1/0;for(N.sort(e.numberSafeCompareFunction),g=N[0],f=1,l=N.length;f<l;++f){h=N[f];var P=Math.abs(h-g);P>O&&(v=(g+h)/2,(0,r.linearRingsContainsXY)(t,n,a,o,v,y)&&(M=v,O=P)),g=h}return isNaN(M)&&(M=i[s]),u?(u.push(M,y,O),u):[M,y,O]}function n(r,e,n,a,o){for(var i=[],s=0,u=n.length;s<u;++s){var f=n[s];i=t(r,e,f,a,o,2*s,i),e=f[f.length-1]}return i}
257},{"./contains.js":"dzdN","../../array.js":"luEr"}],"U8i0":[function(require,module,exports) {
258"use strict";function e(e,r,t,o,s){var c;for(r+=o;r<t;r+=o)if(c=s(e.slice(r-o,r),e.slice(r,r+o)))return c;return!1}Object.defineProperty(exports,"__esModule",{value:!0}
258),exports.forEach=e;
259},{}],"GZir":[function(require,module,exports) {
260"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.intersectsLineString=t,exports.intersectsLineStringArray=i,exports.intersectsLinearRing=s,exports.intersectsLinearRingArray=a,exports.intersectsLinearRingMultiArray=o;var n=require("../../extent.js"),e=require("./segments.js"),r=require("./contains.js");function t(r,t,i,s,a){var o=(0,n.extendFlatCoordinates)((0,n.createEmpty)(),r,t,i,s);return!!(0,n.intersects)(a,o)&&(!!(0,n.containsExtent)(a,o)||(o[0]>=a[0]&&o[2]<=a[2]||(o[1]>=a[1]&&o[3]<=a[3]||(0,e.forEach)(r,t,i,s,function(e,r){return(0,n.intersectsSegment)(a,e,r)}))))}function i(n,e,r,i,s){for(var a=0,o=r.length;a<o;++a){if(t(n,e,r[a],i,s))return!0;e=r[a]}return!1}function s(n,e,i,s,a){return!!t(n,e,i,s,a)||(!!(0,r.linearRingContainsXY)(n,e,i,s,a[0],a[1])||(!!(0,r.linearRingContainsXY)(n,e,i,s,a[0],a[3])||(!!(0,r.linearRingContainsXY)(n,e,i,s,a[2],a[1])||!!(0,r.linearRingContainsXY)(n,e,i,s,a[2],a[3]))))}function a(n,e,i,a,o){if(!s(n,e,i[
2600],a,o))return!1;if(1===i.length)return!0;for(var u=1,c=i.length;u<c;++u)if((0,r.linearRingContainsExtent)(n,i[u-1],i[u],a,o)&&!t(n,i[u-1],i[u],a,o))return!1;return!0}function o(n,e,r,t,i){for(var s=0,o=r.length;s<o;++s){var u=r[s];if(a(n,e,u,t,i))return!0;e=u[u.length-1]}return!1}
261},{"../../extent.js":"QDir","./segments.js":"U8i0","./contains.js":"dzdN"}],"ElTe":[function(require,module,exports) {
262"use strict";function e(e,r,o,t){for(;r<o-t;){for(var s=0;s<t;++s){var a=e[r+s];e[r+s]=e[o-t+s],e[o-t+s]=a}r+=t,o-=t}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.coordinates=e;
263},{}],"cJkE":[function(require,module,exports) {
264"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.inflateEnds=s,exports.linearRingIsClockwise=e,exports.linearRingsAreOriented=n,exports.linearRingssAreOriented=t,exports.orientLinearRings=i,exports.orientLinearRingsArray=o;var r=require("./reverse.js");function e(r,e,n,t){for(var i=0,o=r[n-t],s=r[n-t+1];e<n;e+=t){var u=r[e],a=r[e+1];i+=(u-o)*(a+s),o=u,s=a}return 0===i?void 0:i>0}function n(r,n,t,i,o){for(var s=void 0!==o&&o,u=0,a=t.length;u<a;++u){var f=t[u],l=e(r,n,f,i);if(0===u){if(s&&l||!s&&!l)return!1}else if(s&&!l||!s&&l)return!1;n=f}return!0}function t(r,e,t,i,o){for(var s=0,u=t.length;s<u;++s){var a=t[s];if(!n(r,e,a,i,o))return!1;a.length&&(e=a[a.length-1])}return!0}function i(n,t,i,o,s){for(var u=void 0!==s&&s,a=0,f=i.length;a<f;++a){var l=i[a],v=e(n,t,l,o);(0===a?u&&v||!u&&!v:u&&!v||!u&&v)&&(0,r.coordinates)(n,t,l,o),t=l}return t}function o(r,e,n,t,o){for(var s=0,u=n.length;s<u;++s)e=i(r,e,n[s],t,o);return e}function s(r,n){for(var t=[],i=0,o=0,s=0,u=n.length;s<u;++s){var a=n[s];if(e(r,i,a,2)){if(0===t.length)continue;t[t.length-1].push(n[o])}else t.push(n.slice(o,s+1));o=s+1,i=a}return t}
265},{"./reverse.js":"ElTe"}],"Nwwk":[function(require,module,exports) {
266"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.circular=x,exports.default=void 0,exports.fromCircle=j,exports.fromExtent=q,exports.makeRegular=P;var t=y(require("./GeometryLayout.js")),e=y(require("./LinearRing.js")),i=y(require("./Point.js")),r=y(require("./SimpleGeometry.js")),n=require("./flat/closest.js"),o=require("../extent.js"),s=require("./flat/deflate.js"),a=require("../array.js"),l=require("./flat/interiorpoint.js"),d=require("./flat/inflate.js"),h=require("./flat/intersectsextent.js"),u=require("./flat/orient.js"),f=require("./flat/area.js"),p=require("./flat/contains.js"),c=require("../math.js"),g=require("./flat/simplify.js"),_=require("../sphere.js");function y(t){return t&&t.__esModule?t:{default:t}}var C=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),v=function(r){function c(t,e,i){var n=r.call(this)||this;return n.ends_=[],n.flatInteriorPointRevision_=-1,n.flatInteriorPoint_=null,n.maxDelta_=-1,n.maxDeltaRevision_=-1,n.orientedRevision_=-1,n.orientedFlatCoordinates_=null,void 0!==e&&i?(n.setFlatCoordinates(e,t),n.ends_=i):n.setCoordinates(t,e),n}return C(c,r),c.prototype.appendLinearRing=function(t){this.flatCoordinates?(0,a.extend)(this.flatCoordinates,t.getFlatCoordinates()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()},c.prototype.clone=function(){var t=new c(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return t.applyProperties(this),t},c.prototype.closestPointXY=function(t,e,i,r){return r<(0,o.closestSquaredDistanceXY)(this.getExtent(),t,e)?r:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt((0,n.arrayMaxSquaredDelta)(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),(0,n.assignClosestArrayPoint)(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!0,t,e,i,r))},c.prototype.containsXY=function(t,e){return(0,p.linearRingsContainsXY)(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,e)},c.prototype.getArea=function(){return(0,f.linearRings)(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride)},c.prototype.getCoordinates=function(t){var e;return void 0!==t?(e=this.getOrientedFlatCoordinates().slice(),(0,u.orientLinearRings)(e,0,this.ends_,this.stride,t)):e=this.flatCoordinates,(0,d.inflateCoordinatesArray)(e,0,this.ends_,this.stride)},c.prototype.getEnds=function(){return this.ends_},c.prototype.getFlatInteriorPoint=function(){if(this.flatInteriorPointRevision_!=this.getRevision()){var t=(0,o.getCenter)(this.getExtent());this.flatInteriorPoint_=(0,l.getInteriorPointOfArray)(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,0),this.flatInteriorPointRevision_=this.getRevision()}return this.flatInteriorPoint_},c.prototype.getInteriorPoint=function(){return new i.default(this.getFlatInteriorPoint(),t.default.XYM)},c.prototype.getLinearRingCount=function(){return this.ends_.length},c.prototype.getLinearRing=function(t){return t<0||this.ends_.length<=t?null:new e.default(this.flatCoordinates.slice(0===t?0:this.ends_[t-1],this.ends_[t]),this.layout)},c.prototype.getLinearRings=function(){for(var t=this.layout,i=this.flatCoordinates,r=this.ends_,n=[],o=0,s=0,a=r.length;s<a;++s){var l=r[s],d=new e.default(i.slice(o,l),t);n.push(d),o=l}return n},c.prototype.getOrientedFlatCoordinates=function(){if(this.orientedRevision_!=this.getRevision()){var t=this.flatCoordinates;(0,u.linearRingsAreOriented)(t,0,this.ends_,this.stride)?this.orientedFlatCoordinates_=t:(this.orientedFlatCoordinates_=t.slice(),this.orientedFlatCoordinates_.length=(0,u.orientLinearRings)(this.orientedFlatCoordinates_,0,this.ends_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_},c.prototype.getSimplifiedGeometryInternal=function(e){var i=[],r=[];return i.length=(0,g.quantizeArray)(this.flatCoordinates,0,this.ends_,this.stride,Math.sqrt(e),i,0,r),new c(i,t.default.XY,r)},c.prototype.getType=function(){return"Polygon"},c.prototype.intersectsExtent=function(t){return(0,h.intersectsLinearRingArray)(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t)},c.prototype.setCoordinates=function(t,e){this.setLayout(e,t,2),this.flatCoordinates||(this.flatCoordinates=[]);var i=(0,s.deflateCoordinatesArray)(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=0===i.length?0:i[i.length-1],this.changed()},c}(r.default),R=exports.default=v;function x(e,i,r,n){for(var o=r||32,s=[],l=0;l<o;++l)(0,a.extend)(s,(0,_.offset)(e,i,2*Math.PI*l/o,n));return s.push(s[0],s[1]),new v(s,t.default.XY,[s.length])}function q(e){var i=e[0],r=e[1],n=e[2],o=e[3],s=[i,r,i,o,n,o,n,r,i,r];return new v(s,t.default.XY,[s.length])}function j(t,e,i){for(var r=e||32,n=t.getStride(),o=t.getLayout(),s=t.getCenter(),a=n*(r+1),l=new Array(a),d=0;d<a;d+=n){l[d]=0,l[d+1]=0;for(var h=2;h<n;h++)l[d+h]=s[h]}var u=[l.length],f=new v(l,o,u);return P(f,s,t.getRadius(),i),f}function P(t,e,i,r){for(var n=t.getFlatCoordinates(),o=t.getStride(),s=n.length/o-1,a=r||0,l=0;l<=s;++l){var d=l*o,h=a+2*(0,c.modulo)(l,s)*Math.PI/s;n[d]=e[0]+i*Math.cos(h),n[d+1]=e[1]+i*Math.sin(h)}t.changed()}
267},{"./GeometryLayout.js":"Utvi","./LinearRing.js":"jRgU","./Point.js":"gLcY","./SimpleGeometry.js":"pnrv","./flat/closest.js":"rMra","../extent.js":"QDir","./flat/deflate.js":"FNhl","../array.js":"luEr","./flat/interiorpoint.js":"UDvN","./flat/inflate.js":"znXl","./flat/intersectsextent.js":"GZir","./flat/orient.js":"cJkE","./flat/area.js":"EOSm","./flat/contains.js":"dzdN","../math.js":"B96G","./flat/simplify.js":"IEpt","../sphere.js":"q4ER"}],"hNqE":[function(require,module,exports) {
268"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.createCenterConstraint=I,exports.createResolutionConstraint=M,exports.createRotationConstraint=j,exports.default=void 0,exports.isNoopAnimation=A;var t=R(require("./Object.js")),e=R(require("./proj/Units.js")),o=R(require("./ViewHint.js")),n=R(require("./ViewProperty.js")),i=require("./tilegrid/common.js"),r=require("./proj.js"),s=require("./functions.js"),a=require("./coordinate.js"),u=require("./asserts.js"),h=require("./obj.js"),l=require("./centerconstraint.js"),c=require("./math.js"),g=require("./resolutionconstraint.js"),p=require("./rotationconstraint.js"),d=require("./easing.js"),_=require("./extent.js"),f=require("./array.js"),m=require("./geom/Polygon.js");function R(t){return t&&t.__esModule?t:{default:t}}var v=function(){var t=function(e,o){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),y=0,C=function(t){function e(e){var o=t.call(this)||this;o.on,o.once,o.un;var n=(0,h.assign)({},e);return o.hints_=[0,0],o.animations_=[],o.updateAnimationKey_,o.projection_=(0,r.createProjection)(n.projection,"EPSG:3857"),o.viewportSize_=[100,100],o.targetCenter_=null,o.targetResolution_,o.targetRotation_,o.nextCenter_=null,o.nextResolution_,o.nextRotation_,o.cancelAnchor_=void 0,n.projection&&(0,r.disableCoordinateWarning)(),n.center&&(n.center=(0,r.fromUserCoordinate)(n.center,o.projection_)),n.extent&&(n.extent=(0,r.fromUserExtent)(n.extent,o.projection_)),o.applyOptions_(n),o}return v(e,t),e.prototype.applyOptions_=function(t){var e=(0,h.assign)({},t);for(var o in n.default)delete e[o];this.setProperties(e,!0);var i=M(t);this.maxResolution_=i.maxResolution,this.minResolution_=i.minResolution,this.zoomFactor_=i.zoomFactor,this.resolutions_=t.resolutions,this.padding_=t.padding,this.minZoom_=i.minZoom;var r=I(t),s=i.constraint,a=j(t);this.constraints_={center:r,resolution:s,rotation:a},this.setRotation(void 0!==t.rotation?t.rotation:0),this.setCenterInternal(void 0!==t.center?t.center:null),void 0!==t.resolution?this.setResolution(t.resolution):void 0!==t.zoom&&this.setZoom(t.zoom)},Object.defineProperty(e.prototype,"padding",{get:function(){return this.padding_},set:function(t){var e=this.padding_;this.padding_=t;var o=this.getCenter();if(o){var n=t||[0,0,0,0];e=e||[0,0,0,0];var i=this.getResolution(),r=i/2*(n[3]-e[3]+e[1]-n[1]),s=i/2*(n[0]-e[0]+e[2]-n[2]);this.setCenterInternal([o[0]+r,o[1]-s])}}
vendor: 8,812 bytes, line 268
268,enumerable:!1,configurable:!0}),e.prototype.getUpdatedOptions_=function(t){var e=this.getProperties();return void 0!==e.resolution?e.resolution=this.getResolution():e.zoom=this.getZoom(),e.center=this.getCenterInternal(),e.rotation=this.getRotation(),(0,h.assign)({},e,t)},e.prototype.animate=function(t){this.isDef()&&!this.getAnimating()&&this.resolveConstraints(0);for(var e=new Array(arguments.length),o=0;o<e.length;++o){var n=arguments[o];n.center&&((n=(0,h.assign)({},n)).center=(0,r.fromUserCoordinate)(n.center,this.getProjection())),n.anchor&&((n=(0,h.assign)({},n)).anchor=(0,r.fromUserCoordinate)(n.anchor,this.getProjection())),e[o]=n}this.animateInternal.apply(this,e)},e.prototype.animateInternal=function(t){var e,n=arguments.length;n>1&&"function"==typeof arguments[n-1]&&(e=arguments[n-1],--n);for(var i=0;i<n&&!this.isDef();++i){var r=arguments[i];r.center&&this.setCenterInternal(r.center),void 0!==r.zoom?this.setZoom(r.zoom):r.resolution&&this.setResolution(r.resolution),void 0!==r.rotation&&this.setRotation(r.rotation)}if(i!==n){for(var s=Date.now(),a=this.targetCenter_.slice(),u=this.targetResolution_,h=this.targetRotation_,l=[];i<n;++i){var g=arguments[i],p={start:s,complete:!1,anchor:g.anchor,duration:void 0!==g.duration?g.duration:1e3,easing:g.easing||d.inAndOut,callback:e};if(g.center&&(p.sourceCenter=a,p.targetCenter=g.center.slice(),a=p.targetCenter),void 0!==g.zoom?(p.sourceResolution=u,p.targetResolution=this.getResolutionForZoom(g.zoom),u=p.targetResolution):g.resolution&&(p.sourceResolution=u,p.targetResolution=g.resolution,u=p.targetResolution),void 0!==g.rotation){p.sourceRotation=h;var _=(0,c.modulo)(g.rotation-h+Math.PI,2*Math.PI)-Math.PI;p.targetRotation=h+_,h=p.targetRotation}A(p)?p.complete=!0:s+=p.duration,l.push(p)}this.animations_.push(l),this.setHint(o.default.ANIMATING,1),this.updateAnimations_()}else e&&x(e,!0)},e.prototype.getAnimating=function(){return this.hints_[o.default.ANIMATING]>0},e.prototype.getInteracting=function(){return this.hints_[o.default.INTERACTING]>0},e.prototype.cancelAnimations=function(){var t;this.setHint(o.default.ANIMATING,-this.hints_[o.default.ANIMATING]);for(var e=0,n=this.animations_.length;e<n;++e){var i=this.animations_[e];if(i[0].callback&&x(i[0].callback,!1),!t)for(var r=0,s=i.length;r<s;++r){var a=i[r];if(!a.complete){t=a.anchor;break}}}this.animations_.length=0,this.cancelAnchor_=t,this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN},e.prototype.updateAnimations_=function(){if(void 0!==this.updateAnimationKey_&&(cancelAnimationFrame(this.updateAnimationKey_),this.updateAnimationKey_=void 0),this.getAnimating()){for(var t=Date.now(),e=!1,n=this.animations_.length-1;n>=0;--n){for(var i=this.animations_[n],r=!0,s=0,a=i.length;s<a;++s){var u=i[s];if(!u.complete){var h=t-u.start,l=u.duration>0?h/u.duration:1;l>=1?(u.complete=!0,l=1):r=!1;var g=u.easing(l);if(u.sourceCenter){var p=u.sourceCenter[0],d=u.sourceCenter[1],_=u.targetCenter[0],f=u.targetCenter[1];this.nextCenter_=u.targetCenter;var m=p+g*(_-p),R=d+g*(f-d);this.targetCenter_=[m,R]}if(u.sourceResolution&&u.targetResolution){var v=1===g?u.targetResolution:u.sourceResolution+g*(u.targetResolution-u.sourceResolution);if(u.anchor){var y=this.getViewportSize_(this.getRotation()),C=this.constraints_.resolution(v,0,y,!0);this.targetCenter_=this.calculateCenterZoom(C,u.anchor)}this.nextResolution_=u.targetResolution,this.targetResolution_=v,this.applyTargetState_(!0)}if(void 0!==u.sourceRotation&&void 0!==u.targetRotation){var I=1===g?(0,c.modulo)(u.targetRotation+Math.PI,2*Math.PI)-Math.PI:u.sourceRotation+g*(u.targetRotation-u.sourceRotation);if(u.anchor){var M=this.constraints_.rotation(I,!0);this.targetCenter_=this.calculateCenterRotate(M,u.anchor)}this.nextRotation_=u.targetRotation,this.targetRotation_=I}if(this.applyTargetState_(!0),e=!0,!u.complete)break}}if(r){this.animations_[n]=null,this.setHint(o.default.ANIMATING,-1),this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN;var j=i[0].callback;j&&x(j,!0)}}this.animations_=this.animations_.filter(Boolean),e&&void 0===this.updateAnimationKey_&&(this.updateAnimationKey_=requestAnimationFrame(this.updateAnimations_.bind(this)))}},e.prototype.calculateCenterRotate=function(t,e){var o,n=this.getCenterInternal();return void 0!==n&&(o=[n[0]-e[0],n[1]-e[1]],(0,a.rotate)(o,t-this.getRotation()),(0,a.add)(o,e)),o},e.prototype.calculateCenterZoom=function(t,e){var o,n=this.getCenterInternal(),i=this.getResolution();void 0!==n&&void 0!==i&&(o=[e[0]-t*(e[0]-n[0])/i,e[1]-t*(e[1]-n[1])/i]);return o},e.prototype.getViewportSize_=function(t){var e=this.viewportSize_;if(t){var o=e[0],n=e[1];return[Math.abs(o*Math.cos(t))+Math.abs(n*Math.sin(t)),Math.abs(o*Math.sin(t))+Math.abs(n*Math.cos(t))]}return e},e.prototype.setViewportSize=function(t){this.viewportSize_=Array.isArray(t)?t.slice():[100,100],this.getAnimating()||this.resolveConstraints(0)},e.prototype.getCenter=function(){var t=this.getCenterInternal();return t?(0,r.toUserCoordinate)(t,this.getProjection()):t},e.prototype.getCenterInternal=function(){return this.get(n.default.CENTER)},e.prototype.getConstraints=function(){return this.constraints_},e.prototype.getConstrainResolution=function(){return this.get("constrainResolution")},e.prototype.getHints=function(t){return void 0!==t?(t[0]=this.hints_[0],t[1]=this.hints_[1],t):this.hints_.slice()},e.prototype.calculateExtent=function(t){var e=this.calculateExtentInternal(t);return(0,r.toUserExtent)(e,this.getProjection())},e.prototype.calculateExtentInternal=function(t){var e=t||this.getViewportSizeMinusPadding_(),o=this.getCenterInternal();(0,u.assert)(o,1);var n=this.getResolution();(0,u.assert)(void 0!==n,2);var i=this.getRotation();return(0,u.assert)(void 0!==i,3),(0,_.getForViewAndSize)(o,n,i,e)},e.prototype.getMaxResolution=function(){return this.maxResolution_},e.prototype.getMinResolution=function(){return this.minResolution_},e.prototype.getMaxZoom=function(){return this.getZoomForResolution(this.minResolution_)},e.prototype.setMaxZoom=function(t){this.applyOptions_(this.getUpdatedOptions_({maxZoom:t}))},e.prototype.getMinZoom=function(){return this.getZoomForResolution(this.maxResolution_)},e.prototype.setMinZoom=function(t){this.applyOptions_(this.getUpdatedOptions_({minZoom:t}))},e.prototype.setConstrainResolution=function(t){this.applyOptions_(this.getUpdatedOptions_({constrainResolution:t}))},e.prototype.getProjection=function(){return this.projection_},e.prototype.getResolution=function(){return this.get(n.default.RESOLUTION)},e.prototype.getResolutions=function(){return this.resolutions_},e.prototype.getResolutionForExtent=function(t,e){return this.getResolutionForExtentInternal((0,r.fromUserExtent)(t,this.getProjection()),e)},e.prototype.getResolutionForExtentInternal=function(t,e){var o=e||this.getViewportSizeMinusPadding_(),n=(0,_.getWidth)(t)/o[0],i=(0,_.getHeight)(t)/o[1];return Math.max(n,i)},e.prototype.getResolutionForValueFunction=function(t){var e=t||2,o=this.getConstrainedResolution(this.maxResolution_),n=this.minResolution_,i=Math.log(o/n)/Math.log(e);return function(t){return o/Math.pow(e,t*i)}},e.prototype.getRotation=function(){return this.get(n.default.ROTATION)},e.prototype.getValueForResolutionFunction=function(t){var e=Math.log(t||2),o=this.getConstrainedResolution(this.maxResolution_),n=this.minResolution_,i=Math.log(o/n)/e;return function(t){return Math.log(o/t)/e/i}},e.prototype.getViewportSizeMinusPadding_=function(t){var e=this.getViewportSize_(t),o=this.padding_;return o&&(e=[e[0]-o[1]-o[3],e[1]-o[0]-o[2]]),e},e.prototype.getState=function(){var t=this.getProjection(),e=this.getResolution(),o=this.getRotation(),n=this.getCenterInternal(),i=this.padding_;if(i){var r=this.getViewportSizeMinusPadding_();n=E(n,this.getViewportSize_(),[r[0]/2+i[3],r[1]/2+i[0]],e,o)}return{center:n.slice(0),projection:void 0!==t?t:null,resolution:e,nextCenter:this.nextCenter_,nextResolution:this.nextResolution_,nextRotation:this.nextRotation_,rotation:o,zoom:this.getZoom()}},e.prototype.getZoom=function(){var t,e=this.getResolution();return void 0!==e&&(t=this.getZoomForResolution(e)),t},e.prototype.getZoomForResolution=function(t){var e,o,n=this.minZoom_||0;if(this.resolutions_){var i=(0,f.linearFindNearest)(this.resolutions_,t,1);n=i,e=this.resolutions_[i],o=i==this.resolutions_.length-1?2:e/this.resolutions_[i+1]}else e=this.maxResolution_,o=this.zoomFactor_;return n+Math.log(e/t)/Math.log(o)},e.prototype.getResolutionForZoom=function(t){if(this.resolutions_){if(this.resolutions_.length<=1)return 0;var e=(0,c.clamp)(Math.floor(t),0,this.resolutions_.length-2),o=this.resolutions_[e]/this.resolutions_[e+1];return this.resolutions_[e]/Math.pow(o,(0,c.clamp)(t-e,0,1))}return this.maxResolution_/Math.pow(this.zoomFactor_,t-this.minZoom_)}
268,e.prototype.fit=function(t,e){var o;if((0,u.assert)(Array.isArray(t)||"function"==typeof t.getSimplifiedGeometry,24),Array.isArray(t)){(0,u.assert)(!(0,_.isEmpty)(t),25);var n=(0,r.fromUserExtent)(t,this.getProjection());o=(0,m.fromExtent)(n)}else if("Circle"===t.getType()){n=(0,r.fromUserExtent)(t.getExtent(),this.getProjection());(o=(0,m.fromExtent)(n)).rotate(this.getRotation(),(0,_.getCenter)(n))}else{var i=(0,r.getUserProjection)();o=i?t.clone().transform(i,this.getProjection()):t}this.fitInternal(o,e)},e.prototype.rotatedExtentForGeometry=function(t){for(var e=this.getRotation(),o=Math.cos(e),n=Math.sin(-e),i=t.getFlatCoordinates(),r=t.getStride(),s=1/0,a=1/0,u=-1/0,h=-1/0,l=0,c=i.length;l<c;l+=r){var g=i[l]*o-i[l+1]*n,p=i[l]*n+i[l+1]*o;s=Math.min(s,g),a=Math.min(a,p),u=Math.max(u,g),h=Math.max(h,p)}return[s,a,u,h]},e.prototype.fitInternal=function(t,e){var o=e||{},n=o.size;n||(n=this.getViewportSizeMinusPadding_());var i,r=void 0!==o.padding?o.padding:[0,0,0,0],a=void 0!==o.nearest&&o.nearest;i=void 0!==o.minResolution?o.minResolution:void 0!==o.maxZoom?this.getResolutionForZoom(o.maxZoom):0;var u=this.rotatedExtentForGeometry(t),h=this.getResolutionForExtentInternal(u,[n[0]-r[1]-r[3],n[1]-r[0]-r[2]]);h=isNaN(h)?i:Math.max(h,i),h=this.getConstrainedResolution(h,a?0:1);var l=this.getRotation(),c=Math.sin(l),g=Math.cos(l),p=(0,_.getCenter)(u);p[0]+=(r[1]-r[3])/2*h,p[1]+=(r[0]-r[2])/2*h;var d=p[0]*g-p[1]*c,f=p[1]*g+p[0]*c,m=this.getConstrainedCenter([d,f],h),R=o.callback?o.callback:s.VOID;void 0!==o.duration?this.animateInternal({resolution:h,center:m,duration:o.duration,easing:o.easing},R):(this.targetResolution_=h,this.targetCenter_=m,this.applyTargetState_(!1,!0),x(R,!0))},e.prototype.centerOn=function(t,e,o){this.centerOnInternal((0,r.fromUserCoordinate)(t,this.getProjection()),e,o)},e.prototype.centerOnInternal=function(t,e,o){this.setCenterInternal(E(t,e,o,this.getResolution(),this.getRotation()))},e.prototype.calculateCenterShift=function(t,e,o,n){var i,r=this.padding_;if(r&&t){var s=this.getViewportSizeMinusPadding_(-o),a=E(t,n,[s[0]/2+r[3],s[1]/2+r[0]],e,o);i=[t[0]-a[0],t[1]-a[1]]}return i},e.prototype.isDef=function(){return!!this.getCenterInternal()&&void 0!==this.getResolution()},e.prototype.adjustCenter=function(t){var e=(0,r.toUserCoordinate)(this.targetCenter_,this.getProjection());this.setCenter([e[0]+t[0],e[1]+t[1]])},e.prototype.adjustCenterInternal=function(t){var e=this.targetCenter_;this.setCenterInternal([e[0]+t[0],e[1]+t[1]])},e.prototype.adjustResolution=function(t,e){var o=e&&(0,r.fromUserCoordinate)(e,this.getProjection());this.adjustResolutionInternal(t,o)},e.prototype.adjustResolutionInternal=function(t,e){var o=this.getAnimating()||this.getInteracting(),n=this.getViewportSize_(this.getRotation()),i=this.constraints_.resolution(this.targetResolution_*t,0,n,o);e&&(this.targetCenter_=this.calculateCenterZoom(i,e)),this.targetResolution_*=t,this.applyTargetState_()},e.prototype.adjustZoom=function(t,e){this.adjustResolution(Math.pow(this.zoomFactor_,-t),e)},e.prototype.adjustRotation=function(t,e){e&&(e=(0,r.fromUserCoordinate)(e,this.getProjection())),this.adjustRotationInternal(t,e)},e.prototype.adjustRotationInternal=function(t,e){var o=this.getAnimating()||this.getInteracting(),n=this.constraints_.rotation(this.targetRotation_+t,o);e&&(this.targetCenter_=this.calculateCenterRotate(n,e)),this.targetRotation_+=t,this.applyTargetState_()},e.prototype.setCenter=function(t){this.setCenterInternal(t?(0,r.fromUserCoordinate)(t,this.getProjection()):t)},e.prototype.setCenterInternal=function(t){this.targetCenter_=t,this.applyTargetState_()},e.prototype.setHint=function(t,e){return this.hints_[t]+=e,this.changed(),this.hints_[t]},e.prototype.setResolution=function(t){this.targetResolution_=t,this.applyTargetState_()},e.prototype.setRotation=function(t){this.targetRotation_=t,this.applyTargetState_()},e.prototype.setZoom=function(t){this.setResolution(this.getResolutionForZoom(t))},e.prototype.applyTargetState_=function(t,e){var o=this.getAnimating()||this.getInteracting()||e,i=this.constraints_.rotation(this.targetRotation_,o),r=this.getViewportSize_(i),s=this.constraints_.resolution(this.targetResolution_,0,r,o),u=this.constraints_.center(this.targetCenter_,s,r,o,this.calculateCenterShift(this.targetCenter_,s,i,r));this.get(n.default.ROTATION)!==i&&this.set(n.default.ROTATION,i),this.get(n.default.RESOLUTION)!==s&&(this.set(n.default.RESOLUTION,s),this.set("zoom",this.getZoom(),!0)),u&&this.get(n.default.CENTER)&&(0,a.equals)(this.get(n.default.CENTER),u)||this.set(n.default.CENTER,u),this.getAnimating()&&!t&&this.cancelAnimations(),this.cancelAnchor_=void 0}
268,e.prototype.resolveConstraints=function(t,e,o){var n=void 0!==t?t:200,i=e||0,r=this.constraints_.rotation(this.targetRotation_),s=this.getViewportSize_(r),u=this.constraints_.resolution(this.targetResolution_,i,s),h=this.constraints_.center(this.targetCenter_,u,s,!1,this.calculateCenterShift(this.targetCenter_,u,r,s));if(0===n&&!this.cancelAnchor_)return this.targetResolution_=u,this.targetRotation_=r,this.targetCenter_=h,void this.applyTargetState_();var l=o||(0===n?this.cancelAnchor_:void 0);this.cancelAnchor_=void 0,this.getResolution()===u&&this.getRotation()===r&&this.getCenterInternal()&&(0,a.equals)(this.getCenterInternal(),h)||(this.getAnimating()&&this.cancelAnimations(),this.animateInternal({rotation:r,center:h,resolution:u,duration:n,easing:d.easeOut,anchor:l}))},e.prototype.beginInteraction=function(){this.resolveConstraints(0),this.setHint(o.default.INTERACTING,1)},e.prototype.endInteraction=function(t,e,o){var n=o&&(0,r.fromUserCoordinate)(o,this.getProjection());this.endInteractionInternal(t,e,n)},e.prototype.endInteractionInternal=function(t,e,n){this.setHint(o.default.INTERACTING,-1),this.resolveConstraints(t,e,n)},e.prototype.getConstrainedCenter=function(t,e){var o=this.getViewportSize_(this.getRotation());return this.constraints_.center(t,e||this.getResolution(),o)},e.prototype.getConstrainedZoom=function(t,e){var o=this.getResolutionForZoom(t);return this.getZoomForResolution(this.getConstrainedResolution(o,e))},e.prototype.getConstrainedResolution=function(t,e){var o=e||0,n=this.getViewportSize_(this.getRotation());return this.constraints_.resolution(t,o,n)},e}(t.default);function x(t,e){setTimeout(function(){t(e)},0)}function I(t){if(void 0!==t.extent){var e=void 0===t.smoothExtentConstraint||t.smoothExtentConstraint;return(0,l.createExtent)(t.extent,t.constrainOnlyCenter,e)}var o=(0,r.createProjection)(t.projection,"EPSG:3857");if(!0!==t.multiWorld&&o.isGlobal()){var n=o.getExtent().slice();return n[0]=-1/0,n[2]=1/0,(0,l.createExtent)(n,!1,!1)}return l.none}function M(t){var o,n,s,a=void 0!==t.minZoom?t.minZoom:y,u=void 0!==t.maxZoom?t.maxZoom:28,h=void 0!==t.zoomFactor?t.zoomFactor:2,l=void 0!==t.multiWorld&&t.multiWorld,c=void 0===t.smoothResolutionConstraint||t.smoothResolutionConstraint,p=void 0!==t.showFullExtent&&t.showFullExtent,d=(0,r.createProjection)(t.projection,"EPSG:3857"),f=d.getExtent(),m=t.constrainOnlyCenter,R=t.extent;if(l||R||!d.isGlobal()||(m=!1,R=f),void 0!==t.resolutions){var v=t.resolutions;n=v[a],s=void 0!==v[u]?v[u]:v[v.length-1],o=t.constrainResolution?(0,g.createSnapToResolutions)(v,c,!m&&R,p):(0,g.createMinMaxResolution)(n,s,c,!m&&R,p)}else{var C=(f?Math.max((0,_.getWidth)(f),(0,_.getHeight)(f)):360*r.METERS_PER_UNIT[e.default.DEGREES]/d.getMetersPerUnit())/i.DEFAULT_TILE_SIZE/Math.pow(2,y),x=C/Math.pow(2,28-y);void 0!==(n=t.maxResolution)?a=0:n=C/Math.pow(h,a),void 0===(s=t.minResolution)&&(s=void 0!==t.maxZoom?void 0!==t.maxResolution?n/Math.pow(h,u):C/Math.pow(h,u):x),u=a+Math.floor(Math.log(n/s)/Math.log(h)),s=n/Math.pow(h,u-a),o=t.constrainResolution?(0,g.createSnapToPower)(h,n,s,c,!m&&R,p):(0,g.createMinMaxResolution)(n,s,c,!m&&R,p)}return{constraint:o,maxResolution:n,minResolution:s,minZoom:a,zoomFactor:h}}function j(t){if(void 0===t.enableRotation||t.enableRotation){var e=t.constrainRotation;return void 0===e||!0===e?(0,p.createSnapToZero)():!1===e?p.none:"number"==typeof e?(0,p.createSnapToN)(e):p.none}return p.disable}function A(t){return!(t.sourceCenter&&t.targetCenter&&!(0,a.equals)(t.sourceCenter,t.targetCenter))&&(t.sourceResolution===t.targetResolution&&t.sourceRotation===t.targetRotation)}function E(t,e,o,n,i){var r=Math.cos(-i),s=Math.sin(-i),a=t[0]*r-t[1]*s,u=t[1]*r+t[0]*s;return[(a+=(e[0]/2-o[0])*n)*r-(u+=(o[1]-e[1]/2)*n)*(s=-s),u*r+a*s]}var S=exports.default=C;
269},{"./Object.js":"PhPh","./proj/Units.js":"yZx6","./ViewHint.js":"cuLW","./ViewProperty.js":"cE7c","./tilegrid/common.js":"mOEX","./proj.js":"Diht","./functions.js":"RgA2","./coordinate.js":"nGsj","./asserts.js":"fLG6","./obj.js":"mH6q","./centerconstraint.js":"Rc7z","./math.js":"B96G","./resolutionconstraint.js":"o7nl","./rotationconstraint.js":"EKd0","./easing.js":"IeCz","./extent.js":"QDir","./array.js":"luEr","./geom/Polygon.js":"Nwwk"}],"TAHd":[function(require,module,exports) {
270"use strict";function r(r,e,t){return void 0===t&&(t=[0,0]),t[0]=r[0]+2*e,t[1]=r[1]+2*e,t}function e(r){return r[0]>0&&r[1]>0}function t(r,e,t){return void 0===t&&(t=[0,0]),t[0]=r[0]*e+.5|0,t[1]=r[1]*e+.5|0,t}function o(r,e){return Array.isArray(r)?r:(void 0===e?e=[r,r]:(e[0]=r,e[1]=r),e)}Object.defineProperty(exports,"__esModule",{value:!0}
270),exports.buffer=r,exports.hasArea=e,exports.scale=t,exports.toSize=o;
271},{}],"kRwz":[function(require,module,exports) {
272"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=I(require("./Object.js")),t=I(require("./Collection.js")),r=I(require("./CollectionEventType.js")),n=I(require("./events/EventType.js")),i=I(require("./layer/Layer.js")),o=A(require("./layer/Group.js")),a=I(require("./MapBrowserEvent.js")),s=I(require("./MapBrowserEventHandler.js")),l=I(require("./MapBrowserEventType.js")),d=I(require("./MapEvent.js")),u=I(require("./MapEventType.js")),h=I(require("./MapProperty.js")),p=I(require("./ObjectEventType.js")),y=I(require("./pointer/EventType.js")),f=I(require("./render/EventType.js")),v=A(require("./TileQueue.js")),c=I(require("./View.js")),_=I(require("./ViewHint.js")),g=require("./has.js"),E=require("./functions.js"),m=require("./transform.js"),w=require("./asserts.js"),T=require("./extent.js"),C=require("./proj.js"),L=require("./util.js"),R=require("./size.js"),x=require("./events.js"),S=require("./dom.js");function P(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(P=function(e){return e?r:t})(e)}function A(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=P(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n.default=e,r&&r.set(e,n),n}function I(e){return e&&e.__esModule?e:{default:e}}var O=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();function b(e){e instanceof i.default?e.setMapInternal(null):e instanceof o.default&&e.getLayers().forEach(b)}function F(e,t){if(e instanceof i.default)e.setMapInternal(t);else if(e instanceof o.default)for(var r=e.getLayers().getArray(),n=0,a=r.length;n<a;++n)F(r[n],t)}var N=function(e){function i(n){var i=e.call(this)||this;i.on,i.once,i.un;var o=j(n);i.renderComplete_,i.loaded_=!0,i.boundHandleBrowserEvent_=i.handleBrowserEvent.bind(i),i.maxTilesLoading_=void 0!==n.maxTilesLoading?n.maxTilesLoading:16,i.pixelRatio_=void 0!==n.pixelRatio?n.pixelRatio:g.DEVICE_PIXEL_RATIO,i.postRenderTimeoutHandle_,i.animationDelayKey_,i.animationDelay_=function(){this.animationDelayKey_=void 0,this.renderFrame_(Date.now())}.bind(i),i.coordinateToPixelTransform_=(0,m.create)(),i.pixelToCoordinateTransform_=(0,m.create)(),i.frameIndex_=0,i.frameState_=null,i.previousExtent_=null,i.viewPropertyListenerKey_=null,i.viewChangeListenerKey_=null,i.layerGroupPropertyListenerKeys_=null,i.viewport_=document.createElement("div"),i.viewport_.className="ol-viewport"+("ontouchstart"in window?" ol-touch":""),i.viewport_.style.position="relative",i.viewport_.style.overflow="hidden",i.viewport_.style.width="100%",i.viewport_.style.height="100%",i.overlayContainer_=document.createElement("div"),i.overlayContainer_.style.position="absolute",i.overlayContainer_.style.zIndex="0",i.overlayContainer_.style.width="100%",i.overlayContainer_.style.height="100%",i.overlayContainer_.style.pointerEvents="none",i.overlayContainer_.className="ol-overlaycontainer",i.viewport_.appendChild(i.overlayContainer_),i.overlayContainerStopEvent_=document.createElement("div"),i.overlayContainerStopEvent_.style.position="absolute",i.overlayContainerStopEvent_.style.zIndex="0",i.overlayContainerStopEvent_.style.width="100%",i.overlayContainerStopEvent_.style.height="100%",i.overlayContainerStopEvent_.style.pointerEvents="none",i.overlayContainerStopEvent_.className="ol-overlaycontainer-stopevent",i.viewport_.appendChild(i.overlayContainerStopEvent_),i.mapBrowserEventHandler_=null,i.moveTolerance_=n.moveTolerance,i.keyboardEventTarget_=o.keyboardEventTarget,i.targetChangeHandlerKeys_=null,i.controls=o.controls||new t.default,i.interactions=o.interactions||new t.default,i.overlays_=o.overlays,i.overlayIdIndex_
272={},i.renderer_=null,i.postRenderFunctions_=[],i.tileQueue_=new v.default(i.getTilePriority.bind(i),i.handleTileChange_.bind(i)),i.addChangeListener(h.default.LAYERGROUP,i.handleLayerGroupChanged_),i.addChangeListener(h.default.VIEW,i.handleViewChanged_),i.addChangeListener(h.default.SIZE,i.handleSizeChanged_),i.addChangeListener(h.default.TARGET,i.handleTargetChanged_),i.setProperties(o.values);var a=i;return!n.view||n.view instanceof c.default||n.view.then(function(e){a.setView(new c.default(e))}),i.controls.addEventListener(r.default.ADD,function(e){e.element.setMap(this)}.bind(i)),i.controls.addEventListener(r.default.REMOVE,function(e){e.element.setMap(null)}.bind(i)),i.interactions.addEventListener(r.default.ADD,function(e){e.element.setMap(this)}.bind(i)),i.interactions.addEventListener(r.default.REMOVE,function(e){e.element.setMap(null)}.bind(i)),i.overlays_.addEventListener(r.default.ADD,function(e){this.addOverlayInternal_(e.element)}.bind(i)),i.overlays_.addEventListener(r.default.REMOVE,function(e){var t=e.element.getId();void 0!==t&&delete this.overlayIdIndex_[t.toString()],e.element.setMap(null)}.bind(i)),i.controls.forEach(function(e){e.setMap(this)}.bind(i)),i.interactions.forEach(function(e){e.setMap(this)}.bind(i)),i.overlays_.forEach(i.addOverlayInternal_.bind(i)),i}return O(i,e),i.prototype.createRenderer=function(){throw new Error("Use a map type that has a createRenderer method")},i.prototype.addControl=function(e){this.getControls().push(e)},i.prototype.addInteraction=function(e){this.getInteractions().push(e)},i.prototype.addLayer=function(e){this.getLayerGroup().getLayers().push(e)},i.prototype.handleLayerAdd_=function(e){F(e.layer,this)},i.prototype.addOverlay=function(e){this.getOverlays().push(e)},i.prototype.addOverlayInternal_=function(e){var t=e.getId();void 0!==t&&(this.overlayIdIndex_[t.toString()]=e),e.setMap(this)},i.prototype.disposeInternal=function(){this.controls.clear(),this.interactions.clear(),this.overlays_.clear(),this.setTarget(null),e.prototype.disposeInternal.call(this)},i.prototype.forEachFeatureAtPixel=function(e,t,r){if(this.frameState_&&this.renderer_){var n=this.getCoordinateFromPixelInternal(e),i=void 0!==(r=void 0!==r?r:{}).hitTolerance?r.hitTolerance:0,o=void 0!==r.layerFilter?r.layerFilter:E.TRUE,a=!1!==r.checkWrapped;return this.renderer_.forEachFeatureAtCoordinate(n,this.frameState_,i,a,t,null,o,null)}},i.prototype.getFeaturesAtPixel=function(e,t){var r=[];return this.forEachFeatureAtPixel(e,function(e){r.push(e)},t),r},i.prototype.getAllLayers=function(){var e=[];return function t(r){r.forEach(function(r){r instanceof o.default?t(r.getLayers()):e.push(r)})}(this.getLayers()),e},i.prototype.forEachLayerAtPixel=function(e,t,r){if(this.frameState_&&this.renderer_){var n=r||{},i=void 0!==n.hitTolerance?n.hitTolerance:0,o=n.layerFilter||E.TRUE;return this.renderer_.forEachLayerAtPixel(e,this.frameState_,i,t,o)}},i.prototype.hasFeatureAtPixel=function(e,t){if(!this.frameState_||!this.renderer_)return!1;var r=this.getCoordinateFromPixelInternal(e),n=void 0!==(t=void 0!==t?t:{}).layerFilter?t.layerFilter:E.TRUE,i=void 0!==t.hitTolerance?t.hitTolerance:0,o=!1!==t.checkWrapped;return this.renderer_.hasFeatureAtCoordinate(r,this.frameState_,i,o,n,null)},i.prototype.getEventCoordinate=function(e){return this.getCoordinateFromPixel(this.getEventPixel(e))},i.prototype.getEventCoordinateInternal=function(e){return this.getCoordinateFromPixelInternal(this.getEventPixel(e))},i.prototype.getEventPixel=function(e){var t=this.viewport_.getBoundingClientRect(),r="changedTouches"in e?e.changedTouches[0]:e;return[r.clientX-t.left,r.clientY-t.top]},i.prototype.getTarget=function(){return this.get(h.default.TARGET)},i.prototype.getTargetElement=function(){var e=this.getTarget();return void 0!==e?"string"==typeof e?document.getElementById(e):e:null},i.prototype.getCoordinateFromPixel=function(e){return(0,C.toUserCoordinate)(this.getCoordinateFromPixelInternal(e),this.getView().getProjection())},i.prototype.getCoordinateFromPixelInternal=function(e){var t=this.frameState_;return t?(0,m.apply)(t.pixelToCoordinateTransform,e.slice()):null},i.prototype.getControls=function(){return this.controls},i.prototype.getOverlays=function(){return this.overlays_},i.prototype.getOverlayById=function(e){var t=this.overlayIdIndex_[e.toString()];return void 0!==t?t:null},i.prototype.getInteractions=function(){return this.interactions},i.prototype.getLayerGroup=function(){return this.get(h.default.LAYERGROUP)},i.prototype.setLayers=function(e){var r=this.getLayerGroup();if(e instanceof t.default)r.setLayers(e);else{var n=r.getLayers();n.clear(),n.extend(e)}},i.prototype.getLayers=function(){return this.getLayerGroup().getLayers()},i.prototype.getLoadingOrNotReady=function(){for(var e=this.getLayerGroup().getLayerStatesArray(),t=0,r=e.length;t<r;++t){var n=e[t];if(n.visible){var i=n.layer.getRenderer();if(i&&!i.ready)return!0;var o=n.layer.getSource();if(o&&o.loading)return!0}}return!1}
272,i.prototype.getPixelFromCoordinate=function(e){var t=(0,C.fromUserCoordinate)(e,this.getView().getProjection());return this.getPixelFromCoordinateInternal(t)},i.prototype.getPixelFromCoordinateInternal=function(e){var t=this.frameState_;return t?(0,m.apply)(t.coordinateToPixelTransform,e.slice(0,2)):null},i.prototype.getRenderer=function(){return this.renderer_},i.prototype.getSize=function(){return this.get(h.default.SIZE)},i.prototype.getView=function(){return this.get(h.default.VIEW)},i.prototype.getViewport=function(){return this.viewport_},i.prototype.getOverlayContainer=function(){return this.overlayContainer_},i.prototype.getOverlayContainerStopEvent=function(){return this.overlayContainerStopEvent_},i.prototype.getOwnerDocument=function(){var e=this.getTargetElement();return e?e.ownerDocument:document},i.prototype.getTilePriority=function(e,t,r,n){return(0,v.getTilePriority)(this.frameState_,e,t,r,n)},i.prototype.handleBrowserEvent=function(e,t){var r=t||e.type,n=new a.default(r,this,e);this.handleMapBrowserEvent(n)},i.prototype.handleMapBrowserEvent=function(e){if(this.frameState_){var t=e.originalEvent,r=t.type;if(r===y.default.POINTERDOWN||r===n.default.WHEEL||r===n.default.KEYDOWN){var i=this.getOwnerDocument(),o=this.viewport_.getRootNode?this.viewport_.getRootNode():i,a=t.target;if(this.overlayContainerStopEvent_.contains(a)||!(o===i?i.documentElement:o).contains(a))return}if(e.frameState=this.frameState_,!1!==this.dispatchEvent(e))for(var s=this.getInteractions().getArray().slice(),l=s.length-1;l>=0;l--){var d=s[l];if(d.getMap()===this&&d.getActive()&&this.getTargetElement())if(!d.handleEvent(e)||e.propagationStopped)break}}},i.prototype.handlePostRender=function(){var e=this.frameState_,t=this.tileQueue_;if(!t.isEmpty()){var r=this.maxTilesLoading_,n=r;if(e){var i=e.viewHints;if(i[_.default.ANIMATING]||i[_.default.INTERACTING]){var o=Date.now()-e.time>8;r=o?0:8,n=o?0:2}}t.getTilesLoading()<r&&(t.reprioritize(),t.loadMoreTiles(r,n))}e&&this.renderer_&&!e.animate&&(!0===this.renderComplete_?(this.hasListener(f.default.RENDERCOMPLETE)&&this.renderer_.dispatchRenderEvent(f.default.RENDERCOMPLETE,e),!1===this.loaded_&&(this.loaded_=!0,this.dispatchEvent(new d.default(u.default.LOADEND,this,e)))):!0===this.loaded_&&(this.loaded_=!1,this.dispatchEvent(new d.default(u.default.LOADSTART,this,e))));for(var a=this.postRenderFunctions_,s=0,l=a.length;s<l;++s)a[s](this,e);a.length=0},i.prototype.handleSizeChanged_=function(){this.getView()&&!this.getView().getAnimating()&&this.getView().resolveConstraints(0),this.render()},i.prototype.handleTargetChanged_=function(){if(this.mapBrowserEventHandler_){for(var e=0,t=this.targetChangeHandlerKeys_.length;e<t;++e)(0,x.unlistenByKey)(this.targetChangeHandlerKeys_[e]);this.targetChangeHandlerKeys_=null,this.viewport_.removeEventListener(n.default.CONTEXTMENU,this.boundHandleBrowserEvent_),this.viewport_.removeEventListener(n.default.WHEEL,this.boundHandleBrowserEvent_),this.mapBrowserEventHandler_.dispose(),this.mapBrowserEventHandler_=null,(0,S.removeNode)(this.viewport_)}var r=this.getTargetElement();if(r){for(var i in r.appendChild(this.viewport_),this.renderer_||(this.renderer_=this.createRenderer()),this.mapBrowserEventHandler_=new s.default(this,this.moveTolerance_),l.default)this.mapBrowserEventHandler_.addEventListener(l.default[i],this.handleMapBrowserEvent.bind(this));this.viewport_.addEventListener(n.default.CONTEXTMENU,this.boundHandleBrowserEvent_,!1),this.viewport_.addEventListener(n.default.WHEEL,this.boundHandleBrowserEvent_,!!g.PASSIVE_EVENT_LISTENERS&&{passive:!1});var o=this.getOwnerDocument().defaultView,a=this.keyboardEventTarget_?this.keyboardEventTarget_:r;this.targetChangeHandlerKeys_=[(0,x.listen)(a,n.default.KEYDOWN,this.handleBrowserEvent,this),(0,x.listen)(a,n.default.KEYPRESS,this.handleBrowserEvent,this),(0,x.listen)(o,n.default.RESIZE,this.updateSize,this)]}else this.renderer_&&(clearTimeout(this.postRenderTimeoutHandle_),this.postRenderTimeoutHandle_=void 0,this.postRenderFunctions_.length=0,this.renderer_.dispose(),this.renderer_=null),this.animationDelayKey_&&(cancelAnimationFrame(this.animationDelayKey_),this.animationDelayKey_=void 0);this.updateSize()},i.prototype.handleTileChange_=function(){this.render()},i.prototype.handleViewPropertyChanged_=function(){this.render()},i.prototype.handleViewChanged_=function(){this.viewPropertyListenerKey_&&((0,x.unlistenByKey)(this.viewPropertyListenerKey_),this.viewPropertyListenerKey_=null),this.viewChangeListenerKey_&&((0,x.unlistenByKey)(this.viewChangeListenerKey_),this.viewChangeListenerKey_=null);var e=this.getView();e&&(this.updateViewportSize_(),this.viewPropertyListenerKey_=(0,x.listen)(e,p.default.PROPERTYCHANGE,this.handleViewPropertyChanged_,this),this.viewChangeListenerKey_=(0,x.listen)(e,n.default.CHANGE,this.handleViewPropertyChanged_,this),e.resolve
272Constraints(0)),this.render()},i.prototype.handleLayerGroupChanged_=function(){this.layerGroupPropertyListenerKeys_&&(this.layerGroupPropertyListenerKeys_.forEach(x.unlistenByKey),this.layerGroupPropertyListenerKeys_=null);var e=this.getLayerGroup();e&&(this.handleLayerAdd_(new o.GroupEvent("addlayer",e)),this.layerGroupPropertyListenerKeys_=[(0,x.listen)(e,p.default.PROPERTYCHANGE,this.render,this),(0,x.listen)(e,n.default.CHANGE,this.render,this),(0,x.listen)(e,"addlayer",this.handleLayerAdd_,this),(0,x.listen)(e,"removelayer",this.handleLayerRemove_,this)]),this.render()},i.prototype.isRendered=function(){return!!this.frameState_},i.prototype.renderSync=function(){this.animationDelayKey_&&cancelAnimationFrame(this.animationDelayKey_),this.animationDelay_()},i.prototype.redrawText=function(){for(var e=this.getLayerGroup().getLayerStatesArray(),t=0,r=e.length;t<r;++t){var n=e[t].layer;n.hasRenderer()&&n.getRenderer().handleFontsChanged()}},i.prototype.render=function(){this.renderer_&&void 0===this.animationDelayKey_&&(this.animationDelayKey_=requestAnimationFrame(this.animationDelay_))},i.prototype.removeControl=function(e){return this.getControls().remove(e)},i.prototype.removeInteraction=function(e){return this.getInteractions().remove(e)},i.prototype.removeLayer=function(e){return this.getLayerGroup().getLayers().remove(e)},i.prototype.handleLayerRemove_=function(e){b(e.layer)},i.prototype.removeOverlay=function(e){return this.getOverlays().remove(e)},i.prototype.renderFrame_=function(e){var t=this,r=this.getSize(),n=this.getView(),i=this.frameState_,o=null;if(void 0!==r&&(0,R.hasArea)(r)&&n&&n.isDef()){var a=n.getHints(this.frameState_?this.frameState_.viewHints:void 0),s=n.getState();if(o={animate:!1,coordinateToPixelTransform:this.coordinateToPixelTransform_,declutterTree:null,extent:(0,T.getForViewAndSize)(s.center,s.resolution,s.rotation,r),index:this.frameIndex_++,layerIndex:0,layerStatesArray:this.getLayerGroup().getLayerStatesArray(),pixelRatio:this.pixelRatio_,pixelToCoordinateTransform:this.pixelToCoordinateTransform_,postRenderFunctions:[],size:r,tileQueue:this.tileQueue_,time:e,usedTiles:{},viewState:s,viewHints:a,wantedTiles:{},mapId:(0,L.getUid)(this),renderTargets:{}},s.nextCenter&&s.nextResolution){var l=isNaN(s.nextRotation)?s.rotation:s.nextRotation;o.nextExtent=(0,T.getForViewAndSize)(s.nextCenter,s.nextResolution,l,r)}}if(this.frameState_=o,this.renderer_.renderFrame(o),o){if(o.animate&&this.render(),Array.prototype.push.apply(this.postRenderFunctions_,o.postRenderFunctions),i)(!this.previousExtent_||!(0,T.isEmpty)(this.previousExtent_)&&!(0,T.equals)(o.extent,this.previousExtent_))&&(this.dispatchEvent(new d.default(u.default.MOVESTART,this,i)),this.previousExtent_=(0,T.createOrUpdateEmpty)(this.previousExtent_));this.previousExtent_&&!o.viewHints[_.default.ANIMATING]&&!o.viewHints[_.default.INTERACTING]&&!(0,T.equals)(o.extent,this.previousExtent_)&&(this.dispatchEvent(new d.default(u.default.MOVEEND,this,o)),(0,T.clone)(o.extent,this.previousExtent_))}this.dispatchEvent(new d.default(u.default.POSTRENDER,this,o)),this.renderComplete_=this.hasListener(u.default.LOADSTART)||this.hasListener(u.default.LOADEND)||this.hasListener(f.default.RENDERCOMPLETE)?!this.tileQueue_.getTilesLoading()&&!this.tileQueue_.getCount()&&!this.getLoadingOrNotReady():void 0,this.postRenderTimeoutHandle_||(this.postRenderTimeoutHandle_=setTimeout(function(){t.postRenderTimeoutHandle_=void 0,t.handlePostRender()},0))},i.prototype.setLayerGroup=function(e){var t=this.getLayerGroup();t&&this.handleLayerRemove_(new o.GroupEvent("removelayer",t)),this.set(h.default.LAYERGROUP,e)},i.prototype.setSize=function(e){this.set(h.default.SIZE,e)},i.prototype.setTarget=function(e){this.set(h.default.TARGET,e)},i.prototype.setView=function(e){if(!e||e instanceof c.default)this.set(h.default.VIEW,e);else{this.set(h.default.VIEW,new c.default);var t=this;e.then(function(e){t.setView(new c.default(e))})}},i.prototype.updateSize=function(){var e=this.getTargetElement(),t=void 0;if(e){var r=getComputedStyle(e),n=e.offsetWidth-parseFloat(r.borderLeftWidth)-parseFloat(r.paddingLeft)-parseFloat(r.paddingRight)-parseFloat(r.borderRightWidth),i=e.offsetHeight-parseFloat(r.borderTopWidth)-parseFloat(r.paddingTop)-parseFloat(r.paddingBottom)-parseFloat(r.borderBottomWidth);isNaN(n)||isNaN(i)||(t=[n,i],!(0,R.hasArea)(t)&&(e.offsetWidth||e.offsetHeight||e.getClientRects().length)&&console.warn("No map visible because the map container's width or height are 0."))}this.setSize(t),this.updateViewportSize_()},i.prototype.updateViewportSize_=function(){var e=this.getView();if(e){var t=void 0,r=getComputedStyle(this.viewport_);r.width&&r.height&&(t=[parseInt(r.width,10),parseInt(r.height,10)]),e.setViewportSize(t)}
272},i}(e.default);function j(e){var r=null;void 0!==e.keyboardEventTarget&&(r="string"==typeof e.keyboardEventTarget?document.getElementById(e.keyboardEventTarget):e.keyboardEventTarget);var n,i,a,s={},l=e.layers&&"function"==typeof e.layers.getLayers?e.layers:new o.default({layers:e.layers});return s[h.default.LAYERGROUP]=l,s[h.default.TARGET]=e.target,s[h.default.VIEW]=e.view instanceof c.default?e.view:new c.default,void 0!==e.controls&&(Array.isArray(e.controls)?n=new t.default(e.controls.slice()):((0,w.assert)("function"==typeof e.controls.getArray,47),n=e.controls)),void 0!==e.interactions&&(Array.isArray(e.interactions)?i=new t.default(e.interactions.slice()):((0,w.assert)("function"==typeof e.interactions.getArray,48),i=e.interactions)),void 0!==e.overlays?Array.isArray(e.overlays)?a=new t.default(e.overlays.slice()):((0,w.assert)("function"==typeof e.overlays.getArray,49),a=e.overlays):a=new t.default,{controls:n,interactions:i,keyboardEventTarget:r,overlays:a,values:s}}var D=exports.default=N;
273},{"./Object.js":"PhPh","./Collection.js":"FnDa","./CollectionEventType.js":"BTrx","./events/EventType.js":"C8cu","./layer/Layer.js":"GCgv","./layer/Group.js":"q0nK","./MapBrowserEvent.js":"HMLS","./MapBrowserEventHandler.js":"ohHk","./MapBrowserEventType.js":"YhDM","./MapEvent.js":"vFcA","./MapEventType.js":"xLGm","./MapProperty.js":"zlNQ","./ObjectEventType.js":"zehl","./pointer/EventType.js":"TaSm","./render/EventType.js":"z39m","./TileQueue.js":"tHOl","./View.js":"hNqE","./ViewHint.js":"cuLW","./has.js":"f3Nv","./functions.js":"RgA2","./transform.js":"P4eA","./asserts.js":"fLG6","./extent.js":"QDir","./proj.js":"Diht","./util.js":"KniQ","./size.js":"TAHd","./events.js":"UqnM","./dom.js":"Xno5"}],"xxE2":[function(require,module,exports) {
274"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=s(require("../Object.js")),t=s(require("../MapEventType.js")),r=require("../functions.js"),n=require("../events.js"),o=require("../dom.js");function s(e){return e&&e.__esModule?e:{default:e}}var i=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),l=function(e){function s(t){var r=e.call(this)||this,n=t.element;return!n||t.target||n.style.pointerEvents||(n.style.pointerEvents="auto"),r.element=n||null,r.target_=null,r.map_=null,r.listenerKeys=[],t.render&&(r.render=t.render),t.target&&r.setTarget(t.target),r}return i(s,e),s.prototype.disposeInternal=function(){(0,o.removeNode)(this.element),e.prototype.disposeInternal.call(this)},s.prototype.getMap=function(){return this.map_},s.prototype.setMap=function(e){this.map_&&(0,o.removeNode)(this.element);for(var s=0,i=this.listenerKeys.length;s<i;++s)(0,n.unlistenByKey)(this.listenerKeys[s]);(this.listenerKeys.length=0,this.map_=e,e)&&((this.target_?this.target_:e.getOverlayContainerStopEvent()).appendChild(this.element),this.render!==r.VOID&&this.listenerKeys.push((0,n.listen)(e,t.default.POSTRENDER,this.render,this)),e.render())},s.prototype.render=function(e){},s.prototype.setTarget=function(e){this.target_="string"==typeof e?document.getElementById(e):e},s}(e.default),u=exports.default=l;
275},{"../Object.js":"PhPh","../MapEventType.js":"xLGm","../functions.js":"RgA2","../events.js":"UqnM","../dom.js":"Xno5"}],"Q4Cf":[function(require,module,exports) {
276"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=i(require("./Control.js")),t=i(require("../events/EventType.js")),l=require("../css.js"),o=require("../array.js"),s=require("../layer/Layer.js"),a=require("../dom.js");function i(e){return e&&e.__esModule?e:{default:e}}var r=function(){var e=function(t,l){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var l in t)Object.prototype.hasOwnProperty.call(t,l)&&(e[l]=t[l])})(t,l)};return function(t,l){if("function"!=typeof l&&null!==l)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");function o(){this.constructor=t}e(t,l),t.prototype=null===l?Object.create(l):(o.prototype=l.prototype,new o)}}(),n=function(e){function i(o){var s=this,a=o||{};(s=e.call(this,{element:document.createElement("div"),render:a.render,target:a.target})||this).ulElement_=document.createElement("ul"),s.collapsed_=void 0===a.collapsed||a.collapsed,s.userCollapsed_=s.collapsed_,s.overrideCollapsible_=void 0!==a.collapsible,s.collapsible_=void 0===a.collapsible||a.collapsible,s.collapsible_||(s.collapsed_=!1);var i=void 0!==a.className?a.className:"ol-attribution",r=void 0!==a.tipLabel?a.tipLabel:"Attributions",n=void 0!==a.expandClassName?a.expandClassName:i+"-expand",p=void 0!==a.collapseLabel?a.collapseLabel:"›",c=void 0!==a.collapseClassName?a.collapseClassName:i+"-collapse";"string"==typeof p?(s.collapseLabel_=document.createElement("span"),s.c
vendor: 7,052 bytes, lines 276-280
276ollapseLabel_.textContent=p,s.collapseLabel_.className=c):s.collapseLabel_=p;var d=void 0!==a.label?a.label:"i";"string"==typeof d?(s.label_=document.createElement("span"),s.label_.textContent=d,s.label_.className=n):s.label_=d;var u=s.collapsible_&&!s.collapsed_?s.collapseLabel_:s.label_;s.toggleButton_=document.createElement("button"),s.toggleButton_.setAttribute("type","button"),s.toggleButton_.setAttribute("aria-expanded",String(!s.collapsed_)),s.toggleButton_.title=r,s.toggleButton_.appendChild(u),s.toggleButton_.addEventListener(t.default.CLICK,s.handleClick_.bind(s),!1);var _=i+" "+l.CLASS_UNSELECTABLE+" "+l.CLASS_CONTROL+(s.collapsed_&&s.collapsible_?" "+l.CLASS_COLLAPSED:"")+(s.collapsible_?"":" ol-uncollapsible"),b=s.element;return b.className=_,b.appendChild(s.toggleButton_),b.appendChild(s.ulElement_),s.renderedAttributions_=[],s.renderedVisible_=!0,s}return r(i,e),i.prototype.collectSourceAttributions_=function(e){for(var t={},l=[],o=!0,a=e.layerStatesArray,i=0,r=a.length;i<r;++i){var n=a[i];if((0,s.inView)(n,e.viewState)){var p=n.layer.getSource();if(p){var c=p.getAttributions();if(c){var d=c(e);if(d)if(o=o&&!1!==p.getAttributionsCollapsible(),Array.isArray(d))for(var u=0,_=d.length;u<_;++u)d[u]in t||(l.push(d[u]),t[d[u]]=!0);else d in t||(l.push(d),t[d]=!0)}}}}return this.overrideCollapsible_||this.setCollapsible(o),l},i.prototype.updateElement_=function(e){if(e){var t=this.collectSourceAttributions_(e),l=t.length>0;if(this.renderedVisible_!=l&&(this.element.style.display=l?"":"none",this.renderedVisible_=l),!(0,o.equals)(t,this.renderedAttributions_)){(0,a.removeChildren)(this.ulElement_);for(var s=0,i=t.length;s<i;++s){var r=document.createElement("li");r.innerHTML=t[s],this.ulElement_.appendChild(r)}this.renderedAttributions_=t}}else this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1)},i.prototype.handleClick_=function(e){e.preventDefault(),this.handleToggle_(),this.userCollapsed_=this.collapsed_},i.prototype.handleToggle_=function(){this.element.classList.toggle(l.CLASS_COLLAPSED),this.collapsed_?(0,a.replaceNode)(this.collapseLabel_,this.label_):(0,a.replaceNode)(this.label_,this.collapseLabel_),this.collapsed_=!this.collapsed_,this.toggleButton_.setAttribute("aria-expanded",String(!this.collapsed_))},i.prototype.getCollapsible=function(){return this.collapsible_},i.prototype.setCollapsible=function(e){this.collapsible_!==e&&(this.collapsible_=e,this.element.classList.toggle("ol-uncollapsible"),this.userCollapsed_&&this.handleToggle_())},i.prototype.setCollapsed=function(e){this.userCollapsed_=e,this.collapsible_&&this.collapsed_!==e&&this.handleToggle_()},i.prototype.getCollapsed=function(){return this.collapsed_},i.prototype.render=function(e){this.updateElement_(e.frameState)},i}(e.default),p=exports.default=n;
277},{"./Control.js":"xxE2","../events/EventType.js":"C8cu","../css.js":"HgMV","../array.js":"luEr","../layer/Layer.js":"GCgv","../dom.js":"Xno5"}],"sCgw":[function(require,module,exports) {
278"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=r(require("./Control.js")),e=r(require("../events/EventType.js")),a=require("../css.js"),o=require("../easing.js");function r(t){return t&&t.__esModule?t:{default:t}}var n=function(){var t=function(e,a){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a])})(e,a)};return function(e,a){if("function"!=typeof a&&null!==a)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");function o(){this.constructor=e}t(e,a),e.prototype=null===a?Object.create(a):(o.prototype=a.prototype,new o)}}(),i=function(t){function r(o){var r=this,n=o||{};r=t.call(this,{element:document.createElement("div"),render:n.render,target:n.target})||this;var i=void 0!==n.className?n.className:"ol-rotate",s=void 0!==n.label?n.label:"⇧",l=void 0!==n.compassClassName?n.compassClassName:"ol-compass";r.label_=null,"string"==typeof s?(r.label_=document.createElement("span"),r.label_.className=l,r.label_.textContent=s):(r.label_=s,r.label_.classList.add(l));var u=n.tipLabel?n.tipLabel:"Reset rotation",d=document.createElement("button");d.className=i+"-reset",d.setAttribute("type","button"),d.title=u,d.appendChild(r.label_),d.addEventListener(e.default.CLICK,r.handleClick_.bind(r),!1);var c=i+" "+a.CLASS_UNSELECTABLE+" "+a.CLASS_CONTROL,_=r.element;return _.className=c,_.appendChild(d),r.callResetNorth_=n.resetNorth?n.resetNorth:void 0,r.duration_=void 0!==n.duration?n.duration:250,r.autoHide_=void 0===n.autoHide||n.autoHide,r.rotation_=void 0,r.autoHide_&&r.element.classList.add(a.CLASS_HIDDEN),r}return n(r,t),r.prototype.handleClick_=function(t){t.preventDefault(),void 0!==this.callResetNorth_?this.callResetNorth_():this.resetNorth_()},r.prototype.resetNorth_=function(){var t=this.getMap().getView();if(t){var e=t.getRotation();void 0!==e&&(this.duration_>0&&e%(2*Math.PI)!=0?t.animate({rotation:0,duration:this.duration_,easing:o.easeOut}):t.setRotation(0))}},r.prototype.render=function(t){var e=t.frameState;if(e){var o=e.viewState.rotation;if(o!=this.rotation_){var r="rotate("+o+"rad)";if(this.autoHide_){var n=this.element.classList.contains(a.CLASS_HIDDEN);n||0!==o?n&&0!==o&&this.element.classList.remove(a.CLASS_HIDDEN):this.element.classList.add(a.CLASS_HIDDEN)}this.label_.style.transform=r}this.rotation_=o}},r}(t.default),s=exports.default=i;
279},{"./Control.js":"xxE2","../events/EventType.js":"C8cu","../css.js":"HgMV","../easing.js":"IeCz"}],"L3CO":[function(require,module,exports) {
280"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=a(require("./Control.js")),e=a(require("../events/EventType.js")),o=require("../css.js"),n=require("../easing.js");function a(t){return t&&t.__esModule?t:{default:t}}var i=function(){var t=function(e,o){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),r=function(t){function a(n){var a=this,i=n||{};a=t.call(this,{element:document.createElement("div"),target:i.target})||this;var r=void 0!==i.className?i.className:"ol-zoom",u=void 0!==i.delta?i.delta:1,l=void 0!==i.zoomInClassName?i.zoomInClassName:r+"-in",s=void 0!==i.zoomOutClassName?i.zoomOutClassName:r+"-out",d=void 0!==i.zoomInLabel?i.zoomInLabel:"+",c=void 0!==i.zoomOutLabel?i.zoomOutLabel:"–",m=void 0!==i.zoomInTipLabel?i.zoomInTipLabel:"Zoom in",p=void 0!==i.zoomOutTipLabel?i.zoomOutTipLabel:"Zoom out",v=document.createElement("button");v.className=l,v.setAttribute("type","button"),v.title=m,v.appendChild("string"==typeof d?document.createTextNode(d
280):d),v.addEventListener(e.default.CLICK,a.handleClick_.bind(a,u),!1);var f=document.createElement("button");f.className=s,f.setAttribute("type","button"),f.title=p,f.appendChild("string"==typeof c?document.createTextNode(c):c),f.addEventListener(e.default.CLICK,a.handleClick_.bind(a,-u),!1);var C=r+" "+o.CLASS_UNSELECTABLE+" "+o.CLASS_CONTROL,_=a.element;return _.className=C,_.appendChild(v),_.appendChild(f),a.duration_=void 0!==i.duration?i.duration:250,a}return i(a,t),a.prototype.handleClick_=function(t,e){e.preventDefault(),this.zoomByDelta_(t)},a.prototype.zoomByDelta_=function(t){var e=this.getMap().getView();if(e){var o=e.getZoom();if(void 0!==o){var a=e.getConstrainedZoom(o+t);this.duration_>0?(e.getAnimating()&&e.cancelAnimations(),e.animate({zoom:a,duration:this.duration_,easing:n.easeOut})):e.setZoom(a)}}},a}(t.default),u=exports.default=r;
281},{"./Control.js":"xxE2","../events/EventType.js":"C8cu","../css.js":"HgMV","../easing.js":"IeCz"}],"dOoh":[function(require,module,exports) {
282"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=r(require("./Control.js")),t=r(require("../events/EventType.js")),s=r(require("../MapProperty.js")),n=require("../css.js"),l=require("../events.js"),a=require("../dom.js");function r(e){return e&&e.__esModule?e:{default:e}}var i=function(){var e=function(t,s){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s])})(t,s)};return function(t,s){if("function"!=typeof s&&null!==s)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");function n(){this.constructor=t}e(t,s),t.prototype=null===s?Object.create(s):(n.prototype=s.prototype,new n)}}(),c=["fullscreenchange","webkitfullscreenchange","MSFullscreenChange"],u={ENTERFULLSCREEN:"enterfullscreen",LEAVEFULLSCREEN:"leavefullscreen"},o=function(e){function r(s){var l=this,a=s||{};(l=e.call(this,{element:document.createElement("div"),target:a.target})||this).on,l.once,l.un,l.keys_=void 0!==a.keys&&a.keys,l.source_=a.source,l.isInFullscreen_=!1,l.boundHandleMapTargetChange_=l.handleMapTargetChange_.bind(l),l.cssClassName_=void 0!==a.className?a.className:"ol-full-screen",l.documentListeners_=[],l.activeClassName_=void 0!==a.activeClassName?a.activeClassName.split(" "):[l.cssClassName_+"-true"],l.inactiveClassName_=void 0!==a.inactiveClassName?a.inactiveClassName.split(" "):[l.cssClassName_+"-false"];var r=void 0!==a.label?a.label:"⤢";l.labelNode_="string"==typeof r?document.createTextNode(r):r;var i=void 0!==a.labelActive?a.labelActive:"×";l.labelActiveNode_="string"==typeof i?document.createTextNode(i):i;var c=a.tipLabel?a.tipLabel:"Toggle full-screen";return l.button_=document.createElement("button"),l.button_.title=c,l.button_.setAttribute("type","button"),l.button_.appendChild(l.labelNode_),l.button_.addEventListener(t.default.CLICK,l.handleClick_.bind(l),!1),l.setClassName_(l.button_,l.isInFullscreen_),l.element.className="".concat(l.cssClassName_," ").concat(n.CLASS_UNSELECTABLE," ").concat(n.CLASS_CONTROL),l.element.appendChild(l.button_),l}return i(r,e),r.prototype.handleClick_=function(e){e.preventDefault(),this.handleFullScreen_()},r.prototype.handleFullScreen_=function(){var e=this.getMap();if(e){var t=e.getOwnerDocument();if(d(t))if(h(t))v(t);else{var s=void 0;s=this.source_?"string"==typeof this.source_?t.getElementById(this.source_):this.source_:e.getTargetElement(),this.keys_?_(s):p(s)}}},r.prototype.handleFullScreenChange_=function(){var e=this.getMap();if(e){var t=this.isInFullscreen_;this.isInFullscreen_=h(e.getOwnerDocument()),t!==this.isInFullscreen_&&(this.setClassName_(this.button_,this.isInFullscreen_),this.isInFullscreen_?((0,a.replaceNode)(this.labelActiveNode_,this.labelNode_),this.dispatchEvent(u.ENTERFULLSCREEN)):((0,a.replaceNode)(this.labelNode_,this.labelActiveNode_),this.dispatchEvent(u.LEAVEFULLSCREEN)),e.updateSize())}},r.prototype.setClassName_=function(e,t){var s,n,l,a;t?((s=e.classList).remove.apply(s,this.inactiveClassName_),(n=e.classList).add.apply(n,this.activeClassName_)):((l=e.classList).remove.apply(l,this.activeClassName_),(a=e.classList).add.apply(a,this.inactiveClassName_))},r.prototype.setMap=function(t){var n=this.getMap();n&&n.removeChangeListener(s.default.TARGET,this.boundHandleMapTargetChange_),e.prototype.setMap.call(this,t),this.handleMapTargetChange_(),t&&t.addChangeListener(s.default.TARGET,this.boundHandleMapTargetChange_)},r.prototype.handleMapTargetChange_=function(){for(var e=this.documentListeners_,t=0,s=e.length;t<s;++t)(0,l.unlistenByKey)(e[t]);e.length=0;var a=this.getMap();if(a){var r=a.getOwnerDocument();d(r)?this.element.classList.remove(n.CLASS_UNSUPPORTED):this.element.classList.add(n.CLASS_UNSUPPORTED);for(t=0,s=c.length;t<s;++t)e.push((0,l.listen)(r,c[t],this.handleFullScreenChange_,this));this.handleFullScreenChange_()}},r}(e.default);function d(e){var t=e.body;return!!(t.webkitRequestFullscreen||t.msRequestFullscreen&&e.msFullscreenEnabled||t.requestFullscreen&&e.fullscreenEnabled)}function h(e){return!!(e.webkitIsFullScreen||e.msFullscreenElement||e.fullscreenElement)}function p(e){e.requestFullscreen?e.requestFullscreen():e.msRequestFullscreen?e.msRequestFullscreen():e.webkitRequestFullscreen&&e.webkitRequestFullscreen()}function _(e){e.webkitRequestFullscreen?e.webkitRequestFullscreen():p(e)}function v(e){e.exitFullscreen?e.exitFullscreen():e.msExitFullscreen?e.msExitFullscreen():e.webkitExitFullscreen&&e.webkitExitFullscreen()}var f=exports.default=o;
283},{"./Control.js":"xxE2","../events/EventType.js":"C8cu","../MapProperty.js":"zlNQ","../css.js":"HgMV","../events.js":"UqnM","../dom.js":"Xno5"}],"Cbl8":[function(require,module,exports) {
284"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=n(require("./Control.js")),e=n(require("../pointer/EventType.js")),o=require("../proj.js"),r=require("../events.js");function n(t){return t&&t.__esModule?t:{default:t}}var i=function(){var t=function(e,o){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function r(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),s="projection",a="coordinateFormat",u=function(t){function n(e){var o=this,r=e||{},n=document.createElement("div");n.className=void 0!==r.className?r.className:"ol-mouse-position",(o=t.call(this,{element:n,render:r.render,target:r.target})||this).on,o.once,o.un,o.addChangeListener(s,o.handleProjectionChanged_),r.coordinateFormat&&o.setCoordinateFormat(r.coordinateFormat),r.projection&&o.setProjection(r.projection);var i=!0,a="&#160;";return"undefinedHTML"in r?(void 0!==r.undefinedHTML&&(a=r.undefinedHTML),i=!!a):"placeholder"in r&&(!1===r.placeholder?i=!1:a=String(r.placeholder)),o.placeholder_=a,o.renderOnMouseOut_=i,o.renderedHTML_=n.innerHTML,o.mapProjection_=null,o.transform_=null,o}return i(n,t),n.prototype.handleProjectionChanged_=function(){this.transform_=null},n.prototype.getCoordinateFormat=function(){return this.get(a)},n.prototype.getProjection=function(){return this.get(s)},n.prototype.handleMouseMove=function(t){var e=this.getMap();this.updateHTML_(e.getEventPixel(t))},n.prototype.handleMouseOut=function(t){this.updateHTML_(null)}
284,n.prototype.setMap=function(o){if(t.prototype.setMap.call(this,o),o){var n=o.getViewport();this.listenerKeys.push((0,r.listen)(n,e.default.POINTERMOVE,this.handleMouseMove,this)),this.renderOnMouseOut_&&this.listenerKeys.push((0,r.listen)(n,e.default.POINTEROUT,this.handleMouseOut,this)),this.updateHTML_(null)}},n.prototype.setCoordinateFormat=function(t){this.set(a,t)},n.prototype.setProjection=function(t){this.set(s,(0,o.get)(t))},n.prototype.updateHTML_=function(t){var e=this.placeholder_;if(t&&this.mapProjection_){if(!this.transform_){var r=this.getProjection();this.transform_=r?(0,o.getTransformFromProjections)(this.mapProjection_,r):o.identityTransform}var n=this.getMap().getCoordinateFromPixelInternal(t);if(n){var i=(0,o.getUserProjection)();i&&(this.transform_=(0,o.getTransformFromProjections)(this.mapProjection_,i)),this.transform_(n,n);var s=this.getCoordinateFormat();e=s?s(n):n.toString()}}this.renderedHTML_&&e===this.renderedHTML_||(this.element.innerHTML=e,this.renderedHTML_=e)},n.prototype.render=function(t){var e=t.frameState;e?this.mapProjection_!=e.viewState.projection&&(this.mapProjection_=e.viewState.projection,this.transform_=null):this.mapProjection_=null},n}(t.default),p=exports.default=u;
285},{"./Control.js":"xxE2","../pointer/EventType.js":"TaSm","../proj.js":"Diht","../events.js":"UqnM"}],"qWcX":[function(require,module,exports) {
286"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=s(require("./Object.js")),e=s(require("./MapEventType.js")),n=require("./css.js"),i=require("./extent.js"),o=require("./events.js"),r=require("./dom.js");function s(t){return t&&t.__esModule?t:{default:t}}var a=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),p={ELEMENT:"element",MAP:"map",OFFSET:"offset",POSITION:"position",POSITIONING:"positioning"},l=function(t){function s(e){var i=t.call(this)||this;i.on,i.once,i.un,i.options=e,i.id=e.id,i.insertFirst=void 0===e.insertFirst||e.insertFirst,i.stopEvent=void 0===e.stopEvent||e.stopEvent,i.element=document.createElement("div"),i.element.className=void 0!==e.className?e.className:"ol-overlay-container "+n.CLASS_SELECTABLE,i.element.style.position="absolute",i.element.style.pointerEvents="auto";var o=e.autoPan;return o&&"object"!=typeof o&&(o={animation:e.autoPanAnimation,margin:e.autoPanMargin}),i.autoPan=o||!1,i.rendered={transform_:"",visible:!0},i.mapPostrenderListenerKey=null,i.addChangeListener(p.ELEMENT,i.handleElementChanged),i.addChangeListener(p.MAP,i.handleMapChanged),i.addChangeListener(p.OFFSET,i.handleOffsetChanged),i.addChangeListener(p.POSITION,i.handlePositionChanged),i.addChangeListener(p.POSITIONING,i.handlePositioningChanged),void 0!==e.element&&i.setElement(e.element),i.setOffset(void 0!==e.offset?e.offset:[0,0]),i.setPositioning(e.positioning||"top-left"),void 0!==e.position&&i.setPosition(e.position),i}return a(s,t),s.prototype.getElement=function(){return this.get(p.ELEMENT)},s.prototype.getId=function(){return this.id},s.prototype.getMap=function(){return this.get(p.MAP)||null},s.prototype.getOffset=function(){return this.get(p.OFFSET)},s.prototype.getPosition=function(){return this.get(p.POSITION)},s.prototype.getPositioning=function(){return this.get(p.POSITIONING)},s.prototype.handleElementChanged=function(){(0,r.removeChildren)(this.element);var t=this.getElement();t&&this.element.appendChild(t)},s.prototype.handleMapChanged=function(){this.mapPostrenderListenerKey&&((0,r.removeNode)(this.element),(0,o.unlistenByKey)(this.mapPostrenderListenerKey),this.mapPostrenderListenerKey=null);var t=this.getMap();if(t){this.mapPostrenderListenerKey=(0,o.listen)(t,e.default.POSTRENDER,this.render,this),this.updatePixelPosition();var n=this.stopEvent?t.getOverlayContainerStopEvent():t.getOverlayContainer();this.insertFirst?n.insertBefore(this.element,n.childNodes[0]||null):n.appendChild(this.element),this.performAutoPan()}},s.prototype.render=function(){this.updatePixelPosition()},s.prototype.handleOffsetChanged=function(){this.updatePixelPosition()},s.prototype.handlePositionChanged=function(){this.updatePixelPosition(),this.performAutoPan()},s.prototype.handlePositioningChanged=function(){this.updatePixelPosition()},s.prototype.setElement=function(t){this.set(p.ELEMENT,t)},s.prototype.setMap=function(t){this.set(p.MAP,t)},s.prototype.setOffset=function(t){this.set(p.OFFSET,t)},s.prototype.setPosition=function(t){this.set(p.POSITION,t)},s.prototype.performAutoPan=function(){this.autoPan&&this.panIntoView(this.autoPan)},s.prototype.panIntoView=function(t){var e=this.getMap();
286if(e&&e.getTargetElement()&&this.get(p.POSITION)){var n=this.getRect(e.getTargetElement(),e.getSize()),o=this.getElement(),s=this.getRect(o,[(0,r.outerWidth)(o),(0,r.outerHeight)(o)]),a=t||{},l=void 0===a.margin?20:a.margin;if(!(0,i.containsExtent)(n,s)){var d=s[0]-n[0],u=n[2]-s[2],h=s[1]-n[1],f=n[3]-s[3],c=[0,0];if(d<0?c[0]=d-l:u<0&&(c[0]=Math.abs(u)+l),h<0?c[1]=h-l:f<0&&(c[1]=Math.abs(f)+l),0!==c[0]||0!==c[1]){var g=e.getView().getCenterInternal(),m=e.getPixelFromCoordinateInternal(g);if(!m)return;var P=[m[0]+c[0],m[1]+c[1]],y=a.animation||{};e.getView().animateInternal({center:e.getCoordinateFromPixelInternal(P),duration:y.duration,easing:y.easing})}}}},s.prototype.getRect=function(t,e){var n=t.getBoundingClientRect(),i=n.left+window.pageXOffset,o=n.top+window.pageYOffset;return[i,o,i+e[0],o+e[1]]},s.prototype.setPositioning=function(t){this.set(p.POSITIONING,t)},s.prototype.setVisible=function(t){this.rendered.visible!==t&&(this.element.style.display=t?"":"none",this.rendered.visible=t)},s.prototype.updatePixelPosition=function(){var t=this.getMap(),e=this.getPosition();if(t&&t.isRendered()&&e){var n=t.getPixelFromCoordinate(e),i=t.getSize();this.updateRenderedPosition(n,i)}else this.setVisible(!1)},s.prototype.updateRenderedPosition=function(t,e){var n=this.element.style,i=this.getOffset(),o=this.getPositioning();this.setVisible(!0);var r=Math.round(t[0]+i[0])+"px",s=Math.round(t[1]+i[1])+"px",a="0%",p="0%";"bottom-right"==o||"center-right"==o||"top-right"==o?a="-100%":"bottom-center"!=o&&"center-center"!=o&&"top-center"!=o||(a="-50%"),"bottom-left"==o||"bottom-center"==o||"bottom-right"==o?p="-100%":"center-left"!=o&&"center-center"!=o&&"center-right"!=o||(p="-50%");var l="translate(".concat(a,", ").concat(p,") translate(").concat(r,", ").concat(s,")");this.rendered.transform_!=l&&(this.rendered.transform_=l,n.transform=l,n.msTransform=l)},s.prototype.getOptions=function(){return this.options},s}(t.default),d=exports.default=l;
287},{"./Object.js":"PhPh","./MapEventType.js":"xLGm","./css.js":"HgMV","./extent.js":"QDir","./events.js":"UqnM","./dom.js":"Xno5"}],"KMhA":[function(require,module,exports) {
288"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=v(require("../renderer/Composite.js")),t=v(require("./Control.js")),i=v(require("../events/EventType.js")),o=v(require("../MapEventType.js")),n=v(require("../MapProperty.js")),a=v(require("../ObjectEventType.js")),r=v(require("../Overlay.js")),l=v(require("../PluggableMap.js")),s=v(require("../View.js")),p=v(require("../ViewProperty.js")),d=require("../css.js"),h=require("../extent.js"),u=require("../events.js"),c=require("../geom/Polygon.js"),_=require("../dom.js");function v(e){return e&&e.__esModule?e:{default:e}}var g=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function o(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}(),f=.75,m=.1,w=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return g(i,t),i.prototype.createRenderer=function(){return new e.default(this)},i}(l.default),y=function(e){function t(t){var o=this,n=t||{};(o=e.call(this,{element:document.createElement("div"),render:n.render,target:n.target})||this).boundHandleRotationChanged_=o.handleRotationChanged_.bind(o),o.collapsed_=void 0===n.collapsed||n.collapsed,o.collapsible_=void 0===n.collapsible||n.collapsible,o.collapsible_||(o.collapsed_=!1),o.rotateWithView_=void 0!==n.rotateWithView&&n.rotateWithView,o.viewExtent_=void 0;var a=void 0!==n.className?n.className:"ol-overviewmap",l=void 0!==n.tipLabel?n.tipLabel:"Overview map",s=void 0!==n.collapseLabel?n.collapseLabel:"‹";"string"==typeof s?(o.collapseLabel_=document.createElement("span"),o.collapseLabel_.textContent=s):o.collapseLabel_=s;var p=void 0!==n.label?n.label:"›";"string"==typeof p?(o.label_=document.createElement("span"),o.label_.textContent=p):o.label_=p;var h=o.collapsible_&&!o.collapsed_?o.collapseLabel_:o.label_,u=document.createElement("button");u.setAttribute("type","button"),u.title=l,u.appendChild(h),u.addEventListener(i.default.CLICK,o.handleClick_.bind(o),!1),o.ovmapDiv_=document.createElement("div"),o.ovmapDiv_.className="ol-overviewmap-map",o.view_=n.view,o.ovmap_=new w({view:n.view});var c=o.ovmap_;
288n.layers&&n.layers.forEach(function(e){c.addLayer(e)});var _=document.createElement("div");_.className="ol-overviewmap-box",_.style.boxSizing="border-box",o.boxOverlay_=new r.default({position:[0,0],positioning:"center-center",element:_}),o.ovmap_.addOverlay(o.boxOverlay_);var v=a+" "+d.CLASS_UNSELECTABLE+" "+d.CLASS_CONTROL+(o.collapsed_&&o.collapsible_?" "+d.CLASS_COLLAPSED:"")+(o.collapsible_?"":" ol-uncollapsible"),g=o.element;g.className=v,g.appendChild(o.ovmapDiv_),g.appendChild(u);var f=o,m=o.boxOverlay_,y=o.boxOverlay_.getElement(),b=function(e){var t,i={clientX:(t=e).clientX,clientY:t.clientY},o=c.getEventCoordinateInternal(i);m.setPosition(o)},E=function(e){var t=c.getEventCoordinateInternal(e);f.getMap().getView().setCenterInternal(t),window.removeEventListener("mousemove",b),window.removeEventListener("mouseup",E)};return y.addEventListener("mousedown",function(){window.addEventListener("mousemove",b),window.addEventListener("mouseup",E)}),o}return g(t,e),t.prototype.setMap=function(t){var i=this.getMap();if(t!==i){if(i){var o=i.getView();o&&this.unbindView_(o),this.ovmap_.setTarget(null)}if(e.prototype.setMap.call(this,t),t){this.ovmap_.setTarget(this.ovmapDiv_),this.listenerKeys.push((0,u.listen)(t,a.default.PROPERTYCHANGE,this.handleMapPropertyChange_,this));var n=t.getView();n&&(this.bindView_(n),n.isDef()&&(this.ovmap_.updateSize(),this.resetExtent_())),this.ovmap_.isRendered()||this.updateBoxAfterOvmapIsRendered_()}}},t.prototype.handleMapPropertyChange_=function(e){if(e.key===n.default.VIEW){var t=e.oldValue;t&&this.unbindView_(t);var i=this.getMap().getView();this.bindView_(i)}else this.ovmap_.isRendered()||e.key!==n.default.TARGET&&e.key!==n.default.SIZE||this.ovmap_.updateSize()},t.prototype.bindView_=function(e){if(!this.view_){var t=new s.default({projection:e.getProjection()});this.ovmap_.setView(t)}e.addChangeListener(p.default.ROTATION,this.boundHandleRotationChanged_),this.handleRotationChanged_()},t.prototype.unbindView_=function(e){e.removeChangeListener(p.default.ROTATION,this.boundHandleRotationChanged_)},t.prototype.handleRotationChanged_=function(){this.rotateWithView_&&this.ovmap_.getView().setRotation(this.getMap().getView().getRotation())},t.prototype.validateExtent_=function(){var e=this.getMap(),t=this.ovmap_;if(e.isRendered()&&t.isRendered()){var i=e.getSize(),o=e.getView().calculateExtentInternal(i);if(!this.viewExtent_||!(0,h.equals)(o,this.viewExtent_)){this.viewExtent_=o;var n=t.getSize(),a=t.getView().calculateExtentInternal(n),r=t.getPixelFromCoordinateInternal((0,h.getTopLeft)(o)),l=t.getPixelFromCoordinateInternal((0,h.getBottomRight)(o)),s=Math.abs(r[0]-l[0]),p=Math.abs(r[1]-l[1]),d=n[0],u=n[1];s<d*m||p<u*m||s>d*f||p>u*f?this.resetExtent_():(0,h.containsExtent)(a,o)||this.recenter_()}}},t.prototype.resetExtent_=function(){if(0!==f&&0!==m){var e=this.getMap(),t=this.ovmap_,i=e.getSize(),o=e.getView().calculateExtentInternal(i),n=t.getView(),a=Math.log(f/m)/Math.LN2,r=1/(Math.pow(2,a/2)*m);(0,h.scaleFromCenter)(o,r),n.fitInternal((0,c.fromExtent)(o))}},t.prototype.recenter_=function(){var e=this.getMap(),t=this.ovmap_,i=e.getView();t.getView().setCenterInternal(i.getCenterInternal())},t.prototype.updateBox_=function(){var e=this.getMap(),t=this.ovmap_;if(e.isRendered()&&t.isRendered()){var i=e.getSize(),o=e.getView(),n=t.getView(),a=this.rotateWithView_?0:-o.getRotation(),r=this.boxOverlay_,l=this.boxOverlay_.getElement(),s=o.getCenterInternal(),p=o.getResolution(),d=n.getResolution(),h=i[0]*p/d,u=i[1]*p/d;if(r.setPosition(s),l){l.style.width=h+"px",l.style.height=u+"px";var c="rotate("+a+"rad)";l.style.transform=c}}},t.prototype.updateBoxAfterOvmapIsRendered_=function(){this.ovmapPostrenderKey_||(this.ovmapPostrenderKey_=(0,u.listenOnce)(this.ovmap_,o.default.POSTRENDER,function(e){delete this.ovmapPostrenderKey_,this.updateBox_()},this))},t.prototype.handleClick_=function(e){e.preventDefault(),this.handleToggle_()},t.prototype.handleToggle_=function(){this.element.classList.toggle(d.CLASS_COLLAPSED),this.collapsed_?(0,_.replaceNode)(this.collapseLabel_,this.label_):(0,_.replaceNode)(this.label_,this.collapseLabel_),this.collapsed_=!this.collapsed_;var e=this.ovmap_;if(!this.collapsed_){if(e.isRendered())return this.viewExtent_=void 0,void e.render();e.updateSize(),this.resetExtent_(),this.updateBoxAfterOvmapIsRendered_()}},t.prototype.getCollapsible=function(){return this.collapsible_},t.prototype.setCollapsible=function(e){this.collapsible_!==e&&(this.collapsible_=e,this.element.classList.toggle("ol-uncollapsible"),!e&&this.collapsed_&&this.handleToggle_())},t.prototype.setCollapsed=function(e){this.collapsible_&&this.collapsed_!==e&&this.handleToggle_()},t.prototype.getCollapsed=function(){return this.collapsed_},t.prototype.getRotateWithView=function(){return this.rotateWithView_},t.prototype.setRotateWithView=function(e){this.rotateWithView_!==e&&(this.rotateWithView_=e,0!==this.getMap().getView().getRotation()&&(this.rotateWithView_?this.handleRotationChanged_():this.ovmap_.getView().setRotation(0),this.viewExtent_=void 0,this.validateExtent_(),this.updateBox_()))},t.prototype.getOverviewMap=function(){return this.ovmap_},t.prototype.render=function(e){this.validateExtent_(),this.updateBox_()},t}(t.default),b=exports.default=y;
289},{"../renderer/Composite.js":"MHsB","./Control.js":"xxE2","../events/EventType.js":"C8cu","../MapEventType.js":"xLGm","../MapProperty.js":"zlNQ","../ObjectEventType.js":"zehl","../Overlay.js":"qWcX","../PluggableMap.js":"kRwz","../View.js":"hNqE","../ViewProperty.js":"cE7c","../css.js":"HgMV","../extent.js":"QDir","../events.js":"UqnM","../geom/Polygon.js":"Nwwk","../dom.js":"Xno5"}],"DK5d":[function(require,module,exports) {
290"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.Units=void 0;var e=n(require("./Control.js")),t=n(require("../proj/Units.js")),i=require("../css.js"),r=require("../proj.js"),s=require("../asserts.js");
290function n(e){return e&&e.__esModule?e:{default:e}}var a=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),o="units",l=exports.Units={DEGREES:"degrees",IMPERIAL:"imperial",NAUTICAL:"nautical",METRIC:"metric",US:"us"},d=[1,2,5],c=25.4/.28,p=function(e){function n(t){var r=this,s=t||{},n=void 0!==s.className?s.className:s.bar?"ol-scale-bar":"ol-scale-line";return(r=e.call(this,{element:document.createElement("div"),render:s.render,target:s.target})||this).on,r.once,r.un,r.innerElement_=document.createElement("div"),r.innerElement_.className=n+"-inner",r.element.className=n+" "+i.CLASS_UNSELECTABLE,r.element.appendChild(r.innerElement_),r.viewState_=null,r.minWidth_=void 0!==s.minWidth?s.minWidth:64,r.maxWidth_=s.maxWidth,r.renderedVisible_=!1,r.renderedWidth_=void 0,r.renderedHTML_="",r.addChangeListener(o,r.handleUnitsChanged_),r.setUnits(s.units||l.METRIC),r.scaleBar_=s.bar||!1,r.scaleBarSteps_=s.steps||4,r.scaleBarText_=s.text||!1,r.dpi_=s.dpi||void 0,r}return a(n,e),n.prototype.getUnits=function(){return this.get(o)},n.prototype.handleUnitsChanged_=function(){this.updateElement_()},n.prototype.setUnits=function(e){this.set(o,e)},n.prototype.setDpi=function(e){this.dpi_=e},n.prototype.updateElement_=function(){var e=this.viewState_;if(e){var i=e.center,n=e.projection,a=this.getUnits(),o=a==l.DEGREES?t.default.DEGREES:t.default.METERS,p=(0,r.getPointResolution)(n,e.resolution,i,o),h=this.minWidth_*(this.dpi_||c)/c,u=void 0!==this.maxWidth_?this.maxWidth_*(this.dpi_||c)/c:void 0,_=h*p,f="";if(a==l.DEGREES){var v=r.METERS_PER_UNIT[t.default.DEGREES];(_*=v)<v/60?(f="″",p*=3600):_<v?(f="′",p*=60):f="°"}else a==l.IMPERIAL?_<.9144?(f="in",p/=.0254):_<1609.344?(f="ft",p/=.3048):(f="mi",p/=1609.344):a==l.NAUTICAL?(p/=1852,f="NM"):a==l.METRIC?_<.001?(f="μm",p*=1e6):_<1?(f="mm",p*=1e3):_<1e3?f="m":(f="km",p/=1e3):a==l.US?_<.9144?(f="in",p*=39.37):_<1609.344?(f="ft",p/=.30480061):(f="mi",p/=1609.3472):(0,s.assert)(!1,33);for(var m,E,S,y,x,M,g,b=3*Math.floor(Math.log(h*p)/Math.log(10));;){S=Math.floor(b/3);var T=Math.pow(10,S);if(m=d[(b%3+3)%3]*T,E=Math.round(m/p),isNaN(E))return this.element.style.display="none",void(this.renderedVisible_=!1);if(void 0!==u&&E>=u){m=y,E=x,S=M;break}if(E>=h)break;y=m,x=E,M=S,++b}g=this.scaleBar_?this.createScaleBar(E,m,f):m.toFixed(S<0?-S:0)+" "+f,this.renderedHTML_!=g&&(this.innerElement_.innerHTML=g,this.renderedHTML_=g),this.renderedWidth_!=E&&(this.innerElement_.style.width=E+"px",this.renderedWidth_=E),this.renderedVisible_||(this.element.style.display="",this.renderedVisible_=!0)}else this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1)},n.prototype.createScaleBar=function(e,t,i){for(var r="1 : "+Math.round(this.getScaleForResolution()).toLocaleString(),s=[],n=e/this.scaleBarSteps_,a="ol-scale-singlebar-odd",o=0;o<this.scaleBarSteps_;o++)0===o&&s.push(this.createMarker("absolute",o)),s.push('<div><div class="ol-scale-singlebar '+a+'" style="width: '+n+'px;"></div>'+this.createMarker("relative",o)+(o%2==0||2===this.scaleBarSteps_?this.createStepText(o,e,!1,t,i):"")+"</div>"),o===this.scaleBarSteps_-1&&s.push(this.createStepText(o+1,e,!0,t,i)),a="ol-scale-singlebar-odd"===a?"ol-scale-singlebar-even":"ol-scale-singlebar-odd";return'<div style="display: flex;">'+(this.scaleBarText_?'<div class="ol-scale-text" style="width: '+e+'px;">'+r+"</div>":"")+s.join("")+"</div>"},n.prototype.createMarker=function(e,t){return'<div class="ol-scale-step-marker" style="position: '+e+";top: "+("absolute"===e?3:-10)+'px;"></div>'},n.prototype.createStepText=function(e,t,i,r,s){var n=(0===e?0:Math.round(r/this.scaleBarSteps_*e*100)/100)+(0===e?"":" "+s);return'<div class="ol-scale-step-text" style="margin-left: '+(0===e?-3:t/this.scaleBarSteps_*-1)+"px;
290text-align: "+(0===e?"left":"center")+"; min-width: "+(0===e?0:t/this.scaleBarSteps_*2)+"px;left: "+(i?t+"px":"unset")+';">'+n+"</div>"},n.prototype.getScaleForResolution=function(){var e=(0,r.getPointResolution)(this.viewState_.projection,this.viewState_.resolution,this.viewState_.center,t.default.METERS),i=this.dpi_||c;return parseFloat(e.toString())*(1e3/25.4)*i},n.prototype.render=function(e){var t=e.frameState;this.viewState_=t?t.viewState:null,this.updateElement_()},n}(e.default),h=exports.default=p;
291},{"./Control.js":"xxE2","../proj/Units.js":"yZx6","../css.js":"HgMV","../proj.js":"Diht","../asserts.js":"fLG6"}],"AKwM":[function(require,module,exports) {
292"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=l(require("./Control.js")),e=l(require("../events/EventType.js")),i=l(require("../pointer/EventType.js")),r=require("../css.js"),n=require("../math.js"),o=require("../easing.js"),s=require("../events.js"),a=require("../events/Event.js");function l(t){return t&&t.__esModule?t:{default:t}}var d=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),h={VERTICAL:0,HORIZONTAL:1},u=function(t){function l(n){var o=this,s=n||{};(o=t.call(this,{element:document.createElement("div"),render:s.render})||this).dragListenerKeys_=[],o.currentResolution_=void 0,o.direction_=h.VERTICAL,o.dragging_,o.heightLimit_=0,o.widthLimit_=0,o.startX_,o.startY_,o.thumbSize_=null,o.sliderInitialized_=!1,o.duration_=void 0!==s.duration?s.duration:200;var l=void 0!==s.className?s.className:"ol-zoomslider",d=document.createElement("button");d.setAttribute("type","button"),d.className=l+"-thumb "+r.CLASS_UNSELECTABLE;var u=o.element;return u.className=l+" "+r.CLASS_UNSELECTABLE+" "+r.CLASS_CONTROL,u.appendChild(d),u.addEventListener(i.default.POINTERDOWN,o.handleDraggerStart_.bind(o),!1),u.addEventListener(i.default.POINTERMOVE,o.handleDraggerDrag_.bind(o),!1),u.addEventListener(i.default.POINTERUP,o.handleDraggerEnd_.bind(o),!1),u.addEventListener(e.default.CLICK,o.handleContainerClick_.bind(o),!1),d.addEventListener(e.default.CLICK,a.stopPropagation,!1),o}return d(l,t),l.prototype.setMap=function(e){t.prototype.setMap.call(this,e),e&&e.render()},l.prototype.initSlider_=function(){var t=this.element,e=t.offsetWidth,i=t.offsetHeight;if(0===e&&0===i)return this.sliderInitialized_=!1;var r=getComputedStyle(t);e-=parseFloat(r.paddingRight)+parseFloat(r.paddingLeft),i-=parseFloat(r.paddingTop)+parseFloat(r.paddingBottom);var n=t.firstElementChild,o=getComputedStyle(n),s=n.offsetWidth+parseFloat(o.marginRight)+parseFloat(o.marginLeft),a=n.offsetHeight+parseFloat(o.marginTop)+parseFloat(o.marginBottom);return this.thumbSize_=[s,a],e>i?(this.direction_=h.HORIZONTAL,this.widthLimit_=e-s):(this.direction_=h.VERTICAL,this.heightLimit_=i-a),this.sliderInitialized_=!0},l.prototype.handleContainerClick_=function(t){var e=this.getMap().getView(),i=this.getRelativePosition_(t.offsetX-this.thumbSize_[0]/2,t.offsetY-this.thumbSize_[1]/2),r=this.getResolutionForPosition_(i),n=e.getConstrainedZoom(e.getZoomForResolution(r));e.animateInternal({zoom:n,duration:this.duration_,easing:o.easeOut})},l.prototype.handleDraggerStart_=function(t){if(!this.dragging_&&t.target===this.element.firstElementChild){var e=this.element.firstElementChild;if(this.getMap().getView().beginInteraction(),this.startX_=t.clientX-parseFloat(e.style.left),this.startY_=t.clientY-parseFloat(e.style.top),this.dragging_=!0,0===this.dragListenerKeys_.length){var r=this.handleDraggerDrag_,n=this.handleDraggerEnd_,o=this.getMap().getOwnerDocument();this.dragListenerKeys_.push((0,s.listen)(o,i.default.POINTERMOVE,r,this),(0,s.listen)(o,i.default.POINTERUP,n,this))}}},l.prototype.handleDraggerDrag_=function(t){if(this.dragging_){var e=t.clientX-this.startX_,i=t.clientY-this.startY_,r=this.getRelativePosition_(e,i
292);this.currentResolution_=this.getResolutionForPosition_(r),this.getMap().getView().setResolution(this.currentResolution_)}},l.prototype.handleDraggerEnd_=function(t){this.dragging_&&(this.getMap().getView().endInteraction(),this.dragging_=!1,this.startX_=void 0,this.startY_=void 0,this.dragListenerKeys_.forEach(s.unlistenByKey),this.dragListenerKeys_.length=0)},l.prototype.setThumbPosition_=function(t){var e=this.getPositionForResolution_(t),i=this.element.firstElementChild;this.direction_==h.HORIZONTAL?i.style.left=this.widthLimit_*e+"px":i.style.top=this.heightLimit_*e+"px"},l.prototype.getRelativePosition_=function(t,e){var i;return i=this.direction_===h.HORIZONTAL?t/this.widthLimit_:e/this.heightLimit_,(0,n.clamp)(i,0,1)},l.prototype.getResolutionForPosition_=function(t){return this.getMap().getView().getResolutionForValueFunction()(1-t)},l.prototype.getPositionForResolution_=function(t){var e=this.getMap().getView().getValueForResolutionFunction();return(0,n.clamp)(1-e(t),0,1)},l.prototype.render=function(t){if(t.frameState&&(this.sliderInitialized_||this.initSlider_())){var e=t.frameState.viewState.resolution;this.currentResolution_=e,this.setThumbPosition_(e)}},l}(t.default),g=exports.default=u;
293},{"./Control.js":"xxE2","../events/EventType.js":"C8cu","../pointer/EventType.js":"TaSm","../css.js":"HgMV","../math.js":"B96G","../easing.js":"IeCz","../events.js":"UqnM","../events/Event.js":"fKNg"}],"W4Y0":[function(require,module,exports) {
294"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=r(require("./Control.js")),e=r(require("../events/EventType.js")),n=require("../css.js"),o=require("../geom/Polygon.js");function r(t){return t&&t.__esModule?t:{default:t}}var i=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),l=function(t){function r(o){var r=this,i=o||{};(r=t.call(this,{element:document.createElement("div"),target:i.target})||this).extent=i.extent?i.extent:null;var l=void 0!==i.className?i.className:"ol-zoom-extent",a=void 0!==i.label?i.label:"E",u=void 0!==i.tipLabel?i.tipLabel:"Fit to extent",s=document.createElement("button");s.setAttribute("type","button"),s.title=u,s.appendChild("string"==typeof a?document.createTextNode(a):a),s.addEventListener(e.default.CLICK,r.handleClick_.bind(r),!1);var c=l+" "+n.CLASS_UNSELECTABLE+" "+n.CLASS_CONTROL,p=r.element;return p.className=c,p.appendChild(s),r}return i(r,t),r.prototype.handleClick_=function(t){t.preventDefault(),this.handleZoomToExtent()},r.prototype.handleZoomToExtent=function(){var t=this.getMap().getView(),e=this.extent?this.extent:t.getProjection().getExtent();t.fitInternal((0,o.fromExtent)(e))},r}(t.default),a=exports.default=l;
295},{"./Control.js":"xxE2","../events/EventType.js":"C8cu","../css.js":"HgMV","../geom/Polygon.js":"Nwwk"}],"ucqx":[function(require,module,exports) {
296"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"Attribution",{enumerable:!0,get:function(){return e.default}}),Object.defineProperty(exports,"Control",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(exports,"FullScreen",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(exports,"MousePosition",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(exports,"OverviewMap",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(exports,"Rotate",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(exports,"ScaleLine",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(exports,"Zoom",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(exports,"ZoomSlider",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(exports,"ZoomToExtent",{enumerable:!0,get:function(){return f.default}}),exports.defaults=d;var e=s(require("./control/Attribution.js")),t=s(require("./Collection.js")),r=s(require("./control/Rotate.js")),o=s(require("./control/Zoom.js")),n=s(require("./control/Control.js")),u=s(require("./control/FullScreen.js")),i=s(require("./control/MousePosition.js")),l=s(require("./control/OverviewMap.js")),a=s(require("./control/ScaleLine.js")),c=s(require("./control/ZoomSlider.js")),f=s(require("./control/ZoomToExtent.
296js"));function s(e){return e&&e.__esModule?e:{default:e}}function d(n){var u=n||{},i=new t.default;return(void 0===u.zoom||u.zoom)&&i.push(new o.default(u.zoomOptions)),(void 0===u.rotate||u.rotate)&&i.push(new r.default(u.rotateOptions)),(void 0===u.attribution||u.attribution)&&i.push(new e.default(u.attributionOptions)),i}
297},{"./control/Attribution.js":"Q4Cf","./Collection.js":"FnDa","./control/Rotate.js":"sCgw","./control/Zoom.js":"L3CO","./control/Control.js":"xxE2","./control/FullScreen.js":"dOoh","./control/MousePosition.js":"Cbl8","./control/OverviewMap.js":"KMhA","./control/ScaleLine.js":"DK5d","./control/ZoomSlider.js":"AKwM","./control/ZoomToExtent.js":"W4Y0"}],"caOi":[function(require,module,exports) {
298"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=exports.default={ACTIVE:"active"};
299},{}],"jB2p":[function(require,module,exports) {
300"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0,exports.pan=a,exports.zoomByDelta=u;var t=o(require("../Object.js")),e=o(require("./Property.js")),n=require("../easing.js");function o(t){return t&&t.__esModule?t:{default:t}}var r=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),i=function(t){function n(e){var n=t.call(this)||this;return n.on,n.once,n.un,e&&e.handleEvent&&(n.handleEvent=e.handleEvent),n.map_=null,n.setActive(!0),n}return r(n,t),n.prototype.getActive=function(){return this.get(e.default.ACTIVE)},n.prototype.getMap=function(){return this.map_},n.prototype.handleEvent=function(t){return!0},n.prototype.setActive=function(t){this.set(e.default.ACTIVE,t)},n.prototype.setMap=function(t){this.map_=t},n}(t.default);function a(t,e,o){var r=t.getCenterInternal();if(r){var i=[r[0]+e[0],r[1]+e[1]];t.animateInternal({duration:void 0!==o?o:250,easing:n.linear,center:t.getConstrainedCenter(i)})}}function u(t,e,o,r){var i=t.getZoom();if(void 0!==i){var a=t.getConstrainedZoom(i+e),u=t.getResolutionForZoom(a);t.getAnimating()&&t.cancelAnimations(),t.animate({resolution:u,anchor:o,duration:void 0!==r?r:250,easing:n.easeOut})}}var s=exports.default=i;
301},{"../Object.js":"PhPh","./Property.js":"caOi","../easing.js":"IeCz"}],"NSa4":[function(require,module,exports) {
302"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=o(require("./Interaction.js")),e=r(require("../MapBrowserEventType.js"));function r(t){return t&&t.__esModule?t:{default:t}}function n(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(n=function(t){return t?r:e})(t)}function o(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=typeof t&&"function"!=typeof t)return{default:t};var r=n(e);if(r&&r.has(t))return r.get(t);var o={__proto__:null},u=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if("default"!==a&&{}.hasOwnProperty.call(t,a)){var i=u?Object.getOwnPropertyDescriptor(t,a):null;i&&(i.get||i.set)?Object.defineProperty(o,a,i):o[a]=t[a]}return o.default=t,r&&r.set(t,o),o}var u=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),a=function(r){function n(t){var e=r.call(this)||this,n=t||{};return e.delta_=n.delta?n.delta:1,e.duration_=void 0!==n.duration?n.duration:250,e}return u(n,r),n.prototype.handleEvent=function(r){var n=!1;if(r.type==e.default.DBLCLICK){var o=r.originalEvent,u=r.map,a=r.coordinate,i=o.shiftKey?-this.delta_:this.delta_,f=u.getView();(0,t.zoomByDelta)(f,i,a,this.duration_),o.preventDefault(),n=!0}return!n},n}(t.default),i=exports.default=a;
303},{"./Interaction.js":"jB2p","../MapBrowserEventType.js":"YhDM"}],"dnA2":[function(require,module,exports) {
304"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.centroid=a,exports.default=void 0;var t=n(require("./Interaction.js")),e=n(require("../MapBrowserEventType.js"));function n(t){return t&&t.__esModule?t:{default:t}}var o=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),r=function(t){function n(e){var n=this,o=e||{};return n=t.call(this,o)||this,o.handleDownEvent&&(n.handleDownEvent=o.handleDownEvent),o.handleDragEvent&&(n.handleDragEvent=o.handleDragEvent),o.handleMoveEvent&&(n.handleMoveEvent=o.handleMoveEvent),o.handleUpEvent&&(n.handleUpEvent=o.handleUpEvent),o.stopDown&&(n.stopDown=o.stopDown),n.handlingDownUpSequence=!1,n.targetPointers=[],n}return o(n,t),n.prototype.getPointerCount=function(){return this.targetPointers.length},n.prototype.handleDownEvent=function(t){return!1},n.prototype.handleDragEvent=function(t){},n.prototype.handleEvent=function(t){if(!t.originalEvent)return!0;var n=!1;if(this.updateTrackedPointers_(t),this.handlingDownUpSequence){if(t.type==e.default.POINTERDRAG)this.handleDragEvent(t),t.originalEvent.preventDefault();else if(t.type==e.default.POINTERUP){var o=this.handleUpEvent(t);this.handlingDownUpSequence=o&&this.targetPointers.length>0}}else if(t.type==e.default.POINTERDOWN){var r=this.handleDownEvent(t);this.handlingDownUpSequence=r,n=this.stopDown(r)}else t.type==e.default.POINTERMOVE&&this.handleMoveEvent(t);return!n},n.prototype.handleMoveEvent=function(t){},n.prototype.handleUpEvent=function(t){return!1},n.prototype.stopDown=function(t){return t},n.prototype.updateTrackedPointers_=function(t){t.activePointers&&(this.targetPointers=t.activePointers)},n}(t.default);function a(t){for(var e=t.length,n=0,o=0,r=0;r<e;r++)n+=t[r].clientX,o+=t[r].clientY;return[n/e,o/e]}var i=exports.default=r;
305},{"./Interaction.js":"jB2p","../MapBrowserEventType.js":"YhDM"}],"YcID":[function(require,module,exports) {
306"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.all=i,exports.touchOnly=exports.targetNotEditable=exports.singleClick=exports.shift
306KeyOnly=exports.primaryAction=exports.pointerMove=exports.platformModifierKeyOnly=exports.penOnly=exports.noModifierKeys=exports.never=exports.mouseOnly=exports.mouseActionButton=exports.focusWithTabindex=exports.focus=exports.doubleClick=exports.click=exports.always=exports.altShiftKeysOnly=exports.altKeyOnly=void 0;var e=o(require("../MapBrowserEventType.js")),t=require("../functions.js"),r=require("../has.js"),n=require("../asserts.js");function o(e){return e&&e.__esModule?e:{default:e}}function i(e){var t=arguments;return function(e){for(var r=!0,n=0,o=t.length;n<o&&(r=r&&t[n](e));++n);return r}}var a=function(e){var t=e.originalEvent;return t.altKey&&!(t.metaKey||t.ctrlKey)&&!t.shiftKey};exports.altKeyOnly=a;var s=function(e){var t=e.originalEvent;return t.altKey&&!(t.metaKey||t.ctrlKey)&&t.shiftKey};exports.altShiftKeysOnly=s;var u=function(e){var t=e.map.getTargetElement(),r=e.map.getOwnerDocument().activeElement;return t.contains(r)};exports.focus=u;var l=function(e){return!e.map.getTargetElement().hasAttribute("tabindex")||u(e)};exports.focusWithTabindex=l;var p=exports.always=t.TRUE,y=function(t){return t.type==e.default.CLICK};exports.click=y;var v=function(e){var t=e.originalEvent;return 0==t.button&&!(r.WEBKIT&&r.MAC&&t.ctrlKey)};exports.mouseActionButton=v;var c=exports.never=t.FALSE,f=function(e){return"pointermove"==e.type};exports.pointerMove=f;var x=function(t){return t.type==e.default.SINGLECLICK};exports.singleClick=x;var K=function(t){return t.type==e.default.DBLCLICK};exports.doubleClick=K;var E=function(e){var t=e.originalEvent;return!t.altKey&&!(t.metaKey||t.ctrlKey)&&!t.shiftKey};exports.noModifierKeys=E;var d=function(e){var t=e.originalEvent;return!t.altKey&&(r.MAC?t.metaKey:t.ctrlKey)&&!t.shiftKey};exports.platformModifierKeyOnly=d;var g=function(e){var t=e.originalEvent;return!t.altKey&&!(t.metaKey||t.ctrlKey)&&t.shiftKey};exports.shiftKeyOnly=g;var m=function(e){var t=e.originalEvent,r=t.target.tagName;return"INPUT"!==r&&"SELECT"!==r&&"TEXTAREA"!==r&&!t.target.isContentEditable};exports.targetNotEditable=m;var h=function(e){var t=e.originalEvent;return(0,n.assert)(void 0!==t,56),"mouse"==t.pointerType};exports.mouseOnly=h;var O=function(e){var t=e.originalEvent;return(0,n.assert)(void 0!==t,56),"touch"===t.pointerType};exports.touchOnly=O;var C=function(e){var t=e.originalEvent;return(0,n.assert)(void 0!==t,56),"pen"===t.pointerType};exports.penOnly=C;var T=function(e){var t=e.originalEvent;return(0,n.assert)(void 0!==t,56),t.isPrimary&&0===t.button};exports.primaryAction=T;
307},{"../MapBrowserEventType.js":"YhDM","../functions.js":"RgA2","../has.js":"f3Nv","../asserts.js":"fLG6"}],"N4gU":[function(require,module,exports) {
308"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=a(require("./Pointer.js")),e=require("../functions.js"),n=require("../events/condition.js"),i=require("../easing.js"),r=require("../coordinate.js");function o(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(o=function(t){return t?n:e})(t)}function a(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=typeof t&&"function"!=typeof t)return{default:t};var n=o(e);if(n&&n.has(t))return n.get(t);var i={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if("default"!==a&&{}.hasOwnProperty.call(t,a)){var s=r?Object.getOwnPropertyDescriptor(t,a):null;s&&(s.get||s.set)?Object.defineProperty(i,a,s):i[a]=t[a]}return i.default=t,n&&n.set(t,i),i}var s=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),c=function(o){function a(t){var i=o.call(this,{stopDown:e.FALSE})||this,r=t||{};i.kinetic_=r.kinetic,i.lastCentroid=null,i.lastPointersCount_,i.panning_=!1;var a=r.condition?r.condition:(0,n.all)(n.noModifierKeys,n.primaryAction);return i.condition_=r.onFocusOnly?(0,n.all)(n.focusWithTabindex,a):a,i.noKinetic_=!1,i}return s(a,o),a.prototype.handleDragEvent=function(e){this.panning_||(this.panning_=!0,this.getMap().getView().beginInteraction());var n=this.targetPointers,i=(0,t.centroid)(n);if(n.length==this.lastPointersCount_){if(this.kinetic_&&this.kinetic_.update(i[0],i[1]),this.lastCentroid){var o=[this.lastCentroid[0]-i[0],i[1]-this.lastCentroid[1]],a=e.map.getView();(0,r.scale)(o,a.getResolution()),(0,r.rotate)(o,a.getRotation()),a.adjustCenterInternal(o)}}else this.kinetic_&&this.kinetic_.begin();this.lastCentroid=i,this.lastPointersCount_=n.length,e.originalEvent.preventDefault()},a.prototype.handleUpEvent=function(t){var e=t.map,n=e.getView();if(0===this.targetPointers.length){if(!this.noKinetic_&&this.kinetic_&&this.kinetic_.end()){var r=this.kinetic_.getDistance(),o=this.kinetic_.getAngle(),a=n.getCenterInternal(),s=e.getPixelFromCo
308ordinateInternal(a),c=e.getCoordinateFromPixelInternal([s[0]-r*Math.cos(o),s[1]-r*Math.sin(o)]);n.animateInternal({center:n.getConstrainedCenter(c),duration:500,easing:i.easeOut})}return this.panning_&&(this.panning_=!1,n.endInteraction()),!1}return this.kinetic_&&this.kinetic_.begin(),this.lastCentroid=null,!0},a.prototype.handleDownEvent=function(t){if(this.targetPointers.length>0&&this.condition_(t)){var e=t.map.getView();return this.lastCentroid=null,e.getAnimating()&&e.cancelAnimations(),this.kinetic_&&this.kinetic_.begin(),this.noKinetic_=this.targetPointers.length>1,!0}return!1},a}(t.default),l=exports.default=c;
309},{"./Pointer.js":"dnA2","../functions.js":"RgA2","../events/condition.js":"YcID","../easing.js":"IeCz","../coordinate.js":"nGsj"}],"PgBj":[function(require,module,exports) {
310"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=r(require("./Pointer.js")),n=require("../functions.js"),o=require("../events/condition.js"),e=require("../rotationconstraint.js");function r(t){return t&&t.__esModule?t:{default:t}}var i=function(){var t=function(n,o){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])})(n,o)};return function(n,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function e(){this.constructor=n}t(n,o),n.prototype=null===o?Object.create(o):(e.prototype=o.prototype,new e)}}(),a=function(t){function r(e){var r=this,i=e||{};return(r=t.call(this,{stopDown:n.FALSE})||this).condition_=i.condition?i.condition:o.altShiftKeysOnly,r.lastAngle_=void 0,r.duration_=void 0!==i.duration?i.duration:250,r}return i(r,t),r.prototype.handleDragEvent=function(t){if((0,o.mouseOnly)(t)){var n=t.map,r=n.getView();if(r.getConstraints().rotation!==e.disable){var i=n.getSize(),a=t.pixel,u=Math.atan2(i[1]/2-a[1],a[0]-i[0]/2);if(void 0!==this.lastAngle_){var s=u-this.lastAngle_;r.adjustRotationInternal(-s)}this.lastAngle_=u}}},r.prototype.handleUpEvent=function(t){return!(0,o.mouseOnly)(t)||(t.map.getView().endInteraction(this.duration_),!1)},r.prototype.handleDownEvent=function(t){return!!(0,o.mouseOnly)(t)&&(!(!(0,o.mouseActionButton)(t)||!this.condition_(t))&&(t.map.getView().beginInteraction(),this.lastAngle_=void 0,!0))},r}(t.default),u=exports.default=a;
311},{"./Pointer.js":"dnA2","../functions.js":"RgA2","../events/condition.js":"YcID","../rotationconstraint.js":"EKd0"}],"bMDg":[function(require,module,exports) {
312"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=n(require("../Disposable.js")),e=n(require("../geom/Polygon.js"));function n(t){return t&&t.__esModule?t:{default:t}}var r=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),o=function(t){function n(e){var n=t.call(this)||this;return n.geometry_=null,n.element_=document.createElement("div"),n.element_.style.position="absolute",n.element_.style.pointerEvents="auto",n.element_.className="ol-box "+e,n.map_=null,n.startPixel_=null,n.endPixel_=null,n}return r(n,t),n.prototype.disposeInternal=function(){this.setMap(null)},n.prototype.render_=function(){var t=this.startPixel_,e=this.endPixel_,n=this.element_.style;n.left=Math.min(t[0],e[0])+"px",n.top=Math.min(t[1],e[1])+"px",n.width=Math.abs(e[0]-t[0])+"px",n.height=Math.abs(e[1]-t[1])+"px"},n.prototype.setMap=function(t){if(this.map_){this.map_.getOverlayContainer().removeChild(this.element_);var e=this.element_.style;e.left="inherit",e.top="inherit",e.width="inherit",e.height="inherit"}this.map_=t,this.map_&&this.map_.getOverlayContainer().appendChild(this.element_)},n.prototype.setPixels=function(t,e){this.startPixel_=t,this.endPixel_=e,this.createOrUpdateGeometry(),this.render_()},n.prototype.createOrUpdateGeometry=function(){var t=this.startPixel_,n=this.endPixel_,r=[t,[t[0],n[1]],n,[n[0],t[1]]].map(this.map_.getCoordinateFromPixelInternal,this.map_);r[4]=r[0].slice(),this.geometry_?this.geometry_.setCoordinates([r]):this.geometry_=new e.default([r])},n.prototype.getGeometry=function(){return this.geometry_},n}(t.default),i=exports.default=o;
313},{"../Disposable.js":"DDda","../geom/Polygon.js":"Nwwk"}],"AQRw":[function(require,module,exports) {
314"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.DragBoxEvent=void 0;var t=r(require("../events/Event.js")),n=r(require("./Pointer.js")),o=r(require("../render/Box.js")),e=require("../events/condition.js");function r(t){return t&&t.__esModule?t:{default:t}}var i=function(){var t=function(n,o){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])})(n,o)};return function(n,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function e(){this.constructor=n}t(n,o),n.prototype=null===o?Object.create(o):(e.prototype=o.prototype,new e)}}(),s={BOXSTART:"boxstart",BOXDRAG:"boxdrag",BOXEND:"boxend",BOXCANCEL:"boxcancel"},a=exports.DragBoxEvent=function(t){function n(n,o,e){var r=t.call(this,n)||this;
314return r.coordinate=o,r.mapBrowserEvent=e,r}return i(n,t),n}(t.default),u=function(t){function n(n){var r=t.call(this)||this;r.on,r.once,r.un;var i=n||{};return r.box_=new o.default(i.className||"ol-dragbox"),r.minArea_=void 0!==i.minArea?i.minArea:64,i.onBoxEnd&&(r.onBoxEnd=i.onBoxEnd),r.startPixel_=null,r.condition_=i.condition?i.condition:e.mouseActionButton,r.boxEndCondition_=i.boxEndCondition?i.boxEndCondition:r.defaultBoxEndCondition,r}return i(n,t),n.prototype.defaultBoxEndCondition=function(t,n,o){var e=o[0]-n[0],r=o[1]-n[1];return e*e+r*r>=this.minArea_},n.prototype.getGeometry=function(){return this.box_.getGeometry()},n.prototype.handleDragEvent=function(t){this.box_.setPixels(this.startPixel_,t.pixel),this.dispatchEvent(new a(s.BOXDRAG,t.coordinate,t))},n.prototype.handleUpEvent=function(t){this.box_.setMap(null);var n=this.boxEndCondition_(t,this.startPixel_,t.pixel);return n&&this.onBoxEnd(t),this.dispatchEvent(new a(n?s.BOXEND:s.BOXCANCEL,t.coordinate,t)),!1},n.prototype.handleDownEvent=function(t){return!!this.condition_(t)&&(this.startPixel_=t.pixel,this.box_.setMap(t.map),this.box_.setPixels(this.startPixel_,this.startPixel_),this.dispatchEvent(new a(s.BOXSTART,t.coordinate,t)),!0)},n.prototype.onBoxEnd=function(t){},n}(n.default),d=exports.default=u;
315},{"../events/Event.js":"fKNg","./Pointer.js":"dnA2","../render/Box.js":"bMDg","../events/condition.js":"YcID"}],"pTqW":[function(require,module,exports) {
316"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=n(require("./DragBox.js")),o=require("../easing.js"),e=require("../events/condition.js");function n(t){return t&&t.__esModule?t:{default:t}}var r=function(){var t=function(o,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,o){t.__proto__=o}||function(t,o){for(var e in o)Object.prototype.hasOwnProperty.call(o,e)&&(t[e]=o[e])})(o,e)};return function(o,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=o}t(o,e),o.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}}(),i=function(t){function n(o){var n=this,r=o||{},i=r.condition?r.condition:e.shiftKeyOnly;return(n=t.call(this,{condition:i,className:r.className||"ol-dragzoom",minArea:r.minArea})||this).duration_=void 0!==r.duration?r.duration:200,n.out_=void 0!==r.out&&r.out,n}return r(n,t),n.prototype.onBoxEnd=function(t){var e=this.getMap().getView(),n=this.getGeometry();if(this.out_){var r=e.rotatedExtentForGeometry(n),i=e.getResolutionForExtentInternal(r),u=e.getResolution()/i;(n=n.clone()).scale(u*u)}e.fitInternal(n,{duration:this.duration_,easing:o.easeOut})},n}(t.default),u=exports.default=i;
317},{"./DragBox.js":"AQRw","../easing.js":"IeCz","../events/condition.js":"YcID"}],"mmJk":[function(require,module,exports) {
318"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=exports.default={LEFT:37,UP:38,RIGHT:39,DOWN:40};
319},{}],"CFRo":[function(require,module,exports) {
320"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=a(require("../events/EventType.js")),e=u(require("./Interaction.js")),n=a(require("../events/KeyCode.js")),r=require("../events/condition.js"),o=require("../coordinate.js");function i(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(i=function(t){return t?n:e})(t)}function u(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=typeof t&&"function"!=typeof t)return{default:t};var n=i(e);if(n&&n.has(t))return n.get(t);var r={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in t)if("default"!==u&&{}.hasOwnProperty.call(t,u)){var a=o?Object.getOwnPropertyDescriptor(t,u):null;a&&(a.get||a.set)?Object.defineProperty(r,u,a):r[u]=t[u]}return r.default=t,n&&n.set(t,r),r}function a(t){return t&&t.__esModule?t:{default:t}}var l=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),f=function(i){function u(t){var e=i.call(this)||this,n=t||{};return e.defaultCondition_=function(t){return(0,r.noModifierKeys)(t)&&(0,r.targetNotEditable)(t)},e.condition_=void 0!==n.condition?n.condition:e.defaultCondition_,e.duration_=void 0!==n.duration?n.duration:100,e.pixelDelta_=void 0!==n.pixelDelta?n.pixelDelta:128,e}return l(u,i),u.prototype.handleEvent=function(r){var i=!1;if(r.type==t.default.KEYDOWN){var u=r.originalEvent,a=u.keyCode;if(this.condition_(r)&&(a==n.default.DOWN||a==n.default.LEFT||a==n.default.RIGHT||a==n.default.UP)){var l=r.map.getView(),f=l.getResolution()*this.pixelDelta_,c=0,d=0;a==n.default.DOWN?d=-f:a==n.default.LEFT?c=-f:a==n.default.RIGHT?c=f:d=f;var p=[c,d];(0,o.rotate)(p,l.getRotation()),(0,e.pan)(l,p,this.duration_),u.preventDefault(),i=!0}}return!i},u}(e.default),c=exports.default=f;
321},{"../events/EventType.js":"C8cu","./Interaction.js":"jB2p","../events/KeyCode.js":"mmJk","../events/condition.js":"YcID","../coordinate.js":"nGsj"}],"S8wR":[function(require,module,exports) {
322"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=i(require("../events/EventType.js")),e=o(require("./Interaction.js")),r=require("../events/condition.js");function n(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(n=function(t){return t?r:e})(t)}function o(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=typeof t&&"function"!=typeof t)return{default:t};var r=n(e);if(r&&r.has(t))return r.get(t);var o={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if("default"!==a&&{}.hasOwnProperty.call(t,a)){var u=i?Object.getOwnPropertyDescriptor(t,a):null;u&&(u.get||u.set)?Object.defineProperty(o,a,u):o[a]=t[a]}return o.default=t,r&&r.set(t,o),o}function i(t){return t&&t.__esModule?t:{default:t}}var a=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),u=function(n){function o(t){var e=n.call(this)||this,o=t||{};return e.condition_=o.condition?o.condition:r.targetNotEditable,e.delta_=o.delta?o.delta:1,e.duration_=void 0!==o.duration?o.duration:100,e}return a(o,n),o.prototype.handleEvent=function(r){var n=!1;if(r.type==t.default.KEYDOWN||r.type==t.default.KEYPRESS){var o=r.originalEvent,i=o.charCo
322de;if(this.condition_(r)&&(i=="+".charCodeAt(0)||i=="-".charCodeAt(0))){var a=r.map,u=i=="+".charCodeAt(0)?this.delta_:-this.delta_,c=a.getView();(0,e.zoomByDelta)(c,u,void 0,this.duration_),o.preventDefault(),n=!0}}return!n},o}(e.default),c=exports.default=u;
323},{"../events/EventType.js":"C8cu","./Interaction.js":"jB2p","../events/condition.js":"YcID"}],"gAnK":[function(require,module,exports) {
324"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=function(){function t(t,i,n){this.decay_=t,this.minVelocity_=i,this.delay_=n,this.points_=[],this.angle_=0,this.initialVelocity_=0}return t.prototype.begin=function(){this.points_.length=0,this.angle_=0,this.initialVelocity_=0},t.prototype.update=function(t,i){this.points_.push(t,i,Date.now())},t.prototype.end=function(){if(this.points_.length<6)return!1;var t=Date.now()-this.delay_,i=this.points_.length-3;if(this.points_[i+2]<t)return!1;for(var n=i-3;n>0&&this.points_[n+2]>t;)n-=3;var e=this.points_[i+2]-this.points_[n+2];if(e<1e3/60)return!1;var s=this.points_[i]-this.points_[n],o=this.points_[i+1]-this.points_[n+1];return this.angle_=Math.atan2(o,s),this.initialVelocity_=Math.sqrt(s*s+o*o)/e,this.initialVelocity_>this.minVelocity_},t.prototype.getDistance=function(){return(this.minVelocity_-this.initialVelocity_)/this.decay_},t.prototype.getAngle=function(){return this.angle_},t}(),i=exports.default=t;
325},{}],"kPt6":[function(require,module,exports) {
326"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.Mode=void 0;var t=s(require("../events/EventType.js")),e=a(require("./Interaction.js")),o=require("../has.js"),i=require("../events/condition.js"),n=require("../math.js");function r(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,o=new WeakMap;return(r=function(t){return t?o:e})(t)}function a(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=typeof t&&"function"!=typeof t)return{default:t};var o=r(e);if(o&&o.has(t))return o.get(t);var i={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if("default"!==a&&{}.hasOwnProperty.call(t,a)){var s=n?Object.getOwnPropertyDescriptor(t,a):null;s&&(s.get||s.set)?Object.defineProperty(i,a,s):i[a]=t[a]}return i.default=t,o&&o.set(t,i),i}function s(t){return t&&t.__esModule?t:{default:t}}var u=function(){var t=function(e,o){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function i(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}(),l=exports.Mode={TRACKPAD:"trackpad",WHEEL:"wheel"},_=function(r){function a(t){var e=this,o=t||{};(e=r.call(this,o)||this).totalDelta_=0,e.lastDelta_=0,e.maxDelta_=void 0!==o.maxDelta?o.maxDelta:1,e.duration_=void 0!==o.duration?o.duration:250,e.timeout_=void 0!==o.timeout?o.timeout:80,e.useAnchor_=void 0===o.useAnchor||o.useAnchor,e.constrainResolution_=void 0!==o.constrainResolution&&o.constrainResolution;var n=o.condition?o.condition:i.always;return e.condition_=o.onFocusOnly?(0,i.all)(i.focusWithTabindex,n):n,e.lastAnchor_=null,e.startTime_=void 0,e.timeoutId_,e.mode_=void 0,e.trackpadEventGap_=400,e.trackpadTimeoutId_,e.deltaPerZoom_=300,e}return u(a,r),a.prototype.endInteraction_=function(){this.trackpadTimeoutId_=void 0;var t=this.getMap();t&&t.getView().endInteraction(void 0,this.lastDelta_?this.lastDelta_>0?1:-1:0,this.lastAnchor_)},a.prototype.handleEvent=function(e){if(!this.condition_(e))return!0;if(e.type!==t.default.WHEEL)return!0;var i,n=e.map,r=e.originalEvent;if(r.preventDefault(),this.useAnchor_&&(this.lastAnchor_=e.coordinate),e.type==t.default.WHEEL&&(i=r.deltaY,o.FIREFOX&&r.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(i/=o.DEVICE_PIXEL_RATIO),r.deltaMode===WheelEvent.DOM_DELTA_LINE&&(i*=40)),0===i)return!1;this.lastDelta_=i;var a=Date.now();void 0===this.startTime_&&(this.startTime_=a),(!this.mode_||a-this.startTime_>this.trackpadEventGap_)&&(this.mode_=Math.abs(i)<4?l.TRACKPAD:l.WHEEL);var s=n.getView();if(this.mode_===l.TRACKPAD&&!s.getConstrainResolution()&&!this.constrainResolution_)return this.trackpadTimeoutId_?clearTimeout(this.trackpadTimeoutId_):(s.getAnimating()&&s.cancelAnimations(),s.beginInteraction()),this.trackpadTimeoutId_=setTimeout(this.endInteraction_.bind(this),this.timeout_),s.adju
326stZoom(-i/this.deltaPerZoom_,this.lastAnchor_),this.startTime_=a,!1;this.totalDelta_+=i;var u=Math.max(this.timeout_-(a-this.startTime_),0);return clearTimeout(this.timeoutId_),this.timeoutId_=setTimeout(this.handleWheelZoom_.bind(this,n),u),!1},a.prototype.handleWheelZoom_=function(t){var o=t.getView();o.getAnimating()&&o.cancelAnimations();var i=-(0,n.clamp)(this.totalDelta_,-this.maxDelta_*this.deltaPerZoom_,this.maxDelta_*this.deltaPerZoom_)/this.deltaPerZoom_;(o.getConstrainResolution()||this.constrainResolution_)&&(i=i?i>0?1:-1:0),(0,e.zoomByDelta)(o,i,this.lastAnchor_,this.duration_),this.mode_=void 0,this.totalDelta_=0,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_=void 0},a.prototype.setMouseAnchor=function(t){this.useAnchor_=t,t||(this.lastAnchor_=null)},a}(e.default),c=exports.default=_;
327},{"../events/EventType.js":"C8cu","./Interaction.js":"jB2p","../has.js":"f3Nv","../events/condition.js":"YcID","../math.js":"B96G"}],"hbGN":[function(require,module,exports) {
328"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=o(require("./Pointer.js")),e=require("../functions.js"),n=require("../rotationconstraint.js");function r(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(r=function(t){return t?n:e})(t)}function o(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=typeof t&&"function"!=typeof t)return{default:t};var n=r(e);if(n&&n.has(t))return n.get(t);var o={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if("default"!==a&&{}.hasOwnProperty.call(t,a)){var s=i?Object.getOwnPropertyDescriptor(t,a):null;s&&(s.get||s.set)?Object.defineProperty(o,a,s):o[a]=t[a]}return o.default=t,n&&n.set(t,o),o}var i=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),a=function(r){function o(t){var n=this,o=t||{},i=o;return i.stopDown||(i.stopDown=e.FALSE),(n=r.call(this,i)||this).anchor_=null,n.lastAngle_=void 0,n.rotating_=!1,n.rotationDelta_=0,n.threshold_=void 0!==o.threshold?o.threshold:.3,n.duration_=void 0!==o.duration?o.duration:250,n}return i(o,r),o.prototype.handleDragEvent=function(e){var r=0,o=this.targetPointers[0],i=this.targetPointers[1],a=Math.atan2(i.clientY-o.clientY,i.clientX-o.clientX);if(void 0!==this.lastAngle_){var s=a-this.lastAngle_;this.rotationDelta_+=s,!this.rotating_&&Math.abs(this.rotationDelta_)>this.threshold_&&(this.rotating_=!0),r=s}this.lastAngle_=a;var l=e.map,u=l.getView();if(u.getConstraints().rotation!==n.disable){var c=l.getViewport().getBoundingClientRect(),h=(0,t.centroid)(this.targetPointers);h[0]-=c.left,h[1]-=c.top,this.anchor_=l.getCoordinateFromPixelInternal(h),this.rotating_&&(l.render(),u.adjustRotationInternal(r,this.anchor_))}},o.prototype.handleUpEvent=function(t){return!(this.targetPointers.length<2)||(t.map.getView().endInteraction(this.duration_),!1)},o.prototype.handleDownEvent=function(t){if(this.targetPointers.length>=2){var e=t.map;return this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.handlingDownUpSequence||e.getView().beginInteraction(),!0}return!1},o}(t.default),s=exports.default=a;
329},{"./Pointer.js":"dnA2","../functions.js":"RgA2","../rotationconstraint.js":"EKd0"}],"rcXm":[function(require,module,exports) {
330"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=r(require("./Pointer.js")),e=require("../functions.js");function n(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(n=function(t){return t?r:e})(t)}function r(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=typeof t&&"function"!=typeof t)return{default:t};var r=n(e);if(r&&r.has(t))return r.get(t);var o={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if("default"!==a&&{}.hasOwnProperty.call(t,a)){var s=i?Object.getOwnPropertyDescriptor(t,a):null;s&&(s.get||s.set)?Object.defineProperty(o,a,s):o[a]=t[a]}return o.default=t,r&&r.set(t,o),o}var o=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=function(n){function r(t){var r=this,o=t||{},i=o;return i.stopDown||(i.stopDown=e.FALSE),(r=n.call(this,i)||this).anchor_=null,r.duration_=void 0!==o.duration?o.duration:400,r.lastDistance_=void 0,r.lastScaleDelta_=1,r}return o(r,n),r.prototype.handleDragEvent=function(e){var n=1,r=this.targetPointers[0],o=this.targetPointers[1],i=r.clientX-o.clientX,a=r.clientY-o.clientY,s=Math.sqrt(i*i+a*a);void 0!==this.lastDistance_&&(n=this.lastDistance_/s),this.lastDistance_=s;var l=e.map,u=l.getView();1!=n&&(this.lastScaleDelta_=n);var c=l.getViewport().getBoundingClientRect(),p=(0,t.centroid)(this.targetPointers);p[0]-=c.left,p[1]-=c.top,this.anchor_=l.getCoordinateFromPixelInternal(p),l.render(),u.adjustResolutionInternal(n,this.anchor_)},r.prototype.handleUpEvent=function(t){if(this.targetPointers.length<2){var e=t.map.getView(),n=this.lastScaleDelta_>1?1:-1;return e.endInteraction(this.duration_,n),!1}return!0},r.prototype.handleDownEvent=function(t){if(this.targetPointers.length>=2){var e=t.map;return this.anchor_=null,this.lastDistance_=void 0,this.lastScaleDelta_=1,this.handlingDownUpSequence||e.getView().beginInteraction(),!0}return!1},r}(t.default),a=exports.default=i;
331},{"./Pointer.js":"dnA2","../functions.js":"RgA2"}],"IYO6":[function(require,module,exports) {
332"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.DragAndDropEvent=void 0;var t=i(require("../events/Event.js")),e=i(require("../events/EventType.js")),r=i(require("./Interaction.js")),n=require("../functions.js"),s=require("../proj.js"),o=require("../events.js");function i(t){return t&&t.__esModule?t:{default:t}}var a=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),u={ADD_FEATURES:"addfeatures"},f=exports.DragAndDropEvent=function(t){function e(e,r,n,s){var o=t.call(this,e)||this;return o.features=n,o.file=r,o.projection=s,o}return a(e,t),e}(t.default),p=function(t){function r(e){var r=this,o=e||{};(r=t.call(this,{handleEvent:n.TRUE})||this).on,r.once,r.un,r.readAsBuffer_=!1,r.formats_=[];for(var i=o.formatConstructors?o.formatConstructors:[],a=0,u=i.length;a<u;++a){var f=i[a];"function"==typeof f&&(f=new f),r.formats_.push(f),r.readAsBuffer_=r.readAsBuffer_||"arraybuffer"===f.getType()}return r.projection_=o.projection?(0,s.get)(o.projection):null,r.dropListenKeys_=null,r.source_=o.source||null,r.target=
vendor: 17,872 bytes, lines 332-346
332o.target?o.target:null,r}return a(r,t),r.prototype.handleResult_=function(t,e){var r,n=e.target.result,s=this.getMap(),o=this.projection_;o||(o=s.getView().getProjection());for(var i=this.formats_,a=0,p=i.length;a<p;++a){var l=i[a],c=n;this.readAsBuffer_&&"arraybuffer"!==l.getType()&&(void 0===r&&(r=(new TextDecoder).decode(n)),c=r);var h=this.tryReadFeatures_(l,c,{featureProjection:o});if(h&&h.length>0){this.source_&&(this.source_.clear(),this.source_.addFeatures(h)),this.dispatchEvent(new f(u.ADD_FEATURES,t,h,o));break}}},r.prototype.registerListeners_=function(){var t=this.getMap();if(t){var r=this.target?this.target:t.getViewport();this.dropListenKeys_=[(0,o.listen)(r,e.default.DROP,this.handleDrop,this),(0,o.listen)(r,e.default.DRAGENTER,this.handleStop,this),(0,o.listen)(r,e.default.DRAGOVER,this.handleStop,this),(0,o.listen)(r,e.default.DROP,this.handleStop,this)]}},r.prototype.setActive=function(e){!this.getActive()&&e&&this.registerListeners_(),this.getActive()&&!e&&this.unregisterListeners_(),t.prototype.setActive.call(this,e)},r.prototype.setMap=function(e){this.unregisterListeners_(),t.prototype.setMap.call(this,e),this.getActive()&&this.registerListeners_()},r.prototype.tryReadFeatures_=function(t,e,r){try{return t.readFeatures(e,r)}catch(n){return null}},r.prototype.unregisterListeners_=function(){this.dropListenKeys_&&(this.dropListenKeys_.forEach(o.unlistenByKey),this.dropListenKeys_=null)},r.prototype.handleDrop=function(t){for(var r=t.dataTransfer.files,n=0,s=r.length;n<s;++n){var o=r.item(n),i=new FileReader;i.addEventListener(e.default.LOAD,this.handleResult_.bind(this,o)),this.readAsBuffer_?i.readAsArrayBuffer(o):i.readAsText(o)}},r.prototype.handleStop=function(t){t.stopPropagation(),t.preventDefault(),t.dataTransfer.dropEffect="copy"},r}(r.default),l=exports.default=p;
333},{"../events/Event.js":"fKNg","../events/EventType.js":"C8cu","./Interaction.js":"jB2p","../functions.js":"RgA2","../proj.js":"Diht","../events.js":"UqnM"}],"ITeC":[function(require,module,exports) {
334"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=n(require("./Pointer.js")),e=require("../events/condition.js");function n(t){return t&&t.__esModule?t:{default:t}}var i=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),o=function(t){function n(n){var i=this,o=n||{};return(i=t.call(this,o)||this).condition_=o.condition?o.condition:e.shiftKeyOnly,i.lastAngle_=void 0,i.lastMagnitude_=void 0,i.lastScaleDelta_=0,i.duration_=void 0!==o.duration?o.duration:400,i}return i(n,t),n.prototype.handleDragEvent=function(t){if((0,e.mouseOnly)(t)){var n=t.map,i=n.getSize(),o=t.pixel,a=o[0]-i[0]/2,r=i[1]/2-o[1],s=Math.atan2(r,a),l=Math.sqrt(a*a+r*r),u=n.getView();if(void 0!==this.lastAngle_){var d=this.lastAngle_-s;u.adjustRotationInternal(d)}this.lastAngle_=s,void 0!==this.lastMagnitude_&&u.adjustResolutionInternal(this.lastMagnitude_/l),void 0!==this.lastMagnitude_&&(this.lastScaleDelta_=this.lastMagnitude_/l),this.lastMagnitude_=l}},n.prototype.handleUpEvent=function(t){if(!(0,e.mouseOnly)(t))return!0;var n=t.map.getView(),i=this.lastScaleDelta_>1?1:-1;return n.endInteraction(this.duration_,i),this.lastScaleDelta_=0,!1},n.prototype.handleDownEvent=function(t){return!!(0,e.mouseOnly)(t)&&(!!this.condition_(t)&&(t.map.getView().beginInteraction(),this.lastAngle_=void 0,this.lastMagnitude_=void 0,!0))},n}(t.default),a=exports.default=o;
335},{"./Pointer.js":"dnA2","../events/condition.js":"YcID"}],"AyCw":[function(require,module,exports) {
336"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=i(require("./SimpleGeometry.js")),e=require("../extent.js"),r=require("./flat/deflate.js"),o=require("./flat/transform.js");function i(t){return t&&t.__esModule?t:{default:t}}var n=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function o(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),s=function(t){function i(e,r,o){var i=t.call(this)||this;if(void 0!==o&&void 0===r)i.setFlatCoordinates(o,e);else{var n=r||0;i.setCenterAndRadius(e,n,o)}return i}return n(i,t),i.prototype.clone=function(){var t=new i(this.flatCoordinates.slice(),void 0,this.layout);return t.applyProperties(this),t},i.prototype.closestPointXY=function(t,e,r,o){var i=this.flatCoordinates,n=t-i[0],s=e-i[1],a=n*n+s*s;if(a<o){if(0===a)for(var u=0;u<this.stride;++u)r[u]=i[u];else{var d=this.getRadius()/Math.sqrt(a);r[0]=i[0]+d*n,r[1]=i[1]+d*s;for(u=2;u<this.stride;++u)r[u]=i[u]}return r.length=this.stride,a}return o},i.prototype.containsXY=function(t,e){var r=this.flatCoordinates,o=t-r[0],i=e-r[1];return o*o+i*i<=this.getRadiusSquared_()},i.prototype.getCenter=function(){return this.flatCoordinates.slice(0,this.stride)},i.prototype.computeExtent=function(t){var r=this.flatCoordinates,o=r[this.stride]-r[0];return(0,e.createOrUpdate)(r[0]-o,r[1]-o,r[0]+o,r[1]+o,t)},i.prototype.getRadius=function(){return Math.sqrt(this.getRadiusSquared_())},i.prototype.getRadiusSquared_=function(){var t=this.flatCoordinates[this.stride]-this.flatCoordinates[0],e=this.flatCoordinates[this.stride+1]-this.flatCoordinates[1];return t*t+e*e},i.prototype.getType=function(){return"Circle"},i.prototype.intersectsExtent=function(t){var r=this.getExtent();if((0,e.intersects)(t,r)){var o=this.getCenter();return t[0]<=o[0]&&t[2]>=o[0]||(t[1]<=o[1]&&t[3]>=o[1]||(0,e.forEachCorner)(t,this.intersectsCoordinate.bind(this)))}return!1},i.prototype.setCenter=function(t){var e=this.stride,r=this.flatCoordinates[e]-this.flatCoordinates[0],o=t.slice();o[e]=o[0]+r;for(var i=1;i<e;++i)o[e+i]=t[i];this.setFlatCoordinates(this.layout,o),this.changed()},i.prototype.setCenterAndRadius=function(t,e,o){this.setLayout(o,t,0),this.flatCoordinates||(this.flatCoordinates=[]);var i=this.flatCoordinates,n=(0,r.deflateCoordinate)(i,0,t,this.stride);i[n++]=i[0]+e;for(var s=1,a=this.stride;s<a;++s)i[n++]=i[s];i.length=n,this.changed()},i.prototype.getCoordinates=function(){return null},i.prototype.setCoordinates=function(t,e){},i.prototype.setRadius=function(t){this.flatCoordinates[this.stride]=this.flatCoordinates[0]+t,this.changed()},i.prototype.rotate=function(t,e){var r=this.getCenter(),i=this.getStride();this.setCenter((0,o.rotate)(r,0,r.length,i,t,e,r)),this.changed()},i.prototype.translate=function(t,e){var r=this.getCenter(),i=this.getStride();this.setCenter((0,o.translate)(r,0,r.length,i,t,e,r)),this.changed()},i}(t.default);s.prototype.transform;var a=exports.default=s;
337},{"./SimpleGeometry.js":"pnrv","../extent.js":"QDir","./flat/deflate.js":"FNhl","./flat/transform.js":"LGwr"}],"mYW9":[function(require,module,exports) {
338"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.createStyleFunction=y,exports.default=void 0;var e=o(require("./Object.js")),t=o(require("./events/EventType.js")),n=require("./asserts.js"),r=require("./events.js");function o(e){return e&&e.__esModule?e:{default:e}}var i=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),s=function(e){function n(t){var n=e.call(this)||this;if(n.on,n.once,n.un,n.id_=void 0,n.geometryName_="geometry",n.style_=null,n.styleFunction_=void 0,n.geometryChangeKey_=null,n.addChangeListener(n.geometryName_,n.handleGeometryChanged_),t)if("function"==typeof t.getSimplifiedGeometry){var r=t;n.setGeometry(r)}else{var o=t;n.setProperties(o)}return n}return i(n,e),n.prototype.clone=function(){var e=new n(this.hasProperties()?this.getProperties():null);e.setGeometryName(this.getGeometryName());var t=this.getGeometry();t&&e.setGeometry(t.clone());var r=this.getStyle();return r&&e.setStyle(r),e},n.prototype.getGeometry=function(){return this.get(this.geometryName_)},n.prototype.getId=function(){return this.id_},n.prototype.getGeometryName=function(){return this.geometryName_},n.prototype.getStyle=function(){return this.style_},n.prototype.getStyleFunction=function(){return this.styleFunction_},n.prototype.handleGeometryChange_=function(){this.changed()},n.prototype.handleGeometryChanged_=function(){this.geometryChangeKey_&&((0,r.unlistenByKey)(this.geometryChangeKey_),this.geometryChangeKey_=null);var e=this.getGeometry();e&&(this.geometryChangeKey_=(0,r.listen)(e,t.default.CHANGE,this.handleGeometryChange_,this)),this.changed()},n.prototype.setGeometry=function(e){this.set(this.geometryName_,e)},n.prototype.setStyle=function(e){this.style_=e,this.styleFunction_=e?y(e):void 0,this.changed()},n.prototype.setId=function(e){this.id_=e,this.changed()},n.prototype.setGeometryName=function(e){this.removeChangeListener(this.geometryName_,this.handleGeometryChanged_),this.geometryName_=e,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),this.handleGeometryChanged_()},n}(e.default);function y(e){return"function"==typeof e?e:(Array.isArray(e)?t=e:((0,n.assert)("function"==typeof e.getZIndex,41),t=[e]),function(){return t});var t}var a=exports.default=s;
339},{"./Object.js":"PhPh","./events/EventType.js":"C8cu","./asserts.js":"fLG6","./events.js":"UqnM"}],"rDTq":[function(require,module,exports) {
340"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.interpolatePoint=n,exports.lineStringCoordinateAtM=t,exports.lineStringsCoordinateAtM=i;var r=require("../../array.js"),e=require("../../math.js");function n(n,t,i,l,u,a,f){var o,s,v=(i-t)/l;if(1===v)o=t;else if(2===v)o=t,s=u;else if(0!==v){for(var c=n[t],p=n[t+1],h=0,d=[0],g=t+l;g<i;g+=l){var x=n[g],y=n[g+1];h+=Math.sqrt((x-c)*(x-c)+(y-p)*(y-p)),d.push(h),c=x,p=y}var M=u*h,j=(0,r.binarySearch)(d,M);j<0?(s=(M-d[-j-2])/(d[-j-1]-d[-j-2]),o=t+(-j-2)*l):o=t+j*l}var q=f>1?f:2,A=a||new Array(q);for(g=0;g<q;++g)A[g]=void 0===o?NaN:void 0===s?n[o+g]:(0,e.lerp)(n[o+g],n[o+l+g],s);return A}function t(r,n,t,i,l,u){if(t==n)return null;var a;if(l<r[n+i-1])return u?((a=r.slice(n,n+i))[i-1]=l,a):null;if(r[t-1]<l)return u?((a=r.slice(t-i,t))[i-1]=l,a):null;if(l==r[n+i-1])return r.slice(n,n+i);for(var f=n/i,o=t/i;f<o;){var s=f+o>>1;l<r[(s+1)*i-1]?o=s:f=s+1}var v=r[f*i-1];if(l==v)return r.slice((f-1)*i,(f-1)*i+i);var c=(l-v)/(r[(f+1)*i-1]-v);a=[];for(var p=0;p<i-1;++p)a.push((0,e.lerp)(r[(f-1)*i+p],r[f*i+p],c));return a.push(l),a}function i(r,e,n,i,l,u,a){if(a)return t(r,e,n[n.length-1],i,l,u);var f;if(l<r[i-1])return u?((f=r.slice(0,i))[i-1]=l,f):null;if(r[r.length-1]<l)return u?((f=r.slice(r.length-i))[i-1]=l,f):null;for(var o=0,s=n.length;o<s;++o){var v=n[o];if(e!=v){if(l<r[e+i-1])return null;if(l<=r[v-1])return t(r,e,v,i,l,!1);e=v}}return null}
341},{"../../array.js":"luEr","../../math.js":"B96G"}],"ZZrx":[function(require,module,exports) {
342"use strict";function r(r,t,e,n){for(var i=r[t],o=r[t+1],s=0,a=t+n;a<e;a+=n){var u=r[a],c=r[a+1];s+=Math.sqrt((u-i)*(u-i)+(c-o)*(c-o)),i=u,o=c}return s}function t(t,e,n,i){var o=r(t,e,n,i),s=t[n-i]-t[e],a=t[n-i+1]-t[e+1];return o+=Math.sqrt(s*s+a*a)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.lineStringLength=r,exports.linearRingLength=t;
343},{}],"DfxW":[function(require,module,exports) {
344"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=u(require("./GeometryLayout.js")),e=u(require("./SimpleGeometry.js")),i=require("./flat/closest.js"),o=require("../extent.js"),n=require("./flat/deflate.js"),r=require("./flat/simplify.js"),s=require("../array.js"),a=require("./flat/segments.js"),l=require("./flat/inflate.js"),f=require("./flat/interpolate.js"),h=require("./flat/intersectsextent.js"),d=require("./flat/length.js");function u(t){return t&&t.__esModule?t:{default:t}}var p=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function o(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}(),c=function(e){function u(t,i){var o=e.call(this)||this;return o.flatMidpoint_=null,o.flatMidpointRevision_=-1,o.maxDelta_=-1,o.maxDeltaRevision_=-1,void 0===i||Array.isArray(t[0])?o.setCoordinates(t,i):o.setFlatCoordinates(i,t),o}return p(u,e),u.prototype.appendCoordinate=function(t){this.flatCoordinates?(0,s.extend)(this.flatCoordinates,t):this.flatCoordinates=t.slice(),this.changed()},u.prototype.clone=function(){var t=new u(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t},u.prototype.closestPointXY=function(t,e,n,r){return r<(0,o.closestSquaredDistanceXY)(this.getExtent(),t,e)?r:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt((0,i.maxSquaredDelta)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),(0,i.assignClosestPoint)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!1,t,e,n,r))},u.prototype.forEachSegment=function(t){return(0,a.forEach)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)},u.prototype.getCoordinateAtM=function(e,i){if(this.layout!=t.default.XYM&&this.layout!=t.default.XYZM)return null;var o=void 0!==i&&i;return(0,f.lineStringCoordinateAtM)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e,o)},u.prototype.getCoordinates=function(){return(0,l.inflateCoordinates)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},u.prototype.getCoordinateAt=function(t,e){return(0,f.interpolatePoint)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,this.stride)},u.prototype.getLength=function(){return(0,d.lineStringLength)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},u.prototype.getFlatMidpoint=function(){return this.flatMidpointRevision_!=this.getRevision()&&(this.flatMidpoint_=this.getCoordinateAt(.5,this.flatMidpoint_),this.flatMidpointRevision_=this.getRevision()),this.flatMidpoint_},u.prototype.getSimplifiedGeometryInternal=function(e){var i=[];return i.length=(0,r.douglasPeucker)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e,i,0),new u(i,t.default.XY)},u.prototype.getType=function(){return"LineString"},u.prototype.intersectsExtent=function(t){return(0,h.intersectsLineString)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)},u.prototype.setCoordinates=function(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=(0,n.deflateCoordinates)(this.flatCoordinates,0,t,this.stride),this.changed()},u}(e.default),C=exports.default=c;
345},{"./GeometryLayout.js":"Utvi","./SimpleGeometry.js":"pnrv","./flat/closest.js":"rMra","../extent.js":"QDir","./flat/deflate.js":"FNhl","./flat/simplify.js":"IEpt","../array.js":"luEr","./flat/segments.js":"U8i0","./flat/inflate.js":"znXl","./flat/interpolate.js":"rDTq","./flat/intersectsextent.js":"GZir","./flat/length.js":"ZZrx"}],"fbCo":[function(require,module,exports) {
346"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=h(require("./GeometryLayout.js")),e=h(require("./LineString.js")),i=h(require("./SimpleGeometry.js")),r=require("./flat/closest.js"),n=require("../extent.js"),s=require("./flat/deflate.js"),o=require("./flat/simplify.js"),a=require("../array.js"),l=require("./flat/inflate.js"),u=require("./flat/interpolate.js"),d=require("./flat/intersectsextent.js");function h(t){return t&&t.__esModule?t:{default:t}}var f=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),p=function(i){function h(t,e,r){var n=i.call(this)||this;if(n.ends_=[],n.maxDelta_=-1,n.maxDeltaRevision_=-1,Array.isArray(t[0]))n.setCoordinates(t,e);else if(void 0!==e&&r)n.setFlatCoordinates(e,t),n.ends_=r;else{for(var s=n.getLayout(),o=t,l=[],u=[],d=0,h=o.length;d<h;++d){var f=o[d];0===d&&(s=f.getLayout()),(0,a.extend)(l,f.getFlatCoordinates()),u.push(l.length)}n.setFlatCoordinates(s,l),n.ends_=u}return n}return f(h,i),h.prototype.appendLineString=function(t){this.flatCoordinates?(0,a.extend)(this.flatCoordinates,t.getFlatCoordinates().slice()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()},h.prototype.clone=function(){var t=new h(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return t.applyProperties(this),t}
346,h.prototype.closestPointXY=function(t,e,i,s){return s<(0,n.closestSquaredDistanceXY)(this.getExtent(),t,e)?s:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt((0,r.arrayMaxSquaredDelta)(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),(0,r.assignClosestArrayPoint)(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!1,t,e,i,s))},h.prototype.getCoordinateAtM=function(e,i,r){if(this.layout!=t.default.XYM&&this.layout!=t.default.XYZM||0===this.flatCoordinates.length)return null;var n=void 0!==i&&i,s=void 0!==r&&r;return(0,u.lineStringsCoordinateAtM)(this.flatCoordinates,0,this.ends_,this.stride,e,n,s)},h.prototype.getCoordinates=function(){return(0,l.inflateCoordinatesArray)(this.flatCoordinates,0,this.ends_,this.stride)},h.prototype.getEnds=function(){return this.ends_},h.prototype.getLineString=function(t){return t<0||this.ends_.length<=t?null:new e.default(this.flatCoordinates.slice(0===t?0:this.ends_[t-1],this.ends_[t]),this.layout)},h.prototype.getLineStrings=function(){for(var t=this.flatCoordinates,i=this.ends_,r=this.layout,n=[],s=0,o=0,a=i.length;o<a;++o){var l=i[o],u=new e.default(t.slice(s,l),r);n.push(u),s=l}return n},h.prototype.getFlatMidpoints=function(){for(var t=[],e=this.flatCoordinates,i=0,r=this.ends_,n=this.stride,s=0,o=r.length;s<o;++s){var l=r[s],d=(0,u.interpolatePoint)(e,i,l,n,.5);(0,a.extend)(t,d),i=l}return t},h.prototype.getSimplifiedGeometryInternal=function(e){var i=[],r=[];return i.length=(0,o.douglasPeuckerArray)(this.flatCoordinates,0,this.ends_,this.stride,e,i,0,r),new h(i,t.default.XY,r)},h.prototype.getType=function(){return"MultiLineString"},h.prototype.intersectsExtent=function(t){return(0,d.intersectsLineStringArray)(this.flatCoordinates,0,this.ends_,this.stride,t)},h.prototype.setCoordinates=function(t,e){this.setLayout(e,t,2),this.flatCoordinates||(this.flatCoordinates=[]);var i=(0,s.deflateCoordinatesArray)(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=0===i.length?0:i[i.length-1],this.changed()},h}(i.default),c=exports.default=p;
347},{"./GeometryLayout.js":"Utvi","./LineString.js":"DfxW","./SimpleGeometry.js":"pnrv","./flat/closest.js":"rMra","../extent.js":"QDir","./flat/deflate.js":"FNhl","./flat/simplify.js":"IEpt","../array.js":"luEr","./flat/inflate.js":"znXl","./flat/interpolate.js":"rDTq","./flat/intersectsextent.js":"GZir"}],"dNu5":[function(require,module,exports) {
348"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=a(require("./Point.js")),e=a(require("./SimpleGeometry.js")),r=require("../extent.js"),o=require("./flat/deflate.js"),i=require("../array.js"),n=require("./flat/inflate.js"),s=require("../math.js");function a(t){return t&&t.__esModule?t:{default:t}}var l=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function o(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),u=function(e){function a(t,r){var o=e.call(this)||this;return r&&!Array.isArray(t[0])?o.setFlatCoordinates(r,t):o.setCoordinates(t,r),o}return l(a,e),a.prototype.appendPoint=function(t){this.flatCoordinates?(0,i.extend)(this.flatCoordinates,t.getFlatCoordinates()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.changed()},a.prototype.clone=function(){var t=new a(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t},a.prototype.closestPointXY=function(t,e,o,i){if(i<(0,r.closestSquaredDistanceXY)(this.getExtent(),t,e))return i;for(var n=this.flatCoordinates,a=this.stride,l=0,u=n.length;l<u;l+=a){var f=(0,s.squaredDistance)(t,e,n[l],n[l+1]);if(f<i){i=f;for(var d=0;d<a;++d)o[d]=n[l+d];o.length=a}}return i},a.prototype.getCoordinates=function(){return(0,n.inflateCoordinates)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},a.prototype.getPoint=function(e){var r=this.flatCoordinates?this.flatCoordinates.length/this.stride:0;return e<0||r<=e?null:new t.default(this.flatCoordinates.slice(e*this.stride,(e+1)*this.stride),this.layout)},a.prototype.getPoints=function(){for(var e=this.flatCoordinates,r=this.layout,o=this.stride,i=[],n=0,s=e.length;n<s;n+=o){var a=new t.default(e.slice(n,n+o),r);i.push(a)}return i},a.prototype.getType=function(){return"MultiPoint"},a.prototype.intersectsExtent=function(t){for(var e=this.flatCoordinates,o=this.stride,i=0,n=e.length;i<n;i+=o){var s=e[i],a=e[i+1];if((0,r.containsXY)(t,s,a))return!0}return!1},a.prototype.setCoordinates=function(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=(0,o.deflateCoordinates)(this.flatCoordinates,0,t,this.stride),this.changed()},a}(e.default),f=exports.default=u;
349},{"./Point.js":"gLcY","./SimpleGeometry.js":"pnrv","../extent.js":"QDir","./flat/deflate.js":"FNhl","../array.js":"luEr","./flat/inflate.js":"znXl","../math.js":"B96G"}],"VjQP":[function(require,module,exports) {
350"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.linearRingss=r;var e=require("../../extent.js");function r(r,t,a,n){for(var s=[],o=(0,e.createEmpty)(),i=0,u=a.length;i<u;++i){var l=a[i];o=(0,e.createOrUpdateFromFlatCoordinates)(r,t,l[0],n),s.push((o[0]+o[2])/2,(o[1]+o[3])/2),t=l[l.length-1]}return s}
351},{"../../extent.js":"QDir"}],"ouhF":[function(require,module,exports) {
352"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=y(require("./GeometryLayout.js")),e=y(require("./MultiPoint.js")),i=y(require("./Polygon.js")),s=y(require("./SimpleGeometry.js")),r=require("./flat/closest.js"),n=require("../extent.js"),o=require("./flat/deflate.js"),a=require("../array.js"),l=require("./flat/interiorpoint.js"),d=require("./flat/inflate.js"),h=require("./flat/intersectsextent.js"),u=require("./flat/orient.js"),f=require("./flat/area.js"),g=require("./flat/center.js"),c=require("./flat/contains.js"),p=require("./flat/simplify.js");function y(t){return t&&t.__esModule?t:{default:t}}var _=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function s(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),v=function(s){function y(t,e,i){var r=s.call(this)||this;if(r.endss_=[],r.flatInteriorPointsRevision_=-1,r.flatInteriorPoints_=null,r.maxDelta_=-1,r.maxDeltaRevision_=-1,r.orientedRevision_=-1,r.orientedFlatCoordinates_=null,!i&&!Array.isArray(t[0])){for(var n=r.getLayout(),o=t,l=[],d=[],h=0,u=o.length;h<u;++h){var f=o[h];0===h&&(n=f.getLayout());for(var g=l.length,c=f.getEnds(),p=0,y=c.length;p<y;++p)c[p]+=g;(0,a.extend)(l,f.getFlatCoordinates()),d.push(c)}e=n,t=l,i=d}return void 0!==e&&i?(r.setFlatCoordinates(e,t),r.endss_=i):r.setCoordinates(t,e),r}return _(y,s),y.prototype.appendPolygon=function(t){var e;if(this.flatCoordinates){var i=this.flatCoordinates.length;(0,a.extend)(this.flatCoordinates,t.getFlatCoordinates());for(var s=0,r=(e=t.getEnds().slice()).length;s<r;++s)e[s]+=i}else this.flatCoordinates=t.getFlatCoordinates().slice(),e=t.getEnds().slice(),this.endss_.push();this.endss_.push(e),this.changed()},y.prototype.clone=function(){for(var t=this.endss_.length,e=new Array(t),i=0;i<t;++i)e[i]=this.endss_[i].slice();var s=new y(this.flatCoordinates.slice(),this.layout,e);return s.applyProperties(this),s}
352,y.prototype.closestPointXY=function(t,e,i,s){return s<(0,n.closestSquaredDistanceXY)(this.getExtent(),t,e)?s:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt((0,r.multiArrayMaxSquaredDelta)(this.flatCoordinates,0,this.endss_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),(0,r.assignClosestMultiArrayPoint)(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,this.maxDelta_,!0,t,e,i,s))},y.prototype.containsXY=function(t,e){return(0,c.linearRingssContainsXY)(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t,e)},y.prototype.getArea=function(){return(0,f.linearRingss)(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride)},y.prototype.getCoordinates=function(t){var e;return void 0!==t?(e=this.getOrientedFlatCoordinates().slice(),(0,u.orientLinearRingsArray)(e,0,this.endss_,this.stride,t)):e=this.flatCoordinates,(0,d.inflateMultiCoordinatesArray)(e,0,this.endss_,this.stride)},y.prototype.getEndss=function(){return this.endss_},y.prototype.getFlatInteriorPoints=function(){if(this.flatInteriorPointsRevision_!=this.getRevision()){var t=(0,g.linearRingss)(this.flatCoordinates,0,this.endss_,this.stride);this.flatInteriorPoints_=(0,l.getInteriorPointsOfMultiArray)(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t),this.flatInteriorPointsRevision_=this.getRevision()}return this.flatInteriorPoints_},y.prototype.getInteriorPoints=function(){return new e.default(this.getFlatInteriorPoints().slice(),t.default.XYM)},y.prototype.getOrientedFlatCoordinates=function(){if(this.orientedRevision_!=this.getRevision()){var t=this.flatCoordinates;(0,u.linearRingssAreOriented)(t,0,this.endss_,this.stride)?this.orientedFlatCoordinates_=t:(this.orientedFlatCoordinates_=t.slice(),this.orientedFlatCoordinates_.length=(0,u.orientLinearRingsArray)(this.orientedFlatCoordinates_,0,this.endss_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_},y.prototype.getSimplifiedGeometryInternal=function(e){var i=[],s=[];return i.length=(0,p.quantizeMultiArray)(this.flatCoordinates,0,this.endss_,this.stride,Math.sqrt(e),i,0,s),new y(i,t.default.XY,s)},y.prototype.getPolygon=function(t){if(t<0||this.endss_.length<=t)return null;var e;if(0===t)e=0;else{var s=this.endss_[t-1];e=s[s.length-1]}var r=this.endss_[t].slice(),n=r[r.length-1];if(0!==e)for(var o=0,a=r.length;o<a;++o)r[o]-=e;return new i.default(this.flatCoordinates.slice(e,n),this.layout,r)},y.prototype.getPolygons=function(){for(var t=this.layout,e=this.flatCoordinates,s=this.endss_,r=[],n=0,o=0,a=s.length;o<a;++o){var l=s[o].slice(),d=l[l.length-1];if(0!==n)for(var h=0,u=l.length;h<u;++h)l[h]-=n;var f=new i.default(e.slice(n,d),t,l);r.push(f),n=d}return r},y.prototype.getType=function(){return"MultiPolygon"},y.prototype.intersectsExtent=function(t){return(0,h.intersectsLinearRingMultiArray)(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t)},y.prototype.setCoordinates=function(t,e){this.setLayout(e,t,3),this.flatCoordinates||(this.flatCoordinates=[]);var i=(0,o.deflateMultiCoordinatesArray)(this.flatCoordinates,0,t,this.stride,this.endss_);if(0===i.length)this.flatCoordinates.length=0;else{var s=i[i.length-1];this.flatCoordinates.length=0===s.length?0:s[s.length-1]}this.changed()},y}(s.default),C=exports.default=v;
353},{"./GeometryLayout.js":"Utvi","./MultiPoint.js":"dNu5","./Polygon.js":"Nwwk","./SimpleGeometry.js":"pnrv","./flat/closest.js":"rMra","../extent.js":"QDir","./flat/deflate.js":"FNhl","../array.js":"luEr","./flat/interiorpoint.js":"UDvN","./flat/inflate.js":"znXl","./flat/intersectsextent.js":"GZir","./flat/orient.js":"cJkE","./flat/area.js":"EOSm","./flat/center.js":"VjQP","./flat/contains.js":"dzdN","./flat/simplify.js":"IEpt"}],"XGea":[function(require,module,exports) {
354var define;
355var t;!function(i,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof t&&t.amd?t(n):(i=i||self).RBush=n()}(this,function(){"use strict";function t(t,r,e,a,h){!function t(n,r,e,a,h){for(;a>e;){if(a-e>600){var o=a-e+1,s=r-e+1,l=Math.log(o),f=.5*Math.exp(2*l/3),u=.5*Math.sqrt(l*f*(o-f)/o)*(s-o/2<0?-1:1);t(n,r,Math.max(e,Math.floor(r-s*f/o+u)),Math.min(a,Math.floor(r+(o-s)*f/o+u)),h)}var m=n[r],c=e,p=a;for(i(n,e,r),h(n[a],m)>0&&i(n,e,a);c<p;){for(i(n,c,p),c++,p--;h(n[c],m)<0;)c++;for(;h(n[p],m)>0;)p--}0===h(n[e],m)?i(n,e,p):i(n,++p,a),p<=r&&(e=p+1),r<=p&&(a=p-1)}}(t,r,e||0,a||t.length-1,h||n)}function i(t,i,n){var r=t[i];t[i]=t[n],t[n]=r}function n(t,i){return t<i?-1:t>i?1:0}var r=function(t){void 0===t&&(t=9),this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function e(t,i,n){if(!n)return i.indexOf(t);for(var r=0;r<i.length;r++)if(n(t,i[r]))return r;return-1}function a(t,i){h(t,0,t.children.length,i,t)}function h(t,i,n,r,e){e||(e=p(null)),e.minX=1/0,e.minY=1/0,e.maxX=-1/0,e.maxY=-1/0;for(var a=i;a<n;a++){var h=t.children[a];
vendor: 5,001 bytes, line 355
355o(e,t.leaf?r(h):h)}return e}function o(t,i){return t.minX=Math.min(t.minX,i.minX),t.minY=Math.min(t.minY,i.minY),t.maxX=Math.max(t.maxX,i.maxX),t.maxY=Math.max(t.maxY,i.maxY),t}function s(t,i){return t.minX-i.minX}function l(t,i){return t.minY-i.minY}function f(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function u(t){return t.maxX-t.minX+(t.maxY-t.minY)}function m(t,i){return t.minX<=i.minX&&t.minY<=i.minY&&i.maxX<=t.maxX&&i.maxY<=t.maxY}function c(t,i){return i.minX<=t.maxX&&i.minY<=t.maxY&&i.maxX>=t.minX&&i.maxY>=t.minY}function p(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function d(i,n,r,e,a){for(var h=[n,r];h.length;)if(!((r=h.pop())-(n=h.pop())<=e)){var o=n+Math.ceil((r-n)/e/2)*e;t(i,o,n,r,a),h.push(n,o,o,r)}}return r.prototype.all=function(){return this._all(this.data,[])},r.prototype.search=function(t){var i=this.data,n=[];if(!c(t,i))return n;for(var r=this.toBBox,e=[];i;){for(var a=0;a<i.children.length;a++){var h=i.children[a],o=i.leaf?r(h):h;c(t,o)&&(i.leaf?n.push(h):m(t,o)?this._all(h,n):e.push(h))}i=e.pop()}return n},r.prototype.collides=function(t){var i=this.data;if(!c(t,i))return!1;for(var n=[];i;){for(var r=0;r<i.children.length;r++){var e=i.children[r],a=i.leaf?this.toBBox(e):e;if(c(t,a)){if(i.leaf||m(t,a))return!0;n.push(e)}}i=n.pop()}return!1},r.prototype.load=function(t){if(!t||!t.length)return this;if(t.length<this._minEntries){for(var i=0;i<t.length;i++)this.insert(t[i]);return this}var n=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===n.height)this._splitRoot(this.data,n);else{if(this.data.height<n.height){var r=this.data;this.data=n,n=r}this._insert(n,this.data.height-n.height-1,!0)}else this.data=n;return this},r.prototype.insert=function(t){return t&&this._insert(t,this.data.height-1),this},r.prototype.clear=function(){return this.data=p([]),this},r.prototype.remove=function(t,i){if(!t)return this;for(var n,r,a,h=this.data,o=this.toBBox(t),s=[],l=[];h||s.length;){if(h||(h=s.pop(),r=s[s.length-1],n=l.pop(),a=!0),h.leaf){var f=e(t,h.children,i);if(-1!==f)return h.children.splice(f,1),s.push(h),this._condense(s),this}a||h.leaf||!m(h,o)?r?(n++,h=r.children[n],a=!1):h=null:(s.push(h),l.push(n),n=0,r=h,h=h.children[0])}return this},r.prototype.toBBox=function(t){return t},r.prototype.compareMinX=function(t,i){return t.minX-i.minX},r.prototype.compareMinY=function(t,i){return t.minY-i.minY},r.prototype.toJSON=function(){return this.data},r.prototype.fromJSON=function(t){return this.data=t,this},r.prototype._all=function(t,i){for(var n=[];t;)t.leaf?i.push.apply(i,t.children):n.push.apply(n,t.children),t=n.pop();return i},r.prototype._build=function(t,i,n,r){var e,h=n-i+1,o=this._maxEntries;if(h<=o)return a(e=p(t.slice(i,n+1)),this.toBBox),e;r||(r=Math.ceil(Math.log(h)/Math.log(o)),o=Math.ceil(h/Math.pow(o,r-1))),(e=p([])).leaf=!1,e.height=r;var s=Math.ceil(h/o),l=s*Math.ceil(Math.sqrt(o));d(t,i,n,l,this.compareMinX);for(var f=i;f<=n;f+=l){var u=Math.min(f+l-1,n);d(t,f,u,s,this.compareMinY);for(var m=f;m<=u;m+=s){var c=Math.min(m+s-1,u);e.children.push(this._build(t,m,c,r-1))}}return a(e,this.toBBox),e},r.prototype._chooseSubtree=function(t,i,n,r){for(;r.push(i),!i.leaf&&r.length-1!==n;){for(var e=1/0,a=1/0,h=void 0,o=0;o<i.children.length;o++){var s=i.children[o],l=f(s),u=(m=t,c=s,(Math.max(c.maxX,m.maxX)-Math.min(c.minX,m.minX))*(Math.max(c.maxY,m.maxY)-Math.min(c.minY,m.minY))-l);u<a?(a=u,e=l<e?l:e,h=s):u===a&&l<e&&(e=l,h=s)}i=h||i.children[0]}var m,c;return i},r.prototype._insert=function(t,i,n){var r=n?t:this.toBBox(t),e=[],a=this._chooseSubtree(r,this.data,i,e);for(a.children.push(t),o(a,r);i>=0&&e[i].children.length>this._maxEntries;)this._split(e,i),i--;this._adjustParentBBoxes(r,e,i)},r.prototype._split=function(t,i){var n=t[i],r=n.children.length,e=this._minEntries;this._chooseSplitAxis(n,e,r);var h=this._chooseSplitIndex(n,e,r),o=p(n.children.splice(h,n.children.length-h));o.height=n.height,o.leaf=n.leaf,a(n,this.toBBox),a(o,this.toBBox),i?t[i-1].children.push(o):this._splitRoot(n,o)},r.prototype._splitRoot=function(t,i){this.data=p([t,i]),this.data.height=t.height+1,this.data.leaf=!1,a(this.data,this.toBBox)},r.prototype._chooseSplitIndex=function(t,i,n){for(var r,e,a,o,s,l,u,m=1/0,c=1/0,p=i;p<=n-i;p++){var d=h(t,0,p,this.toBBox),x=h(t,p,n,this.toBBox),v=(e=d,a=x,void 0,void 0,void 0,void 0,o=Math.max(e.minX,a.minX),s=Math.max(e.minY,a.minY),l=Math.min(e.maxX,a.maxX),u=Math.min(e.maxY,a.maxY),Math.max(0,l-o)*Math.max(0,u-s)),M=f(d)+f(x);v<m?(m=v,r=p,c=M<c?M:c):v===m&&M<c&&(c=M,r=p)}return r||n-i},r.prototype._chooseSplitAxis=function(t,i,n){var r=t.leaf?this.compareMinX:s,e=t.leaf?this.compareMinY:l;this._allDistMargin(t,i,n,r)<this._allDistMargin(t,i,n,e)&&t.children.sort(r)},r.prototype._allDistMargin=function(t,i,n,r){t.children.sort(r);for(var e=this.toBBox,a=h(t,0,i,e),s=h(t,n-i,n,e),l=u(a)+u(s),f=i;f<n-i;f++){var m=t.children[f];o(a,t.leaf?e(m):m),l+=u(a)}for(var c=n-i-1;c>=i;c--){var p=t.children[c];
355o(s,t.leaf?e(p):p),l+=u(s)}return l},r.prototype._adjustParentBBoxes=function(t,i,n){for(var r=n;r>=0;r--)o(i[r],t)},r.prototype._condense=function(t){for(var i=t.length-1,n=void 0;i>=0;i--)0===t[i].children.length?i>0?(n=t[i-1].children).splice(n.indexOf(t[i]),1):this.clear():a(t[i],this.toBBox)},r});
356},{}],"S8ow":[function(require,module,exports) {
357"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=require("../util.js"),e=require("../size.js"),o=function(){function o(t){this.opacity_=t.opacity,this.rotateWithView_=t.rotateWithView,this.rotation_=t.rotation,this.scale_=t.scale,this.scaleArray_=(0,e.toSize)(t.scale),this.displacement_=t.displacement,this.declutterMode_=t.declutterMode}return o.prototype.clone=function(){var t=this.getScale();return new o({opacity:this.getOpacity(),scale:Array.isArray(t)?t.slice():t,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})},o.prototype.getOpacity=function(){return this.opacity_},o.prototype.getRotateWithView=function(){return this.rotateWithView_},o.prototype.getRotation=function(){return this.rotation_},o.prototype.getScale=function(){return this.scale_},o.prototype.getScaleArray=function(){return this.scaleArray_},o.prototype.getDisplacement=function(){return this.displacement_},o.prototype.getDeclutterMode=function(){return this.declutterMode_},o.prototype.getAnchor=function(){return(0,t.abstract)()},o.prototype.getImage=function(e){return(0,t.abstract)()},o.prototype.getHitDetectionImage=function(){return(0,t.abstract)()},o.prototype.getPixelRatio=function(t){return 1},o.prototype.getImageState=function(){return(0,t.abstract)()},o.prototype.getImageSize=function(){return(0,t.abstract)()},o.prototype.getOrigin=function(){return(0,t.abstract)()},o.prototype.getSize=function(){return(0,t.abstract)()},o.prototype.setDisplacement=function(t){this.displacement_=t},o.prototype.setOpacity=function(t){this.opacity_=t},o.prototype.setRotateWithView=function(t){this.rotateWithView_=t},o.prototype.setRotation=function(t){this.rotation_=t},o.prototype.setScale=function(t){this.scale_=t,this.scaleArray_=(0,e.toSize)(t)},o.prototype.listenImageChange=function(e){(0,t.abstract)()},o.prototype.load=function(){(0,t.abstract)()},o.prototype.unlistenImageChange=function(e){(0,t.abstract)()},o}(),i=exports.default=o;
358},{"../util.js":"KniQ","../size.js":"TAHd"}],"V5XN":[function(require,module,exports) {
359"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.asColorLike=e;var r=require("./color.js");function e(e){return Array.isArray(e)?(0,r.toString)(e):e}
360},{"./color.js":"eucy"}],"il3X":[function(require,module,exports) {
361"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=o(require("../ImageState.js")),e=o(require("./Image.js")),i=require("../color.js"),r=require("../colorlike.js"),s=require("../dom.js"),n=require("../render/canvas.js");function o(t){return t&&t.__esModule?t:{default:t}}var a=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),l=function(e){function o(t){var i=this,r=void 0!==t.rotateWithView&&t.rotateWithView;return(i=e.call(this,{opacity:1,rotateWithView:r,rotation:void 0!==t.rotation?t.rotation:0,scale:void 0!==t.scale?t.scale:1,displacement:void 0!==t.displacement?t.displacement:[0,0],declutterMode:t.declutterMode})||this).canvas_=void 0,i.hitDetectionCanvas_=null,i.fill_=void 0!==t.fill?t.fill:null,i.origin_=[0,0],i.points_=t.points,i.radius_=void 0!==t.radius?t.radius:t.radius1,i.radius2_=t.radius2,i.angle_=void 0!==t.angle?t.angle:0,i.stroke_=void 0!==t.stroke?t.stroke:null,i.size_=null,i.renderOptions_=null,i.render(),i}return a(o,e),o.prototype.clone=function(){var t=this.getScale(),e=new o({fill:this.getFill()?this.getFill().clone():void 0,points:this.getPoints(),radius:this.getRadius(),radius2:this.getRadius2(),angle:this.getAngle(),stroke:this.getStroke()?this.get
vendor: 4,476 bytes, lines 361-362
361Stroke().clone():void 0,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(t)?t.slice():t,displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return e.setOpacity(this.getOpacity()),e},o.prototype.getAnchor=function(){var t=this.size_;if(!t)return null;var e=this.getDisplacement();return[t[0]/2-e[0],t[1]/2+e[1]]},o.prototype.getAngle=function(){return this.angle_},o.prototype.getFill=function(){return this.fill_},o.prototype.setFill=function(t){this.fill_=t,this.render()},o.prototype.getHitDetectionImage=function(){return this.hitDetectionCanvas_||this.createHitDetectionCanvas_(this.renderOptions_),this.hitDetectionCanvas_},o.prototype.getImage=function(t){var e=this.canvas_[t];if(!e){var i=this.renderOptions_,r=(0,s.createCanvasContext2D)(i.size*t,i.size*t);this.draw_(i,r,t),e=r.canvas,this.canvas_[t]=e}return e},o.prototype.getPixelRatio=function(t){return t},o.prototype.getImageSize=function(){return this.size_},o.prototype.getImageState=function(){return t.default.LOADED},o.prototype.getOrigin=function(){return this.origin_},o.prototype.getPoints=function(){return this.points_},o.prototype.getRadius=function(){return this.radius_},o.prototype.getRadius2=function(){return this.radius2_},o.prototype.getSize=function(){return this.size_},o.prototype.getStroke=function(){return this.stroke_},o.prototype.setStroke=function(t){this.stroke_=t,this.render()},o.prototype.listenImageChange=function(t){},o.prototype.load=function(){},o.prototype.unlistenImageChange=function(t){},o.prototype.calculateLineJoinSize_=function(t,e,i){if(0===e||this.points_===1/0||"bevel"!==t&&"miter"!==t)return e;var r=this.radius_,s=void 0===this.radius2_?r:this.radius2_;if(r<s){var n=r;r=s,s=n}var o=void 0===this.radius2_?this.points_:2*this.points_,a=2*Math.PI/o,l=s*Math.sin(a),h=r-Math.sqrt(s*s-l*l),u=Math.sqrt(l*l+h*h),c=u/l;if("miter"===t&&c<=i)return c*e;var d=e/2/c,p=e/2*(h/u),f=Math.sqrt((r+d)*(r+d)+p*p)-r;if(void 0===this.radius2_||"bevel"===t)return 2*f;var _=r*Math.sin(a),v=s-Math.sqrt(r*r-_*_),g=Math.sqrt(_*_+v*v)/_;if(g<=i){var y=g*e/2-s-r;return 2*Math.max(f,y)}return 2*f},o.prototype.createRenderOptions=function(){var t,e=n.defaultLineJoin,i=0,s=null,o=0,a=0;this.stroke_&&(null===(t=this.stroke_.getColor())&&(t=n.defaultStrokeStyle),t=(0,r.asColorLike)(t),void 0===(a=this.stroke_.getWidth())&&(a=n.defaultLineWidth),s=this.stroke_.getLineDash(),o=this.stroke_.getLineDashOffset(),void 0===(e=this.stroke_.getLineJoin())&&(e=n.defaultLineJoin),void 0===(i=this.stroke_.getMiterLimit())&&(i=n.defaultMiterLimit));var l=this.calculateLineJoinSize_(e,a,i),h=Math.max(this.radius_,this.radius2_||0);return{strokeStyle:t,strokeWidth:a,size:Math.ceil(2*h+l),lineDash:s,lineDashOffset:o,lineJoin:e,miterLimit:i}},o.prototype.render=function(){this.renderOptions_=this.createRenderOptions();var t=this.renderOptions_.size;this.canvas_={},this.size_=[t,t]},o.prototype.draw_=function(t,e,i){if(e.scale(i,i),e.translate(t.size/2,t.size/2),this.createPath_(e),this.fill_){var s=this.fill_.getColor();null===s&&(s=n.defaultFillStyle),e.fillStyle=(0,r.asColorLike)(s),e.fill()}this.stroke_&&(e.strokeStyle=t.strokeStyle,e.lineWidth=t.strokeWidth,e.setLineDash&&t.lineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.lineJoin=t.lineJoin,e.miterLimit=t.miterLimit,e.stroke())},o.prototype.createHitDetectionCanvas_=function(t){if(this.fill_){var e=this.fill_.getColor(),r=0;if("string"==typeof e&&(e=(0,i.asArray)(e)),null===e?r=1:Array.isArray(e)&&(r=4===e.length?e[3]:1),0===r){var n=(0,s.createCanvasContext2D)(t.size,t.size);this.hitDetectionCanvas_=n.canvas,this.drawHitDetectionCanvas_(t,n)}}this.hitDetectionCanvas_||(this.hitDetectionCanvas_=this.getImage(1))},o.prototype.createPath_=function(t){var e=this.points_,i=this.radius_;if(e===1/0)t.arc(0,0,i,0,2*Math.PI);else{var r=void 0===this.radius2_?i:this.radius2_;void 0!==this.radius2_&&(e*=2);for(var s=this.angle_-Math.PI/2,n=2*Math.PI/e,o=0;o<e;o++){var a=s+o*n,l=o%2==0?i:r;t.lineTo(l*Math.cos(a),l*Math.sin(a))}t.closePath()}},o.prototype.drawHitDetectionCanvas_=function(t,e){e.translate(t.size/2,t.size/2),this.createPath_(e),e.fillStyle=n.defaultFillStyle,e.fill(),this.stroke_&&(e.strokeStyle=t.strokeStyle,e.lineWidth=t.strokeWidth,t.lineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.lineJoin=t.lineJoin,e.miterLimit=t.miterLimit,e.stroke())},o}(e.default),h=exports.default=l;
362}
362,{"../ImageState.js":"Xz9x","./Image.js":"S8ow","../color.js":"eucy","../colorlike.js":"V5XN","../dom.js":"Xno5","../render/canvas.js":"iAG7"}],"cdf1":[function(require,module,exports) {
363"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=e(require("./RegularShape.js"));function e(t){return t&&t.__esModule?t:{default:t}}var o=function(){var t=function(e,o){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function i(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}(),i=function(t){function e(e){var o=e||{};return t.call(this,{points:1/0,fill:o.fill,radius:o.radius,stroke:o.stroke,scale:void 0!==o.scale?o.scale:1,rotation:void 0!==o.rotation?o.rotation:0,rotateWithView:void 0!==o.rotateWithView&&o.rotateWithView,displacement:void 0!==o.displacement?o.displacement:[0,0],declutterMode:o.declutterMode})||this}return o(e,t),e.prototype.clone=function(){var t=this.getScale(),o=new e({fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,radius:this.getRadius(),scale:Array.isArray(t)?t.slice():t,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return o.setOpacity(this.getOpacity()),o},e.prototype.setRadius=function(t){this.radius_=t,this.render()},e}(t.default),r=exports.default=i;
364},{"./RegularShape.js":"il3X"}],"AFcg":[function(require,module,exports) {
365"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var o=function(){function o(o){var r=o||{};this.color_=void 0!==r.color?r.color:null}return o.prototype.clone=function(){var r=this.getColor();return new o({color:Array.isArray(r)?r.slice():r||void 0})},o.prototype.getColor=function(){return this.color_},o.prototype.setColor=function(o){this.color_=o},o}(),r=exports.default=o;
366},{}],"TXDt":[function(require,module,exports) {
367"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=function(){function t(t){var i=t||{};this.color_=void 0!==i.color?i.color:null,this.lineCap_=i.lineCap,this.lineDash_=void 0!==i.lineDash?i.lineDash:null,this.lineDashOffset_=i.lineDashOffset,this.lineJoin_=i.lineJoin,this.miterLimit_=i.miterLimit,this.width_=i.width}return t.prototype.clone=function(){var i=this.getColor();return new t({color:Array.isArray(i)?i.slice():i||void 0,lineCap:this.getLineCap(),lineDash:this.getLineDash()?this.getLineDash().slice():void 0,lineDashOffset:this.getLineDashOffset(),lineJoin:this.getLineJoin(),miterLimit:this.getMiterLimit(),width:this.getWidth()})},t.prototype.getColor=function(){return this.color_},t.prototype.getLineCap=function(){return this.lineCap_},t.prototype.getLineDash=function(){return this.lineDash_},t.prototype.getLineDashOffset=function(){return this.lineDashOffset_},t.prototype.getLineJoin=function(){return this.lineJoin_},t.prototype.getMiterLimit=function(){return this.miterLimit_},t.prototype.getWidth=function(){return this.width_},t.prototype.setColor=function(t){this.color_=t},t.prototype.setLineCap=function(t){this.lineCap_=t},t.prototype.setLineDash=function(t){this.lineDash_=t},t.prototype.setLineDashOffset=function(t){this.lineDashOffset_=t},t.prototype.setLineJoin=function(t){this.lineJoin_=t},t.prototype.setMiterLimit=function(t){this.miterLimit_=t},t.prototype.setWidth=function(t){this.width_=t},t}(),i=exports.default=t;
368},{}],"he4w":[function(require,module,exports) {
369"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.createDefaultStyle=s,exports.createEditingStyle=c,exports.default=void 0,exports.toFunction=u;var e=r(require("./Circle.js")),t=r(require("./Fill.js")),n=r(require("./Stroke.js")),o=require("../asserts.js");
369function r(e){return e&&e.__esModule?e:{default:e}}var i=function(){function e(e){var t=e||{};this.geometry_=null,this.geometryFunction_=f,void 0!==t.geometry&&this.setGeometry(t.geometry),this.fill_=void 0!==t.fill?t.fill:null,this.image_=void 0!==t.image?t.image:null,this.renderer_=void 0!==t.renderer?t.renderer:null,this.hitDetectionRenderer_=void 0!==t.hitDetectionRenderer?t.hitDetectionRenderer:null,this.stroke_=void 0!==t.stroke?t.stroke:null,this.text_=void 0!==t.text?t.text:null,this.zIndex_=t.zIndex}return e.prototype.clone=function(){var t=this.getGeometry();return t&&"object"==typeof t&&(t=t.clone()),new e({geometry:t,fill:this.getFill()?this.getFill().clone():void 0,image:this.getImage()?this.getImage().clone():void 0,renderer:this.getRenderer(),stroke:this.getStroke()?this.getStroke().clone():void 0,text:this.getText()?this.getText().clone():void 0,zIndex:this.getZIndex()})},e.prototype.getRenderer=function(){return this.renderer_},e.prototype.setRenderer=function(e){this.renderer_=e},e.prototype.setHitDetectionRenderer=function(e){this.hitDetectionRenderer_=e},e.prototype.getHitDetectionRenderer=function(){return this.hitDetectionRenderer_},e.prototype.getGeometry=function(){return this.geometry_},e.prototype.getGeometryFunction=function(){return this.geometryFunction_},e.prototype.getFill=function(){return this.fill_},e.prototype.setFill=function(e){this.fill_=e},e.prototype.getImage=function(){return this.image_},e.prototype.setImage=function(e){this.image_=e},e.prototype.getStroke=function(){return this.stroke_},e.prototype.setStroke=function(e){this.stroke_=e},e.prototype.getText=function(){return this.text_},e.prototype.setText=function(e){this.text_=e},e.prototype.getZIndex=function(){return this.zIndex_},e.prototype.setGeometry=function(e){"function"==typeof e?this.geometryFunction_=e:"string"==typeof e?this.geometryFunction_=function(t){return t.get(e)}:e?void 0!==e&&(this.geometryFunction_=function(){return e}):this.geometryFunction_=f,this.geometry_=e},e.prototype.setZIndex=function(e){this.zIndex_=e},e}();function u(e){var t;if("function"==typeof e)t=e;else{var n;if(Array.isArray(e))n=e;else(0,o.assert)("function"==typeof e.getZIndex,41),n=[e];t=function(){return n}}return t}var l=null;function s(o,r){if(!l){var u=new t.default({color:"rgba(255,255,255,0.4)"}),s=new n.default({color:"#3399CC",width:1.25});l=[new i({image:new e.default({fill:u,stroke:s,radius:5}),fill:u,stroke:s})]}return l}function c(){var o={},r=[255,255,255,1],u=[0,153,255,1];return o.Polygon=[new i({fill:new t.default({color:[255,255,255,.5]})})],o.MultiPolygon=o.Polygon,o.LineString=[new i({stroke:new n.default({color:r,width:5})}),new i({stroke:new n.default({color:u,width:3})})],o.MultiLineString=o.LineString,o.Circle=o.Polygon.concat(o.LineString),o.Point=[new i({image:new e.default({radius:6,fill:new t.default({color:u}),stroke:new n.default({color:r,width:1.5})}),zIndex:1/0})],o.MultiPoint=o.Point,o.GeometryCollection=o.Polygon.concat(o.LineString,o.Point),o}function f(e){return e.getGeometry()}var d=exports.default=i;
370},{"./Circle.js":"cdf1","./Fill.js":"AFcg","./Stroke.js":"TXDt","../asserts.js":"fLG6"}],"pskK":[function(require,module,exports) {
371"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=i(require("./Layer.js")),t=i(require("rbush")),r=require("../obj.js"),n=require("../style/Style.js");function i(e){return e&&e.__esModule?e:{default:e}}var o=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),u={RENDER_ORDER:"renderOrder"},l=function(e){function i(t){var n=this,i=t||{},o=(0,r.assign)({},i);return delete o.style,delete o.renderBuffer,delete o.updateWhileAnimating,delete o.updateWhileInteracting,(n=e.call(this,o)||this).declutter_=void 0!==i.declutter&&i.declutter,n.renderBuffer_=void 0!==i.renderBuffer?i.renderBuffer:100,n.style_=null,n.styleFunction_=void 0,n.setStyle(i.style),n.updateWhileAnimating_=void 0!==i.updateWhileAnimating&&i.updateWhileAnimating,
371n.updateWhileInteracting_=void 0!==i.updateWhileInteracting&&i.updateWhileInteracting,n}return o(i,e),i.prototype.getDeclutter=function(){return this.declutter_},i.prototype.getFeatures=function(t){return e.prototype.getFeatures.call(this,t)},i.prototype.getRenderBuffer=function(){return this.renderBuffer_},i.prototype.getRenderOrder=function(){return this.get(u.RENDER_ORDER)},i.prototype.getStyle=function(){return this.style_},i.prototype.getStyleFunction=function(){return this.styleFunction_},i.prototype.getUpdateWhileAnimating=function(){return this.updateWhileAnimating_},i.prototype.getUpdateWhileInteracting=function(){return this.updateWhileInteracting_},i.prototype.renderDeclutter=function(e){e.declutterTree||(e.declutterTree=new t.default(9)),this.getRenderer().renderDeclutter(e)},i.prototype.setRenderOrder=function(e){this.set(u.RENDER_ORDER,e)},i.prototype.setStyle=function(e){this.style_=void 0!==e?e:n.createDefaultStyle,this.styleFunction_=null===e?void 0:(0,n.toFunction)(this.style_),this.changed()},i}(e.default),c=exports.default=l;
372},{"./Layer.js":"GCgv","rbush":"XGea","../obj.js":"mH6q","../style/Style.js":"he4w"}],"kTJv":[function(require,module,exports) {
373"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.strokeInstruction=exports.fillInstruction=exports.default=exports.closePathInstruction=exports.beginPathInstruction=void 0;var t={BEGIN_GEOMETRY:0,BEGIN_PATH:1,CIRCLE:2,CLOSE_PATH:3,CUSTOM:4,DRAW_CHARS:5,DRAW_IMAGE:6,END_GEOMETRY:7,FILL:8,MOVE_TO_LINE_TO:9,SET_FILL_STYLE:10,SET_STROKE_STYLE:11,STROKE:12},e=exports.fillInstruction=[t.FILL],o=exports.strokeInstruction=[t.STROKE],s=exports.beginPathInstruction=[t.BEGIN_PATH],r=exports.closePathInstruction=[t.CLOSE_PATH],E=exports.default=t;
374},{}],"LQER":[function(require,module,exports) {
375"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=function(){function t(){}return t.prototype.drawCustom=function(t,o,e,n){},t.prototype.drawGeometry=function(t){},t.prototype.setStyle=function(t){},t.prototype.drawCircle=function(t,o){},t.prototype.drawFeature=function(t,o){},t.prototype.drawGeometryCollection=function(t,o){},t.prototype.drawLineString=function(t,o){},t.prototype.drawMultiLineString=function(t,o){},t.prototype.drawMultiPoint=function(t,o){},t.prototype.drawMultiPolygon=function(t,o){},t.prototype.drawPoint=function(t,o){},t.prototype.drawPolygon=function(t,o){},t.prototype.drawText=function(t,o){},t.prototype.setFillStrokeStyle=function(t,o){},t.prototype.setImageStyle=function(t,o){},t.prototype.setTextStyle=function(t,o){},t}(),o=exports.default=t;
376},{}],"QBj4":[function(require,module,exports) {
377"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=u(require("./Instruction.js")),e=u(require("../../extent/Relationship.js")),i=u(require("../VectorContext.js")),n=require("../../colorlike.js"),r=require("../../extent.js"),o=require("../canvas.js"),s=require("../../array.js"),a=require("../../geom/flat/inflate.js");function u(t){return t&&t.__esModule?t:{default:t}}var l=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),h=function(i){function u(t,e,n,r){var o=i.call(this)||this;return o.tolerance=t,o.maxExtent=e,o.pixelRatio=r,o.maxLineWidth=0,o.resolution=n,o.beginGeometryInstruction1_=null,o.beginGeometryInstruction2_=null,o.bufferedMaxExtent_=null,o.instructions=[],o.coordinates=[],o.tmpCoordinate_=[],o.hitDetectionInstructions=[],o.state={},o}return l(u,i),u.prototype.applyPixelRatio=function(t){var e=this.pixelRatio;return 1==e?t:t.map(function(t){return t*e})},u.prototype.appendFlatPointCoordinates=function(t,e){for(var i=this.getBufferedMaxExtent(),n=this.tmpCoordinate_,o=this.coordinates,s=o.length,a=0,u=t.length;a<u;a+=e)n[0]=t[a],n[1]=t[a+1],(0,r.containsCoordinate)(i,n)&&(o[s++]=n[0],o[s++]=n[1]);return s},u.prototype.appendFlatLineCoordinates=function(t,i,n,o,s,a){var u=this.coordinates,l=u.length,h=this.getBufferedMaxExtent();a&&(i+=o);var c,d,f,p=t[i],y=t[i+1],C=this.tmpCoordinate_,g=!0;for(c=i+o;c<n;
377c+=o)C[0]=t[c],C[1]=t[c+1],(f=(0,r.coordinateRelationship)(h,C))!==d?(g&&(u[l++]=p,u[l++]=y,g=!1),u[l++]=C[0],u[l++]=C[1]):f===e.default.INTERSECTING?(u[l++]=C[0],u[l++]=C[1],g=!1):g=!0,p=C[0],y=C[1],d=f;return(s&&g||c===i+o)&&(u[l++]=p,u[l++]=y),l},u.prototype.drawCustomCoordinates_=function(t,e,i,n,r){for(var o=0,s=i.length;o<s;++o){var a=i[o],u=this.appendFlatLineCoordinates(t,e,a,n,!1,!1);r.push(u),e=a}return e},u.prototype.drawCustom=function(e,i,n,r){this.beginGeometry(e,i);var o,s,u,l,h,c=e.getType(),d=e.getStride(),f=this.coordinates.length;switch(c){case"MultiPolygon":o=e.getOrientedFlatCoordinates(),l=[];var p=e.getEndss();h=0;for(var y=0,C=p.length;y<C;++y){var g=[];h=this.drawCustomCoordinates_(o,h,p[y],d,g),l.push(g)}this.instructions.push([t.default.CUSTOM,f,l,e,n,a.inflateMultiCoordinatesArray]),this.hitDetectionInstructions.push([t.default.CUSTOM,f,l,e,r||n,a.inflateMultiCoordinatesArray]);break;case"Polygon":case"MultiLineString":u=[],o="Polygon"==c?e.getOrientedFlatCoordinates():e.getFlatCoordinates(),h=this.drawCustomCoordinates_(o,0,e.getEnds(),d,u),this.instructions.push([t.default.CUSTOM,f,u,e,n,a.inflateCoordinatesArray]),this.hitDetectionInstructions.push([t.default.CUSTOM,f,u,e,r||n,a.inflateCoordinatesArray]);break;case"LineString":case"Circle":o=e.getFlatCoordinates(),s=this.appendFlatLineCoordinates(o,0,o.length,d,!1,!1),this.instructions.push([t.default.CUSTOM,f,s,e,n,a.inflateCoordinates]),this.hitDetectionInstructions.push([t.default.CUSTOM,f,s,e,r||n,a.inflateCoordinates]);break;case"MultiPoint":o=e.getFlatCoordinates(),(s=this.appendFlatPointCoordinates(o,d))>f&&(this.instructions.push([t.default.CUSTOM,f,s,e,n,a.inflateCoordinates]),this.hitDetectionInstructions.push([t.default.CUSTOM,f,s,e,r||n,a.inflateCoordinates]));break;case"Point":o=e.getFlatCoordinates(),this.coordinates.push(o[0],o[1]),s=this.coordinates.length,this.instructions.push([t.default.CUSTOM,f,s,e,n]),this.hitDetectionInstructions.push([t.default.CUSTOM,f,s,e,r||n])}this.endGeometry(i)},u.prototype.beginGeometry=function(e,i){this.beginGeometryInstruction1_=[t.default.BEGIN_GEOMETRY,i,0,e],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[t.default.BEGIN_GEOMETRY,i,0,e],this.hitDetectionInstructions.push(this.beginGeometryInstruction2_)},u.prototype.finish=function(){return{instructions:this.instructions,hitDetectionInstructions:this.hitDetectionInstructions,coordinates:this.coordinates}},u.prototype.reverseHitDetectionInstructions=function(){var e,i=this.hitDetectionInstructions;i.reverse();var n,r,o=i.length,a=-1;for(e=0;e<o;++e)(r=(n=i[e])[0])==t.default.END_GEOMETRY?a=e:r==t.default.BEGIN_GEOMETRY&&(n[2]=e,(0,s.reverseSubArray)(this.hitDetectionInstructions,a,e),a=-1)},u.prototype.setFillStrokeStyle=function(t,e){var i=this.state;if(t){var r=t.getColor();i.fillStyle=(0,n.asColorLike)(r||o.defaultFillStyle)}else i.fillStyle=void 0;if(e){var s=e.getColor();i.strokeStyle=(0,n.asColorLike)(s||o.defaultStrokeStyle);var a=e.getLineCap();i.lineCap=void 0!==a?a:o.defaultLineCap;var u=e.getLineDash();i.lineDash=u?u.slice():o.defaultLineDash;var l=e.getLineDashOffset();i.lineDashOffset=l||o.defaultLineDashOffset;var h=e.getLineJoin();i.lineJoin=void 0!==h?h:o.defaultLineJoin;var c=e.getWidth();i.lineWidth=void 0!==c?c:o.defaultLineWidth;var d=e.getMiterLimit();i.miterLimit=void 0!==d?d:o.defaultMiterLimit,i.lineWidth>this.maxLineWidth&&(this.maxLineWidth=i.lineWidth,this.bufferedMaxExtent_=null)}else i.strokeStyle=void 0,i.lineCap=void 0,i.lineDash=null,i.lineDashOffset=void 0,i.lineJoin=void 0,i.lineWidth=void 0,i.miterLimit=void 0},u.prototype.createFill=function(e){var i=e.fillStyle,n=[t.default.SET_FILL_STYLE,i];return"string"!=typeof i&&n.push(!0),n},u.prototype.applyStroke=function(t){this.instructions.push(this.createStroke(t))},u.prototype.createStroke=function(e){return[t.default.SET_STROKE_STYLE,e.strokeStyle,e.lineWidth*this.pixelRatio,e.lineCap,e.lineJoin,e.miterLimit,this.applyPixelRatio(e.lineDash),e.lineDashOffset*this.pixelRatio]},u.prototype.updateFillStyle=function(t,e){var i=t.fillStyle;"string"==typeof i&&t.currentFillStyle==i||(void 0!==i&&this.instructions.push(e.call(this,t)),t.currentFillStyle=i)},u.prototype.updateStrokeStyle=function(t,e){var i=t.strokeStyle,n=t.lineCap,r=t.lineDash,o=t.lineDashOffset,a=t.lineJoin,u=t.lineWidth,l=t.miterLimit;(t.currentStrokeStyle!=i||t.currentLineCap!=n||r!=t.currentLineDash&&!(0,s.equals)(t.currentLineDash,r)||t.currentLineDashOffset!=o||t.currentLineJoin!=a||t.currentLineWidth!=u||t.currentMiterLimit!=l)&&(void 0!==i&&e.call(this,t),t.currentStrokeStyle=i,t.currentLineCap=n,t.currentLineDash=r,t.currentLineDashOffset=o,t.currentLineJoin=a,t.currentLineWidth=u,t.currentMiterLimit=l)},u.prototype.endGeometry=function(e){this.beginGeometryInstruction1_[2]=this.instructions.length,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_[2]=this.hitDetectionInstructions.length,this.beginGeometryInstruction2_=null;var i=[t.default.END_GEOMETRY,e];this.instructions.push(i),this.hitDetectionInstructions.push(i)},u.prototype.getBufferedMaxExtent=function(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=(0,r.clone)(this.maxExtent),this.maxLineWidth>0)){var t=this.resolution*(this.maxLineWidth+1)/2;(0,r.buffer)(this.bufferedMaxExtent_,t,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_},u}(i.default),c=exports.default=h;
378},{"./Instruction.js":"kTJv","../../extent/Relationship.js":"bUAS","../VectorContext.js":"LQER","../../colorlike.js":"V5XN","../../extent.js":"QDir","../canvas.js":"iAG7","../../array.js":"luEr","../../geom/flat/inflate.js":"znXl"}],"JWDt":[function(require,module,exports) {
379"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=e(require("./Builder.js")),i=e(require("./Instruction.js"));function e(t){return t&&t.__esModule?t:{default:t}}var o=function(){var t=function(i,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var e in i)Object.prototype.hasOwnProperty.call(i,e)&&(t[e]=i[e])})(i,e)};return function(i,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=i}t(i,e),i.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}}(),h=function(t){function e(i,e,o,h){var s=t.call(this,i,e,o,h)||this;return s.hitDetectionImage_=null,s.image_=null,s.imagePixelRatio_=void 0,s.anchorX_=void 0,s.anchorY_=void 0,s.height_=void 0,s.opacity_=void 0,s.originX_=void 0,s.originY_=void 0,s.rotateWithView_=void 0,s.rotation_=void 0,s.scale_=void 0,s.width_=void 0,s.declutterMode_=void 0,s.declutterImageWithText_=void 0,s}return o(e,t),e.prototype.drawPoint=function(t,e){if(this.image_){this.beginGeometry(t,e);var o=t.getFlatCoordinates(),h=t.getStride(),s=this.coordinates.length,a=this.appendFlatPointCoordinates(o,h);this.instructions.push([i.default.DRAW_IMAGE,s,a,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.
379ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_*this.imagePixelRatio_,this.originY_*this.imagePixelRatio_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_),this.declutterMode_,this.declutterImageWithText_]),this.hitDetectionInstructions.push([i.default.DRAW_IMAGE,s,a,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterMode_,this.declutterImageWithText_]),this.endGeometry(e)}},e.prototype.drawMultiPoint=function(t,e){if(this.image_){this.beginGeometry(t,e);var o=t.getFlatCoordinates(),h=t.getStride(),s=this.coordinates.length,a=this.appendFlatPointCoordinates(o,h);this.instructions.push([i.default.DRAW_IMAGE,s,a,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_*this.imagePixelRatio_,this.originY_*this.imagePixelRatio_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_),this.declutterMode_,this.declutterImageWithText_]),this.hitDetectionInstructions.push([i.default.DRAW_IMAGE,s,a,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterMode_,this.declutterImageWithText_]),this.endGeometry(e)}},e.prototype.finish=function(){return this.reverseHitDetectionInstructions(),this.anchorX_=void 0,this.anchorY_=void 0,this.hitDetectionImage_=null,this.image_=null,this.imagePixelRatio_=void 0,this.height_=void 0,this.scale_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.width_=void 0,t.prototype.finish.call(this)},e.prototype.setImageStyle=function(t,i){var e=t.getAnchor(),o=t.getSize(),h=t.getOrigin();this.imagePixelRatio_=t.getPixelRatio(this.pixelRatio),this.anchorX_=e[0],this.anchorY_=e[1],this.hitDetectionImage_=t.getHitDetectionImage(),this.image_=t.getImage(this.pixelRatio),this.height_=o[1],this.opacity_=t.getOpacity(),this.originX_=h[0],this.originY_=h[1],this.rotateWithView_=t.getRotateWithView(),this.rotation_=t.getRotation(),this.scale_=t.getScaleArray(),this.width_=o[0],this.declutterMode_=t.getDeclutterMode(),this.declutterImageWithText_=i},e}(t.default),s=exports.default=h;
380},{"./Builder.js":"QBj4","./Instruction.js":"kTJv"}],"ppsk":[function(require,module,exports) {
381"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=o(require("./Builder.js")),e=i(require("./Instruction.js")),n=require("../canvas.js");function r(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(r=function(t){return t?n:e})(t)}function i(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=typeof t&&"function"!=typeof t)return{default:t};var n=r(e);if(n&&n.has(t))return n.get(t);var i={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if("default"!==s&&{}.hasOwnProperty.call(t,s)){var u=o?Object.getOwnPropertyDescriptor(t,s):null;u&&(u.get||u.set)?Object.defineProperty(i,s,u):i[s]=t[s]}return i.default=t,n&&n.set(t,i),i}function o(t){return t&&t.__esModule?t:{default:t}}var s=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),u=function(t){function r(e,n,r,i){return t.call(this,e,n,r,i)||this}return s(r,t),r.prototype.drawFlatCoordinates_=function(t,n,r,i){var o=this.coordinates.length,s=this.appendFlatLineCoordinates(t,n,r,i,!1,!1),u=[e.default.MOVE_TO_LINE_TO,o,s];return this.instructions.push(u),this.hitDetectionInstructions.push(u),r},r.prototype.drawLineString=function(t,r){var i=this.state,o=i.strokeStyle,s=i.lineWidth;if(void 0!==o&&void 0!==s){this.updateStrokeStyle(i,this.applyStroke),this.beginGeometry(t,r),this.hitDetectionInstructions.push([e.default.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,n.defaultLineDash,n.defaultLineDashOffset],e.beginPathInstruction);var u=t.getFlatCoordinates(),a=t.getStride();this.drawFlatCoordinates_(u,0,u.length,a),this.hitDetectionInstructions.push(e.strokeInstru
381ction),this.endGeometry(r)}},r.prototype.drawMultiLineString=function(t,n){var r=this.state,i=r.strokeStyle,o=r.lineWidth;if(void 0!==i&&void 0!==o){this.updateStrokeStyle(r,this.applyStroke),this.beginGeometry(t,n),this.hitDetectionInstructions.push([e.default.SET_STROKE_STYLE,r.strokeStyle,r.lineWidth,r.lineCap,r.lineJoin,r.miterLimit,r.lineDash,r.lineDashOffset],e.beginPathInstruction);for(var s=t.getEnds(),u=t.getFlatCoordinates(),a=t.getStride(),l=0,c=0,h=s.length;c<h;++c)l=this.drawFlatCoordinates_(u,l,s[c],a);this.hitDetectionInstructions.push(e.strokeInstruction),this.endGeometry(n)}},r.prototype.finish=function(){var n=this.state;return null!=n.lastStroke&&n.lastStroke!=this.coordinates.length&&this.instructions.push(e.strokeInstruction),this.reverseHitDetectionInstructions(),this.state=null,t.prototype.finish.call(this)},r.prototype.applyStroke=function(n){null!=n.lastStroke&&n.lastStroke!=this.coordinates.length&&(this.instructions.push(e.strokeInstruction),n.lastStroke=this.coordinates.length),n.lastStroke=0,t.prototype.applyStroke.call(this,n),this.instructions.push(e.beginPathInstruction)},r}(t.default),a=exports.default=u;
382},{"./Builder.js":"QBj4","./Instruction.js":"kTJv","../canvas.js":"iAG7"}],"e19k":[function(require,module,exports) {
383"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=r(require("./Builder.js")),e=o(require("./Instruction.js")),i=require("../canvas.js"),n=require("../../geom/flat/simplify.js");function s(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,i=new WeakMap;return(s=function(t){return t?i:e})(t)}function o(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=typeof t&&"function"!=typeof t)return{default:t};var i=s(e);if(i&&i.has(t))return i.get(t);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in t)if("default"!==r&&{}.hasOwnProperty.call(t,r)){var l=o?Object.getOwnPropertyDescriptor(t,r):null;l&&(l.get||l.set)?Object.defineProperty(n,r,l):n[r]=t[r]}return n.default=t,i&&i.set(t,n),n}function r(t){return t&&t.__esModule?t:{default:t}}var l=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),u=function(t){function s(e,i,n,s){return t.call(this,e,i,n,s)||this}return l(s,t),s.prototype.drawFlatCoordinatess_=function(t,i,n,s){var o=this.state,r=void 0!==o.fillStyle,l=void 0!==o.strokeStyle,u=n.length;this.instructions.push(e.beginPathInstruction),this.hitDetectionInstructions.push(e.beginPathInstruction);for(var a=0;a<u;++a){var h=n[a],c=this.coordinates.length,f=this.appendFlatLineCoordinates(t,i,h,s,!0,!l),p=[e.default.MOVE_TO_LINE_TO,c,f];this.instructions.push(p),this.hitDetectionInstructions.push(p),l&&(this.instructions.push(e.closePathInstruction),this.hitDetectionInstructions.push(e.closePathInstruction)),i=h}return r&&(this.instructions.push(e.fillInstruction),this.hitDetectionInstructions.push(e.fillInstruction)),l&&(this.instructions.push(e.strokeInstruction),this.hitDetectionInstructions.push(e.strokeInstruction)),i},s.prototype.drawCircle=function(t,n){var s=this.state,o=s.fillStyle,r=s.strokeStyle;if(void 0!==o||void 0!==r){this.setFillStrokeStyles_(),this.beginGeometry(t,n),void 0!==s.fillStyle&&this.hitDetectionInstructions.push([e.default.SET_FILL_STYLE,i.defaultFillStyle]),void 0!==s.strokeStyle&&this.hitDetectionInstructions.push([e.default.SET_STROKE_STYLE,s.strokeStyle,s.lineWidth,s.lineCap,s.lineJoin,s.miterLimit,s.lineDash,s.lineDashOffset]);var l=t.getFlatCoordinates(),u=t.getStride(),a=this.coordinates.length;this.appendFlatLineCoordinates(l,0,l.length,u,!1,!1);var h=[e.default.CIRCLE,a];this.instructions.push(e.beginPathInstruction,h),this.hitDetectionInstructions.push(e.beginPathInstruction,h),void 0!==s.fillStyle&&(this.instructions.push(e.fillInstruction),this.hitDetectionInstructions.push(e.fillInstruction)),void 0!==s.strokeStyle&&(this.instructions.push(e.strokeInstru
383ction),this.hitDetectionInstructions.push(e.strokeInstruction)),this.endGeometry(n)}},s.prototype.drawPolygon=function(t,n){var s=this.state,o=s.fillStyle,r=s.strokeStyle;if(void 0!==o||void 0!==r){this.setFillStrokeStyles_(),this.beginGeometry(t,n),void 0!==s.fillStyle&&this.hitDetectionInstructions.push([e.default.SET_FILL_STYLE,i.defaultFillStyle]),void 0!==s.strokeStyle&&this.hitDetectionInstructions.push([e.default.SET_STROKE_STYLE,s.strokeStyle,s.lineWidth,s.lineCap,s.lineJoin,s.miterLimit,s.lineDash,s.lineDashOffset]);var l=t.getEnds(),u=t.getOrientedFlatCoordinates(),a=t.getStride();this.drawFlatCoordinatess_(u,0,l,a),this.endGeometry(n)}},s.prototype.drawMultiPolygon=function(t,n){var s=this.state,o=s.fillStyle,r=s.strokeStyle;if(void 0!==o||void 0!==r){this.setFillStrokeStyles_(),this.beginGeometry(t,n),void 0!==s.fillStyle&&this.hitDetectionInstructions.push([e.default.SET_FILL_STYLE,i.defaultFillStyle]),void 0!==s.strokeStyle&&this.hitDetectionInstructions.push([e.default.SET_STROKE_STYLE,s.strokeStyle,s.lineWidth,s.lineCap,s.lineJoin,s.miterLimit,s.lineDash,s.lineDashOffset]);for(var l=t.getEndss(),u=t.getOrientedFlatCoordinates(),a=t.getStride(),h=0,c=0,f=l.length;c<f;++c)h=this.drawFlatCoordinatess_(u,h,l[c],a);this.endGeometry(n)}},s.prototype.finish=function(){this.reverseHitDetectionInstructions(),this.state=null;var e=this.tolerance;if(0!==e)for(var i=this.coordinates,s=0,o=i.length;s<o;++s)i[s]=(0,n.snap)(i[s],e);return t.prototype.finish.call(this)},s.prototype.setFillStrokeStyles_=function(){var t=this.state;void 0!==t.fillStyle&&this.updateFillStyle(t,this.createFill),void 0!==t.strokeStyle&&this.updateStrokeStyle(t,this.applyStroke)},s}(t.default),a=exports.default=u;
384},{"./Builder.js":"QBj4","./Instruction.js":"kTJv","../canvas.js":"iAG7","../../geom/flat/simplify.js":"IEpt"}],"AXKs":[function(require,module,exports) {
385"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=exports.default={POINT:"point",LINE:"line"};
386},{}],"hCfl":[function(require,module,exports) {
387"use strict";function t(t,e,r,o,a){var s,i,n,u,c,v,d,h,f,p=r,M=r,l=0,x=0,_=r;for(s=r;s<o;s+=a){var b=e[s],g=e[s+1];void 0!==u&&(h=b-u,f=g-c,n=Math.sqrt(h*h+f*f),void 0!==v&&(x+=i,Math.acos((v*h+d*f)/(i*n))>t&&(x>l&&(l=x,p=_,M=s),x=0,_=s-a)),i=n,v=h,d=f),u=b,c=g}return(x+=n)>l?[_,s]:[p,M]}Object.defineProperty(exports,"__esModule",{value:!0}),exports.matchingChunk=t;
388},{}],"DEzw":[function(require,module,exports) {
389"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.TEXT_ALIGN=void 0;var t=o(require("./Builder.js")),e=o(require("./Instruction.js")),i=o(require("../../style/TextPlacement.js")),s=require("../../colorlike.js"),l=require("../canvas.js"),a=require("../../util.js"),n=require("../../extent.js"),r=require("../../geom/flat/straightchunk.js");function o(t){return t&&t.__esModule?t:{default:t}}var h=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function s(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),f=exports.TEXT_ALIGN={left:0,end:0,center:.5,right:1,start:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1},u=function(t){function o(e,i,s,l){var a=t.call(this,e,i,s,l)||this;return a.labels_=null,a.text_="",a.textOffsetX_=0,a.textOffsetY_=0,a.textRotateWithView_=void 0,a.textRotation_=0,a.textFillState_=null,a.fillStates={},a.textStrokeState_=null,a.strokeStates={},a.textState_={},a.textStates={},a.textKey_="",a.fillKey_="",a.strokeKey_="",a.declutterImageWithText_=void 0,a}return h(o,t),o.prototype.finish=function(){var e=t.prototype.finish.call(this);return e.textStates=this.textStates,e.fillStates=this.fillStates,e.strokeStates=this.strokeStates,e},o.prototype.drawText=function(t,s){var a=this.textFillState_,o=this.textStrokeState_,h=this.textState_;if(""!==this.text_&&h&&(a||o)){var f=this.coordinates,u=f.length,d=t.getType(),g=null,c=t.getStride();if(h.placement!==i.default.LINE||"LineString"!=d&&"MultiLineString"!=d&&"Polygon"!=d&&"MultiPolygon"!=d){var x=h.overflow?null:[];switch(d){case"Point":case"MultiPoint":g=t.getFlatCoordinates();break;case"LineString":g=t.getFlatMidpoint();break;case"Circle":g=t.getCenter();break;case"MultiLineString":g=t.getFlatMidpoints(),c=2;break;case"Polygon":g=t.getFlatInteriorPoint(),h.overflow||x.push(g[2]/this.resolution),c=3;break;case"MultiPolygon":var _=t.getFlatInteriorPoints();g=[];for(O=0,T=_.length;O<T;O+=3)h.overflow||x.push(_[O+2]/this.resolution),g.push(_[O],_[O+1]);if(0===g.length)return;c=2}if((K=this.appendFlatPointCoordinates(g,c))===u)return;if(x&&(K-u)/2!=g.length/c){var S=u/2;x=x.filter(function(t,e){var i=f[2*(S+e)]===g[e*c]&&f[2*(S+e)+1]===g[e*c+1];return i||--S,i})}this.saveTextStates_(),(h.backgroundFill||h.backgroundStroke)&&(this.setFillStrokeStyle(h.backgroundFill,h.backgroundStroke),h.backgroundFill&&(this.updateFillStyle(this.state,this.createFill),this.hitDetectionInstructions.push(this.createFill(this.state))),h.backgroundStroke&&(this.updateStrokeStyle(this.state,this.applyStroke),this.hitDetectionInstructions.push(this.createStroke(this.state)))),this.beginGeometry(t,s);var p=h.padding;if(p!=l.defaultPadding&&(h.scale[0]<0||h.scale[1]<0)){var y=h.padding[0],v=h.padding[1],k=h.padding[2],m=h.padding[3];h.scale[0]<0&&(v=-v,m=-m),h.scale[1]<0&&(y=-y,k=-k),p=[y,v,k,m]}var F=this.pixelRatio;this.instructions.push([e.default.DRAW_IMAGE,u,K,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[1,1],NaN,void 0,this.declutterImageWithText_,p==l.defaultPadding?l.defaultPadding:p.map(function(t){return t*F}),!!h.backgroundFill,!!h.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,x]);var b=1/F;this.hitDetectionInstructions.push([e.default.DRAW_IMAGE,u,K,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[b,b],NaN,void 0,this.declutterImageWithText_,p,!!h.backgroundFill,!!h.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,x]),this.endGeometry(s)}else{if(!(0,n.intersects)(this.getBufferedMaxExtent(),t.getExtent()))return;var L=void 0;if(g=t.getFlatCoordinates(),"LineString"==d)L=[g.length];else if("MultiLineString"==d)L=t.getEnds();else if("Polygon"==d)L=t.getEnds().slice(0,1);else if("MultiPolygon"==d){var A=t.getEndss();L=[];for(var O=0,T=A.length;O<T;++O)L.push(A[O][0])}this.beginGeometry(t,s);for(var C=h.textAlign,P=0,w=void 0,D=0,W=L.length;D<W;++D){if(null==C){var N=(0,r.matchingChunk)(h.maxAngle,g,P,L[D],c);P=N[0],w=N[1]}else w=L[D];for(var O=P;O<w;O+=c)f.push(g[O],g[O+1]);var K=f.length;P=L[D],this.drawChars_(u,K),u=K}this.endGeometry(s)}}},o.prototype.saveTextStates_=function(){var t=this.textStrokeState_,e=this.textState_,i=this.textFillState_,s=this.strokeKey_;t&&(s in this.strokeStates||(this.strokeStates[s]={strokeStyle:t.strokeStyle,lineCap:t.lineCap,lineDashOffset:t.lineDashOffset,lineWidth:t.lineWidth,lineJoin:t.lineJoin,miterLimit:t.miterLimit,lineDash:t.lineDash}));var a=this.textKey_;a in this.textStates||(this.textStates[a]={font:e.font,textAlign:e.textAlign||l.defaultTextAlign,justify:e.justify,textBaseline:e.textBaseline||l.defaultTextBaseline,scale:e.scale});var n=this.fillKey_;i&&(n in this.fillStates||(this.fillStates[n]={fillStyle:i.fillStyle}))},o.prototype.drawChars_=function(t,i){var s=this.textStrokeState_,l=this.textState_,a=this.strokeKey_,n=this.textKey_,r=this.fillKey_;this.saveTextStates_();var o=this.pixelRatio,h=f[l.textBaseline],u=this.textOffsetY_*o,d=this.text_,g=s?s.lineWidth*Math.abs(l.scale[0])/2:0;this.instructions.push([e.default.DRAW_CHARS,t,i,h,l.overflow,r,l.maxAngle,o,u,a,g*o,d,n,1]),this.hitDetectionInstructions.push([e.default.DRAW_CHARS,t,i,h,l.overflow,r,l.maxAngle,1,u,a,g,d,n,1/o])},o.prototype.setTextStyle=function(t,e){var i,n,r;
389if(t){var o=t.getFill();o?((n=this.textFillState_)||(n={},this.textFillState_=n),n.fillStyle=(0,s.asColorLike)(o.getColor()||l.defaultFillStyle)):(n=null,this.textFillState_=n);var h=t.getStroke();if(h){(r=this.textStrokeState_)||(r={},this.textStrokeState_=r);var f=h.getLineDash(),u=h.getLineDashOffset(),d=h.getWidth(),g=h.getMiterLimit();r.lineCap=h.getLineCap()||l.defaultLineCap,r.lineDash=f?f.slice():l.defaultLineDash,r.lineDashOffset=void 0===u?l.defaultLineDashOffset:u,r.lineJoin=h.getLineJoin()||l.defaultLineJoin,r.lineWidth=void 0===d?l.defaultLineWidth:d,r.miterLimit=void 0===g?l.defaultMiterLimit:g,r.strokeStyle=(0,s.asColorLike)(h.getColor()||l.defaultStrokeStyle)}else r=null,this.textStrokeState_=r;i=this.textState_;var c=t.getFont()||l.defaultFont;(0,l.registerFont)(c);var x=t.getScaleArray();i.overflow=t.getOverflow(),i.font=c,i.maxAngle=t.getMaxAngle(),i.placement=t.getPlacement(),i.textAlign=t.getTextAlign(),i.justify=t.getJustify(),i.textBaseline=t.getTextBaseline()||l.defaultTextBaseline,i.backgroundFill=t.getBackgroundFill(),i.backgroundStroke=t.getBackgroundStroke(),i.padding=t.getPadding()||l.defaultPadding,i.scale=void 0===x?[1,1]:x;var _=t.getOffsetX(),S=t.getOffsetY(),p=t.getRotateWithView(),y=t.getRotation();this.text_=t.getText()||"",this.textOffsetX_=void 0===_?0:_,this.textOffsetY_=void 0===S?0:S,this.textRotateWithView_=void 0!==p&&p,this.textRotation_=void 0===y?0:y,this.strokeKey_=r?("string"==typeof r.strokeStyle?r.strokeStyle:(0,a.getUid)(r.strokeStyle))+r.lineCap+r.lineDashOffset+"|"+r.lineWidth+r.lineJoin+r.miterLimit+"["+r.lineDash.join()+"]":"",this.textKey_=i.font+i.scale+(i.textAlign||"?")+(i.justify||"?")+(i.textBaseline||"?"),this.fillKey_=n?"string"==typeof n.fillStyle?n.fillStyle:"|"+(0,a.getUid)(n.fillStyle):""}else this.text_="";this.declutterImageWithText_=e},o}(t.default),d=exports.default=u;
390},{"./Builder.js":"QBj4","./Instruction.js":"kTJv","../../style/TextPlacement.js":"AXKs","../../colorlike.js":"V5XN","../canvas.js":"iAG7","../../util.js":"KniQ","../../extent.js":"QDir","../../geom/flat/straightchunk.js":"hCfl"}],"vqHd":[function(require,module,exports) {
391"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=n(require("./Builder.js")),t=n(require("./ImageBuilder.js")),i=n(require("./LineStringBuilder.js")),r=n(require("./PolygonBuilder.js")),u=n(require("./TextBuilder.js"));function n(e){return e&&e.__esModule?e:{default:e}}var o={Circle:r.default,Default:e.default,Image:t.default,LineString:i.default,Polygon:r.default,Text:u.default},s=function(){function e(e,t,i,r){this.tolerance_=e,this.maxExtent_=t,this.pixelRatio_=r,this.resolution_=i,this.buildersByZIndex_={}}return e.prototype.finish=function(){var e={};for(var t in this.buildersByZIndex_){e[t]=e[t]||{};var i=this.buildersByZIndex_[t];for(var r in i){var u=i[r].finish();e[t][r]=u}}return e},e.prototype.getBuilder=function(e,t){var i=void 0!==e?e.toString():"0",r=this.buildersByZIndex_[i];void 0===r&&(r={},this.buildersByZIndex_[i]=r);var u=r[t];void 0===u&&(u=new(0,o[t])(this.tolerance_,this.maxExtent_,this.resolution_,this.pixelRatio_),r[t]=u);return u},e}(),l=exports.default=s;
392},{"./Builder.js":"QBj4","./ImageBuilder.js":"JWDt","./LineStringBuilder.js":"ppsk","./PolygonBuilder.js":"e19k","./TextBuilder.js":"DEzw"}],"fpOz":[function(require,module,exports) {
393"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=o(require("../events/EventType.js")),e=o(require("../ImageState.js")),r=o(require("../Observable.js")),n=require("../util.js");function o(t){return t&&t.__esModule?t:{default:t}}var a=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),u=function(r){function o(t){var e=r.call(this)||this;return e.ready=!0,e.boundHandleImageChange_=e.handleImageChange_.bind(e),e.layer_=t,e.declutterExecutorGroup=null,e}return a(o,r),o.prototype.getFeatures=function(t){return(0,n.abstract)()},o.prototype.getData=function(t){return null},o.prototype.prepareFrame=function(t){return(0,n.abstract)()},o.prototype.renderFrame=function(t,e){return(0,n.abstract)()},o.prototype.loadedTileCallback=function(t,e,r){t[e]||(t[e]={}),t[e][r.tileCoord.toString()]=r},o.prototype.createLoadedTileFinder=function(t,e,r){return function(n,o){var a=this.loadedT
393ileCallback.bind(this,r,n);return t.forEachLoadedTile(e,n,o,a)}.bind(this)},o.prototype.forEachFeatureAtCoordinate=function(t,e,r,n,o){},o.prototype.getDataAtPixel=function(t,e,r){return null},o.prototype.getLayer=function(){return this.layer_},o.prototype.handleFontsChanged=function(){},o.prototype.handleImageChange_=function(t){t.target.getState()===e.default.LOADED&&this.renderIfReadyAndVisible()},o.prototype.loadImage=function(r){var n=r.getState();return n!=e.default.LOADED&&n!=e.default.ERROR&&r.addEventListener(t.default.CHANGE,this.boundHandleImageChange_),n==e.default.IDLE&&(r.load(),n=r.getState()),n==e.default.LOADED},o.prototype.renderIfReadyAndVisible=function(){var t=this.getLayer();t&&t.getVisible()&&"ready"===t.getSourceState()&&t.changed()},o.prototype.disposeInternal=function(){delete this.layer_,r.prototype.disposeInternal.call(this)},o}(r.default),i=exports.default=u;
394},{"../events/EventType.js":"C8cu","../ImageState.js":"Xz9x","../Observable.js":"IdSm","../util.js":"KniQ"}],"vPfl":[function(require,module,exports) {
395"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.canvasPool=void 0;var t=l(require("../Layer.js")),e=l(require("../../render/Event.js")),r=l(require("../../render/EventType.js")),n=require("../../transform.js"),o=require("../../color.js"),a=require("../../extent.js"),i=require("../../dom.js"),s=require("../../array.js");function l(t){return t&&t.__esModule?t:{default:t}}var c=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),u=exports.canvasPool=[],p=null;function d(){var t=document.createElement("canvas");t.width=1,t.height=1,p=t.getContext("2d")}var f=function(t){function l(e){var r=t.call(this,e)||this;return r.container=null,r.renderedResolution,r.tempTransform=(0,n.create)(),r.pixelTransform=(0,n.create)(),r.inversePixelTransform=(0,n.create)(),r.context=null,r.containerReused=!1,r.pixelContext_=null,r.frameState=null,r}return c(l,t),l.prototype.getImageData=function(t,e,r){var n;p||d(),p.clearRect(0,0,1,1);try{p.drawImage(t,e,r,1,1,0,0,1,1),n=p.getImageData(0,0,1,1).data}catch(o){return p=null,null}return n},l.prototype.getBackground=function(t){var e=this.getLayer().getBackground();return"function"==typeof e&&(e=e(t.viewState.resolution)),e||void 0},l.prototype.useContainer=function(t,e,r){var n,a,l=this.getLayer().getClassName();t&&t.className===l&&(!r||t&&t.style.backgroundColor&&(0,s.equals)((0,o.asArray)(t.style.backgroundColor),(0,o.asArray)(r)))&&((u=t.firstElementChild)instanceof HTMLCanvasElement&&(a=u.getContext("2d")));if(a&&a.canvas.style.transform===e?(this.container=t,this.context=a,this.containerReused=!0):this.containerReused&&(this.container=null,this.context=null,this.containerReused=!1),!this.container){(n=document.createElement("div")).className=l;var c=n.style;c.position="absolute",c.width="100%",c.height="100%";var u=(a=(0,i.createCanvasContext2D)()).canvas;n.appendChild(u),(c=u.style).position="absolute",c.left="0",c.transformOrigin="top left",this.container=n,this.context=a}this.containerReused||!r||this.container.style.backgroundColor||(this.container.style.backgroundColor=r)},l.prototype.clipUnrotated=function(t,e,r){var o=(0,a.getTopLeft)(r),i=(0,a.getTopRight)(r),s=(0,a.getBottomRight)(r),l=(0,a.getBottomLeft)(r);(0,n.apply)(e.coordinateToPixelTransform,o),(0,n.apply)(e.coordinateToPixelTransform,i),(0,n.apply)(e.coordinateToPixelTransform,s),(0,n.apply)(e.coordinateToPixelTransform,l);var c=this.inversePixelTransform;(0,n.apply)(c,o),(0,n.apply)(c,i),(0,n.apply)(c,s),(0,n.apply)(c,l),t.save(),t.beginPath(),t.moveTo(Math.round(o[0]),Math.round(o[1])),t.lineTo(Math.round(i[0]),Math.round(i[1])),t.lineTo(Math.round(s[0]),Math.round(s[1])),t.lineTo(Math.round(l[0]),Math.round(l[1])),t.clip()},l.prototype.dispatchRenderEvent_=function(t,r,n){var o=this.getLayer();if(o.hasListener(t)){var a=new e.default(t,this.inversePixelTransform,n,r);o.dispatchEvent(a)}},l.prototype.preRender=function(t,e){this.frameState=e,this.dispatchRenderEvent_(r.default.PRERENDER,t,e)},l.prototype.postRender=function(t,e){this.dispatchRenderEvent_(r.default.POSTRENDER,t,e)},l.prototype.getRenderTransform=function(t,e,r,o,a,i,s){var l=a/2,c=i/2,u=o/e,p=-u,d=-t[0]+s,f=-t[1];
395return(0,n.compose)(this.tempTransform,l,c,u,p,-r,d,f)},l.prototype.getDataAtPixel=function(t,e,r){var o=(0,n.apply)(this.inversePixelTransform,t.slice()),i=this.context,s=this.getLayer().getExtent();if(s){var l=(0,n.apply)(e.pixelToCoordinateTransform,t.slice());if(!(0,a.containsCoordinate)(s,l))return null}var c,u=Math.round(o[0]),p=Math.round(o[1]),d=this.pixelContext_;if(!d){var f=document.createElement("canvas");f.width=1,f.height=1,d=f.getContext("2d"),this.pixelContext_=d}d.clearRect(0,0,1,1);try{d.drawImage(i.canvas,u,p,1,1,0,0,1,1),c=d.getImageData(0,0,1,1).data}catch(h){return"SecurityError"===h.name?(this.pixelContext_=null,new Uint8Array):c}return 0===c[3]?null:c},l.prototype.disposeInternal=function(){delete this.frameState,t.prototype.disposeInternal.call(this)},l}(t.default),h=exports.default=f;
396},{"../Layer.js":"fpOz","../../render/Event.js":"EB6P","../../render/EventType.js":"z39m","../../transform.js":"P4eA","../../color.js":"eucy","../../extent.js":"QDir","../../dom.js":"Xno5","../../array.js":"luEr"}],"JxN9":[function(require,module,exports) {
397"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.drawTextOnPath=a;var r=require("../../math.js"),e=require("./transform.js");function a(a,t,n,i,s,v,l,u,f,o,p,h){var M=a[t],b=a[t+1],c=0,d=0,g=0,j=0;function q(){c=M,d=b,M=a[t+=i],b=a[t+1],j+=g,g=Math.sqrt((M-c)*(M-c)+(b-d)*(b-d))}do{q()}while(t<n-i&&j+g<v);for(var x=0===g?0:(v-j)/g,P=(0,r.lerp)(c,M,x),m=(0,r.lerp)(d,b,x),w=t-i,O=j,_=v+u*f(o,s,p);t<n-i&&j+g<_;)q();x=0===g?0:(_-j)/g;var k,y=(0,r.lerp)(c,M,x),I=(0,r.lerp)(d,b,x);if(h){var T=[P,m,y,I];(0,e.rotate)(T,0,4,2,h,T,T),k=T[0]>T[2]}else k=P>y;var z,A=Math.PI,B=[],C=w+i===t;if(g=0,j=O,M=a[t=w],b=a[t+1],C){q(),z=Math.atan2(b-d,M-c),k&&(z+=z>0?-A:A);var D=(y+P)/2,E=(I+m)/2;return B[0]=[D,E,(_-v)/2,z,s],B}for(var F=0,G=(s=s.replace(/\n/g," ")).length;F<G;){q();var H=Math.atan2(b-d,M-c);if(k&&(H+=H>0?-A:A),void 0!==z){var J=H-z;if(J+=J>A?-2*A:J<-A?2*A:0,Math.abs(J)>l)return null}z=H;for(var K=F,L=0;F<G;++F){var N=u*f(o,s[k?G-F-1:F],p);if(t+i<n&&j+g<v+L+N/2)break;L+=N}if(F!==K){var Q=k?s.substring(G-K,G-F):s.substring(K,F);x=0===g?0:(v+L/2-j)/g;D=(0,r.lerp)(c,M,x),E=(0,r.lerp)(d,b,x);B.push([D,E,L/2,H,Q]),v+=L}}return B}
398},{"../../math.js":"B96G","./transform.js":"LGwr"}],"pZKE":[function(require,module,exports) {
399"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=d(require("./Instruction.js")),e=require("./TextBuilder.js"),i=require("../../has.js"),a=require("../../transform.js"),r=require("../../extent.js"),s=require("../canvas.js"),n=require("../../geom/flat/textpath.js"),l=require("../../array.js"),o=require("../../geom/flat/length.js"),h=require("../../geom/flat/transform.js");function d(t){return t&&t.__esModule?t:{default:t}}var u=(0,r.createEmpty)(),c=[],f=[],p=[],g=[];function m(t){return t[3].declutterBox}var v=new RegExp("["+String.fromCharCode(1425)+"-"+String.fromCharCode(2303)+String.fromCharCode(64285)+"-"+String.fromCharCode(65023)+String.fromCharCode(65136)+"-"+String.fromCharCode(65276)+String.fromCharCode(67584)+"-"+String.fromCharCode(69631)+String.fromCharCode(124928)+"-"+String.fromCharCode(126975)+"]");function _(t,i){return"start"!==i&&"end"!==i||v.test(t)||(i="start"===i?"left":"right"),e.TEXT_ALIGN[i]}function x(t,e,i){return i>0&&t.push("\n",""),t.push(e,""),t}var y=function(){function d(t,e,i,r){this.overlaps=i,this.pixelRatio=e,this.resolution=t,this.alignFill_,this.instructions=r.instructions,this.coordinates=r.coordinates,this.coordinateCache_={},this.renderedTransform_=(0,a.create)(),this.hitDetectionInstructions=r.hitDetectionInstructions,this.pixelCoordinates_=null,this.viewRotation_=0,this.fillStates=r.fillStates||{},this.strokeStates=r.strokeStates||{},this.textStates=r.textStates||{},this.widths_={},this.labels_={}}return d.prototype.createLabel=function(t,a,r,n){var l=t+a+r+n;if(this.labels_[l])return this.labels_[l];var o=n?this.strokeStates[n]:null,h=r?this.fillStates[r]:null,d=this.textStates[a],u=this.pixelRatio,c=[d.scale[0]*u,d.scale[1]*u],f=Array.isArray(t),p=d.justify?e.TEXT_ALIGN[d.justify]:_(Array.isArray(t)?t[0]:t,d.textAlign||s.defaultTextAlign),g=n&&o.lineWidth?o.lineWidth:0,m=f?t:t.split("\n").reduce(x,[]),v=(0,s.getTextDimensions)(d,m),y=v.width,S=v.he
399ight,T=v.widths,C=v.heights,b=v.lineWidths,L=y+g,w=[],k=(L+2)*c[0],I=(S+g)*c[1],A={width:k<0?Math.floor(k):Math.ceil(k),height:I<0?Math.floor(I):Math.ceil(I),contextInstructions:w};(1==c[0]&&1==c[1]||w.push("scale",c),n)&&(w.push("strokeStyle",o.strokeStyle),w.push("lineWidth",g),w.push("lineCap",o.lineCap),w.push("lineJoin",o.lineJoin),w.push("miterLimit",o.miterLimit),(i.WORKER_OFFSCREEN_CANVAS?OffscreenCanvasRenderingContext2D:CanvasRenderingContext2D).prototype.setLineDash&&(w.push("setLineDash",[o.lineDash]),w.push("lineDashOffset",o.lineDashOffset)));r&&w.push("fillStyle",h.fillStyle),w.push("textBaseline","middle"),w.push("textAlign","center");for(var R,E=.5-p,M=p*L+E*g,O=[],D=[],B=0,W=0,P=0,N=0,X=0,Y=m.length;X<Y;X+=2){var j=m[X];if("\n"!==j){var q=m[X+1]||d.font;q!==R&&(n&&O.push("font",q),r&&D.push("font",q),R=q),B=Math.max(B,C[P]);var F=[j,M+E*T[P]+p*(T[P]-b[N]),.5*(g+B)+W];M+=T[P],n&&O.push("strokeText",F),r&&D.push("fillText",F),++P}else W+=B,B=0,M=p*L+E*g,++N}return Array.prototype.push.apply(w,O),Array.prototype.push.apply(w,D),this.labels_[l]=A,A},d.prototype.replayTextBackground_=function(t,e,i,a,r,s,n){t.beginPath(),t.moveTo.apply(t,e),t.lineTo.apply(t,i),t.lineTo.apply(t,a),t.lineTo.apply(t,r),t.lineTo.apply(t,e),s&&(this.alignFill_=s[2],this.fill_(t)),n&&(this.setStrokeStyle_(t,n),t.stroke())},d.prototype.calculateImageOrLabelDimensions_=function(t,e,i,s,n,l,o,h,d,m,v,_,x,y,S,T){var C,b=i-(o*=_[0]),L=s-(h*=_[1]),w=n+d>t?t-d:n,k=l+m>e?e-m:l,I=y[3]+w*_[0]+y[1],A=y[0]+k*_[1]+y[2],R=b-y[3],E=L-y[0];return(S||0!==v)&&(c[0]=R,g[0]=R,c[1]=E,f[1]=E,f[0]=R+I,p[0]=f[0],p[1]=E+A,g[1]=p[1]),0!==v?(C=(0,a.compose)((0,a.create)(),i,s,1,1,v,-i,-s),(0,a.apply)(C,c),(0,a.apply)(C,f),(0,a.apply)(C,p),(0,a.apply)(C,g),(0,r.createOrUpdate)(Math.min(c[0],f[0],p[0],g[0]),Math.min(c[1],f[1],p[1],g[1]),Math.max(c[0],f[0],p[0],g[0]),Math.max(c[1],f[1],p[1],g[1]),u)):(0,r.createOrUpdate)(Math.min(R,R+I),Math.min(E,E+A),Math.max(R,R+I),Math.max(E,E+A),u),x&&(b=Math.round(b),L=Math.round(L)),{drawImageX:b,drawImageY:L,drawImageW:w,drawImageH:k,originX:d,originY:m,declutterBox:{minX:u[0],minY:u[1],maxX:u[2],maxY:u[3],value:T},canvasTransform:C,scale:_}},d.prototype.replayImageOrLabel_=function(t,e,i,a,r,n,l){var o=!(!n&&!l),h=a.declutterBox,d=t.canvas,u=l?l[2]*a.scale[0]/2:0;return h.minX-u<=d.width/e&&h.maxX+u>=0&&h.minY-u<=d.height/e&&h.maxY+u>=0&&(o&&this.replayTextBackground_(t,c,f,p,g,n,l),(0,s.drawImageOrLabel)(t,a.canvasTransform,r,i,a.originX,a.originY,a.drawImageW,a.drawImageH,a.drawImageX,a.drawImageY,a.scale)),!0},d.prototype.fill_=function(t){if(this.alignFill_){var e=(0,a.apply)(this.renderedTransform_,[0,0]),i=512*this.pixelRatio;t.save(),t.translate(e[0]%i,e[1]%i),t.rotate(this.viewRotation_)}t.fill(),this.alignFill_&&t.restore()},d.prototype.setStrokeStyle_=function(t,e){t.strokeStyle=e[1],t.lineWidth=e[2],t.lineCap=e[3],t.lineJoin=e[4],t.miterLimit=e[5],t.setLineDash&&(t.lineDashOffset=e[7],t.setLineDash(e[6]))},d.prototype.drawLabelWithPointPlacement_=function(t,i,a,r){var n=this.textStates[i],l=this.createLabel(t,i,r,a),o=this.strokeStates[a],h=this.pixelRatio,d=_(Array.isArray(t)?t[0]:t,n.textAlign||s.defaultTextAlign),u=e.TEXT_ALIGN[n.textBaseline||s.defaultTextBaseline],c=o&&o.lineWidth?o.lineWidth:0;return{label:l,anchorX:d*(l.width/h-2*n.scale[0])+2*(.5-d)*c,anchorY:u*l.height/h+2*(.5-u)*c}},d.prototype.execute_=function(i,d,u,c,f,p,g,v){var _;this.pixelCoordinates_&&(0,l.equals)(u,this.renderedTransform_)?_=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),_=(0,h.transform2D)(this.coordinates,0,this.coordinates.length,2,u,this.pixelCoordinates_),(0,a.setFromArray)(this.renderedTransform_,u));for(var x,y,S,T,C,b,L,w,k,I,A,R,E,M,O,D,B=0,W=c.length,P=0,N=0,X=0,Y=null,j=null,q=this.coordinateCache_,F=this.viewRotation_,G=Math.round(1e12*Math.atan2(-u[1],u[0]))/1e12,H={context:i,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:F},J=this.instructions!=c||this.overlaps?0:200;B<W;){var K=c[B];switch(K[0]){case t.default.BEGIN_GEOMETRY:E=K[1],D=K[3],E.getGeometry()?void 0===g||(0,r.intersects)(g,D.getExtent())?++B:B=K[2]+1:B=K[2];break;case t.default.BEGIN_PATH:N>J&&(this.fill_(i),N=0),X>J&&(i.stroke(),X=0),N||X||(i.beginPath(),T=NaN,C=NaN),++B;break;case t.default.CIRCLE:var U=_[P=K[1]],V=_[P+1],z=_[P+2]-U,Q=_[P+3]-V,Z=Math.sqrt(z*z+Q*Q);i.moveTo(U+Z,V),i.arc(U,V,Z,0,2*Math.PI,!0),++B;break;case t.default.CLOSE_PATH:i.closePath(),++B;break;case t.default.CUSTOM:P=K[1],x=K[2];var $=K[3],tt=K[4],et=6==K.length?K[5]:void 0;H.geometry=$,H.feature=E,B in q||(q[B]=[]);var it=q[B];et?et(_,P,x,2,it):(it[0]=_[P],it[1]=_[P+1],it.length=2),tt(it,H),++B;break;
399case t.default.DRAW_IMAGE:P=K[1],x=K[2],w=K[3],y=K[4],S=K[5];var at=K[6],rt=K[7],st=K[8],nt=K[9],lt=K[10],ot=K[11],ht=K[12],dt=K[13],ut=K[14],ct=K[15];if(!w&&K.length>=20){k=K[19],I=K[20],A=K[21],R=K[22];var ft=this.drawLabelWithPointPlacement_(k,I,A,R);w=ft.label,K[3]=w;var pt=K[23];y=(ft.anchorX-pt)*this.pixelRatio,K[4]=y;var gt=K[24];S=(ft.anchorY-gt)*this.pixelRatio,K[5]=S,at=w.height,K[6]=at,dt=w.width,K[13]=dt}var mt=void 0;K.length>25&&(mt=K[25]);var vt=void 0,_t=void 0,xt=void 0;K.length>17?(vt=K[16],_t=K[17],xt=K[18]):(vt=s.defaultPadding,_t=!1,xt=!1),lt&&G?ot+=F:lt||G||(ot-=F);for(var yt=0;P<x;P+=2)if(!(mt&&mt[yt++]<dt/this.pixelRatio)){var St=[i,d,w,Vt=this.calculateImageOrLabelDimensions_(w.width,w.height,_[P],_[P+1],dt,at,y,S,st,nt,ot,ht,f,vt,_t||xt,E),rt,_t?Y:null,xt?j:null];if(v){if("none"===ut)continue;if("obstacle"===ut){v.insert(Vt.declutterBox);continue}var Tt=void 0,Ct=void 0;if(ct){var bt=x-P;if(!ct[bt]){ct[bt]=St;continue}if(Tt=ct[bt],delete ct[bt],Ct=m(Tt),v.collides(Ct))continue}if(v.collides(Vt.declutterBox))continue;Tt&&(v.insert(Ct),this.replayImageOrLabel_.apply(this,Tt)),v.insert(Vt.declutterBox)}this.replayImageOrLabel_.apply(this,St)}++B;break;case t.default.DRAW_CHARS:var Lt=K[1],wt=K[2],kt=K[3],It=K[4];R=K[5];var At=K[6],Rt=K[7],Et=K[8];A=K[9];var Mt=K[10];k=K[11],I=K[12];var Ot=[K[13],K[13]],Dt=this.textStates[I],Bt=Dt.font,Wt=[Dt.scale[0]*Rt,Dt.scale[1]*Rt],Pt=void 0;Bt in this.widths_?Pt=this.widths_[Bt]:(Pt={},this.widths_[Bt]=Pt);var Nt=(0,o.lineStringLength)(_,Lt,wt,2),Xt=Math.abs(Wt[0])*(0,s.measureAndCacheTextWidth)(Bt,k,Pt);if(It||Xt<=Nt){var Yt=this.textStates[I].textAlign,jt=(Nt-Xt)*e.TEXT_ALIGN[Yt],qt=(0,n.drawTextOnPath)(_,Lt,wt,2,k,jt,At,Math.abs(Wt[0]),s.measureAndCacheTextWidth,Bt,Pt,G?0:this.viewRotation_);t:if(qt){var Ft=[],Gt=void 0,Ht=void 0,Jt=void 0,Kt=void 0,Ut=void 0;if(A)for(Gt=0,Ht=qt.length;Gt<Ht;++Gt){Jt=(Ut=qt[Gt])[4],Kt=this.createLabel(Jt,I,"",A),y=Ut[2]+(Wt[0]<0?-Mt:Mt),S=kt*Kt.height+2*(.5-kt)*Mt*Wt[1]/Wt[0]-Et;var Vt=this.calculateImageOrLabelDimensions_(Kt.width,Kt.height,Ut[0],Ut[1],Kt.width,Kt.height,y,S,0,0,Ut[3],Ot,!1,s.defaultPadding,!1,E);if(v&&v.collides(Vt.declutterBox))break t;Ft.push([i,d,Kt,Vt,1,null,null])}if(R)for(Gt=0,Ht=qt.length;Gt<Ht;++Gt){Jt=(Ut=qt[Gt])[4],Kt=this.createLabel(Jt,I,R,""),y=Ut[2],S=kt*Kt.height-Et;Vt=this.calculateImageOrLabelDimensions_(Kt.width,Kt.height,Ut[0],Ut[1],Kt.width,Kt.height,y,S,0,0,Ut[3],Ot,!1,s.defaultPadding,!1,E);if(v&&v.collides(Vt.declutterBox))break t;Ft.push([i,d,Kt,Vt,1,null,null])}v&&v.load(Ft.map(m));for(var zt=0,Qt=Ft.length;zt<Qt;++zt)this.replayImageOrLabel_.apply(this,Ft[zt])}}++B;break;case t.default.END_GEOMETRY:if(void 0!==p){var Zt=p(E=K[1],D);if(Zt)return Zt}++B;break;case t.default.FILL:J?N++:this.fill_(i),++B;break;case t.default.MOVE_TO_LINE_TO:for(P=K[1],x=K[2],M=_[P],L=(O=_[P+1])+.5|0,(b=M+.5|0)===T&&L===C||(i.moveTo(M,O),T=b,C=L),P+=2;P<x;P+=2)b=(M=_[P])+.5|0,L=(O=_[P+1])+.5|0,P!=x-2&&b===T&&L===C||(i.lineTo(M,O),T=b,C=L);++B;break;case t.default.SET_FILL_STYLE:Y=K,this.alignFill_=K[2],N&&(this.fill_(i),N=0,X&&(i.stroke(),X=0)),i.fillStyle=K[1],++B;break;case t.default.SET_STROKE_STYLE:j=K,X&&(i.stroke(),X=0),this.setStrokeStyle_(i,K),++B;break;case t.default.STROKE:J?X++:i.stroke(),++B;break;default:++B}}N&&this.fill_(i),X&&i.stroke()},d.prototype.execute=function(t,e,i,a,r,s){this.viewRotation_=a,this.execute_(t,e,i,this.instructions,r,void 0,void 0,s)},d.prototype.executeHitDetection=function(t,e,i,a,r){return this.viewRotation_=i,this.execute_(t,1,e,this.hitDetectionInstructions,!0,a,r)},d}(),S=exports.default=y;
400},{"./Instruction.js":"kTJv","./TextBuilder.js":"DEzw","../../has.js":"f3Nv","../../transform.js":"P4eA","../../extent.js":"QDir","../canvas.js":"iAG7","../../geom/flat/textpath.js":"JxN9","../../array.js":"luEr","../../geom/flat/length.js":"ZZrx","../../geom/flat/transform.js":"LGwr"}],"ngEc":[function(require,module,exports) {
401"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0,exports.getPixelIndexArray=f;var e=s(require("./Executor.js")),t=require("../../extent.js"),r=require("../../transform.js"),o=require("../../dom.js"),i=require("../../obj.js"),n=require("../../array.js"),a=require("../../geom/flat/transform.js");
vendor: 13,892 bytes, lines 401-403
401function s(e){return e&&e.__esModule?e:{default:e}}var u=["Polygon","Circle","LineString","Image","Text","Default"],c=function(){function s(e,t,o,i,n,a){this.maxExtent_=e,this.overlaps_=i,this.pixelRatio_=o,this.resolution_=t,this.renderBuffer_=a,this.executorsByZIndex_={},this.hitDetectionContext_=null,this.hitDetectionTransform_=(0,r.create)(),this.createExecutors_(n)}return s.prototype.clip=function(e,t){var r=this.getClipCoords(t);e.beginPath(),e.moveTo(r[0],r[1]),e.lineTo(r[2],r[3]),e.lineTo(r[4],r[5]),e.lineTo(r[6],r[7]),e.clip()},s.prototype.createExecutors_=function(t){for(var r in t){var o=this.executorsByZIndex_[r];void 0===o&&(o={},this.executorsByZIndex_[r]=o);var i=t[r];for(var n in i){var a=i[n];o[n]=new e.default(this.resolution_,this.pixelRatio_,this.overlaps_,a)}}},s.prototype.hasExecutors=function(e){for(var t in this.executorsByZIndex_)for(var r=this.executorsByZIndex_[t],o=0,i=e.length;o<i;++o)if(e[o]in r)return!0;return!1},s.prototype.forEachFeatureAtCoordinate=function(e,i,a,s,c,h){var x=2*(s=Math.round(s))+1,v=(0,r.compose)(this.hitDetectionTransform_,s+.5,s+.5,1/i,-1/i,-a,-e[0],-e[1]),p=!this.hitDetectionContext_;p&&(this.hitDetectionContext_=(0,o.createCanvasContext2D)(x,x));var l,d=this.hitDetectionContext_;d.canvas.width!==x||d.canvas.height!==x?(d.canvas.width=x,d.canvas.height=x):p||d.clearRect(0,0,x,x),void 0!==this.renderBuffer_&&(l=(0,t.createEmpty)(),(0,t.extendCoordinate)(l,e),(0,t.buffer)(l,i*(this.renderBuffer_+s),l));var _,y=f(s);function m(e,t){for(var r=d.getImageData(0,0,x,x).data,o=0,i=y.length;o<i;o++)if(r[y[o]]>0){if(!h||"Image"!==_&&"Text"!==_||-1!==h.indexOf(e)){var n=(y[o]-3)/4,a=s-n%x,u=s-(n/x|0),f=c(e,t,a*a+u*u);if(f)return f}d.clearRect(0,0,x,x);break}}var g,C,I,B,b,E=Object.keys(this.executorsByZIndex_).map(Number);for(E.sort(n.numberSafeCompareFunction),g=E.length-1;g>=0;--g){var j=E[g].toString();for(I=this.executorsByZIndex_[j],C=u.length-1;C>=0;--C)if(void 0!==(B=I[_=u[C]])&&(b=B.executeHitDetection(d,v,a,m,l)))return b}},s.prototype.getClipCoords=function(e){var t=this.maxExtent_;if(!t)return null;var r=t[0],o=t[1],i=t[2],n=t[3],s=[r,o,r,n,i,n,i,o];return(0,a.transform2D)(s,0,8,2,e,s),s},s.prototype.isEmpty=function(){return(0,i.isEmpty)(this.executorsByZIndex_)},s.prototype.execute=function(e,t,r,o,i,a,s){var c=Object.keys(this.executorsByZIndex_).map(Number);c.sort(n.numberSafeCompareFunction),this.maxExtent_&&(e.save(),this.clip(e,r));var h,f,x,v,p,l,d=a||u;for(s&&c.reverse(),h=0,f=c.length;h<f;++h){var _=c[h].toString();for(p=this.executorsByZIndex_[_],x=0,v=d.length;x<v;++x){void 0!==(l=p[d[x]])&&l.execute(e,t,r,o,i,s)}}this.maxExtent_&&e.restore()},s}(),h={};function f(e){if(void 0!==h[e])return h[e];for(var t=2*e+1,r=e*e,o=new Array(r+1),i=0;i<=e;++i)for(var n=0;n<=e;++n){var a=i*i+n*n;if(a>r)break;var s=o[a];s||(s=[],o[a]=s),s.push(4*((e+i)*t+(e+n))+3),i>0&&s.push(4*((e-i)*t+(e+n))+3),n>0&&(s.push(4*((e+i)*t+(e-n))+3),i>0&&s.push(4*((e-i)*t+(e-n))+3))}for(var u=[],c=(i=0,o.length);i<c;++i)o[i]&&u.push.apply(u,o[i]);return h[e]=u,u}var x=exports.default=c;
402},{"./Executor.js":"pZKE","../../extent.js":"QDir","../../transform.js":"P4eA","../../dom.js":"Xno5","../../obj.js":"mH6q","../../array.js":"luEr","../../geom/flat/transform.js":"LGwr"}],"fo6K":[function(require,module,exports) {
403"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=l(require("../VectorContext.js")),e=require("../../colorlike.js"),i=require("../../transform.js"),s=require("../canvas.js"),a=require("../../array.js"),o=require("../../extent.js"),r=require("../../geom/flat/transform.js"),n=require("../../geom/SimpleGeometry.js");function l(t){return t&&t.__esModule?t:{default:t}}var h=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function s(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),_=function(t){function l(e,s,a,o,r,n,l){var h=t.call(this)||this;return h.context_=e,h.pixelRatio_=s,h.extent_=a,h.transform_=o,h.viewRotation_=r,h.squaredTolerance_=n,h.userTransform_=l,h.contextFillState_=null,h.contextStrokeState_=null,h.contextTextState_=null,h.fillState_=null,h.strokeState_=null,h.image_=null,h.imageAnchorX_=0,h.imageAnchorY_=0,h.imageHeight_=0,h.imageOpacity_=0,h.imageOriginX_=0,h.imageOriginY_=0,h.imageRotateWithView_=!1,h.imageRotation_=0,h.imageScale_=[0,0],h.imageWidth_=0,h.text_="",h.textOffsetX_=0,h.textOffsetY_=0,h.textRotateWithView_=!1,h.textRotation_=0,h.textScale_=[0,0],h.textFillState_=null,h.textStrokeState_=null,h.textState_=null,h.pixelCoordinates_=[],h.tmpLocalTransform_=(0,i.create)(),h}return h(l,t),l.prototype.drawImages_=function(t,e,s,a){if(this.image_){var o=(0,r.transform2D)(t,e,s,a,this.transform_,this.pixelCoordinates_),n=this.context_,l=this.tmpLocalTransform_,h=n.globalAlpha;1!=this.imageOpacity_&&(n.globalAlpha=h*this.imageOpacity_);var _=this.imageRotation_;this.imageRotateWithView_&&(_+=this.viewRotation_);for(var f=0,g=o.length;f<g;f+=2){var x=o[f]-this.imageAnchorX_,S=o[f+1]-this.imageAnchorY_;if(0!==_||1!=this.imageScale_[0]||1!=this.imageScale_[1]){var m=x+this.imageAnchorX_,c=S+this.imageAnchorY_;(0,i.compose)(l,m,c,1,1,_,-m,-c),n.setTransform.apply(n,l),n.translate(m,c),n.scale(this.imageScale_[0],this.imageScale_[1]),n.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,-this.imageAnchorX_,-this.imageAnchorY_,this.imageWidth_,this.imageHeight_),n.setTransform(1,0,0,1,0,0)}else n.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,x,S,this.imageWidth_,this.imageHeight_)}1!=this.imageOpacity_&&(n.globalAlpha=h)}},l.prototype.drawText_=function(t,e,s,a){if(this.textState_&&""!==this.text_){this.textFillState_&&this.setContextFillState_(this.textFillState_),this.textStrokeState_&&this.setContextStrokeState_(this.textStrokeState_),this.setContextTextState_(this.textState_);var o=(0,r.transform2D)(t,e,s,a,this.transform_,this.pixelCoordinates_),n=this.context_,l=this.textRotation_;for(this.textRotateWithView_&&(l+=this.viewRotation_);e<s;e+=a){var h=o[e]+this.textOffsetX_,_=o[e+1]+this.textOffsetY_;if(0!==l||1!=this.textScale_[0]||1!=this.textScale_[1]){var f=(0,i.compose)(this.tmpLocalTransform_,h,_,1,1,l,-h,-_);n.setTransform.apply(n,f),n.translate(h,_),n.scale(this.textScale_[0],this.textScale_[1]),this.textStrokeState_&&n.strokeText(this.text_,0,0),this.textFillState_&&n.fillText(this.text_,0,0),n.setTransform(1,0,0,1,0,0)}else this.textStrokeState_&&n.strokeText(this.text_,h,_),this.textFillState_&&n.fillText(this.text_,h,_)}}},l.prototype.moveToLineTo_=function(t,e,i,s,a){var o=this.context_,n=(0,r.transform2D)(t,e,i,s,this.transform_,this.pixelCoordinates_);o.moveTo(n[0],n[1]);var l=n.length;a&&(l-=2);for(var h=2;h<l;h+=2)o.lineTo(n[h],n[h+1]);return a&&o.closePath(),i},l.prototype.drawRings_=function(t,e,i,s){for(var a=0,o=i.length;a<o;++a)e=this.moveToLineTo_(t,e,i[a],s,!0);return e},l.prototype.drawCircle=function(t){if((0,o.intersects)(this.extent_,t.getExtent())){if(this.fillState_||this.strokeState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);var e=(0,n.transformGeom2D)(t,this.transform_,this.pixelCoordinates_),i=e[2]-e[0],s=e[3]-e[1],a=Math.sqrt(i*i+s*s),r=this.context_;r.beginPath(),r.arc(e[0],e[1],a,0,2*Math.PI),this.fillState_&&r.fill(),this.strokeState_&&r.stroke()}""!==this.text_&&this.drawText_(t.getCenter(),0,2,2)}},l.prototype.setStyle=function(t){this.setFillStrokeStyle(t.getFill(),t.getStroke()),this.setImageStyle(t.getImage()),this.setTextStyle(t.getText())},l.prototype.setTransform=function(t){this.transform_=t},l.prototype.drawGeometry=function(t){switch(t.getType()){case"Point":this.drawPoint(t);break;case"LineString":this.drawLineString(t);break;case"Polygon":this.drawPolygon(t);break;case"MultiPoint":this.drawMultiPoint(t);break;case"MultiLineString":this.drawMultiLineString(t);break;case"MultiPolygon":this.drawMultiPolygon(t);break;case"GeometryCollection":this.drawGeometryCollection(t);break;case"Circle":this.drawCircle(t)}},l.prototype.drawFeature=function(t,e){var i=e.getGeometryFunction()(t);i&&(0,o.intersects)(this.extent_,i.getExtent())&&(this.setStyle(e),this.drawGeometry(i))},l.prototype.drawGeometryCollection=function(t){for(var e=t.getGeometriesArray(),i=0,s=e.length;i<s;++i)this.drawGeometry(e[i])},l.prototype.drawPoint=function(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));var e=t.getFlatCoordinates(),i=t.getStride();this.image_&&this.drawImages_(e,0,e.length,i),""!==this.text_&&this.drawText_(e,0,e.length,i)},l.prototype.drawMultiPoint=function(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));var e=t.getFlatCoordinates(),i=t.getStride();this.image_&&this.drawImages_(e,0,e.length,i),""!==this.text_&&this.drawText_(e,0,e.length,i)},l.prototype.drawLineString=function(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),(0,o.intersects)(this.extent_,t.getExtent())){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);var e=this.context_,i=t.getFlatCoordinates();e.beginPath(),this.moveToLineTo_(i,0,i.length,t.getStride(),!1),e.stroke()}if(""!==this.text_){var s=t.getFlatMidpoint();this.drawText_(s,0,2,2)}}},l.prototype.drawMultiLineString=function(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));var e=t.getExtent();if((0,o.intersects)(this.extent_,e)){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);var i=this.context_,s=t.getFlatCoordinates(),a=0,r=t.getEnds(),n=t.getStride();i.beginPath();for(var l=0,h=r.length;l<h;++l)a=this.moveToLineTo_(s,a,r[l],n,!1);i.stroke()}if(""!==this.text_){var _=t.getFlatMidpoints();this.drawText_(_,0,_.length,2)}}},l.prototype.drawPolygon=function(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),(0,o.intersects)(this.extent_,t.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);var e=this.context_;e.beginPath(),this.drawRings_(t.getOrientedFlatCoordinates(),0,t.getEnds(),t.getStride()),this.fillState_&&e.fill(),this.strokeState_&&e.stroke()}if(""!==this.text_){var i=t.getFlatInteriorPoint();this.drawText_(i,0,2,2)}}},l.prototype.drawMultiPolygon=function(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),(0,o.intersects)(this.extent_,t.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);var e=this.context_,i=t.getOrientedFlatCoordinates(),s=0,a=t.getEndss(),r=t.getStride();e.beginPath();for(var n=0,l=a.length;n<l;++n){var h=a[n];s=this.drawRings_(i,s,h,r)}this.fillState_&&e.fill(),this.strokeState_&&e.stroke()}if(""!==this.text_){var _=t.getFlatInteriorPoints();this.drawText_(_,0,_.length,2)}}},l.prototype.setContextFillState_=function(t){var e=this.context_,i=this.contextFillState_;i?i.fillStyle!=t.fillStyle&&(i.fillStyle=t.fillStyle,e.fillStyle=t.fillStyle):(e.fillStyle=t.fillStyle,this.contextFillState_={fillStyle:t.fillStyle})},l.prototype.setContextStrokeState_=function(t){var e=this.context_,i=this.contextStrokeState_;i?(i.lineCap!=t.lineCap&&(i.lineCap=t.lineCap,e.lineCap=t.lineCap),e.setLineDash&&((0,a.equals)(i.lineDash,t.lineDash)||e.setLineDash(i.lineDash=t.lineDash),i.lineDashOffset!=t.lineDashOffset&&(i.lineDashOffset=t.lineDashOffset,e.lineDashOffset=t.lineDashOffset)),i.lineJoin!=t.lineJoin&&(i.lineJoin=t.lineJoin,e.lineJoin=t.lineJoin),i.lineWidth!=t.lineWidth&&(i.lineWidth=t.lineWidth,e.lineWidth=t.lineWidth),i.miterLimit!=t.miterLimit&&(i.miterLimit=t.miterLimit,e.miterLimit=t.miterLimit),i.strokeStyle!=t.strokeStyle&&(i.strokeStyle=t.strokeStyle,e.strokeStyle=t.strokeStyle)):(e.lineCap=t.lineCap,e.setLineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.lineJoin=t.lineJoin,e.lineWidth=t.lineWidth,e.miterLimit=t.miterLimit,e.strokeStyle=t.strokeStyle,this.contextStrokeState_={lineCap:t.lineCap,lineDash:t.lineDash,lineDashOffset:t.lineDashOffset,lineJoin:t.lineJoin,lineWidth:t.lineWidth,miterLimit:t.miterLimit,strokeStyle:t.strokeStyle})},l.prototype.setContextTextState_=function(t){var e=this.context_,i=this.contextTextState_,a=t.textAlign?t.textAlign:s.defaultTextAlign;i?(i.font!=t.font&&(i.font=t.font,e.font=t.font),i.textAlign!=a&&(i.textAlign=a,e.textAlign=a),i.textBaseline!=t.textBaseline&&(i.textBaseline=t.textBaseline,e.textBaseline=t.textBaseline)):(e.font=t.font,e.textAlign=a,e.textBaseline=t.textBaseline,this.contextTextState_={font:t.font,textAlign:a,textBaseline:t.textBaseline})},l.prototype.setFillStrokeStyle=function(t,i){var a=this;if(t){var o=t.getColor();this.fillState_={fillStyle:(0,e.asColorLike)(o||s.defaultFillStyle)}}else this.fillState_=null;if(i){var r=i.getColor(),n=i.getLineCap(),l=i.getLineDash(),h=i.getLineDashOffset(),_=i.getLineJoin(),f=i.getWidth(),g=i.getMiterLimit(),x=l||s.defaultLineDash;this.strokeState_={lineCap:void 0!==n?n:s.defaultLineCap,lineDash:1===this.pixelRatio_?x:x.map(function(t){return t*a.pixelRatio_}),lineDashOffset:(h||s.defaultLineDashOffset)*this.pixelRatio_,lineJoin:void 0!==_?_:s.defaultLineJoin,lineWidth:(void 0!==f?f:s.defaultLineWidth)*this.pixelRatio_,miter
403Limit:void 0!==g?g:s.defaultMiterLimit,strokeStyle:(0,e.asColorLike)(r||s.defaultStrokeStyle)}}else this.strokeState_=null},l.prototype.setImageStyle=function(t){var e;if(t&&(e=t.getSize())){var i=t.getAnchor(),s=t.getOrigin();this.image_=t.getImage(this.pixelRatio_),this.imageAnchorX_=i[0]*this.pixelRatio_,this.imageAnchorY_=i[1]*this.pixelRatio_,this.imageHeight_=e[1]*this.pixelRatio_,this.imageOpacity_=t.getOpacity(),this.imageOriginX_=s[0],this.imageOriginY_=s[1],this.imageRotateWithView_=t.getRotateWithView(),this.imageRotation_=t.getRotation(),this.imageScale_=t.getScaleArray(),this.imageWidth_=e[0]*this.pixelRatio_}else this.image_=null},l.prototype.setTextStyle=function(t){if(t){var i=t.getFill();if(i){var a=i.getColor();this.textFillState_={fillStyle:(0,e.asColorLike)(a||s.defaultFillStyle)}}else this.textFillState_=null;var o=t.getStroke();if(o){var r=o.getColor(),n=o.getLineCap(),l=o.getLineDash(),h=o.getLineDashOffset(),_=o.getLineJoin(),f=o.getWidth(),g=o.getMiterLimit();this.textStrokeState_={lineCap:void 0!==n?n:s.defaultLineCap,lineDash:l||s.defaultLineDash,lineDashOffset:h||s.defaultLineDashOffset,lineJoin:void 0!==_?_:s.defaultLineJoin,lineWidth:void 0!==f?f:s.defaultLineWidth,miterLimit:void 0!==g?g:s.defaultMiterLimit,strokeStyle:(0,e.asColorLike)(r||s.defaultStrokeStyle)}}else this.textStrokeState_=null;var x=t.getFont(),S=t.getOffsetX(),m=t.getOffsetY(),c=t.getRotateWithView(),d=t.getRotation(),u=t.getScaleArray(),p=t.getText(),y=t.getTextAlign(),v=t.getTextBaseline();this.textState_={font:void 0!==x?x:s.defaultFont,textAlign:void 0!==y?y:s.defaultTextAlign,textBaseline:void 0!==v?v:s.defaultTextBaseline},this.text_=void 0!==p?Array.isArray(p)?p.reduce(function(t,e,i){return t+(i%2?" ":e)},""):p:"",this.textOffsetX_=void 0!==S?this.pixelRatio_*S:0,this.textOffsetY_=void 0!==m?this.pixelRatio_*m:0,this.textRotateWithView_=void 0!==c&&c,this.textRotation_=void 0!==d?d:0,this.textScale_=[this.pixelRatio_*u[0],this.pixelRatio_*u[1]]}else this.text_=""},l}(t.default),f=exports.default=_;
404},{"../VectorContext.js":"LQER","../../colorlike.js":"V5XN","../../transform.js":"P4eA","../canvas.js":"iAG7","../../array.js":"luEr","../../extent.js":"QDir","../../geom/flat/transform.js":"LGwr","../../geom/SimpleGeometry.js":"pnrv"}],"Rlas":[function(require,module,exports) {
405"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=exports.default={FRACTION:"fraction",PIXELS:"pixels"};
406},{}],"tgH0":[function(require,module,exports) {
407"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=exports.default={BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",TOP_LEFT:"top-left",TOP_RIGHT:"top-right"};
408},{}],"Ojbp":[function(require,module,exports) {
409"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=r(require("./events/Target.js")),e=r(require("./events/EventType.js")),o=require("./util.js");function r(t){return t&&t.__esModule?t:{default:t}}var n=function(){var t=function(e,o){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function r(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),u=function(t){function r(e,o,r,n){var u=t.call(this)||this;return u.extent=e,u.pixelRatio_=r,u.resolution=o,u.state=n,u}return n(r,t),r.prototype.changed=function(){this.dispatchEvent(e.default.CHANGE)},r.prototype.getExtent=function(){return this.extent},r.prototype.getImage=function(){return(0,o.abstract)()},r.prototype.getPixelRatio=function(){return this.pixelRatio_},r.prototype.getResolution=function(){return this.resolution},r.prototype.getState=function(){return this.state},r.prototype.load=function(){(0,o.abstract)()},r}(t.default),i=exports.default=u;
410},{"./events/Target.js":"CR4Y","./events/EventType.js":"C8cu","./ut
410il.js":"KniQ"}],"DHWK":[function(require,module,exports) {
411"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0,exports.listenImage=h;var t=r(require("./events/EventType.js")),e=r(require("./ImageBase.js")),n=r(require("./ImageState.js")),i=require("./has.js"),s=require("./extent.js"),o=require("./events.js");function r(t){return t&&t.__esModule?t:{default:t}}var a=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),u=function(t){function e(e,i,s,o,r,a){var u=t.call(this,e,i,s,n.default.IDLE)||this;return u.src_=o,u.image_=new Image,null!==r&&(u.image_.crossOrigin=r),u.unlisten_=null,u.state=n.default.IDLE,u.imageLoadFunction_=a,u}return a(e,t),e.prototype.getImage=function(){return this.image_},e.prototype.handleImageError_=function(){this.state=n.default.ERROR,this.unlistenImage_(),this.changed()},e.prototype.handleImageLoad_=function(){void 0===this.resolution&&(this.resolution=(0,s.getHeight)(this.extent)/this.image_.height),this.state=n.default.LOADED,this.unlistenImage_(),this.changed()},e.prototype.load=function(){this.state!=n.default.IDLE&&this.state!=n.default.ERROR||(this.state=n.default.LOADING,this.changed(),this.imageLoadFunction_(this,this.src_),this.unlisten_=h(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))},e.prototype.setImage=function(t){this.image_=t,this.resolution=(0,s.getHeight)(this.extent)/this.image_.height},e.prototype.unlistenImage_=function(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)},e}(e.default);function h(e,n,s){var r=e,a=!0,u=!1,h=!1,l=[(0,o.listenOnce)(r,t.default.LOAD,function(){h=!0,u||n()})];return r.src&&i.IMAGE_DECODE?(u=!0,r.decode().then(function(){a&&n()}).catch(function(t){a&&(h?n():s())})):l.push((0,o.listenOnce)(r,t.default.ERROR,s)),function(){a=!1,l.forEach(o.unlistenByKey)}}var l=exports.default=u;
412},{"./events/EventType.js":"C8cu","./ImageBase.js":"Ojbp","./ImageState.js":"
412Xz9x","./has.js":"f3Nv","./extent.js":"QDir","./events.js":"UqnM"}],"XCOy":[function(require,module,exports) {
413"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0,exports.get=c;var t=r(require("../events/Target.js")),e=r(require("../events/EventType.js")),i=r(require("../ImageState.js")),a=require("../color.js"),n=require("../dom.js"),s=require("./IconImageCache.js"),o=require("../Image.js");function r(t){return t&&t.__esModule?t:{default:t}}var h=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function a(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(a.prototype=i.prototype,new a)}}(),l=null,_=function(t){function s(e,i,a,n,s,o){var r=t.call(this)||this;return r.hitDetectionImage_=null,r.image_=e||new Image,null!==n&&(r.image_.crossOrigin=n),r.canvas_={},r.color_=o,r.unlisten_=null,r.imageState_=s,r.size_=a,r.src_=i,r.tainted_,r}return h(s,t),s.prototype.isTainted_=function(){if(void 0===this.tainted_&&this.imageState_===i.default.LOADED){l||(l=(0,n.createCanvasContext2D)(1,1)),l.drawImage(this.image_,0,0);try{l.getImageData(0,0,1,1),this.tainted_=!1}catch(t){l=null,this.tainted_=!0}}return!0===this.tainted_},s.prototype.dispatchChangeEvent_=function(){this.dispatchEvent(e.default.CHANGE)},s.prototype.handleImageError_=function(){this.imageState_=i.default.ERROR,this.unlistenImage_(),this.dispatchChangeEvent_()},s.prototype.handleImageLoad_=function(){this.imageState_=i.default.LOADED,this.size_?(this.image_.width=this.size_[0],this.image_.height=this.size_[1]):this.size_=[this.image_.width,this.image_.height],this.unlistenImage_(),this.dispatchChangeEvent_()},s.prototype.getImage=function(t){return this.replaceColor_(t),this.canvas_[t]?this.canvas_[t]:this.image_},s.prototype.getPixelRatio=function(t){return this.replaceColor_(t),this.canvas_[t]?t:1},s.prototype.getImageState=function(){return this.imageState_},s.prototype.getHitDetectionImage=function(){if(!this.hitDetectionImage_)if(this.isTainted_()){var t=this.size_[0],e=this.size_[1],i=(0,n.createCanvasContext2D)(t,e);i.fillRect(0,0,t,e),this.hitDetectionImage_=i.canvas}else this.hitDetectionImage_=this.image_;return this.hitDetectionImage_},s.prototype.getSize=function(){return this.size_},s.prototype.getSrc=function(){return this.src_},s.prototype.load=function(){if(this.imageState_==i.default.IDLE){this.imageState_=i.default.LOADING;try{this.image_.src=this.src_}catch(t){this.handleImageError_()}this.unlisten_=(0,o.listenImage)(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this))}},s.prototype.replaceColor_=function(t){if(this.color_&&!this.canvas_[t]&&this.imageState_===i.default.LOADED){var e=document.createElement("canvas");this.canvas_[t]=e,e.width=Math.ceil(this.image_.width*t),e.height=Math.ceil(this.image_.height*t);var n=e.getContext("2d");if(n.scale(t,t),n.drawImage(this.image_,0,0),n.globalCompositeOperation="multiply","multiply"===n.globalCompositeOperation||this.isTainted_())n.fillStyle=(0,a.asString)(this.color_),n.fillRect(0,0,e.width/t,e.height/t),n.globalCompositeOperation="destination-in",n.drawImage(this.image_,0,0);else{for(var s=n.getImageData(0,0,e.width,e.height),o=s.data,r=this.color_[0]/255,h=this.color_[1]/255,l=this.color_[2]/255,_=this.color_[3],c=0,u=o.length;c<u;c+=4)o[c]*=r,o[c+1]*=h,o[c+2]*=l,o[c+3]*=_;n.putImageData(s,0,0)}}},s.prototype.unlistenImage_=function(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)},s}(t.default);function c(t,e,i,a,n,o){var r=s.shared.get(e,a,o);return r||(r=new _(t,e,i,a,n,o),s.shared.set(e,a,o,r)),r}var u=exports.default=_;
414},{"../events/Target.js":"CR4Y","../events/EventType.js":"C8cu","../ImageState.js":"
414Xz9x","../color.js":"eucy","../dom.js":"Xno5","./IconImageCache.js":"V0oB","../Image.js":"DHWK"}],"z2xv":[function(require,module,exports) {
415"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=h(require("../events/EventType.js")),i=h(require("./IconAnchorUnits.js")),e=h(require("./IconOrigin.js")),o=h(require("../ImageState.js")),r=h(require("./Image.js")),n=require("../color.js"),s=require("../asserts.js"),a=require("./IconImage.js"),c=require("../util.js");function h(t){return t&&t.__esModule?t:{default:t}}var l=function(){var t=function(i,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var e in i)Object.prototype.hasOwnProperty.call(i,e)&&(t[e]=i[e])})(i,e)};return function(i,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=i}t(i,e),i.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}}(),u=function(r){function h(t){var h=this,l=t||{},u=void 0!==l.opacity?l.opacity:1,g=void 0!==l.rotation?l.rotation:0,f=void 0!==l.scale?l.scale:1,_=void 0!==l.rotateWithView&&l.rotateWithView;(h=r.call(this,{opacity:u,rotation:g,scale:f,displacement:void 0!==l.displacement?l.displacement:[0,0],rotateWithView:_,declutterMode:l.declutterMode})||this).anchor_=void 0!==l.anchor?l.anchor:[.5,.5],h.normalizedAnchor_=null,h.anchorOrigin_=void 0!==l.anchorOrigin?l.anchorOrigin:e.default.TOP_LEFT,h.anchorXUnits_=void 0!==l.anchorXUnits?l.anchorXUnits:i.default.FRACTION,h.anchorYUnits_=void 0!==l.anchorYUnits?l.anchorYUnits:i.default.FRACTION,h.crossOrigin_=void 0!==l.crossOrigin?l.crossOrigin:null;var d=void 0!==l.img?l.img:null;h.imgSize_=l.imgSize;var p=l.src;(0,s.assert)(!(void 0!==p&&d),4),(0,s.assert)(!d||d&&h.imgSize_,5),void 0!==p&&0!==p.length||!d||(p=d.src||(0,c.getUid)(d)),(0,s.assert)(void 0!==p&&p.length>0,6);var O=void 0!==l.src?o.default.IDLE:o.default.LOADED;return h.color_=void 0!==l.color?(0,n.asArray)(l.color):null,h.iconImage_=(0,a.get)(d,p,void 0!==h.imgSize_?h.imgSize_:null,h.crossOrigin_,O,h.color_),h.offset_=void 0!==l.offset?l.offset:[0,0],h.offsetOrigin_=void 0!==l.offsetOrigin?l.offsetOrigin:e.default.TOP_LEFT,h.origin_=null,h.size_=void 0!==l.size?l.size:null,h}return l(h,r),h.prototype.clone=function(){var t=this.getScale();return new h({anchor:this.anchor_.slice(),anchorOrigin:this.anchorOrigin_,anchorXUnits:this.anchorXUnits_,anchorYUnits:this.anchorYUnits_,color:this.color_&&this.color_.slice?this.color_.slice():this.color_||void 0,crossOrigin:this.crossOrigin_,imgSize:this.imgSize_,offset:this.offset_.slice(),offsetOrigin:this.offsetOrigin_,opacity:this.getOpacity(),rotateWithView:this.getRotateWithView(),rotation:this.getRotation(),scale:Array.isArray(t)?t.slice():t,size:null!==this.size_?this.size_.slice():void 0,src:this.getSrc(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})},h.prototype.getAnchor=function(){var t=this.normalizedAnchor_;if(!t){t=this.anchor_;var o=this.getSize();if(this.anchorXUnits_==i.default.FRACTION||this.anchorYUnits_==i.default.FRACTION){if(!o)return null;t=this.anchor_.slice(),this.anchorXUnits_==i.default.FRACTION&&(t[0]*=o[0]),this.anchorYUnits_==i.default.FRACTION&&(t[1]*=o[1])}if(this.anchorOrigin_!=e.default.TOP_LEFT){if(!o)return null;t===this.anchor_&&(t=this.anchor_.slice()),this.anchorOrigin_!=e.default.TOP_RIGHT&&this.anchorOrigin_!=e.default.BOTTOM_RIGHT||(t[0]=-t[0]+o[0]),this.anchorOrigin_!=e.default.BOTTOM_LEFT&&this.anchorOrigin_!=e.default.BOTTOM_RIGHT||(t[1]=-t[1]+o[1])}this.normalizedAnchor_=t}var r=this.getDisplacement();return[t[0]-r[0],t[1]+r[1]]},h.prototype.setAnchor=function(t){this.anchor_=t,this.normalizedAnchor_=null},h.prototype.getColor=function(){return this.color_},h.prototype.getImage=function(t){return this.iconImage_.getImage(t)},h.prototype.getPixelRatio=function(t){return this.iconImage_.getPixelRatio(t)},h.prototype.getImageSize=function(){return this.iconImage_.getSize()},h.prototype.getImageState=function(){return this.iconImage_.getImageState()},h.prototype.getHitDetectionImage=function(){return this.iconImage_.getHitDetectionImage()},h.prototype.getOrigin=function(){if(this.origin_)return this.origin_;var t=this.offset_;if(this.offsetOrigin_!=e.default.TOP_LEFT){var i=this.getSize(),o=this.iconImage_.getSize();if(!i||!o)return null;t=t.slice(),this.offsetOrigin_!=e.default.TOP_RIGHT&&this.offsetOrigin_!=e.default.BOTTOM_RIGHT||(t[0]=o[0]-i[0]-t[0]),this.offsetOrigin_!=e.default.BOTTOM_LEFT&&this.offsetOrigin_!=e.default.BOTTOM_RIGHT||(t[1]=o[1]-i[1]-t[1])}return this.origin_=t,this.origin_},h.prototype.getSrc=function(){return this.iconImage_.getSrc()},h.prototype.getSize=function(){return this.size_?this.size_:this.iconImage_.getSize()},h.prototype.listenImageChange=function(i){this.iconImage_.addEventListener(t.default.CHANGE,i)},h.prototype.load=function(){this.iconImage_.load()},h.prototype.unlistenImageChange=function(i){this.iconImage_.removeEventListener(t.default.CHANGE,i)},h}(r.default),g=exports.default=u;
416},{"../events/EventType.js":"C8cu","./IconAnchorUnits.js":"Rlas","./IconOrigin.js":"tgH0","../ImageState.js":"
416Xz9x","./Image.js":"S8ow","../color.js":"eucy","../asserts.js":"fLG6","./IconImage.js":"XCOy","../util.js":"KniQ"}],"RPsG":[function(require,module,exports) {
417"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=i(require("./Fill.js")),e=i(require("./TextPlacement.js")),o=require("../size.js");function i(t){return t&&t.__esModule?t:{default:t}}var n="#333",r=function(){function i(i){var r=i||{};this.font_=r.font,this.rotation_=r.rotation,this.rotateWithView_=r.rotateWithView,this.scale_=r.scale,this.scaleArray_=(0,o.toSize)(void 0!==r.scale?r.scale:1),this.text_=r.text,this.textAlign_=r.textAlign,this.justify_=r.justify,this.textBaseline_=r.textBaseline,this.fill_=void 0!==r.fill?r.fill:new t.default({color:n}),this.maxAngle_=void 0!==r.maxAngle?r.maxAngle:Math.PI/4,this.placement_=void 0!==r.placement?r.placement:e.default.POINT,this.overflow_=!!r.overflow,this.stroke_=void 0!==r.stroke?r.stroke:null,this.offsetX_=void 0!==r.offsetX?r.offsetX:0,this.offsetY_=void 0!==r.offsetY?r.offsetY:0,this.backgroundFill_=r.backgroundFill?r.backgroundFill:null,this.backgroundStroke_=r.backgroundStroke?r.backgroundStroke:null,this.padding_=void 0===r.padding?null:r.padding}return i.prototype.clone=function(){var t=this.getScale();return new i({font:this.getFont(),placement:this.getPlacement(),maxAngle:this.getMaxAngle(),overflow:this.getOverflow(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(t)?t.slice():t,text:this.getText(),textAlign:this.getTextAlign(),justify:this.getJustify(),textBaseline:this.getTextBaseline(),fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,offsetX:this.getOffsetX(),offsetY:this.getOffsetY(),backgroundFill:this.getBackgroundFill()?this.getBackgroundFill().clone():void 0,backgroundStroke:this.getBackgroundStroke()?this.getBackgroundStroke().clone():void 0,padding:this.getPadding()||void 0})},i.prototype.getOverflow=function(){return this.overflow_},i.prototype.getFont=function(){return this.font_},i.prototype.getMaxAngle=function(){return this.maxAngle_},i.prototype.getPlacement=function(){return this.placement_},i.prototype.getOffsetX=function(){return this.offsetX_},i.prototype.getOffsetY=function(){return this.offsetY_},i.prototype.getFill=function(){return this.fill_},i.prototype.getRotateWithView=function(){return this.rotateWithView_},i.prototype.getRotation=function(){return this.rotation_},i.prototype.getScale=function(){return this.scale_},i.prototype.getScaleArray=function(){return this.scaleArray_},i.prototype.getStroke=function(){return this.stroke_},i.prototype.getText=function(){return this.text_},i.prototype.getTextAlign=function(){return this.textAlign_},i.prototype.getJustify=function(){return this.justify_},i.prototype.getTextBaseline=function(){return this.textBaseline_},i.prototype.getBackgroundFill=function(){return this.backgroundFill_},i.prototype.getBackgroundStroke=function(){return this.backgroundStroke_},i.prototype.getPadding=function(){return this.padding_},i.prototype.setOverflow=function(t){this.overflow_=t},i.prototype.setFont=function(t){this.font_=t},i.prototype.setMaxAngle=function(t){this.maxAngle_=t},i.prototype.setOffsetX=function(t){this.offsetX_=t},i.prototype.setOffsetY=function(t){this.offsetY_=t},i.prototype.setPlacement=function(t){this.placement_=t},i.prototype.setRotateWithView=function(t){this.rotateWithView_=t},i.prototype.setFill=function(t){this.fill_=t},i.prototype.setRotation=function(t){this.rotation_=t},i.prototype.setScale=function(t){this.scale_=t,this.scaleArray_=(0,o.toSize)(void 0!==t?t:1)},i.prototype.setStroke=function(t){this.stroke_=t},i.prototype.setText=function(t){this.text_=t},i.prototype.setTextAlign=function(t){this.textAlign_=t},i.prototype.setJustify=function(t){this.justify_=t},i.prototype.setTextBaseline=function(t){this.textBaseline_=t},i.prototype.setBackgroundFill=function(t){this.backgroundFill_=t},i.prototype.setBackgroundStroke=function(t){this.backgroundStroke_=t},i.prototype.setPadding=function(t){this.padding_=t},i}(),s=exports.default=r;
418},{"./Fill.js":"AFcg","./TextPlacement.js":"AXKs","../size.js":"TAHd"}],"qeKX":[function(require,module,exports) {
419"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"Circle",{enumerable:!0,get:function(){return e.default}}),Object.defineProperty(exports,"Fill",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(exports,"Icon",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(exports,"IconImage",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(exports,"Image",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(exports,"RegularShape",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(exports,"Stroke",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(exports,"Style",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(exports,"Text",{enumerable:!0,get:function(){return s.default}});var e=f(require("./style/Circle.js")),t=f(require("./style/Fill.js")),r=f(require("./style/Icon.js")),u=f(require("./style/IconImage.js")),n=f(require("./style/Image.js")),l=f(require("./style/RegularShape.js")),o=f(require("./style/Stroke.js")),i=f(require("./style/Style.js")),s=f(require("./style/Text.js"));
419function f(e){return e&&e.__esModule?e:{default:e}}
420},{"./style/Circle.js":"cdf1","./style/Fill.js":"AFcg","./style/Icon.js":"z2xv","./style/IconImage.js":"XCOy","./style/Image.js":"S8ow","./style/RegularShape.js":"il3X","./style/Stroke.js":"TXDt","./style/Style.js":"he4w","./style/Text.js":"RPsG"}],"MrCe":[function(require,module,exports) {
421"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.HIT_DETECT_RESOLUTION=void 0,exports.createHitDetectionImageData=g,exports.hitDetect=c;var e=l(require("./Immediate.js")),t=l(require("../../style/IconAnchorUnits.js")),r=require("../../style.js"),a=require("../../math.js"),i=require("../../dom.js"),o=require("../../extent.js"),n=require("../../array.js");function l(e){return e&&e.__esModule?e:{default:e}}var s=exports.HIT_DETECT_RESOLUTION=.5;function g(a,l,g,c,h,u,f){var v=a[0]*s,d=a[1]*s,m=(0,i.createCanvasContext2D)(v,d);m.imageSmoothingEnabled=!1;for(var p=m.canvas,y=new e.default(m,s,h,null,f),S=g.length,I=Math.floor(16777215/S),x={},T=1;T<=S;++T){var C=g[T-1],E=C.getStyleFunction()||c;if(c){var j=E(C,u);if(j){Array.isArray(j)||(j=[j]);for(var w="#"+("000000"+(T*I).toString(16)).slice(-6),D=0,M=j.length;D<M;++D){var O=j[D],_=O.getGeometryFunction()(C);if(_&&(0,o.intersects)(h,_.getExtent())){var q=O.clone(),L=q.getFill();L&&L.setColor(w);var b=q.getStroke();b&&(b.setColor(w),b.setLineDash(null)),q.setText(void 0);var P=O.getImage();if(P&&0!==P.getOpacity()){var R=P.getImageSize();if(!R)continue;var U=(0,i.createCanvasContext2D)(R[0],R[1],void 0,{alpha:!1}),z=U.canvas;U.fillStyle=w,U.fillRect(0,0,z.width,z.height),q.setImage(new r.Icon({img:z,imgSize:R,anchor:P.getAnchor(),anchorXUnits:t.default.PIXELS,anchorYUnits:t.default.PIXELS,offset:P.getOrigin(),opacity:1,size:P.getSize(),scale:P.getScale(),rotation:P.getRotation(),rotateWithView:P.getRotateWithView()}))}var A=q.getZIndex()||0;(N=x[A])||(N={},x[A]=N,N.Polygon=[],N.Circle=[],N.LineString=[],N.Point=[]),N[_.getType().replace("Multi","")].push(_,q)}}}}}for(var F=Object.keys(x).map(Number).sort(n.numberSafeCompareFunction),H=(T=0,F.length);T<H;++T){var N=x[F[T]];for(var X in N){var k=N[X];for(D=0,M=k.length;D<M;D+=2){y.setStyle(k[D+1]);for(var G=0,V=l.length;G<V;++G)y.setTransform(l[G]),y.drawGeometry(k[D])}}}return m.getImageData(0,0,p.width,p.height)}function c(e,t,r){var i=[];if(r){var o=Math.floor(Math.round(e[0])*s),n=Math.floor(Math.round(e[1])*s),l=4*((0,a.clamp)(o,0,r.width-1)+(0,a.clamp)(n,0,r.height-1)*r.width),g=r.data[l],c=r.data[l+1],h=r.data[l+2]+256*(c+256*g),u=Math.floor(16777215/t.length);h&&h%u==0&&i.push(t[h/u-1])}return i}
422},{"./Immediate.js":"fo6K","../../style/IconAnchorUnits.js":"Rlas","../../style.js":"qeKX","../../math.js":"B96G","../../dom.js":"Xno5","../../extent.js":"QDir","../../array.js":"luEr"}],"UCah":[function(require,module,exports) {
423"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.defaultOrder=n,exports.getSquaredTolerance=a,exports.getTolerance=l,exports.renderFeature=d;var e=r(require("../ImageState.js")),t=require("../util.js");function r(e){return e&&e.__esModule?e:{default:e}}var g=.5,i={Point:I,LineString:v,Polygon:y,MultiPoint:S,MultiLineString:T,MultiPolygon:s,GeometryCollection:f,Circle:o};function n(e,r){return parseInt((0,t.getUid)(e),10)-parseInt((0,t.getUid)(r),10)}function a(e,t){var r=l(e,t);return r*r}function l(e,t){return g*e/t}function o(e,t,r,g,i){var n=r.getFill(),a=r.getStroke();if(n||a){var l=e.getBuilder(r.getZIndex(),"Circle");l.setFillStrokeStyle(n,a),l.drawCircle(t,g)}var o=r.getText();if(o&&o.getText()){var d=(i||e).getBuilder(r.getZIndex(),"Text");d.setTextStyle(o),d.drawText(t,g)}}function d(t,r,g,i,n,a,l){var o=!1,d=g.getImage();if(d){var x=d.getImageState();x==e.default.LOADED||x==e.default.ERROR?d.unlistenImageChange(n):(x==e.default.IDLE&&d.load(),d.listenImageChange(n),o=!0)}return u(t,r,g,i,a,l),o}function u(e,t,r,g,n,a){var l=r.getGeometryFunction()(t);if(l){var o=l.simplifyTransformed(g,n);if(r.getRenderer())x(e,o,r,t);else(0,i[o.getType()])(e,o,r,t,a)}}function x(e,t,r,g){if("GeometryCollection"!=t.getType())e.getBuilder(r.getZIndex(),"Default").drawCustom(t,g,r.getRenderer(),r.getHitDetectionRenderer());else for(var i=t.getGeometries(),n=0,a=i.length;n<a;++n)x(e,i[n],r,g)}function f(e,t,r,g,n){var a,l,o=t.getGeometriesArray();for(a=0,l=o.length;a<l;++a){(0,i[o[a].getType()])(e,o[a],r,g,n)}}function v(e,t,r,g,i){var n=r.getStroke();if(n){var a=e.getBuilder(r.getZIndex(),"LineString");a.setFillStrokeStyle(null,n),a.drawLineString(t,g)}var l=r.getText();if(l&&l.getText()){var o=(i||e).getBuilder(r.getZIndex(),"Text");o.setTextStyle(l),o.drawText(t,g)}}function T(e,t,r,g,i){var n=r.getStroke();if(n){var a=e.getBuilder(r.getZIndex(),"LineString");a.setFillStrokeStyle(null,n),a.drawMultiLineString(t,g)}var l=r.getText();if(l&&l.getText()){var o=(i||e).getBuilder(r.getZIndex(),"Text");o.setTextStyle(l),o.drawText(t,g)}}
423function s(e,t,r,g,i){var n=r.getFill(),a=r.getStroke();if(a||n){var l=e.getBuilder(r.getZIndex(),"Polygon");l.setFillStrokeStyle(n,a),l.drawMultiPolygon(t,g)}var o=r.getText();if(o&&o.getText()){var d=(i||e).getBuilder(r.getZIndex(),"Text");d.setTextStyle(o),d.drawText(t,g)}}function I(t,r,g,i,n){var a,l=g.getImage(),o=g.getText();if(l){if(l.getImageState()!=e.default.LOADED)return;var d=t;if(n){var u=l.getDeclutterMode();if("none"!==u)if(d=n,"obstacle"===u){var x=t.getBuilder(g.getZIndex(),"Image");x.setImageStyle(l,a),x.drawPoint(r,i)}else o&&o.getText()&&(a={})}var f=d.getBuilder(g.getZIndex(),"Image");f.setImageStyle(l,a),f.drawPoint(r,i)}if(o&&o.getText()){var v=t;n&&(v=n);var T=v.getBuilder(g.getZIndex(),"Text");T.setTextStyle(o,a),T.drawText(r,i)}}function S(t,r,g,i,n){var a,l=g.getImage(),o=g.getText();if(l){if(l.getImageState()!=e.default.LOADED)return;var d=t;if(n){var u=l.getDeclutterMode();if("none"!==u)if(d=n,"obstacle"===u){var x=t.getBuilder(g.getZIndex(),"Image");x.setImageStyle(l,a),x.drawMultiPoint(r,i)}else o&&o.getText()&&(a={})}var f=d.getBuilder(g.getZIndex(),"Image");f.setImageStyle(l,a),f.drawMultiPoint(r,i)}if(o&&o.getText()){var v=t;n&&(v=n);var T=v.getBuilder(g.getZIndex(),"Text");T.setTextStyle(o,a),T.drawText(r,i)}}function y(e,t,r,g,i){var n=r.getFill(),a=r.getStroke();if(n||a){var l=e.getBuilder(r.getZIndex(),"Polygon");l.setFillStrokeStyle(n,a),l.drawPolygon(t,g)}var o=r.getText();if(o&&o.getText()){var d=(i||e).getBuilder(r.getZIndex(),"Text");d.setTextStyle(o),d.drawText(t,g)}}
424}
424,{"../ImageState.js":"Xz9x","../util.js":"KniQ"}],"F2e3":[function(require,module,exports) {
425"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=_(require("../../render/canvas/BuilderGroup.js")),t=f(require("./Layer.js")),r=_(require("../../render/canvas/ExecutorGroup.js")),n=_(require("../../ViewHint.js")),i=require("../../render/canvas/hitdetect.js"),o=require("../../transform.js"),a=require("../../extent.js"),s=require("../../dom.js"),u=require("../vector.js"),d=require("../../array.js"),l=require("../../proj.js"),c=require("../../util.js"),h=require("../../coordinate.js");function p(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(p=function(e){return e?r:t})(e)}function f(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=p(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n.default=e,r&&r.set(e,n),n}function _(e){return e&&e.__esModule?e:{default:e}}var g=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),v=function(p){function f(e){var t=p.call(this,e)||this;return t.boundHandleStyleImageChange_=t.handleStyleImageChange_.bind(t),t.animatingOrInteracting_,t.hitDetectionImageData_=null,t.renderedFeatures_=null,t.renderedRevision_=-1,t.renderedResolution_=NaN,t.renderedExtent_=(0,a.createEmpty)(),t.wrappedRenderedExtent_=(0,a.createEmpty)(),t.renderedRotation_,t.renderedCenter_=null,t.renderedProjection_=null,t.renderedRenderOrder_=null,t.replayGroup_=null,t.replayGroupChanged=!0,t.declutterExecutorGroup=null,t.clipping=!0,t.compositionContext_=null,t.opacity_=1,t}return g(f,p),f.prototype.renderWorlds=function(e,t,r){var i=t.extent,o=t.viewState,s=o.center,u=o.resolution,d=o.projection,l=o.rotation,c=d.getExtent(),h=this.getLayer().getSource(),p=t.pixelRatio,f=t.viewHints,_=!(f[n.default.ANIMATING]||f[n.default.INTERACTING]),g=this.compositionContext_,v=Math.round(t.size[0]*p),y=Math.round(t.size[1]*p),x=h.getWrapX()&&d.canWrapX(),m=x?(0,a.getWidth)(c):null,E=x?Math.ceil((i[2]-c[2])/m)+1:1,C=x?Math.floor((i[0]-c[0])/m):0;do{var R=this.getRenderTransform(s,u,l,p,v,y,C*m);e.execute(g,1,R,l,_,void 0,r)}while(++C<E)},f.prototype.setupCompositionContext_=function(){if(1!==this.opacity_){var e=(0,s.createCanvasContext2D)(this.context.canvas.width,this.context.canvas.height,t.canvasPool);this.compositionContext_=e}else this.compositionContext_=this.context},f.prototype.releaseCompositionContext_=function(){if(1!==this.opacity_){var e=this.context.globalAlpha;this.context.globalAlpha=this.opacity_,this.context.drawImage(this.compositionContext_.canvas,0,0),this.context.globalAlpha=e,(0,s.releaseCanvas)(this.compositionContext_),t.canvasPool.push(this.compositionContext_.canvas),this.compositionContext_=null}},f.prototype.renderDeclutter=function(e){this.declutterExecutorGroup&&(this.setupCompositionContext_(),this.renderWorlds(this.declutterExecutorGroup,e,e.declutterTree),this.releaseCompositionContext_())},f.prototype.renderFrame=function(e,t){var r=e.pixelRatio,n=e.layerStatesArray[e.layerIndex];(0,o.makeScale)(this.pixelTransform,1/r,1/r),(0,o.makeInverse)(this.inversePixelTransform,this.pixelTransform);var i=(0,o.toString)(this.pixelTransform);this.useContainer(t,i,this.getBackground(e));var s=this.context,u=s.canvas,d=this.replayGroup_,c=this.declutterExecutorGroup;if((!d||d.isEmpty())&&(!c||c.isEmpty()))return null;var h=Math.round(e.size[0]*r),p=Math.round(e.size[1]*r);u.width!=h||u.height!=p?(u.width=h,u.height=p,u.style.transform!==i&&(u.style.transform=i)):this.containerReused||s.clearRect(0,0,h,p),this.preRender(s,e);var f=e.viewState,_=f.projection;this.opacity_=n.opacity,this.setupCompositionContext_();var g=!1,v=!0;if(n.extent&&this.clipping){var y=(0,l.fromUserExtent)(n.extent,_);(g=(v=(0,a.intersects)(y,e.extent))&&!(0,a.containsExtent)(y,e.extent))&&this.clipUnrotated(this.compositionContext_,e,y)}return v&&this.renderWorlds(d,e),g&&this.compositionContext_.restore(
425),this.releaseCompositionContext_(),this.postRender(s,e),this.renderedRotation_!==f.rotation&&(this.renderedRotation_=f.rotation,this.hitDetectionImageData_=null),this.container},f.prototype.getFeatures=function(e){return new Promise(function(t){if(!this.hitDetectionImageData_&&!this.animatingOrInteracting_){var r=[this.context.canvas.width,this.context.canvas.height];(0,o.apply)(this.pixelTransform,r);var n=this.renderedCenter_,s=this.renderedResolution_,u=this.renderedRotation_,d=this.renderedProjection_,l=this.wrappedRenderedExtent_,c=this.getLayer(),h=[],p=r[0]*i.HIT_DETECT_RESOLUTION,f=r[1]*i.HIT_DETECT_RESOLUTION;h.push(this.getRenderTransform(n,s,u,i.HIT_DETECT_RESOLUTION,p,f,0).slice());var _=c.getSource(),g=d.getExtent();if(_.getWrapX()&&d.canWrapX()&&!(0,a.containsExtent)(g,l)){for(var v=l[0],y=(0,a.getWidth)(g),x=0,m=void 0;v<g[0];)m=y*--x,h.push(this.getRenderTransform(n,s,u,i.HIT_DETECT_RESOLUTION,p,f,m).slice()),v+=y;for(x=0,v=l[2];v>g[2];)m=y*++x,h.push(this.getRenderTransform(n,s,u,i.HIT_DETECT_RESOLUTION,p,f,m).slice()),v-=y}this.hitDetectionImageData_=(0,i.createHitDetectionImageData)(r,h,this.renderedFeatures_,c.getStyleFunction(),l,s,u)}t((0,i.hitDetect)(e,this.renderedFeatures_,this.hitDetectionImageData_))}.bind(this))},f.prototype.forEachFeatureAtCoordinate=function(e,t,r,n,i){var o=this;if(this.replayGroup_){var a,s=t.viewState.resolution,u=t.viewState.rotation,d=this.getLayer(),l={},h=function(e,t,r){var o=(0,c.getUid)(e),a=l[o];if(a){if(!0!==a&&r<a.distanceSq){if(0===r)return l[o]=!0,i.splice(i.lastIndexOf(a),1),n(e,d,t);a.geometry=t,a.distanceSq=r}}else{if(0===r)return l[o]=!0,n(e,d,t);i.push(l[o]={feature:e,layer:d,geometry:t,distanceSq:r,callback:n})}},p=[this.replayGroup_];return this.declutterExecutorGroup&&p.push(this.declutterExecutorGroup),p.some(function(n){return a=n.forEachFeatureAtCoordinate(e,s,u,r,h,n===o.declutterExecutorGroup&&t.declutterTree?t.declutterTree.all().map(function(e){return e.value}):null)}),a}},f.prototype.handleFontsChanged=function(){var e=this.getLayer();e.getVisible()&&this.replayGroup_&&e.changed()},f.prototype.handleStyleImageChange_=function(e){this.renderIfReadyAndVisible()},f.prototype.prepareFrame=function(t){var i=this.getLayer(),o=i.getSource();if(!o)return!1;var s=t.viewHints[n.default.ANIMATING],c=t.viewHints[n.default.INTERACTING],p=i.getUpdateWhileAnimating(),f=i.getUpdateWhileInteracting();if(this.ready&&!p&&s||!f&&c)return this.animatingOrInteracting_=!0,!0;this.animatingOrInteracting_=!1;var _=t.extent,g=t.viewState,v=g.projection,y=g.resolution,x=t.pixelRatio,m=i.getRevision(),E=i.getRenderBuffer(),C=i.getRenderOrder();void 0===C&&(C=u.defaultOrder);var R=g.center.slice(),T=(0,a.buffer)(_,E*y),I=T.slice(),w=[T.slice()],O=v.getExtent();if(o.getWrapX()&&v.canWrapX()&&!(0,a.containsExtent)(O,t.extent)){var j=(0,a.getWidth)(O),S=Math.max((0,a.getWidth)(T)/2,j);T[0]=O[0]-S,T[2]=O[2]+S,(0,h.wrapX)(R,v);var D=(0,a.wrapX)(w[0],v);D[0]<O[0]&&D[2]<O[2]?w.push([D[0]+j,D[1],D[2]+j,D[3]]):D[0]>O[0]&&D[2]>O[2]&&w.push([D[0]-j,D[1],D[2]-j,D[3]])}if(this.ready&&this.renderedResolution_==y&&this.renderedRevision_==m&&this.renderedRenderOrder_==C&&(0,a.containsExtent)(this.wrappedRenderedExtent_,T))return(0,d.equals)(this.renderedExtent_,I)||(this.hitDetectionImageData_=null,this.renderedExtent_=I),this.renderedCenter_=R,this.replayGroupChanged=!1,!0;this.replayGroup_=null;var G,b=new e.default((0,u.getTolerance)(y,x),T,y,x);this.getLayer().getDeclutter()&&(G=new e.default((0,u.getTolerance)(y,x),T,y,x));var F,q=(0,l.getUserProjection)();if(q){for(var W=0,A=w.length;W<A;++W){var P=w[W],M=(0,l.toUserExtent)(P,v);o.loadFeatures(M,(0,l.toUserResolution)(y,v),q)}F=(0,l.getTransformFromProjections)(q,v)}else for(W=0,A=w.length;W<A;++W)o.loadFeatures(w[W],y,v);var N=(0,u.getSquaredTolerance)(y,x),U=!0,H=function(e){var t,r=e.getStyleFunction()||i.getStyleFunction();if(r&&(t=r(e,y)),t){var n=this.renderFeature(e,N,t,b,F,G);U=U&&!n}}.bind(this),L=(0,l.toUserExtent)(T,v),X=o.getFeaturesInExtent(L);C&&X.sort(C);for(W=0,A=X.length;W<A;++W)H(X[W]);this.renderedFeatures_=X,this.ready=U;var k=b.finish(),B=new r.default(T,y,x,o.getOverlaps(),k,i.getRenderBuffer());return G&&(this.declutterExecutorGroup=new r.default(T,y,x,o.getOverlaps(),G.finish(),i.getRenderBuffer())),this.renderedResolution_=y,this.renderedRevision_=m,this.renderedRenderOrder_=C,this.renderedExtent_=I,this.wrappedRenderedExtent_=T,this.renderedCenter_=R,this.renderedProjection_=v,this.replayGroup_=B,this.hitDetectionImageData_=null,this.replayGroupChanged=!0,!0},f.prototype.renderFeature=function(e,t,r,n,i,o){if(!r)return!1;var a=!1;if(Array.isArray(r))for(var s=0,d=r.length;s<d;++s)a=(0,u.renderFeature)(n,e,r[s],t,this.boundHandleStyleImageChange_,i,o)||a;else a=(0,u.renderFeature)(n,e,r,t,this.boundHandleStyleImageChange_,i,o);return a},f}(t.default),y=exports.default=v;
426},{"../../render/canvas/BuilderGroup.js":"vqHd","./Layer.js":"vPfl","../../render/canvas/ExecutorGroup.js":"ngEc","../../ViewHint.js":"cuLW","../../render/canvas/hitdetect.js":"MrCe","../../transform.js":"P4eA","../../extent.js":"QDir","../../dom.js":"Xno5","../vector.js":"UCah","../../array.js":"luEr","../../proj.js":"Diht","../../util.js":"KniQ","../../coordinate.js":"nGsj"}],"dflx":[function(require,module,exports) {
427"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=r(require("./BaseVector.js")),e=r(require("../renderer/canvas/VectorLayer.js"));function r(t){return t&&t.__esModule?t:{default:t}}var o=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function o(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),n=function(t){function r(e){return t.call(this,e)||this}return o(r,t),r.prototype.createRenderer=function(){return new e.default(this)},r}(t.default),u=exports.default=n;
428},{"./BaseVector.js":"pskK","../renderer/canvas/VectorLayer.js":"F2e3"}],"MiUH":[function(require,module,exports) {
429"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=n(require("rbush")),e=require("../extent.js"),r=require("../util.js"),i=require("../obj.js");function n(t){return t&&t.__esModule?t:{default:t}}var o=function(){function n(e){this.rbush_=new t.default(e),this.items_={}}return n.prototype.insert=function(t,e){var i={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3],value:e};this.rbush_.insert(i),this.items_[(0,r.getUid)(e)]=i},n.prototype.load=function(t,e){for(var i=new Array(e.length),n=0,o=e.length;n<o;n++){var s=t[n],u=e[n],a={minX:s[0],minY:s[1],maxX:s[2],maxY:s[3],value:u};i[n]=a,this.items_[(0,r.getUid)(u)]=a}this.rbush_.load(i)},n.prototype.remove=function(t){var e=(0,r.getUid)(t),i=this.items_[e];return delete this.items_[e],null!==this.rbush_.remove(i)},n.prototype.update=function(t,i){var n=this.items_[(0,r.getUid)(i)],o=[n.minX,n.minY,n.maxX,n.maxY];(0,e.equals)(o,t)||(this.remove(i),this.insert(t,i))},n.prototype.getAll=function(){return this.rbush_.all().map(function(t){return t.value})},n.prototype.getInExtent=function(t){var e={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]};return this.rbush_.search(e).map(function(t){return t.value})},n.prototype.forEach=function(t){return this.forEach_(this.getAll(),t)},n.prototype.forEachInExtent=function(t,e){return this.forEach_(this.getInExtent(t),e)},n.prototype.forEach_=function(t,e){for(var r,i=0,n=t.length;i<n;i++)if(r=e(t[i]))return r;return r},n.prototype.isEmpty=function(){return(0,i.isEmpty)(this.items_)},n.prototype.clear=function(){this.rbush_.clear(),this.items_={}},n.prototype.getExtent=function(t){var r=this.rbush_.toJSON();return(0,e.createOrUpdate)(r.minX,r.minY,r.maxX,r.maxY,t)},n.prototype.concat=function(t){for(var e in this.rbush_.load(t.rbush_.all()),t.items_)this.items_[e]=t.items_[e]},n}(),s=exports.default=o;
430},{"rbush":"XGea","../extent.js":"QDir","../util.js":"KniQ","../obj.js":"mH6q"}],"H38a":[function(require,module,exports) {
431"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=o(require("../Object.js")),e=require("../util.js"),r=require("../proj.js");function o(t){return t&&t.__esModule?t:{default:t}}var n=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function o(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),i=function(t){function o(e){var o=t.call(this)||this;o.projection=(0,r.get)(e.projection),o.attributions_=u(e.attributions),o.attributionsCollapsible_=void 0===e.attributionsCollapsible||e.attributionsCollapsible,o.loading=!1,o.state_=void 0!==e.state?e.state:"ready",o.wrapX_=void 0!==e.wrapX&&e.wrapX,o.interpolate_=!!e.interpolate,o.viewResolver=null,o.viewRejector=null;var n=o;return o.viewPromise_=new Promise(function(t,e){n.viewResolver=t,n.viewRejector=e}),o}return n(o,t),o.prototype.getAttributions=function(){return this.attributions_},o.prototype.getAttributionsCollapsible=function(){return this.attributionsCollapsible_},o.prototype.getProjection=function(){return this.projection},o.prototype.getResolutions=function(){return(0,e.abstract)()},o.prototype.getView=function(){return this.viewPromise_},o.prototype.getState=function(){return this.state_},o.prototype.getWrapX=function(){return this.wrapX_},o.prototype.getInterpolate=function(){return this.interpolate_},o.prototype.refresh=function(){this.changed()},o.prototype.setAttributions=function(t){this.attributions_=u(t),this.changed()},o.prototype.setState=function(t){this.state_=t,this.changed()},o}(t.default);function u(t){return t?Array.isArray(t)?function(e){return t}:"function"==typeof t?t:function(e){return[t]}:null}var s=exports.default=i;
432},{"../Object.js":"PhPh","../util.js":"KniQ","../proj.js":"Diht"}],"s8Fc":[function(require,module,exports) {
433"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=exports.default={ADDFEATURE:"addfeature",CHANGEFEATURE:"changefeature",CLEAR:"clear",REMOVE
433FEATURE:"removefeature",FEATURESLOADSTART:"featuresloadstart",FEATURESLOADEND:"featuresloadend",FEATURESLOADERROR:"featuresloaderror"};
434},{}],"JpXE":[function(require,module,exports) {
435"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.all=t,exports.bbox=r,exports.tile=o;var e=require("./proj.js");function t(e,t){return[[-1/0,-1/0,1/0,1/0]]}function r(e,t){return[e]}function o(t){return function(r,o,n){var u=t.getZForResolution((0,e.fromUserResolution)(o,n)),i=t.getTileRangeForExtentAndZ((0,e.fromUserExtent)(r,n),u),s=[],x=[u,0,0];for(x[1]=i.minX;x[1]<=i.maxX;++x[1])for(x[2]=i.minY;x[2]<=i.maxY;++x[2])s.push((0,e.toUserExtent)(t.getTileCoordExtent(x),n));return s}}
436},{"./proj.js":"Diht"}],"U3JP":[function(require,module,exports) {
437"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.loadFeaturesXhr=t,exports.setWithCredentials=n,exports.xhr=s;var e=require("./functions.js"),r=!1;function t(e,t,s,n,o,a,i){var u=new XMLHttpRequest;u.open("GET","function"==typeof e?e(s,n,o):e,!0),"arraybuffer"==t.getType()&&(u.responseType="arraybuffer"),u.withCredentials=r,u.onload=function(e){if(!u.status||u.status>=200&&u.status<300){var r=t.getType(),n=void 0;"json"==r||"text"==r?n=u.responseText:"xml"==r?(n=u.responseXML)||(n=(new DOMParser).parseFromString(u.responseText,"application/xml")):"arraybuffer"==r&&(n=u.response),n?a(t.readFeatures(n,{extent:s,featureProjection:o}),t.readProjection(n)):i()}else i()},u.onerror=i,u.send()}function s(r,s){return function(n,o,a,i,u){var p=this;t(r,s,n,o,a,function(e,r){p.addFeatures(e),void 0!==i&&i(e)},u||e.VOID)}}function n(e){r=e}
438},{"./functions.js":"RgA2"}],"ZS12":[function(require,module,exports) {
439"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.VectorSourceEvent=void 0;var e=E(require("../Collection.js")),t=E(require("../CollectionEventType.js")),r=E(require("../events/Event.js")),n=E(require("../events/EventType.js")),i=E(require("../ObjectEventType.js")),s=E(require("../structs/RBush.js")),o=E(require("./Source.js")),a=E(require("./VectorEventType.js")),u=require("../functions.js"),l=require("../loadingstrategy.js"),h=require("../asserts.js"),d=require("../extent.js"),f=require("../array.js"),c=require("../util.js"),_=require("../obj.js"),p=require("../events.js"),v=require("../featureloader.js");function E(e){return e&&e.__esModule?e:{default:e}}var y=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),g=exports.VectorSourceEvent=function(e){function t(t,r,n){var i=e.call(this,t)||this;return i.feature=r,i.features=n,i}return y(t,e),t}(r.default),x=function(r){function o(t){var n=this,i=t||{};(n=r.call(this,{attributions:i.attributions,interpolate:!0,projection:void 0,state:"ready",wrapX:void 0===i.wrapX||i.wrapX})||this).on,n.once,n.un,n.loader_=u.VOID,n.format_=i.format,n.overlaps_=void 0===i.overlaps||i.overlaps,n.url_=i.url,void 0!==i.loader?n.loader_=i.loader:void 0!==n.url_&&((0,h.assert)(n.format_,7),n.loader_=(0,v.xhr)(n.url_,n.format_)),n.strategy_=void 0!==i.strategy?i.strategy:l.all;var o,a,d=void 0===i.useSpatialIndex||i.useSpatialIndex;return n.featuresRtree_=d?new s.default:null,n.loadedExtentsRtree_=new s.default,n.loadingExtentsCount_=0,n.nullGeometryFeatures_={},n.idIndex_={},n.uidIndex_={},n.featureChangeKeys_={},n.featuresCollection_=null,Array.isArray(i.features)?a=i.features:i.features&&(a=(o=i.features).getArray()),d||void 0!==o||(o=new e.default(a)),void 0!==a&&n.addFeaturesInternal(a),void 0!==o&&n.bindFeaturesCollection_(o),n}return y(o,r),o.prototype.addFeature=function(e){this.addFeatureInternal(e),this.changed()},o.prototype.addFeatureInternal=function(e){var t=(0,c.getUid)(e);if(this.addToIndex_(t,e)){this.setupChangeEvents_(t,e);var r=e.getGeometry();if(r){var n=r.getExtent();this.featuresRtree_&&this.featuresRtree_.insert(n,e)}else this.nullGeometryFeatures_[t]=e;this.dispatchEvent(new g(a.default.ADDFEATURE,e))}else this.featuresCollection_&&this.featuresCollection_.remove(e)},o.prototype.setupChangeEvents_=function(e,t){this.featureChangeKeys_[e]=[(0,p.listen)(t,n.default.CHANGE,this.handleFeatureChange_,this),(0,p.listen)(t,i.default.PROPERTYCHANGE,this.handleFeatureChange_,this)]},o.prototype.addToIndex_=function(e,t){var r=!0,n=t.getId();return void 0!==n&&(n.toString()in this.idIndex_?r=!1:this.idIndex_[n.toString()]=t),r&&((0,h.assert)(!(e in this.uidIndex_),30),this.uidIndex_[e]=t),r},o.prototype.addFeatures=function(e){this.addFeaturesInternal(e),this.changed()},o.prototype.addFeaturesInternal=function(e){for(var t=[],r=[],n=[],i=0,s=e.length;i<s;i++){var o=e[i],u=(0,c.getUid)(o);this.addToIndex_(u,o)&&r.push(o)}i=0;for(var l=r.length;i<l;i++){o=r[i],u=(0,c.getUid)(o);this.setupChangeEvents_(u,o);var h=o.getGeometry();if(h){var d=h.getExtent();t.push(d),n.push(o)}else this.nullGeometryFeatures_[u]=o}if(this.featuresRtree_&&this.featuresRtree_.load(t,n),this.hasListener(a.default.ADDFEATURE)){i=0;for(var f=r.length;i<f;i++)this.dispatchEvent(new g(a.default.ADDFEATURE,r[i]))}},o.prototype.bindFeaturesCollection_=function(e){var r=!1;this.addEventListener(a.default.ADDFEATURE,function(t){r||(r=!0,e.push(t.feature),r=!1)}
439),this.addEventListener(a.default.REMOVEFEATURE,function(t){r||(r=!0,e.remove(t.feature),r=!1)}),e.addEventListener(t.default.ADD,function(e){r||(r=!0,this.addFeature(e.element),r=!1)}.bind(this)),e.addEventListener(t.default.REMOVE,function(e){r||(r=!0,this.removeFeature(e.element),r=!1)}.bind(this)),this.featuresCollection_=e},o.prototype.clear=function(e){if(e){for(var t in this.featureChangeKeys_){this.featureChangeKeys_[t].forEach(p.unlistenByKey)}this.featuresCollection_||(this.featureChangeKeys_={},this.idIndex_={},this.uidIndex_={})}else if(this.featuresRtree_){var r=function(e){this.removeFeatureInternal(e)}.bind(this);for(var n in this.featuresRtree_.forEach(r),this.nullGeometryFeatures_)this.removeFeatureInternal(this.nullGeometryFeatures_[n])}this.featuresCollection_&&this.featuresCollection_.clear(),this.featuresRtree_&&this.featuresRtree_.clear(),this.nullGeometryFeatures_={};var i=new g(a.default.CLEAR);this.dispatchEvent(i),this.changed()},o.prototype.forEachFeature=function(e){if(this.featuresRtree_)return this.featuresRtree_.forEach(e);this.featuresCollection_&&this.featuresCollection_.forEach(e)},o.prototype.forEachFeatureAtCoordinateDirect=function(e,t){var r=[e[0],e[1],e[0],e[1]];return this.forEachFeatureInExtent(r,function(r){return r.getGeometry().intersectsCoordinate(e)?t(r):void 0})},o.prototype.forEachFeatureInExtent=function(e,t){if(this.featuresRtree_)return this.featuresRtree_.forEachInExtent(e,t);this.featuresCollection_&&this.featuresCollection_.forEach(t)},o.prototype.forEachFeatureIntersectingExtent=function(e,t){return this.forEachFeatureInExtent(e,function(r){if(r.getGeometry().intersectsExtent(e)){var n=t(r);if(n)return n}})},o.prototype.getFeaturesCollection=function(){return this.featuresCollection_},o.prototype.getFeatures=function(){var e;return this.featuresCollection_?e=this.featuresCollection_.getArray().slice(0):this.featuresRtree_&&(e=this.featuresRtree_.getAll(),(0,_.isEmpty)(this.nullGeometryFeatures_)||(0,f.extend)(e,(0,_.getValues)(this.nullGeometryFeatures_))),e},o.prototype.getFeaturesAtCoordinate=function(e){var t=[];return this.forEachFeatureAtCoordinateDirect(e,function(e){t.push(e)}),t},o.prototype.getFeaturesInExtent=function(e,t){var r=this;if(this.featuresRtree_){if(!(t&&t.canWrapX()&&this.getWrapX()))return this.featuresRtree_.getInExtent(e);var n=(0,d.wrapAndSliceX)(e,t);return[].concat.apply([],n.map(function(e){return r.featuresRtree_.getInExtent(e)}))}return this.featuresCollection_?this.featuresCollection_.getArray().slice(0):[]},o.prototype.getClosestFeatureToCoordinate=function(e,t){var r=e[0],n=e[1],i=null,s=[NaN,NaN],o=1/0,a=[-1/0,-1/0,1/0,1/0],l=t||u.TRUE;return this.featuresRtree_.forEachInExtent(a,function(e){if(l(e)){var t=e.getGeometry(),u=o;if((o=t.closestPointXY(r,n,s,o))<u){i=e;var h=Math.sqrt(o);a[0]=r-h,a[1]=n-h,a[2]=r+h,a[3]=n+h}}}),i},o.prototype.getExtent=function(e){return this.featuresRtree_.getExtent(e)},o.prototype.getFeatureById=function(e){var t=this.idIndex_[e.toString()];return void 0!==t?t:null},o.prototype.getFeatureByUid=function(e){var t=this.uidIndex_[e];return void 0!==t?t:null},o.prototype.getFormat=function(){return this.format_},o.prototype.getOverlaps=function(){return this.overlaps_},o.prototype.getUrl=function(){return this.url_},o.prototype.handleFeatureChange_=function(e){var t=e.target,r=(0,c.getUid)(t),n=t.getGeometry();if(n){var i=n.getExtent();r in this.nullGeometryFeatures_?(delete this.nullGeometryFeatures_[r],this.featuresRtree_&&this.featuresRtree_.insert(i,t)):this.featuresRtree_&&this.featuresRtree_.update(i,t)}else r in this.nullGeometryFeatures_||(this.featuresRtree_&&this.featuresRtree_.remove(t),this.nullGeometryFeatures_[r]=t);var s=t.getId();if(void 0!==s){var o=s.toString();this.idIndex_[o]!==t&&(this.removeFromIdIndex_(t),this.idIndex_[o]=t)}else this.removeFromIdIndex_(t),this.uidIndex_[r]=t;this.changed(),this.dispatchEvent(new g(a.default.CHANGEFEATURE,t))},o.prototype.hasFeature=function(e){var t=e.getId();return void 0!==t?t in this.idIndex_:(0,c.getUid)(e)in this.uidIndex_},o.prototype.isEmpty=function(){return this.featuresRtree_?this.featuresRtree_.isEmpty()&&(0,_.isEmpty)(this.nullGeometryFeatures_):!this.featuresCollection_||0===this.featuresCollection_.getLength()},o.prototype.loadFeatures=function(e,t,r){for(var n=this.loadedExtentsRtree_,i=this.strategy_(e,t,r),s=function(e,s){var u=i[e];
439n.forEachInExtent(u,function(e){return(0,d.containsExtent)(e.extent,u)})||(++o.loadingExtentsCount_,o.dispatchEvent(new g(a.default.FEATURESLOADSTART)),o.loader_.call(o,u,t,r,function(e){--this.loadingExtentsCount_,this.dispatchEvent(new g(a.default.FEATURESLOADEND,void 0,e))}.bind(o),function(){--this.loadingExtentsCount_,this.dispatchEvent(new g(a.default.FEATURESLOADERROR))}.bind(o)),n.insert(u,{extent:u.slice()}))},o=this,u=0,l=i.length;u<l;++u)s(u);this.loading=!(this.loader_.length<4)&&this.loadingExtentsCount_>0},o.prototype.refresh=function(){this.clear(!0),this.loadedExtentsRtree_.clear(),r.prototype.refresh.call(this)},o.prototype.removeLoadedExtent=function(e){var t,r=this.loadedExtentsRtree_;r.forEachInExtent(e,function(r){if((0,d.equals)(r.extent,e))return t=r,!0}),t&&r.remove(t)},o.prototype.removeFeature=function(e){if(e){var t=(0,c.getUid)(e);t in this.nullGeometryFeatures_?delete this.nullGeometryFeatures_[t]:this.featuresRtree_&&this.featuresRtree_.remove(e),this.removeFeatureInternal(e)&&this.changed()}},o.prototype.removeFeatureInternal=function(e){var t=(0,c.getUid)(e),r=this.featureChangeKeys_[t];if(r){r.forEach(p.unlistenByKey),delete this.featureChangeKeys_[t];var n=e.getId();return void 0!==n&&delete this.idIndex_[n.toString()],delete this.uidIndex_[t],this.dispatchEvent(new g(a.default.REMOVEFEATURE,e)),e}},o.prototype.removeFromIdIndex_=function(e){var t=!1;for(var r in this.idIndex_)if(this.idIndex_[r]===e){delete this.idIndex_[r],t=!0;break}return t},o.prototype.setLoader=function(e){this.loader_=e},o.prototype.setUrl=function(e){(0,h.assert)(this.format_,7),this.url_=e,this.setLoader((0,v.xhr)(e,this.format_))},o}(o.default),F=exports.default=x;
440},{"../Collection.js":"FnDa","../CollectionEventType.js":"BTrx","../events/Event.js":"fKNg","../events/EventType.js":"C8cu","../ObjectEventType.js":"zehl","../structs/RBush.js":"MiUH","./Source.js":"H38a","./VectorEventType.js":"s8Fc","../functions.js":"RgA2","../loadingstrategy.js":"JpXE","../asserts.js":"fLG6","../extent.js":"QDir","../array.js":"luEr","../util.js":"KniQ","../obj.js":"mH6q","../events.js":"UqnM","../featureloader.js":"U3JP"}],"e7i2":[function(require,module,exports) {
441"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.DrawEvent=void 0,exports.createBox=G,exports.createRegularPolygon=I,exports.default=void 0;var t=O(require("../geom/Circle.js")),e=O(require("../events/Event.js")),i=O(require("../events/EventType.js")),o=O(require("../Feature.js")),r=O(require("../geom/GeometryLayout.js")),n=O(require("./Property.js")),s=O(require("../geom/LineString.js")),a=O(require("../MapBrowserEvent.js")),h=O(require("../MapBrowserEventType.js")),u=O(require("../geom/MultiLineString.js")),d=O(require("../geom/MultiPoint.js")),_=O(require("../geom/MultiPolygon.js")),c=O(require("../geom/Point.js")),l=O(require("./Pointer.js")),f=T(require("../geom/Polygon.js")),p=O(require("../layer/Vector.js")),g=O(require("../source/Vector.js")),y=require("../functions.js"),m=require("../events/condition.js"),C=require("../extent.js"),k=require("../style/Style.js"),v=require("../proj.js"),P=require("../geom/SimpleGeometry.js"),w=require("../coordinate.js");function L(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,i=new WeakMap;return(L=function(t){return t?i:e})(t)}function T(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=typeof t&&"function"!=typeof t)return{default:t};var i=L(e);if(i&&i.has(t))return i.get(t);var o={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in t)if("default"!==n&&{}.hasOwnProperty.call(t,n)){var s=r?Object.getOwnPropertyDescriptor(t,n):null;s&&(s.get||s.set)?Object.defineProperty(o,n,s):o[n]=t[n]}return o.default=t,i&&i.set(t,o),o}function O(t){return t&&t.__esModule?t:{default:t}}var D=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function o(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}(),N={POINT:"Point",LINE_STRING:"LineString",POLYGON:"Polygon",CIRCLE:"Circle"},E={DRAWSTART:"drawstart",DRAWEND:"drawend",DRAWABORT:"drawabort"},F=exports.DrawEvent=function(t){function e(e,i){var o=t.call(this,e)||this;return o.feature=i,o}return D(e,t),e}(e.default),S=function(e){function l(i){var o=this,a=i;a.stopDown||(a.stopDown=y.FALSE),(o=e.call(this,a)||this).on,o.once,o.un,o.shouldHandle_=!1,o.downPx_=null,o.downTimeout_,o.lastDragTime_,o.pointerType_,o.freehand_=!1,o.source_=i.source?i.source:null,o.features_=i.features?i.features:null,o.snapTolerance_=i.snapTolerance?i.snapTolerance:12,o.type_=i.type,o.mode_=j(o.type_),o.stopClick_=!!i.stopClick,o.minPoints_=i.minPoints?i.minPoints:o.mode_===N.POLYGON?3:2,o.maxPoints_=o.mode_===N.CIRCLE?2:i.maxPoints?i.maxPoints:1/0,o.finishCondition_=i.finishCondition?i.finishCondition:y.TRUE,o.geometryLayout_=i.geometryLayout?i.geometryLayout:r.default.XY;var h=i.geometryFunction;if(!h){var u,d=o.mode_;if(d===N.CIRCLE)h=function(e,i,o){var r=i||new t.default([NaN,NaN]),n=(0,v.fromUserCoordinate)(e[0],o),s=(0,w.squaredDistance)(n,(0,v.fromUserCoordinate)(e[e.length-1],o));r.setCenterAndRadius(n,Math.sqrt(s),this.geometryLayout_);var a=(0,v.getUserProjection)();return a&&r.transform(o,a),r};else d===N.POINT?u=c.default:d===N.LINE_STRING?u=s.default:d===N.POLYGON&&(u=f.default),h=function(t,e,
441i){return e?d===N.POLYGON?t[0].length?e.setCoordinates([t[0].concat([t[0][0]])],this.geometryLayout_):e.setCoordinates([],this.geometryLayout_):e.setCoordinates(t,this.geometryLayout_):e=new u(t,this.geometryLayout_),e}}return o.geometryFunction_=h,o.dragVertexDelay_=void 0!==i.dragVertexDelay?i.dragVertexDelay:500,o.finishCoordinate_=null,o.sketchFeature_=null,o.sketchPoint_=null,o.sketchCoords_=null,o.sketchLine_=null,o.sketchLineCoords_=null,o.squaredClickTolerance_=i.clickTolerance?i.clickTolerance*i.clickTolerance:36,o.overlay_=new p.default({source:new g.default({useSpatialIndex:!1,wrapX:!!i.wrapX&&i.wrapX}),style:i.style?i.style:R(),updateWhileInteracting:!0}),o.geometryName_=i.geometryName,o.condition_=i.condition?i.condition:m.noModifierKeys,o.freehandCondition_,i.freehand?o.freehandCondition_=m.always:o.freehandCondition_=i.freehandCondition?i.freehandCondition:m.shiftKeyOnly,o.addChangeListener(n.default.ACTIVE,o.updateState_),o}return D(l,e),l.prototype.setMap=function(t){e.prototype.setMap.call(this,t),this.updateState_()},l.prototype.getOverlay=function(){return this.overlay_},l.prototype.handleEvent=function(t){t.originalEvent.type===i.default.CONTEXTMENU&&t.originalEvent.preventDefault(),this.freehand_=this.mode_!==N.POINT&&this.freehandCondition_(t);var o=t.type===h.default.POINTERMOVE,r=!0;!this.freehand_&&this.lastDragTime_&&t.type===h.default.POINTERDRAG&&(Date.now()-this.lastDragTime_>=this.dragVertexDelay_?(this.downPx_=t.pixel,this.shouldHandle_=!this.freehand_,o=!0):this.lastDragTime_=void 0,this.shouldHandle_&&void 0!==this.downTimeout_&&(clearTimeout(this.downTimeout_),this.downTimeout_=void 0));return this.freehand_&&t.type===h.default.POINTERDRAG&&null!==this.sketchFeature_?(this.addToDrawing_(t.coordinate),r=!1):this.freehand_&&t.type===h.default.POINTERDOWN?r=!1:o&&this.getPointerCount()<2?(r=t.type===h.default.POINTERMOVE)&&this.freehand_?(this.handlePointerMove_(t),this.shouldHandle_&&t.originalEvent.preventDefault()):("mouse"===t.originalEvent.pointerType||t.type===h.default.POINTERDRAG&&void 0===this.downTimeout_)&&this.handlePointerMove_(t):t.type===h.default.DBLCLICK&&(r=!1),e.prototype.handleEvent.call(this,t)&&r},l.prototype.handleDownEvent=function(t){return this.shouldHandle_=!this.freehand_,this.freehand_?(this.downPx_=t.pixel,this.finishCoordinate_||this.startDrawing_(t.coordinate),!0):this.condition_(t)?(this.lastDragTime_=Date.now(),this.downTimeout_=setTimeout(function(){this.handlePointerMove_(new a.default(h.default.POINTERMOVE,t.map,t.originalEvent,!1,t.frameState))}.bind(this),this.dragVertexDelay_),this.downPx_=t.pixel,!0):(this.lastDragTime_=void 0,!1)},l.prototype.handleUpEvent=function(t){var e=!0;if(0===this.getPointerCount())if(this.downTimeout_&&(clearTimeout(this.downTimeout_),this.downTimeout_=void 0),this.handlePointerMove_(t),this.shouldHandle_){var i=!this.finishCoordinate_;i&&this.startDrawing_(t.coordinate),!i&&this.freehand_?this.finishDrawing():this.freehand_||i&&this.mode_!==N.POINT||(this.atFinish_(t.pixel)?this.finishCondition_(t)&&this.finishDrawing():this.addToDrawing_(t.coordinate)),e=!1}else this.freehand_&&this.abortDrawing();return!e&&this.stopClick_&&t.preventDefault(),e},l.prototype.handlePointerMove_=function(t){if(this.pointerType_=t.originalEvent.pointerType,this.downPx_&&(!this.freehand_&&this.shouldHandle_||this.freehand_&&!this.shouldHandle_)){var e=this.downPx_,i=t.pixel,o=e[0]-i[0],r=e[1]-i[1],n=o*o+r*r;if(this.shouldHandle_=this.freehand_?n>this.squaredClickTolerance_:n<=this.squaredClickTolerance_,!this.shouldHandle_)return}this.finishCoordinate_?this.modifyDrawing_(t.coordinate):this.createOrUpdateSketchPoint_(t.coordinate.slice())},l.prototype.atFinish_=function(t){var e=!1;if(this.sketchFeature_){var i=!1,o=[this.finishCoordinate_],r=this.mode_;if(r===N.POINT)e=!0;else if(r===N.CIRCLE)e=2===this.sketchCoords_.length;else if(r===N.LINE_STRING)i=this.sketchCoords_.length>this.minPoints_;else if(r===N.POLYGON){var n=this.sketchCoords_;i=n[0].length>this.minPoints_,o=[n[0][0],n[0][n[0].length-2]]}if(i)for(var s=this.getMap(),a=0,h=o.length;a<h;
441a++){var u=o[a],d=s.getPixelFromCoordinate(u),_=t[0]-d[0],c=t[1]-d[1],l=this.freehand_?1:this.snapTolerance_;if(e=Math.sqrt(_*_+c*c)<=l){this.finishCoordinate_=u;break}}}return e},l.prototype.createOrUpdateSketchPoint_=function(t){this.sketchPoint_?this.sketchPoint_.getGeometry().setCoordinates(t):(this.sketchPoint_=new o.default(new c.default(t)),this.updateSketchFeatures_())},l.prototype.createOrUpdateCustomSketchLine_=function(t){this.sketchLine_||(this.sketchLine_=new o.default);var e=t.getLinearRing(0),i=this.sketchLine_.getGeometry();i?(i.setFlatCoordinates(e.getLayout(),e.getFlatCoordinates()),i.changed()):(i=new s.default(e.getFlatCoordinates(),e.getLayout()),this.sketchLine_.setGeometry(i))},l.prototype.startDrawing_=function(t){for(var e=this.getMap().getView().getProjection(),i=(0,P.getStrideForLayout)(this.geometryLayout_);t.length<i;)t.push(0);this.finishCoordinate_=t,this.mode_===N.POINT?this.sketchCoords_=t.slice():this.mode_===N.POLYGON?(this.sketchCoords_=[[t.slice(),t.slice()]],this.sketchLineCoords_=this.sketchCoords_[0]):this.sketchCoords_=[t.slice(),t.slice()],this.sketchLineCoords_&&(this.sketchLine_=new o.default(new s.default(this.sketchLineCoords_)));var r=this.geometryFunction_(this.sketchCoords_,void 0,e);this.sketchFeature_=new o.default,this.geometryName_&&this.sketchFeature_.setGeometryName(this.geometryName_),this.sketchFeature_.setGeometry(r),this.updateSketchFeatures_(),this.dispatchEvent(new F(E.DRAWSTART,this.sketchFeature_))},l.prototype.modifyDrawing_=function(t){for(var e,i,o=this.getMap(),r=this.sketchFeature_.getGeometry(),n=o.getView().getProjection(),s=(0,P.getStrideForLayout)(this.geometryLayout_);t.length<s;)t.push(0);(this.mode_===N.POINT?i=this.sketchCoords_:this.mode_===N.POLYGON?(i=(e=this.sketchCoords_[0])[e.length-1],this.atFinish_(o.getPixelFromCoordinate(t))&&(t=this.finishCoordinate_.slice())):i=(e=this.sketchCoords_)[e.length-1],i[0]=t[0],i[1]=t[1],this.geometryFunction_(this.sketchCoords_,r,n),this.sketchPoint_)&&this.sketchPoint_.getGeometry().setCoordinates(t);if("Polygon"===r.getType()&&this.mode_!==N.POLYGON)this.createOrUpdateCustomSketchLine_(r);else if(this.sketchLineCoords_){this.sketchLine_.getGeometry().setCoordinates(this.sketchLineCoords_)}this.updateSketchFeatures_()},l.prototype.addToDrawing_=function(t){var e,i,o=this.sketchFeature_.getGeometry(),r=this.getMap().getView().getProjection(),n=this.mode_;n===N.LINE_STRING||n===N.CIRCLE?(this.finishCoordinate_=t.slice(),(i=this.sketchCoords_).length>=this.maxPoints_&&(this.freehand_?i.pop():e=!0),i.push(t.slice()),this.geometryFunction_(i,o,r)):n===N.POLYGON&&((i=this.sketchCoords_[0]).length>=this.maxPoints_&&(this.freehand_?i.pop():e=!0),i.push(t.slice()),e&&(this.finishCoordinate_=i[0]),this.geometryFunction_(this.sketchCoords_,o,r)),this.createOrUpdateSketchPoint_(t.slice()),this.updateSketchFeatures_(),e&&this.finishDrawing()},l.prototype.removeLastPoint=function(){if(this.sketchFeature_){var t,e=this.sketchFeature_.getGeometry(),i=this.getMap().getView().getProjection(),o=this.mode_;if(o===N.LINE_STRING||o===N.CIRCLE){if((t=this.sketchCoords_).splice(-2,1),t.length>=2){this.finishCoordinate_=t[t.length-2].slice();var r=this.finishCoordinate_.slice();t[t.length-1]=r,this.createOrUpdateSketchPoint_(r)}this.geometryFunction_(t,e,i),"Polygon"===e.getType()&&this.sketchLine_&&this.createOrUpdateCustomSketchLine_(e)}else if(o===N.POLYGON){(t=this.sketchCoords_[0]).splice(-2,1);var n=this.sketchLine_.getGeometry();if(t.length>=2){r=t[t.length-2].slice();t[t.length-1]=r,this.createOrUpdateSketchPoint_(r)}n.setCoordinates(t),this.geometryFunction_(this.sketchCoords_,e,i)}1===t.length&&this.abortDrawing(),this.updateSketchFeatures_()}},l.prototype.finishDrawing=function(){var t=this.abortDrawing_();if(t){var e=this.sketchCoords_,i=t.getGeometry(),o=this.getMap().getView().getProjection();this.mode_===N.LINE_STRING?(e.pop(),this.geometryFunction_(e,i,o)):this.mode_===N.POLYGON&&(e[0].pop(),this.geometryFunction_(e,i,o),e=i.getCoordinates()),"MultiPoint"===this.type_?t.setGeometry(new d.default([e])):"MultiLineString"===this.type_?t.setGeometry(new u.default([e])):"MultiPolygon"===this.type_&&t.setGeometry(new _.default([e])),this.dispatchEvent(new F(E.DRAWEND,t)),this.features_&&this.features_.pu
441sh(t),this.source_&&this.source_.addFeature(t)}},l.prototype.abortDrawing_=function(){this.finishCoordinate_=null;var t=this.sketchFeature_;return this.sketchFeature_=null,this.sketchPoint_=null,this.sketchLine_=null,this.overlay_.getSource().clear(!0),t},l.prototype.abortDrawing=function(){var t=this.abortDrawing_();t&&this.dispatchEvent(new F(E.DRAWABORT,t))},l.prototype.appendCoordinates=function(t){var e,i=this.mode_,o=!this.sketchFeature_;if(o&&this.startDrawing_(t[0]),i===N.LINE_STRING||i===N.CIRCLE)e=this.sketchCoords_;else{if(i!==N.POLYGON)return;e=this.sketchCoords_&&this.sketchCoords_.length?this.sketchCoords_[0]:[]}o&&e.shift(),e.pop();for(var r=0;r<t.length;r++)this.addToDrawing_(t[r]);var n=t[t.length-1];this.addToDrawing_(n),this.modifyDrawing_(n)},l.prototype.extend=function(t){var e=t.getGeometry();this.sketchFeature_=t,this.sketchCoords_=e.getCoordinates();var i=this.sketchCoords_[this.sketchCoords_.length-1];this.finishCoordinate_=i.slice(),this.sketchCoords_.push(i.slice()),this.sketchPoint_=new o.default(new c.default(i)),this.updateSketchFeatures_(),this.dispatchEvent(new F(E.DRAWSTART,this.sketchFeature_))},l.prototype.updateSketchFeatures_=function(){var t=[];this.sketchFeature_&&t.push(this.sketchFeature_),this.sketchLine_&&t.push(this.sketchLine_),this.sketchPoint_&&t.push(this.sketchPoint_);var e=this.overlay_.getSource();e.clear(!0),e.addFeatures(t)},l.prototype.updateState_=function(){var t=this.getMap(),e=this.getActive();t&&e||this.abortDrawing(),this.overlay_.setMap(e?t:null)},l}(l.default);function R(){var t=(0,k.createEditingStyle)();return function(e,i){return t[e.getGeometry().getType()]}}function I(e,i){return function(o,r,n){var s=(0,v.fromUserCoordinate)(o[0],n),a=(0,v.fromUserCoordinate)(o[o.length-1],n),h=Math.sqrt((0,w.squaredDistance)(s,a)),u=r||(0,f.fromCircle)(new t.default(s),e),d=i;if(!i&&0!==i){var _=a[0]-s[0],c=a[1]-s[1];d=Math.atan2(c,_)}(0,f.makeRegular)(u,s,h,d);var l=(0,v.getUserProjection)();return l&&u.transform(n,l),u}}function G(){return function(t,e,i){var o=(0,C.boundingExtent)([t[0],t[t.length-1]].map(function(t){return(0,v.fromUserCoordinate)(t,i)})),r=[[(0,C.getBottomLeft)(o),(0,C.getBottomRight)(o),(0,C.getTopRight)(o),(0,C.getTopLeft)(o),(0,C.getBottomLeft)(o)]],n=e;n?n.setCoordinates(r):n=new f.default(r);var s=(0,v.getUserProjection)();return s&&n.transform(i,s),n}}function j(t){switch(t){case"Point":case"MultiPoint":return N.POINT;case"LineString":case"MultiLineString":return N.LINE_STRING;case"Polygon":case"MultiPolygon":return N.POLYGON;case"Circle":return N.CIRCLE;default:throw new Error("Invalid type: "+t)}}var M=exports.default=S;
442},{"../geom/Circle.js":"AyCw","../events/Event.js":"fKNg","../events/EventType.js":"C8cu","../Feature.js":"mYW9","../geom/GeometryLayout.js":"Utvi","./Property.js":"caOi","../geom/LineString.js":"DfxW","../MapBrowserEvent.js":"HMLS","../MapBrowserEventType.js":"YhDM","../geom/MultiLineString.js":"fbCo","../geom/MultiPoint.js":"dNu5","../geom/MultiPolygon.js":"ouhF","../geom/Point.js":"gLcY","./Pointer.js":"dnA2","../geom/Polygon.js":"Nwwk","../layer/Vector.js":"dflx","../source/Vector.js":"ZS12","../functions.js":"RgA2","../events/condition.js":"YcID","../extent.js":"QDir","../style/Style.js":"he4w","../proj.js":"Diht","../geom/SimpleGeometry.js":"pnrv","../coordinate.js":"nGsj"}],"o7b8":[function(require,module,exports) {
443"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.ExtentEvent=void 0;var e=x(require("../events/Event.js")),t=x(require("../Feature.js")),n=x(require("../MapBrowserEventType.js")),r=x(require("../geom/Point.js")),o=x(require("./Pointer.js")),i=x(require("../layer/Vector.js")),a=x(require("../source/Vector.js")),u=require("../events/condition.js"),l=require("../extent.js"),s=require("../coordinate.js"),p=require("../style/Style.js"),c=require("../geom/Polygon.js"),d=require("../proj.js");function x(e){return e&&e.__esModule?e:{default:e}}var h=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),f={EXTENTCHANGED:"extentchanged"},_=exports.ExtentEvent=function(e){function t(t){var n=e.call(this,f.EXTENTCHANGED)||this;return n.extent=t,n}return h(t,e),t}(e.default),v=function(e){function o(t){var n=this,r=t||{};return(n=e.call(this,r)||this).on,n.once,n.un,n.condition_=r.condition?r.condition:u.always,n.extent_=null,n.pointerHandler_=null,n.pixelTolerance_=void 0!==r.pixelTolerance?r.pixelTolerance:10,n.snappedToVertex_=!1,n.extentFeature_=null,n.vertexFeature_=null,t||(t={}),n.extentOverlay_=new i.default({source:new a.default({useSpatialIndex:!1,wrapX:!!t.wrapX}),style:t.boxStyle?t.boxStyle:y(),updateWhileAnimating:!0,updateWhileInteracting:!0}),n.vertexOverlay_=new i.default({source:new a.default({useSpatialIndex:!1,wrapX:!!t.wrapX}),style:t.pointerStyle?t.pointerStyle:E(),updateWhileAnimating:!0,updateWhileInteracting:!0}),t.extent&&n.setExtent(t.extent),n}return h(o,e),o.prototype.snapToVertex_=function(e,t){var n=t.getCoordinateFromPixelInternal(e),r=this.getExtentInternal();if(r){var o=m(r);o.sort(function(e,t){return(0,s.squaredDistanceToSegment)(n,e)-(0,s.squaredDistanceToSegment)(n,t)});
443var i=o[0],a=(0,s.closestOnSegment)(n,i),u=t.getPixelFromCoordinateInternal(a);if((0,s.distance)(e,u)<=this.pixelTolerance_){var l=t.getPixelFromCoordinateInternal(i[0]),p=t.getPixelFromCoordinateInternal(i[1]),c=(0,s.squaredDistance)(u,l),d=(0,s.squaredDistance)(u,p),x=Math.sqrt(Math.min(c,d));return this.snappedToVertex_=x<=this.pixelTolerance_,this.snappedToVertex_&&(a=c>d?i[1]:i[0]),a}}return null},o.prototype.handlePointerMove_=function(e){var t=e.pixel,n=e.map,r=this.snapToVertex_(t,n);r||(r=n.getCoordinateFromPixelInternal(t)),this.createOrUpdatePointerFeature_(r)},o.prototype.createOrUpdateExtentFeature_=function(e){var n=this.extentFeature_;return n?e?n.setGeometry((0,c.fromExtent)(e)):n.setGeometry(void 0):(n=e?new t.default((0,c.fromExtent)(e)):new t.default({}),this.extentFeature_=n,this.extentOverlay_.getSource().addFeature(n)),n},o.prototype.createOrUpdatePointerFeature_=function(e){var n=this.vertexFeature_;n?n.getGeometry().setCoordinates(e):(n=new t.default(new r.default(e)),this.vertexFeature_=n,this.vertexOverlay_.getSource().addFeature(n));return n},o.prototype.handleEvent=function(t){return!t.originalEvent||!this.condition_(t)||(t.type!=n.default.POINTERMOVE||this.handlingDownUpSequence||this.handlePointerMove_(t),e.prototype.handleEvent.call(this,t),!1)},o.prototype.handleDownEvent=function(e){var t=e.pixel,n=e.map,r=this.getExtentInternal(),o=this.snapToVertex_(t,n),i=function(e){var t=null,n=null;
443return e[0]==r[0]?t=r[2]:e[0]==r[2]&&(t=r[0]),e[1]==r[1]?n=r[3]:e[1]==r[3]&&(n=r[1]),null!==t&&null!==n?[t,n]:null};if(o&&r){var a=o[0]==r[0]||o[0]==r[2]?o[0]:null,u=o[1]==r[1]||o[1]==r[3]?o[1]:null;null!==a&&null!==u?this.pointerHandler_=g(i(o)):null!==a?this.pointerHandler_=w(i([a,r[1]]),i([a,r[3]])):null!==u&&(this.pointerHandler_=w(i([r[0],u]),i([r[2],u])))}else o=n.getCoordinateFromPixelInternal(t),this.setExtent([o[0],o[1],o[0],o[1]]),this.pointerHandler_=g(o);return!0},o.prototype.handleDragEvent=function(e){if(this.pointerHandler_){var t=e.coordinate;this.setExtent(this.pointerHandler_(t)),this.createOrUpdatePointerFeature_(t)}},o.prototype.handleUpEvent=function(e){this.pointerHandler_=null;var t=this.getExtentInternal();return t&&0!==(0,l.getArea)(t)||this.setExtent(null),!1},o.prototype.setMap=function(t){this.extentOverlay_.setMap(t),this.vertexOverlay_.setMap(t),e.prototype.setMap.call(this,t)},o.prototype.getExtent=function(){return(0,d.toUserExtent)(this.getExtentInternal(),this.getMap().getView().getProjection())},o.prototype.getExtentInternal=function(){return this.extent_},o.prototype.setExtent=function(e){this.extent_=e||null,this.createOrUpdateExtentFeature_(e),this.dispatchEvent(new _(this.extent_))},o}(o.default);function y(){var e=(0,p.createEditingStyle)();return function(t,n){return e.Polygon}}function E(){var e=(0,p.createEditingStyle)();return function(t,n){return e.Point}}function g(e){return function(t){return(0,l.boundingExtent)([e,t])}}function w(e,t){return e[0]==t[0]?function(n){return(0,l.boundingExtent)([e,[n[0],t[1]]])}:e[1]==t[1]?function(n){return(0,l.boundingExtent)([e,[t[0],n[1]]])}:null}function m(e){return[[[e[0],e[1]],[e[0],e[3]]],[[e[0],e[3]],[e[2],e[3]]],[[e[2],e[3]],[e[2],e[1]]],[[e[2],e[1]],[e[0],e[1]]]]}var P=exports.default=v;
444},{"../events/Event.js":"fKNg","../Feature.js":"mYW9","../MapBrowserEventType.js":"YhDM","../geom/Point.js":"gLcY","./Pointer.js":"dnA2","../layer/Vector.js":"dflx","../source/Vector.js":"ZS12","../events/condition.js":"YcID","../extent.js":"QDir","../coordinate.js":"nGsj","../style/Style.js":"he4w","../geom/Polygon.js":"Nwwk","../proj.js":"Diht"}],"qrxo":[function(require,module,exports) {
445"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.ModifyEvent=void 0;var e=x(require("../Collection.js")),t=x(require("../CollectionEventType.js")),r=x(require("../events/Event.js")),i=x(require("../events/EventType.js")),n=x(require("../Feature.js")),o=x(require("../MapBrowserEventType.js")),s=x(require("../geom/Point.js")),a=x(require("./Pointer.js")),u=x(require("../structs/RBush.js")),d=x(require("../source/VectorEventType.js")),g=x(require("../layer/Vector.js")),l=x(require("../source/Vector.js")),h=require("../events/condition.js"),f=require("../extent.js"),c=require("../coordinate.js"),_=require("../style/Style.js"),p=require("../array.js"),v=require("../geom/Polygon.js"),m=require("../proj.js"),y=require("../util.js");function x(e){return e&&e.__esModule?e:{default:e}}var C=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),E=0,S=1,F=[0,0,0,0],P=[],M={MODIFYSTART:"modifystart",MODIFYEND:"modifyend"},w=exports.ModifyEvent=function(e){function t(t,r,i){var n=e.call(this,t)||this;return n.features=r,n.mapBrowserEvent=i,n}return C(t,e),t}(r.default),T=function(r){function a(i){var n,o=r.call(this,i)||this;if(o.on,o.once,o.un,o.boundHandleFeatureChange_=o.handleFeatureChange_.bind(o),o.condition_=i.condition?i.condition:h.primaryAction,o.defaultDeleteCondition_=function(e){return(0,h.altKeyOnly)(e)&&(0,h.singleClick)(e)},o.deleteCondition_=i.deleteCondition?i.deleteCondition:o.defaultDeleteCondition_,o.insertVertexCondition_=i.insertVertexCondition?i.insertVertexCondition:h.always,o.vertexFeature_=null,o.vertexSegments_=null,o.lastPixel_=[0,0],o.ignoreNextSingleClick_=!1,o.featuresBeingModified_=null,o.rBush_=new u.default,o.pixelTolerance_=void 0!==i.pixelTolerance?i.pixelTolerance:10,o.snappedToVertex_=!1,o.changingFeature_=!1,o.dragSegments_=[],o.overlay_=new g.default({source:new l.default({useSpatialIndex:!1,wrapX:!!i.wrapX}),style:i.style?i.style:G(),updateWhileAnimating:!0,updateWhileInteracting:!0}),o.SEGMENT_WRITERS_={Point:o.writePointGeometry_.bind(o),LineString:o.writeLineStringGeometry_.bind(o),LinearRing:o.writeLineStringGeometry_.bind(o),Polygon:o.writePolygonGeometry_.bind(o),MultiPoint:o.writeMultiPointGeometry_.bind(o),MultiLineString:o.writeMultiLineStringGeometry_.bind(o),MultiPolygon:o.writeMultiPolygonGeometry_.bind(o),Circle:o.writeCircleGeometry_.bind(o),GeometryCollection:o.writeGeometryCollectionGeometry_.bind(o)},o.source_=null,o.hitDetection_=null,i.features?n=i.features:i.source&&(o.source_=i.source,n=new e.default(o.source_.getFeatures()),o.source_.addEventListener(d.default.ADDFEATURE,o.handleSourceAdd_.bind(o)),o.source_.addEventListener(d.default.REMOVE
445FEATURE,o.handleSourceRemove_.bind(o))),!n)throw new Error("The modify interaction requires features, a source or a layer");return i.hitDetection&&(o.hitDetection_=i.hitDetection),o.features_=n,o.features_.forEach(o.addFeature_.bind(o)),o.features_.addEventListener(t.default.ADD,o.handleFeatureAdd_.bind(o)),o.features_.addEventListener(t.default.REMOVE,o.handleFeatureRemove_.bind(o)),o.lastPointerEvent_=null,o.delta_=[0,0],o.snapToPointer_=void 0===i.snapToPointer?!o.hitDetection_:i.snapToPointer,o}return C(a,r),a.prototype.addFeature_=function(e){var t=e.getGeometry();if(t){var r=this.SEGMENT_WRITERS_[t.getType()];r&&r(e,t)}var n=this.getMap();n&&n.isRendered()&&this.getActive()&&this.handlePointerAtPixel_(this.lastPixel_,n),e.addEventListener(i.default.CHANGE,this.boundHandleFeatureChange_)},a.prototype.willModifyFeatures_=function(t,r){if(!this.featuresBeingModified_){this.featuresBeingModified_=new e.default;for(var i=this.featuresBeingModified_.getArray(),n=0,o=r.length;n<o;++n)for(var s=r[n],a=0,u=s.length;a<u;++a){var d=s[a].feature;d&&-1===i.indexOf(d)&&this.featuresBeingModified_.push(d)}0===this.featuresBeingModified_.getLength()?this.featuresBeingModified_=null:this.dispatchEvent(new w(M.MODIFYSTART,this.featuresBeingModified_,t))}},a.prototype.removeFeature_=function(e){this.removeFeatureSegmentData_(e),this.vertexFeature_&&0===this.features_.getLength()&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),e.removeEventListener(i.default.CHANGE,this.boundHandleFeatureChange_)},a.prototype.removeFeatureSegmentData_=function(e){var t=this.rBush_,r=[];t.forEach(function(t){e===t.feature&&r.push(t)});for(var i=r.length-1;i>=0;--i){for(var n=r[i],o=this.dragSegments_.length-1;o>=0;--o)this.dragSegments_[o][0]===n&&this.dragSegments_.splice(o,1);t.remove(n)}},a.prototype.setActive=function(e){this.vertexFeature_&&!e&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),r.prototype.setActive.call(this,e)},a.prototype.setMap=function(e){this.overlay_.setMap(e),r.prototype.setMap.call(this,e)},a.prototype.getOverlay=function(){return this.overlay_},a.prototype.handleSourceAdd_=function(e){e.feature&&this.features_.push(e.feature)},a.prototype.handleSourceRemove_=function(e){e.feature&&this.features_.remove(e.feature)},a.prototype.handleFeatureAdd_=function(e){this.addFeature_(e.element)},a.prototype.handleFeatureChange_=function(e){if(!this.changingFeature_){var t=e.target;this.removeFeature_(t),this.addFeature_(t)}},a.prototype.handleFeatureRemove_=function(e){var t=e.element;this.removeFeature_(t)},a.prototype.writePointGeometry_=function(e,t){var r=t.getCoordinates(),i={feature:e,geometry:t,segment:[r,r]};this.rBush_.insert(t.getExtent(),i)},a.prototype.writeMultiPointGeometry_=function(e,t){for(var r=t.getCoordinates(),i=0,n=r.length;i<n;++i){var o=r[i],s={feature:e,geometry:t,depth:[i],index:i,segment:[o,o]};this.rBush_.insert(t.getExtent(),s)}},a.prototype.writeLineStringGeometry_=function(e,t){for(var r=t.getCoordinates(),i=0,n=r.length-1;i<n;++i){var o=r.slice(i,i+2),s={feature:e,geometry:t,index:i,segment:o};this.rBush_.insert((0,f.boundingExtent)(o),s)}},a.prototype.writeMultiLineStringGeometry_=function(e,t){for(var r=t.getCoordinates(),i=0,n=r.length;i<n;++i)for(var o=r[i],s=0,a=o.length-1;s<a;++s){var u=o.slice(s,s+2),d={feature:e,geometry:t,depth:[i],index:s,segment:u};this.rBush_.insert((0,f.boundingExtent)(u),d)}},a.prototype.writePolygonGeometry_=function(e,t){for(var r=t.getCoordinates(),i=0,n=r.length;i<n;++i)for(var o=r[i],s=0,a=o.length-1;s<a;++s){var u=o.slice(s,s+2),d={feature:e,geometry:t,depth:[i],index:s,segment:u};this.rBush_.insert((0,f.boundingExtent)(u),d)}},a.prototype.writeMultiPolygonGeometry_=function(e,t){for(var r=t.getCoordinates(),i=0,n=r.length;i<n;++i)for(var o=r[i],s=0,a=o.length;s<a;++s)for(var u=o[s],d=0,g=u.length-1;d<g;++d){var l=u.slice(d,d+2),h={feature:e,geometry:t,depth:[s,i],index:d,segment:l};this.rBush_.insert((0,f.boundingExtent)(l),h)}},a.prototype.writeCircleGeometry_=function(e,t){var r=t.getCenter(),i={feature:e,geometry:t,index:E,segment:[r,r]},n={feature:e,geometry:t,index:S,segment:[r,r]},o=[i,n];i.featureSegments=o,n.featureSegments=o,this.rBush_.insert((0,f.createOrUpdateFromCoordinate)(r),i);var s=t,a=(0,m.getUserProjection)();if(a&&this.getMap()){var u=this.getMap().getView().getProjection();s=s.clone().transform(a,u),s=(0,v.fromCircle)(s).transform(u,a)}this.rBush_.insert(s.getExtent(),n)},a.prototype.writeGeometryCollectionGeometry_=function(e,t){for(var r=t.getGeometriesArray(),i=0;i<r.length;++i){var n=r[i];(0,this.SEGMENT_WRITERS_[n.getType()])(e,n)}},a.prototype.createOrUpdateVertexFeature_=function(e,t,r){var i=this.vertexFeature_;i?i.getGeometry().setCoordinates(e):(i=new n.default(new s.default(e)),this.vertexFeature_=i,this.overlay_.getSource().addFeature(i));return i.set("features",t),i.set("geometries",r),i},a.prototype.handleEvent=function(e){return!e.originalEvent||(this.lastPointerEvent_=e,e.map.getView().getInteracting()||e.type!=o.default.POINTERMOVE||this.handlingDownUpSequence||this.handlePointerMove_(e),this.vertexFeature_&&this.deleteCondition_(e)&&(t=!(e.type!=o.default.SINGLECLICK||!this.ignoreNextSingleClick_)||this.removePoint()),e.type==o.default.SINGLECLICK&&(this.ignoreNextSingleClick_=!1),r.prototype.handleEvent.call(this,e)&&!t);var t},a.prototype.handleDragEvent=function(e){this.ignoreNextSingleClick_=!1,this.willModifyFeatures_(e,this.dragSegments_);for(var t=[e.coordinate[0]+this.delta_[0],e.coordinate[1]+this.delta_[1]],r=[],i=[],n=0,o=this.dragSegments_.length;n<o;++n){var s=this.dragSegments_[n],a=s[0],u=a.feature;-1===r.indexOf(u)&&r.push(u);var d=a.geometry;-1===i.indexOf(d)&&i.push(d);for(var g=a.depth,l=void 0,h=a.segment,f=s[1];t.length<d.getStride();)t.push(h[f][t.length]);switch(d.getType()){case"Point":l=t,h[0]=t,h[1]=t;break;case"MultiPoint":(l=d.getCoordinates())[a.index]=t,h[0]=t,h[1]=t;break;case"LineString":(l=d.getCoordinates())[a.index+f]=t,h[f]=t;break;case"MultiLineString":case"Polygon":(l=d.getCoordinates())[g[0]][a.index+f]=t,h[f]=t;break;case"MultiPolygon":(l=d.getCoordinates())[g[1]][g[0]][a.index+f]=t,h[f]=t;break;case"Circle":if(h[0]=t,h[1]=t,a.index===E)this.changingFeature_=!0,d.setCenter(t),this.changingFeature_=!1;else{this.changingFeature_=!0;var _=e.map.getView().getProjection(),p=(0,c.distance)((0,m.fromUserCoordinate)(d.getCenter(),_),(0,m.fromUserCoordinate)(t,_)),v=(0,m.getUserProjection)();if(v){var y=d.clone().transform(v,_);y.setRadius(p),p=y.transform(_,v).getRadius()}d.setRadius(p),this.changingFeature_=!1}}l&&this.setGeometryCoordinates_(d,l)}this.createOrUpdateVertexFeature_(t,r,i)},a.prototype.handleDownEvent=function(e){if(!this.condition_(e))return!1;var t=e.coordinate;this.handlePointerAtPixel_(e.pixel,e.map,t),this.dragSegments_.length=0,this.featuresBeingModified_=null;var r=this.vertexFeature_;if(r){var i=e.map.getView().getProjection(),n=[],o=r.getGeometry().getCoordinates(),s=(0,f.boundingExtent)([o]),a=this.rBush_.getInExtent(s),u={};a.sort(b);for(var d=0,g=a.length;d<g;++d){var l=a[d],h=l.segment,_=(0,y.getUid)(l.geometry),p=l.depth;if(p&&(_+="-"+p.join("-")),u[_]||(u[_]=new Array(2)),"Circle"!==l.geometry.getType()||l.index!==S)if(!(0,c.equals)(h[0],o)||u[_][0])if(!(0,c.equals)(h[1],o)||u[_][1])(0,y.getUid)(h)in this.vertexSegments_&&!u[_][0]&&!u[_][1]&&this.insertVertexCondition_(e)&&n.push(l);else{if(u[_][0]&&0===u[_][0].index){var v=l.geometry.getCoordinates();switch(l.geometry.getType()){case"LineString":case"MultiLineString":continue;case"MultiPolygon":v=v[p[1]];case"Polygon":if(l.index!==v[p[0]].length-2)continue}}
445this.dragSegments_.push([l,1]),u[_][1]=l}else this.dragSegments_.push([l,0]),u[_][0]=l;else{var m=B(t,l,i);(0,c.equals)(m,o)&&!u[_][0]&&(this.dragSegments_.push([l,0]),u[_][0]=l)}}n.length&&this.willModifyFeatures_(e,[n]);for(var x=n.length-1;x>=0;--x)this.insertVertex_(n[x],o)}return!!this.vertexFeature_},a.prototype.handleUpEvent=function(e){for(var t=this.dragSegments_.length-1;t>=0;--t){var r=this.dragSegments_[t][0],i=r.geometry;if("Circle"===i.getType()){var n=i.getCenter(),o=r.featureSegments[0],s=r.featureSegments[1];o.segment[0]=n,o.segment[1]=n,s.segment[0]=n,s.segment[1]=n,this.rBush_.update((0,f.createOrUpdateFromCoordinate)(n),o);var a=i,u=(0,m.getUserProjection)();if(u){var d=e.map.getView().getProjection();a=a.clone().transform(u,d),a=(0,v.fromCircle)(a).transform(d,u)}this.rBush_.update(a.getExtent(),s)}else this.rBush_.update((0,f.boundingExtent)(r.segment),r)}return this.featuresBeingModified_&&(this.dispatchEvent(new w(M.MODIFYEND,this.featuresBeingModified_,e)),this.featuresBeingModified_=null),!1},a.prototype.handlePointerMove_=function(e){this.lastPixel_=e.pixel,this.handlePointerAtPixel_(e.pixel,e.map,e.coordinate)},a.prototype.handlePointerAtPixel_=function(e,t,r){var i,n,o=this,s=r||t.getCoordinateFromPixel(e),a=t.getView().getProjection();if(this.hitDetection_){var u="object"==typeof this.hitDetection_?function(e){return e===o.hitDetection_}:void 0;t.forEachFeatureAtPixel(e,function(e,t,r){if("Point"===(r=r||e.getGeometry()).getType()&&(0,p.includes)(o.features_.getArray(),e)){n=r;var s=r.getFlatCoordinates().slice(0,2);i=[{feature:e,geometry:r,segment:[s,s]}]}return!0},{layerFilter:u})}if(!i){var d=(0,m.fromUserExtent)((0,f.createOrUpdateFromCoordinate)(s,F),a),g=t.getView().getResolution()*this.pixelTolerance_,l=(0,m.toUserExtent)((0,f.buffer)(d,g,F),a);i=this.rBush_.getInExtent(l)}if(i&&i.length>0){var h=i.sort(function(e,t){return j(s,e,a)-j(s,t,a)})[0],_=h.segment,v=B(s,h,a),x=t.getPixelFromCoordinate(v),C=(0,c.distance)(e,x);if(n||C<=this.pixelTolerance_){var E={};if(E[(0,y.getUid)(_)]=!0,this.snapToPointer_||(this.delta_[0]=v[0]-s[0],this.delta_[1]=v[1]-s[1]),"Circle"===h.geometry.getType()&&h.index===S)this.snappedToVertex_=!0,this.createOrUpdateVertexFeature_(v,[h.feature],[h.geometry]);else{var P=t.getPixelFromCoordinate(_[0]),M=t.getPixelFromCoordinate(_[1]),w=(0,c.squaredDistance)(x,P),T=(0,c.squaredDistance)(x,M);C=Math.sqrt(Math.min(w,T)),this.snappedToVertex_=C<=this.pixelTolerance_,this.snappedToVertex_&&(v=w>T?_[1]:_[0]),this.createOrUpdateVertexFeature_(v,[h.feature],[h.geometry]);var b={};b[(0,y.getUid)(h.geometry)]=!0;for(var G=1,U=i.length;G<U;++G){var q=i[G].segment;if(!((0,c.equals)(_[0],q[0])&&(0,c.equals)(_[1],q[1])||(0,c.equals)(_[0],q[1])&&(0,c.equals)(_[1],q[0])))break;var D=(0,y.getUid)(i[G].geometry);D in b||(b[D]=!0,E[(0,y.getUid)(q)]=!0)}}return void(this.vertexSegments_=E)}}this.vertexFeature_&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null)},a.prototype.insertVertex_=function(e,t){for(var r,i=e.segment,n=e.feature,o=e.geometry,s=e.depth,a=e.index;t.length<o.getStride();)t.push(0);switch(o.getType()){case"MultiLineString":case"Polygon":(r=o.getCoordinates())[s[0]].splice(a+1,0,t);break;case"MultiPolygon":(r=o.getCoordinates())[s[1]][s[0]].splice(a+1,0,t);break;case"LineString":(r=o.getCoordinates()).splice(a+1,0,t);break;default:return}this.setGeometryCoordinates_(o,r);var u=this.rBush_;u.remove(e),this.updateSegmentIndices_(o,a,s,1);var d={segment:[i[0],t],feature:n,geometry:o,depth:s,index:a};u.insert((0,f.boundingExtent)(d.segment),d),this.dragSegments_.push([d,1]);var g={segment:[t,i[1]],feature:n,geometry:o,depth:s,index:a+1};u.insert((0,f.boundingExtent)(g.segment),g),this.dragSegments_.push([g,0]),this.ignoreNextSingleClick_=!0},a.prototype.removePoint=function(){if(this.lastPointerEvent_&&this.lastPointerEvent_.type!=o.default.POINTERDRAG){var e=this.lastPointerEvent_;this.willModifyFeatures_(e,this.dragSegments_);var t=this.removeVertex_();return this.featuresBeingModified_&&this.dispatchEvent(new w(M.MODIFYEND,this.featuresBeingModified_,e)),this.featuresBeingModified_=null,t}return!1},a.prototype.removeVertex_=function(){var e,t,r,i,n,o,s,a,u,d,g,l=this.dragSegments_,h={},c=!1;for(n=l.length-1;n>=0;--n)d=(r=l[n])[0],g=(0,y.getUid)(d.feature),d.depth&&(g+="-"+d.depth.join("-")),g in h||(h[g]={}),0===r[1]?(h[g].right=d,h[g].index=d.index):1==r[1]&&(h[g].left=d,h[g].index=d.index+1);for(g in h){switch(u=h[g].right,s=h[g].left,(a=(o=h[g].index)-1)<0&&(a=0),e=t=(i=(d=void 0!==s?s:u).geometry).getCoordinates(),c=!1,i.getType()){case"MultiLineString":t[d.depth[0]].length>2&&(t[d.depth[0]].splice(o,1),c=!0);break;case"LineString":t.length>2&&(t.splice(o,1),c=!0);break;case"MultiPolygon":e=e[d.depth[1]];case"Polygon":(e=e[d.depth[0]]).length>4&&(o==e.length-1&&(o=0),e.splice(o,1),c=!0,0===o&&(e.pop(),e.push(e[0]),a=e.length-1))}if(c){this.setGeometryCoordinates_(i,t);var _=[];
445if(void 0!==s&&(this.rBush_.remove(s),_.push(s.segment[0])),void 0!==u&&(this.rBush_.remove(u),_.push(u.segment[1])),void 0!==s&&void 0!==u){var p={depth:d.depth,feature:d.feature,geometry:d.geometry,index:a,segment:_};this.rBush_.insert((0,f.boundingExtent)(p.segment),p)}this.updateSegmentIndices_(i,o,d.depth,-1),this.vertexFeature_&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),l.length=0}}return c},a.prototype.setGeometryCoordinates_=function(e,t){this.changingFeature_=!0,e.setCoordinates(t),this.changingFeature_=!1},a.prototype.updateSegmentIndices_=function(e,t,r,i){this.rBush_.forEachInExtent(e.getExtent(),function(n){n.geometry===e&&(void 0===r||void 0===n.depth||(0,p.equals)(n.depth,r))&&n.index>t&&(n.index+=i)})},a}(a.default);function b(e,t){return e.index-t.index}function j(e,t,r){var i=t.geometry;if("Circle"===i.getType()){var n=i;if(t.index===S){var o=(0,m.getUserProjection)();o&&(n=n.clone().transform(o,r));var s=(0,c.squaredDistance)(n.getCenter(),(0,m.fromUserCoordinate)(e,r)),a=Math.sqrt(s)-n.getRadius();return a*a}}var u=(0,m.fromUserCoordinate)(e,r);return P[0]=(0,m.fromUserCoordinate)(t.segment[0],r),P[1]=(0,m.fromUserCoordinate)(t.segment[1],r),(0,c.squaredDistanceToSegment)(u,P)}function B(e,t,r){var i=t.geometry;if("Circle"===i.getType()&&t.index===S){var n=i,o=(0,m.getUserProjection)();return o&&(n=n.clone().transform(o,r)),(0,m.toUserCoordinate)(n.getClosestPoint((0,m.fromUserCoordinate)(e,r)),r)}var s=(0,m.fromUserCoordinate)(e,r);return P[0]=(0,m.fromUserCoordinate)(t.segment[0],r),P[1]=(0,m.fromUserCoordinate)(t.segment[1],r),(0,m.toUserCoordinate)((0,c.closestOnSegment)(s,P),r)}function G(){var e=(0,_.createEditingStyle)();return function(t,r){return e.Point}}var U=exports.default=T;
446},{"../Collection.js":"FnDa","../CollectionEventType.js":"BTrx","../events/Event.js":"fKNg","../events/EventType.js":"C8cu","../Feature.js":"mYW9","../MapBrowserEventType.js":"YhDM","../geom/Point.js":"gLcY","./Pointer.js":"dnA2","../structs/RBush.js":"MiUH","../source/VectorEventType.js":"s8Fc","../layer/Vector.js":"dflx","../source/Vector.js":"ZS12","../events/condition.js":"YcID","../extent.js":"QDir","../coordinate.js":"nGsj","../style/Style.js":"he4w","../array.js":"luEr","../geom/Polygon.js":"Nwwk","../proj.js":"Diht","../util.js":"KniQ"}],"SMGe":[function(require,module,exports) {
447"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.SelectEvent=void 0;var e=d(require("../Collection.js")),t=d(require("../CollectionEventType.js")),r=d(require("../events/Event.js")),i=d(require("./Interaction.js")),n=d(require("../layer/Vector.js")),o=require("../functions.js"),s=require("../obj.js"),a=require("../style/Style.js"),u=require("../array.js"),l=require("../util.js"),c=require("../events/condition.js");function d(e){return e&&e.__esModule?e:{default:e}}var f=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),y={SELECT:"select"},h=exports.SelectEvent=function(e){function t(t,r,i,n){var o=e.call(this,t)||this;return o.selected=r,o.deselected=i,o.mapBrowserEvent=n,o}return f(t,e),t}(r.default),_={},p=function(r){function i(t){var i=r.call(this)||this;i.on,i.once,i.un;var n,s=t||{};if(i.boundAddFeature_=i.addFeature_.bind(i),i.boundRemoveFeature_=i.removeFeature_.bind(i),i.condition_=s.condition?s.condition:c.singleClick,i.addCondition_=s.addCondition?s.addCondition:c.never,i.removeCondition_=s.removeCondition?s.removeCondition:c.never,i.toggleCondition_=s.toggleCondition?s.toggleCondition:c.shiftKeyOnly,i.multi_=!!s.multi&&s.multi,i.filter_=s.filter?s.filter:o.TRUE,i.hitTolerance_=s.hitTolerance?s.hitTolerance:0,i.style_=void 0!==s.style?s.style:v(),i.features_=s.features||new e.default,s.layers)if("function"==typeof s.layers)n=s.layers;else{var a=s.layers;n=function(e){return(0,u.includes)(a,e)}}else n=o.TRUE;return i.layerFilter_=n,i.featureLayerAssociation_={},i}return f(i,r),i.prototype.addFeatureLayerAssociation_=function(e,t){this.featureLayerAssociation_[(0,l.getUid)(e)]=t},i.prototype.getFeatures=function(){return this.features_},i.prototype.getHitTolerance=function(){return this.hitTolerance_},i.prototype.getLayer=function(e){return this.featureLayerAssociation_[(0,l.getUid)(e)]},i.prototype.setHitTolerance=function(e){this.hitTolerance_=e},i.prototype.setMap=function(e){this.getMap()&&this.style_&&this.features_.forEach(this.restorePreviousStyle_.bind(this)),r.prototype.setMap.call(this,e),e?(this.features_.addEventListener(t.default.ADD,this.boundAddFeature_),this.features_.addEventListener(t.default.REMOVE,this.boundRemoveFeature_),this.style_&&this.features_.forEach(this.applySelectedStyle_.bind(this))):(this.features_.removeEventListener(t.default.ADD,this.boundAddFeature_),this.features_.removeEventListener(t.default.REMOVE,this.boundRemoveFeature_))},i.prototype.addFeature_=function(e){var t=e.element;if(this.style_&&this.applySelectedStyle_(t),!this.getLayer(t)){var r=this.getMap().getAllLayers().find(function(e){if(e instanceof n.default&&e.getSource()&&e.getSource().hasFeature(t))return e});r&&this.addFeatureLayerAssociation_(t,r)}},i.prototype.removeFeature_=function(e){var t=e.element;this.style_&&this.restorePreviousStyle_(t)},i.prototype.getStyle=function(){return this.style_},i.prototype.applySelectedStyle_=function(e){var t=(0,l.getUid)(e);t in _||(_[t]=e.getStyle()),e.setStyle(this.style_)},i.prototype.restorePreviousStyle_=function(e){for(var t=this.getMap().getInteractions().getArray(),r=t.length-1;r>=0;--r){var n=t[r];
447if(n!==this&&n instanceof i&&n.getStyle()&&-1!==n.getFeatures().getArray().lastIndexOf(e))return void e.setStyle(n.getStyle())}var o=(0,l.getUid)(e);e.setStyle(_[o]),delete _[o]},i.prototype.removeFeatureLayerAssociation_=function(e){delete this.featureLayerAssociation_[(0,l.getUid)(e)]},i.prototype.handleEvent=function(e){if(!this.condition_(e))return!0;var t=this.addCondition_(e),r=this.removeCondition_(e),i=this.toggleCondition_(e),n=!t&&!r&&!i,o=e.map,a=this.getFeatures(),l=[],c=[];if(n){(0,s.clear)(this.featureLayerAssociation_),o.forEachFeatureAtPixel(e.pixel,function(e,t){if(this.filter_(e,t))return this.addFeatureLayerAssociation_(e,t),c.push(e),!this.multi_}.bind(this),{layerFilter:this.layerFilter_,hitTolerance:this.hitTolerance_});for(var d=a.getLength()-1;d>=0;--d){var f=a.item(d),_=c.indexOf(f);_>-1?c.splice(_,1):(a.remove(f),l.push(f))}0!==c.length&&a.extend(c)}else{o.forEachFeatureAtPixel(e.pixel,function(e,n){if(this.filter_(e,n))return!t&&!i||(0,u.includes)(a.getArray(),e)?(r||i)&&(0,u.includes)(a.getArray(),e)&&(l.push(e),this.removeFeatureLayerAssociation_(e)):(this.addFeatureLayerAssociation_(e,n),c.push(e)),!this.multi_}.bind(this),{layerFilter:this.layerFilter_,hitTolerance:this.hitTolerance_});for(var p=l.length-1;p>=0;--p)a.remove(l[p]);a.extend(c)}return(c.length>0||l.length>0)&&this.dispatchEvent(new h(y.SELECT,c,l,e)),!0},i}(i.default);function v(){var e=(0,a.createEditingStyle)();return(0,u.extend)(e.Polygon,e.LineString),(0,u.extend)(e.GeometryCollection,e.LineString),function(t){return t.getGeometry()?e[t.getGeometry().getType()]:null}}var g=exports.default=p;
448},{"../Collection.js":"FnDa","../CollectionEventType.js":"BTrx","../events/Event.js":"fKNg","./Interaction.js":"jB2p","../layer/Vector.js":"dflx","../functions.js":"RgA2","../obj.js":"mH6q","../style/Style.js":"he4w","../array.js":"luEr","../util.js":"KniQ","../events/condition.js":"YcID"}],"NnGW":[function(require,module,exports) {
449"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=p(require("../CollectionEventType.js")),t=p(require("../events/EventType.js")),r=p(require("./Pointer.js")),n=p(require("../structs/RBush.js")),o=p(require("../source/VectorEventType.js")),i=require("../functions.js"),s=require("../extent.js"),a=require("../coordinate.js"),u=require("../geom/Polygon.js"),l=require("../proj.js"),h=require("../util.js"),f=require("../obj.js"),c=require("../events.js");function p(e){return e&&e.__esModule?e:{default:e}}var d=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();function g(e){return e.feature?e.feature:e.element?e.element:void 0}var _=[],y=function(r){function p(e){var t=this,o=e||{},s=o;return s.handleDownEvent||(s.handleDownEvent=i.TRUE),s.stopDown||(s.stopDown=i.FALSE),(t=r.call(this,s)||this).source_=o.source?o.source:null,t.vertex_=void 0===o.vertex||o.vertex,t.edge_=void 0===o.edge||o.edge,t.features_=o.features?o.features:null,t.featuresListenerKeys_=[],t.featureChangeListenerKeys_={},t.indexedFeaturesExtents_={},t.pendingFeatures_={},t.pixelTolerance_=void 0!==o.pixelTolerance?o.pixelTolerance:10,t.rBush_=new n.default,t.GEOMETRY_SEGMENTERS_={Point:t.segmentPointGeometry_.bind(t),LineString:t.segmentLineStringGeometry_.bind(t),LinearRing:t.segmentLineStringGeometry_.bind(t),Polygon:t.segmentPolygonGeometry_.bind(t),MultiPoint:t.segmentMultiPointGeometry_.bind(t),MultiLineString:t.segmentMultiLineStringGeometry_.bind(t),MultiPolygon:t.segmentMultiPolygonGeometry_.bind(t),GeometryCollection:t.segmentGeometryCollectionGeometry_.bind(t),Circle:t.segmentCircleGeometry_.bind(t)},t}return d(p,r),p.prototype.addFeature=function(e,r){var n=void 0===r||r,o=(0,h.getUid)(e),i=e.getGeometry();if(i){var a=this.GEOMETRY_SEGMENTERS_[i.getType()];if(a){this.indexedFeaturesExtents_[o]=i.getExtent((0,s.createEmpty)());var u=[];
449if(a(u,i),1===u.length)this.rBush_.insert((0,s.boundingExtent)(u[0]),{feature:e,segment:u[0]});else if(u.length>1){var l=u.map(function(e){return(0,s.boundingExtent)(e)}),f=u.map(function(t){return{feature:e,segment:t}});this.rBush_.load(l,f)}}}n&&(this.featureChangeListenerKeys_[o]=(0,c.listen)(e,t.default.CHANGE,this.handleFeatureChange_,this))},p.prototype.forEachFeatureAdd_=function(e){this.addFeature(e)},p.prototype.forEachFeatureRemove_=function(e){this.removeFeature(e)},p.prototype.getFeatures_=function(){var e;return this.features_?e=this.features_:this.source_&&(e=this.source_.getFeatures()),e},p.prototype.handleEvent=function(e){var t=this.snapTo(e.pixel,e.coordinate,e.map);return t&&(e.coordinate=t.vertex.slice(0,2),e.pixel=t.vertexPixel),r.prototype.handleEvent.call(this,e)},p.prototype.handleFeatureAdd_=function(e){var t=g(e);this.addFeature(t)},p.prototype.handleFeatureRemove_=function(e){var t=g(e);this.removeFeature(t)},p.prototype.handleFeatureChange_=function(e){var t=e.target;if(this.handlingDownUpSequence){var r=(0,h.getUid)(t);r in this.pendingFeatures_||(this.pendingFeatures_[r]=t)}else this.updateFeature_(t)},p.prototype.handleUpEvent=function(e){var t=(0,f.getValues)(this.pendingFeatures_);return t.length&&(t.forEach(this.updateFeature_.bind(this)),this.pendingFeatures_={}),!1},p.prototype.removeFeature=function(e,t){var r=void 0===t||t,n=(0,h.getUid)(e),o=this.indexedFeaturesExtents_[n];if(o){var i=this.rBush_,s=[];i.forEachInExtent(o,function(t){e===t.feature&&s.push(t)});for(var a=s.length-1;a>=0;--a)i.remove(s[a])}r&&((0,c.unlistenByKey)(this.featureChangeListenerKeys_[n]),delete this.featureChangeListenerKeys_[n])},p.prototype.setMap=function(t){var n=this.getMap(),i=this.featuresListenerKeys_,s=this.getFeatures_();n&&(i.forEach(c.unlistenByKey),i.length=0,s.forEach(this.forEachFeatureRemove_.bind(this))),r.prototype.setMap.call(this,t),t&&(this.features_?i.push((0,c.listen)(this.features_,e.default.ADD,this.handleFeatureAdd_,this),(0,c.listen)(this.features_,e.default.REMOVE,this.handleFeatureRemove_,this)):this.source_&&i.push((0,c.listen)(this.source_,o.default.ADDFEATURE,this.handleFeatureAdd_,this),(0,c.listen)(this.source_,o.default.REMOVEFEATURE,this.handleFeatureRemove_,this)),s.forEach(this.forEachFeatureAdd_.bind(this)))},p.prototype.snapTo=function(e,t,r){var n=r.getCoordinateFromPixel([e[0]-this.pixelTolerance_,e[1]+this.pixelTolerance_]),o=r.getCoordinateFromPixel([e[0]+this.pixelTolerance_,e[1]-this.pixelTolerance_]),i=(0,s.boundingExtent)([n,o]),u=this.rBush_.getInExtent(i),h=u.length;if(0===h)return null;var f,c=r.getView().getProjection(),p=(0,l.fromUserCoordinate)(t,c),d=1/0,g=this.pixelTolerance_*this.pixelTolerance_,y=function(){if(f){var t=r.getPixelFromCoordinate(f);if((0,a.squaredDistance)(e,t)<=g)return{vertex:f,vertexPixel:[Math.round(t[0]),Math.round(t[1])]}}return null};if(this.vertex_){for(var v=0;v<h;++v){"Circle"!==(m=u[v]).feature.getGeometry().getType()&&m.segment.forEach(function(e){var t=(0,l.fromUserCoordinate)(e,c),r=(0,a.squaredDistance)(p,t);r<d&&(f=e,d=r)})}if(M=y())return M}if(this.edge_){for(v=0;v<h;++v){var m,E=null;if("Circle"===(m=u[v]).feature.getGeometry().getType()){var x=m.feature.getGeometry(),F=(0,l.getUserProjection)();F&&(x=x.clone().transform(F,c)),E=(0,l.toUserCoordinate)((0,a.closestOnCircle)(p,x),c)}else{var C=m.segment,G=C[0],T=C[1];T&&(_[0]=(0,l.fromUserCoordinate)(G,c),_[1]=(0,l.fromUserCoordinate)(T,c),E=(0,a.closestOnSegment)(p,_))}if(E){var P=(0,a.squaredDistance)(p,E);P<d&&(f=E,d=P)}}var M;if(M=y())return M}return null},p.prototype.updateFeature_=function(e){this.removeFeature(e,!1),this.addFeature(e,!1)},p.prototype.segmentCircleGeometry_=function(e,t){var r=this.getMap().getView().getProjection(),n=t,o=(0,l.getUserProjection)();o&&(n=n.clone().transform(o,r));var i=(0,u.fromCircle)(n);o&&i.transform(r,o);for(var s=i.getCoordinates()[0],a=0,h=s.length-1;a<h;++a)e.push(s.slice(a,a+2))},p.prototype.segmentGeometryCollectionGeometry_=function(e,t){for(var r=t.getGeometriesArray(),n=0;n<r.length;++n){var o=this.GEOMETRY_SEGMENTERS_[r[n].getType()];o&&o(e,r[n])}},p.prototype.segmentLineStringGeometry_=function(e,t){for(var r=t.getCoordinates(),n=0,o=r.length-1;n<o;++n)e.push(r.slice(n,n+2))},p.prototype.segmentMultiLineStringGeometry_=function(e,t){for(var r=t.getCoordinates(),n=0,o=r.length;n<o;++n)for(var i=r[n],s=0,a=i.length-1;s<a;++s)e.push(i.slice(s,s+2))},p.prototype.segmentMultiPointGeometry_=function(e,t){t.getCoordinates().forEac
449h(function(t){e.push([t])})},p.prototype.segmentMultiPolygonGeometry_=function(e,t){for(var r=t.getCoordinates(),n=0,o=r.length;n<o;++n)for(var i=r[n],s=0,a=i.length;s<a;++s)for(var u=i[s],l=0,h=u.length-1;l<h;++l)e.push(u.slice(l,l+2))},p.prototype.segmentPointGeometry_=function(e,t){e.push([t.getCoordinates()])},p.prototype.segmentPolygonGeometry_=function(e,t){for(var r=t.getCoordinates(),n=0,o=r.length;n<o;++n)for(var i=r[n],s=0,a=i.length-1;s<a;++s)e.push(i.slice(s,s+2))},p}(r.default),v=exports.default=y;
450},{"../CollectionEventType.js":"BTrx","../events/EventType.js":"C8cu","./Pointer.js":"dnA2","../structs/RBush.js":"MiUH","../source/VectorEventType.js":"s8Fc","../functions.js":"RgA2","../extent.js":"QDir","../coordinate.js":"nGsj","../geom/Polygon.js":"Nwwk","../proj.js":"Diht","../util.js":"KniQ","../obj.js":"mH6q","../events.js":"UqnM"}],"dAAZ":[function(require,module,exports) {
451"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.TranslateEvent=void 0;var t=s(require("../Collection.js")),e=s(require("../events/Event.js")),r=s(require("./Property.js")),n=s(require("./Pointer.js")),a=require("../functions.js"),i=require("../events/condition.js"),o=require("../array.js");function s(t){return t&&t.__esModule?t:{default:t}}var l=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),u={TRANSLATESTART:"translatestart",TRANSLATING:"translating",TRANSLATEEND:"translateend"},c=exports.TranslateEvent=function(t){function e(e,r,n,a,i){var o=t.call(this,e)||this;return o.features=r,o.coordinate=n,o.startCoordinate=a,o.mapBrowserEvent=i,o}return l(e,t),e}(e.default),h=function(e){function n(t){var n,s=this,l=t||{};if((s=e.call(this,l)||this).on,s.once,s.un,s.lastCoordinate_=null,s.startCoordinate_=null,s.features_=void 0!==l.features?l.features:null,l.layers&&!s.features_)if("function"==typeof l.layers)n=l.layers;else{var u=l.layers;n=function(t){return(0,o.includes)(u,t)}}else n=a.TRUE;return s.layerFilter_=n,s.filter_=l.filter&&!s.features_?l.filter:a.TRUE,s.hitTolerance_=l.hitTolerance?l.hitTolerance:0,s.condition_=l.condition?l.condition:i.always,s.lastFeature_=null,s.addChangeListener(r.default.ACTIVE,s.handleActiveChanged_),s}return l(n,e),n.prototype.handleDownEvent=function(e){if(!e.originalEvent||!this.condition_(e))return!1;if(this.lastFeature_=this.featuresAtPixel_(e.pixel,e.map),!this.lastCoordinate_&&this.lastFeature_){this.startCoordinate_=e.coordinate,this.lastCoordinate_=e.coordinate,this.handleMoveEvent(e);var r=this.features_||new t.default([this.lastFeature_]);return this.dispatchEvent(new c(u.TRANSLATESTART,r,e.coordinate,this.startCoordinate_,e)),!0}return!1},n.prototype.handleUpEvent=function(e){if(this.lastCoordinate_){this.lastCoordinate_=null,this.handleMoveEvent(e);var r=this.features_||new t.default([this.lastFeature_]);return this.dispatchEvent(new c(u.TRANSLATEEND,r,e.coordinate,this.startCoordinate_,e)),this.startCoordinate_=null,!0}return!1},n.prototype.handleDragEvent=function(e){if(this.lastCoordinate_){var r=e.coordinate,n=r[0]-this.lastCoordinate_[0],a=r[1]-this.lastCoordinate_[1],i=this.features_||new t.default([this.lastFeature_]);i.forEach(function(t){var e=t.getGeometry();e.translate(n,a),t.setGeometry(e)}),this.lastCoordinate_=r,this.dispatchEvent(new c(u.TRANSLATING,i,r,this.startCoordinate_,e))}},n.prototype.handleMoveEvent=function(t){var e=t.map.getViewport();this.featuresAtPixel_(t.pixel,t.map)?(e.classList.remove(this.lastCoordinate_?"ol-grab":"ol-grabbing"),e.classList.add(this.lastCoordinate_?"ol-grabbing":"ol-grab")):e.classList.remove("ol-grab","ol-grabbing")},n.prototype.featuresAtPixel_=function(t,e){return e.forEachFeatureAtPixel(t,function(t,e){if(this.filter_(t,e)&&(!this.features_||(0,o.includes)(this.features_.getArray(),t)))return t}.bind(this),{layerFilter:this.layerFilter_,hitTolerance:this.hitTolerance_})},n.prototype.getHitTolerance=function(){return this.hitTolerance_},n.prototype.setHitTolerance=function(t){this.hitTolerance_=t},n.prototype.setMap=function(t){var r=this.getMap();e.prototype.setMap.call(this,t),this.updateState_(r)},n.prototype.handleActiveChanged_=function(){this.updateState_(null)},n.prototype.updateState_=function(t){var e=this.getMap(),r=this.getActive();e&&r||(e=e||t)&&e.getViewport().classList.remove("ol-grab","ol-grabbing")},n}(n.default),f=exports.default=h;
452},{"../Collection.js":"FnDa","../events/Event.js":"fKNg","./Property.js":"caOi","./Pointer.js":"dnA2","../functions.js":"RgA2","../events/condition.js":"YcID","../array.js":"luEr"}],"aMDX":[function(require,module,exports) {
453"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"DoubleClickZoom",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(exports,"DragAndDrop",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(exports,"DragBox",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(exports,"DragPan",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(exports,"DragRotate",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(exports,"DragRotateAndZoom",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(exports,"DragZoom",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(exports,"Draw",{enumerable:!0,get:function(){return b.default}}),Object.defineProperty(exports,"Extent",{enumerable:!0,get:function(){return m.default}}),Object.defineProperty(exports,"Interaction",{enumerable:!0,get:function(){return j.default}}),Object.defineProperty(exports,"KeyboardPan",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(exports,"KeyboardZoom",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(exports,"Modify",{enumerable:!0,get:function(){return g.default}}),Object.defineProperty(exports,"MouseWheelZoom",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(exports,"PinchRotate",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(exports,"PinchZoom",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(exports,"Pointer",{enumerable:!0,get:function(){return y.default}}),Object.defineProperty(exports,"Select",{enumerable:!0,get:function(){return P.default}}),Object.defineProperty(exports,"Snap",{enumerable:!0,get:function(){return D.default}}),Object.defineProperty(exports,"Translate",{enumerable:!0,get:function(){return x.default}}),exports.defaults=O;var e=h(require("./Collection.js")),t=h(require("./interaction/DoubleClickZoom.js")),r=h(require("./interaction/DragPan.js")),n=h(require("./interaction/DragRotate.js")),o=h(require("./interaction/DragZoom.js")),u=h(require("./interaction/KeyboardPan.js")),i=h(require("./interaction/KeyboardZoom.js")),a=h(require("./Kinetic.js")),c=h(require("./interaction/MouseWheelZoom.js")),d=h(require("./interaction/PinchRotate.js")),l=h(require("./interaction/PinchZo
453om.js")),f=h(require("./interaction/DragAndDrop.js")),s=h(require("./interaction/DragBox.js")),p=h(require("./interaction/DragRotateAndZoom.js")),b=h(require("./interaction/Draw.js")),m=h(require("./interaction/Extent.js")),j=h(require("./interaction/Interaction.js")),g=h(require("./interaction/Modify.js")),y=h(require("./interaction/Pointer.js")),P=h(require("./interaction/Select.js")),D=h(require("./interaction/Snap.js")),x=h(require("./interaction/Translate.js"));function h(e){return e&&e.__esModule?e:{default:e}}function O(f){var s=f||{},p=new e.default,b=new a.default(-.005,.05,100);return(void 0===s.altShiftDragRotate||s.altShiftDragRotate)&&p.push(new n.default),(void 0===s.doubleClickZoom||s.doubleClickZoom)&&p.push(new t.default({delta:s.zoomDelta,duration:s.zoomDuration})),(void 0===s.dragPan||s.dragPan)&&p.push(new r.default({onFocusOnly:s.onFocusOnly,kinetic:b})),(void 0===s.pinchRotate||s.pinchRotate)&&p.push(new d.default),(void 0===s.pinchZoom||s.pinchZoom)&&p.push(new l.default({duration:s.zoomDuration})),(void 0===s.keyboard||s.keyboard)&&(p.push(new u.default),p.push(new i.default({delta:s.zoomDelta,duration:s.zoomDuration}))),(void 0===s.mouseWheelZoom||s.mouseWheelZoom)&&p.push(new c.default({onFocusOnly:s.onFocusOnly,duration:s.zoomDuration})),(void 0===s.shiftDragZoom||s.shiftDragZoom)&&p.push(new o.default({duration:s.zoomDuration})),p}
454},{"./Collection.js":"FnDa","./interaction/DoubleClickZoom.js":"NSa4","./interaction/DragPan.js":"N4gU","./interaction/DragRotate.js":"PgBj","./interaction/DragZoom.js":"pTqW","./interaction/KeyboardPan.js":"CFRo","./interaction/KeyboardZoom.js":"S8wR","./Kinetic.js":"gAnK","./interaction/MouseWheelZoom.js":"kPt6","./interaction/PinchRotate.js":"hbGN","./interaction/PinchZoom.js":"rcXm","./interaction/DragAndDrop.js":"IYO6","./interaction/DragBox.js":"AQRw","./interaction/DragRotateAndZoom.js":"ITeC","./interaction/Draw.js":"e7i2","./interaction/Extent.js":"o7b8","./interaction/Interaction.js":"jB2p","./interaction/Modify.js":"qrxo","./interaction/Pointer.js":"dnA2","./interaction/Select.js":"SMGe","./interaction/Snap.js":"NnGW","./interaction/Translate.js":"dAAZ"}],"kYy5":[function(require,module,exports) {
455"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=u(require("./renderer/Composite.js")),e=u(require("./PluggableMap.js")),r=require("./obj.js"),o=require("./control.js"),n=require("./interaction.js");function u(t){return t&&t.__esModule?t:{default:t}}var i=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function o(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),s=function(e){function u(t){return(t=(0,r.assign)({},t)).controls||(t.controls=(0,o.defaults)()),t.interactions||(t.interactions=(0,n.defaults)({onFocusOnly:!0})),e.call(this,t)||this}return i(u,e),u.prototype.createRenderer=function(){return new t.default(this)},u}(e.default),c=exports.default=s;
456},{"./renderer/Composite.js":"MHsB","./PluggableMap.js":"kRwz","./obj.js":"mH6q","./control.js":"ucqx","./interaction.js":"aMDX"}],"IWZI":[function(require,module,exports) {
457"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=o(require("./events/Target.js")),e=o(require("./events/EventType.js")),i=o(require("./TileState.js")),r=require("./util.js"),n=require("./easing.js");function o(t){return t&&t.__esModule?t:{default:t}}var s=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),a=function(t){function o(e,i,r){var n=t.call(this)||this,o=r||{};return n.tileCoord=e,n.state=i,n.interimTile=null,n.key="",n.transition_=void 0===o.transition?250:o.transition,n.transitionStarts_={},n.interpolate=!!o.interpolate,n}return s(o,t),o.prototype.changed=function(){this.dispatchEvent(e.default.CHANGE)},o.prototype.release=function(){},o.prototype.getKey=function(){return this.key+"/"+this.tileCoord},o.prototype.getInterimTile=function(){if(!this.interimTile)return this;var t=this.interimTile;do{if(t.getState()==i.default.LOADED)return this.transition_=0,t;t=t.interimTile}while(t);return this},o.prototype.refreshInterimChain=function(){if(this.interimTile){var t=this.interimTile,e=this;do{if(t.getState()==i.default.LOADED){t.interimTile=null;break}t.getState()==i.default.LOADING?e=t:t.getState()==i.default.IDLE?e.interimTile=t.interimTile:e=t,t=e.interimTile}while(t)}},o.prototype.getTileCoord=function(){return this.tileCoord},o.prototype.getState=function(){return this.state},o.prototype.setState=function(t){if(this.state!==i.default.ERROR&&this.state>t)throw new Error("Tile load sequence violation");this.state=t,this.changed()},o.prototype.load=function(){(0,r.abstract)()},o.prototype.getAlpha=function(t,e){if(!this.transition_)return 1;var i=this.transitionStarts_[t];if(i){if(-1===i)return 1}else i=e,this.transitionStarts_[t]=i;var r=e-i+1e3/60;return r>=this.transition_?1:(0,n.easeIn)(r/this.transition_)},o.prototype.inTransition=function(t){return!!this.transition_&&-1!==this.transitionStarts_[t]},o.prototype.endTransition=function(t){this.transition_&&(this.transitionStarts_[t]=-1)},o}(t.default),u=exports.default=a;
458},{"./events/Target.js":"CR4Y","./events/EventType.js":"C8cu","./TileState.js":"
458Xz9x","./util.js":"KniQ","./easing.js":"IeCz"}],"TOsW":[function(require,module,exports) {
459"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=s(require("./Tile.js")),e=s(require("./TileState.js")),i=require("./dom.js"),n=require("./Image.js");function s(t){return t&&t.__esModule?t:{default:t}}var r=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),a=function(t){function i(e,i,n,s,r,a){var o=t.call(this,e,i,a)||this;return o.crossOrigin_=s,o.src_=n,o.key=n,o.image_=new Image,null!==s&&(o.image_.crossOrigin=s),o.unlisten_=null,o.tileLoadFunction_=r,o}return r(i,t),i.prototype.getImage=function(){return this.image_},i.prototype.setImage=function(t){this.image_=t,this.state=e.default.LOADED,this.unlistenImage_(),this.changed()},i.prototype.handleImageError_=function(){this.state=e.default.ERROR,this.unlistenImage_(),this.image_=o(),this.changed()},i.prototype.handleImageLoad_=function(){var t=this.image_;t.naturalWidth&&t.naturalHeight?this.state=e.default.LOADED:this.state=e.default.EMPTY,this.unlistenImage_(),this.changed()},i.prototype.load=function(){this.state==e.default.ERROR&&(this.state=e.default.IDLE,this.image_=new Image,null!==this.crossOrigin_&&(this.image_.crossOrigin=this.crossOrigin_)),this.state==e.default.IDLE&&(this.state=e.default.LOADING,this.changed(),this.tileLoadFunction_(this,this.src_),this.unlisten_=(0,n.listenImage)(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))},i.prototype.unlistenImage_=function(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)},i}(t.default);function o(){var t=(0,i.createCanvasContext2D)(1,1);return t.fillStyle="rgba(0,0,0,0)",t.fillRect(0,0,1,1),t.canvas}var u=exports.default=a;
460}
460,{"./Tile.js":"IWZI","./TileState.js":"Xz9x","./dom.js":"Xno5","./Image.js":"DHWK"}],"fF5X":[function(require,module,exports) {
461"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ERROR_THRESHOLD=exports.ENABLE_RASTER_REPROJECTION=void 0;var R=exports.ERROR_THRESHOLD=.5,E=exports.ENABLE_RASTER_REPROJECTION=!0;
462},{}],"BiRY":[function(require,module,exports) {
463"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=require("../extent.js"),i=require("../proj.js"),r=require("../math.js"),e=10,s=.25,o=function(){function o(s,o,n,a,h,u){this.sourceProj_=s,this.targetProj_=o;var d={},c=(0,i.getTransform)(this.targetProj_,this.sourceProj_);this.transformInv_=function(t){var i=t[0]+"/"+t[1];return d[i]||(d[i]=c(t)),d[i]},this.maxSourceExtent_=a,this.errorThresholdSquared_=h*h,this.triangles_=[],this.wrapsXInSource_=!1,this.canWrapXInSource_=this.sourceProj_.canWrapX()&&!!a&&!!this.sourceProj_.getExtent()&&(0,t.getWidth)(a)==(0,t.getWidth)(this.sourceProj_.getExtent()),this.sourceWorldWidth_=this.sourceProj_.getExtent()?(0,t.getWidth)(this.sourceProj_.getExtent()):null,this.targetWorldWidth_=this.targetProj_.getExtent()?(0,t.getWidth)(this.targetProj_.getExtent()):null;var _=(0,t.getTopLeft)(n),l=(0,t.getTopRight)(n),g=(0,t.getBottomRight)(n),f=(0,t.getBottomLeft)(n),W=this.transformInv_(_),v=this.transformInv_(l),m=this.transformInv_(g),x=this.transformInv_(f),p=e+(u?Math.max(0,Math.ceil((0,r.log2)((0,t.getArea)(n)/(u*u*256*256)))):0);if(this.addQuad_(_,l,g,f,W,v,m,x,p),this.wrapsXInSource_){var F=1/0;this.triangles_.forEach(function(t,i,r){F=Math.min(F,t.source[0][0],t.source[1][0],t.source[2][0])}),this.triangles_.forEach(function(t){if(Math.max(t.source[0][0],t.source[1][0],t.source[2][0])-F>this.sourceWorldWidth_/2){var i=[[t.source[0][0],t.source[0][1]],[t.source[1][0],t.source[1][1]],[t.source[2][0],t.source[2][1]]];i[0][0]-F>this.sourceWorldWidth_/2&&(i[0][0]-=this.sourceWorldWidth_),i[1][0]-F>this.sourceWorldWidth_/2&&(i[1][0]-=this.sourceWorldWidth_),i[2][0]-F>this.sourceWorldWidth_/2&&(i[2][0]-=this.sourceWorldWidth_);var r=Math.min(i[0][0],i[1][0],i[2][0]);Math.max(i[0][0],i[1][0],i[2][0])-r<this.sourceWorldWidth_/2&&(t.source=i)}}.bind(this))}d={}}return o.prototype.addTriangle_=function(t,i,r,e,s,o){this.triangles_.push({source:[e,s,o],target:[t,i,r]})},o.prototype.addQuad_=function(i,e,o,n,a,h,u,d,c){var _=(0,t.boundingExtent)([a,h,u,d]),l=this.sourceWorldWidth_?(0,t.getWidth)(_)/this.sourceWorldWidth_:null,g=this.sourceWorldWidth_,f=this.sourceProj_.canWrapX()&&l>.5&&l<1,W=!1;if(c>0){if(this.targetProj_.isGlobal()&&this.targetWorldWidth_){var v=(0,t.boundingExtent)([i,e,o,n]);W=(0,t.getWidth)(v)/this.targetWorldWidth_>s||W}!f&&this.sourceProj_.isGlobal()&&l&&(W=l>s||W)}if(!(!W&&this.maxSourceExtent_&&isFinite(_[0])&&isFinite(_[1])&&isFinite(_[2])&&isFinite(_[3]))||(0,t.intersects)(_,this.maxSourceExtent_)){var m=0;if(!(W||isFinite(a[0])&&isFinite(a[1])&&isFinite(h[0])&&isFinite(h[1])&&isFinite(u[0])&&isFinite(u[1])&&isFinite(d[0])&&isFinite(d[1])))if(c>0)W=!0;else if(1!=(m=(isFinite(a[0])&&isFinite(a[1])?0:8)+(isFinite(h[0])&&isFinite(h[1])?0:4)+(isFinite(u[0])&&isFinite(u[1])?0:2)+(isFinite(d[0])&&isFinite(d[1])?0:1))&&2!=m&&4!=m&&8!=m)return;if(c>0){if(!W){var x=[(i[0]+o[0])/2,(i[1]+o[1])/2],p=this.transformInv_(x),F=void 0;if(f)F=((0,r.modulo)(a[0],g)+(0,r.modulo)(u[0],g))/2-(0,r.modulo)(p[0],g);else F=(a[0]+u[0])/2-p[0];var j=(a[1]+u[1])/2-p[1];W=F*F+j*j>this.errorThresholdSquared_}if(W){if(Math.abs(i[0]-o[0])<=Math.abs(i[1]-o[1])){var E=[(e[0]+o[0])/2,(e[1]+o[1])/2],I=this.transformInv_(E),P=[(n[0]+i[0])/2,(n[1]+i[1])/2],S=this.transformInv_(P);this.addQuad_(i,e,E,P,a,h,I,S,c-1),this.addQuad_(P,E,o,n,S,I,u,d,c-1)}else{var T=[(i[0]+e[0])/2,(i[1]+e[1])/2],M=this.transformInv_(T),b=[(o[0]+n[0])/2,(o[1]+n[1])/2],X=this.transformInv_(b);this.addQuad_(i,T,b,n,a,M,X,d,c-1),this.addQuad_(T,e,o,b,M,h,u,X,c-1)}return}}if(f){if(!this.canWrapXInSource_)return;this.wrapsXInSource_=!0}0==(11&m)&&this.addTriangle_(i,o,n,a,u,d),0==(14&m)&&this.addTriangle_(i,o,e,a,u,h),m&&(0==(13&m)&&this.addTriangle_(e,n,i,h,d,a),0==(7&m)&&this.addTriangle_(e,n,o,h,d,u))}},o.prototype.calculateSourceExtent=function(){var i=(0,t.createEmpty)();return this.triangles_.forEach(function(r,e,s){var o=r.source;(0,t.extendCoordinate)(i,o[0]),(0,t.extendCoordinate)(i,o[1]),(0,t.extendCoordinate)(i,o[2])}),i},o.prototype.getTriangles=function(){return this.triangles_},o}(),n=exports.default=o;
464},{"../extent.js":"QDir","../proj.js":"Diht","../math.js":"B96G"}],"wFjK":[function(require,module,exports) {
465"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.IMAGE_SMOOTHING_ENABLED=exports.IMAGE_SMOOTHING_DISABLED=void 0;var e=exports.IMAGE_SMOOTHING_DISABLED={imageSmoothingEnabled:!1,msImageSmoothingEnabled:!1},o=exports.IMAGE_SMOOTHING_ENABLED={imageSmoothingEnabled:!0,msImageSmoothingEnabled:!0};
466},{}],"U255":[function(require,module,exports) {
467"use strict";Object.defineProperty(exports,"__esModule",{value:!0}
467),exports.calculateSourceExtentResolution=v,exports.calculateSourceResolution=g,exports.canvasPool=void 0,exports.render=h;var e,t=require("./renderer/canvas/common.js"),r=require("./obj.js"),a=require("./extent.js"),o=require("./dom.js"),n=require("./proj.js"),i=require("./math.js"),s=exports.canvasPool=[];function l(e,t,r,a,o){e.beginPath(),e.moveTo(0,0),e.lineTo(t,r),e.lineTo(a,o),e.closePath(),e.save(),e.clip(),e.fillRect(0,0,Math.max(t,a)+1,Math.max(r,o)),e.restore()}function c(e,t){return Math.abs(e[4*t]-210)>2||Math.abs(e[4*t+3]-191.25)>2}function u(){if(void 0===e){var t=document.createElement("canvas").getContext("2d");t.globalCompositeOperation="lighter",t.fillStyle="rgba(210, 0, 0, 0.75)",l(t,4,5,4,0),l(t,4,5,0,5);var r=t.getImageData(0,0,3,3).data;e=c(r,0)||c(r,4)||c(r,8)}return e}function g(e,t,r,o){var i=(0,n.transform)(r,t,e),s=(0,n.getPointResolution)(t,o,r),l=t.getMetersPerUnit();void 0!==l&&(s*=l);var c=e.getMetersPerUnit();void 0!==c&&(s/=c);var u=e.getExtent();if(!u||(0,a.containsCoordinate)(u,i)){var g=(0,n.getPointResolution)(e,s,i)/s;isFinite(g)&&g>0&&(s/=g)}return s}function v(e,t,r,o){var n=(0,a.getCenter)(r),i=g(e,t,n,o);return(!isFinite(i)||i<=0)&&(0,a.forEachCorner)(r,function(r){return i=g(e,t,r,o),isFinite(i)&&i>0}),i}function h(e,n,l,c,g,v,h,f,m,d,x,p){var T=(0,o.createCanvasContext2D)(Math.round(l*e),Math.round(l*n),s);if(p||(0,r.assign)(T,t.IMAGE_SMOOTHING_DISABLED),0===m.length)return T.canvas;function M(e){return Math.round(e*l)/l}T.scale(l,l),T.globalCompositeOperation="lighter";var E=(0,a.createEmpty)();m.forEach(function(e,t,r){(0,a.extend)(E,e.extent)});var b=(0,a.getWidth)(E),P=(0,a.getHeight)(E),C=(0,o.createCanvasContext2D)(Math.round(l*b/c),Math.round(l*P/c));p||(0,r.assign)(C,t.IMAGE_SMOOTHING_DISABLED);var j=l/c;m.forEach(function(e,t,r){var o=e.extent[0]-E[0],n=-(e.extent[3]-E[3]),i=(0,a.getWidth)(e.extent),s=(0,a.getHeight)(e.extent);e.image.width>0&&e.image.height>0&&C.drawImage(e.image,d,d,e.image.width-2*d,e.image.height-2*d,o*j,n*j,i*j,s*j)});var I=(0,a.getTopLeft)(h);
467return f.getTriangles().forEach(function(e,t,r){var a=e.source,o=e.target,n=a[0][0],s=a[0][1],g=a[1][0],h=a[1][1],f=a[2][0],m=a[2][1],d=M((o[0][0]-I[0])/v),x=M(-(o[0][1]-I[1])/v),b=M((o[1][0]-I[0])/v),P=M(-(o[1][1]-I[1])/v),j=M((o[2][0]-I[0])/v),S=M(-(o[2][1]-I[1])/v),O=n,D=s;n=0,s=0;var q=[[g-=O,h-=D,0,0,b-d],[f-=O,m-=D,0,0,j-d],[0,0,g,h,P-x],[0,0,f,m,S-x]],_=(0,i.solveLinearSystem)(q);if(_){if(T.save(),T.beginPath(),u()||!p){T.moveTo(b,P);for(var y=d-b,R=x-P,w=0;w<4;w++)T.lineTo(b+M((w+1)*y/4),P+M(w*R/3)),3!=w&&T.lineTo(b+M((w+1)*y/4),P+M((w+1)*R/3));T.lineTo(j,S)}else T.moveTo(b,P),T.lineTo(d,x),T.lineTo(j,S);T.clip(),T.transform(_[0],_[2],_[1],_[3],d,x),T.translate(E[0]-O,E[3]-D),T.scale(c/l,-c/l),T.drawImage(C.canvas,0,0),T.restore()}}),x&&(T.save(),T.globalCompositeOperation="source-over",T.strokeStyle="black",T.lineWidth=1,f.getTriangles().forEach(function(e,t,r){var a=e.target,o=(a[0][0]-I[0])/v,n=-(a[0][1]-I[1])/v,i=(a[1][0]-I[0])/v,s=-(a[1][1]-I[1])/v,l=(a[2][0]-I[0])/v,c=-(a[2][1]-I[1])/v;T.beginPath(),T.moveTo(i,s),T.lineTo(o,n),T.lineTo(l,c),T.closePath(),T.stroke()}),T.restore()),T.canvas}
468},{"./renderer/canvas/common.js":"wFjK","./obj.js":"mH6q","./extent.js":"QDir","./dom.js":"Xno5","./proj.js":"Diht","./math.js":"B96G"}],"WlOd":[function(require,module,exports) {
469"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=require("./common.js"),t=c(require("../events/EventType.js")),r=c(require("../Tile.js")),i=c(require("../TileState.js")),s=c(require("./Triangulation.js")),o=require("../reproj.js"),n=require("../math.js"),a=require("../extent.js"),u=require("../events.js"),l=require("../dom.js");function c(e){return e&&e.__esModule?e:{default:e}}var d=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),_=function(r){function c(t,u,l,c,d,_,f,h,p,g,T,v){var E=r.call(this,d,i.default.IDLE,{interpolate:!!v})||this;E.renderEdges_=void 0!==T&&T,E.pixelRatio_=f,E.gutter_=h,E.canvas_=null,E.sourceTileGrid_=u,E.targetTileGrid_=c,E.wrappedTileCoord_=_||d,E.sourceTiles_=[],E.sourcesListenerKeys_=null,E.sourceZ_=0;var y=c.getTileCoordExtent(E.wrappedTileCoord_),x=E.targetTileGrid_.getExtent(),j=E.sourceTileGrid_.getExtent(),R=x?(0,a.getIntersection)(y,x):y;if(0===(0,a.getArea)(R))return E.state=i.default.EMPTY,E;var m=t.getExtent();m&&(j=j?(0,a.getIntersection)(j,m):m);var L=c.getResolution(E.wrappedTileCoord_[0]),O=(0,o.calculateSourceExtentResolution)(t,l,R,L);if(!isFinite(O)||O<=0)return E.state=i.default.EMPTY,E;var C=void 0!==g?g:e.ERROR_THRESHOLD;if(E.triangulation_=new s.default(t,l,R,j,O*C,L),0===E.triangulation_.getTriangles().length)return E.state=i.default.EMPTY,E;E.sourceZ_=u.getZForResolution(O);var D=E.triangulation_.calculateSourceExtent();if(j&&(t.canWrapX()?(D[1]=(0,n.clamp)(D[1],j[1],j[3]),D[3]=(0,n.clamp)(D[3],j[1],j[3])):D=(0,a.getIntersection)(D,j)),(0,a.getArea)(D)){for(var G=u.getTileRangeForExtentAndZ(D,E.sourceZ_),S=G.minX;S<=G.maxX;S++)for(var I=G.minY;I<=G.maxY;I++){var q=p(E.sourceZ_,S,I,f);q&&E.sourceTiles_.push(q)}0===E.sourceTiles_.length&&(E.state=i.default.EMPTY)}else E.state=i.default.EMPTY;return E}return d(c,r),c.prototype.getImage=function(){return this.canvas_},c.prototype.reproject_=function(){var e=[];if(this.sourceTiles_.forEach(function(t,r,s){t&&t.getState()==i.default.LOADED&&e.push({extent:this.sourceTileGrid_.getTileCoordExtent(t.tileCoord),image:t.getImage()})}.bind(this)),this.sourceTiles_.length=0,0===e.length)this.state=i.default.ERROR;else{var t=this.wrappedTileCoord_[0],r=this.targetTileGrid_.getTileSize(t),s="number"==typeof r?r:r[0],n="number"==typeof r?r:r[1],a=this.targetTileGrid_.getResolution(t),u=this.sourceTileGrid_.getResolution(this.sourceZ_),l=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_);this.canvas_=(0,o.render)(s,n,this.pixelRatio_,u,this.sourceTileGrid_.getExtent(),a,l,this.triangulation_,e,this.gutter_,this.renderEdges_,this.interpolate),this.state=i.default.LOADED}this.changed()},c.prototype.load=function(){if(this.state==i.default.IDLE){this.state=i.default.LOADING,this.changed();var e=0;this.sourcesListenerKeys_=[],this.sourceTiles_.forEach(function(r,s,o){var n=r.getState();if(n==i.default.IDLE||n==i.default.LOADING){e++;var a=(0,u.listen)(r,t.default.CHANGE,function(t){var s=r.getState();s!=i.default.LOADED&&s!=i.default.ERROR&&s!=i.default.EMPTY||((0,u.unlistenByKey)(a),0===--e&&(this.unlistenSources_(),this.reproject_()))},this);this.sourcesListenerKeys_.push(a)}}.bind(this)),0===e?setTimeout(this.reproject_.bind(this),0):this.sourceTiles_.forEach(function(e,t,r){e.getState()==i.default.IDLE&&e.load()})}},c.prototype.unlistenSources_=function(){this.sourcesListenerKeys_.forEach(u.unlistenByKey),this.sourcesListenerKeys_=null},c.prototype.release=function(){this.canvas_&&((0,l.releaseCanvas)(this.canvas_.getContext("2d")),o.canvasPool.push(this.canvas_),this.canvas_=null),r.prototype.release.call(this)},c}(r.default),f=exports.default=_;
470},{"./common.js":"fF5X","../events/EventType.js":"C8cu","../Tile.js":"IWZI","../TileState.js":"
470Xz9x","./Triangulation.js":"BiRY","../reproj.js":"U255","../math.js":"B96G","../extent.js":"QDir","../events.js":"UqnM","../dom.js":"Xno5"}],"oMDz":[function(require,module,exports) {
471"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=require("../asserts.js"),t=function(){function t(e){this.highWaterMark=void 0!==e?e:2048,this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}return t.prototype.canExpireCache=function(){return this.highWaterMark>0&&this.getCount()>this.highWaterMark},t.prototype.expireCache=function(e){for(;this.canExpireCache();)this.pop()},t.prototype.clear=function(){this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null},t.prototype.containsKey=function(e){return this.entries_.hasOwnProperty(e)},t.prototype.forEach=function(e){for(var t=this.oldest_;t;)e(t.value_,t.key_,this),t=t.newer},t.prototype.get=function(t,s){var r=this.entries_[t];return(0,e.assert)(void 0!==r,15),r===this.newest_?r.value_:(r===this.oldest_?(this.oldest_=this.oldest_.newer,this.oldest_.older=null):(r.newer.older=r.older,r.older.newer=r.newer),r.newer=null,r.older=this.newest_,this.newest_.newer=r,this.newest_=r,r.value_)},t.prototype.remove=function(t){var s=this.entries_[t];return(0,e.assert)(void 0!==s,15),s===this.newest_?(this.newest_=s.older,this.newest_&&(this.newest_.newer=null)):s===this.oldest_?(this.oldest_=s.newer,this.oldest_&&(this.oldest_.older=null)):(s.newer.older=s.older,s.older.newer=s.newer),delete this.entries_[t],--this.count_,s.value_},t.prototype.getCount=function(){return this.count_},t.prototype.getKeys=function(){var e,t=new Array(this.count_),s=0;for(e=this.newest_;e;e=e.older)t[s++]=e.key_;return t},t.prototype.getValues=function(){var e,t=new Array(this.count_),s=0;for(e=this.newest_;e;e=e.older)t[s++]=e.value_;return t},t.prototype.peekLast=function(){return this.oldest_.value_},t.prototype.peekLastKey=function(){return this.oldest_.key_},t.prototype.peekFirstKey=function(){return this.newest_.key_},t.prototype.peek=function(e){if(this.containsKey(e))return this.entries_[e].value_},t.prototype.pop=function(){var e=this.oldest_;return delete this.entries_[e.key_],e.newer&&(e.newer.older=null),this.oldest_=e.newer,this.oldest_||(this.newest_=null),--this.count_,e.value_},t.prototype.replace=function(e,t){this.get(e),this.entries_[e].value_=t},t.prototype.set=function(t,s){(0,e.assert)(!(t in this.entries_),16);var r={key_:t,newer:null,older:this.newest_,value_:s};this.newest_?this.newest_.newer=r:this.oldest_=r,this.newest_=r,this.entries_[t]=r,++this.count_},t.prototype.setSize=function(e){this.highWaterMark=e},t}(),s=exports.default=t;
472},{"../asserts.js":"fLG6"}],"faTr":[function(require,module,exports) {
473"use strict";function e(e,t,r,n){return void 0!==n?(n[0]=e,n[1]=t,n[2]=r,n):[e,t,r]}function t(e,t,r){return e+"/"+t+"/"+r}function r(e){return t(e[0],e[1],e[2])}function n(e){var r=e.substring(e.lastIndexOf("/")+1,e.length).split(",").map(Number);return t(r[0],r[1],r[2])}function o(e){return e.split("/").map(Number)}function u(e){return(e[1]<<e[0])+e[2]}function i(e,t){var r=e[0],n=e[1],o=e[2];if(t.getMinZoom()>r||r>t.getMaxZoom())return!1;var u=t.getFullTileRange(r);return!u||u.containsXY(n,o)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.createOrUpdate=e,exports.fromKey=o,exports.getCacheKeyForTileKey=n,exports.getKey=r,exports.getKeyZXY=t,exports.hash=u,exports.withinExtentAndZ=i;
474},{}],"YFDe":[function(require,module,exports) {
475"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=r(require("./structs/LRUCache.js")),e=require("./tilecoord.js");function r(t){return t&&t.__esModule?t:{default:t}}var o=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function o(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),n=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return o(r,t),r.prototype.expireCache=function(t){for(;this.canExpireCache();){if(this.peekLast().getKey()in t)break;this.pop().release()}},r.prototype.pruneExceptNewestZ=function(){if(0!==this.getCount()){var t=this.peekFirstKey(),r=(0,e.fromKey)(t)[0];this.forEach(function(t){t.tileCoord[0]!==r&&(this.remove((0,e.getKey)(t.tileCoord)),t.release()
475)}.bind(this))}},r}(t.default),i=exports.default=n;
476},{"./structs/LRUCache.js":"oMDz","./tilecoord.js":"faTr"}],"KXhD":[function(require,module,exports) {
477"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=exports.default={TILELOADSTART:"tileloadstart",TILELOADEND:"tileloadend",TILELOADERROR:"tileloaderror"};
478},{}],"snev":[function(require,module,exports) {
479"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.createOrUpdate=i,exports.default=void 0;var t=function(){function t(t,i,n,m){this.minX=t,this.maxX=i,this.minY=n,this.maxY=m}return t.prototype.contains=function(t){return this.containsXY(t[1],t[2])},t.prototype.containsTileRange=function(t){return this.minX<=t.minX&&t.maxX<=this.maxX&&this.minY<=t.minY&&t.maxY<=this.maxY},t.prototype.containsXY=function(t,i){return this.minX<=t&&t<=this.maxX&&this.minY<=i&&i<=this.maxY},t.prototype.equals=function(t){return this.minX==t.minX&&this.minY==t.minY&&this.maxX==t.maxX&&this.maxY==t.maxY},t.prototype.extend=function(t){t.minX<this.minX&&(this.minX=t.minX),t.maxX>this.maxX&&(this.maxX=t.maxX),t.minY<this.minY&&(this.minY=t.minY),t.maxY>this.maxY&&(this.maxY=t.maxY)},t.prototype.getHeight=function(){return this.maxY-this.minY+1},t.prototype.getSize=function(){return[this.getWidth(),this.getHeight()]},t.prototype.getWidth=function(){return this.maxX-this.minX+1},t.prototype.intersects=function(t){return this.minX<=t.maxX&&this.maxX>=t.minX&&this.minY<=t.maxY&&this.maxY>=t.minY},t}();function i(i,n,m,e,s){return void 0!==s?(s.minX=i,s.maxX=n,s.minY=m,s.maxY=e,s):new t(i,n,m,e)}var n=exports.default=t;
480},{}],"dpZ6":[function(require,module,exports) {
481"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=h(require("../TileRange.js")),e=require("./common.js"),i=require("../asserts.js"),o=require("../math.js"),r=require("../extent.js"),n=require("../tilecoord.js"),s=require("../geom/flat/intersectsextent.js"),l=require("../array.js"),a=require("../size.js");function u(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,i=new WeakMap;return(u=function(t){return t?i:e})(t)}function h(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=typeof t&&"function"!=typeof t)return{default:t};var i=u(e);if(i&&i.has(t))return i.get(t);var o={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in t)if("default"!==n&&{}.hasOwnProperty.call(t,n)){var s=r?Object.getOwnPropertyDescriptor(t,n):null;s&&(s.get||s.set)?Object.defineProperty(o,n,s):o[n]=t[n]}return o.default=t,i&&i.set(t,o),o}var g=[0,0,0],p=5,f=function(){function u(o){var n;if(this.minZoom=void 0!==o.minZoom?o.minZoom:0,this.resolutions_=o.resolutions,(0,i.assert)((0,l.isSorted)(this.resolutions_,function(t,e){return e-t},!0),17),!o.origins)for(var s=0,a=this.resolutions_.length-1;s<a;++s)if(n){if(this.resolutions_[s]/this.resolutions_[s+1]!==n){n=void 0;break}}else n=this.resolutions_[s]/this.resolutions_[s+1];this.zoomFactor_=n,this.maxZoom=this.resolutions_.length-1,this.origin_=void 0!==o.origin?o.origin:null,this.origins_=null,void 0!==o.origins&&(this.origins_=o.origins,(0,i.assert)(this.origins_.length==this.resolutions_.length,20));var u=o.extent;void 0===u||this.origin_||this.origins_||(this.origin_=(0,r.getTopLeft)(u)),(0,i.assert)(!this.origin_&&this.origins_||this.origin_&&!this.origins_,18),this.tileSizes_=null,void 0!==o.tileSizes&&(this.tileSizes_=o.tileSizes,(0,i.assert)(this.tileSizes_.length==this.resolutions_.length,19)),this.tileSize_=void 0!==o.tileSize?o.tileSize:this.tileSizes_?null:e.DEFAULT_TILE_SIZE,(0,i.assert)(!this.tileSize_&&this.tileSizes_||this.tileSize_&&!this.tileSizes_,22),this.extent_=void 0!==u?u:null,this.fullTileRanges_=null,this.tmpSize_=[0,0],this.tmpExtent_=[0,0,0,0],void 0!==o.sizes?this.fullTileRanges_=o.sizes.map(function(e,i){var o=new t.default(Math.min(0,e[0]),Math.max(e[0]-1,-1),Math.min(0,e[1]),Math.max(e[1]-1,-1));if(u){var r=this.getTileRangeForExtentAndZ(u,i);o.minX=Math.max(r.minX,o.minX),o.maxX=Math.min(r.maxX,o.maxX),o.minY=Math.max(r.minY,o.minY),o.maxY=Math.min(r.maxY,o.maxY)}return o},this):u&&this.calculateTileRanges_(u)}
481return u.prototype.forEachTileCoord=function(t,e,i){for(var o=this.getTileRangeForExtentAndZ(t,e),r=o.minX,n=o.maxX;r<=n;++r)for(var s=o.minY,l=o.maxY;s<=l;++s)i([e,r,s])},u.prototype.forEachTileCoordParentTileRange=function(e,i,o,r){var n,s,l,a=null,u=e[0]-1;for(2===this.zoomFactor_?(s=e[1],l=e[2]):a=this.getTileCoordExtent(e,r);u>=this.minZoom;){if(2===this.zoomFactor_?(s=Math.floor(s/2),l=Math.floor(l/2),n=(0,t.createOrUpdate)(s,s,l,l,o)):n=this.getTileRangeForExtentAndZ(a,u,o),i(u,n))return!0;--u}return!1},u.prototype.getExtent=function(){return this.extent_},u.prototype.getMaxZoom=function(){return this.maxZoom},u.prototype.getMinZoom=function(){return this.minZoom},u.prototype.getOrigin=function(t){return this.origin_?this.origin_:this.origins_[t]},u.prototype.getResolution=function(t){return this.resolutions_[t]},u.prototype.getResolutions=function(){return this.resolutions_},u.prototype.getTileCoordChildTileRange=function(e,i,o){if(e[0]<this.maxZoom){if(2===this.zoomFactor_){var r=2*e[1],n=2*e[2];return(0,t.createOrUpdate)(r,r+1,n,n+1,i)}var s=this.getTileCoordExtent(e,o||this.tmpExtent_);return this.getTileRangeForExtentAndZ(s,e[0]+1,i)}return null},u.prototype.getTileRangeForTileCoordAndZ=function(e,i,o){if(i>this.maxZoom||i<this.minZoom)return null;var r=e[0],n=e[1],s=e[2];if(i===r)return(0,t.createOrUpdate)(n,s,n,s,o);if(this.zoomFactor_){var l=Math.pow(this.zoomFactor_,i-r),a=Math.floor(n*l),u=Math.floor(s*l);if(i<r)return(0,t.createOrUpdate)(a,a,u,u,o);var h=Math.floor(l*(n+1))-1,g=Math.floor(l*(s+1))-1;return(0,t.createOrUpdate)(a,h,u,g,o)}var p=this.getTileCoordExtent(e,this.tmpExtent_);return this.getTileRangeForExtentAndZ(p,i,o)},u.prototype.getTileRangeExtent=function(t,e,i){var o=this.getOrigin(t),n=this.getResolution(t),s=(0,a.toSize)(this.getTileSize(t),this.tmpSize_),l=o[0]+e.minX*s[0]*n,u=o[0]+(e.maxX+1)*s[0]*n,h=o[1]+e.minY*s[1]*n,g=o[1]+(e.maxY+1)*s[1]*n;return(0,r.createOrUpdate)(l,h,u,g,i)},u.prototype.getTileRangeForExtentAndZ=function(e,i,o){var r=g;this.getTileCoordForXYAndZ_(e[0],e[3],i,!1,r);var n=r[1],s=r[2];return this.getTileCoordForXYAndZ_(e[2],e[1],i,!0,r),(0,t.createOrUpdate)(n,r[1],s,r[2],o)},u.prototype.getTileCoordCenter=function(t){var e=this.getOrigin(t[0]),i=this.getResolution(t[0]),o=(0,a.toSize)(this.getTileSize(t[0]),this.tmpSize_);return[e[0]+(t[1]+.5)*o[0]*i,e[1]-(t[2]+.5)*o[1]*i]},u.prototype.getTileCoordExtent=function(t,e){var i=this.getOrigin(t[0]),o=this.getResolution(t[0]),n=(0,a.toSize)(this.getTileSize(t[0]),this.tmpSize_),s=i[0]+t[1]*n[0]*o,l=i[1]-(t[2]+1)*n[1]*o,u=s+n[0]*o,h=l+n[1]*o;return(0,r.createOrUpdate)(s,l,u,h,e)},u.prototype.getTileCoordForCoordAndResolution=function(t,e,i){return this.getTileCoordForXYAndResolution_(t[0],t[1],e,!1,i)},u.prototype.getTileCoordForXYAndResolution_=function(t,e,i,r,s){var l=this.getZForResolution(i),u=i/this.getResolution(l),h=this.getOrigin(l),g=(0,a.toSize)(this.getTileSize(l),this.tmpSize_),f=u*(t-h[0])/i/g[0],_=u*(h[1]-e)/i/g[1];return r?(f=(0,o.ceil)(f,p)-1,_=(0,o.ceil)(_,p)-1):(f=(0,o.floor)(f,p),_=(0,o.floor)(_,p)),(0,n.createOrUpdate)(l,f,_,s)},u.prototype.getTileCoordForXYAndZ_=function(t,e,i,r,s){var l=this.getOrigin(i),u=this.getResolution(i),h=(0,a.toSize)(this.getTileSize(i),this.tmpSize_),g=(t-l[0])/u/h[0],f=(l[1]-e)/u/h[1];return r?(g=(0,o.ceil)(g,p)-1,f=(0,o.ceil)(f,p)-1):(g=(0,o.floor)(g,p),f=(0,o.floor)(f,p)),(0,n.createOrUpdate)(i,g,f,s)},u.prototype.getTileCoordForCoordAndZ=function(t,e,i){return this.getTileCoordForXYAndZ_(t[0],t[1],e,!1,i)},u.prototype.getTileCoordResolution=function(t){return this.resolutions_[t[0]]},u.prototype.getTileSize=function(t){return this.tileSize_?this.tileSize_:this.tileSizes_[t]},u.prototype.getFullTileRange=function(t){return this.fullTileRanges_?this.fullTileRanges_[t]:this.extent_?this.getTileRangeForExtentAndZ(this.extent_,t):null},u.prototype.getZForResolution=function(t,e){var i=(0,l.linearFindNearest)(this.resolutions_,t,e||0);return(0,o.clamp)(i,this.minZoom,this.maxZoom)},u.prototype.tileCoordIntersectsViewport=function(t,e){return(0,s.intersectsLinearRing)(e,0,e.length,2,this.getTileCoordExtent(t))},u.prototype.calculateTileRanges_=function(t){for(var e=this.resolutions_.length,i=new Array(e),o=this.minZoom;o<e;++o)i[o]=this.getTileRangeForExtentAndZ(t,o);this.fullTileRanges_=i},u}(),_=exports.default=f;
482},{"../TileRange.js":"snev","./common.js":"mOEX","../asserts.js":"fLG6","../math.js":"B96G","../extent.js":"QDir","../tilecoord.js":"faTr","../geom/flat/intersectsextent.js":"GZir","../array.js":"luEr","../size.js":"TAHd"}],"ExRx":[function(require,module,exports) {
483"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.createForExtent=l,exports.createForProjection=f,exports.createXYZ=d,exports.extentFromProjection=x,exports.getForProjection=a,exports.wrapX=s;var e=u(require("./tilegrid/TileGrid.js")),t=u(require("./proj/Units.js")),r=require("./tilegrid/common.js"),o=require("./proj.js"),i=require("./extent.js"),n=require("./size.js");
483function u(e){return e&&e.__esModule?e:{default:e}}function a(e){var t=e.getDefaultTileGrid();return t||(t=f(e),e.setDefaultTileGrid(t)),t}function s(e,t,r){var o=t[0],n=e.getTileCoordCenter(t),u=x(r);if((0,i.containsCoordinate)(u,n))return t;var a=(0,i.getWidth)(u),s=Math.ceil((u[0]-n[0])/a);return n[0]+=a*s,e.getTileCoordForCoordAndZ(n,o)}function l(t,r,o,n){var u=void 0!==n?n:"top-left",a=c(t,r,o);return new e.default({extent:t,origin:(0,i.getCorner)(t,u),resolutions:a,tileSize:o})}function d(t){var r=t||{},i=r.extent||(0,o.get)("EPSG:3857").getExtent(),n={extent:i,minZoom:r.minZoom,tileSize:r.tileSize,resolutions:c(i,r.maxZoom,r.tileSize,r.maxResolution)};return new e.default(n)}function c(e,t,o,u){for(var a=void 0!==t?t:r.DEFAULT_MAX_ZOOM,s=(0,i.getHeight)(e),l=(0,i.getWidth)(e),d=(0,n.toSize)(void 0!==o?o:r.DEFAULT_TILE_SIZE),c=u>0?u:Math.max(l/d[0],s/d[1]),f=a+1,x=new Array(f),g=0;g<f;++g)x[g]=c/Math.pow(2,g);return x}function f(e,t,r,o){return l(x(e),t,r,o)}function x(e){var r=(e=(0,o.get)(e)).getExtent();if(!r){var n=180*o.METERS_PER_UNIT[t.default.DEGREES]/e.getMetersPerUnit();r=(0,i.createOrUpdate)(-n,-n,n,n)}return r}
484},{"./tilegrid/TileGrid.js":"dpZ6","./proj/Units.js":"yZx6","./tilegrid/common.js":"mOEX","./proj.js":"Diht","./extent.js":"QDir","./size.js":"TAHd"}],"JECm":[function(require,module,exports) {
485"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.TileSourceEvent=void 0;var t=s(require("../events/Event.js")),e=s(require("./Source.js")),i=s(require("../TileCache.js")),r=s(require("../TileState.js")),o=require("../util.js"),n=require("../asserts.js"),l=require("../proj.js"),u=require("../tilecoord.js"),a=require("../tilegrid.js"),c=require("../size.js");function s(t){return t&&t.__esModule?t:{default:t}}var p=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),h=function(t){function e(e){var r=t.call(this,{attributions:e.attributions,attributionsCollapsible:e.attributionsCollapsible,projection:e.projection,state:e.state,wrapX:e.wrapX,interpolate:e.interpolate})||this;r.on,r.once,r.un,r.opaque_=void 0!==e.opaque&&e.opaque,r.tilePixelRatio_=void 0!==e.tilePixelRatio?e.tilePixelRatio:1,r.tileGrid=void 0!==e.tileGrid?e.tileGrid:null;return r.tileGrid&&(0,c.toSize)(r.tileGrid.getTileSize(r.tileGrid.getMinZoom()),[256,256]),r.tileCache=new i.default(e.cacheSize||0),r.tmpSize=[0,0],r.key_=e.key||"",r.tileOptions={transition:e.transition,interpolate:e.interpolate},r.zDirection=e.zDirection?e.zDirection:0,r}return p(e,t),e.prototype.canExpireCache=function(){return this.tileCache.canExpireCache()},e.prototype.expireCache=function(t,e){var i=this.getTileCacheForProjection(t);i&&i.expireCache(e)},e.prototype.forEachLoadedTile=function(t,e,i,o){var n=this.getTileCacheForProjection(t);if(!n)return!1;for(var l,a,c,s=!0,p=i.minX;p<=i.maxX;++p)for(var h=i.minY;h<=i.maxY;++h)a=(0,u.getKeyZXY)(e,p,h),c=!1,n.containsKey(a)&&(c=(l=n.get(a)).getState()===r.default.LOADED)&&(c=!1!==o(l)),c||(s=!1);return s},e.prototype.getGutterForProjection=function(t){return 0},e.prototype.getKey=function(){return this.key_},e.prototype.setKey=function(t){this.key_!==t&&(this.key_=t,this.changed())},e.prototype.getOpaque=function(t){return this.opaque_},e.prototype.getResolutions=function(){return this.tileGrid?this.tileGrid.getResolutions():null},e.prototype.getTile=function(t,e,i,r,n){return(0,o.abstract)()},e.prototype.getTileGrid=function(){return this.tileGrid},e.prototype.getTileGridForProjection=function(t){return this.tileGrid?this.tileGrid:(0,a.getForProjection)(t)},e.prototype.getTileCacheForProjection=function(t){var e=this.getProjection();return(0,n.assert)(null===e||(0,l.equivalent)(e,t),68),this.tileCache},e.prototype.getTilePixelRatio=function(t){return this.tilePixelRatio_}
485,e.prototype.getTilePixelSize=function(t,e,i){var r=this.getTileGridForProjection(i),o=this.getTilePixelRatio(e),n=(0,c.toSize)(r.getTileSize(t),this.tmpSize);return 1==o?n:(0,c.scale)(n,o,this.tmpSize)},e.prototype.getTileCoordForTileUrlFunction=function(t,e){var i=void 0!==e?e:this.getProjection(),r=this.getTileGridForProjection(i);return this.getWrapX()&&i.isGlobal()&&(t=(0,a.wrapX)(r,t,i)),(0,u.withinExtentAndZ)(t,r)?t:null},e.prototype.clear=function(){this.tileCache.clear()},e.prototype.refresh=function(){this.clear(),t.prototype.refresh.call(this)},e.prototype.updateCacheSize=function(t,e){var i=this.getTileCacheForProjection(e);t>i.highWaterMark&&(i.highWaterMark=t)},e.prototype.useTile=function(t,e,i,r){},e}(e.default),f=exports.TileSourceEvent=function(t){function e(e,i){var r=t.call(this,e)||this;return r.tile=i,r}return p(e,t),e}(t.default),d=exports.default=h;
486},{"../events/Event.js":"fKNg","./Source.js":"H38a","../TileCache.js":"YFDe","../TileState.js":"Xz9x","../util.js":"KniQ","../asserts.js":"fLG6","../proj.js":"Diht","../tilecoord.js":"faTr","../tilegrid.js":"ExRx","../size.js":"TAHd"}],"p1vZ":[function(require,module,exports) {
487"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.createFromTemplate=n,exports.createFromTemplates=o,exports.createFromTileUrlFunctions=a,exports.expandUrl=u,exports.nullTileUrlFunction=i;var r=require("./asserts.js"),e=require("./math.js"),t=require("./tilecoord.js");function n(e,t){var n=/\{z\}/g,o=/\{x\}/g,a=/\{y\}/g,i=/\{-y\}/g;return function(u,c,l){return u?e.replace(n,u[0].toString()).replace(o,u[1].toString()).replace(a,u[2].toString()).replace(i,function(){var e=u[0],n=t.getFullTileRange(e);return(0,r.assert)(n,55),(n.getHeight()-u[2]-1).toString()}):void 0}}function o(r,e){for(var t=r.length,o=new Array(t),i=0;i<t;++i)o[i]=n(r[i],e);return a(o)}function a(r){return 1===r.length?r[0]:function(n,o,a){if(n){var i=(0,t.hash)(n),u=(0,e.modulo)(i,r.length);return r[u](n,o,a)}}}function i(r,e,t){}function u(r){var e=[],t=/\{([a-z])-([a-z])\}/.exec(r);if(t){var n=t[1].charCodeAt(0),o=t[2].charCodeAt(0),a=void 0;for(a=n;a<=o;++a)e.push(r.replace(t[0],String.fromCharCode(a)));return e}if(t=/\{(\d+)-(\d+)\}/.exec(r)){for(var i=parseInt(t[2],10),u=parseInt(t[1],10);u<=i;u++)e.push(r.replace(t[0],u.toString()));return e}return e.push(r),e}
488},{"./asserts.js":"fLG6","./math.js":"B96G","./tilecoord.js":"faTr"}],"uv9E":[function(require,module,exports) {
489"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=s(require("./TileEventType.js")),e=u(require("./Tile.js")),i=s(require("../TileState.js")),n=require("../tileurlfunction.js"),r=require("../tilecoord.js"),o=require("../util.js");function l(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,i=new WeakMap;return(l=function(t){return t?i:e})(t)}function u(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=typeof t&&"function"!=typeof t)return{default:t};var i=l(e);if(i&&i.has(t))return i.get(t);var n={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if("default"!==o&&{}.hasOwnProperty.call(t,o)){var u=r?Object.getOwnPropertyDescriptor(t,o):null;u&&(u.get||u.set)?Object.defineProperty(n,o,u):n[o]=t[o]}return n.default=t,i&&i.set(t,n),n}function s(t){return t&&t.__esModule?t:{default:t}}var a=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),c=function(l){function u(t){var e=l.call(this,{attributions:t.attributions,cacheSize:t.cacheSize,opaque:t.opaque,projection:t.projection,state:t.state,tileGrid:t.tileGrid,tilePixelRatio:t.tilePixelRatio,wrapX:t.wrapX,transition:t.transition,interpolate:t.interpolate,key:t.key,attributionsCollapsible:t.attributionsCollapsible,zDirection:t.zDirection})||this;return e.generateTileUrlFunction_=e.tileUrlFunction===u.prototype.tileUrlFunction,e.tileLoadFunction=t.tileLoadFunction,t.tileUrlFunction&&(e.tileUrlFunction=t.tileUrlFunction),e.urls=null,t.urls?e.setUrls(t.urls):t.url&&e.setUrl(t.url),e.tileLoadingKeys_={},e}return a(u,l),u.prototype.getTileLoadFunction=function(){return this.tileLoadFunction},u.prototype.getTileUrlFunction=function(){return Object.getPrototypeOf(this).tileUrlFunction===this.tileUrlFunction?this.tileUrlFunction.bind(this):this.tileUrlFunction},u.prototype.getUrls=function(){return this.urls},u.prototype.handleTileChange=function(n){var r,l=n.target,u=(0,o.getUid)(l),s=l.getState();s==i.default.LOADING?(this.tileLoadingKeys_[u]=!0,r=t.default.TILELOADSTART):u in this.tileLoadingKeys_&&(delete this.tileLoadingKeys_[u],r=s==i.default.ERROR?t.default.TILELOADERROR:s==i.default.LOADED?t.default.TILELOADEND:void 0),null!=r&&this.dispatchEvent(new e.TileSourceEvent(r,l))},u.prototype.setTileLoadFunction=function(t){this.tileCache.clear(),this.tileLoadFunction=t,this.changed()},u.prototype.setTileUrlFunction=function(t,e){this.tileUrlFunction=t,this.tileCache.pruneExceptNewestZ(),void 0!==e?this.setKey(e):this.changed()},u.prototype.setUrl=function(t){var e=(0,n.expandUrl)(t);this.urls=e,this.setUrls(e)},u.prototype.setUrls=function(t){this.urls=t;var e=t.join("\n");this.generateTileUrlFunction_?this.setTileUrlFunction((0,n.createFromTemplates)(t,this.tileGrid),e):this.setKey(e)}
489,u.prototype.tileUrlFunction=function(t,e,i){},u.prototype.useTile=function(t,e,i){var n=(0,r.getKeyZXY)(t,e,i);this.tileCache.containsKey(n)&&this.tileCache.get(n)},u}(e.default),p=exports.default=c;
490},{"./TileEventType.js":"KXhD","./Tile.js":"JECm","../TileState.js":"Xz9x","../tileurlfunction.js":"p1vZ","../tilecoord.js":"faTr","../util.js":"KniQ"}],"udAI":[function(require,module,exports) {
491"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=u(require("../events/EventType.js")),t=u(require("../ImageTile.js")),i=u(require("../reproj/Tile.js")),r=u(require("../TileCache.js")),o=u(require("../TileState.js")),n=u(require("./UrlTile.js")),l=require("../reproj/common.js"),c=require("../proj.js"),a=require("../tilecoord.js"),s=require("../tilegrid.js"),h=require("../util.js");function u(e){return e&&e.__esModule?e:{default:e}}var p=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),d=function(n){function u(e){var i=this,r=void 0===e.imageSmoothing||e.imageSmoothing;return void 0!==e.interpolate&&(r=e.interpolate),(i=n.call(this,{attributions:e.attributions,cacheSize:e.cacheSize,opaque:e.opaque,projection:e.projection,state:e.state,tileGrid:e.tileGrid,tileLoadFunction:e.tileLoadFunction?e.tileLoadFunction:g,tilePixelRatio:e.tilePixelRatio,tileUrlFunction:e.tileUrlFunction,url:e.url,urls:e.urls,wrapX:e.wrapX,transition:e.transition,interpolate:r,key:e.key,attributionsCollapsible:e.attributionsCollapsible,zDirection:e.zDirection})||this).crossOrigin=void 0!==e.crossOrigin?e.crossOrigin:null,i.tileClass=void 0!==e.tileClass?e.tileClass:t.default,i.tileCacheForProjection={},i.tileGridForProjection={},i.reprojectionErrorThreshold_=e.reprojectionErrorThreshold,i.renderReprojectionEdges_=!1,i}return p(u,n),u.prototype.canExpireCache=function(){if(!l.ENABLE_RASTER_REPROJECTION)return n.prototype.canExpireCache.call(this);if(this.tileCache.canExpireCache())return!0;for(var e in this.tileCacheForProjection)if(this.tileCacheForProjection[e].canExpireCache())return!0;return!1},u.prototype.expireCache=function(e,t){if(l.ENABLE_RASTER_REPROJECTION){var i=this.getTileCacheForProjection(e);for(var r in this.tileCache.expireCache(this.tileCache==i?t:{}),this.tileCacheForProjection){var o=this.tileCacheForProjection[r];o.expireCache(o==i?t:{})}}else n.prototype.expireCache.call(this,e,t)},u.prototype.getGutterForProjection=function(e){return l.ENABLE_RASTER_REPROJECTION&&this.getProjection()&&e&&!(0,c.equivalent)(this.getProjection(),e)?0:this.getGutter()},u.prototype.getGutter=function(){return 0},u.prototype.getKey=function(){var e=n.prototype.getKey.call(this);return this.getInterpolate()||(e+=":disable-interpolation"),e},u.prototype.getOpaque=function(e){return!(l.ENABLE_RASTER_REPROJECTION&&this.getProjection()&&e&&!(0,c.equivalent)(this.getProjection(),e))&&n.prototype.getOpaque.call(this,e)},u.prototype.getTileGridForProjection=function(e){if(!l.ENABLE_RASTER_REPROJECTION)return n.prototype.getTileGridForProjection.call(this,e);var t=this.getProjection();if(!this.tileGrid||t&&!(0,c.equivalent)(t,e)){var i=(0,h.getUid)(e);return i in this.tileGridForProjection||(this.tileGridForProjection[i]=(0,s.getForProjection)(e)),this.tileGridForProjection[i]}return this.tileGrid},u.prototype.getTileCacheForProjection=function(e){if(!l.ENABLE_RASTER_REPROJECTION)return n.prototype.getTileCacheForProjection.call(this,e);var t=this.getProjection();if(!t||(0,c.equivalent)(t,e))return this.tileCache;var i=(0,h.getUid)(e);return i in this.tileCacheForProjection||(this.tileCacheForProjection[i]=new r.default(this.tileCache.highWaterMark)),this.tileCacheForProjection[i]},u.prototype.createTile_=function(t,i,r,n,l,c){var a=[t,i,r],s=this.getTileCoordForTileUrlFunction(a,l),h=s?this.tileUrlFunction(s,n,l):void 0,u=new this.tileClass(a,void 0!==h?o.default.IDLE:o.default.EMPTY,void 0!==h?h:"",this.crossOrigin,this.tileLoadFunction,this.tileOptions);return u.key=c,u.addEventListener(e.default.CHANGE,this.handleTileChange.bind(this)),u},u.prototype.getTile=function(e,t,r,o,n){var s=this.getProjection();if(l.ENABLE_RASTER_REPROJECTION&&s&&n&&!(0,c.equivalent)(s,n)){var h=this.getTileCacheForProjection(n),u=[e,t,r],p=void 0,d=(0,a.getKey)(u);h.containsKey(d)&&(p=h.get(d));var g=this.getKey();if(p&&p.key==g)return p;var E=this.getTileGridForProjection(s),f=this.getTileGridForProjection(n),j=this.getTileCoordForTileUrlFunction(u,n),T=new i.default(s,E,n,f,u,j,this.getTilePixelRatio(o),this.getGutter(),function(e,t,i,r){return this.getTileInternal(e,t,i,r,s)}.bind(this),this.reprojectionErrorThreshold_,this.renderReprojectionEdges_,this.getInterpolate());return T.key=g,p?(T.interimTile=p,T.refreshInterimChain(),h.replace(d,T)):h.set(d,T),T}return this.getTileInternal(e,t,r,o,s||n)},u.prototype.getTileInternal=function(e,t,i,r,n){var l=null,c=(0,a.getKeyZXY)(e,t,i),s=this.getKey();if(this.tileCache.containsKey(c)){if((l=this.tileCache.get(c)).key!=s){var h=l;
491l=this.createTile_(e,t,i,r,n,s),h.getState()==o.default.IDLE?l.interimTile=h.interimTile:l.interimTile=h,l.refreshInterimChain(),this.tileCache.replace(c,l)}}else l=this.createTile_(e,t,i,r,n,s),this.tileCache.set(c,l);return l},u.prototype.setRenderReprojectionEdges=function(e){if(l.ENABLE_RASTER_REPROJECTION&&this.renderReprojectionEdges_!=e){for(var t in this.renderReprojectionEdges_=e,this.tileCacheForProjection)this.tileCacheForProjection[t].clear();this.changed()}},u.prototype.setTileGridForProjection=function(e,t){if(l.ENABLE_RASTER_REPROJECTION){var i=(0,c.get)(e);if(i){var r=(0,h.getUid)(i);r in this.tileGridForProjection||(this.tileGridForProjection[r]=t)}}},u}(n.default);function g(e,t){e.getImage().src=t}var E=exports.default=d;
492},{"../events/EventType.js":"C8cu","../ImageTile.js":"TOsW","../reproj/Tile.js":"WlOd","../TileCache.js":"YFDe","../TileState.js":"Xz9x","./UrlTile.js":"uv9E","../reproj/common.js":"fF5X","../proj.js":"Diht","../tilecoord.js":"faTr","../tilegrid.js":"ExRx","../util.js":"KniQ"}],"knlU":[function(require,module,exports) {
493"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=e(require("./TileImage.js")),o=require("../tilegrid.js");function e(t){return t&&t.__esModule?t:{default:t}}var r=function(){var t=function(o,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,o){t.__proto__=o}||function(t,o){for(var e in o)Object.prototype.hasOwnProperty.call(o,e)&&(t[e]=o[e])})(o,e)};return function(o,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=o}t(o,e),o.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),i=function(t){function e(e){var r=this,i=e||{},n=void 0===i.imageSmoothing||i.imageSmoothing;void 0!==i.interpolate&&(n=i.interpolate);var u=void 0!==i.projection?i.projection:"EPSG:3857",l=void 0!==i.tileGrid?i.tileGrid:(0,o.createXYZ)({extent:(0,o.extentFromProjection)(u),maxResolution:i.maxResolution,maxZoom:i.maxZoom,minZoom:i.minZoom,tileSize:i.tileSize});return(r=t.call(this,{attributions:i.attributions,cacheSize:i.cacheSize,crossOrigin:i.crossOrigin,interpolate:n,opaque:i.opaque,projection:u,reprojectionErrorThreshold:i.reprojectionErrorThreshold,tileGrid:l,tileLoadFunction:i.tileLoadFunction,tilePixelRatio:i.tilePixelRatio,tileUrlFunction:i.tileUrlFunction,url:i.url,urls:i.urls,wrapX:void 0===i.wrapX||i.wrapX,transition:i.transition,attributionsCollapsible:i.attributionsCollapsible,zDirection:i.zDirection})||this).gutter_=void 0!==i.gutter?i.gutter:0,r}return r(e,t),e.prototype.getGutter=function(){return this.gutter_},e}(t.default),n=exports.default=i;
494},{"./TileImage.js":"udAI","../tilegrid.js":"ExRx"}],"Rmo4":[function(require,module,exports) {
495"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.ATTRIBUTION=void 0;var t=o(require("./XYZ.js"));function o(t){return t&&t.__esModule?t:{default:t}}var r=function(){var t=function(o,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,o){t.__proto__=o}||function(t,o){for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(t[r]=o[r])})(o,r)};return function(o,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function e(){this.constructor=o}t(o,r),o.prototype=null===r?Object.create(r):(e.prototype=r.prototype,new e)}}(),e=exports.ATTRIBUTION='&#169; <a href="https://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a> contributors.',n=function(t){function o(o){var r,n=o||{},i=void 0===n.imageSmoothing||n.imageSmoothing;void 0!==n.interpolate&&(i=n.interpolate),r=void 0!==n.attributions?n.attributions:[e];var a=void 0!==n.crossOrigin?n.crossOrigin:"anonymous",u=void 0!==n.url?n.url:"https://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png";return t.call(this,{attributions:r,attributionsCollapsible:!1,cacheSize:n.cacheSize,crossOrigin:a,interpolate:i,maxZoom:void 0!==n.maxZoom?n.maxZoom:19,opaque:void 0===n.opaque||n.opaque,reprojectionErrorThreshold:n.reprojectionErrorThreshold,tileLoadFunction:n.tileLoadFunction,transition:n.transition,url:u,wrapX:n.wrapX,zDirection:n.zDirection})||this}return r(o,t),o}(t.default),i=exports.default=n;
496},{"./XYZ.js":"knlU"}],"ehVO":[function(require,module,exports) {
497"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=n(require("./XYZ.js")),o=require("./OSM.js");
497function n(e){return e&&e.__esModule?e:{default:e}}var t=function(){var e=function(o,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,o){e.__proto__=o}||function(e,o){for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])})(o,n)};return function(o,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function t(){this.constructor=o}e(o,n),o.prototype=null===n?Object.create(n):(t.prototype=n.prototype,new t)}}(),r=['Map tiles by <a href="https://stamen.com/" target="_blank">Stamen Design</a>, under <a href="https://creativecommons.org/licenses/by/3.0/" target="_blank">CC BY 3.0</a>.',o.ATTRIBUTION],i={terrain:{extension:"jpg",opaque:!0},"terrain-background":{extension:"jpg",opaque:!0},"terrain-labels":{extension:"png",opaque:!1},"terrain-lines":{extension:"png",opaque:!1},"toner-background":{extension:"png",opaque:!0},toner:{extension:"png",opaque:!0},"toner-hybrid":{extension:"png",opaque:!1},"toner-labels":{extension:"png",opaque:!1},"toner-lines":{extension:"png",opaque:!1},"toner-lite":{extension:"png",opaque:!0},watercolor:{extension:"jpg",opaque:!0}},a={terrain:{minZoom:0,maxZoom:18},toner:{minZoom:0,maxZoom:20},watercolor:{minZoom:0,maxZoom:18}},s=function(e){function o(o){var n=void 0===o.imageSmoothing||o.imageSmoothing;void 0!==o.interpolate&&(n=o.interpolate);var t=o.layer.indexOf("-"),s=-1==t?o.layer:o.layer.slice(0,t),u=a[s],l=i[o.layer],p=void 0!==o.url?o.url:"https://stamen-tiles-{a-d}.a.ssl.fastly.net/"+o.layer+"/{z}/{x}/{y}."+l.extension;return e.call(this,{attributions:r,cacheSize:o.cacheSize,crossOrigin:"anonymous",interpolate:n,maxZoom:null!=o.maxZoom?o.maxZoom:u.maxZoom,minZoom:null!=o.minZoom?o.minZoom:u.minZoom,opaque:l.opaque,reprojectionErrorThreshold:o.reprojectionErrorThreshold,tileLoadFunction:o.tileLoadFunction,transition:o.transition,url:p,wrapX:o.wrapX,zDirection:o.zDirection})||this}return t(o,e),o}(e.default),u=exports.default=s;
498},{"./XYZ.js":"knlU","./OSM.js":"Rmo4"}],"M5pz":[function(require,module,exports) {
499"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=exports.default={PRELOAD:"preload",USE_INTERIM_TILES_ON_ERROR:"useInterimTilesOnError"};
500},{}],"HTO1":[function(require,module,exports) {
501"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=o(require("./Layer.js")),e=o(require("./TileProperty.js")),r=require("../obj.js");function o(t){return t&&t.__esModule?t:{default:t}}var n=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function o(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),i=function(t){function o(e){var o=this,n=e||{},i=(0,r.assign)({},n);return delete i.preload,delete i.useInterimTilesOnError,(o=t.call(this,i)||this).on,o.once,o.un,o.setPreload(void 0!==n.preload?n.preload:0),o.setUseInterimTilesOnError(void 0===n.useInterimTilesOnError||n.useInterimTilesOnError),o}return n(o,t),o.prototype.getPreload=function(){return this.get(e.default.PRELOAD)},o.prototype.setPreload=function(t){this.set(e.default.PRELOAD,t)},o.prototype.getUseInterimTilesOnError=function(){return this.get(e.default.USE_INTERIM_TILES_ON_ERROR)},o.prototype.setUseInterimTilesOnError=function(t){this.set(e.default.USE_INTERIM_TILES_ON_ERROR,t)},o.prototype.getData=function(e){return t.prototype.getData.call(this,e)},o}(t.default),s=exports.default=i;
502},{"./Layer.js":"GCgv","./TileProperty.js":"M5pz","../obj.js":"mH6q"}],"hkMV":[function(require,module,exports) {
503"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=p(require("./Layer.js")),t=p(require("../../ImageTile.js")),r=p(require("../../reproj/Tile.js")),i=p(require("../../TileRange.js")),o=p(require("../../TileState.js")),n=require("./common.js"),a=require("../../transform.js"),s=require("../../obj.js"),l=require("../../extent.js"),d=require("../../proj.js"),u=require("../../util.js"),g=require("../../array.js"),h=require("../../size.js");
503function p(e){return e&&e.__esModule?e:{default:e}}var c=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),f=function(e){function p(t){var r=e.call(this,t)||this;return r.extentChanged=!0,r.renderedExtent_=null,r.renderedPixelRatio,r.renderedProjection=null,r.renderedRevision,r.renderedTiles=[],r.newTiles_=!1,r.tmpExtent=(0,l.createEmpty)(),r.tmpTileRange_=new i.default(0,0,0,0),r}return c(p,e),p.prototype.isDrawableTile=function(e){var t=this.getLayer(),r=e.getState(),i=t.getUseInterimTilesOnError();return r==o.default.LOADED||r==o.default.EMPTY||r==o.default.ERROR&&!i},p.prototype.getTile=function(e,t,r,i){var n=i.pixelRatio,a=i.viewState.projection,s=this.getLayer(),l=s.getSource().getTile(e,t,r,n,a);return l.getState()==o.default.ERROR&&(s.getUseInterimTilesOnError()?s.getPreload()>0&&(this.newTiles_=!0):l.setState(o.default.LOADED)),this.isDrawableTile(l)||(l=l.getInterimTile()),l},p.prototype.getData=function(e){var i=this.frameState;if(!i)return null;var n=this.getLayer(),s=(0,a.apply)(i.pixelToCoordinateTransform,e.slice()),d=n.getExtent();if(d&&!(0,l.containsCoordinate)(d,s))return null;for(var u=i.pixelRatio,g=i.viewState.projection,p=i.viewState,c=n.getRenderSource(),f=c.getTileGridForProjection(p.projection),T=c.getTilePixelRatio(i.pixelRatio),v=f.getZForResolution(p.resolution);v>=f.getMinZoom();--v){var m=f.getTileCoordForCoordAndZ(s,v),x=c.getTile(v,m[1],m[2],u,g);if(!(x instanceof t.default||x instanceof r.default))return null;if(x.getState()===o.default.LOADED){var y=f.getOrigin(v),R=(0,h.toSize)(f.getTileSize(v)),w=f.getResolution(v),S=Math.floor(T*((s[0]-y[0])/w-m[1]*R[0])),j=Math.floor(T*((y[1]-s[1])/w-m[2]*R[1])),E=Math.round(T*c.getGutterForProjection(p.projection));return this.getImageData(x.getImage(),S+E,j+E)}}return null},p.prototype.loadedTileCallback=function(t,r,i){return!!this.isDrawableTile(i)&&e.prototype.loadedTileCallback.call(this,t,r,i)},p.prototype.prepareFrame=function(e){return!!this.getLayer().getSource()},p.prototype.renderFrame=function(e,t){var r=e.layerStatesArray[e.layerIndex],i=e.viewState,h=i.projection,p=i.resolution,c=i.center,f=i.rotation,T=e.pixelRatio,v=this.getLayer(),m=v.getSource(),x=m.getRevision(),y=m.getTileGridForProjection(h),R=y.getZForResolution(p,m.zDirection),w=y.getResolution(R),S=e.extent,j=e.viewState.resolution,E=m.getTilePixelRatio(T),C=Math.round((0,l.getWidth)(S)/j*T),_=Math.round((0,l.getHeight)(S)/j*T),I=r.extent&&(0,d.fromUserExtent)(r.extent,h);I&&(S=(0,l.getIntersection)(S,(0,d.fromUserExtent)(r.extent,h)));var O=w*C/2/E,P=w*_/2/E,A=[c[0]-O,c[1]-P,c[0]+O,c[1]+P],D=y.getTileRangeForExtentAndZ(S,R),b={};b[R]={};var M=this.createLoadedTileFinder(m,h,b),q=this.tmpExtent,F=this.tmpTileRange_;this.newTiles_=!1;for(var L=f?(0,l.getRotatedViewport)(i.center,j,f,e.size):void 0,U=D.minX;U<=D.maxX;++U)for(var z=D.minY;z<=D.maxY;++z)if(!f||y.tileCoordIntersectsViewport([R,U,z],L)){var G=this.getTile(R,U,z,e);if(this.isDrawableTile(G)){var Z=(0,u.getUid)(this);if(G.getState()==o.default.LOADED)b[R][G.tileCoord.toString()]=G,(ue=G.inTransition(Z))&&1!==r.opacity&&(G.endTransition(Z),ue=!1),this.newTiles_||!ue&&-1!==this.renderedTiles.indexOf(G)||(this.newTiles_=!0);if(1===G.getAlpha(Z,e.time))continue}var k=y.getTileCoordChildTileRange(G.tileCoord,F,q),Y=!1;k&&(Y=M(R+1,k)),Y||y.forEachTileCoordParentTileRange(G.tileCoord,M,F,q)}var K=w/p*T/E;(0,a.compose)(this.pixelTransform,e.size[0]/2,e.size[1]/2,1/T,1/T,f,-C/2,-_/2);var N=(0,a.toString)(this.pixelTransform);this.useContainer(t,N,this.getBackground(e));var V=this.context,X=V.canvas;(0,a.makeInverse)(this.inversePixelTransform,this.pixelTransform),(0,a.compose)(this.tempTransform,C/2,_/2,K,K,0,-C/2,-_/2),X.width!=C||X.height!=_?(X.width=C,X.height=_):this.containerReused||V.clearRect(0,0,C,_),I&&this.clipUnrotated(V,e,I),m.getInterpolate()||(0,s.assign)(V,n.IMAGE_SMOOTHING_DISABLED),this.preRender(V,e),this.renderedTiles.length=0;var B,H,Q,W=Object.keys(b).map(Number);W.sort(g.numberSafeCompareFunction),1!==r.opacity||this.containerReused&&!m.getOpaque(e.viewState.projection)?(B=[],H=[]):W=W.reverse();for(var J=W.length-1;J>=0;--J){var $=W[J],ee=m.getTilePixelSize($,T,h),te=y.getResolution($)/w,re=ee[0]*te*K,ie=ee[1]*te*K,oe=y.getTileCoordForCoordAndZ((0,l.getTopLeft)(A),$),ne=y.getTileCoordExtent(oe),ae=(0,a.apply)(this.tempTransform,[E*(ne[0]-A[0])/w,E*(A[3]-ne[3])/w]),se=E*m.getGutterForProjection(h),le=b[$];for(var de in le){var ue,ge=(G=le[de]).tileCoord,he=oe[1]-ge[1],pe=Math.round(ae[0]-(he
503-1)*re),ce=oe[2]-ge[2],fe=Math.round(ae[1]-(ce-1)*ie),Te=pe-(U=Math.round(ae[0]-he*re)),ve=fe-(z=Math.round(ae[1]-ce*ie)),me=R===$,xe=!1;if(!(ue=me&&1!==G.getAlpha((0,u.getUid)(this),e.time)))if(B){Q=[U,z,U+Te,z,U+Te,z+ve,U,z+ve];for(var ye=0,Re=B.length;ye<Re;++ye)if(R!==$&&$<H[ye]){var we=B[ye];(0,l.intersects)([U,z,U+Te,z+ve],[we[0],we[3],we[4],we[7]])&&(xe||(V.save(),xe=!0),V.beginPath(),V.moveTo(Q[0],Q[1]),V.lineTo(Q[2],Q[3]),V.lineTo(Q[4],Q[5]),V.lineTo(Q[6],Q[7]),V.moveTo(we[6],we[7]),V.lineTo(we[4],we[5]),V.lineTo(we[2],we[3]),V.lineTo(we[0],we[1]),V.clip())}B.push(Q),H.push($)}else V.clearRect(U,z,Te,ve);this.drawTileImage(G,e,U,z,Te,ve,se,me),B&&!ue?(xe&&V.restore(),this.renderedTiles.unshift(G)):this.renderedTiles.push(G),this.updateUsedTiles(e.usedTiles,m,G)}}return this.renderedRevision=x,this.renderedResolution=w,this.extentChanged=!this.renderedExtent_||!(0,l.equals)(this.renderedExtent_,A),this.renderedExtent_=A,this.renderedPixelRatio=T,this.renderedProjection=h,this.manageTilePyramid(e,m,y,T,h,S,R,v.getPreload()),this.scheduleExpireCache(e,m),this.postRender(V,e),r.extent&&V.restore(),(0,s.assign)(V,n.IMAGE_SMOOTHING_ENABLED),N!==X.style.transform&&(X.style.transform=N),this.container},p.prototype.drawTileImage=function(e,t,r,i,o,n,a,s){var l=this.getTileImage(e);if(l){var d=(0,u.getUid)(this),g=t.layerStatesArray[t.layerIndex],h=g.opacity*(s?e.getAlpha(d,t.time):1),p=h!==this.context.globalAlpha;p&&(this.context.save(),this.context.globalAlpha=h),this.context.drawImage(l,a,a,l.width-2*a,l.height-2*a,r,i,o,n),p&&this.context.restore(),h!==g.opacity?t.animate=!0:s&&e.endTransition(d)}},p.prototype.getImage=function(){var e=this.context;return e?e.canvas:null},p.prototype.getTileImage=function(e){return e.getImage()},p.prototype.scheduleExpireCache=function(e,t){if(t.canExpireCache()){var r=function(e,t,r){var i=(0,u.getUid)(e);i in r.usedTiles&&e.expireCache(r.viewState.projection,r.usedTiles[i])}.bind(null,t);e.postRenderFunctions.push(r)}},p.prototype.updateUsedTiles=function(e,t,r){var i=(0,u.getUid)(t);i in e||(e[i]={}),e[i][r.getKey()]=!0},p.prototype.manageTilePyramid=function(e,t,r,i,n,a,s,d,g){var h=(0,u.getUid)(t);h in e.wantedTiles||(e.wantedTiles[h]={});var p,c,f,T,v,m,x=e.wantedTiles[h],y=e.tileQueue,R=r.getMinZoom(),w=e.viewState.rotation,S=w?(0,l.getRotatedViewport)(e.viewState.center,e.viewState.resolution,w,e.size):void 0,j=0;for(m=R;m<=s;++m)for(c=r.getTileRangeForExtentAndZ(a,m,c),f=r.getResolution(m),T=c.minX;T<=c.maxX;++T)for(v=c.minY;v<=c.maxY;++v)w&&!r.tileCoordIntersectsViewport([m,T,v],S)||(s-m<=d?(++j,(p=t.getTile(m,T,v,i,n)).getState()==o.default.IDLE&&(x[p.getKey()]=!0,y.isKeyQueued(p.getKey())||y.enqueue([p,h,r.getTileCoordCenter(p.tileCoord),f])),void 0!==g&&g(p)):t.useTile(m,T,v,n));t.updateCacheSize(j,n)},p}(e.default),T=exports.default=f;
504},{"./Layer.js":"vPfl","../../ImageTile.js":"TOsW","../../reproj/Tile.js":"WlOd","../../TileRange.js":"snev","../../TileState.js":"
504Xz9x","./common.js":"wFjK","../../transform.js":"P4eA","../../obj.js":"mH6q","../../extent.js":"QDir","../../proj.js":"Diht","../../util.js":"KniQ","../../array.js":"luEr","../../size.js":"TAHd"}],"BUEc":[function(require,module,exports) {
505"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=r(require("./BaseTile.js")),e=r(require("../renderer/canvas/TileLayer.js"));function r(t){return t&&t.__esModule?t:{default:t}}var n=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),o=function(t){function r(e){return t.call(this,e)||this}return n(r,t),r.prototype.createRenderer=function(){return new e.default(this)},r}(t.default),u=exports.default=o;
506},{"./BaseTile.js":"HTO1","../renderer/canvas/TileLayer.js":"hkMV"}],"TDA1":[function(require,module,exports) {
507"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.DEFAULT_VERSION=void 0;var e=exports.DEFAULT_VERSION="1.3.0";
508},{}],"n7G7":[function(require,module,exports) {
509"use strict";function e(e,n){var o=[];Object.keys(n).forEach(function(e){null!==n[e]&&void 0!==n[e]&&o.push(e+"="+encodeURIComponent(n[e]))});var r=o.join("&");return(e=-1===(e=e.replace(/[?&]$/,"")).indexOf("?")?e+"?":e+"&")+r}Object.defineProperty(exports,"__esModule",{value:!0}),exports.appendParams=e;
510},{}],"IcO7":[function(require,module,exports) {
511"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=c(require("./TileImage.js")),e=require("./wms.js"),r=require("../uri.js"),i=require("../asserts.js"),o=require("../obj.js"),s=require("../extent.js"),n=require("../size.js"),a=require("../reproj.js"),u=require("../string.js"),p=require("../proj.js"),l=require("../math.js"),h=require("../tilecoord.js");function c(t){return t&&t.__esModule?t:{default:t}}var g=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),_=function(t){function c(e){var r=this,i=e||{},o=void 0===i.imageSmoothing||i.imageSmoothing;void 0!==i.interpolate&&(o=i.interpolate);var n=i.params||{},a=!("TRANSPARENT"in n)||n.TRANSPARENT;return(r=t.call(this,{attributions:i.attributions,attributionsCollapsible:i.attributionsCollapsible,cacheSize:i.cacheSize,crossOrigin:i.crossOrigin,interpolate:o,opaque:!a,projection:i.projection,reprojectionErrorThreshold:i.reprojectionErrorThreshold,tileClass:i.tileClass,tileGrid:i.tileGrid,tileLoadFunction:i.tileLoadFunction,url:i.url,urls:i.urls,wrapX:void 0===i.wrapX||i.wrapX,transition:i.transition,zDirection:i.zDirection})||this).gutter_=void 0!==i.gutter?i.gutter:0,r.params_=n,r.v13_=!0,r.serverType_=i.serverType,r.hidpi_=void 0===i.hidpi||i.hidpi,r.tmpExtent_=(0,s.createEmpty)(),r.updateV13_(),r.setKey(r.getKeyForParams_()),r}return g(c,t),c.prototype.getFeatureInfoUrl=function(t,r,i,u){var l=(0,p.get)(i),h=this.getProjection(),c=this.getTileGrid();c||(c=this.getTileGridForProjection(l));var g=c.getZForResolution(r,this.zDirection),_=c.getTileCoordForCoordAndZ(t,g);if(!(c.getResolutions().length<=_[0])){var f=c.getResolution(_[0]),d=c.getTileCoordExtent(_,this.tmpExtent_),v=(0,n.toSize)(c.getTileSize(_[0]),this.tmpSize),S=this.gutter_;0!==S&&(v=(0,n.buffer)(v,S,this.tmpSize),d=(0,s.buffer)(d,f*S,d)),h&&h!==l&&(f=(0,a.calculateSourceResolution)(h,l,t,f),d=(0,p.transformExtent)(d,l,h),t=(0,p.transform)(t,l,h));var E={SERVICE:"WMS",VERSION:e.DEFAULT_VERSION,REQUEST:"GetFeatureInfo",FORMAT:"image/png",TRANSPARENT:!0,QUERY_LAYERS:this.params_.LAYERS};(0,o.assign)(E,this.params_,u);var T=Math.floor((t[0]-d[0])/f),R=Math.floor((d[3]-t[1])/f);return E[this.v13_?"I":"X"]=T,E[this.v13_?"J":"Y"]=R,this.getRequestUrl_(_,v,d,1,h||l,E)}},c.prototype.getLegendUrl=function(t,i){if(void 0!==this.urls[0]){var s={SERVICE:"WMS",VERSION:e.DEFAULT_VERSION,REQUEST:"GetLegendGraphic",FORMAT:"image/png"};if(void 0===i||void 0===i.LAYER){var n=this.params_.LAYERS;if(!(!Array.isArray(n)||1===n.length))return;s.LAYER=n}if(void 0!==t){var a=this.getProjection()?this.getProjection().getMetersPerUnit():1;s.SCALE=t*a/28e-5}return(0,o.assign)(s,i),(0,r.appendParams)(this.urls[0],s)}},c.prototype.getGutter=function(){return this.gutter_},c.prototype.getParams=function(){return this.params_},c.prototype.getRequestUrl_=function(t,e,o,s,n,a){var u=this.urls;if(u){if(a.WIDTH=e[0],a.HEIGHT=e[1],a[this.v13_?"CRS":"SRS"]=n.getCode(),"STYLES"in this.params_||(a.STYLES=""),1!=s)switch(this.serverType_){case"geoserver":var p=90*s+.5|0;"FORMAT_OPTIONS"in a?a.FORMAT_OPTIONS+=";dpi:"+p:a.FORMAT_OPTIONS="dpi:"+p;break;case"mapserver":a.MAP_RESOLUTION=90*s;break;
511case"carmentaserver":case"qgis":a.DPI=90*s;break;default:(0,i.assert)(!1,52)}var c,g=n.getAxisOrientation(),_=o;if(this.v13_&&"ne"==g.substr(0,2)){var f=void 0;f=o[0],_[0]=o[1],_[1]=f,f=o[2],_[2]=o[3],_[3]=f}if(a.BBOX=_.join(","),1==u.length)c=u[0];else c=u[(0,l.modulo)((0,h.hash)(t),u.length)];return(0,r.appendParams)(c,a)}},c.prototype.getTilePixelRatio=function(t){return this.hidpi_&&void 0!==this.serverType_?t:1},c.prototype.getKeyForParams_=function(){var t=0,e=[];for(var r in this.params_)e[t++]=r+"-"+this.params_[r];return e.join("/")},c.prototype.updateParams=function(t){(0,o.assign)(this.params_,t),this.updateV13_(),this.setKey(this.getKeyForParams_())},c.prototype.updateV13_=function(){var t=this.params_.VERSION||e.DEFAULT_VERSION;this.v13_=(0,u.compareVersions)(t,"1.3")>=0},c.prototype.tileUrlFunction=function(t,r,i){var a=this.getTileGrid();if(a||(a=this.getTileGridForProjection(i)),!(a.getResolutions().length<=t[0])){1==r||this.hidpi_&&void 0!==this.serverType_||(r=1);var u=a.getResolution(t[0]),p=a.getTileCoordExtent(t,this.tmpExtent_),l=(0,n.toSize)(a.getTileSize(t[0]),this.tmpSize),h=this.gutter_;0!==h&&(l=(0,n.buffer)(l,h,this.tmpSize),p=(0,s.buffer)(p,u*h,p)),1!=r&&(l=(0,n.scale)(l,r,this.tmpSize));var c={SERVICE:"WMS",VERSION:e.DEFAULT_VERSION,REQUEST:"GetMap",FORMAT:"image/png",TRANSPARENT:!0};return(0,o.assign)(c,this.params_),this.getRequestUrl_(t,l,p,r,i,c)}},c}(t.default),f=exports.default=_;
512},{"./TileImage.js":"udAI","./wms.js":"TDA1","../uri.js":"n7G7","../asserts.js":"fLG6","../obj.js":"mH6q","../extent.js":"QDir","../size.js":"TAHd","../reproj.js":"U255","../string.js":"AiCK","../proj.js":"Diht","../math.js":"B96G","../tilecoord.js":"faTr"}],"sV2m":[function(require,module,exports) {
513"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=a(require("../events/EventType.js")),e=a(require("../Feature.js")),r=a(require("../geom/Point.js")),i=a(require("./Vector.js")),n=require("../coordinate.js"),o=require("../asserts.js"),s=require("../extent.js"),u=require("../util.js");function a(t){return t&&t.__esModule?t:{default:t}}var c=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),h=function(i){function a(t){var e=i.call(this,{attributions:t.attributions,wrapX:t.wrapX})||this;return e.resolution=void 0,e.distance=void 0!==t.distance?t.distance:20,e.minDistance=t.minDistance||0,e.interpolationRatio=0,e.features=[],e.geometryFunction=t.geometryFunction||function(t){var e=t.getGeometry();return(0,o.assert)("Point"==e.getType(),10),e},e.createCustomCluster_=t.createCluster,e.source=null,e.boundRefresh_=e.refresh.bind(e),e.updateDistance(e.distance,e.minDistance),e.setSource(t.source||null),e}return c(a,i),a.prototype.clear=function(t){this.features.length=0,i.prototype.clear.call(this,t)},a.prototype.getDistance=function(){return this.distance},a.prototype.getSource=function(){return this.source},a.prototype.loadFeatures=function(t,e,r){this.source.loadFeatures(t,e,r),e!==this.resolution&&(this.resolution=e,this.refresh())},a.prototype.setDistance=function(t){this.updateDistance(t,this.minDistance)},a.prototype.setMinDistance=function(t){this.updateDistance(this.distance,t)},a.prototype.getMinDistance=function(){return this.minDistance},a.prototype.setSource=function(e){this.source&&this.source.removeEventListener(t.default.CHANGE,this.boundRefresh_),this.source=e,e&&e.addEventListener(t.default.CHANGE,this.boundRefresh_),this.refresh()},a.prototype.refresh=function(){this.clear(),this.cluster(),this.addFeatures(this.features)},a.prototype.updateDistance=function(t,e){var r=0===t?0:Math.min(e,t)/t,i=t!==this.distance||this.interpolationRatio!==r;this.distance=t,this.minDistance=e,this.interpolationRatio=r,i&&this.refresh()}
513,a.prototype.cluster=function(){if(void 0!==this.resolution&&this.source)for(var t=(0,s.createEmpty)(),e=this.distance*this.resolution,r=this.source.getFeatures(),i={},n=0,o=r.length;n<o;n++){var a=r[n];if(!((0,u.getUid)(a)in i)){var c=this.geometryFunction(a);if(c){var h=c.getCoordinates();(0,s.createOrUpdateFromCoordinate)(h,t),(0,s.buffer)(t,e,t);var p=this.source.getFeaturesInExtent(t).filter(function(t){var e=(0,u.getUid)(t);return!(e in i)&&(i[e]=!0,!0)});this.features.push(this.createCluster(p,t))}}}},a.prototype.createCluster=function(t,i){for(var o=[0,0],u=t.length-1;u>=0;--u){var a=this.geometryFunction(t[u]);a?(0,n.add)(o,a.getCoordinates()):t.splice(u,1)}(0,n.scale)(o,1/t.length);var c=(0,s.getCenter)(i),h=this.interpolationRatio,p=new r.default([o[0]*(1-h)+c[0]*h,o[1]*(1-h)+c[1]*h]);return this.createCustomCluster_?this.createCustomCluster_(p,t):new e.default({geometry:p,features:t})},a}(i.default),p=exports.default=h;
514},{"../events/EventType.js":"C8cu","../Feature.js":"mYW9","../geom/Point.js":"gLcY","./Vector.js":"ZS12","../coordinate.js":"nGsj","../asserts.js":"fLG6","../extent.js":"QDir","../util.js":"KniQ"}],"HvLT":[function(require,module,exports) {
515"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=i(require("../events/EventType.js")),t=i(require("./Geometry.js")),r=require("../extent.js"),n=require("../events.js");function i(e){return e&&e.__esModule?e:{default:e}}var o=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),s=function(t){function i(e){var r=t.call(this)||this;return r.geometries_=e||null,r.changeEventsKeys_=[],r.listenGeometriesChange_(),r}return o(i,t),i.prototype.unlistenGeometriesChange_=function(){this.changeEventsKeys_.forEach(n.unlistenByKey),this.changeEventsKeys_.length=0},i.prototype.listenGeometriesChange_=function(){if(this.geometries_)for(var t=0,r=this.geometries_.length;t<r;++t)this.changeEventsKeys_.push((0,n.listen)(this.geometries_[t],e.default.CHANGE,this.changed,this))},i.prototype.clone=function(){var e=new i(null);return e.setGeometries(this.geometries_),e.applyProperties(this),e},i.prototype.closestPointXY=function(e,t,n,i){if(i<(0,r.closestSquaredDistanceXY)(this.getExtent(),e,t))return i;for(var o=this.geometries_,s=0,a=o.length;s<a;++s)i=o[s].closestPointXY(e,t,n,i);return i},i.prototype.containsXY=function(e,t){for(var r=this.geometries_,n=0,i=r.length;n<i;++n)if(r[n].containsXY(e,t))return!0;return!1},i.prototype.computeExtent=function(e){(0,r.createOrUpdateEmpty)(e);for(var t=this.geometries_,n=0,i=t.length;n<i;++n)(0,r.extend)(e,t[n].getExtent());return e},i.prototype.getGeometries=function(){return a(this.geometries_)},i.prototype.getGeometriesArray=function(){return this.geometries_},i.prototype.getGeometriesArrayRecursive=function(){for(var e=[],t=this.geometries_,r=0,n=t.length;r<n;++r)t[r].getType()===this.getType()?e=e.concat(t[r].getGeometriesArrayRecursive()):e.push(t[r]);return e},i.prototype.getSimplifiedGeometry=function(e){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),e<0||0!==this.simplifiedGeometryMaxMinSquaredTolerance&&e<this.simplifiedGeometryMaxMinSquaredTolerance)return this;for(var t=[],r=this.geometries_,n=!1,o=0,s=r.length;o<s;++o){var a=r[o],u=a.getSimplifiedGeometry(e);t.push(u),u!==a&&(n=!0)}if(n){var p=new i(null);return p.setGeometriesArray(t),p}return this.simplifiedGeometryMaxMinSquaredTolerance=e,this},i.prototype.getType=function(){return"GeometryCollection"},i.prototype.intersectsExtent=function(e){for(var t=this.geometries_,r=0,n=t.length;r<n;++r)if(t[r].intersectsExtent(e))return!0;return!1},i.prototype.isEmpty=function(){return 0===this.geometries_.length},i.prototype.rotate=function(e,t){for(var r=this.geometries_,n=0,i=r.length;n<i;++n)r[n].rotate(e,t);this.changed()},i.prototype.scale=function(e,t,n){var i=n;i||(i=(0,r.getCenter)(this.getExtent()));for(var o=this.geometries_,s=0,a=o.length;s<a;++s)o[s].scale(e,t,i);this.changed()},i.prototype.setGeometries=function(e){this.setGeometriesArray(a(e))},i.prototype.setGeometriesArray=function(e){this.unlistenGeometriesChange_(),this.geometries_=e,this.listenGeometriesChange_(),this.changed()},i.prototype.applyTransform=function(e){for(var t=this.geometries_,r=0,n=t.length;r<n;++r)t[r].applyTransform(e);this.changed()},i.prototype.translate=function(e,t){for(var r=this.geometries_,n=0,i=r.length;n<i;++n)r[n].translate(e,t);this.changed()},i.prototype.disposeInternal=function(){this.unlistenGeometriesChange_(),t.prototype.disposeInternal.call(this)},i}(t.default);function a(e){for(var t=[],r=0,n=e.length;r<n;++r)t.push(e[r].clone());return t}
515var u=exports.default=s;
516},{"../events/EventType.js":"C8cu","./Geometry.js":"F8sI","../extent.js":"QDir","../events.js":"UqnM"}],"Kylu":[function(require,module,exports) {
517"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0,exports.transformExtentWithOptions=s,exports.transformGeometryWithOptions=u;var t=n(require("../proj/Units.js")),e=require("../util.js"),r=require("../obj.js"),o=require("../proj.js");function n(t){return t&&t.__esModule?t:{default:t}}var a=function(){function n(){this.dataProjection=void 0,this.defaultFeatureProjection=void 0,this.supportedMediaTypes=null}return n.prototype.getReadOptions=function(e,r){var n;if(r){var a=r.dataProjection?(0,o.get)(r.dataProjection):this.readProjection(e);r.extent&&a&&a.getUnits()===t.default.TILE_PIXELS&&(a=(0,o.get)(a)).setWorldExtent(r.extent),n={dataProjection:a,featureProjection:r.featureProjection}}return this.adaptOptions(n)},n.prototype.adaptOptions=function(t){return(0,r.assign)({dataProjection:this.dataProjection,featureProjection:this.defaultFeatureProjection},t)},n.prototype.getType=function(){return(0,e.abstract)()},n.prototype.readFeature=function(t,r){return(0,e.abstract)()},n.prototype.readFeatures=function(t,r){return(0,e.abstract)()},n.prototype.readGeometry=function(t,r){return(0,e.abstract)()},n.prototype.readProjection=function(t){return(0,e.abstract)()},n.prototype.writeFeature=function(t,r){return(0,e.abstract)()},n.prototype.writeFeatures=function(t,r){return(0,e.abstract)()},n.prototype.writeGeometry=function(t,r){return(0,e.abstract)()},n}(),i=exports.default=a;function u(t,e,r){var n,a=r?(0,o.get)(r.featureProjection):null,i=r?(0,o.get)(r.dataProjection):null;if(n=a&&i&&!(0,o.equivalent)(a,i)?(e?t.clone():t).transform(e?a:i,e?i:a):t,e&&r&&void 0!==r.decimals){var u=Math.pow(10,r.decimals);n===t&&(n=t.clone()),n.applyTransform(function(t){for(var e=0,r=t.length;e<r;++e)t[e]=Math.round(t[e]*u)/u;return t})}return n}function s(t,e){var r=e?(0,o.get)(e.featureProjection):null,n=e?(0,o.get)(e.dataProjection):null;return r&&n&&!(0,o.equivalent)(r,n)?(0,o.transformExtent)(t,n,r):t}
518},{"../proj/Units.js":"yZx6","../util.js":"KniQ","../obj.js":"mH6q","../proj.js":"Diht"}],"RA7M":[function(require,module,exports) {
519"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=r(require("./Feature.js")),e=require("../util.js");function r(t){return t&&t.__esModule?t:{default:t}}var o=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function o(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),n=function(t){function r(){return t.call(this)||this}return o(r,t),r.prototype.getType=function(){return"json"},r.prototype.readFeature=function(t,e){return this.readFeatureFromObject(u(t),this.getReadOptions(t,e))},r.prototype.readFeatures=function(t,e){return this.readFeaturesFromObject(u(t),this.getReadOptions(t,e))},r.prototype.readFeatureFromObject=function(t,r){return(0,e.abstract)()},r.prototype.readFeaturesFromObject=function(t,r){return(0,e.abstract)()},r.prototype.readGeometry=function(t,e){return this.readGeometryFromObject(u(t),this.getReadOptions(t,e))},r.prototype.readGeometryFromObject=function(t,r){return(0,e.abstract)()},r.prototype.readProjection=function(t){return this.readProjectionFromObject(u(t))},r.prototype.readProjectionFromObject=function(t){return(0,e.abstract)()},r.prototype.writeFeature=function(t,e){return JSON.stringify(this.writeFeatureObject(t,e))},r.prototype.writeFeatureObject=function(t,r){return(0,e.abstract)()},r.prototype.writeFeatures=function(t,e){return JSON.stringify(this.writeFeaturesObject(t,e))},r.prototype.writeFeaturesObject=function(t,r){return(0,e.abstract)()},r.prototype.writeGeometry=function(t,e){return JSON.stringify(this.writeGeometryObject(t,e))},r.prototype.writeGeometryObject=function(t,r){return(0,e.abstract)()},r}(t.default);function u(t){if("string"==typeof t){var e=JSON.parse(t);return e||null}return null!==t?t:null}var i=exports.default=n;
520},{"./Feature.js":"Kylu","../util.js":"KniQ"}],"qBlb":[function(require,module,exports) {
521"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=d(require("../Feature.js")),t=d(require("../geom/GeometryCollection.js")),r=d(require("./JSONFeature.js")),o=d(require("../geom/LineString.js")),n=d(require("../geom/MultiLineString.js")),i=d(require("../geom/MultiPoint.js")),a=d(require("../geom/MultiPolygon.js")),u=d(require("../geom/Point.js")),s=d(require("../geom/Polygon.js")),c=require("../asserts.js"),p=require("../obj.js"),l=require("../proj.js"),y=require("./Feature.js");
521function d(e){return e&&e.__esModule?e:{default:e}}var f=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),m=function(t){function r(e){var r=this,o=e||{};return(r=t.call(this)||this).dataProjection=(0,l.get)(o.dataProjection?o.dataProjection:"EPSG:4326"),o.featureProjection&&(r.defaultFeatureProjection=(0,l.get)(o.featureProjection)),r.geometryName_=o.geometryName,r.extractGeometryName_=o.extractGeometryName,r.supportedMediaTypes=["application/geo+json","application/vnd.geo+json"],r}return f(r,t),r.prototype.readFeatureFromObject=function(t,r){var o=null,n=g((o="Feature"===t.type?t:{type:"Feature",geometry:t,properties:null}).geometry,r),i=new e.default;return this.geometryName_?i.setGeometryName(this.geometryName_):this.extractGeometryName_&&"geometry_name"in o!==void 0&&i.setGeometryName(o.geometry_name),i.setGeometry(n),"id"in o&&i.setId(o.id),o.properties&&i.setProperties(o.properties,!0),i},r.prototype.readFeaturesFromObject=function(e,t){var r=null;if("FeatureCollection"===e.type){r=[];for(var o=e.features,n=0,i=o.length;n<i;++n)r.push(this.readFeatureFromObject(o[n],t))}else r=[this.readFeatureFromObject(e,t)];return r},r.prototype.readGeometryFromObject=function(e,t){return g(e,t)},r.prototype.readProjectionFromObject=function(e){var t,r=e.crs;return r?"name"==r.type?t=(0,l.get)(r.properties.name):"EPSG"===r.type?t=(0,l.get)("EPSG:"+r.properties.code):(0,c.assert)(!1,36):t=this.dataProjection,t},r.prototype.writeFeatureObject=function(e,t){t=this.adaptOptions(t);var r={type:"Feature",geometry:null,properties:null},o=e.getId();if(void 0!==o&&(r.id=o),!e.hasProperties())return r;var n=e.getProperties(),i=e.getGeometry();return i&&(r.geometry=F(i,t),delete n[e.getGeometryName()]),(0,p.isEmpty)(n)||(r.properties=n),r},r.prototype.writeFeaturesObject=function(e,t){t=this.adaptOptions(t);for(var r=[],o=0,n=e.length;o<n;++o)r.push(this.writeFeatureObject(e[o],t));return{type:"FeatureCollection",features:r}},r.prototype.writeGeometryObject=function(e,t){return F(e,this.adaptOptions(t))},r}(r.default);function g(e,t){if(!e)return null;var r;switch(e.type){case"Point":r=P(e);break;case"LineString":r=b(e);break;case"Polygon":r=w(e);break;case"MultiPoint":r=v(e);break;case"MultiLineString":r=h(e);break;case"MultiPolygon":r=O(e);break;case"GeometryCollection":r=j(e);break;default:throw new Error("Unsupported GeoJSON type: "+e.type)}return(0,y.transformGeometryWithOptions)(r,!1,t)}function j(e,r){var o=e.geometries.map(function(e){return g(e,r)});return new t.default(o)}function P(e){return new u.default(e.coordinates)}function b(e){return new o.default(e.coordinates)}function h(e){return new n.default(e.coordinates)}function v(e){return new i.default(e.coordinates)}function O(e){return new a.default(e.coordinates)}function w(e){return new s.default(e.coordinates)}function F(e,t){var r,o=(e=(0,y.transformGeometryWithOptions)(e,!0,t)).getType();switch(o){case"Point":r=S(e,t);break;case"LineString":r=_(e,t);break;case"Polygon":r=q(e,t);break;case"MultiPoint":r=C(e,t);break;case"MultiLineString":r=k(e,t);break;case"MultiPolygon":r=M(e,t);break;case"GeometryCollection":r=G(e,t);break;case"Circle":r={type:"GeometryCollection",geometries:[]};break;default:throw new Error("Unsupported geometry type: "+o)}return r}function G(e,t){return{type:"GeometryCollection",geometries:e.getGeometriesArray().map(function(e){var r=(0,p.assign)({},t);return delete r.featureProjection,F(e,r)})}}function _(e,t){return{type:"LineString",coordinates:e.getCoordinates()}}function k(e,t){return{type:"MultiLineString",coordinates:e.getCoordinates()}}function C(e,t){return{type:"MultiPoint",coordinates:e.getCoordinates()}}function M(e,t){var r;return t&&(r=t.rightHanded),{type:"MultiPolygon",coordinates:e.getCoordinates(r)}}function S(e,t){return{type:"Point",coordinates:e.getCoordinates()}}function q(e,t){var r;return t&&(r=t.rightHanded),{type:"Polygon",coordinates:e.getCoordinates(r)}}var N=exports.default=m;
522},{"../Feature.js":"mYW9","../geom/GeometryCollection.js":"HvLT","./JSONFeature.js":"RA7M","../geom/LineString.js":"DfxW","../geom/MultiLineString.js":"fbCo","../geom/MultiPoint.js":"dNu5","../geom/MultiPolygon.js":"ouh
522F","../geom/Point.js":"gLcY","../geom/Polygon.js":"Nwwk","../asserts.js":"fLG6","../obj.js":"mH6q","../proj.js":"Diht","./Feature.js":"Kylu"}],"zfKM":[function(require,module,exports) {
523"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=r(require("../format/Feature.js")),e=require("../util.js");function r(t){return t&&t.__esModule?t:{default:t}}var o=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function o(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),n=function(t){function r(){return t.call(this)||this}return o(r,t),r.prototype.getType=function(){return"text"},r.prototype.readFeature=function(t,e){return this.readFeatureFromText(u(t),this.adaptOptions(e))},r.prototype.readFeatureFromText=function(t,r){return(0,e.abstract)()},r.prototype.readFeatures=function(t,e){return this.readFeaturesFromText(u(t),this.adaptOptions(e))},r.prototype.readFeaturesFromText=function(t,r){return(0,e.abstract)()},r.prototype.readGeometry=function(t,e){return this.readGeometryFromText(u(t),this.adaptOptions(e))},r.prototype.readGeometryFromText=function(t,r){return(0,e.abstract)()},r.prototype.readProjection=function(t){return this.readProjectionFromText(u(t))},r.prototype.readProjectionFromText=function(t){return this.dataProjection},r.prototype.writeFeature=function(t,e){return this.writeFeatureText(t,this.adaptOptions(e))},r.prototype.writeFeatureText=function(t,r){return(0,e.abstract)()},r.prototype.writeFeatures=function(t,e){return this.writeFeaturesText(t,this.adaptOptions(e))},r.prototype.writeFeaturesText=function(t,r){return(0,e.abstract)()},r.prototype.writeGeometry=function(t,e){return this.writeGeometryText(t,this.adaptOptions(e))},r.prototype.writeGeometryText=function(t,r){return(0,e.abstract)()},r}(t.default);function u(t){return"string"==typeof t?t:""}var i=exports.default=n;
524},{"../format/Feature.js":"Kylu","../util.js":"KniQ"}],"FkYy":[function(require,module,exports) {
525"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=f(require("../Feature.js")),e=f(require("../geom/GeometryCollection.js")),r=f(require("../geom/GeometryLayout.js")),o=f(require("../geom/LineString.js")),i=f(require("../geom/MultiLineString.js")),n=f(require("../geom/MultiPoint.js")),s=f(require("../geom/MultiPolygon.js")),a=f(require("../geom/Point.js")),u=f(require("../geom/Polygon.js")),h=f(require("./TextFeature.js")),p=require("./Feature.js");function f(t){return t&&t.__esModule?t:{default:t}}var l=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function o(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),_={POINT:a.default,LINESTRING:o.default,POLYGON:u.default,MULTIPOINT:n.default,MULTILINESTRING:i.default,MULTIPOLYGON:s.default},c="EMPTY",T="Z",y="M",m="ZM",g={START:0,TEXT:1,LEFT_PAREN:2,RIGHT_PAREN:3,NUMBER:4,COMMA:5,EOF:6},E={Point:"POINT",LineString:"LINESTRING",Polygon:"POLYGON",MultiPoint:"MULTIPOINT",MultiLineString:"MULTILINESTRING",MultiPolygon:"MULTIPOLYGON",GeometryCollection:"GEOMETRYCOLLECTION",Circle:"CIRCLE"},P=function(){function t(t){this.wkt=t,this.index_=-1}return t.prototype.isAlpha_=function(t){return t>="a"&&t<="z"||t>="A"&&t<="Z"},t.prototype.isNumeric_=function(t,e){return t>="0"&&t<="9"||"."==t&&!(void 0!==e&&e)},t.prototype.isWhiteSpace_=function(t){return" "==t||"\t"==t||"\r"==t||"\n"==t},t.prototype.nextChar_=function(){return this.wkt.charAt(++this.index_)},t.prototype.nextToken=function(){var t,e=this.nextChar_(),r=this.index_,o=e;if("("==e)t=g.LEFT_PAREN;else if(","==e)t=g.COMMA;else if(")"==e)t=g.RIGHT_PAREN;else if(this.isNumeric_(e)||"-"==e)t=g.NUMBER,o=this.readNumber_();else if(this.isAlpha_(e))t=g.TEXT,o=this.readText_();else{if(this.isWhiteSpace_(e))return this.nextToken();if(""!==e)throw new Error("Unexpected character: "+e);t=g.EOF}return{position:r,value:o,type:t}},t.prototype.readNumber_=function(){var t,e=this.index_,r=!1,o=!1;do{"."==t?r=!0:"e"!=t&&"E"!=t||(o=!0),t=this.nextChar_()}
525while(this.isNumeric_(t,r)||!o&&("e"==t||"E"==t)||o&&("-"==t||"+"==t));return parseFloat(this.wkt.substring(e,this.index_--))},t.prototype.readText_=function(){var t,e=this.index_;do{t=this.nextChar_()}while(this.isAlpha_(t));return this.wkt.substring(e,this.index_--).toUpperCase()},t}(),L=function(){function t(t){this.lexer_=t,this.token_={position:0,type:g.START},this.layout_=r.default.XY}return t.prototype.consume_=function(){this.token_=this.lexer_.nextToken()},t.prototype.isTokenType=function(t){return this.token_.type==t},t.prototype.match=function(t){var e=this.isTokenType(t);return e&&this.consume_(),e},t.prototype.parse=function(){return this.consume_(),this.parseGeometry_()},t.prototype.parseGeometryLayout_=function(){var t=r.default.XY,e=this.token_;if(this.isTokenType(g.TEXT)){var o=e.value;o===T?t=r.default.XYZ:o===y?t=r.default.XYM:o===m&&(t=r.default.XYZM),t!==r.default.XY&&this.consume_()}return t},t.prototype.parseGeometryCollectionText_=function(){if(this.match(g.LEFT_PAREN)){var t=[];do{t.push(this.parseGeometry_())}while(this.match(g.COMMA));if(this.match(g.RIGHT_PAREN))return t}throw new Error(this.formatErrorMessage_())},t.prototype.parsePointText_=function(){if(this.match(g.LEFT_PAREN)){var t=this.parsePoint_();if(this.match(g.RIGHT_PAREN))return t}throw new Error(this.formatErrorMessage_())},t.prototype.parseLineStringText_=function(){if(this.match(g.LEFT_PAREN)){var t=this.parsePointList_();if(this.match(g.RIGHT_PAREN))return t}throw new Error(this.formatErrorMessage_())},t.prototype.parsePolygonText_=function(){if(this.match(g.LEFT_PAREN)){var t=this.parseLineStringTextList_();if(this.match(g.RIGHT_PAREN))return t}throw new Error(this.formatErrorMessage_())},t.prototype.parseMultiPointText_=function(){if(this.match(g.LEFT_PAREN)){var t=void 0;if(t=this.token_.type==g.LEFT_PAREN?this.parsePointTextList_():this.parsePointList_(),this.match(g.RIGHT_PAREN))return t}throw new Error(this.formatErrorMessage_())},t.prototype.parseMultiLineStringText_=function(){if(this.match(g.LEFT_PAREN)){var t=this.parseLineStringTextList_();if(this.match(g.RIGHT_PAREN))return t}throw new Error(this.formatErrorMessage_())},t.prototype.parseMultiPolygonText_=function(){if(this.match(g.LEFT_PAREN)){var t=this.parsePolygonTextList_();if(this.match(g.RIGHT_PAREN))return t}throw new Error(this.formatErrorMessage_())},t.prototype.parsePoint_=function(){for(var t=[],e=this.layout_.length,r=0;r<e;++r){var o=this.token_;if(!this.match(g.NUMBER))break;t.push(o.value)}if(t.length==e)return t;throw new Error(this.formatErrorMessage_())},t.prototype.parsePointList_=function(){for(var t=[this.parsePoint_()];this.match(g.COMMA);)t.push(this.parsePoint_());return t},t.prototype.parsePointTextList_=function(){for(var t=[this.parsePointText_()];this.match(g.COMMA);)t.push(this.parsePointText_());return t},t.prototype.parseLineStringTextList_=function(){for(var t=[this.parseLineStringText_()];this.match(g.COMMA);)t.push(this.parseLineStringText_());return t},t.prototype.parsePolygonTextList_=function(){for(var t=[this.parsePolygonText_()];this.match(g.COMMA);)t.push(this.parsePolygonText_());return t},t.prototype.isEmptyGeometry_=function(){var t=this.isTokenType(g.TEXT)&&this.token_.value==c;return t&&this.consume_(),t},t.prototype.formatErrorMessage_=function(){return"Unexpected `"+this.token_.value+"` at position "+this.token_.position+" in `"+this.lexer_.wkt+"`"},t.prototype.parseGeometry_=function(){var t=this.token_;if(this.match(g.TEXT)){var r=t.value;this.layout_=this.parseGeometryLayout_();var o=this.isEmptyGeometry_();if("GEOMETRYCOLLECTION"==r){if(o)return new e.default([]);var i=this.parseGeometryCollectionText_();return new e.default(i)}var n=_[r];if(!n)throw new Error("Invalid geometry type: "+r);var s=void 0;if(o)s="POINT"==r?[NaN,NaN]:[];else switch(r){case"POINT":s=this.parsePointText_();break;case"LINESTRING":s=this.parseLineStringText_();break;case"POLYGON":s=this.parsePolygonText_();break;case"MULTIPOINT":s=this.parseMultiPointText_();break;case"MULTILINESTRING":s=this.parseMultiLineStringText_();break;case"MULTIPOLYGON":s=this.parseMultiPolygonText_()}return new n(s,this.layout_)}throw new Error(this.formatErrorMessage_())},t}(),v=function(r){function o(t){var e=r.call(this)||this,o=t||{};return e.splitCollection_=void 0!==o.splitCollection&&o.splitCollection,e}return l(o,r),o.prototype.parse_=function(t){var e=new P(t);return new L(e).parse()},o.prototype.readFeatureFromText=function(e,r){var o=this.readGeometryFromText(e,r),i=new t.default;return i.setGeometry(o),i},o.prototype.readFeaturesFromText=function(e,r){for(var o=[],i=this.readGeometryFromText(e,r),n=[],s=0,a=(o=this.splitCollection_&&"GeometryCollection"==i.getType()?i.getGeometriesArray():[i]).length;s<a;++s){var u=new t.default;u.setGeometry(o[s]),n.push(u)}return n},o.prototype.readGeometryFromText=function(t,e){var r=this.parse_(t);return(0,p.transformGeometryWithOptions)(r,!1,e)},o.prototype.writeFeatureText=function(t,e){var r=t.getGeometry();return r?this.writeGeometryText(r,e):""},o.prototype.writeFeaturesText=function(t,r){if(1==t.length)return this.writeFeatureText(t[0],r);for(var o=[],i=0,n=t.length;i<n;++i)o.push(t[i].getGeometry());var s=new e.default(o);return this.writeGeometryText(s,r)},o.prototype.writeGeometryText=function(t,e){return A((0,p.transformGeometryWithOptions)(t,!0,e))},o}(h.default);function x(t){var e=t.getCoordinates();return 0===e.length?"":e.join(" ")}function M(t){for(var e=[],r=t.getPoints(),o=0,i=r.length;o<i;++o)e.push("("+x(r[o])+")");return e.join(",")}function d(t){for(var e=[],r=t.getGeometries(),o=0,i=r.length;o<i;++o)e.push(A(r[o]));return e.join(",")}function N(t){for(var e=t.getCoordinates(),r=[],o=0,i=e.length;o<i;++o)r.push(e[o].join(" "));return r.join(",")}function G(t){for(var e=[],r=t.getLineStrings(),o=0,i=r.length;o<i;++o)e.push("("+N(r[o])+")");return e.join(",")}function w(t){for(var e=[],r=t.getLinearRings(),o=0,i=r.length;o<i;++o)e.push("("+N(r[o])+")");return e.join(",")}function R(t){for(var e=[],r=t.getPolygons(),o=0,i=r.length;o<i;++o)e.push("("+w(r[o])+")");return e.join(",")}function O(t){var e=t.getLayout(),o="";return e!==r.default.XYZ&&e!==r.default.XYZM||(o+=T),e!==r.default.XYM&&e!==r.default.XYZM||(o+=y),o}
525var I={Point:x,LineString:N,Polygon:w,MultiPoint:M,MultiLineString:G,MultiPolygon:R,GeometryCollection:d};function A(t){var e=t.getType(),r=(0,I[e])(t),o=E[e];if("function"==typeof t.getFlatCoordinates){var i=O(t);i.length>0&&(o+=" "+i)}return 0===r.length?o+" "+c:o+"("+r+")"}var C=exports.default=v;
526},{"../Feature.js":"mYW9","../geom/GeometryCollection.js":"HvLT","../geom/GeometryLayout.js":"Utvi","../geom/LineString.js":"DfxW","../geom/MultiLineString.js":"fbCo","../geom/MultiPoint.js":"dNu5","../geom/MultiPolygon.js":"ouhF","../geom/Point.js":"gLcY","../geom/Polygon.js":"Nwwk","./TextFeature.js":"zfKM","./Feature.js":"Kylu"}],"yYlP":[function(require,module,exports) {
527"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.XML_SCHEMA_INSTANCE_URI=exports.OBJECT_PROPERTY_NODE_FACTORY=void 0,exports.createElementNS=r,exports.getAllTextContent=n,exports.getAllTextContent_=o,exports.getAttributeNS=a,exports.getDocument=P,exports.getXMLSerializer=T,exports.isDocument=i,exports.makeArrayExtender=l,exports.makeArrayPusher=c,exports.makeArraySerializer=f,exports.makeChildAppender=v,exports.makeObjectPropertyPusher=s,exports.makeObjectPropertySetter=d,exports.makeReplacer=p,exports.makeSequence=h,exports.makeSimpleNodeFactory=m,exports.makeStructureNS=S,exports.parse=u,exports.parseNode=g,exports.pushParseAndPop=N,exports.pushSerializeAndPop=A,exp
vendor: 4,290 bytes, lines 527-529
527orts.registerDocument=y,exports.registerXMLSerializer=C,exports.serialize=E;var e=require("./array.js"),t=exports.XML_SCHEMA_INSTANCE_URI="http://www.w3.org/2001/XMLSchema-instance";function r(e,t){return P().createElementNS(e,t)}function n(e,t){return o(e,t,[]).join("")}function o(e,t,r){if(e.nodeType==Node.CDATA_SECTION_NODE||e.nodeType==Node.TEXT_NODE)t?r.push(String(e.nodeValue).replace(/(\r\n|\r|\n)/g,"")):r.push(e.nodeValue);else{var n=void 0;for(n=e.firstChild;n;n=n.nextSibling)o(n,t,r)}return r}function i(e){return"documentElement"in e}function a(e,t,r){return e.getAttributeNS(t,r)||""}function u(e){return(new DOMParser).parseFromString(e,"application/xml")}function l(t,r){return function(n,o){var i=t.call(void 0!==r?r:this,n,o);if(void 0!==i){var a=o[o.length-1];(0,e.extend)(a,i)}}}function c(e,t){return function(r,n){var o=e.call(void 0!==t?t:this,r,n);void 0!==o&&n[n.length-1].push(o)}}function p(e,t){return function(r,n){var o=e.call(void 0!==t?t:this,r,n);void 0!==o&&(n[n.length-1]=o)}}function s(e,t,r){return function(n,o){var i=e.call(void 0!==r?r:this,n,o);if(void 0!==i){var a=o[o.length-1],u=void 0!==t?t:n.localName,l=void 0;u in a?l=a[u]:(l=[],a[u]=l),l.push(i)}}}function d(e,t,r){return function(n,o){var i=e.call(void 0!==r?r:this,n,o);void 0!==i&&(o[o.length-1][void 0!==t?t:n.localName]=i)}}function v(e,t){return function(r,n,o){e.call(void 0!==t?t:this,r,n,o),o[o.length-1].node.appendChild(r)}}function f(e,t){var r,n;return function(t,o,i){if(void 0===r){r={};var a={};a[t.localName]=e,r[t.namespaceURI]=a,n=m(t.localName)}E(r,n,o,i)}}function m(e,t){var n=e;return function(e,o,i){var a=o[o.length-1].node,u=n;return void 0===u&&(u=i),r(void 0!==t?t:a.namespaceURI,u)}}var x=exports.OBJECT_PROPERTY_NODE_FACTORY=m();function h(e,t){for(var r=t.length,n=new Array(r),o=0;o<r;++o)n[o]=e[t[o]];return n}function S(e,t,r){var n,o,i=void 0!==r?r:{};for(n=0,o=e.length;n<o;++n)i[e[n]]=t;return i}function g(e,t,r,n){var o;for(o=t.firstElementChild;o;o=o.nextElementSibling){var i=e[o.namespaceURI];if(void 0!==i){var a=i[o.localName];void 0!==a&&a.call(n,o,r)}}}function N(e,t,r,n,o){return n.push(e),g(t,r,n,o),n.pop()}function E(e,t,r,n,o,i){for(var a,u,l=(void 0!==o?o:r).length,c=0;c<l;++c)void 0!==(a=r[c])&&void 0!==(u=t.call(void 0!==i?i:this,a,n,void 0!==o?o[c]:void 0))&&e[u.namespaceURI][u.localName].call(i,u,a,n)}function A(e,t,r,n,o,i,a){return o.push(e),E(t,r,n,o,i,a),o.pop()}var _=void 0;function C(e){_=e}function T(){return void 0===_&&"undefined"!=typeof XMLSerializer&&(_=new XMLSerializer),_}var O=void 0;function y(e){O=e}function P(){return void 0===O&&"undefined"!=typeof document&&(O=document.implementation.createDocument("","",null)),O}
528},{"./array.js":"luEr"}],"CXRz":[function(require,module,exports) {
529"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=n(require("../format/Feature.js")),r=require("../util.js"),t=require("../array.js"),o=require("../xml.js");function n(e){return e&&e.__esModule?e:{default:e}}var u=function(){var e=function(r,t){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t])})(r,t)};return function(r,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function o(){this.constructor=r}e(r,t),r.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}}(),i=function(e){function n(){var r=e.call(this)||this;return r.xmlSerializer_=(0,o.getXMLSerializer)(),r}return u(n,e),n.prototype.getType=function(){return"xml"},n.prototype.readFeature=function(e,r){if(e){if("string"==typeof e){var t=(0,o.parse)(e);return this.readFeatureFromDocument(t,r)}return(0,o.isDocument)(e)?this.readFeatureFromDocument(e,r):this.readFeatureFromNode(e,r)}return null},n.prototype.readFeatureFromDocument=function(e,r){var t=this.readFeaturesFromDocument(e,r);return t.length>0?t[0]:null},n.prototype.readFeatureFromNode=function(e,r){return null},n.prototype.readFeatures=function(e,r){if(e){if("string"==typeof e){var t=(0,o.parse)(e);return this.readFeaturesFromDocument(t,r)}return(0,o.isDocument)(e)?this.readFeaturesFromDocument(e,r):this.readFeaturesFromN
529ode(e,r)}return[]},n.prototype.readFeaturesFromDocument=function(e,r){for(var o=[],n=e.firstChild;n;n=n.nextSibling)n.nodeType==Node.ELEMENT_NODE&&(0,t.extend)(o,this.readFeaturesFromNode(n,r));return o},n.prototype.readFeaturesFromNode=function(e,t){return(0,r.abstract)()},n.prototype.readGeometry=function(e,r){if(e){if("string"==typeof e){var t=(0,o.parse)(e);return this.readGeometryFromDocument(t,r)}return(0,o.isDocument)(e)?this.readGeometryFromDocument(e,r):this.readGeometryFromNode(e,r)}return null},n.prototype.readGeometryFromDocument=function(e,r){return null},n.prototype.readGeometryFromNode=function(e,r){return null},n.prototype.readProjection=function(e){if(e){if("string"==typeof e){var r=(0,o.parse)(e);return this.readProjectionFromDocument(r)}return(0,o.isDocument)(e)?this.readProjectionFromDocument(e):this.readProjectionFromNode(e)}return null},n.prototype.readProjectionFromDocument=function(e){return this.dataProjection},n.prototype.readProjectionFromNode=function(e){return this.dataProjection},n.prototype.writeFeature=function(e,r){var t=this.writeFeatureNode(e,r);return this.xmlSerializer_.serializeToString(t)},n.prototype.writeFeatureNode=function(e,r){return null},n.prototype.writeFeatures=function(e,r){var t=this.writeFeaturesNode(e,r);return this.xmlSerializer_.serializeToString(t)},n.prototype.writeFeaturesNode=function(e,r){return null},n.prototype.writeGeometry=function(e,r){var t=this.writeGeometryNode(e,r);return this.xmlSerializer_.serializeToString(t)},n.prototype.writeGeometryNode=function(e,r){return null},n}(e.default),a=exports.default=i;
530},{"../format/Feature.js":"Kylu","../util.js":"KniQ","../array.js":"luEr","../xml.js":"yYlP"}],"jdp5":[function(require,module,exports) {
531"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.readBoolean=r,exports.readBooleanString=n,exports.readDateTime=o,exports.readDecimal=i,exports.readDecimalString=a,exports.readNonNegativeIntegerString=u,exports.readPositiveInteger=d,exports.readString=s,exports.writeBooleanTextNode=c,exports.writeCDATASection=p,exports.writeDateTimeTextNode=x,exports.writeDecimalTextNode=g,exports.writeNonNegativeIntegerTextNode=l,exports.writeStringTextNode=T;var e=require("../xml.js"),t=require("../string.js");function r(t){return n((0,e.getAllTextContent)(t,!1))}function n(e){var t=/^\s*(true|1)|(false|0)\s*$/.exec(e);return t?void 0!==t[1]||!1:void 0}function o(t){var r=(0,e.getAllTextContent)(t,!1),n=Date.parse(r);return isNaN(n)?void 0:n/1e3}function i(t){return a((0,e.getAllTextContent)(t,!1))}function a(e){var t=/^\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)\s*$/i.exec(e);return t?parseFloat(t[1]):void 0}function d(t){return u((0,e.getAllTextContent)(t,!1))}function u(e){var t=/^\s*(\d+)\s*$/.exec(e);return t?parseInt(t[1],10):void 0}function s(t){return(0,e.getAllTextContent)(t,!1).trim()}function c(e,t){T(e,t?"1":"0")}function p(t,r){t.appendChild((0,e.getDocument)().createCDATASection(r))}function x(r,n){var o=new Date(1e3*n),i=o.getUTCFullYear()+"-"+(0,t.padNumber)(o.getUTCMonth()+1,2)+"-"+(0,t.padNumber)(o.getUTCDate(),2)+"T"+(0,t.padNumber)(o.getUTCHours(),2)+":"+(0,t.padNumber)(o.getUTCMinutes(),2)+":"+(0,t.padNumber)(o.getUTCSeconds(),2)+"Z";r.appendChild((0,e.getDocument)().createTextNode(i))}function g(t,r){var n=r.toPrecision();t.appendChild((0,e.getDocument)().createTextNode(n))}function l(t,r){var n=r.toString();t.appendChild((0,e.getDocument)().createTextNode(n))}function T(t,r){t.appendChild((0,e.getDocument)().createTextNode(r))}
532},{"../xml.js":"yYlP","../string.js":"AiCK"}],"DiYy":[function(require,module,exports) {
533"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0,exports.getDefaultFillStyle=X,exports.getDefaultImageStyle=H,exports.getDefaultStrokeStyle=K,exports.getDefaultStyle=te,exports.getDefaultStyleArray=ne,exports.getDefaultTextStyle=V,exports.readFlatCoordinates=pe;var e=b(require("../Feature.js")),t=b(require("../style/Fill.js")),r=b(require("../geom/GeometryCollection.js")),a=b(require("../geom/GeometryLayout.js")),n=b(require("../style/Icon.js")),o=b(require("../style/IconAnchorUnits.js")),i=b(require("../style/IconOrigin.js")),l=b(require("../ImageState.js")),u=b(require("../geom/LineString.js")),s=b(require("../geom/MultiLineString.js")),d=b(require("../geom/MultiPoint.js")),c=b(require("../geom/MultiPolygon.js")),m=b(require("../geom/Point.js")),p=b(require("../geom/Polygon.js")),S=b(require("../style/Stroke.js")),g=b(require("../style/Style.js")),y=b(require("../style/Text.js")),f=b(require("./XMLFeature.js")),h=require("../xml.js"),v=require("../color.js"),k=require("../asserts.js"),P=require("../array.js"),N=require("../proj.js"),A=require("./xsd.js"),x=require("../math.js"),O=require("./Feature.js");
533function b(e){return e&&e.__esModule?e:{default:e}}var w,T,C,F,R,E,j=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function a(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(a.prototype=r.prototype,new a)}}(),_=["http://www.google.com/kml/ext/2.2"],L=[null,"http://earth.google.com/kml/2.0","http://earth.google.com/kml/2.1","http://earth.google.com/kml/2.2","http://www.opengis.net/kml/2.2"],D="http://www.opengis.net/kml/2.2 https://developers.google.com/kml/schema/kml22gx.xsd",I={fraction:o.default.FRACTION,pixels:o.default.PIXELS,insetPixels:o.default.PIXELS},M=(0,h.makeStructureNS)(L,{ExtendedData:Ve,Region:et,MultiGeometry:(0,h.makeObjectPropertySetter)(Ye,"geometry"),LineString:(0,h.makeObjectPropertySetter)(Ue,"geometry"),LinearRing:(0,h.makeObjectPropertySetter)(Be,"geometry"),Point:(0,h.makeObjectPropertySetter)(ze,"geometry"),Polygon:(0,h.makeObjectPropertySetter)(Je,"geometry"),Style:(0,h.makeObjectPropertySetter)(He),StyleMap:at,address:(0,h.makeObjectPropertySetter)(A.readString),description:(0,h.makeObjectPropertySetter)(A.readString),name:(0,h.makeObjectPropertySetter)(A.readString),open:(0,h.makeObjectPropertySetter)(A.readBoolean),phoneNumber:(0,h.makeObjectPropertySetter)(A.readString),styleUrl:(0,h.makeObjectPropertySetter)(ge),visibility:(0,h.makeObjectPropertySetter)(A.readBoolean)},(0,h.makeStructureNS)(_,{MultiTrack:(0,h.makeObjectPropertySetter)(Ee,"geometry"),Track:(0,h.makeObjectPropertySetter)(_e,"geometry")})),G=(0,h.makeStructureNS)(L,{ExtendedData:Ve,Region:et,Link:gt,address:(0,h.makeObjectPropertySetter)(A.readString),description:(0,h.makeObjectPropertySetter)(A.readString),name:(0,h.makeObjectPropertySetter)(A.readString),open:(0,h.makeObjectPropertySetter)(A.readBoolean),phoneNumber:(0,h.makeObjectPropertySetter)(A.readString),visibility:(0,h.makeObjectPropertySetter)(A.readBoolean)}),U=(0,h.makeStructureNS)(L,{href:(0,h.makeObjectPropertySetter)(Se)}),B=(0,h.makeStructureNS)(L,{LatLonAltBox:ut,Lod:dt}),q=(0,h.makeStructureNS)(L,["Document","Placemark"]),Y=(0,h.makeStructureNS)(L,{Document:(0,h.makeChildAppender)(Ot),Placemark:(0,h.makeChildAppender)(er)}),z=null;function X(){return z}var J,Z=null;function H(){return Z}var $,W=null;function K(){return W}var Q=null;function V(){return Q}var ee=null;function te(){return ee}var re,ae=null;function ne(){return ae}function oe(e){return 32/Math.min(e[0],e[1])}function ie(){w=[255,255,255,1],z=new t.default({color:w}),T=[20,2],C=o.default.PIXELS,F=o.default.PIXELS,R=[64,64],E="https://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png",Z=new n.default({anchor:T,anchorOrigin:i.default.BOTTOM_LEFT,anchorXUnits:C,anchorYUnits:F,crossOrigin:"anonymous",rotation:0,scale:oe(R),size:R,src:E}),J="NO_IMAGE",W=new S.default({color:w,width:1}),$=new S.default({color:[51,51,51,1],width:2}),Q=new y.default({font:"bold 16px Helvetica",fill:z,stroke:$,scale:.8}),ee=new g.default({fill:z,image:Z,text:Q,stroke:W,zIndex:0}),ae=[ee]}function le(e){return e}var ue=function(t){function r(e){var r=t.call(this)||this,a=e||{};return ae||ie(),r.dataProjection=(0,N.get)("EPSG:4326"),r.defaultStyle_=a.defaultStyle?a.defaultStyle:ae,r.extractStyles_=void 0===a.extractStyles||a.extractStyles,r.writeStyles_=void 0===a.writeStyles||a.writeStyles,r.sharedStyles_={},r.showPointNames_=void 0===a.showPointNames||a.showPointNames,r.crossOrigin_=void 0!==a.crossOrigin?a.crossOrigin:"anonymous",r.iconUrlFunction_=a.iconUrlFunction?a.iconUrlFunction:le,r.supportedMediaTypes=["application/vnd.google-earth.kml+xml"],r}return j(r,t),r.prototype.readDocumentOrFolder_=function(e,t){var r=(0,h.makeStructureNS)(L,{Document:(0,h.makeArrayExtender)(this.readDocumentOrFolder_,this),Folder:(0,h.makeArrayExtender)(this.readDocumentOrFolder_,this),Placemark:(0,h.makeArrayPusher)(this.readPlacemark_,this),Style:this.readSharedStyle_.bind(this),StyleMap:this.readSharedStyleMap_.bind(this)}),a=(0,h.pushParseAndPop)([],r,e,t,this);return a||void 0},r.prototype.readPlacemark_=function(t,r){var a=(0,h.pushParseAndPop)({geometry:null},M,t,r,this);if(a){var n=new e.default,o=t.getAttribute("id");null!==o&&n.setId(o);var i=r[0],l=a.geometry;if(l&&(0,O.transformGeometryWithOptions)(l,!1,i),n.setGeometry(l),delete a.geometry,this.extractStyles_){var u=de(a.Style,a.styleUrl,this.defaultStyle_,this.sharedStyles_,this.showPointNames_);n.setStyle(u)}return delete a.Style,n.setProperties(a,!0),n}},r.prototype.readSharedStyle_=function(e,t){var r=e.getAttribute("id");if(null!==r){var a=He.call(this,e,t);if(a){var n=void 0,o=e.baseURI;if(o&&"about:blank"!=o||(o=window.location.href),o)n=new URL("#"+r,o).href;else n="#"+r;this.sharedStyles_[n]=a}}},r.prototype.readSharedStyleMap_=function(e,t){var r=e.getAttribute("id");if(null!==r){var a=ve.call(this,e,t);if(a){var n,o=e.baseURI;if(o&&"about:blank"!=o||(o=window.location.href),o)n=new URL("#"+r,o).href;else n="#"+r;this.sharedStyles_[n]=a}}},r.prototype.readFeatureFromNode=function(e,t){if(!(0,P.includes)(L,e.namespaceURI))return null;var r=this.readPlacemark_(e,[this.getReadOptions(e,t)]);return r||null}
533,r.prototype.readFeaturesFromNode=function(e,t){if(!(0,P.includes)(L,e.namespaceURI))return[];var r,a=e.localName;if("Document"==a||"Folder"==a)return(r=this.readDocumentOrFolder_(e,[this.getReadOptions(e,t)]))||[];if("Placemark"==a){var n=this.readPlacemark_(e,[this.getReadOptions(e,t)]);return n?[n]:[]}if("kml"==a){r=[];for(var o=e.firstElementChild;o;o=o.nextElementSibling){var i=this.readFeaturesFromNode(o,t);i&&(0,P.extend)(r,i)}return r}return[]},r.prototype.readName=function(e){if(e){if("string"==typeof e){var t=(0,h.parse)(e);return this.readNameFromDocument(t)}return(0,h.isDocument)(e)?this.readNameFromDocument(e):this.readNameFromNode(e)}},r.prototype.readNameFromDocument=function(e){for(var t=e.firstChild;t;t=t.nextSibling)if(t.nodeType==Node.ELEMENT_NODE){var r=this.readNameFromNode(t);if(r)return r}},r.prototype.readNameFromNode=function(e){for(var t=e.firstElementChild;t;t=t.nextElementSibling)if((0,P.includes)(L,t.namespaceURI)&&"name"==t.localName)return(0,A.readString)(t);for(t=e.firstElementChild;t;t=t.nextElementSibling){var r=t.localName;if((0,P.includes)(L,t.namespaceURI)&&("Document"==r||"Folder"==r||"Placemark"==r||"kml"==r)){var a=this.readNameFromNode(t);if(a)return a}}},r.prototype.readNetworkLinks=function(e){var t=[];if("string"==typeof e){var r=(0,h.parse)(e);(0,P.extend)(t,this.readNetworkLinksFromDocument(r))}else(0,h.isDocument)(e)?(0,P.extend)(t,this.readNetworkLinksFromDocument(e)):(0,P.extend)(t,this.readNetworkLinksFromNode(e));return t},r.prototype.readNetworkLinksFromDocument=function(e){for(var t=[],r=e.firstChild;r;r=r.nextSibling)r.nodeType==Node.ELEMENT_NODE&&(0,P.extend)(t,this.readNetworkLinksFromNode(r));return t},r.prototype.readNetworkLinksFromNode=function(e){for(var t=[],r=e.firstElementChild;r;r=r.nextElementSibling)if((0,P.includes)(L,r.namespaceURI)&&"NetworkLink"==r.localName){var a=(0,h.pushParseAndPop)({},G,r,[]);t.push(a)}for(r=e.firstElementChild;r;r=r.nextElementSibling){var n=r.localName;!(0,P.includes)(L,r.namespaceURI)||"Document"!=n&&"Folder"!=n&&"kml"!=n||(0,P.extend)(t,this.readNetworkLinksFromNode(r))}return t},r.prototype.readRegion=function(e){var t=[];if("string"==typeof e){var r=(0,h.parse)(e);(0,P.extend)(t,this.readRegionFromDocument(r))}else(0,h.isDocument)(e)?(0,P.extend)(t,this.readRegionFromDocument(e)):(0,P.extend)(t,this.readRegionFromNode(e));return t},r.prototype.readRegionFromDocument=function(e){for(var t=[],r=e.firstChild;r;r=r.nextSibling)r.nodeType==Node.ELEMENT_NODE&&(0,P.extend)(t,this.readRegionFromNode(r));return t},r.prototype.readRegionFromNode=function(e){for(var t=[],r=e.firstElementChild;r;r=r.nextElementSibling)if((0,P.includes)(L,r.namespaceURI)&&"Region"==r.localName){var a=(0,h.pushParseAndPop)({},B,r,[]);t.push(a)}for(r=e.firstElementChild;r;r=r.nextElementSibling){var n=r.localName;!(0,P.includes)(L,r.namespaceURI)||"Document"!=n&&"Folder"!=n&&"kml"!=n||(0,P.extend)(t,this.readRegionFromNode(r))}return t},r.prototype.writeFeaturesNode=function(e,t){t=this.adaptOptions(t);var r=(0,h.createElementNS)(L[4],"kml"),a="http://www.w3.org/2000/xmlns/";r.setAttributeNS(a,"xmlns:gx",_[0]),r.setAttributeNS(a,"xmlns:xsi",h.XML_SCHEMA_INSTANCE_URI),r.setAttributeNS(h.XML_SCHEMA_INSTANCE_URI,"xsi:schemaLocation",D);var n={node:r},o={};e.length>1?o.Document=e:1==e.length&&(o.Placemark=e[0]);var i=q[r.namespaceURI],l=(0,h.makeSequence)(o,i);return(0,h.pushSerializeAndPop)(n,Y,h.OBJECT_PROPERTY_NODE_FACTORY,l,[t],i,this),r},r}(f.default);function se(e,t){var r=[0,0],a="start",n=e.getImage();if(n){var o=n.getSize();if(o&&2==o.length){var i=n.getScaleArray(),l=n.getAnchor();r[0]=i[0]*(o[0]-l[0]),r[1]=i[1]*(o[1]/2-l[1]),a="left"}}var u=e.getText();return u?((u=u.clone()).setFont(u.getFont()||Q.getFont()),u.setScale(u.getScale()||Q.getScale()),u.setFill(u.getFill()||Q.getFill()),u.setStroke(u.getStroke()||$)):u=Q.clone(),u.setText(t),u.setOffsetX(r[0]),u.setOffsetY(r[1]),u.setTextAlign(a),new g.default({image:n,text:u})}function de(e,t,a,n,o){return function(i,l){var u=o,s="",d=[];if(u){var c=i.getGeometry();if(c)if(c instanceof r.default)u=(d=c.getGeometriesArrayRecursive().filter(function(e){var t=e.getType();return"Point"===t||"MultiPoint"===t})).length>0;else{var m=c.getType();u="Point"===m||"MultiPoint"===m}}u&&(s=i.get("name"),(u=u&&!!s)&&s.search(/&[^&]+;/)>-1&&(re||(re=document.createElement("textarea")),re.innerHTML=s,s=re.value));var p=a;if(e?p=e:t&&(p=ce(t,a,n)),u){var S=se(p[0],s);return d.length>0?(S.setGeometry(new r.default(d)),[S,new g.default({geometry:p[0].getGeometry(),image:null,fill:p[0].getFill(),stroke:p[0].getStroke(),text:null})].concat(p.slice(1))):S}return p}}function ce(e,t,r){return Array.isArray(e)?e:"string"==typeof e?ce(r[e],t,r):t}function me(e){var t=(0,h.getAllTextContent)(e,!1),r=/^\s*#?\s*([0-9A-Fa-f]{8})\s*$/.exec(t);if(r){var a=r[1];return[parseInt(a.substr(6,2),16),parseInt(a.substr(4,2),16),parseInt(a.substr(2,2),16),parseInt(a.substr(0,2),16)/255]}}function pe(e){var t=(0,h.getAllTextContent)(e,!1),r=[];t=t.replace(/\s*,\s*/g,",");for(var a,n=/^\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?),([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)(?:\s+|,|$)(?:([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)(?:\s+|$))?\s*/i;a=n.exec(t);){var o=parseFloat(a[1]),i=parseFloat(a[2]),l=a[3]?parseFloat(a[3]):0;r.push(o,i,l),t=t.substr(a[0].length)}if(""===t)return r}
533function Se(e){var t=(0,h.getAllTextContent)(e,!1).trim(),r=e.baseURI;return r&&"about:blank"!=r||(r=window.location.href),r?new URL(t,r).href:t}function ge(e){var t=(0,h.getAllTextContent)(e,!1).trim().replace(/^(?!.*#)/,"#"),r=e.baseURI;return r&&"about:blank"!=r||(r=window.location.href),r?new URL(t,r).href:t}function ye(e){var t,r=e.getAttribute("xunits"),a=e.getAttribute("yunits");return t="insetPixels"!==r?"insetPixels"!==a?i.default.BOTTOM_LEFT:i.default.TOP_LEFT:"insetPixels"!==a?i.default.BOTTOM_RIGHT:i.default.TOP_RIGHT,{x:parseFloat(e.getAttribute("x")),xunits:I[r],y:parseFloat(e.getAttribute("y")),yunits:I[a],origin:t}}function fe(e){return(0,A.readDecimal)(e)}var he=(0,h.makeStructureNS)(L,{Pair:rt});function ve(e,t){return(0,h.pushParseAndPop)(void 0,he,e,t,this)}var ke=(0,h.makeStructureNS)(L,{Icon:(0,h.makeObjectPropertySetter)(De),color:(0,h.makeObjectPropertySetter)(me),heading:(0,h.makeObjectPropertySetter)(A.readDecimal),hotSpot:(0,h.makeObjectPropertySetter)(ye),scale:(0,h.makeObjectPropertySetter)(fe)});function Pe(e,t){var r=(0,h.pushParseAndPop)({},ke,e,t);if(r){var a,o,u,s,d=t[t.length-1],c="Icon"in r?r.Icon:{},m=!("Icon"in r)||Object.keys(c).length>0,p=c.href;p?a=p:m&&(a=E);var S,g=i.default.BOTTOM_LEFT,y=r.hotSpot;y?(o=[y.x,y.y],u=y.xunits,s=y.yunits,g=y.origin):/^http:\/\/maps\.(?:google|gstatic)\.com\//.test(a)&&(/pushpin/.test(a)?(o=T,u=C,s=F):/arrow-reverse/.test(a)?(o=[54,42],u=C,s=F):/paddle/.test(a)&&(o=[32,1],u=C,s=F));var f,v=c.x,k=c.y;void 0!==v&&void 0!==k&&(S=[v,k]);var P,N=c.w,A=c.h;void 0!==N&&void 0!==A&&(f=[N,A]);var O=r.heading;void 0!==O&&(P=(0,x.toRadians)(O));var b=r.scale,w=r.color;if(m){a==E&&(f=R);var j=new n.default({anchor:o,anchorOrigin:g,anchorXUnits:u,anchorYUnits:s,crossOrigin:this.crossOrigin_,offset:S,offsetOrigin:i.default.BOTTOM_LEFT,rotation:P,scale:b,size:f,src:this.iconUrlFunction_(a),color:w}),_=j.getScaleArray()[0],L=j.getSize();if(null===L){var D=j.getImageState();if(D===l.default.IDLE||D===l.default.LOADING){var I=function(){var e=j.getImageState();if(e!==l.default.IDLE&&e!==l.default.LOADING){var t=j.getSize();if(t&&2==t.length){var r=oe(t);j.setScale(_*r)}j.unlistenImageChange(I)}};j.listenImageChange(I),D===l.default.IDLE&&j.load()}}else if(2==L.length){var M=oe(L);j.setScale(_*M)}d.imageStyle=j}else d.imageStyle=J}}var Ne=(0,h.makeStructureNS)(L,{color:(0,h.makeObjectPropertySetter)(me),scale:(0,h.makeObjectPropertySetter)(fe)});function Ae(e,r){var a=(0,h.pushParseAndPop)({},Ne,e,r);if(a){var n=r[r.length-1],o=new y.default({fill:new t.default({color:"color"in a?a.color:w}),scale:a.scale});n.textStyle=o}}var xe=(0,h.makeStructureNS)(L,{color:(0,h.makeObjectPropertySetter)(me),width:(0,h.makeObjectPropertySetter)(A.readDecimal)});function Oe(e,t){var r=(0,h.pushParseAndPop)({},xe,e,t);if(r){var a=t[t.length-1],n=new S.default({color:"color"in r?r.color:w,width:"width"in r?r.width:1});a.strokeStyle=n}}var be=(0,h.makeStructureNS)(L,{color:(0,h.makeObjectPropertySetter)(me),fill:(0,h.makeObjectPropertySetter)(A.readBoolean),outline:(0,h.makeObjectPropertySetter)(A.readBoolean)});function we(e,r){var a=(0,h.pushParseAndPop)({},be,e,r);if(a){var n=r[r.length-1],o=new t.default({color:"color"in a?a.color:w});n.fillStyle=o;var i=a.fill;void 0!==i&&(n.fill=i);var l=a.outline;void 0!==l&&(n.outline=l)}}var Te=(0,h.makeStructureNS)(L,{coordinates:(0,h.makeReplacer)(pe)});function Ce(e,t){return(0,h.pushParseAndPop)(null,Te,e,t)}function Fe(e,t){var r=t[t.length-1].coordinates,a=(0,h.getAllTextContent)(e,!1),n=/^\s*([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s+([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s+([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s*$/i.exec(a);if(n){var o=parseFloat(n[1]),i=parseFloat(n[2]),l=parseFloat(n[3]);r.push([o,i,l])}else r.push([])}var Re=(0,h.makeStructureNS)(_,{Track:(0,h.makeArrayPusher)(_e)});function Ee(e,t){var r=(0,h.pushParseAndPop)([],Re,e,t);if(r)return new s.default(r)}var je=(0,h.makeStructureNS)(L,{when:yt},(0,h.makeStructureNS)(_,{coord:Fe}));function _e(e,t){var r=(0,h.pushParseAndPop)({coordinates:[],whens:[]},je,e,t);if(r){for(var n=[],o=r.coordinates,i=r.whens,l=0,s=Math.min(o.length,i.length);l<s;++l)3==o[l].length&&n.push(o[l][0],o[l][1],o[l][2],i[l]);return new u.default(n,a.default.XYZM)}}var Le=(0,h.makeStructureNS)(L,{href:(0,h.makeObjectPropertySetter)(Se)},(0,h.makeStructureNS)(_,{x:(0,h.makeObjectPropertySetter)(A.readDecimal),y:(0,h.makeObjectPropertySetter)(A.readDecimal),w:(0,h.makeObjectPropertySetter)(A.readDecimal),h:(0,h.makeObjectPropertySetter)(A.readDecimal)}));function De(e,t){var r=(0,h.pushParseAndPop)({},Le,e,t);return r||null}var Ie=(0,h.makeStructureNS)(L,{coordinates:(0,h.makeReplacer)(pe)}
533);function Me(e,t){return(0,h.pushParseAndPop)(null,Ie,e,t)}var Ge=(0,h.makeStructureNS)(L,{extrude:(0,h.makeObjectPropertySetter)(A.readBoolean),tessellate:(0,h.makeObjectPropertySetter)(A.readBoolean),altitudeMode:(0,h.makeObjectPropertySetter)(A.readString)});function Ue(e,t){var r=(0,h.pushParseAndPop)({},Ge,e,t),n=Me(e,t);if(n){var o=new u.default(n,a.default.XYZ);return o.setProperties(r,!0),o}}function Be(e,t){var r=(0,h.pushParseAndPop)({},Ge,e,t),n=Me(e,t);if(n){var o=new p.default(n,a.default.XYZ,[n.length]);return o.setProperties(r,!0),o}}var qe=(0,h.makeStructureNS)(L,{LineString:(0,h.makeArrayPusher)(Ue),LinearRing:(0,h.makeArrayPusher)(Be),MultiGeometry:(0,h.makeArrayPusher)(Ye),Point:(0,h.makeArrayPusher)(ze),Polygon:(0,h.makeArrayPusher)(Je)});function Ye(e,t){var a,n=(0,h.pushParseAndPop)([],qe,e,t);if(!n)return null;if(0===n.length)return new r.default(n);for(var o,i=!0,l=n[0].getType(),u=1,m=n.length;u<m;++u)if((o=n[u]).getType()!=l){i=!1;break}if(i){var p=void 0,S=void 0;if("Point"==l){var g=n[0];p=g.getLayout(),S=g.getFlatCoordinates();for(u=1,m=n.length;u<m;++u)o=n[u],(0,P.extend)(S,o.getFlatCoordinates());$e(a=new d.default(S,p),n)}else"LineString"==l?$e(a=new s.default(n),n):"Polygon"==l?$e(a=new c.default(n),n):"GeometryCollection"==l?a=new r.default(n):(0,k.assert)(!1,37)}else a=new r.default(n);return a}function ze(e,t){var r=(0,h.pushParseAndPop)({},Ge,e,t),n=Me(e,t);if(n){var o=new m.default(n,a.default.XYZ);return o.setProperties(r,!0),o}}var Xe=(0,h.makeStructureNS)(L,{innerBoundaryIs:mt,outerBoundaryIs:St});function Je(e,t){var r=(0,h.pushParseAndPop)({},Ge,e,t),n=(0,h.pushParseAndPop)([null],Xe,e,t);if(n&&n[0]){for(var o=n[0],i=[o.length],l=1,u=n.length;l<u;++l)(0,P.extend)(o,n[l]),i.push(o.length);var s=new p.default(o,a.default.XYZ,i);return s.setProperties(r,!0),s}}var Ze=(0,h.makeStructureNS)(L,{IconStyle:Pe,LabelStyle:Ae,LineStyle:Oe,PolyStyle:we});function He(e,t){var a=(0,h.pushParseAndPop)({},Ze,e,t,this);if(!a)return null;var n,o="fillStyle"in a?a.fillStyle:z,i=a.fill;void 0===i||i||(o=null),"imageStyle"in a?a.imageStyle!=J&&(n=a.imageStyle):n=Z;var l="textStyle"in a?a.textStyle:Q,u="strokeStyle"in a?a.strokeStyle:W,s=a.outline;return void 0===s||s?[new g.default({fill:o,image:n,stroke:u,text:l,zIndex:void 0})]:[new g.default({geometry:function(e){var t=e.getGeometry(),a=t.getType();if("GeometryCollection"===a){var n=t;return new r.default(n.getGeometriesArrayRecursive().filter(function(e){var t=e.getType();return"Polygon"!==t&&"MultiPolygon"!==t}))}if("Polygon"!==a&&"MultiPolygon"!==a)return t},fill:o,image:n,stroke:u,text:l,zIndex:void 0}),new g.default({geometry:function(e){var t=e.getGeometry(),a=t.getType();if("GeometryCollection"===a){var n=t;return new r.default(n.getGeometriesArrayRecursive().filter(function(e){var t=e.getType();return"Polygon"===t||"MultiPolygon"===t}))}if("Polygon"===a||"MultiPolygon"===a)return t},fill:o,stroke:null,zIndex:void 0})]}function $e(e,t){var r,a,n,o=t.length,i=new Array(t.length),l=new Array(t.length),u=new Array(t.length);r=!1,a=!1,n=!1;for(var s=0;s<o;++s){var d=t[s];i[s]=d.get("extrude"),l[s]=d.get("tessellate"),u[s]=d.get("altitudeMode"),r=r||void 0!==i[s],a=a||void 0!==l[s],n=n||u[s]}r&&e.set("extrude",i),a&&e.set("tessellate",l),n&&e.set("altitudeMode",u)}var We=(0,h.makeStructureNS)(L,{displayName:(0,h.makeObjectPropertySetter)(A.readString),value:(0,h.makeObjectPropertySetter)(A.readString)});function Ke(e,t){var r=e.getAttribute("name");(0,h.parseNode)(We,e,t);var a=t[t.length-1];r&&a.displayName?a[r]={value:a.value,displayName:a.displayName,toString:function(){return a.value}}:null!==r?a[r]=a.value:null!==a.displayName&&(a[a.displayName]=a.value),delete a.value}var Qe=(0,h.makeStructureNS)(L,{Data:Ke,SchemaData:ot});function Ve(e,t){(0,h.parseNode)(Qe,e,t)}function et(e,t){(0,h.parseNode)(B,e,t)}var tt=(0,h.makeStructureNS)(L,{Style:(0,h.makeObjectPropertySetter)(He),key:(0,h.makeObjectPropertySetter)(A.readString),styleUrl:(0,h.makeObjectPropertySetter)(ge)});function rt(e,t){var r=(0,h.pushParseAndPop)({},tt,e,t,this);if(r){var a=r.key;if(a&&"normal"==a){var n=r.styleUrl;n&&(t[t.length-1]=n);var o=r.Style;o&&(t[t.length-1]=o)}}}function at(e,t){var r=ve.call(this,e,t);if(r){var a=t[t.length-1];Array.isArray(r)?a.Style=r:"string"==typeof r?a.styleUrl=r:(0,k.assert)(!1,38)}}var nt=(0,h.makeStructureNS)(L,{SimpleData:it});function ot(e,t){(0,h.parseNode)(nt,e,t)}function it(e,t){var r=e.getAttribute("name");if(null!==r){var a=(0,A.readString)(e);t[t.length-1][r]=a}}var lt=(0,h.makeStructureNS)(L,{altitudeMode:(0,h.makeObjectPropertySetter)(A.readString),minAltitude:(0,h.makeObjectPropertySetter)(A.readDecimal),maxAltitude:(0,h.makeObjectPropertySetter)(A.readDecimal),north:(0,h.makeObjectPropertySetter)(A.readDecimal),south:(0,h.makeObjectPropertySetter)(A.readDecimal),east:(0,h.makeObjectPropertySetter)(A.readDecimal),west:(0,h.makeObjectPropertySetter)(A.readDecimal)});function ut(e,t){var r=(0,h.pushParseAndPop)({},lt,e,t);if(r){var a=t[t.length-1],n=[parseFloat(r.west),parseFloat(r.south),parseFloat(r.east),parseFloat(r.north)];a.extent=n,a.altitudeMode=r.altitudeMode,a.minAltitude=parseFloat(r.minAltitude),a.maxAltitude=parseFloat(r.maxAltitude)}}var st=(0,h.makeStructureNS)(L,{minLodPixels:(0,h.makeObjectPropertySetter)(A.readDecimal),maxLodPixels:(0,h.makeObjectPropertySetter)(A.readDecimal),minFadeExtent:(0,h.makeObjectPropertySetter)(A.readDecimal),maxFadeExtent:(0,h.makeObjectPropertySetter)(A.readDecimal)});function dt(e,t){var r=(0,h.pushParseAndPop)({},st,e,t);if(r){var a=t[t.length-1];a.minLodPixels=parseFloat(r.minLodPixels),a.maxLodPixels=parseFloat(r.maxLodPixels),a.minFadeExtent=parseFloat(r.minFadeExtent),a.maxFadeExtent=parseFloat(r.maxFadeExtent)}}var ct=(0,h.makeStructureNS)(L,{LinearRing:(0,h.makeArrayPusher)(Ce)});function mt(e,t){var r=(0,h.pushParseAndPop)([],ct,e,t);if(r.length>0){var a=t[t.length-1];a.push.apply(a,r)}}var pt=(0,h.makeStructureNS)(L,{LinearRing:(0,h.makeReplacer)(Ce)});function St(e,t){var r=(0,h.pushParseAndPop)(void 0,pt,e,t);r&&(t[t.length-1][0]=r)}function gt(e,t){(0,h.parseNode)(U,e,t)}function yt(e,t){var r=t[t.length-1].whens,a=(0,h.getAllTextContent)(e,!1),n=Date.parse(a);r.push(isNaN(n)?0:n)}function ft(e,t){for(var r=(0,v.asArray)(t),a=[255*(4==r.length?r[3]:1),r[2],r[1],r[0]],n=0;n<4;++n){var o=Math.floor(a[n]).toString(16);a[n]=1==o.length?"0"+o:o}(0,A.writeStringTextNode)(e,a.join(""))}function ht(e,t,r){var n,o=r[r.length-1],i=o.layout,l=o.stride;i==a.default.XY||i==a.default.XYM?n=2:i==a.default.XYZ||i==a.default.XYZM?n=3:(0,k.assert)(!1,34);var u=t.length,s="";if(u>0){s+=t[0];for(var d=1;d<n;++d)s+=","+t[d];for(var c=l;c<u;c+=l){s+=" "+t[c];for(d=1;d<n;++d)s+=","+t[c+d]}}(0,A.writeStringTextNode)(e,s)}var vt=(0,h.makeStructureNS)(L,{Data:(0,h.makeChildAppender)(kt),value:(0,h.makeChildAppender)(Nt),displayName:(0,h.makeChildAppender)(Pt)});function kt(e,t,r){e.setAttribute("name",t.name);var a={node:e},n=t.value;"object"==typeof n?(null!==n&&n.displayName&&(0,h.pushSerializeAndPop)(a,vt,h.OBJ
533ECT_PROPERTY_NODE_FACTORY,[n.displayName],r,["displayName"]),null!==n&&n.value&&(0,h.pushSerializeAndPop)(a,vt,h.OBJECT_PROPERTY_NODE_FACTORY,[n.value],r,["value"])):(0,h.pushSerializeAndPop)(a,vt,h.OBJECT_PROPERTY_NODE_FACTORY,[n],r,["value"])}function Pt(e,t){(0,A.writeCDATASection)(e,t)}function Nt(e,t){(0,A.writeStringTextNode)(e,t)}var At=(0,h.makeStructureNS)(L,{Placemark:(0,h.makeChildAppender)(er)}),xt=function(e,t,r){var a=t[t.length-1].node;return(0,h.createElementNS)(a.namespaceURI,"Placemark")};function Ot(e,t,r){var a={node:e};(0,h.pushSerializeAndPop)(a,At,xt,t,r,void 0,this)}var bt=(0,h.makeSimpleNodeFactory)("Data");function wt(e,t,r){for(var a={node:e},n=t.names,o=t.values,i=n.length,l=0;l<i;l++)(0,h.pushSerializeAndPop)(a,vt,bt,[{name:n[l],value:o[l]}],r)}var Tt=(0,h.makeStructureNS)(L,["href"],(0,h.makeStructureNS)(_,["x","y","w","h"])),Ct=(0,h.makeStructureNS)(L,{href:(0,h.makeChildAppender)(A.writeStringTextNode)},(0,h.makeStructureNS)(_,{x:(0,h.makeChildAppender)(A.writeDecimalTextNode),y:(0,h.makeChildAppender)(A.writeDecimalTextNode),w:(0,h.makeChildAppender)(A.writeDecimalTextNode),h:(0,h.makeChildAppender)(A.writeDecimalTextNode)})),Ft=function(e,t,r){return(0,h.createElementNS)(_[0],"gx:"+r)};function Rt(e,t,r){var a={node:e},n=r[r.length-1].node,o=Tt[n.namespaceURI],i=(0,h.makeSequence)(t,o);(0,h.pushSerializeAndPop)(a,Ct,h.OBJECT_PROPERTY_NODE_FACTORY,i,r,o),o=Tt[_[0]],i=(0,h.makeSequence)(t,o),(0,h.pushSerializeAndPop)(a,Ct,Ft,i,r,o)}var Et=(0,h.makeStructureNS)(L,["scale","heading","Icon","color","hotSpot"]),jt=(0,h.makeStructureNS)(L,{Icon:(0,h.makeChildAppender)(Rt),color:(0,h.makeChildAppender)(ft),heading:(0,h.makeChildAppender)(A.writeDecimalTextNode),hotSpot:(0,h.makeChildAppender)(gr),scale:(0,h.makeChildAppender)(cr)});function _t(e,t,r){var a={node:e},n={},i=t.getSrc(),l=t.getSize(),u=t.getImageSize(),s={href:i};if(l){s.w=l[0],s.h=l[1];var d=t.getAnchor(),c=t.getOrigin();if(c&&u&&0!==c[0]&&c[1]!==l[1]&&(s.x=c[0],s.y=u[1]-(c[1]+l[1])),d&&(d[0]!==l[0]/2||d[1]!==l[1]/2)){var m={x:d[0],xunits:o.default.PIXELS,y:l[1]-d[1],yunits:o.default.PIXELS};n.hotSpot=m}}n.Icon=s;var p=t.getScaleArray()[0],S=l;(null===S&&(S=R),2==S.length)&&(p/=oe(S));1!==p&&(n.scale=p);var g=t.getRotation();0!==g&&(n.heading=g);var y=t.getColor();y&&(n.color=y);var f=r[r.length-1].node,v=Et[f.namespaceURI],k=(0,h.makeSequence)(n,v);(0,h.pushSerializeAndPop)(a,jt,h.OBJECT_PROPERTY_NODE_FACTORY,k,r,v)}var Lt=(0,h.makeStructureNS)(L,["color","scale"]),Dt=(0,h.makeStructureNS)(L,{color:(0,h.makeChildAppender)(ft),scale:(0,h.makeChildAppender)(cr)});function It(e,t,r){var a={node:e},n={},o=t.getFill();o&&(n.color=o.getColor());var i=t.getScale();i&&1!==i&&(n.scale=i);var l=r[r.length-1].node,u=Lt[l.namespaceURI],s=(0,h.makeSequence)(n,u);(0,h.pushSerializeAndPop)(a,Dt,h.OBJECT_PROPERTY_NODE_FACTORY,s,r,u)}var Mt=(0,h.makeStructureNS)(L,["color","width"]),Gt=(0,h.makeStructureNS)(L,{color:(0,h.makeChildAppender)(ft),width:(0,h.makeChildAppender)(A.writeDecimalTextNode)});function Ut(e,t,r){var a={node:e},n={color:t.getColor(),width:Number(t.getWidth())||1},o=r[r.length-1].node,i=Mt[o.namespaceURI],l=(0,h.makeSequence)(n,i);(0,h.pushSerializeAndPop)(a,Gt,h.OBJECT_PROPERTY_NODE_FACTORY,l,r,i)}var Bt={Point:"Point",LineString:"LineString",LinearRing:"LinearRing",Polygon:"Polygon",MultiPoint:"MultiGeometry",MultiLineString:"MultiGeometry",MultiPolygon:"MultiGeometry",GeometryCollection:"MultiGeometry"},qt=function(e,t,r){if(e){var a=t[t.length-1].node;return(0,h.createElementNS)(a.namespaceURI,Bt[e.getType()])}},Yt=(0,h.makeSimpleNodeFactory)("Point"),zt=(0,h.makeSimpleNodeFactory)("LineString"),Xt=(0,h.makeSimpleNodeFactory)("LinearRing"),Jt=(0,h.makeSimpleNodeFactory)("Polygon"),Zt=(0,h.makeStructureNS)(L,{LineString:(0,h.makeChildAppender)(ar),Point:(0,h.makeChildAppender)(ar),Polygon:(0,h.makeChildAppender)(ur),GeometryCollection:(0,h.makeChildAppender)(Ht)});function Ht(e,t,r){var a,n={node:e},o=t.getType(),i=[];"GeometryCollection"===o?(t.getGeometriesArrayRecursive().forEach(function(e){var t=e.getType();"MultiPoint"===t?i=i.concat(e.getPoints()):"MultiLineString"===t?i=i.concat(e.getLineStrings()):"MultiPolygon"===t?i=i.concat(e.getPolygons()):"Point"===t||"LineString"===t||"Polygon"===t?i.push(e):(0,k.assert)(!1,39)}),a=qt):"MultiPoint"===o?(i=t.getPoints(),a=Yt):"MultiLineString"===o?(i=t.getLineStrings(),a=zt):"MultiPolygon"===o?(i=t.getPolygons(),a=Jt):(0,k.assert)(!1,39),(0,h.pushSerializeAndPop)(n,Zt,a,i,r)}var $t=(0,h.makeStructureNS)(L,{LinearRing:(0,h.makeChildAppender)(ar)});function Wt(e,t,r){var a={node:e};(0,h.pushSerializeAndPop)(a,$t,Xt,[t],r)}var Kt=(0,h.makeStructureNS)(L,{ExtendedData:(0,h.makeChildAppender)(wt),MultiGeometry:(0,h.makeChildAppender)(Ht),LineString:(0,h.makeChildAppender)(ar),LinearRing:(0,h.makeChildAppender)(ar),Point:(0,h.makeChildAppender)(ar),Polygon:(0,h.makeChildAppender)(ur),Style:(0,h.makeChildAppender)(Sr),address:(0,h.makeChildAppender)(A.writeStringTextNode),description:(0,h.makeChildAppender)(A.writeStringTextNode),name:(0,h.makeChildAppender)(A.writeStringTextNode),open:(0,h.makeChildAppender)(A.writeBooleanTextNode),phoneNumber:(0,h.makeChildAppender)(A.writeStringTextNode),styleUrl:(0,h.makeChildAppender)(A.writeStringTextNode),visibility:(0,h.makeChildAppender)(A.writeBooleanTextNode)}),Qt=(0,h.makeStructureNS)(L,["name","open","visibility","address","phoneNumber","description","styleUrl","Style"]),Vt=(0,h.makeSimpleNodeFactory)("ExtendedData");function er(e,t,r){var a={node:e};t.getId()&&e.setAttribute("id",t.getId());var n=t.getProperties(),o={address:1,description:1,name:1,open:1,phoneNumber:1,styleUrl:1,visibility:1};o[t.getGeometryName()]=1;var i=Object.keys(n||{}).sort().filter(function(e){return!o[e]}),l=t.getStyleFunction();if(l){var u=l(t,0);if(u){var s=Array.isArray(u)?u:[u],d=s;if(t.getGeometry()&&(d=s.filter(function(e){var r=e.getGeometryFunction()(t);if(r){var a=r.getType();return"GeometryCollection"===a?r.getGeometriesArrayRecursive().filter(function(e){var t=e.getType();return"Point"===t||"MultiPoint"===t}).length:"Point"===a||"MultiPoint"===a}})),this.writeStyles_){var c=s,m=s;t.getGeometry()&&(c=s.filter(function(e){var r=e.getGeometryFunction()(t);if(r){var a=r.getType();return"GeometryCollection"===a?r.getGeometriesArrayRecursive().filter(function(e){var t=e.getType();return"LineString"===t||"MultiLineString"===t}).length:"LineString"===a||"MultiLineString"===a}}),m=s.filter(function(e){var r=e.getGeometryFunction()(t);if(r){var a=r.getType();return"GeometryCollection"===a?r.getGeometriesArrayRecursive().filter(function(e){var t=e.getType();return"Polygon"===t||"MultiPolygon"===t}).length:"Polygon"===a||"MultiPolygon"===a}})),n.Style={pointStyles:d,lineStyles:c,polyStyles:m}}if(d.length&&void 0===n.name){var p=d[0].getText();p&&(n.name=p.getText())}}}var S=r[r.length-1].node,g=Qt[S.namespaceURI],y=(0,h.makeSequence)(n,g);
533if((0,h.pushSerializeAndPop)(a,Kt,h.OBJECT_PROPERTY_NODE_FACTORY,y,r,g),i.length>0){var f={names:i,values:(0,h.makeSequence)(n,i)};(0,h.pushSerializeAndPop)(a,Kt,Vt,[f],r)}var v=r[0],k=t.getGeometry();k&&(k=(0,O.transformGeometryWithOptions)(k,!0,v)),(0,h.pushSerializeAndPop)(a,Kt,qt,[k],r)}var tr=(0,h.makeStructureNS)(L,["extrude","tessellate","altitudeMode","coordinates"]),rr=(0,h.makeStructureNS)(L,{extrude:(0,h.makeChildAppender)(A.writeBooleanTextNode),tessellate:(0,h.makeChildAppender)(A.writeBooleanTextNode),altitudeMode:(0,h.makeChildAppender)(A.writeStringTextNode),coordinates:(0,h.makeChildAppender)(ht)});function ar(e,t,r){var a=t.getFlatCoordinates(),n={node:e};n.layout=t.getLayout(),n.stride=t.getStride();var o=t.getProperties();o.coordinates=a;var i=r[r.length-1].node,l=tr[i.namespaceURI],u=(0,h.makeSequence)(o,l);(0,h.pushSerializeAndPop)(n,rr,h.OBJECT_PROPERTY_NODE_FACTORY,u,r,l)}var nr=(0,h.makeStructureNS)(L,["color","fill","outline"]),or=(0,h.makeStructureNS)(L,{outerBoundaryIs:(0,h.makeChildAppender)(Wt),innerBoundaryIs:(0,h.makeChildAppender)(Wt)}),ir=(0,h.makeSimpleNodeFactory)("innerBoundaryIs"),lr=(0,h.makeSimpleNodeFactory)("outerBoundaryIs");function ur(e,t,r){var a=t.getLinearRings(),n=a.shift(),o={node:e};(0,h.pushSerializeAndPop)(o,or,ir,a,r),(0,h.pushSerializeAndPop)(o,or,lr,[n],r)}var sr=(0,h.makeStructureNS)(L,{color:(0,h.makeChildAppender)(ft),fill:(0,h.makeChildAppender)(A.writeBooleanTextNode),outline:(0,h.makeChildAppender)(A.writeBooleanTextNode)});function dr(e,t,r){var a={node:e},n=t.getFill(),o=t.getStroke(),i={color:n?n.getColor():void 0,fill:!!n&&void 0,outline:!!o&&void 0},l=r[r.length-1].node,u=nr[l.namespaceURI],s=(0,h.makeSequence)(i,u);(0,h.pushSerializeAndPop)(a,sr,h.OBJECT_PROPERTY_NODE_FACTORY,s,r,u)}function cr(e,t){(0,A.writeDecimalTextNode)(e,Math.round(1e6*t)/1e6)}var mr=(0,h.makeStructureNS)(L,["IconStyle","LabelStyle","LineStyle","PolyStyle"]),pr=(0,h.makeStructureNS)(L,{IconStyle:(0,h.makeChildAppender)(_t),LabelStyle:(0,h.makeChildAppender)(It),LineStyle:(0,h.makeChildAppender)(Ut),PolyStyle:(0,h.makeChildAppender)(dr)});function Sr(e,t,r){var a,n={node:e},o={};if(t.pointStyles.length){var i=t.pointStyles[0].getText();i&&(o.LabelStyle=i);var l=t.pointStyles[0].getImage();l&&"function"==typeof l.getSrc&&(o.IconStyle=l)}t.lineStyles.length&&((a=t.lineStyles[0].getStroke())&&(o.LineStyle=a));t.polyStyles.length&&((a=t.polyStyles[0].getStroke())&&!o.LineStyle&&(o.LineStyle=a),o.PolyStyle=t.polyStyles[0]);var u=r[r.length-1].node,s=mr[u.namespaceURI],d=(0,h.makeSequence)(o,s);(0,h.pushSerializeAndPop)(n,pr,h.OBJECT_PROPERTY_NODE_FACTORY,d,r,s)}function gr(e,t){e.setAttribute("x",String(t.x)),e.setAttribute("y",String(t.y)),e.setAttribute("xunits",t.xunits),e.setAttribute("yunits",t.yunits)}var yr=exports.default=ue;
534},{"../Feature.js":"mYW9","../style/Fill.js":"AFcg","../geom/GeometryCollection.js":"HvLT","../geom/GeometryLayout.js":"Utvi","../style/Icon.js":"z2xv","../style/IconAnchorUnits.js":"Rlas","../style/IconOrigin.js":"tgH0","../ImageState.js":"
534Xz9x","../geom/LineString.js":"DfxW","../geom/MultiLineString.js":"fbCo","../geom/MultiPoint.js":"dNu5","../geom/MultiPolygon.js":"ouhF","../geom/Point.js":"gLcY","../geom/Polygon.js":"Nwwk","../style/Stroke.js":"TXDt","../style/Style.js":"he4w","../style/Text.js":"RPsG","./XMLFeature.js":"CXRz","../xml.js":"yYlP","../color.js":"eucy","../asserts.js":"fLG6","../array.js":"luEr","../proj.js":"Diht","./xsd.js":"jdp5","../math.js":"B96G","./Feature.js":"Kylu"}],"RvU2":[function(require,module,exports) {
535"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getRenderPixel=l,exports.getVectorContext=a,exports.toContext=s;var e=i(require("./render/canvas/Immediate.js")),r=require("./has.js"),t=require("./transform.js"),n=require("./renderer/vector.js"),o=require("./proj.js");function i(e){return e&&e.__esModule?e:{default:e}}function s(n,o){var i=n.canvas,s=o||{},a=s.pixelRatio||r.DEVICE_PIXEL_RATIO,l=s.size;l&&(i.width=l[0]*a,i.height=l[1]*a,i.style.width=l[0]+"px",i.style.height=l[1]+"px");var u=[0,0,i.width,i.height],c=(0,t.scale)((0,t.create)(),a,a);return new e.default(n,a,u,c,0)}function a(r){if(!(r.context instanceof CanvasRenderingContext2D))throw new Error("Only works for render events from Canvas 2D layers");var i,s=r.inversePixelTransform[0],a=r.frameState,l=(0,t.multiply)(r.inversePixelTransform.slice(),a.coordinateToPixelTransform),u=(0,n.getSquaredTolerance)(a.viewState.resolution,s),c=(0,o.getUserProjection)();return c&&(i=(0,o.getTransformFromProjections)(c,a.viewState.projection)),new e.default(r.context,s,a.extent,l,a.viewState.rotation,u,i)}function l(e,r){return(0,t.apply)(e.inversePixelTransform,r.slice(0))}
536},{"./render/canvas/Immediate.js":"fo6K","./has.js":"f3Nv","./transform.js":"P4eA","./renderer/vector.js":"UCah","./proj.js":"Diht"}],"w0c6":[function(require,module,exports) {
537"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.greatCircleArc=n,exports.meridian=e,exports.parallel=o;var t=require("../../proj.js"),a=require("../../math.js");function r(t,r,n){for(var e,o,s,i,u,p,h=[],c=t(0),M=t(1),f=r(c),g=r(M),d=[M,c],l=[g,f],v=[1,0],R={},m=1e5;--m>0&&v.length>0;)s=v.pop(),c=d.pop(),f=l.pop(),(p=s.toString())in R||(h.push(f[0],f[1]),R[p]=!0),i=v.pop(),M=d.pop(),g=l.pop(),o=r(e=t(u=(s+i)/2)),(0,a.squaredSegmentDistance)(o[0],o[1],f[0],f[1],g[0],g[1])<n?(h.push(g[0],g[1]),R[p=i.toString()]=!0):(v.push(i,u,u,s),l.push(g,o,o,f),d.push(M,e,e,c));return h}function n(n,e,o,s,i,u){var p=(0,t.get)("EPSG:4326"),h=Math.cos((0,a.toRadians)(e)),c=Math.sin((0,a.toRadians)(e)),M=Math.cos((0,a.toRadians)(s)),f=Math.sin((0,a.toRadians)(s)),g=Math.cos((0,a.toRadians)(o-n)),d=Math.sin((0,a.toRadians)(o-n)),l=c*f+h*M*g;return r(function(t){if(1<=l)return[o,s];var r=t*Math.acos(l),e=Math.cos(r),i=Math.sin(r),u=d*M,p=h*f-c*M*g,v=Math.atan2(u,p),R=Math.asin(c*e+h*i*Math.cos(v)),m=(0,a.toRadians)(n)+Math.atan2(Math.sin(v)*i*h,e-c*Math.sin(R));return[(0,a.toDegrees)(m),(0,a.toDegrees)(R)]},(0,t.getTransform)(p,i),u)}function e(a,n,e,o,s){var i=(0,t.get)("EPSG:4326");return r(function(t){return[a,n+(e-n)*t]},(0,t.getTransform)(i,o),s)}function o(a,n,e,o,s){var i=(0,t.get)("EPSG:4326");return r(function(t){return[n+(e-n)*t,a]},(0,t.getTransform)(i,o),s)}
538},{"../../proj.js":"Diht","../../math.js":"B96G"}],"wXs0":[function(require,module,exports) {
539"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=b(require("../Collection.js")),e=b(require("../render/EventType.js")),a=b(require("../Feature.js")),i=b(require("../style/Fill.js")),r=b(require("../geom/GeometryLayout.js")),n=b(require("../geom/LineString.js")),s=b(require("../geom/Point.js")),l=b(require("../style/Stroke.js")),o=b(require("../style/Style.js")),h=b(require("../style/Text.js")),_=b(require("./Vector.js")),m=b(require("../source/Vector.js")),d=require("../extent.js"),L=require("../obj.js"),u=require("../math.js"),p=require("../coordinate.js"),f=require("../proj.js"),c=require("../render.js"),g=require("../geom/flat/geodesic.js");function b(t){return t&&t.__esModule?t:{default:t}}var x=function(){var t=function(e,a){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a])})(e,a)};return function(e,a){if("function"!=typeof a&&null!==a)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");function i(){this.constructor=e}t(e,a),e.prototype=null===a?Object.create(a):(i.prototype=a.prototype,new i)}}(),v=new l.default({color:"rgba(0,0,0,0.2)"}),y=[90,45,30,20,10,5,2,1,.5,.2,.1,.05,.01,.005,.002,.001],S=function(_){function b(a){var r=this,n=a||{},s=(0,L.assign)({updateWhileAnimating:!0,updateWhileInteracting:!0,renderBuffer:0},n);return delete s.maxLines,delete s.strokeStyle,delete s.targetSize,delete s.showLabels,delete s.lonLabelFormatter,delete s.latLabelFormatter,delete s.lonLabelPosition,delete s.latLabelPosition,delete s.lonLabelStyle,delete s.latLabelStyle,delete s.intervals,(r=_.call(this,s)||this).projection_=null,r.maxLat_=1/0,r.maxLon_=1/0,r.minLat_=-1/0,r.minLon_=-1/0,r.maxX_=1/0,r.maxY_=1/0,r.minX_=-1/0,r.minY_=-1/0,r.targetSize_=void 0!==n.targetSize?n.targetSize:100,r.maxLines_=void 0!==n.maxLines?n.maxLines:100,r.meridians_=[],r.parallels_=[],r.strokeStyle_=void 0!==n.strokeStyle?n.strokeStyle:v,r.fromLonLatTransform_=void 0,r.toLonLatTransform_=void 0,r.projectionCenterLonLat_=null,r.bottomLeft_=null,r.bottomRight_=null,r.topLeft_=null,r.topRight_=null,r.meridiansLabels_=null,r.parallelsLabels_=null,n.showLabels&&(r.lonLabelFormatter_=null==n.lonLabelFormatter?p.degreesToStringHDMS.bind(r,"EW"):n.lonLabelFormatter,r.latLabelFormatter_=null==n.latLabelFormatter?p.degreesToStringHDMS.bind(r,"NS"):n.latLabelFormatter,r.lonLabelPosition_=null==n.lonLabelPosition?0:n.lonLabelPosition,r.latLabelPosition_=null==n.latLabelPosition?1:n.latLabelPosition,r.lonLabelStyleBase_=ne
539w o.default({text:void 0!==n.lonLabelStyle?n.lonLabelStyle.clone():new h.default({font:"12px Calibri,sans-serif",textBaseline:"bottom",fill:new i.default({color:"rgba(0,0,0,1)"}),stroke:new l.default({color:"rgba(255,255,255,1)",width:3})})}),r.lonLabelStyle_=function(t){var e=t.get("graticule_label");return this.lonLabelStyleBase_.getText().setText(e),this.lonLabelStyleBase_}.bind(r),r.latLabelStyleBase_=new o.default({text:void 0!==n.latLabelStyle?n.latLabelStyle.clone():new h.default({font:"12px Calibri,sans-serif",textAlign:"right",fill:new i.default({color:"rgba(0,0,0,1)"}),stroke:new l.default({color:"rgba(255,255,255,1)",width:3})})}),r.latLabelStyle_=function(t){var e=t.get("graticule_label");return this.latLabelStyleBase_.getText().setText(e),this.latLabelStyleBase_}.bind(r),r.meridiansLabels_=[],r.parallelsLabels_=[],r.addEventListener(e.default.POSTRENDER,r.drawLabels_.bind(r))),r.intervals_=void 0!==n.intervals?n.intervals:y,r.setSource(new m.default({loader:r.loaderFunction.bind(r),strategy:r.strategyFunction.bind(r),features:new t.default,overlaps:!1,useSpatialIndex:!1,wrapX:n.wrapX})),r.featurePool_=[],r.lineStyle_=new o.default({stroke:r.strokeStyle_}),r.loadedExtent_=null,r.renderedExtent_=null,r.renderedResolution_=null,r.setRenderOrder(null),r}return x(b,_),b.prototype.strategyFunction=function(t,e){var a=t.slice();
539return this.projection_&&this.getSource().getWrapX()&&(0,d.wrapX)(a,this.projection_),this.loadedExtent_&&((0,d.approximatelyEquals)(this.loadedExtent_,a,e)?a=this.loadedExtent_.slice():this.getSource().removeLoadedExtent(this.loadedExtent_)),[a]},b.prototype.loaderFunction=function(t,e,i){this.loadedExtent_=t;var r=this.getSource(),n=this.getExtent()||[-1/0,-1/0,1/0,1/0],s=(0,d.getIntersection)(n,t);if(!(this.renderedExtent_&&(0,d.equals)(this.renderedExtent_,s)&&this.renderedResolution_===e||(this.renderedExtent_=s,this.renderedResolution_=e,(0,d.isEmpty)(s)))){var l=(0,d.getCenter)(s),o=e*e/4;(!this.projection_||!(0,f.equivalent)(this.projection_,i))&&this.updateProjectionInfo_(i),this.createGraticule_(s,l,e,o);var h,_=this.meridians_.length+this.parallels_.length;for(this.meridiansLabels_&&(_+=this.meridians_.length),this.parallelsLabels_&&(_+=this.parallels_.length);_>this.featurePool_.length;)h=new a.default,this.featurePool_.push(h);var m=r.getFeaturesCollection();m.clear();var L,u,p=0;for(L=0,u=this.meridians_.length;L<u;++L)(h=this.featurePool_[p++]).setGeometry(this.meridians_[L]),h.setStyle(this.lineStyle_),m.push(h);for(L=0,u=this.parallels_.length;L<u;++L)(h=this.featurePool_[p++]).setGeometry(this.parallels_[L]),h.setStyle(this.lineStyle_),m.push(h)}},b.prototype.addMeridian_=function(t,e,a,i,r,n){var l=this.getMeridian_(t,e,a,i,n);if((0,d.intersects)(l.getExtent(),r)){if(this.meridiansLabels_){var o=this.lonLabelFormatter_(t);n in this.meridiansLabels_?this.meridiansLabels_[n].text=o:this.meridiansLabels_[n]={geom:new s.default([]),text:o}}this.meridians_[n++]=l}return n},b.prototype.addParallel_=function(t,e,a,i,r,n){var l=this.getParallel_(t,e,a,i,n);if((0,d.intersects)(l.getExtent(),r)){if(this.parallelsLabels_){var o=this.latLabelFormatter_(t);n in this.parallelsLabels_?this.parallelsLabels_[n].text=o:this.parallelsLabels_[n]={geom:new s.default([]),text:o}}this.parallels_[n++]=l}return n},b.prototype.drawLabels_=function(t){var e=t.frameState.viewState.rotation,a=t.frameState.viewState.resolution,i=t.frameState.size,r=t.frameState.extent,n=(0,d.getCenter)(r),s=r;if(e){var l=i[0]*a,o=i[1]*a;s=[n[0]-l/2,n[1]-o/2,n[0]+l/2,n[1]+o/2]}var h=0,_=0,m=this.latLabelPosition_<.5,L=this.projection_.getExtent(),u=(0,d.getWidth)(L);this.getSource().getWrapX()&&this.projection_.canWrapX()&&!(0,d.containsExtent)(L,r)&&(h=Math.floor((r[0]-L[0])/u),_=Math.ceil((r[2]-L[2])/u),m=m!==Math.abs(e)>Math.PI/2);for(var p=(0,c.getVectorContext)(t),f=h;f<=_;++f){var g=this.meridians_.length+this.parallels_.length,b=void 0,x=void 0,v=void 0,y=void 0;if(this.meridiansLabels_)for(x=0,v=this.meridiansLabels_.length;x<v;++x){var S=this.meridians_[x];if(e||0!==f)(j=S.clone()).translate(f*u,0),j.rotate(-e,n),(y=this.getMeridianPoint_(j,s,x)).rotate(e,n);else y=this.getMeridianPoint_(S,r,x);(b=this.featurePool_[g++]).setGeometry(y),b.set("graticule_label",this.meridiansLabels_[x].text),p.drawFeature(b,this.lonLabelStyle_(b))}if(this.parallelsLabels_&&(f===h&&m||f===_&&!m))for(x=0,v=this.parallels_.length;x<v;++x){var j;S=this.parallels_[x];if(e||0!==f)(j=S.clone()).translate(f*u,0),j.rotate(-e,n),(y=this.getParallelPoint_(j,s,x)).rotate(e,n);else y=this.getParallelPoint_(S,r,x);(b=this.featurePool_[g++]).setGeometry(y),b.set("graticule_label",this.parallelsLabels_[x].text),p.drawFeature(b,this.latLabelStyle_(b))}}},b.prototype.createGraticule_=function(t,e,a,i){var r=this.getInterval_(a);if(-1==r)return this.meridians_.length=0,this.parallels_.length=0,this.meridiansLabels_&&(this.meridiansLabels_.length=0),void(this.parallelsLabels_&&(this.parallelsLabels_.length=0));var n=!1,s=this.projection_.getExtent(),l=(0,d.getWidth)(s);this.getSource().getWrapX()&&this.projection_.canWrapX()&&!(0,d.containsExtent)(s,t)&&((0,d.getWidth)(t)>=l?(t[0]=s[0],t[2]=s[2]):n=!0);var o=[(0,u.clamp)(e[0],this.minX_,this.maxX_),(0,u.clamp)(e[1],this.minY_,this.maxY_)],h=this.toLonLatTransform_(o);isNaN(h[1])&&(h[1]=Math.abs(this.maxLat_)>=Math.abs(this.minLat_)?this.maxLat_:this.minLat_);
539var _,m,L,p,f=(0,u.clamp)(h[0],this.minLon_,this.maxLon_),c=(0,u.clamp)(h[1],this.minLat_,this.maxLat_),g=this.maxLines_,b=t;n||(b=[(0,u.clamp)(t[0],this.minX_,this.maxX_),(0,u.clamp)(t[1],this.minY_,this.maxY_),(0,u.clamp)(t[2],this.minX_,this.maxX_),(0,u.clamp)(t[3],this.minY_,this.maxY_)]);var x=(0,d.applyTransform)(b,this.toLonLatTransform_,void 0,8),v=x[3],y=x[2],S=x[1],j=x[0];if(n||((0,d.containsCoordinate)(b,this.bottomLeft_)&&(j=this.minLon_,S=this.minLat_),(0,d.containsCoordinate)(b,this.bottomRight_)&&(y=this.maxLon_,S=this.minLat_),(0,d.containsCoordinate)(b,this.topLeft_)&&(j=this.minLon_,v=this.maxLat_),(0,d.containsCoordinate)(b,this.topRight_)&&(y=this.maxLon_,v=this.maxLat_),v=(0,u.clamp)(v,c,this.maxLat_),y=(0,u.clamp)(y,f,this.maxLon_),S=(0,u.clamp)(S,this.minLat_,c),j=(0,u.clamp)(j,this.minLon_,f)),f=Math.floor(f/r)*r,p=(0,u.clamp)(f,this.minLon_,this.maxLon_),m=this.addMeridian_(p,S,v,i,t,0),_=0,n)for(;(p-=r)>=j&&_++<g;)m=this.addMeridian_(p,S,v,i,t,m);else for(;p!=this.minLon_&&_++<g;)p=Math.max(p-r,this.minLon_),m=this.addMeridian_(p,S,v,i,t,m);if(p=(0,u.clamp)(f,this.minLon_,this.maxLon_),_=0,n)for(;(p+=r)<=y&&_++<g;)m=this.addMeridian_(p,S,v,i,t,m);else for(;p!=this.maxLon_&&_++<g;)p=Math.min(p+r,this.maxLon_),m=this.addMeridian_(p,S,v,i,t,m);for(this.meridians_.length=m,this.meridiansLabels_&&(this.meridiansLabels_.length=m),c=Math.floor(c/r)*r,L=(0,u.clamp)(c,this.minLat_,this.maxLat_),m=this.addParallel_(L,j,y,i,t,0),_=0;L!=this.minLat_&&_++<g;)L=Math.max(L-r,this.minLat_),m=this.addParallel_(L,j,y,i,t,m);for(L=(0,u.clamp)(c,this.minLat_,this.maxLat_),_=0;L!=this.maxLat_&&_++<g;)L=Math.min(L+r,this.maxLat_),m=this.addParallel_(L,j,y,i,t,m);this.parallels_.length=m,this.parallelsLabels_&&(this.parallelsLabels_.length=m)},b.prototype.getInterval_=function(t){for(var e=this.projectionCenterLonLat_[0],a=this.projectionCenterLonLat_[1],i=-1,r=Math.pow(this.targetSize_*t,2),n=[],s=[],l=0,o=this.intervals_.length;l<o;++l){var h=(0,u.clamp)(this.intervals_[l]/2,0,90),_=(0,u.clamp)(a,-90+h,90-h);if(n[0]=e-h,n[1]=_-h,s[0]=e+h,s[1]=_+h,this.fromLonLatTransform_(n,n),this.fromLonLatTransform_(s,s),Math.pow(s[0]-n[0],2)+Math.pow(s[1]-n[1],2)<=r)break;
539i=this.intervals_[l]}return i},b.prototype.getMeridian_=function(t,e,a,i,s){var l=(0,g.meridian)(t,e,a,this.projection_,i),o=this.meridians_[s];return o?(o.setFlatCoordinates(r.default.XY,l),o.changed()):(o=new n.default(l,r.default.XY),this.meridians_[s]=o),o},b.prototype.getMeridianPoint_=function(t,e,a){var i=t.getFlatCoordinates(),r=1,n=i.length-1;i[r]>i[n]&&(r=n,n=1);var s=Math.max(e[1],i[r]),l=Math.min(e[3],i[n]),o=(0,u.clamp)(e[1]+Math.abs(e[1]-e[3])*this.lonLabelPosition_,s,l),h=[i[r-1]+(i[n-1]-i[r-1])*(o-i[r])/(i[n]-i[r]),o],_=this.meridiansLabels_[a].geom;return _.setCoordinates(h),_},b.prototype.getMeridians=function(){return this.meridians_},b.prototype.getParallel_=function(t,e,a,i,s){var l=(0,g.parallel)(t,e,a,this.projection_,i),o=this.parallels_[s];return o?(o.setFlatCoordinates(r.default.XY,l),o.changed()):o=new n.default(l,r.default.XY),o},b.prototype.getParallelPoint_=function(t,e,a){var i=t.getFlatCoordinates(),r=0,n=i.length-2;i[r]>i[n]&&(r=n,n=0);var s=Math.max(e[0],i[r]),l=Math.min(e[2],i[n]),o=(0,u.clamp)(e[0]+Math.abs(e[0]-e[2])*this.latLabelPosition_,s,l),h=[o,i[r+1]+(i[n+1]-i[r+1])*(o-i[r])/(i[n]-i[r])],_=this.parallelsLabels_[a].geom;return _.setCoordinates(h),_},b.prototype.getParallels=function(){return this.parallels_},b.prototype.updateProjectionInfo_=function(t){var e=(0,f.get)("EPSG:4326"),a=t.getWorldExtent();this.maxLat_=a[3],this.maxLon_=a[2],this.minLat_=a[1],this.minLon_=a[0];var i=(0,f.getTransform)(t,e);if(this.minLon_<this.maxLon_)this.toLonLatTransform_=i;else{var r=this.minLon_+this.maxLon_/2;this.maxLon_+=360,this.toLonLatTransform_=function(t,e,a){for(var n=a||2,s=i(t,e,n),l=0,o=s.length;l<o;l+=n)s[l]<r&&(s[l]+=360);return s}}this.fromLonLatTransform_=(0,f.getTransform)(e,t);var n=(0,d.applyTransform)([this.minLon_,this.minLat_,this.maxLon_,this.maxLat_],this.fromLonLatTransform_,void 0,8);this.minX_=n[0],this.maxX_=n[2],this.minY_=n[1],this.maxY_=n[3],this.bottomLeft_=this.fromLonLatTransform_([this.minLon_,this.minLat_]),this.bottomRight_=this.fromLonLatTransform_([this.maxLon_,this.minLat_]),this.topLeft_=this.fromLonLatTransform_([this.minLon_,this.maxLat_]),this.topRight_=this.fromLonLatTransform_([this.maxLon_,this.maxLat_]),this.projectionCenterLonLat_=this.toLonLatTransform_((0,d.getCenter)(t.getExtent())),isNaN(this.projectionCenterLonLat_[1])&&(this.projectionCenterLonLat_[1]=Math.abs(this.maxLat_)>=Math.abs(this.minLat_)?this.maxLat_:this.minLat_),this.projection_=t},b}(_.default),j=exports.default=S;
540},{"../Collection.js":"FnDa","../render/EventType.js":"z39m","../Feature.js":"mYW9","../style/Fill.js":"AFcg","../geom/GeometryLayout.js":"Utvi","../geom/LineString.js":"DfxW","../geom/Point.js":"gLcY","../style/Stroke.js":"TXDt","../style/Style.js":"he4w","../style/Text.js":"RPsG","./Vector.js":"dflx","../source/Vector.js":"ZS12","../extent.js":"QDir","../obj.js":"mH6q","../math.js":"B96G","../coordinate.js":"nGsj","../proj.js":"Diht","../render.js":"RvU2","../geom/flat/geodesic.js":"w0c6"}],"SCyv":[function(require,module,exports) {
541"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.UNSIGNED_SHORT=exports.UNSIGNED_INT=exports.UNSIGNED_BYTE=exports.STREAM_DRAW=exports.STATIC_DRAW=exports.FLOAT=exports.ELEMENT_ARRAY_BUFFER=exports.DYNAMIC_DRAW=exports.ARRAY_BUFFER=void 0,exports.getContext=i,exports.getSupportedExtensions=a;var e,t=require("./has.js"),r=require("./obj.js"),o=exports.ARRAY_BUFFER=34962,s=exports.ELEMENT_ARRAY_BUFFER=34963,p=exports.STREAM_DRAW=35040,x=exports.STATIC_DRAW=35044,A=exports.DYNAMIC_DRAW=35048,n=exports.UNSIGNED_BYTE=5121,E=exports.UNSIGNED_SHORT=5123,R=exports.UNSIGNED_INT=5125,_=exports.FLOAT=5126,N=["experimental-webgl","webgl","webkit-3d","moz-webgl"];function i(e,o){for(var s=(0,r.assign)({preserveDrawingBuffer:!0,antialias:!t.SAFARI_BUG_237906},o),p=N.length,x=0;x<p;++x)try{var A=e.getContext(N[x],s);if(A)return A}catch(n){}return null}function a(){if(!e){var t=i(document.createElement("canvas"));t&&(e=t.getSupportedExtensions())}return e}
542},{"./has.js":"f3Nv","./obj.js":"mH6q"}],"zsRd":[function(require,module,exports) {
543"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.BufferUsage=void 0,exports.getArrayClassForType=a;
543var r=require("../webgl.js"),t=require("../asserts.js"),e=exports.BufferUsage={STATIC_DRAW:r.STATIC_DRAW,STREAM_DRAW:r.STREAM_DRAW,DYNAMIC_DRAW:r.DYNAMIC_DRAW},o=function(){function o(o,a){this.array=null,this.type=o,(0,t.assert)(o===r.ARRAY_BUFFER||o===r.ELEMENT_ARRAY_BUFFER,62),this.usage=void 0!==a?a:e.STATIC_DRAW}return o.prototype.ofSize=function(r){this.array=new(a(this.type))(r)},o.prototype.fromArray=function(r){var t=a(this.type);this.array=t.from?t.from(r):new t(r)},o.prototype.fromArrayBuffer=function(r){this.array=new(a(this.type))(r)},o.prototype.getType=function(){return this.type},o.prototype.getArray=function(){return this.array},o.prototype.getUsage=function(){return this.usage},o.prototype.getSize=function(){return this.array?this.array.length:0},o}();function a(t){switch(t){case r.ARRAY_BUFFER:return Float32Array;case r.ELEMENT_ARRAY_BUFFER:return Uint32Array;default:return Float32Array}}var s=exports.default=o;
544},{"../webgl.js":"SCyv","../asserts.js":"fLG6"}],"HqWy":[function(require,module,exports) {
545"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=exports.default={LOST:"webglcontextlost",RESTORED:"webglcontextrestored"};
546},{}],"glXL":[function(require,module,exports) {
547"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=require("../util.js"),r="\n  precision mediump float;\n  \n  attribute vec2 a_position;\n  varying vec2 v_texCoord;\n  varying vec2 v_screenCoord;\n  \n  uniform vec2 u_screenSize;\n   \n  void main() {\n    v_texCoord = a_position * 0.5 + 0.5;\n    v_screenCoord = v_texCoord * u_screenSize;\n    gl_Position = vec4(a_position, 0.0, 1.0);\n  }\n",t="\n  precision mediump float;\n   \n  uniform sampler2D u_image;\n  uniform float u_opacity;\n   \n  varying vec2 v_texCoord;\n   \n  void main() {\n    gl_FragColor = texture2D(u_image, v_texCoord) * u_opacity;\n  }\n",i=function(){function i(e){this.gl_=e.webGlContext;var i=this.gl_;this.scaleRatio_=e.scaleRatio||1,this.renderTargetTexture_=i.createTexture(),this.renderTargetTextureSize_=null,this.frameBuffer_=i.createFramebuffer();var a=i.createShader(i.VERTEX_SHADER);i.shaderSource(a,e.vertexShader||r),i.compileShader(a);var n=i.createShader(i.FRAGMENT_SHADER);i.shaderSource(n,e.fragmentShader||t),i.compileShader(n),this.renderTargetProgram_=i.createProgram(),i.attachShader(this.renderTargetProgram_,a),i.attachShader(this.renderTargetProgram_,n),i.linkProgram(this.renderTargetProgram_),this.renderTargetVerticesBuffer_=i.createBuffer();i.bindBuffer(i.ARRAY_BUFFER,this.renderTargetVerticesBuffer_),i.bufferData(i.ARRAY_BUFFER,new Float32Array([-1,-1,1,-1,-1,1,1,-1,1,1,-1,1]),i.STATIC_DRAW),this.renderTargetAttribLocation_=i.getAttribLocation(this.renderTargetProgram_,"a_position"),this.renderTargetUniformLocation_=i.getUniformLocation(this.renderTargetProgram_,"u_screenSize"),this.renderTargetOpacityLocation_=i.getUniformLocation(this.renderTargetProgram_,"u_opacity"),this.renderTargetTextureLocation_=i.getUniformLocation(this.renderTargetProgram_,"u_image"),this.uniforms_=[],e.uniforms&&Object.keys(e.uniforms).forEach(function(r){this.uniforms_.push({value:e.uniforms[r],location:i.getUniformLocation(this.renderTargetProgram_,r)})}.bind(this))}return i.prototype.getGL=function(){return this.gl_},i.prototype.init=function(e){var r=this.getGL(),t=[r.drawingBufferWidth*this.scaleRatio_,r.drawingBufferHeight*this.scaleRatio_];if(r.bindFramebuffer(r.FRAMEBUFFER,this.getFrameBuffer()),r.viewport(0,0,t[0],t[1]),!this.renderTargetTextureSize_||this.renderTargetTextureSize_[0]!==t[0]||this.renderTargetTextureSize_[1]!==t[1]){this.renderTargetTextureSize_=t;var i=r.RGBA,a=r.RGBA,n=r.UNSIGNED_BYTE;r.bindTexture(r.TEXTURE_2D,this.renderTargetTexture_),r.texImage2D(r.TEXTURE_2D,0,i,t[0],t[1],0,a,n,null),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,r.LINEAR),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,r.CLAMP_TO_EDGE),r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,this.renderTargetTexture_,0)}},i.prototype.apply=function(r,t,i,a){var n=this.getGL(),o=r.size;if(n.bindFramebuffer(n.FRAMEBUFFER,t?t.getFrameBuffer():null),n.activeTexture(n.TEXTURE0),n.bindTexture(n.TEXTURE_2D,this.renderTargetTexture_),!t){var T=(0,e.getUid)(n.canvas);if(!r.renderTargets[T]){var _=n.getContextAttributes();_&&_.preserveDrawingBuffer&&(n.clearColor(0,0,0,0),n.clear(n.COLOR_BUFFER_BIT)),r.renderTargets[T]=!0}}n.enable(n.BLEND),n.blendFunc(n.ONE,n.ONE_MINUS_SRC_ALPHA),n.viewport(0,0,n.drawingBufferWidth,n.drawingBufferHeight),n.bindBuffer(n.ARRAY_BUFFER,this.renderTargetVerticesBuffer_),n.useProgram(this.renderTargetProgram_),n.enableVertexAttribArray(this.renderTargetAttribLocation_),n.vertexAttribPointer(this.renderTargetAttribLocation_,2,n.FLOAT,!1,0,0),n.uniform2f(this.renderTargetUniformLocation_,o[0],o[1]),n.uniform1i(this.renderTargetTextureLocation_,0);var u=r.layerStatesArray[r.layerIndex].opacity;n.uniform1f(this.renderTargetOpacityLocation_,u),this.applyUniforms(r),i&&i(n,r),n.drawArrays(n.TRIANGLES,0,6),a&&a(n,r)},i.prototype.getFrameBuffer=function(){return this.frameBuffer_},i.prototype.applyUniforms=function(e){var r,t=this.getGL(),i=1;
547this.uniforms_.forEach(function(a){if((r="function"==typeof a.value?a.value(e):a.value)instanceof HTMLCanvasElement||r instanceof ImageData)a.texture||(a.texture=t.createTexture()),t.activeTexture(t["TEXTURE".concat(i)]),t.bindTexture(t.TEXTURE_2D,a.texture),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),r instanceof ImageData?t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,r.width,r.height,0,t.UNSIGNED_BYTE,new Uint8Array(r.data)):t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,r),t.uniform1i(a.location,i++);else if(Array.isArray(r))switch(r.length){case 2:return void t.uniform2f(a.location,r[0],r[1]);case 3:return void t.uniform3f(a.location,r[0],r[1],r[2]);case 4:return void t.uniform4f(a.location,r[0],r[1],r[2],r[3]);default:return}else"number"==typeof r&&t.uniform1f(a.location,r)})},i}(),a=exports.default=i;
548},{"../util.js":"KniQ"}],"UkOi":[function(require,module,exports) {
549"use strict";function e(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function r(e,r){return e[0]=r[0],e[1]=r[1],e[4]=r[2],e[5]=r[3],e[12]=r[4],e[13]=r[5],e}Object.defineProperty(exports,"__esModule",{value:!0}),exports.create=e,exports.fromTransform=r;
550},{}],"w1WE":[function(require,module,exports) {
551"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ShaderType=exports.DefaultUniform=exports.AttributeType=void 0,exports.computeAttributesStride=L,exports.default=void 0;var e=u(require("../webgl/ContextEventType.js")),t=u(require("../Disposable.js")),r=u(require("./PostProcessingPass.js")),o=require("../webgl.js"),a=require("../obj.js"),n=require("../transform.js"),i=require("../vec/mat4.js"),s=require("../util.js");function u(e){return e&&e.__esModule?e:{default:e}}var f=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),c=exports.ShaderType={FRAGMENT_SHADER:35632,VERTEX_SHADER:35633},_=exports.DefaultUniform={PROJECTION_MATRIX:"u_projectionMatrix",OFFSET_SCALE_MATRIX:"u_offsetScaleMatrix",OFFSET_ROTATION_MATRIX:"u_offsetRotateMatrix",TIME:"u_time",ZOOM:"u_zoom",RESOLUTION:"u_resolution"},h=exports.AttributeType={UNSIGNED_BYTE:o.UNSIGNED_BYTE,UNSIGNED_SHORT:o.UNSIGNED_SHORT,UNSIGNED_INT:o.UNSIGNED_INT,FLOAT:o.FLOAT},l={};function p(e){return"shared/"+e}var E=0;function m(){var e="unique/"+E;return E+=1,e}function T(e){var t=l[e];if(!t){var r=document.createElement("canvas");r.style.position="absolute",r.style.left="0",t={users:0,canvas:r},l[e]=t}return t.users+=1,t.canvas}function d(e){var t=l[e];if(t&&(t.users-=1,!(t.users>0))){var r=t.canvas,a=(0,o.getContext)(r).getExtension("WEBGL_lose_context");a&&a.loseContext(),delete l[e]}}var g=function(t){function u(a){var s=t.call(this)||this,u=a||{};s.boundHandleWebGLContextLost_=s.handleWebGLContextLost.bind(s),s.boundHandleWebGLContextRestored_=s.handleWebGLContextRestored.bind(s),s.canvasCacheKey_=u.canvasCacheKey?p(u.canvasCacheKey):m(),s.canvas_=T(s.canvasCacheKey_),s.gl_=(0,o.getContext)(s.canvas_),s.bufferCache_={},s.extensionCache_={},s.currentProgram_=null,s.canvas_.addEventListener(e.default.LOST,s.boundHandleWebGLContextLost_),s.canvas_.addEventListener(e.default.RESTORED,s.boundHandleWebGLContextRestored_),s.offsetRotateMatrix_=(0,n.create)(),s.offsetScaleMatrix_=(0,n.create)(),s.tmpMat4_=(0,i.create)(),s.uniformLocations_={},s.attribLocations_={},s.uniforms_=[],u.uniforms&&s.setUniforms(u.uniforms);var f=s.getGL();return s.postProcessPasses_=u.postProcesses?u.postProcesses.map(function(e){return new r.default({webGlContext:f,scaleRatio:e.scaleRatio,vertexShader:e.vertexShader,fragmentShader:e.fragmentShader,uniforms:e.uniforms})}):[new r.default({webGlContext:f})],s.shaderCompileErrors_=null,s.startTime_=Date.now(),s}return f(u,t),u.prototype.setUniforms=function(e){for(var t in this.uniforms_=[],e)this.uniforms_.push({name:t,value:e[t]});this.uniformLocations_={}},u.prototype.canvasCacheKeyMatches=function(e){return this.canvasCacheKey_===p(e)},u.prototype.getExtension=function(e){if(e in this.extensionCache_)return this.extensionCache_[e];var t=this.gl_.getExtension(e);return this.extensionCache_[e]=t,t},u.prototype.bindBuffer=function(e){var t=this.getGL(),r=(0,s.getUid)(e),o=this.bufferCache_[r];o||(o={buffer:e,webGlBuffer:t.createBuffer()},this.bufferCache_[r]=o);t.bindBuffer(e.getType(),o.webGlBuffer)},u.prototype.flushBufferData=function(e){var t=this.getGL();this.bindBuffer(e),t.bufferData(e.getType(),e.getArray(),e.getUsage())},u.prototype.deleteBuffer=function(e){var t=this.getGL(),r=(0,s.getUid)(e),o=this.bufferCache_[r];o&&!t.isContextLost()&&t.deleteBuffer(o.webGlBuffer),delete this.bufferCache_[r]},u.prototype.disposeInternal=function(){this.canvas_.removeEventListener(e.default.LOST,this.boundHandleWebGLContextLost_),this.canvas_.removeEventListener(e.default.RESTORED,this.boundHandleWebGLContextRestored_),d(this.canvasCacheKey_),delete this.gl_,delete this.canvas_},u.prototype.prepareDraw=function(e,t){var r=this.getGL(),o=this.getCanvas(),a=e.size,n=e.pixelRatio;o.width=a[0]*n,o.height=a[1]*n,o.style.width=a[0]+"px",o.style.height=a[1]+"px",r.useProgram(this.currentProgram_);for(var i=this.postProcessPasses_.length-1;i>=0;i--)this.postProcessPasses_[i].init(e);r.bindTexture(r.TEXTURE_2D,null),r.clearColor(0,0,0,0),r.clear(r.COLOR_BUFFER_BIT),r.enable(r.BLEND),r.blendFunc(r.ONE,t?r.ZERO:r.ONE_MINUS_SRC_ALPHA),r.useProgram(this.currentProgram_),this.applyFrameState(e),this.applyUniforms(e)},u.prototype.prepareDrawToRenderTarget=function(e,t,r){var o=this.getGL(),a=t.getSize();o.bindFramebuffer(o.FRAMEBUFFER,t.getFramebuffer()),o.viewport(0,0,a[0],a[1]),o.bindTexture(o.TEXTURE_2D,t.getTexture()),o.clearColor(0,0,0,0),o.clear(o.COLOR_BUFFER_BIT),o.enable(o.BLEND),o.blendFunc(o.ONE,r?o.ZERO:o.ONE_MINUS_SRC_ALPHA),o.useProgram(this.currentProgram_),this.applyFrameState(e),this.applyUniforms(e)},u.prototype.drawElements=function(e,t){var r=this.getGL();this.getExtension("OES_element_index_uint");var o=r.UNSIGNED_INT,a=t-e,n=4*e;r.drawElements(r.TRIANGLES,a,o,n)},u.prototype.finalizeDraw=function(e,t,r){for(var o=0,a=this.postProcessPasses_.length;o<a;o++)o===a-1?this.postProcessPasses_[o].apply(e,null,t,r):this.postProcessPasses_[o].apply(e,this.postProcessPasses_[o+1])},u.prototype.getCanvas=function(){return this.canvas_},u.prototype.getGL=function(){return this.gl_},u.prototype.applyFrameState=function(e){var t=e.size,r=e.viewState.rotation,o=(0,n.reset)(this.offsetScaleMatrix_);(0,n.scale)(o,2/t[0],2/t[1]);var a=(0,n.reset)(this.offsetRotateMatrix_);0!==r&&(0,n.rotate)(a,-r),this.setUniformMatrixValue(_.OFFSET_SCALE_MATRIX,(0,i.fromTransform)(this.tmpMat4_,o)),this.setUniformMatrixValue(_.OFFSET_ROTATION_MATRIX,(0,i.fromTransform)(this.tmpMat4_,a)),this.setUniformFloatValue(_.TIME,.001*(Date.now()-this.startTime_)),this.setUniformFloatValue(_.ZOOM,e.viewState.zoom),this.setUniformFloatValue(_.RESOLUTION,e.viewState.resolution)},u.prototype.applyUniforms=function(e){var t,r=this.getGL(),o=0;
551this.uniforms_.forEach(function(a){if((t="function"==typeof a.value?a.value(e):a.value)instanceof HTMLCanvasElement||t instanceof HTMLImageElement||t instanceof ImageData)a.texture||(a.prevValue=void 0,a.texture=r.createTexture()),r.activeTexture(r["TEXTURE".concat(o)]),r.bindTexture(r.TEXTURE_2D,a.texture),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,r.LINEAR),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,r.CLAMP_TO_EDGE),(!(t instanceof HTMLImageElement)||t.complete)&&a.prevValue!==t&&(a.prevValue=t,r.texImage2D(r.TEXTURE_2D,0,r.RGBA,r.RGBA,r.UNSIGNED_BYTE,t)),r.uniform1i(this.getUniformLocation(a.name),o++);else if(Array.isArray(t)&&6===t.length)this.setUniformMatrixValue(a.name,(0,i.fromTransform)(this.tmpMat4_,t));else if(Array.isArray(t)&&t.length<=4)switch(t.length){case 2:return void r.uniform2f(this.getUniformLocation(a.name),t[0],t[1]);case 3:return void r.uniform3f(this.getUniformLocation(a.name),t[0],t[1],t[2]);case 4:return void r.uniform4f(this.getUniformLocation(a.name),t[0],t[1],t[2],t[3]);default:return}else"number"==typeof t&&r.uniform1f(this.getUniformLocation(a.name),t)}.bind(this))},u.prototype.useProgram=function(e){return e!=this.currentProgram_&&(this.getGL().useProgram(e),this.currentProgram_=e,this.uniformLocations_={},this.attribLocations_={},!0)},u.prototype.compileShader=function(e,t){var r=this.getGL(),o=r.createShader(t);return r.shaderSource(o,e),r.compileShader(o),o},u.prototype.getProgram=function(e,t){var r=this.getGL(),o=this.compileShader(e,r.FRAGMENT_SHADER),a=this.compileShader(t,r.VERTEX_SHADER),n=r.createProgram();if(r.attachShader(n,o),r.attachShader(n,a),r.linkProgram(n),!r.getShaderParameter(o,r.COMPILE_STATUS)){var i="Fragment shader compliation failed: ".concat(r.getShaderInfoLog(o));throw new Error(i)}if(r.deleteShader(o),!r.getShaderParameter(a,r.COMPILE_STATUS)){i="Vertex shader compilation failed: ".concat(r.getShaderInfoLog(a));throw new Error(i)}if(r.deleteShader(a),!r.getProgramParameter(n,r.LINK_STATUS)){i="GL program linking failed: ".concat(r.getShaderInfoLog(a));throw new Error(i)}return n},u.prototype.getUniformLocation=function(e){return void 0===this.uniformLocations_[e]&&(this.uniformLocations_[e]=this.getGL().getUniformLocation(this.currentProgram_,e)),this.uniformLocations_[e]},u.prototype.getAttributeLocation=function(e){return void 0===this.attribLocations_[e]&&(this.attribLocations_[e]=this.getGL().getAttribLocation(this.currentProgram_,e)),this.attribLocations_[e]},u.prototype.makeProjectionTransform=function(e,t){var r=e.size,o=e.viewState.rotation,a=e.viewState.resolution,i=e.viewState.center;return(0,n.reset)(t),(0,n.compose)(t,0,0,2/(a*r[0]),2/(a*r[1]),-o,-i[0],-i[1]),t},u.prototype.setUniformFloatValue=function(e,t){this.getGL().uniform1f(this.getUniformLocation(e),t)},u.prototype.setUniformFloatVec4=function(e,t){this.getGL().uniform4fv(this.getUniformLocation(e),t)},u.prototype.setUniformMatrixValue=function(e,t){this.getGL().uniformMatrix4fv(this.getUniformLocation(e),!1,t)},u.prototype.enableAttributeArray_=function(e,t,r,o,a){var n=this.getAttributeLocation(e);n<0||(this.getGL().enableVertexAttribArray(n),this.getGL().vertexAttribPointer(n,t,r,!1,o,a))},u.prototype.enableAttributes=function(e){for(var t=L(e),r=0,a=0;a<e.length;a++){var n=e[a];this.enableAttributeArray_(n.name,n.size,n.type||o.FLOAT,t,r),r+=n.size*v(n.type)}},u.prototype.handleWebGLContextLost=function(){(0,a.clear)(this.bufferCache_),this.currentProgram_=null},u.prototype.handleWebGLContextRestored=function(){},u.prototype.createTexture=function(e,t,r){var o=this.getGL(),a=r||o.createTexture(),n=o.RGBA,i=o.RGBA,s=o.UNSIGNED_BYTE;return o.bindTexture(o.TEXTURE_2D,a),t?o.texImage2D(o.TEXTURE_2D,0,n,i,s,t):o.texImage2D(o.TEXTURE_2D,0,n,e[0],e[1],0,i,s,null),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MIN_FILTER,o.LINEAR),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_WRAP_S,o.CLAMP_TO_EDGE),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_WRAP_T,o.CLAMP_TO_EDGE),a},u}(t.default);function L(e){for(var t=0,r=0;r<e.length;r++){var o=e[r];t+=o.size*v(o.type)}return t}function v(e){switch(e){case h.UNSIGNED_BYTE:return Uint8Array.BYTES_PER_ELEMENT;case h.UNSIGNED_SHORT:return Uint16Array.BYTES_PER_ELEMENT;case h.UNSIGNED_INT:return Uint32Array.BYTES_PER_ELEMENT;case h.FLOAT:default:return Float32Array.BYTES_PER_ELEMENT}}var S=exports.default=g;
552},{"../webgl/ContextEventType.js":"HqWy","../Disposable.js":"DDda","./PostProcessingPass.js":"glXL","../webgl.
552js":"SCyv","../obj.js":"mH6q","../transform.js":"P4eA","../vec/mat4.js":"UkOi","../util.js":"KniQ"}],"nUxs":[function(require,module,exports) {
553"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.WebGLWorkerMessageType=void 0,exports.colorDecodeId=m,exports.colorEncodeId=y,exports.default=void 0,exports.getBlankImageData=v,exports.writePointFeatureToBuffers=d;var e=s(require("../../layer/Property.js")),t=s(require("../Layer.js")),r=s(require("../../render/Event.js")),n=s(require("../../render/EventType.js")),o=s(require("../../webgl/Helper.js")),a=require("../../transform.js"),i=require("../../extent.js");function s(e){return e&&e.__esModule?e:{default:e}}var p=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),l=exports.WebGLWorkerMessageType={GENERATE_BUFFERS:"GENERATE_BUFFERS"},u=function(t){function s(r,n){var o=t.call(this,r)||this,i=n||{};return o.inversePixelTransform_=(0,a.create)(),o.pixelContext_=null,o.postProcesses_=i.postProcesses,o.uniforms_=i.uniforms,o.helper,r.addChangeListener(e.default.MAP,o.removeHelper.bind(o)),o.dispatchPreComposeEvent=o.dispatchPreComposeEvent.bind(o),o.dispatchPostComposeEvent=o.dispatchPostComposeEvent.bind(o),o}return p(s,t),s.prototype.dispatchPreComposeEvent=function(e,t){var o=this.getLayer();if(o.hasListener(n.default.PRECOMPOSE)){var a=new r.default(n.default.PRECOMPOSE,void 0,t,e);o.dispatchEvent(a)}},s.prototype.dispatchPostComposeEvent=function(e,t){var o=this.getLayer();if(o.hasListener(n.default.POSTCOMPOSE)){var a=new r.default(n.default.POSTCOMPOSE,void 0,t,e);o.dispatchEvent(a)}},s.prototype.reset=function(e){this.uniforms_=e.uniforms,this.helper&&this.helper.setUniforms(this.uniforms_)},s.prototype.removeHelper=function(){this.helper&&(this.helper.dispose(),delete this.helper)},s.prototype.prepareFrame=function(e){if(this.getLayer().getRenderSource()){for(var t=!0,r=-1,n=void 0,a=0,i=e.layerStatesArray.length;a<i;a++){var p=e.layerStatesArray[a].layer,l=p.getRenderer();if(l instanceof s){var u=p.getClassName();if((t||u!==n)&&(r+=1,t=!1),n=u,l===this)break}else t=!0}var c="map/"+e.mapId+"/group/"+r;this.helper&&this.helper.canvasCacheKeyMatches(c)||(this.removeHelper(),this.helper=new o.default({postProcesses:this.postProcesses_,uniforms:this.uniforms_,canvasCacheKey:c}),n&&(this.helper.getCanvas().className=n),this.afterHelperCreated())}return this.prepareFrameInternal(e)},s.prototype.afterHelperCreated=function(){},s.prototype.prepareFrameInternal=function(e){return!0},s.prototype.disposeInternal=function(){this.removeHelper(),t.prototype.disposeInternal.call(this)},s.prototype.dispatchRenderEvent_=function(e,t,n){var o=this.getLayer();if(o.hasListener(e)){(0,a.compose)(this.inversePixelTransform_,0,0,n.pixelRatio,-n.pixelRatio,0,0,-n.size[1]);var i=new r.default(e,this.inversePixelTransform_,n,t);o.dispatchEvent(i)}},s.prototype.preRender=function(e,t){this.dispatchRenderEvent_(n.default.PRERENDER,e,t)},s.prototype.postRender=function(e,t){this.dispatchRenderEvent_(n.default.POSTRENDER,e,t)},s.prototype.getDataAtPixel=function(e,t,r){var n=(0,a.apply)([t.pixelRatio,0,0,t.pixelRatio,0,0],e.slice()),o=this.helper.getGL();if(!o)return null;var s=this.getLayer().getExtent();if(s){var p=(0,a.apply)(t.pixelToCoordinateTransform,e.slice());if(!(0,i.containsCoordinate)(s,p))return null}var l=o.getContextAttributes();if(!l||!l.preserveDrawingBuffer)return new Uint8Array;var u,c=Math.round(n[0]),h=Math.round(n[1]),f=this.pixelContext_;if(!f){var d=document.createElement("canvas");d.width=1,d.height=1,f=d.getContext("2d"),this.pixelContext_=f}f.clearRect(0,0,1,1);try{f.drawImage(o.canvas,c,h,1,1,0,0,1,1),u=f.getImageData(0,0,1,1).data}catch(v){return u}return 0===u[3]?null:u},s}(t.default),c=[],h={vertexPosition:0,indexPosition:0};function f(e,t,r,n,o){e[t+0]=r,e[t+1]=n,e[t+2]=o}function d(e,t,r,n,o,a){var i=3+o,s=e[t+0],p=e[t+1],l=c;l.length=o;for(var u=0;u<l.length;u++)l[u]=e[t+2+u];var d=a?a.vertexPosition:0,v=a?a.indexPosition:0,y=d/i;return f(r,d,s,p,0),l.length&&r.set(l,d+3),f(r,d+=i,s,p,1),l.length&&r.set(l,d+3),f(r,d+=i,s,p,2),l.length&&r.set(l,d+3),f(r,d+=i,s,p,3),l.length&&r.set(l,d+3),d+=i,n[v++]=y,n[v++]=y+1,n[v++]=y+3,n[v++]=y+1,n[v++]=y+2,n[v++]=y+3,h.vertexPosition=d,h.indexPosition=v,h}function v(){var e=document.createElement("canvas").getContext("2d").createImageData(1,1);return e.data[0]=255,e.data[1]=255,e.data[2]=255,e.data[3]=255,e}function y(e,t){var r=t||[];return r[0]=Math.floor(e/256/256/256)/255,r[1]=Math.floor(e/256/256)%256/255,r[2]=Math.floor(e/256)%256/255,r[3]=e%256/255,r}function m(e){var t=0;
vendor: 4,191 bytes, lines 553-559
553return t+=Math.round(256*e[0]*256*256*255),t+=Math.round(256*e[1]*256*255),t+=Math.round(256*e[2]*255),t+=Math.round(255*e[3])}var E=exports.default=u;
554},{"../../layer/Property.js":"HbeD","../Layer.js":"fpOz","../../render/Event.js":"EB6P","../../render/EventType.js":"z39m","../../webgl/Helper.js":"w1WE","../../transform.js":"P4eA","../../extent.js":"QDir"}],"KkPv":[function(require,module,exports) {
555"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=require("../array.js"),e=new Uint8Array(4),r=function(){function r(t,e){this.helper_=t;var r=t.getGL();this.texture_=r.createTexture(),this.framebuffer_=r.createFramebuffer(),this.size_=e||[1,1],this.data_=new Uint8Array(0),this.dataCacheDirty_=!0,this.updateSize_()}return r.prototype.setSize=function(e){(0,t.equals)(e,this.size_)||(this.size_[0]=e[0],this.size_[1]=e[1],this.updateSize_())},r.prototype.getSize=function(){return this.size_},r.prototype.clearCachedData=function(){this.dataCacheDirty_=!0},r.prototype.readAll=function(){if(this.dataCacheDirty_){var t=this.size_,e=this.helper_.getGL();e.bindFramebuffer(e.FRAMEBUFFER,this.framebuffer_),e.readPixels(0,0,t[0],t[1],e.RGBA,e.UNSIGNED_BYTE,this.data_),this.dataCacheDirty_=!1}return this.data_},r.prototype.readPixel=function(t,r){if(t<0||r<0||t>this.size_[0]||r>=this.size_[1])return e[0]=0,e[1]=0,e[2]=0,e[3]=0,e;this.readAll();var i=Math.floor(t)+(this.size_[1]-Math.floor(r)-1)*this.size_[0];return e[0]=this.data_[4*i],e[1]=this.data_[4*i+1],e[2]=this.data_[4*i+2],e[3]=this.data_[4*i+3],e},r.prototype.getTexture=function(){return this.texture_},r.prototype.getFramebuffer=function(){return this.framebuffer_},r.prototype.updateSize_=function(){var t=this.size_,e=this.helper_.getGL();this.texture_=this.helper_.createTexture(t,null,this.texture_),e.bindFramebuffer(e.FRAMEBUFFER,this.framebuffer_),e.viewport(0,0,t[0],t[1]),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,this.texture_,0),this.data_=new Uint8Array(t[0]*t[1]*4)},r}(),i=exports.default=r;
556},{"../array.js":"luEr"}],"FRly":[function(require,module,exports) {
557"use strict";exports.byteLength=u,exports.toByteArray=i,exports.fromByteArray=d;for(var r=[],t=[],e="undefined"!=typeof Uint8Array?Uint8Array:Array,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,a=n.length;o<a;++o)r[o]=n[o],t[n.charCodeAt(o)]=o;function h(r){var t=r.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var e=r.indexOf("=");return-1===e&&(e=t),[e,e===t?0:4-e%4]}function u(r){var t=h(r),e=t[0],n=t[1];return 3*(e+n)/4-n}function c(r,t,e){return 3*(t+e)/4-e}function i(r){var n,o,a=h(r),u=a[0],i=a[1],f=new e(c(r,u,i)),A=0,d=i>0?u-4:u;for(o=0;o<d;o+=4)n=t[r.charCodeAt(o)]<<18|t[r.charCodeAt(o+1)]<<12|t[r.charCodeAt(o+2)]<<6|t[r.charCodeAt(o+3)],f[A++]=n>>16&255,f[A++]=n>>8&255,f[A++]=255&n;return 2===i&&(n=t[r.charCodeAt(o)]<<2|t[r.charCodeAt(o+1)]>>4,f[A++]=255&n),1===i&&(n=t[r.charCodeAt(o)]<<10|t[r.charCodeAt(o+1)]<<4|t[r.charCodeAt(o+2)]>>2,f[A++]=n>>8&255,f[A++]=255&n),f}function f(t){return r[t>>18&63]+r[t>>12&63]+r[t>>6&63]+r[63&t]}function A(r,t,e){for(var n,o=[],a=t;a<e;a+=3)n=(r[a]<<16&16711680)+(r[a+1]<<8&65280)+(255&r[a+2]),o.push(f(n));return o.join("")}function d(t){for(var e,n=t.length,o=n%3,a=[],h=0,u=n-o;h<u;h+=16383)a.push(A(t,h,h+16383>u?u:h+16383));return 1===o?(e=t[n-1],a.push(r[e>>2]+r[e<<4&63]+"==")):2===o&&(e=(t[n-2]<<8)+t[n-1],a.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"=")),a.join("")}t["-".charCodeAt(0)]=62,t["_".charCodeAt(0)]=63;
558},{}],"Quj6":[function(require,module,exports) {
559exports.read=function(a,o,t,r,h){var M,p,w=8*h-r-1,f=(1<<w)-1,e=f>>1,i=-7,N=t?h-1:0,n=t?-1:1,s=a[o+N];for(N+=n,M=s&(1<<-i)-1,s>>=-i,i+=w;i>0;M=256*M+a[o+N],N+=n,i-=8);for(p=M&(1<<-i)-1,M>>=-i,i+=r;i>0;p=256*p+a[o+N],N+=n,i-=8);if(0===M)M=1-e;else{if(M===f)return p?NaN:1/0*(s?-1:1);p+=Math.pow(2,r),M-=e}return(s?-1:1)*p*Math.pow(2,M-r)},exports.write=function(a,o,t,r,h,M){var p,w,f,e=8*M-h-1,i=(1<<e)-1,N=i>>1,n=23===h?Math.pow(2,-24)-Math.pow(2,-77):0,s=r?0:M-1,u=r?1:-1,l=o<0||0===o&&1/o<0?1:0;for(o=Math.abs(o),isNaN(o)||o===1/0?(w=isNaN(o)?1:0,p=i):(p=Math.floor(Math.log(o)/M
vendor: 454 bytes, lines 559-562
559ath.LN2),o*(f=Math.pow(2,-p))<1&&(p--,f*=2),(o+=p+N>=1?n/f:n*Math.pow(2,1-N))*f>=2&&(p++,f/=2),p+N>=i?(w=0,p=i):p+N>=1?(w=(o*f-1)*Math.pow(2,h),p+=N):(w=o*Math.pow(2,N-1)*Math.pow(2,h),p=0));h>=8;a[t+s]=255&w,s+=u,w/=256,h-=8);for(p=p<<h|w,e+=h;e>0;a[t+s]=255&p,s+=u,p/=256,e-=8);a[t+s-u]|=128*l};
560},{}],"aqZJ":[function(require,module,exports) {
561var r={}.toString;module.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)};
562},{}],"aMB2
vendor: 19,947 bytes, lines 562-566
562":[function(require,module,exports) {
563
564var global = arguments[3];
565var t=arguments[3],r=require("base64-js"),e=require("ieee754"),n=require("isarray");function i(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(r){return!1}}function o(){return f.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function u(t,r){if(o()<r)throw new RangeError("Invalid typed array length");return f.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(r)).__proto__=f.prototype:(null===t&&(t=new f(r)),t.length=r),t}function f(t,r,e){if(!(f.TYPED_ARRAY_SUPPORT||this instanceof f))return new f(t,r,e);if("number"==typeof t){if("string"==typeof r)throw new Error("If encoding is specified then the first argument must be a string");return c(this,t)}return s(this,t,r,e)}function s(t,r,e,n){if("number"==typeof r)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&r instanceof ArrayBuffer?g(t,r,e,n):"string"==typeof r?l(t,r,e):y(t,r)}function h(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function a(t,r,e,n){return h(r),r<=0?u(t,r):void 0!==e?"string"==typeof n?u(t,r).fill(e,n):u(t,r).fill(e):u(t,r)}function c(t,r){if(h(r),t=u(t,r<0?0:0|w(r)),!f.TYPED_ARRAY_SUPPORT)for(var e=0;e<r;++e)t[e]=0;return t}function l(t,r,e){if("string"==typeof e&&""!==e||(e="utf8"),!f.isEncoding(e))throw new TypeError('"encoding" must be a valid string encoding');var n=0|v(r,e),i=(t=u(t,n)).write(r,e);return i!==n&&(t=t.slice(0,i)),t}function p(t,r){var e=r.length<0?0:0|w(r.length);t=u(t,e);for(var n=0;n<e;n+=1)t[n]=255&r[n];return t}function g(t,r,e,n){if(r.byteLength,e<0||r.byteLength<e)throw new RangeError("'offset' is out of bounds");if(r.byteLength<e+(n||0))throw new RangeError("'length' is out of bounds");return r=void 0===e&&void 0===n?new Uint8Array(r):void 0===n?new Uint8Array(r,e):new Uint8Array(r,e,n),f.TYPED_ARRAY_SUPPORT?(t=r).__proto__=f.prototype:t=p(t,r),t}function y(t,r){if(f.isBuffer(r)){var e=0|w(r.length);return 0===(t=u(t,e)).length?t:(r.copy(t,0,0,e),t)}if(r){if("undefined"!=typeof ArrayBuffer&&r.buffer instanceof ArrayBuffer||"length"in r)return"number"!=typeof r.length||W(r.length)?u(t,0):p(t,r);if("Buffer"===r.type&&n(r.data))return p(t,r.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function w(t){if(t>=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|t}function d(t){return+t!=t&&(t=0),f.alloc(+t)}function v(t,r){if(f.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var e=t.length;if(0===e)return 0;for(var n=!1;;)switch(r){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":case void 0:return $(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*e;case"hex":return e>>>1;case"base64":return K(t).length;default:if(n)return $(t).length;r=(""+r).toLowerCase(),n=!0}}function E(t,r,e){var n=!1;if((void 0===r||r<0)&&(r=0),r>this.length)return"";if((void 0===e||e>this.length)&&(e=this.length),e<=0)return"";if((e>>>=0)<=(r>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return x(this,r,e);case"utf8":case"utf-8":return Y(this,r,e);case"ascii":return L(this,r,e);case"latin1":case"binary":return D(this,r,e);case"base64":return S(this,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,r,e);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function b(t,r,e){var n=t[r];t[r]=t[e],t[e]=n}function R(t,r,e,n,i){if(0===t.length)return-1;if("string"==typeof e?(n=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),e=+e,isNaN(e)&&(e=i?0:t.length-1),e<0&&(e=t.length+e),e>=t.length){if(i)return-1;e=t.length-1}else if(e<0){if(!i)return-1;e=0}if("string"==typeof r&&(r=f.from(r,n)),f.isBuffer(r))return 0===r.length?-1:_(t,r,e,n,i);if("number"==typeof r)return r&=255,f.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,r,e):Uint8Array.prototype.lastIndexOf.call(t,r,e):_(t,[r],e,n,i);throw new TypeError("val must be string, number or Buffer")}function _(t,r,e,n,i){var o,u=1,f=t.length,s=r.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||r.length<2)return-1;u=2,f/=2,s/=2,e/=2}function h(t,r){return 1===u?t[r]:t.readUInt16BE(r*u)}if(i){var a=-1;for(o=e;o<f;o++)if(h(t,o)===h(r,-1===a?0:o-a)){if(-1===a&&(a=o),o-a+1===s)return a*u}else-1!==a&&(o-=o-a),a=-1}else for(e+s>f&&(e=f-s),o=e;o>=0;o--){for(var c=!0,l=0;l<s;l++)if(h(t,o+l)!==h(r,l)){c=!1;break}if(c)return o}return-1}function A(t,r,e,n){e=Number(e)||0;var i=t.length-e;n?(n=Number(n))>i&&(n=i):n=i;var o=r.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var u=0;u<n;++u){var f=parseInt(r.substr(2*u,2),16);if(isNaN(f))return u;t[e+u]=f}return u}function m(t,r,e,n){return Q($(r,t.length-e),t,e,n)}function P(t,r,e,n){return Q(G(r),t,e,n)}function T(t,r,e,n){return P(t,r,e,n)}function B(t,r,e,n){return Q(K(r),t,e,n)}function U(t,r,e,n){return Q(H(r,t.length-e),t,e,n)}function S(t,e,n){return 0===e&&n===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(e,n))}function Y(t,r,e){e=Math.min(t.length,e);for(var n=[],i=r;i<e;){var o,u,f,s,h=t[i],a=null,c=h>239?4:h>223?3:h>191?2:1;if(i+c<=e)switch(c){case 1:h<128&&(a=h);break;case 2:128==(192&(o=t[i+1]))&&(s=(31&h)<<6|63&o)>127&&(a=s);break;case 3:o=t[i+1],u=t[i+2],128==(192&o)&&128==(192&u)&&(s=(15&h)<<12|(63&o)<<6|63&u)>2047&&(s<55296||s>57343)&&(a=s);break;case 4:o=t[i+1],u=t[i+2],f=t[i+3],128==(192&o)&&128==(192&u)&&128==(192&f)&&(s=(15&h)<<18|(63&o)<<12|(63&u)<<6|63&f)>65535&&s<1114112&&(a=s)}null===a?(a=65533,c=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|1023&a),n.push(a),i+=c}return O(n)}exports.Buffer=f,exports.SlowBuffer=d,exports.INSPECT_MAX_BYTES=50,f.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:i(),exports.kMaxLength=o(),f.poolSize=8192,f._augment=function(t){return t.__proto__=f.prototype,t},f.from=function(t,r,e){return s(null,t,r,e)},f.TYPED_ARRAY_SUPPORT&&(f.prototype.__proto__=Uint8Array.prototype,f.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&f[Symbol.species]===f&&Object.defineProperty(f,Symbol.species,{value:null,configurable:!0})),f.alloc=function(t,r,e){return a(null,t,r,e)},f.allocUnsafe=function(t){return c(null,t)},f.allocUnsafeSlow=function(t){return c(null,t)},f.isBuffer=function(t){return!(null==t||!t._isBuffer)},f.compare=function(t,r){if(!f.isBuffer(t)||!f.isBuffer(r))throw new TypeError("Arguments must be Buffers");if(t===r)return 0;for(var e=t.length,n=r.length,i=0,o=Math.min(e,n);i<o;++i)if(t[i]!==r[i]){e=t[i],n=r[i];break}return e<n?-1:n<e?1:0},f.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},f.concat=function(t,r){if(!n(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return f.alloc(0);var e;if(void 0===r)for(r=0,e=0;e<t.length;++e)r+=t[e].length;var i=f.allocUnsafe(r),o=0;for(e=0;e<t.length;++e){var u=t[e];if(!f.isBuffer(u))throw new TypeError('"list" argument must be an Array of Buffers');u.copy(i,o),o+=u.length}return i},f.byteLength=v,f.prototype._isBuffer=!0,f.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var r=0;r<t;r+=2)b(this,r,r+1);return this},f.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var r=0;r<t;r+=4)b(this,r,r+3),b(this,r+1,r+2);return this},f.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var r=0;r<t;r+=8)b(this,r,r+7),b(this,r+1,r+6),b(this,r+2,r+5),b(this,r+3,r+4);return this},f.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?Y(this,0,t):E.apply(this,arguments)},f.prototype.equals=function(t){if(!f.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===f.compare(this,t)},f.prototype.inspect=function(){var t="",r=exports.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),"<Buffer "+t+">"},f.prototype.compare=function(t,r,e,n,i){if(!f.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===r&&(r=0),void 0===e&&(e=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),r<0||e>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&r>=e)return 0;if(n>=i)return-1;if(r>=e)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(n>>>=0),u=(e>>>=0)-(r>>>=0),s=Math.min(o,u),h=this.slice(n,i),a=t.slice(r,e),c=0;c<s;++c)if(h[c]!==a[c]){o=h[c],u=a[c];break}return o<u?-1:u<o?1:0},f.prototype.includes=function(t,r,e){return-1!==this.indexOf(t,r,e)},f.prototype.indexOf=function(t,r,e){return R(this,t,r,e,!0)},f.prototype.lastIndexOf=function(t,r,e){return R(this,t,r,e,!1)},f.prototype.write=function(t,r,e,n){if(void 0===r)n="utf8",e=this.length,r=0;else if(void 0===e&&"string"==typeof r)n=r,e=this.length,r=0;else{if(!isFinite(r))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");r|=0,isFinite(e)?(e|=0,void 0===n&&(n="utf8")):(n=e,e=void 0)}var i=this.length-r;if((void 0===e||e>i)&&(e=i),t.length>0&&(e<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return A(this,t,r,e);case"utf8":case"utf-8":return m(this,t,r,e);case"ascii":return P(this,t,r,e);case"latin1":case"binary":return T(this,t,r,e);case"base64":return B(this,t,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U(this,t,r,e);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var I=4096;function O(t){var r=t.length;if(r<=I)return String.fromCharCode.apply(String,t);for(var e="",n=0;n<r;)e+=String.fromCharCode.apply(String,t.slice(n,n+=I));return e}function L(t,r,e){var n="";e=Math.min(t.length,e);for(var i=r;i<e;++i)n+=String.fromCharCode(127&t[i]);return n}function D(t,r,e){var n="";e=Math.min(t.length,e);for(var i=r;i<e;++i)n+=String.fromCharCode(t[i]);return n}function x(t,r,e){var n=t.length;(!r||r<0)&&(r=0),(!e||e<0||e>n)&&(e=n);for(var i="",o=r;o<e;++o)i+=Z(t[o]);return i}function C(t,r,e){for(var n=t.slice(r,e),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function M(t,r,e){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+r>e)throw new RangeError("Trying to access beyond buffer length")}function k(t,r,e,n,i,o){if(!f.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>i||r<o)throw new RangeError('"value" argument is out of bounds');if(e+n>t.length)throw new RangeError("Index out of range")}function N(t,r,e,n){r<0&&(r=65535+r+1);for(var i=0,o=Math.min(t.length-e,2);i<o;++i)t[e+i]=(r&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function z(t,r,e,n){r<0&&(r=4294967295+r+1);for(var i=0,o=Math.min(t.length-e,4);i<o;++i)t[e+i]=r>>>8*(n?i:3-i)&255}function F(t,r,e,n,i,o){if(e+n>t.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function j(t,r,n,i,o){return o||F(t,r,n,4,3.4028234663852886e38,-3.4028234663852886e38),e.write(t,r,n,i,23,4),n+4}function q(t,r,n,i,o){return o||F(t,r,n,8,1.7976931348623157e308,-1.7976931348623157e308),e.write(t,r,n,i,52,8),n+8}f.prototype.slice=function(t,r){var e,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(r=void 0===r?n:~~r)<0?(r+=n)<0&&(r=0):r>n&&(r=n),r<t&&(r=t),f.TYPED_ARRAY_SUPPORT)(e=this.subarray(t,r)).__proto__=f.prototype;else{var i=r-t;e=new f(i,void 0);for(var o=0;o<i;++o)e[o]=this[o+t]}return e},f.prototype.readUIntLE=function(t,r,e){t|=0,r|=0,e||M(t,r,this.length);for(var n=this[t],i=1,o=0;++o<r&&(i*=256);)n+=this[t+o]*i;return n},f.prototype.readUIntBE=function(t,r,e){t|=0,r|=0,e||M(t,r,this.length);for(var n=this[t+--r],i=1;r>0&&(i*=256);)n+=this[t+--r]*i;return n},f.prototype.readUInt8=function(t,r){return r||M(t,1,this.length),this[t]},f.prototype.readUInt16LE=function(t,r){return r||M(t,2,this.length),this[t]|this[t+1]<<8},f.prototype.readUInt16BE=function(t,r){return r||M(t,2,this.length),this[t]<<8|this[t+1]},f.prototype.readUInt32LE=function(t,r){return r||M(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},f.prototype.readUInt32BE=function(t,r){return r||M(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},f.prototype.readIntLE=function(t,r,e){t|=0,r|=0,e||M(t,r,this.length);for(var n=this[t],i=1,o=0;++o<r&&(i*=256);)n+=this[t+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*r)),n},f.prototype.readIntBE=function(t,r,e){t|=0,r|=0,e||M(t,r,this.length);for(var n=r,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*r)),o},f.prototype.readInt8=function(t,r){return r||M(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},f.prototype.readInt16LE=function(t,r){r||M(t,2,this.length);var e=this[t]|this[t+1]<<8;return 32768&e?4294901760|e:e},f.prototype.readInt16BE=function(t,r){r||M(t,2,this.length);var e=this[t+1]|this[t]<<8;return 32768&e?4294901760|e:e},f.prototype.readInt32LE=function(t,r){return r||M(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},f.prototype.readInt32BE=function(t,r){return r||M(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},f.prototype.readFloatLE=function(t,r){return r||M(t,4,this.length),e.read(this,t,!0,23,4)},f.prototype.readFloatBE=function(t,r){return r||M(t,4,this.length),e.read(this,t,!1,23,4)},f.prototype.readDoubleLE=function(t,r){return r||M(t,8,this.length),e.read(this,t,!0,52,8)},f.prototype.readDoubleBE=function(t,r){return r||M(t,8,this.length),e.read(this,t,!1,52,8)},f.prototype.writeUIntLE=function(t,r,e,n){(t=+t,r|=0,e|=0,n)||k(this,t,r,e,Math.pow(2,8*e)-1,0);var i=1,o=0;for(this[r]=255&t;++o<e&&(i*=256);)this[r+o]=t/i&255;return r+e},f.prototype.writeUIntBE=function(t,r,e,n){(t=+t,r|=0,e|=0,n)||k(this,t,r,e,Math.pow(2,8*e)-1,0);var i=e-1,o=1;for(this[r+i]=255&t;--i>=0&&(o*=256);)this[r+i]=t/o&255;return r+e},f.prototype.writeUInt8=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,1,255,0),f.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[r]=255&t,r+1},f.prototype.writeUInt16LE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8):N(this,t,r,!0),r+2},f.prototype.writeUInt16BE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=255&t):N(this,t,r,!1),r+2},f.prototype.writeUInt32LE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=255&t):z(this,t,r,!0),r+4},f.prototype.writeUInt32BE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t):z(this,t,r,!1),r+4},f.prototype.writeIntLE=function(t,r,e,n){if(t=+t,r|=0,!n){var i=Math.pow(2,8*e-1);k(this,t,r,e,i-1,-i)}var o=0,u=1,f=0;for(this[r]=255&t;++o<e&&(u*=256);)t<0&&0===f&&0!==this[r+o-1]&&(f=1),this[r+o]=(t/u>>0)-f&255;return r+e},f.prototype.writeIntBE=function(t,r,e,n){if(t=+t,r|=0,!n){var i=Math.pow(2,8*e-1);k(this,t,r,e,i-1,-i)}var o=e-1,u=1,f=0;for(this[r+o]=255&t;--o>=0&&(u*=256);)t<0&&0===f&&0!==this[r+o+1]&&(f=1),this[r+o]=(t/u>>0)-f&255;return r+e},f.prototype.writeInt8=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,1,127,-128),f.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[r]=255&t,r+1},f.prototype.writeInt16LE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8):N(this,t,r,!0),r+2},f.prototype.writeInt16BE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=255&t):N(this,t,r,!1),r+2},f.prototype.writeInt32LE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,4,2147483647,-2147483648),f.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24):z(this,t,r,!0),r+4},f.prototype.writeInt32BE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),f.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t):z(this,t,r,!1),r+4},f.prototype.writeFloatLE=function(t,r,e){return j(this,t,r,!0,e)},f.prototype.writeFloatBE=function(t,r,e){return j(this,t,r,!1,e)},f.prototype.writeDoubleLE=function(t,r,e){return q(this,t,r,!0,e)},f.prototype.writeDoubleBE=function(t,r,e){return q(this,t,r,!1,e)},f.prototype.copy=function(t,r,e,n){if(e||(e=0),n||0===n||(n=this.length),r>=t.length&&(r=t.length),r||(r=0),n>0&&n<e&&(n=e),n===e)return 0;if(0===t.length||0===this.length)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(e<0||e>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-r<n-e&&(n=t.length-r+e);var i,o=n-e;if(this===t&&e<r&&r<n)for(i=o-1;i>=0;--i)t[i+r]=this[i+e];else if(o<1e3||!f.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)t[i+r]=this[i+e];else Uint8Array.prototype.set.call(t,this.subarray(e,e+o),r);return o},f.prototype.fill=function(t,r,e,n){if("string"==typeof t){if("string"==typeof r?(n=r,r=0,e=this.length):"string"==typeof e&&(n=e,e=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!f.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof t&&(t&=255);if(r<0||this.length<r||this.length<e)throw new RangeError("Out of range index");if(e<=r)return this;var o;if(r>>>=0,e=void 0===e?this.length:e>>>0,t||(t=0),"number"==typeof t)for(o=r;o<e;++o)this[o]=t;else{var u=f.isBuffer(t)?t:$(new f(t,n).toString()),s=u.length;for(o=0;o<e-r;++o)this[o+r]=u[o%s]}return this};var V=/[^+\/0-9A-Za-z-_]/g;function X(t){if((t=J(t).replace(V,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}function J(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function Z(t){return t<16?"0"+t.toString(16):t.toString(16)}function $(t,r){var e;r=r||1/0;for(var n=t.length,i=null,o=[],u=0;u<n;++u){if((e=t.charCodeAt(u))>55295&&e<57344){if(!i){if(e>56319){(r-=3)>-1&&o.push(239,191,189);continue}if(u+1===n){(r-=3)>-1&&o.push(239,191,189);continue}i=e;continue}if(e<56320){(r-=3)>-1&&o.push(239,191,189),i=e;continue}e=65536+(i-55296<<10|e-56320)}else i&&(r-=3)>-1&&o.push(239,191,189);if(i=null,e<128){if((r-=1)<0)break;o.push(e)}else if(e<2048){if((r-=2)<0)break;o.push(e>>6|192,63&e|128)}else if(e<65536){if((r-=3)<0)break;o.push(e>>12|224,e>>6&63|128,63&e|128)}else{if(!(e<1114112))throw new Error("Invalid code point");if((r-=4)<0)break;o.push(e>>18|240,e>>12&63|128,e>>6&63|128,63&e|128)}}return o}function G(t){for(var r=[],e=0;e<t.length;++e)r.push(255&t.charCodeAt(e));return r}function H(t,r){for(var e,n,i,o=[],u=0;u<t.length&&!((r-=2)<0);++u)n=(e=t.charCodeAt(u))>>8,i=e%256,o.push(i),o.push(n);return o}function K(t){return r.toByteArray(X(t))}function Q(t,r,e,n){for(var i=0;i<n&&!(i+e>=r.length||i>=t.length);++i)r[i+e]=t[i];return i}function W(t){return t!=t}
566},{"base64-js":"
566FRly","ieee754":"Quj6","isarray":"aqZJ","buffer":"aMB2"}],"z0A1":[function(require,module,exports) {
567var Buffer = require("buffer").Buffer;
568var e=require("buffer").Buffer;function n(){var n='const e="function"==typeof Object.assign?Object.assign:function(e,n){if(null==e)throw new TypeError("Cannot convert undefined or null to object");const t=Object(e);for(let e=1,n=arguments.length;e<n;++e){const n=arguments[e];if(null!=n)for(const e in n)n.hasOwnProperty(e)&&(t[e]=n[e])}return t},n="undefined"!=typeof navigator&&void 0!==navigator.userAgent?navigator.userAgent.toLowerCase():"";n.indexOf("firefox");-1!==n.indexOf("safari")&&-1==n.indexOf("chrom")&&(n.indexOf("version/15.4")>=0||n.match(/cpu (os|iphone os) 15_4 like mac os x/)),-1!==n.indexOf("webkit")&&n.indexOf("edge"),n.indexOf("macintosh"),"undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof OffscreenCanvas&&(self,WorkerGlobalScope),function(){let e=!1;try{const n=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("_",null,n),window.removeEventListener("_",null,n)}catch(e){}}(),new Array(6);const t="GENERATE_BUFFERS",o=[],r={vertexPosition:0,indexPosition:0};function i(e,n,t,o,r){e[n+0]=t,e[n+1]=o,e[n+2]=r}function s(e,n,t,s,f,c){const l=3+f,a=e[n+0],u=e[n+1],d=o;d.length=f;for(let t=0;t<d.length;t++)d[t]=e[n+2+t];let g=c?c.vertexPosition:0,x=c?c.indexPosition:0;const h=g/l;return i(t,g,a,u,0),d.length&&t.set(d,g+3),g+=l,i(t,g,a,u,1),d.length&&t.set(d,g+3),g+=l,i(t,g,a,u,2),d.length&&t.set(d,g+3),g+=l,i(t,g,a,u,3),d.length&&t.set(d,g+3),g+=l,s[x++]=h,s[x++]=h+1,s[x++]=h+3,s[x++]=h+1,s[x++]=h+2,s[x++]=h+3,r.vertexPosition=g,r.indexPosition=x,r}const f=self;f.onmessage=n=>{const o=n.data;if(o.type===t){const n=3,t=2,r=o.customAttributesCount,i=t+r,c=new Float32Array(o.renderInstructions),l=c.length/i,a=4*l*(r+n),u=new Uint32Array(6*l),d=new Float32Array(a);let g;for(let e=0;e<c.length;e+=i)g=s(c,e,d,u,r,g);const x=e({vertexBuffer:d.buffer,indexBuffer:u.buffer,renderInstructions:c.buffer},o);f.postMessage(x,[d.buffer,u.buffer,c.buffer])}};';return new Worker("undefined"==typeof Blob?"data:application/javascript;base64,"+e.from(n,"binary").toString("base64"):URL.createObjectURL(new Blob([n],{type:"application/javascript"})))}Object.defineProperty(exports,"__esModule",{value:!0}),exports.create=n;
569},{"buffer":"aMB2"}],"m8cI":[function(require,module,exports) {
570"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=g(require("../../layer/BaseVector.js")),t=g(require("../../source/VectorEventType.js")),r=g(require("../../ViewHint.js")),i=g(require("../../webgl/Buffer.js")),n=p(require("./Layer.js")),s=g(require("../../webgl/RenderTarget.js")),a=require("../../webgl.js"),o=require("../../webgl/Helper.js"),u=require("../../transform.js"),h=require("../../asserts.js"),f=require("../../extent.js"),c=require("../../worker/webgl.js"),l=require("../../util.js"),d=require("../../events.js");function _(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(_=function(e){return e?r:t})(e)}function p(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=_(t);if(r&&r.has(e))return r.get(e);var i={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!==s&&{}.hasOwnProperty.call(e,s)){var a=n?Object.getOwnPropertyDescriptor(e,s):null;a&&(a.get||a.set)?Object.defineProperty(i,s,a):i[s]=e[s]}return i.default=e,r&&r.set(e,i),i}function g(e){return e&&e.__esModule?e:{default:e}}var y=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),m=function(_){function p(e,r){var s=this,h=r.uniforms||{},p=(0,u.create)();h[o.DefaultUniform.PROJECTION_MATRIX]=p,(s=_.call(this,e,{uniforms:h,postProcesses:r.postProcesses}
570)||this).ready=!1,s.sourceRevision_=-1,s.verticesBuffer_=new i.default(a.ARRAY_BUFFER,a.DYNAMIC_DRAW),s.hitVerticesBuffer_=new i.default(a.ARRAY_BUFFER,a.DYNAMIC_DRAW),s.indicesBuffer_=new i.default(a.ELEMENT_ARRAY_BUFFER,a.DYNAMIC_DRAW),s.vertexShader_=r.vertexShader,s.fragmentShader_=r.fragmentShader,s.program_,s.hitDetectionEnabled_=!(!r.hitFragmentShader||!r.hitVertexShader),s.hitVertexShader_=r.hitVertexShader,s.hitFragmentShader_=r.hitFragmentShader,s.hitProgram_;var g=r.attributes?r.attributes.map(function(e){return{name:"a_"+e.name,size:1,type:o.AttributeType.FLOAT}}):[];s.attributes=[{name:"a_position",size:2,type:o.AttributeType.FLOAT},{name:"a_index",size:1,type:o.AttributeType.FLOAT}].concat(g),s.hitDetectionAttributes=[{name:"a_position",size:2,type:o.AttributeType.FLOAT},{name:"a_index",size:1,type:o.AttributeType.FLOAT},{name:"a_hitColor",size:4,type:o.AttributeType.FLOAT},{name:"a_featureUid",size:1,type:o.AttributeType.FLOAT}].concat(g),s.customAttributes=r.attributes?r.attributes:[],s.previousExtent_=(0,f.createEmpty)(),s.currentTransform_=p,s.renderTransform_=(0,u.create)(),s.invertRenderTransform_=(0,u.create)(),s.renderInstructions_=new Float32Array(0),s.hitRenderInstructions_=new Float32Array(0),s.hitRenderTarget_,s.generateBuffersRun_=0,s.worker_=(0,c.create)(),s.worker_.addEventListener("message",function(e){var t=e.data;if(t.type===n.WebGLWorkerMessageType.GENERATE_BUFFERS){var r=t.projectionTransform;t.hitDetection?(this.hitVerticesBuffer_.fromArrayBuffer(t.vertexBuffer),this.helper.flushBufferData(this.hitVerticesBuffer_)):(this.verticesBuffer_.fromArrayBuffer(t.vertexBuffer),this.helper.flushBufferData(this.verticesBuffer_)),this.indicesBuffer_.fromArrayBuffer(t.indexBuffer),this.helper.flushBufferData(this.indicesBuffer_),this.renderTransform_=r,(0,u.makeInverse)(this.invertRenderTransform_,this.renderTransform_),t.hitDetection?this.hitRenderInstructions_=new Float32Array(e.data.renderInstructions):(this.renderInstructions_=new Float32Array(e.data.renderInstructions),t.generateBuffersRun===this.generateBuffersRun_&&(this.ready=!0)),this.getLayer().changed()}}.bind(s)),s.featureCache_={},s.featureCount_=0;var y=s.getLayer().getSource();return s.sourceListenKeys_=[(0,d.listen)(y,t.default.ADDFEATURE,s.handleSourceFeatureAdded_,s),(0,d.listen)(y,t.default.CHANGEFEATURE,s.handleSourceFeatureChanged_,s),(0,d.listen)(y,t.default.REMOVEFEATURE,s.handleSourceFeatureDelete_,s),(0,d.listen)(y,t.default.CLEAR,s.handleSourceFeatureClear_,s)],y.forEachFeature(function(e){this.featureCache_[(0,l.getUid)(e)]={feature:e,properties:e.getProperties(),geometry:e.getGeometry()},this.featureCount_++}.bind(s)),s}return y(p,_),p.prototype.afterHelperCreated=function(){this.program_=this.helper.getProgram(this.fragmentShader_,this.vertexShader_),this.hitDetectionEnabled_&&(this.hitProgram_=this.helper.getProgram(this.hitFragmentShader_,this.hitVertexShader_),this.hitRenderTarget_=new s.default(this.helper))},p.prototype.handleSourceFeatureAdded_=function(e){var t=e.feature;this.featureCache_[(0,l.getUid)(t)]={feature:t,properties:t.getProperties(),geometry:t.getGeometry()},this.featureCount_++},p.prototype.handleSourceFeatureChanged_=function(e){var t=e.feature;this.featureCache_[(0,l.getUid)(t)]={feature:t,properties:t.getProperties(),geometry:t.getGeometry()}},p.prototype.handleSourceFeatureDelete_=function(e){var t=e.feature;delete this.featureCache_[(0,l.getUid)(t)],this.featureCount_--},p.prototype.handleSourceFeatureClear_=function(){this.featureCache_={},this.featureCount_=0},p.prototype.renderFrame=function(e){var t=this.helper.getGL();this.preRender(t,e);var r=e.viewState.projection,i=this.getLayer().getSource().getWrapX()&&r.canWrapX(),n=r.getExtent(),s=e.extent,a=i?(0,f.getWidth)(n):null,o=i?Math.ceil((s[2]-n[2])/a)+1:1,h=i?Math.floor((s[0]-n[0])/a):0,c=h,l=this.indicesBuffer_.getSize();do{this.helper.makeProjectionTransform(e,this.currentTransform_),(0,u.translate)(this.currentTransform_,c*a,0),(0,u.multiply)(this.currentTransform_,this.invertRenderTransform_),this.helper.applyUniforms(e),this.helper.drawElements(0,l)}while(++c<o);this.helper.finalizeDraw(e,this.dispatchPreComposeEvent,this.dispatchPostComposeEvent);var d=this.helper.getCanvas();return this.hitDetectionEnabled_&&(this.renderHitDetection(e,h,o,a),this.hitRenderTarget_.clearCachedData()),this.postRender(t,e),d},p.prototype.prepareFrameInternal=function(t){var i=this.getLayer(),n=i.getSource(),s=t.viewState,a=!t.viewHints[r.default.ANIMATING]&&!t.viewHints[r.default.INTERACTING],o=!(0,f.equals)(this.previousExtent_,t.extent),u=this.sourceRevision_<n.getRevision();if(u&&(this.sourceRevision_=n.getRevision()),a&&(o||u)){var h=s.projection,c=s.resolution,l=i instanceof e.default?i.getRenderBuffer():0,d=(0,f.buffer)(t.extent,l*c);n.loadFeatures(d,c,h),this.rebuildBuffers_(t),this.previousExtent_=t.extent.slice()}return this.helper.useProgram(this.program_),this.helper.prepareDraw(t),this.helper.bindBuffer(this.verticesBuffer_),this.helper.bindBuffer(this.indicesBuffer_),this.helper.enableAttributes(this.attributes),!0},p.prototype.rebuildBuffers_=function(e){var t=(0,u.create)();this.helper.makeProjectionTransform(e,t);var r,i,s=(2+this.customAttributes.length)*this.featureCount_;if(this.renderInstructions_&&this.renderInstructions_.length===s||(this.renderInstructions_=new Float32Array(s)),this.hitDetectionEnabled_){var a=(7+this.customAttributes.length)*this.featureCount_;this.hitRenderInstructions_&&this.hitRenderInstructions_.length===a||(this.hitRenderInstructions_=new Float32Array(a))}var o,h=[],f=[],c=0,l=0;for(var d in this.featureCache_)if((i=(r=this.featureCache_[d]).geometry)&&"Point"===i.getType()){h[0]=i.getFlatCoordinates()[0],h[1]=i.getFlatCoordinates()[1],(0,u.apply)(t,h),o=(0,n.colorEncodeId)(l+6,f),this.renderInstructions_[c++]=h[0],this.renderInstructions_[c++]=h[1],this.hitDetectionEnabled_&&(this.hitRenderInstructions_[l++]=h[0],this.hitRenderInstructions_[l++]=h[1],this.hitRenderInstructions_[l++]=o[0],this.hitRenderInstructions_[l++]=o[1],this.hitRenderInstructions_[l++]=o[2],this.hitRenderInstructions_[l++]=o[3],this.hitRenderInstructions_[l++]=Number(d));for(var _=void 0,p=0;p<this.customAttributes.length;p++)_=this.customAttributes[p].callback(r.feature,r.properties),this.renderInstructions_[c++]=_,this.hitDetectionEnabled_&&(this.hitRenderInstructions_[l++]=_)}var g={type:n.WebGLWorkerMessageType.GENERATE_BUFFERS,renderInstructions:this.renderInstructions_.buffer,customAttributesCount:this.customAttributes.length};if(g.projectionTransform=t,g.generateBuffersRun=++this.generateBuffersRun_,this.ready=!1,this.worker_.postMessage(g,[this.renderInstructions_.buffer]),this.renderInstructions_=null,this.hitDetectionEnabled_){var y={type:n.WebGLWorkerMessageType.GENERATE_BUFFERS,renderInstructions:this.hitRenderInstructions_.buffer,customAttributesCount:5+this.customAttributes.length};y.projectionTransform=t,y.hitDetection=!0,this.worker_.postMessage(y,[this.hitRenderInstructions_.buffer]),this.hitRenderInstructions_=null}},p.prototype.forEachFeatureAtCoordinate=function(e,t,r,i,s){if((0,h.assert)(this.hitDetectionEnabled_,66),this.hitRenderInstructions_){var a=(0,u.apply)(t.coordinateToPixelTransform,e.slice()),o=this.hitRenderTarget_.readPixel(a[0]/2,a[1]/2),f=[o[0]/255,o[1]/255,o[2]/255,o[3]/255],c=(0,n.colorDecodeId)(f),l=this.hitRenderInstructions_[c],d=Math.floor(l).toString(),_=this.getLayer().getSource().getFeatureByUid(d);return _?i(_,this.getLayer(),null):void 0}},p.prototype.renderHitDetection=function(e,t,r,i){if(this.hitVerticesBuffer_.getSize()){var n=t;this.hitRenderTarget_.setSize([Math.floor(e.size[0]/2),Math.floor(e.size[1]/2)]),this.helper.useProgram(this.hitProgram_),this.helper.prepareDrawToRenderTarget(e,this.hitRenderTarget_,!0),this.helper.bindBuffer(this.hitVerticesBuffer_),this.helper.bindBuffer(this.indicesBuffer_),this.helper.enableAttributes(this.hitDetectionAttributes);do{this.helper.makeProjectionTransform(e,this.currentTransform_),(0,u.translate)(this.currentTransform_,n*i,0),(0,u.multiply)(this.currentTransform_,this.invertRenderTransform_),this.helper.applyUniforms(e);var s=this.indicesBuffer_.getSize();this.helper.drawElements(0,s)}while(++n<r)}},p.prototype.disposeInternal=function(){this.worker_.terminate(),this.layer_=null,this.sourceListenKeys_.forEach(function(e){(0,d.unlistenByKey)(e)}),this.sourceListenKeys_=null,_.prototype.disposeInternal.call(this)},p}(n.default),v=exports.default=m;
571},{"../../layer/BaseVector.js":"pskK","../../source/VectorEventType.js":"s8Fc","../../ViewHint.js":"cuLW","../../webgl/Buffer.js":"zsRd","./Layer.js":"nUxs","../../webgl/RenderTarget.js":"KkPv","../../webgl.
571js":"SCyv","../../webgl/Helper.js":"w1WE","../../transform.js":"P4eA","../../asserts.js":"fLG6","../../extent.js":"QDir","../../worker/webgl.js":"z0A1","../../util.js":"KniQ","../../events.js":"UqnM"}],"I4BI":[function(require,module,exports) {
572"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=r(require("./BaseVector.js")),e=r(require("../renderer/webgl/PointsLayer.js")),n=require("../obj.js"),o=require("../math.js"),i=require("../dom.js");function r(t){return t&&t.__esModule?t:{default:t}}var a=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),u={BLUR:"blur",GRADIENT:"gradient",RADIUS:"radius"},s=["#00f","#0ff","#0f0","#ff0","#f00"],f=function(t){function i(e){var o=this,i=e||{},r=(0,n.assign)({},i);delete r.gradient,delete r.radius,delete r.blur,delete r.weight,(o=t.call(this,r)||this).gradient_=null,o.addChangeListener(u.GRADIENT,o.handleGradientChanged_),o.setGradient(i.gradient?i.gradient:s),o.setBlur(void 0!==i.blur?i.blur:15),o.setRadius(void 0!==i.radius?i.radius:8);var a=i.weight?i.weight:"weight";return o.weightFunction_="string"==typeof a?function(t){return t.get(a)}:a,o.setRenderOrder(null),o}return a(i,t),i.prototype.getBlur=function(){return this.get(u.BLUR)},i.prototype.getGradient=function(){return this.get(u.GRADIENT)},i.prototype.getRadius=function(){return this.get(u.RADIUS)},i.prototype.handleGradientChanged_=function(){this.gradient_=l(this.getGradient())},i.prototype.setBlur=function(t){this.set(u.BLUR,t)},i.prototype.setGradient=function(t){this.set(u.GRADIENT,t)},i.prototype.setRadius=function(t){this.set(u.RADIUS,t)},i.prototype.createRenderer=function(){return new e.default(this,{className:this.getClassName(),attributes:[{name:"weight",callback:function(t){var e=this.weightFunction_(t);return void 0!==e?(0,o.clamp)(e,0,1):1}.bind(this)}],vertexShader:"\n        precision mediump float;\n        uniform mat4 u_projectionMatrix;\n        uniform mat4 u_offsetScaleMatrix;\n        uniform float u_size;\n        attribute vec2 a_position;\n        attribute float a_index;\n        attribute float a_weight;\n\n        varying vec2 v_texCoord;\n        varying float v_weight;\n\n        void main(void) {\n          mat4 offsetMatrix = u_offsetScaleMatrix;\n          float offsetX = a_index == 0.0 || a_index == 3.0 ? -u_size / 2.0 : u_size / 2.0;\n          float offsetY = a_index == 0.0 || a_index == 1.0 ? -u_size / 2.0 : u_size / 2.0;\n          vec4 offsets = offsetMatrix * vec4(offsetX, offsetY, 0.0, 0.0);\n          gl_Position = u_projectionMatrix * vec4(a_position, 0.0, 1.0) + offsets;\n          float u = a_index == 0.0 || a_index == 3.0 ? 0.0 : 1.0;\n          float v = a_index == 0.0 || a_index == 1.0 ? 0.0 : 1.0;\n          v_texCoord = vec2(u, v);\n          v_weight = a_weight;\n        }",fragmentShader:"\n        precision mediump float;\n        uniform float u_blurSlope;\n\n        varying vec2 v_texCoord;\n        varying float v_weight;\n\n        void main(void) {\n          vec2 texCoord = v_texCoord * 2.0 - vec2(1.0, 1.0);\n          float sqRadius = texCoord.x * texCoord.x + texCoord.y * texCoord.y;\n          float value = (1.0 - sqrt(sqRadius)) * u_blurSlope;\n          float alpha = smoothstep(0.0, 1.0, value) * v_weight;
572\n          gl_FragColor = vec4(alpha, alpha, alpha, alpha);\n        }",hitVertexShader:"\n        precision mediump float;\n        uniform mat4 u_projectionMatrix;\n        uniform mat4 u_offsetScaleMatrix;\n        uniform float u_size;\n        attribute vec2 a_position;\n        attribute float a_index;\n        attribute float a_weight;\n        attribute vec4 a_hitColor;\n\n        varying vec2 v_texCoord;\n        varying float v_weight;\n        varying vec4 v_hitColor;\n\n        void main(void) {\n          mat4 offsetMatrix = u_offsetScaleMatrix;\n          float offsetX = a_index == 0.0 || a_index == 3.0 ? -u_size / 2.0 : u_size / 2.0;\n          float offsetY = a_index == 0.0 || a_index == 1.0 ? -u_size / 2.0 : u_size / 2.0;\n          vec4 offsets = offsetMatrix * vec4(offsetX, offsetY, 0.0, 0.0);\n          gl_Position = u_projectionMatrix * vec4(a_position, 0.0, 1.0) + offsets;\n          float u = a_index == 0.0 || a_index == 3.0 ? 0.0 : 1.0;\n          float v = a_index == 0.0 || a_index == 1.0 ? 0.0 : 1.0;\n          v_texCoord = vec2(u, v);\n          v_hitColor = a_hitColor;\n          v_weight = a_weight;\n        }",hitFragmentShader:"\n        precision mediump float;\n        uniform float u_blurSlope;\n\n        varying vec2 v_texCoord;\n        varying float v_weight;\n        varying vec4 v_hitColor;\n\n        void main(void) {\n          vec2 texCoord = v_texCoord * 2.0 - vec2(1.0, 1.0);\n          float sqRadius = texCoord.x * texCoord.x + texCoord.y * texCoord.y;\n          float value = (1.0 - sqrt(sqRadius)) * u_blurSlope;\n          float alpha = smoothstep(0.0, 1.0, value) * v_weight;\n          if (alpha < 0.05) {\n            discard;\n          }\n\n          gl_FragColor = v_hitColor;\n        }",uniforms:{u_size:function(){return 2*(this.get(u.RADIUS)+this.get(u.BLUR))}.bind(this),u_blurSlope:function(){return this.get(u.RADIUS)/Math.max(1,this.get(u.BLUR))}.bind(this)},postProcesses:[{fragmentShader:"\n            precision mediump float;\n\n            uniform sampler2D u_image;\n            uniform sampler2D u_gradientTexture;\n            uniform float u_opacity;\n\n            varying vec2 v_texCoord;\n\n            void main() {\n              vec4 color = texture2D(u_image, v_texCoord);\n              gl_FragColor.a = color.a * u_opacity;\n              gl_FragColor.rgb = texture2D(u_gradientTexture, vec2(0.5, color.a)).rgb;\n              gl_FragColor.rgb *= gl_FragColor.a;\n            }",uniforms:{u_gradientTexture:function(){return this.gradient_}.bind(this),u_opacity:function(){return this.getOpacity()}.bind(this)}}]})},i.prototype.renderDeclutter=function(){},i}(t.default);function l(t){for(var e=(0,i.createCanvasContext2D)(1,256),n=e.createLinearGradient(0,0,1,256),o=1/(t.length-1),r=0,a=t.length;r<a;++r)n.addColorStop(r*o,t[r]);return e.fillStyle=n,e.fillRect(0,0,1,256),e.canvas}var d=exports.default=f;
573},{"./BaseVector.js":"pskK","../renderer/webgl/PointsLayer.js":"m8cI","../obj.js":"mH6q","../math.js":"B96G","../dom.js":"Xno5"}],"ZHEI":[function(require,module,exports) {
574"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=r(require("./Layer.js"));function r(t){return t&&t.__esModule?t:{default:t}}var e=function(){var t=function(r,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&(t[e]=r[e])})(r,e)};return function(r,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=r}t(r,e),r.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}}(),o=function(t){function r(r){var e=r||{};return t.call(this,e)||this}return e(r,t),r}(t.default),n=exports.default=o;
575},{"./Layer.js":"GCgv"}],"rzNj":[function(require,module,exports) {
576"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=u(require("./Layer.js")),e=u(require("../../ImageState.js")),r=u(require("../../ViewHint.js")),i=require("../../reproj/common.js"),n=require("./common.js"),o=require("../../transform.js"),a=require("../../obj.js"),s=require("../../extent.js"),l=require("../../proj.js");function u(t){return t&&t.__esModule?t:{default:t}}var h=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),g=function(t){function u(e){var r=t.call(this,e)||this;return r.image_=null,r}return h(u,t),u.prototype.getImage=function(){return this.image_?this.image_.getImage():null},u.prototype.prepareFrame=function(t){var n=t.layerStatesArray[t.layerIndex],o=t.pixelRatio,a=t.viewState,u=a.resolution,h=this.getLayer().getSource(),g=t.viewHints,p=t.extent;if(void 0!==n.extent&&(p=(0,s.getIntersection)(p,(0,l.fromUserExtent)(n.extent,a.projection))),!g[r.default.ANIMATING]&&!g[r.default.INTERACTING]&&!(0,s.isEmpty)(p))if(h){var c=a.projection;if(!i.ENABLE_RASTER_REPROJECTION){var f=h.getProjection();f&&(c=f)}var m=h.getImage(p,u,o,c);m&&(this.loadImage(m)?this.image_=m:m.getState()===e.default.EMPTY&&(this.image_=null))}else this.image_=null;return!!this.image_},u.prototype.getData=function(t){var e=this.frameState;if(!e)return null;var r=this.getLayer(),i=(0,o.apply)(e.pixelToCoordinateTransform,t.slice()),n=r.getExtent();if(n&&!(0,s.containsCoordinate)(n,i))return null;var a=this.image_.getExtent(),l=this.image_.getImage(),u=(0,s.getWidth)(a),h=Math.floor(l.width*((i[0]-a[0])/u));if(h<0||h>=l.width)return null;var g=(0,s.getHeight)(a),p=Math.floor(l.height*((a[3]-i[1])/g));return p<0||p>=l.height?null:this.getImageData(l,h,p)},u.prototype.renderFrame=function(t,e){var r=this.image_,i=r.getExtent(),u=r.getResolution(),h=r.getPixelRatio(),g=t.layerStatesArray[t.layerIndex],p=t.pixelRatio,c=t.viewState,f=c.center,m=p*u/(c.resolution*h),d=t.extent,v=c.resolution,x=c.rotation,y=Math.round((0,s.getWidth)(d)/v*p),_=Math.round((0,s.getHeight)(d)/v*p);(0,o.compose)(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/p,1/p,x,-y/2,-_/2),(0,o.makeInverse)(this.inversePixelTransform,this.pixelTransform);var I=(0,o.toString)(this.pixelTransform);
576this.useContainer(e,I,this.getBackground(t));var j=this.context,E=j.canvas;E.width!=y||E.height!=_?(E.width=y,E.height=_):this.containerReused||j.clearRect(0,0,y,_);var T=!1,w=!0;if(g.extent){var A=(0,l.fromUserExtent)(g.extent,c.projection);(T=(w=(0,s.intersects)(A,t.extent))&&!(0,s.containsExtent)(A,t.extent))&&this.clipUnrotated(j,t,A)}var S=r.getImage(),R=(0,o.compose)(this.tempTransform,y/2,_/2,m,m,0,h*(i[0]-f[0])/u,h*(f[1]-i[3])/u);this.renderedResolution=u*p/h;var M=S.width*R[0],O=S.height*R[3];if(this.getLayer().getSource().getInterpolate()||(0,a.assign)(j,n.IMAGE_SMOOTHING_DISABLED),this.preRender(j,t),w&&M>=.5&&O>=.5){var q=R[4],N=R[5],b=g.opacity,P=void 0;1!==b&&(P=j.globalAlpha,j.globalAlpha=b),j.drawImage(S,0,0,+S.width,+S.height,q,N,M,O),1!==b&&(j.globalAlpha=P)}return this.postRender(j,t),T&&j.restore(),(0,a.assign)(j,n.IMAGE_SMOOTHING_ENABLED),I!==E.style.transform&&(E.style.transform=I),this.container},u}(t.default),p=exports.default=g;
577},{"./Layer.js":"vPfl","../../ImageState.js":"Xz9x","../../ViewHint.js":"cuLW","../../reproj/common.js":"fF5X","./common.js":"wFjK","../../transform.js":"P4eA","../../obj.js":"mH6q","../../extent.js":"QDir","../../proj.js":"Diht"}],"KHBf":[function(require,module,exports) {
578"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=r(require("./BaseImage.js")),e=r(require("../renderer/canvas/ImageLayer.js"));function r(t){return t&&t.__esModule?t:{default:t}}var o=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function o(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),n=function(t){function r(e){return t.call(this,e)||this}return o(r,t),r.prototype.createRenderer=function(){return new e.default(this)},r.prototype.getData=function(e){return t.prototype.getData.call(this,e)},r}(t.default),u=exports.default=n;
579},{"./BaseImage.js":"ZHEI","../renderer/canvas/ImageLayer.js":"rzNj"}],"UzHN":[function(require,module,exports) {
580"use strict";module.exports=i;var t=require("ieee754");function i(t){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(t)?t:new Uint8Array(t||0),this.pos=0,this.type=0,this.length=this.buf.length}i.Varint=0,i.Fixed64=1,i.Bytes=2,i.Fixed32=5;var e=4294967296,r=1/e,s=12,n="undefined"==typeof TextDecoder?null:new TextDecoder("utf8");function o(t,i,e){var r,s,n=e.buf;if(r=(112&(s=n[e.pos++]))>>4,s<128)return a(t,r,i);if(r|=(127&(s=n[e.pos++]))<<3,s<128)return a(t,r,i);if(r|=(127&(s=n[e.pos++]))<<10,s<128)return a(t,r,i);if(r|=(127&(s=n[e.pos++]))<<17,s<128)return a(t,r,i);if(r|=(127&(s=n[e.pos++]))<<24,s<128)return a(t,r,i);if(r|=(1&(s=n[e.pos++]))<<31,s<128)return a(t,r,i);throw new Error("Expected varint not more than 10 bytes")}function h(t){return t.type===i.Bytes?t.readVarint()+t.pos:t.pos+1}function a(t,i,e){return e?4294967296*i+(t>>>0):4294967296*(i>>>0)+(t>>>0)}function u(t,i){var e,r;if(t>=0?(e=t%4294967296|0,r=t/4294967296|0):(r=~(-t/4294967296),4294967295^(e=~(-t%4294967296))?e=e+1|0:(e=0,r=r+1|0)),t>=0x10000000000000000||t<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");i.realloc(10),f(e,r,i),d(r,i)}function f(t,i,e){e.buf[e.pos++]=127&t|128,t>>>=7,e.buf[e.pos++]=127&t|128,t>>>=7,e.buf[e.pos++]=127&t|128,t>>>=7,e.buf[e.pos++]=127&t|128,t>>>=7,e.buf[e.pos]=127&t}function d(t,i){var e=(7&t)<<4;i.buf[i.pos++]|=e|((t>>>=3)?128:0),t&&(i.buf[i.pos++]=127&t|((t>>>=7)?128:0),t&&(i.buf[i.pos++]=127&t|((t>>>=7)?128:0),t&&(i.buf[i.pos++]=127&t|((t>>>=7)?128:0),t&&(i.buf[i.pos++]=127&t|((t>>>=7)?128:0),t&&(i.buf[i.pos++]=127&t)))))}function p(t,i,e){var r=i<=16383?1:i<=2097151?2:i<=268435455?3:Math.floor(Math.log(i)/(7*Math.LN2));e.realloc(r);for(var s=e.pos-1;s>=t;s--)e.buf[s+r]=e.buf[s]}function l(t,i){for(var e=0;e<t.length;e++)i.writeVarint(t[e])}function c(t,i){for(var e=0;e<t.length;e++)i.writeSVarint(t[e])}function w(t,i){for(var e=0;e<t.length;e++)i.writeFloat(t[e])}function F(t,i){for(var e=0;e<t.length;e++)i.writeDouble(t[e])}function g(t,i){for(var e=0;e<t.length;e++)i.writeBoolean(t[e])}function b(t,i){for(var e=0;e<t.length;e++)i.writeFixed32(t[e])}function x(t,i){for(var e=0;e<t.length;e++)i.writeSFixed32(t[e])}function v(t,i){for(var e=0;e<t.length;
vendor: 4,152 bytes, line 580
580e++)i.writeFixed64(t[e])}function y(t,i){for(var e=0;e<t.length;e++)i.writeSFixed64(t[e])}function V(t,i){return(t[i]|t[i+1]<<8|t[i+2]<<16)+16777216*t[i+3]}function S(t,i,e){t[e]=i,t[e+1]=i>>>8,t[e+2]=i>>>16,t[e+3]=i>>>24}function B(t,i){return(t[i]|t[i+1]<<8|t[i+2]<<16)+(t[i+3]<<24)}function k(t,i,e){for(var r="",s=i;s<e;){var n,o,h,a=t[s],u=null,f=a>239?4:a>223?3:a>191?2:1;if(s+f>e)break;1===f?a<128&&(u=a):2===f?128==(192&(n=t[s+1]))&&(u=(31&a)<<6|63&n)<=127&&(u=null):3===f?(n=t[s+1],o=t[s+2],128==(192&n)&&128==(192&o)&&((u=(15&a)<<12|(63&n)<<6|63&o)<=2047||u>=55296&&u<=57343)&&(u=null)):4===f&&(n=t[s+1],o=t[s+2],h=t[s+3],128==(192&n)&&128==(192&o)&&128==(192&h)&&((u=(15&a)<<18|(63&n)<<12|(63&o)<<6|63&h)<=65535||u>=1114112)&&(u=null)),null===u?(u=65533,f=1):u>65535&&(u-=65536,r+=String.fromCharCode(u>>>10&1023|55296),u=56320|1023&u),r+=String.fromCharCode(u),s+=f}return r}function M(t,i,e){return n.decode(t.subarray(i,e))}function P(t,i,e){for(var r,s,n=0;n<i.length;n++){if((r=i.charCodeAt(n))>55295&&r<57344){if(!s){r>56319||n+1===i.length?(t[e++]=239,t[e++]=191,t[e++]=189):s=r;continue}if(r<56320){t[e++]=239,t[e++]=191,t[e++]=189,s=r;continue}r=s-55296<<10|r-56320|65536,s=null}else s&&(t[e++]=239,t[e++]=191,t[e++]=189,s=null);r<128?t[e++]=r:(r<2048?t[e++]=r>>6|192:(r<65536?t[e++]=r>>12|224:(t[e++]=r>>18|240,t[e++]=r>>12&63|128),t[e++]=r>>6&63|128),t[e++]=63&r|128)}return e}i.prototype={destroy:function(){this.buf=null},readFields:function(t,i,e){for(e=e||this.length;this.pos<e;){var r=this.readVarint(),s=r>>3,n=this.pos;this.type=7&r,t(s,i,this),this.pos===n&&this.skip(r)}return i},readMessage:function(t,i){return this.readFields(t,i,this.readVarint()+this.pos)},readFixed32:function(){var t=V(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=B(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=V(this.buf,this.pos)+V(this.buf,this.pos+4)*e;return this.pos+=8,t},readSFixed64:function(){var t=V(this.buf,this.pos)+B(this.buf,this.pos+4)*e;return this.pos+=8,t},readFloat:function(){var i=t.read(this.buf,this.pos,!0,23,4);return this.pos+=4,i},readDouble:function(){var i=t.read(this.buf,this.pos,!0,52,8);return this.pos+=8,i},readVarint:function(t){var i,e,r=this.buf;return i=127&(e=r[this.pos++]),e<128?i:(i|=(127&(e=r[this.pos++]))<<7,e<128?i:(i|=(127&(e=r[this.pos++]))<<14,e<128?i:(i|=(127&(e=r[this.pos++]))<<21,e<128?i:o(i|=(15&(e=r[this.pos]))<<28,t,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var t=this.readVarint();return t%2==1?(t+1)/-2:t/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var t=this.readVarint()+this.pos,i=this.pos;return this.pos=t,t-i>=s&&n?M(this.buf,i,t):k(this.buf,i,t)},readBytes:function(){var t=this.readVarint()+this.pos,i=this.buf.subarray(this.pos,t);return this.pos=t,i},readPackedVarint:function(t,e){if(this.type!==i.Bytes)return t.push(this.readVarint(e));var r=h(this);for(t=t||[];this.pos<r;)t.push(this.readVarint(e));return t},readPackedSVarint:function(t){if(this.type!==i.Bytes)return t.push(this.readSVarint());var e=h(this);for(t=t||[];this.pos<e;)t.push(this.readSVarint());return t},readPackedBoolean:function(t){if(this.type!==i.Bytes)return t.push(this.readBoolean());var e=h(this);for(t=t||[];this.pos<e;)t.push(this.readBoolean());return t},readPackedFloat:function(t){if(this.type!==i.Bytes)return t.push(this.readFloat());var e=h(this);for(t=t||[];this.pos<e;)t.push(this.readFloat());return t},readPackedDouble:function(t){if(this.type!==i.Bytes)return t.push(this.readDouble());var e=h(this);for(t=t||[];this.pos<e;)t.push(this.readDouble());return t},readPackedFixed32:function(t){if(this.type!==i.Bytes)return t.push(this.readFixed32());var e=h(this);for(t=t||[];this.pos<e;)t.push(this.readFixed32());return t},readPackedSFixed32:function(t){if(this.type!==i.Bytes)return t.push(this.readSFixed32());var e=h(this);for(t=t||[];this.pos<e;)t.push(this.readSFixed32());return t},readPackedFixed64:function(t){if(this.type!==i.Bytes)return t.push(this.readFixed64());var e=h(this);for(t=t||[];this.pos<e;)t.push(this.readFixed64());return t}
vendor: 5,278 bytes, lines 580-582
580,readPackedSFixed64:function(t){if(this.type!==i.Bytes)return t.push(this.readSFixed64());var e=h(this);for(t=t||[];this.pos<e;)t.push(this.readSFixed64());return t},skip:function(t){var e=7&t;if(e===i.Varint)for(;this.buf[this.pos++]>127;);else if(e===i.Bytes)this.pos=this.readVarint()+this.pos;else if(e===i.Fixed32)this.pos+=4;else{if(e!==i.Fixed64)throw new Error("Unimplemented type: "+e);this.pos+=8}},writeTag:function(t,i){this.writeVarint(t<<3|i)},realloc:function(t){for(var i=this.length||16;i<this.pos+t;)i*=2;if(i!==this.length){var e=new Uint8Array(i);e.set(this.buf),this.buf=e,this.length=i}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(t){this.realloc(4),S(this.buf,t,this.pos),this.pos+=4},writeSFixed32:function(t){this.realloc(4),S(this.buf,t,this.pos),this.pos+=4},writeFixed64:function(t){this.realloc(8),S(this.buf,-1&t,this.pos),S(this.buf,Math.floor(t*r),this.pos+4),this.pos+=8},writeSFixed64:function(t){this.realloc(8),S(this.buf,-1&t,this.pos),S(this.buf,Math.floor(t*r),this.pos+4),this.pos+=8},writeVarint:function(t){(t=+t||0)>268435455||t<0?u(t,this):(this.realloc(4),this.buf[this.pos++]=127&t|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=t>>>7&127))))},writeSVarint:function(t){this.writeVarint(t<0?2*-t-1:2*t)},writeBoolean:function(t){this.writeVarint(Boolean(t))},writeString:function(t){t=String(t),this.realloc(4*t.length),this.pos++;var i=this.pos;this.pos=P(this.buf,t,this.pos);var e=this.pos-i;e>=128&&p(i,e,this),this.pos=i-1,this.writeVarint(e),this.pos+=e},writeFloat:function(i){this.realloc(4),t.write(this.buf,i,this.pos,!0,23,4),this.pos+=4},writeDouble:function(i){this.realloc(8),t.write(this.buf,i,this.pos,!0,52,8),this.pos+=8},writeBytes:function(t){var i=t.length;this.writeVarint(i),this.realloc(i);for(var e=0;e<i;e++)this.buf[this.pos++]=t[e]},writeRawMessage:function(t,i){this.pos++;var e=this.pos;t(i,this);var r=this.pos-e;r>=128&&p(e,r,this),this.pos=e-1,this.writeVarint(r),this.pos+=r},writeMessage:function(t,e,r){this.writeTag(t,i.Bytes),this.writeRawMessage(e,r)},writePackedVarint:function(t,i){i.length&&this.writeMessage(t,l,i)},writePackedSVarint:function(t,i){i.length&&this.writeMessage(t,c,i)},writePackedBoolean:function(t,i){i.length&&this.writeMessage(t,g,i)},writePackedFloat:function(t,i){i.length&&this.writeMessage(t,w,i)},writePackedDouble:function(t,i){i.length&&this.writeMessage(t,F,i)},writePackedFixed32:function(t,i){i.length&&this.writeMessage(t,b,i)},writePackedSFixed32:function(t,i){i.length&&this.writeMessage(t,x,i)},writePackedFixed64:function(t,i){i.length&&this.writeMessage(t,v,i)},writePackedSFixed64:function(t,i){i.length&&this.writeMessage(t,y,i)},writeBytesField:function(t,e){this.writeTag(t,i.Bytes),this.writeBytes(e)},writeFixed32Field:function(t,e){this.writeTag(t,i.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(t,e){this.writeTag(t,i.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(t,e){this.writeTag(t,i.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(t,e){this.writeTag(t,i.Fixed64),this.writeSFixed64(e)},writeVarintField:function(t,e){this.writeTag(t,i.Varint),this.writeVarint(e)},writeSVarintField:function(t,e){this.writeTag(t,i.Varint),this.writeSVarint(e)},writeStringField:function(t,e){this.writeTag(t,i.Bytes),this.writeString(e)},writeFloatField:function(t,e){this.writeTag(t,i.Fixed32),this.writeFloat(e)},writeDoubleField:function(t,e){this.writeTag(t,i.Fixed64),this.writeDouble(e)},writeBooleanField:function(t,i){this.writeVarintField(t,Boolean(i))}};
581},{"ieee754":"Quj6"}],"V3SP":[function(require,module,exports) {
582"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"Circle",{enumerable:!0,get:function(){return e.default}}),Object.defineProperty(exports,"Geometry",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(exports,"GeometryCollection",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(exports,"LineString",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(exports,"LinearRing",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(exports,"MultiLineString",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(exports,"MultiPoint",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(exports,"MultiPolygon",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(exports,"Point",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(exports,"Polygon",{enumerable:!0,get:function(){return g.default}}),Object.defineProperty(exports,"SimpleGeometry",{enumerable:!0,get:function(){return m.default}});var e=c(require("./geom/Circle.js")),r=c(require("./geom/Geometry.js")),t=c(require("./geom/GeometryCollection.js")),n=c(require("./geom/LinearRing.js")),o=c(require("./geom/LineString.js")),u=c(require("./geom/MultiLineString.js")),i=c(require("./geom/MultiPoint.js")),l=c(require("./geom/MultiPolygon.js")),f=c(require("./geom/Point.js")),g=c(require("./geom/Polygon.js")),m=c(require("./geom/SimpleGeometry.js"));
582function c(e){return e&&e.__esModule?e:{default:e}}
583},{"./geom/Circle.js":"AyCw","./geom/Geometry.js":"F8sI","./geom/GeometryCollection.js":"HvLT","./geom/LinearRing.js":"jRgU","./geom/LineString.js":"DfxW","./geom/MultiLineString.js":"fbCo","./geom/MultiPoint.js":"dNu5","./geom/MultiPolygon.js":"ouhF","./geom/Point.js":"gLcY","./geom/Polygon.js":"Nwwk","./geom/SimpleGeometry.js":"pnrv"}],"IFOM":[function(require,module,exports) {
584"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0,exports.toFeature=y,exports.toGeometry=_;var t=d(require("../Feature.js")),e=d(require("../geom/GeometryLayout.js")),r=require("../geom.js"),i=require("../transform.js"),o=require("../extent.js"),n=require("../array.js"),s=require("../geom/flat/interiorpoint.js"),a=require("../proj.js"),l=require("../geom/flat/orient.js"),u=require("../geom/flat/interpolate.js"),p=require("../geom/flat/center.js"),f=require("../geom/flat/transform.js");function d(t){return t&&t.__esModule?t:{default:t}}var h=(0,i.create)(),g=function(){function t(t,e,r,i,o){this.styleFunction,this.extent_,this.id_=o,this.type_=t,this.flatCoordinates_=e,this.flatInteriorPoints_=null,this.flatMidpoints_=null,this.ends_=r,this.properties_=i}return t.prototype.get=function(t){return this.properties_[t]},t.prototype.getExtent=function(){return this.extent_||(this.extent_="Point"===this.type_?(0,o.createOrUpdateFromCoordinate)(this.flatCoordinates_):(0,o.createOrUpdateFromFlatCoordinates)(this.flatCoordinates_,0,this.flatCoordinates_.length,2)),this.extent_},t.prototype.getFlatInteriorPoint=function(){if(!this.flatInteriorPoints_){var t=(0,o.getCenter)(this.getExtent());this.flatInteriorPoints_=(0,s.getInteriorPointOfArray)(this.flatCoordinates_,0,this.ends_,2,t,0)}return this.flatInteriorPoints_},t.prototype.getFlatInteriorPoints=function(){if(!this.flatInteriorPoints_){var t=(0,p.linearRingss)(this.flatCoordinates_,0,this.ends_,2);this.flatInteriorPoints_=(0,s.getInteriorPointsOfMultiArray)(this.flatCoordinates_,0,this.ends_,2,t)}return this.flatInteriorPoints_},t.prototype.getFlatMidpoint=function(){return this.flatMidpoints_||(this.flatMidpoints_=(0,u.interpolatePoint)(this.flatCoordinates_,0,this.flatCoordinates_.length,2,.5)),this.flatMidpoints_},t.prototype.getFlatMidpoints=function(){if(!this.flatMidpoints_){this.flatMidpoints_=[];for(var t=this.flatCoordinates_,e=0,r=this.ends_,i=0,o=r.length;i<o;++i){var s=r[i],a=(0,u.interpolatePoint)(t,e,s,2,.5);(0,n.extend)(this.flatMidpoints_,a),e=s}}return this.flatMidpoints_},t.prototype.getId=function(){return this.id_},t.prototype.getOrientedFlatCoordinates=function(){return this.flatCoordinates_},t.prototype.getGeometry=function(){return this},t.prototype.getSimplifiedGeometry=function(t){return this},t.prototype.simplifyTransformed=function(t,e){return this},t.prototype.getProperties=function(){return this.properties_},t.prototype.getStride=function(){return 2},t.prototype.getStyleFunction=function(){return this.styleFunction},t.prototype.getType=function(){return this.type_},t.prototype.transform=function(t){var e=(t=(0,a.get)(t)).getExtent(),r=t.getWorldExtent();if(e&&r){var n=(0,o.getHeight)(r)/(0,o.getHeight)(e);(0,i.compose)(h,r[0],r[3],n,-n,0,0,0),(0,f.transform2D)(this.flatCoordinates_,0,this.flatCoordinates_.length,2,h,this.flatCoordinates_)}},t.prototype.getEnds=function(){return this.ends_},t}();function _(t){var i=t.getType();switch(i){case"Point":return new r.Point(t.getFlatCoordinates());case"MultiPoint":return new r.MultiPoint(t.getFlatCoordinates(),e.default.XY);case"LineString":return new r.LineString(t.getFlatCoordinates(),e.default.XY);case"MultiLineString":return new r.MultiLineString(t.getFlatCoordinates(),e.default.XY,t.getEnds());case"Polygon":var o=t.getFlatCoordinates(),n=t.getEnds(),s=(0,l.inflateEnds)(o,n);return s.length>1?new r.MultiPolygon(o,e.default.XY,s):new r.Polygon(o,e.default.XY,n);default:throw new Error("Invalid geometry type:"+i)}}function y(e,r){var i=e.getId(),o=_(e),n=e.getProperties(),s=new t.default;return void 0!==r&&s.setGeometryName(r),s.setGeometry(o),void 0!==i&&s.setId(i),s.setProperties(n,!0),s}g.prototype.getEndss=g.prototype.getEnds,g.prototype.getFlatCoordinates=g.prototype.getOrientedFlatCoordinates;var c=exports.default=g;
585},{"../Feature.js":"mYW9","../geom/GeometryLayout.js":"Utvi","../geom.js":"V3SP","../transform.js":"P4eA","../extent.js":"QDir","../array.js":"luEr","../geom/flat/interiorpoint.js":"UDvN","../proj.js":"Diht","../geom/flat/orient.js":"cJkE","../geom/flat/interpolate.js":"rDTq","../geom/flat/center.js":"VjQP","../geom/flat/transform.js":"LGwr"}],"bjcz":[function(require,module,exports) {
586"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=_(require("./Feature.js")),r=v(require("../geom/GeometryLayout.js")),t=v(require("../geom/LineString.js")),a=v(require("../geom/MultiLineString.js")),n=v(require("../geom/MultiPoint.js")),o=v(require("../geom/MultiPolygon.js")),i=v(require("pbf")),u=v(require("../geom/Point.js")),s=v(require("../geom/Polygon.js")),l=v(require("../proj/Projection.js")),f=v(require("../render/Feature.js")),p=v(require("../proj/Units.js")),d=require("../asserts.js"),y=require("../proj.js"),c=require("../geom/flat/orient.js");
586function v(e){return e&&e.__esModule?e:{default:e}}function g(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap,t=new WeakMap;return(g=function(e){return e?t:r})(e)}function _(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=g(r);if(t&&t.has(e))return t.get(e);var a={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var i=n?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}return a.default=e,t&&t.set(e,a),a}var h=function(){var e=function(r,t){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t])})(r,t)};return function(r,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function a(){this.constructor=r}e(r,t),r.prototype=null===t?Object.create(t):(a.prototype=t.prototype,new a)}}(),m=function(v){function g(e){var r=v.call(this)||this,t=e||{};return r.dataProjection=new l.default({code:"",units:p.default.TILE_PIXELS}),r.featureClass_=t.featureClass?t.featureClass:f.default,r.geometryName_=t.geometryName,r.layerName_=t.layerName?t.layerName:"layer",r.layers_=t.layers?t.layers:null,r.idProperty_=t.idProperty,r.supportedMediaTypes=["application/vnd.mapbox-vector-tile","application/x-protobuf"],r}return h(g,v),g.prototype.readRawGeometry_=function(e,r,t,a){e.pos=r.geometry;for(var n=e.readVarint()+e.pos,o=1,i=0,u=0,s=0,l=0,f=0;e.pos<n;){if(!i){var p=e.readVarint();o=7&p,i=p>>3}i--,1===o||2===o?(u+=e.readSVarint(),s+=e.readSVarint(),1===o&&l>f&&(a.push(l),f=l),t.push(u,s),l+=2):7===o?l>f&&(t.push(t[f],t[f+1]),l+=2):(0,d.assert)(!1,59)}l>f&&(a.push(l),f=l)},g.prototype.createFeature_=function(i,l,p){var d,y=l.type;if(0===y)return null;var v,g=l.properties;this.idProperty_?(v=g[this.idProperty_],delete g[this.idProperty_]):v=l.id,g[this.layerName_]=l.layer.name;var _=[],h=[];this.readRawGeometry_(i,l,_,h);var m=O(y,h.length);if(this.featureClass_===f.default)(d=new this.featureClass_(m,_,h,g,v)).transform(p.dataProjection);else{var j=void 0;if("Polygon"==m){var P=(0,c.inflateEnds)(_,h);j=P.length>1?new o.default(_,r.default.XY,P):new s.default(_,r.default.XY,h)}else j="Point"===m?new u.default(_,r.default.XY):"LineString"===m?new t.default(_,r.default.XY):"MultiPoint"===m?new n.default(_,r.default.XY):"MultiLineString"===m?new a.default(_,r.default.XY,h):null;d=new(0,this.featureClass_),this.geometryName_&&d.setGeometryName(this.geometryName_);var w=(0,e.transformGeometryWithOptions)(j,!1,p);d.setGeometry(w),void 0!==v&&d.setId(v),d.setProperties(g,!0)}return d},g.prototype.getType=function(){return"arraybuffer"},g.prototype.readFeatures=function(e,r){var t=this.layers_,a=this.adaptOptions(r),n=(0,y.get)(a.dataProjection);n.setWorldExtent(a.extent),a.dataProjection=n;var o=new i.default(e),u=o.readFields(j,{}),s=[];for(var l in u)if(!t||-1!=t.indexOf(l)){var f=u[l],p=f?[0,0,f.extent,f.extent]:null;n.setExtent(p);for(var d=0,c=f.length;d<c;++d){var v=V(o,f,d),g=this.createFeature_(o,v,a);null!==g&&s.push(g)}}return s},g.prototype.readProjection=function(e){return this.dataProjection},g.prototype.setLayers=function(e){this.layers_=e},g}(e.default);function j(e,r,t){if(3===e){var a={keys:[],values:[],features:[]},n=t.readVarint()+t.pos;t.readFields(P,a,n),a.length=a.features.length,a.length&&(r[a.name]=a)}}function P(e,r,t){if(15===e)r.version=t.readVarint();else if(1===e)r.name=t.readString();else if(5===e)r.extent=t.readVarint();else if(2===e)r.features.push(t.pos);else if(3===e)r.keys.push(t.readString());else if(4===e){for(var a=null,n=t.readVarint()+t.pos;t.pos<n;)a=1===(e=t.readVarint()>>3)?t.readString():2===e?t.readFloat():3===e?t.readDouble():4===e?t.readVarint64():5===e?t.readVarint():6===e?t.readSVarint():7===e?t.readBoolean():null;r.values.push(a)}}function w(e,r,t){if(1==e)r.id=t.readVarint();else if(2==e)for(var a=t.readVarint()+t.pos;t.pos<a;){var n=r.layer.keys[t.readVarint()],o=r.layer.values[t.readVarint()];r.properties[n]=o}else 3==e?r.type=t.readVarint():4==e&&(r.geometry=t.pos)}function V(e,r,t){e.pos=r.features[t];var a=e.readVarint()+e.pos,n={layer:r,type:0,properties:{}};return e.readFields(w,n,a),n}function O(e,r){var t;return 1===e?t=1===r?"Point":"MultiPoint":2===e?t=1===r?"LineString":"MultiLineString":3===e&&(t="Polygon"),t}var q=exports.default=m;
587},{"./Feature.js":"Kylu","../geom/GeometryLayout.js":"Utvi","../geom/LineString.js":"DfxW","../geom/MultiLineString.js":"fbCo","../geom/MultiPoint.js":"dNu5","../geom/MultiPolygon.js":"ouh
587F","pbf":"UzHN","../geom/Point.js":"gLcY","../geom/Polygon.js":"Nwwk","../proj/Projection.js":"WUar","../render/Feature.js":"IFOM","../proj/Units.js":"yZx6","../asserts.js":"fLG6","../proj.js":"Diht","../geom/flat/orient.js":"cJkE"}],"Q2C4":[function(require,module,exports) {
588"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=exports.default={IMAGE:"image",HYBRID:"hybrid",VECTOR:"vector"};
589},{}],"UST7":[function(require,module,exports) {
590"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=p(require("../../render/canvas/BuilderGroup.js")),t=p(require("../../render/canvas/ExecutorGroup.js")),r=p(require("./TileLayer.js")),o=p(require("../../TileState.js")),i=p(require("../../layer/VectorTileRenderType.js")),n=p(require("../../ViewHint.js")),a=require("../../render/canvas/hitdetect.js"),l=require("../../transform.js"),d=require("../../extent.js"),s=require("../vector.js"),u=require("../../util.js"),g=require("../../size.js"),c=require("../../coordinate.js");function p(e){return e&&e.__esModule?e:{default:e}}var f=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),h={image:["Polygon","Circle","LineString","Image","Text"],hybrid:["Polygon","LineString"],vector:[]},T={hybrid:["Image","Text","Default"],vector:["Polygon","Circle","LineString","Image","Text","Default"]},v=function(r){function p(e){var t=r.call(this,e)||this;return t.boundHandleStyleImageChange_=t.handleStyleImageChange_.bind(t),t.renderedLayerRevision_,t.renderedPixelToCoordinateTransform_=null,t.renderedRotation_,t.tmpTransform_=(0,l.create)(),t}return f(p,r),p.prototype.prepareTile=function(e,t,r){var i,n=e.getState();return n!==o.default.LOADED&&n!==o.default.ERROR||(this.updateExecutorGroup_(e,t,r),this.tileImageNeedsRender_(e)&&(i=!0)),i},p.prototype.getTile=function(e,t,o,a){var l=a.pixelRatio,d=a.viewState,s=d.resolution,u=d.projection,g=this.getLayer(),c=g.getSource().getTile(e,t,o,l,u),p=a.viewHints,f=!(p[n.default.ANIMATING]||p[n.default.INTERACTING]);return!f&&c.wantedResolution||(c.wantedResolution=s),this.prepareTile(c,l,u)&&(f||Date.now()-a.time<8)&&g.getRenderMode()!==i.default.VECTOR&&this.renderTileImage_(c,a),r.prototype.getTile.call(this,e,t,o,a)},p.prototype.isDrawableTile=function(e){var t=this.getLayer();return r.prototype.isDrawableTile.call(this,e)&&(t.getRenderMode()===i.default.VECTOR?(0,u.getUid)(t)in e.executorGroups:e.hasContext(t))},p.prototype.getTileImage=function(e){return e.getImage(this.getLayer())},p.prototype.prepareFrame=function(e){var t=this.getLayer().getRevision();return this.renderedLayerRevision_!==t&&(this.renderedLayerRevision_=t,this.renderedTiles.length=0),r.prototype.prepareFrame.call(this,e)},p.prototype.updateExecutorGroup_=function(r,n,a){var l=this.getLayer(),g=l.getRevision(),c=l.getRenderOrder()||null,p=r.wantedResolution,f=r.getReplayState(l);if(f.dirty||f.renderedResolution!==p||f.renderedRevision!=g||f.renderedRenderOrder!=c){var h=l.getSource(),T=l.getDeclutter(),v=h.getTileGrid(),y=h.getTileGridForProjection(a).getTileCoordExtent(r.wrappedTileCoord),R=h.getSourceTiles(n,a,r),x=(0,u.getUid)(l);delete r.hitDetectionImageData[x],r.executorGroups[x]=[],T&&(r.declutterExecutorGroups[x]=[]),f.dirty=!1;for(var m=function(a,u){var g=R[a];if(g.getState()!=o.default.LOADED)return"continue";var m=g.tileCoord,S=v.getTileCoordExtent(m),E=(0,d.getIntersection)(y,S),_=(0,d.buffer)(E,l.getRenderBuffer()*p,C.tmpExtent),w=(0,d.equals)(S,E)?null:_,I=new e.default(0,_,p,n),O=T?new e.default(0,E,p,n):void 0,j=(0,s.getSquaredTolerance)(p,n),L=function(e){var t,r=e.getStyleFunction()||l.getStyleFunction();if(r&&(t=r(e,p)),t){var o=this.renderFeature(e,j,t,I,O);f.dirty=f.dirty||o}},G=g.getFeatures();c&&c!==f.renderedRenderOrder&&G.sort(c);for(var b=0,D=G.length;b<D;++b){var F=G[b];w&&!(0,d.intersects)(w,F.getGeometry().getExtent())||L.call(C,F)}var A=I.finish(),P=l.getRenderMode()!==i.default.VECTOR&&T&&1===R.length?null:E,q=new t.default(P,p,n,h.getOverlaps(),A,l.getRenderBuffer());if(r.executorGroups[x].push(q),O){var N=new t.default(null,p,n,h.getOverlaps(),O.finish(),l.getRenderBuffer());r.declutterExecutorGroups[x].push(N)}},C=this,S=0,E=R.length;S<E;++S)m(S);f.renderedRevision=g,f.renderedRenderOrder=c,f.renderedResolution=p}},p.prototype.forEachFeatureAtCoordinate=function(e,t,r,o,i){var n=t.viewState.resolution,a=t.viewState.rotation;r=null==r?0:r;var l=this.getLayer(),s=l.getSource().getTileGridForProjection(t.viewState.projection),g=(0,d.boundingExtent)([e]);(0,d.buffer)(g,n*r,g);for(var c,p={},f=function(e,t,r){var n=e.getId();void 0===n&&(n=(0,u.getUid)(e));var a=p[n];if(a){if(!0!==a&&r<a.distanceSq){if(0===r)return p[n]=!0,i.splice(i.lastIndexOf(a),1),o(e,l,t);a.geometry=t,a.distanceSq=r}}else{if(0===r)return p[n]=!0,o(e,l,t);i.push(p[n]={feature:e,layer:l,geometry:t,distanceSq:r,callback:o})}},h=this.renderedTiles,T=function(o,i){var p=h[o],T=s.getTileCoordExtent(p.wrappedTileCoord);if(!(0,d.intersects)(T,g))return"continue";var v=(0,u.getUid)(l),y=[p.executorGroups[v]],R=p.declutterExecutorGroups[v];R&&y.push(R),y.some(function(o){for(var i=o===R?t.declutterTree.all().map(function(e){return e.value}):null,l=0,d=o.length;l<d;++l){var s=o[l];if(c=s.forEachFeatureAtCoordinate(e,n,a,r,f,i))return!0}})},v=0,y=h.length;!c&&v<y;++v)T(v);return c},p.prototype.getFeatures=function(e){return new Promise(function(t,r){for(var i,n=this.getLayer(),s=(0,u.getUid)(n),p=n.getSource(),f=this.renderedProjection,h=f.getExtent(),T=this.renderedResolution,v=p.getTileGridForProjection(f),y=(0,l.apply)(this.renderedPixelToCoordinateTransform_,e.slice()),R=v.getTileCoordForCoordAndResolution(y,T),x=0,m=this.renderedTiles.length;x<m;++x)if(R.toString()===this.renderedTiles[x].tileCoord.toString()){if((i=this.renderedTiles[x]).getState()===o.default.LOADED){var C=v.getTileCoordExtent(i.tileCoord);p.getWrapX()&&f.canWrapX()&&!(0,d.containsExtent)(h,C)&&(0,c.wrapX)(y,f);break}i=void 0}if(!i||i.loadingSourceTiles>0)t([]);else{var S=v.getTileCoordExtent(i.wrappedTileCoord),E=(0,d.getTopLeft)(S),_=[(y[0]-E[0])/T,(E[1]-y[1])/T],w=i.getSourceTiles().reduce(function(e,t){return e.concat(t.getFeatures())},[]),I=i.hitDetectionImageData[s];if(!I&&!this.animatingOrInteracting_){var O=(0,g.toSize)(v.getTileSize(v.getZForResolution(T,p.zDirection))),j=this.renderedRotation_,L=[this.getRenderTransform(v.getTileCoordCenter(i.wrappedTileCoord),T,0,a.HIT_DETECT_RESOLUTION,O[0]*a.HIT_DETECT_RESOLUTION,O[1]*a.HIT_DETECT_RESOLUTION,0)];I=(0,a.createHitDetectionImageData)(O,L,w,n.getStyleFunction(),v.getTileCoordExtent(i.wrappedTileCoord),i.getReplayState(n).renderedResolution,j),i.hitDetectionImageData[s]=I}t((0,a.hitDetect)(_,w,I))}}.bind(this))},p.prototype.handleFontsChanged=function(){var e=this.getLayer();e.getVisible()&&void 0!==this.renderedLayerRevision_&&e.changed()},p.prototype.handleStyleImageChange_=function(e){this.renderIfReadyAndVisible()},p.prototype.renderDeclutter=function(e){var t=this.context,r=t.globalAlpha;t.globalAlpha=this.getLayer().getOpacity();for(var o=e.viewHints,i=!(o[n.default.ANIMATING]||o[n.default.INTERACTING]),a=this.renderedTiles,l=0,d=a.length;l<d;++l){var s=a[l],g=s.declutterExecutorGroups[(0,u.getUid)(this.getLayer())];if(g)for(var c=g.length-1;c>=0;--c)g[c].execute(this.context,1,this.getTileRenderTransform(s,e),e.viewState.rotation,i,void 0,e.declutterTree)}t.globalAlpha=r},p.prototype.getTileRenderTransform=function(e,t){var r=t.pixelRatio,o=t.viewState,i=o.center,n=o.resolution,a=o.rotation,d=t.size,s=Math.round(d[0]*r),u=Math.round(d[1]*r),g=this.getLayer().getSource().getTileGridForProjection(t.viewState.projection),c=e.tileCoord,p=g.getTileCoordExtent(e.wrappedTileCoord),f=g.getTileCoordExtent(c,this.tmpExtent)[0]-p[0];return(0,l.multiply)((0,l.scale)(this.inversePixelTransform.slice(),1/r,1/r),this.getRenderTransform(i,n,a,r,s,u,f))},p.prototype.renderFrame=function(e,t){var o=e.viewHints,i=!(o[n.default.ANIMATING]||o[n.default.INTERACTING]);r.prototype.renderFrame.call(this,e,t),this.renderedPixelToCoordinateTransform_=e.pixelToCoordinateTransform.slice(),this.renderedRotation_=e.viewState.rotation;var a=this.getLayer(),l=a.getRenderMode(),s=this.context,g=s.globalAlpha;s.globalAlpha=a.getOpacity();for(var c=T[l],p=e.viewState,f=p.rotation,h=a.getSource(),v=h.getTileGridForProjection(p.projection).getZForResolution(p.resolution,h.zDirection),y=this.renderedTiles,R=[],x=[],m=!0,C=y.length-1;C>=0;--C){var S=y[C];m=m&&!S.getReplayState(a).dirty;var E=S.executorGroups[(0,u.getUid)(a)].filter(function(e){return e.hasExecutors(c)});if(0!==E.length){var _=this.getTileRenderTransform(S,e),w=S.tileCoord[0],I=!1,O=E[0].getClipCoords(_);if(O){for(var j=0,L=R.length;j<L;++j)if(v!==w&&w<x[j]){var G=R[j];(0,d.intersects)([O[0],O[3],O[4],O[7]],[G[0],G[3],G[4],G[7]])&&(I||(s.save(),I=!0),s.beginPath(),s.moveTo(O[0],O[1]),s.lineTo(O[2],O[3]),s.lineTo(O[4],O[5]),s.lineTo(O[6],O[7]),s.moveTo(G[6],G[7]),s.lineTo(G[4],G[5]),s.lineTo(G[2],G[3]),s.lineTo(G[0],G[1]),s.clip())}R.push(O),x.push(w)}for(var b=0,D=E.length;b<D;++b){E[b].execute(s,1,_,f,i,c)}
590I&&s.restore()}}return s.globalAlpha=g,this.ready=m,this.container},p.prototype.renderFeature=function(e,t,r,o,i){if(!r)return!1;var n=!1;if(Array.isArray(r))for(var a=0,l=r.length;a<l;++a)n=(0,s.renderFeature)(o,e,r[a],t,this.boundHandleStyleImageChange_,void 0,i)||n;else n=(0,s.renderFeature)(o,e,r,t,this.boundHandleStyleImageChange_,void 0,i);return n},p.prototype.tileImageNeedsRender_=function(e){var t=this.getLayer();if(t.getRenderMode()===i.default.VECTOR)return!1;var r=e.getReplayState(t),o=t.getRevision(),n=e.wantedResolution;return r.renderedTileResolution!==n||r.renderedTileRevision!==o},p.prototype.renderTileImage_=function(e,t){var r=this.getLayer(),o=e.getReplayState(r),i=r.getRevision(),n=e.executorGroups[(0,u.getUid)(r)];o.renderedTileRevision=i;var a=e.wrappedTileCoord,d=a[0],s=r.getSource(),g=t.pixelRatio,c=t.viewState.projection,p=s.getTileGridForProjection(c),f=p.getResolution(e.tileCoord[0]),T=t.pixelRatio/e.wantedResolution*f,v=p.getResolution(d),y=e.getContext(r);g=Math.round(Math.max(g,T/g));var R=s.getTilePixelSize(d,g,c);y.canvas.width=R[0],y.canvas.height=R[1];var x=g/T;if(1!==x){var m=(0,l.reset)(this.tmpTransform_);(0,l.scale)(m,x,x),y.setTransform.apply(y,m)}var C=p.getTileCoordExtent(a,this.tmpExtent),S=T/v,E=(0,l.reset)(this.tmpTransform_);(0,l.scale)(E,S,-S),(0,l.translate)(E,-C[0],-C[3]);for(var _=0,w=n.length;_<w;++_){n[_].execute(y,x,E,0,!0,h[r.getRenderMode()])}o.renderedTileResolution=e.wantedResolution},p}(r.default),y=exports.default=v;
591},{"../../render/canvas/BuilderGroup.js":"vqHd","../../render/canvas/ExecutorGroup.js":"ngEc","./TileLayer.js":"hkMV","../../TileState.js":"
591Xz9x","../../layer/VectorTileRenderType.js":"Q2C4","../../ViewHint.js":"cuLW","../../render/canvas/hitdetect.js":"MrCe","../../transform.js":"P4eA","../../extent.js":"QDir","../vector.js":"UCah","../../util.js":"KniQ","../../size.js":"TAHd","../../coordinate.js":"nGsj"}],"zOJv":[function(require,module,exports) {
592"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=i(require("./BaseVector.js")),r=i(require("../renderer/canvas/VectorTileLayer.js")),t=i(require("./TileProperty.js")),o=i(require("./VectorTileRenderType.js")),n=require("../asserts.js"),s=require("../obj.js");function i(e){return e&&e.__esModule?e:{default:e}}var u=function(){var e=function(r,t){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t])})(r,t)};return function(r,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function o(){this.constructor=r}e(r,t),r.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}}(),a=function(e){function i(r){var t=this,i=r||{},u=(0,s.assign)({},i);delete u.preload,delete u.useInterimTilesOnError,(t=e.call(this,u)||this).on,t.once,t.un,i.renderMode===o.default.IMAGE&&(console.warn('renderMode: "image" is deprecated. Option ignored.'),i.renderMode=void 0);var a=i.renderMode||o.default.HYBRID;return(0,n.assert)(a==o.default.HYBRID||a==o.default.VECTOR,28),t.renderMode_=a,t.setPreload(i.preload?i.preload:0),t.setUseInterimTilesOnError(void 0===i.useInterimTilesOnError||i.useInterimTilesOnError),t.getBackground,t.setBackground,t}return u(i,e),i.prototype.createRenderer=function(){return new r.default(this)},i.prototype.getFeatures=function(r){return e.prototype.getFeatures.call(this,r)},i.prototype.getRenderMode=function(){return this.renderMode_},i.prototype.getPreload=function(){return this.get(t.default.PRELOAD)},i.prototype.getUseInterimTilesOnError=function(){return this.get(t.default.USE_INTERIM_TILES_ON_ERROR)},i.prototype.setPreload=function(e){this.set(t.default.PRELOAD,e)},i.prototype.setUseInterimTilesOnError=function(e){this.set(t.default.USE_INTERIM_TILES_ON_ERROR,e)},i}(e.default),d=exports.default=a;
593},{"./BaseVector.js":"pskK","../renderer/canvas/VectorTileLayer.js":"UST7","./TileProperty.js":"M5pz","./VectorTileRenderType.js":"Q2C4","../asserts.js":"fLG6","../obj.js":"mH6q"}],"yj80":[function(require,module,exports) {
594"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=o(require("./Tile.js")),e=o(require("./TileState.js"));function o(t){return t&&t.__esModule?t:{default:t}}var r=function(){var t=function(e,o){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function r(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),n=function(t){function o(e,o,r,n,u,i){var s=t.call(this,e,o,i)||this;return s.extent=null,s.format_=n,s.features_=null,s.loader_,s.projection=null,s.resolution,s.tileLoadFunction_=u,s.url_=r,s.key=r,s}return r(o,t),o.prototype.getFormat=function(){return this.format_},o.prototype.getFeatures=function(){return this.features_},o.prototype.load=function(){this.state==e.default.IDLE&&(this.setState(e.default.LOADING),this.tileLoadFunction_(this,this.url_),this.loader_&&this.loader_(this.extent,this.resolution,this.projection))},o.prototype.onLoad=function(t,e){this.setFeatures(t)},o.prototype.onError=function(){this.setState(e.default.ERROR)},o.prototype.setFeatures=function(t){this.features_=t,this.setState(e.default.LOADED)},o.prototype.setLoader=function(t){this.loader_=t},o}(t.default),u=exports.default=n;
595}
595,{"./Tile.js":"IWZI","./TileState.js":"Xz9x"}],"C8Du":[function(require,module,exports) {
596"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=o(require("./Tile.js")),t=require("./dom.js"),r=require("./util.js");function o(e){return e&&e.__esModule?e:{default:e}}var n=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),i=[],s=function(e){function o(t,r,o,n){var i=e.call(this,t,r,{transition:0})||this;return i.context_={},i.executorGroups={},i.declutterExecutorGroups={},i.loadingSourceTiles=0,i.hitDetectionImageData={},i.replayState_={},i.sourceTiles=[],i.errorTileKeys={},i.wantedResolution,i.getSourceTiles=n.bind(void 0,i),i.wrappedTileCoord=o,i}return n(o,e),o.prototype.getContext=function(e){var o=(0,r.getUid)(e);return o in this.context_||(this.context_[o]=(0,t.createCanvasContext2D)(1,1,i)),this.context_[o]},o.prototype.hasContext=function(e){return(0,r.getUid)(e)in this.context_},o.prototype.getImage=function(e){return this.hasContext(e)?this.getContext(e).canvas:null},o.prototype.getReplayState=function(e){var t=(0,r.getUid)(e);return t in this.replayState_||(this.replayState_[t]={dirty:!1,renderedRenderOrder:null,renderedResolution:NaN,renderedRevision:-1,renderedTileResolution:NaN,renderedTileRevision:-1,renderedTileZ:-1}),this.replayState_[t]},o.prototype.load=function(){this.getSourceTiles()},o.prototype.release=function(){for(var r in this.context_){var o=this.context_[r];(0,t.releaseCanvas)(o),i.push(o.canvas),delete this.context_[r]}e.prototype.release.call(this)},o}(e.default),a=exports.default=s;
597},{"./Tile.js":"IWZI","./dom.js":"Xno5","./util.js":"KniQ"}],"A6uo":[function(require,module,exports) {
598"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0,exports.defaultLoadFunction=C;var e=p(require("../events/EventType.js")),t=p(require("../VectorTile.js")),i=p(require("../TileCache.js")),r=p(require("../tilegrid/TileGrid.js")),o=p(require("../TileState.js")),n=p(require("./UrlTile.js")),l=p(require("../VectorRenderTile.js")),a=require("../tilegrid/common.js"),u=require("../extent.js"),s=require("../tilegrid.js"),c=require("../tilecoord.js"),d=require("../obj.js"),f=require("../featureloader.js"),h=require("../size.js");function p(e){return e&&e.__esModule?e:{default:e}}var g=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),T=function(n){function f(e){var r=this,o=e.projection||"EPSG:3857",l=e.extent||(0,s.extentFromProjection)(o),a=e.tileGrid||(0,s.createXYZ)({extent:l,maxResolution:e.maxResolution,maxZoom:void 0!==e.maxZoom?e.maxZoom:22,minZoom:e.minZoom,tileSize:e.tileSize||512});return(r=n.call(this,{attributions:e.attributions,attributionsCollapsible:e.attributionsCollapsible,cacheSize:e.cacheSize,interpolate:!0,opaque:!1,projection:o,state:e.state,tileGrid:a,tileLoadFunction:e.tileLoadFunction?e.tileLoadFunction:C,tileUrlFunction:e.tileUrlFunction,url:e.url,urls:e.urls,wrapX:void 0===e.wrapX||e.wrapX,transition:e.transition,zDirection:void 0===e.zDirection?1:e.zDirection})||this).format_=e.format?e.format:null,r.sourceTileCache=new i.default(r.tileCache.highWaterMark),r.overlaps_=null==e.overlaps||e.overlaps,r.tileClass=e.tileClass?e.tileClass:t.default,r.tileGrids_={},r}return g(f,n),f.prototype.getFeaturesInExtent=function(e){var t=[],i=this.tileCache;if(0===i.getCount())return t;var r=(0,c.fromKey)(i.peekFirstKey())[0],n=this.tileGrid;
598return i.forEach(function(i){if(i.tileCoord[0]===r&&i.getState()===o.default.LOADED)for(var l=i.getSourceTiles(),a=0,s=l.length;a<s;++a){var c=l[a],d=c.tileCoord;if((0,u.intersects)(e,n.getTileCoordExtent(d))){var f=c.getFeatures();if(f)for(var h=0,p=f.length;h<p;++h){var g=f[h],T=g.getGeometry();(0,u.intersects)(e,T.getExtent())&&t.push(g)}}}}),t},f.prototype.getOverlaps=function(){return this.overlaps_},f.prototype.clear=function(){this.tileCache.clear(),this.sourceTileCache.clear()},f.prototype.expireCache=function(e,t){var i=this.getTileCacheForProjection(e),r=Object.keys(t).reduce(function(e,t){var r=(0,c.getCacheKeyForTileKey)(t),o=i.peek(r);if(o)for(var n=o.sourceTiles,l=0,a=n.length;l<a;++l)e[n[l].getKey()]=!0;return e},{});n.prototype.expireCache.call(this,e,t),this.sourceTileCache.expireCache(r)},f.prototype.getSourceTiles=function(t,i,r){var n=this;if(r.getState()===o.default.IDLE){r.setState(o.default.LOADING);var l=r.wrappedTileCoord,a=this.getTileGridForProjection(i),s=a.getTileCoordExtent(l),c=l[0],f=a.getResolution(c);(0,u.buffer)(s,-f,s);var h=this.tileGrid,p=h.getExtent();p&&(0,u.getIntersection)(s,p,s);var g=h.getZForResolution(f,this.zDirection);h.forEachTileCoord(s,g,function(l){var a=n.tileUrlFunction(l,t,i),u=n.sourceTileCache.containsKey(a)?n.sourceTileCache.get(a):new n.tileClass(l,a?o.default.IDLE:o.default.EMPTY,a,n.format_,n.tileLoadFunction);r.sourceTiles.push(u);var s=u.getState();if(s<o.default.LOADED){var c=function(t){n.handleTileChange(t);var i=u.getState();if(i===o.default.LOADED||i===o.default.ERROR){var l=u.getKey();l in r.errorTileKeys?u.getState()===o.default.LOADED&&delete r.errorTileKeys[l]:r.loadingSourceTiles--,i===o.default.ERROR?r.errorTileKeys[l]=!0:u.removeEventListener(e.default.CHANGE,c),0===r.loadingSourceTiles&&r.setState((0,d.isEmpty)(r.errorTileKeys)?o.default.LOADED:o.default.ERROR)}};u.addEventListener(e.default.CHANGE,c),r.loadingSourceTiles++}s===o.default.IDLE&&(u.extent=h.getTileCoordExtent(l),u.projection=i,u.resolution=h.getResolution(l[0]),n.sourceTileCache.set(a,u),u.load())}),r.loadingSourceTiles||r.setState(r.sourceTiles.some(function(e){return e.getState()===o.default.ERROR})?o.default.ERROR:o.default.LOADED)}return r.sourceTiles},f.prototype.getTile=function(e,t,i,r,n){var a,s=(0,c.getKeyZXY)(e,t,i),d=this.getKey();if(this.tileCache.containsKey(s)&&(a=this.tileCache.get(s)).key===d)return a;var f=[e,t,i],h=this.getTileCoordForTileUrlFunction(f,n),p=this.getTileGrid().getExtent(),g=this.getTileGridForProjection(n);if(h&&p){var T=g.getTileCoordExtent(h);(0,u.buffer)(T,-g.getResolution(e),T),(0,u.intersects)(p,T)||(h=null)}var v=!0;if(null!==h){var C=this.tileGrid,y=g.getResolution(e),E=C.getZForResolution(y,1),x=g.getTileCoordExtent(h);(0,u.buffer)(x,-y,x),C.forEachTileCoord(x,E,function(e){v=v&&!this.tileUrlFunction(e,r,n)}.bind(this))}var S=new l.default(f,v?o.default.EMPTY:o.default.IDLE,h,this.getSourceTiles.bind(this,r,n));return S.key=d,a?(S.interimTile=a,S.refreshInterimChain(),this.tileCache.replace(s,S)):this.tileCache.set(s,S),S},f.prototype.getTileGridForProjection=function(e){var t=e.getCode(),i=this.tileGrids_[t];if(!i){for(var o=this.tileGrid,n=o.getResolutions().slice(),l=n.map(function(e,t){return o.getOrigin(t)}),u=n.map(function(e,t){return o.getTileSize(t)}),s=a.DEFAULT_MAX_ZOOM+1,c=n.length;c<s;++c)n.push(n[c-1]/2),l.push(l[c-1]),u.push(u[c-1]);i=new r.default({extent:o.getExtent(),origins:l,resolutions:n,tileSizes:u}),this.tileGrids_[t]=i}return i},f.prototype.getTilePixelRatio=function(e){return e},f.prototype.getTilePixelSize=function(e,t,i){var r=this.getTileGridForProjection(i),o=(0,h.toSize)(r.getTileSize(e),this.tmpSize);return[Math.round(o[0]*t),Math.round(o[1]*t)]},f.prototype.updateCacheSize=function(e,t){n.prototype.updateCacheSize.call(this,2*e,t),this.sourceTileCache.highWaterMark=this.getTileCacheForProjection(t).highWaterMark},f}(n.default),v=exports.default=T;function C(e,t){e.setLoader(function(i,r,o){(0,f.loadFeaturesXhr)(t,e.getFormat(),i,r,o,e.onLoad.bind(e),e.onError.bind(e))})}
599},{"../events/EventType.js":"C8cu","../VectorTile.js":"yj80","../TileCache.js":"YFDe","../tilegrid/TileGrid.js":"dpZ6","../TileState.js":"
599Xz9x","./UrlTile.js":"uv9E","../VectorRenderTile.js":"C8Du","../tilegrid/common.js":"mOEX","../extent.js":"QDir","../tilegrid.js":"ExRx","../tilecoord.js":"faTr","../obj.js":"mH6q","../featureloader.js":"U3JP","../size.js":"TAHd"}],"SU9K":[function(require,module,exports) {
600var global = arguments[3];
601var e=arguments[3];Object.defineProperty(exports,"__esModule",{value:!0}),exports.ResponseError=exports.ClientError=void 0,exports.getJSON=u,exports.jsonp=n,exports.overrideXHR=c,exports.resolveUrl=a,exports.restoreXHR=p;var t=require("./util.js"),r=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();function n(e,r,n,o){var s=document.createElement("script"),i="olc_"+(0,t.getUid)(r);function u(){delete window[i],s.parentNode.removeChild(s)}s.async=!0,s.src=e+(-1==e.indexOf("?")?"?":"&")+(o||"callback")+"="+i;var a=setTimeout(function(){u(),n&&n()},1e4);window[i]=function(e){clearTimeout(a),u(),r(e)},document.head.appendChild(s)}var o,s=exports.ResponseError=function(e){function t(t){var r=this,n="Unexpected response status: "+t.status;return(r=e.call(this,n)||this).name="ResponseError",r.response=t,r}return r(t,e),t}(Error),i=exports.ClientError=function(e){function t(t){var r=e.call(this,"Failed to issue request")||this;return r.name="ClientError",r.client=t,r}return r(t,e),t}(Error);function u(e){return new Promise(function(t,r){var n=new XMLHttpRequest;n.addEventListener("load",function(e){var n=e.target;if(!n.status||n.status>=200&&n.status<300){var o=void 0;try{o=JSON.parse(n.responseText)}catch(u){var i="Error parsing response text as JSON: "+u.message;return void r(new Error(i))}t(o)}else r(new s(n))}),n.addEventListener("error",function(e){r(new i(e.target))}),n.open("GET",e),n.setRequestHeader("Accept","application/json"),n.send()})}function a(e,t){return t.indexOf("://")>=0?t:new URL(t,e).href}function c(t){"undefined"!=typeof XMLHttpRequest&&(o=XMLHttpRequest),e.XMLHttpRequest=t}function p(){e.XMLHttpRequest=o}
602},{"./util.js":"KniQ"}],"V9RY":[function(require,module,exports) {
603"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=a(require("./TileImage.js")),e=require("../extent.js"),r=require("../asserts.js"),o=require("../tileurlfunction.js"),i=require("../tilegrid.js"),n=require("../proj.js"),s=require("../net.js");function a(t){return t&&t.__esModule?t:{default:t}}var l=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function o(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),u=function(t){function a(e){var o=this,i=void 0===e.imageSmoothing||e.imageSmoothing;if(void 0!==e.interpolate&&(i=e.interpolate),(o=t.call(this,{attributions:e.attributions,cacheSize:e.cacheSize,crossOrigin:e.crossOrigin,interpolate:i,projection:(0,n.get)("EPSG:3857"),reprojectionErrorThreshold:e.reprojectionErrorThreshold,state:"loading",tileLoadFunction:e.tileLoadFunction,wrapX:void 0===e.wrapX||e.wrapX,transition:e.transition,zDirection:e.zDirection})||this).tileJSON_=null,o.tileSize_=e.tileSize,e.url)if(e.jsonp)(0,s.jsonp)(e.url,o.handleTileJSONResponse.bind(o),o.handleTileJSONError.bind(o));else{var a=new XMLHttpRequest;a.addEventListener("load",o.onXHRLoad_.bind(o)),a.addEventListener("error",o.onXHRError_.bind(o)),a.open("GET",e.url),a.send()}else e.tileJSON?o.handleTileJSONResponse(e.tileJSON):(0,r.assert)(!1,51);return o}return l(a,t),a.prototype.onXHRLoad_=function(t){var e=t.target;if(!e.status||e.status>=200&&e.status<300){var r=void 0;try{r=JSON.parse(e.responseText)}catch(o){return void this.handleTileJSONError()}this.handleTileJSONResponse(r)}else this.handleTileJSONError()},a.prototype.onXHRError_=function(t){this.handleTileJSONError()},a.prototype.getTileJSON=function(){return this.tileJSON_},a.prototype.handleTileJSONResponse=function(t){var r,s=(0,n.get)("EPSG:4326"),a=this.getProjection();if(void 0!==t.bounds){var l=(0,n.getTransformFromProjections)(s,a);r=(0,e.applyTransform)(t.bounds,l)}var u=(0,i.extentFromProjection)(a),c=t.minzoom||0,p=t.maxzoom||22,d=(0,i.createXYZ)({extent:u,maxZoom:p,minZoom:c,tileSize:this.tileSize_});if(this.tileGrid=d,this.tileUrlFunction=(0,o.createFromTemplates)(t.tiles,d),void 0!==t.attribution&&!this.getAttributions()){var h=void 0!==r?r:u;this.setAttributions(function(r){return(0,e.intersects)(h,r.extent)?[t.attribution]:null})}this.tileJSON_=t,this.setState("ready")},a.prototype.handleTileJSONError=function(){this.setState("error")},a}(t.default),c=exports.default=u;
604},{"./TileImage.js":"udAI","../extent.js":"QDir","../asserts.js":"fLG6","../tileurlfunction.js":"p1vZ","../tilegrid.js":"ExRx","../proj.js":"Diht","../net.js":"SU9K"}],"CreQ":[function(require,module,exports) {
605"use strict";Object.defineProperty(exports,"__esModule",{value:!0}
605),exports.default=exports.apply=wa,exports.applyBackground=pa,exports.applyStyle=oa,exports.getFeatureState=_a,exports.getLayer=za,exports.getLayers=Sa,exports.getSource=qa,exports.recordStyleLayer=na,exports.renderTransparent=Kn,exports.setFeatureState=Ma,exports.stylefunction=aa;var e=z(require("ol/style/Circle.js")),t=z(require("ol/style/Fill.js")),r=z(require("ol/style/Icon.js")),n=z(require("ol/render/Feature.js")),a=z(require("ol/style/Stroke.js")),i=z(require("ol/style/Style.js")),o=z(require("ol/style/Text.js")),s=require("ol/render/canvas.js"),u=z(require("ol/format/GeoJSON.js")),l=z(require("ol/format/MVT.js")),p=z(require("ol/Map.js")),f=z(require("ol/tilegrid/TileGrid.js")),c=z(require("ol/source/TileJSON.js")),d=z(require("ol/layer/Tile.js")),y=z(require("ol/layer/Vector.js")),m=z(require("ol/source/Vector.js")),h=z(require("ol/layer/VectorTile.js")),v=k(require("ol/source/VectorTile.js")),g=z(require("ol/View.js")),b=require("ol/tilegrid.js"),x=require("ol/proj.js");function w(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(w=function(e){return e?r:t})(e)}function k(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=w(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.hasOwnProperty.call(e,i)){var o=a?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}return n.default=e,r&&r.set(e,n),n}function z(e){return e&&e.__esModule?e:{default:e}}var S,q={},M={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function _(e){return(e=Math.round(e))<0?0:e>255?255:e}function T(e){return e<0?0:e>1?1:e}function C(e){return"%"===e[e.length-1]?_(parseFloat(e)/100*255):_(parseInt(e))}function E(e){return"%"===e[e.length-1]?T(parseFloat(e)/100):T(parseFloat(e))}function j(e,t,r){return r<0?r+=1:r>1&&(r-=1),6*r<1?e+(t-e)*r*6:2*r<1?t:3*r<2?e+(t-e)*(2/3-r)*6:e}function A(e){var t,r=e.replace(/ /g,"").toLowerCase();if(r in M)return M[r].slice();if("#"===r[0])return 4===r.length?(t=parseInt(r.substr(1),16))>=0&&t<=4095?[(3840&t)>>4|(3840&t)>>8,240&t|(240&t)>>4,15&t|(15&t)<<4,1]:null:7===r.length&&(t=parseInt(r.substr(1),16))>=0&&t<=16777215?[(16711680&t)>>16,(65280&t)>>8,255&t,1]:null;var n=r.indexOf("("),a=r.indexOf(")");if(-1!==n&&a+1===r.length){var i=r.substr(0,n),o=r.substr(n+1,a-(n+1)).split(","),s=1;switch(i){case"rgba":if(4!==o.length)return null;s=E(o.pop());case"rgb":return 3!==o.length?null:[C(o[0]),C(o[1]),C(o[2]),s];case"hsla":if(4!==o.length)return null;s=E(o.pop());case"hsl":if(3!==o.length)return null;var u=(parseFloat(o[0])%360+360)%360/360,l=E(o[1]),p=E(o[2]),f=p<=.5?p*(l+1):p+l-p*l,c=2*p-f;return[_(255*j(c,f,u+1/3)),_(255*j(c,f,u)),_(255*j(c,f,u-1/3)),s];default:return null}}return null}try{S=q.parseCSSColor=A}catch(Ta){}var I=function(e,t,r,n){void 0===n&&(n=1),this.r=e,this.g=t,this.b=r,this.a=n};function D(e){return"object"==typeof e?["literal",e]:e}function F(e,t){var r=e.stops;if(!r)return O(e,t);var n=r&&"object"==typeof r[0][0],a=n||void 0!==e.property,i=n||!a;return r=r.map(function(e){return!a&&t.tokens&&"string"==typeof e[1]?[e[0],J(e[1])]:[e[0],D(e[1])]}),n?L(e,t,r):i?G(e,t,r):U(e,t,r)}function O(e,t){var r=["get",e.property];if(void 0===e.default)return"string"===t.type?["string",r]:r;if("enum"===t.type)return["match",r,Object.keys(t.values),r,e.default];var n=["color"===t.type?"to-color":t.type,r,D(e.default)];return"array"===t.type&&n.splice(1,0,t.value,t.length||null),n}function P(e){switch(e.colorSpace){case"hcl":return"interpolate-hcl";case"lab":return"interpolate-lab";default:return"interpolate"}}function L(e,t,r){for(var n={},a={},i=[],o=0;o<r.length;o++){var s=r[o],u=s[0].zoom;void 0===n[u]&&(n[u]={zoom:u,type:e.type,property:e.property,default:e.default},a[u]=[],i.push(u)),a[u].push([s[0].value,s[1]])}if("exponential"===Z({},t)){for(var l=[P(e),["linear"],["zoom"]],p=0,f=i;p<f.length;p+=1){var c=f[p];W(l,c,U(n[c],t,a[c]),!1)}return l}for(var d=["step",["zoom"]],y=0,m=i;y<m.length;y+=1){var h=m[y];W(d,h,U(n[h],t,a[h]),!0)}return V(d),d}function N(e,t){return void 0!==e?e:void 0!==t?t:void 0}function R(e,t){var r=D(N(e.default,t.default));return void 0===r&&"resolvedImage"===t.type?"":r}function U(e,t,r){var n=Z(e,t),a=["get",e.property];if("categorical"===n&&"boolean"==typeof r[0][0]){for(var i=["case"],o=0,s=r;o<s.length;o+=1){var u=s[o];i.push(["==",a,u[0]],u[1])}return i.push(R(e,t)),i}if("categorical"===n){for(var l=["match",a],p=0,f=r;p<f.length;p+=1){var c=f[p];W(l,c[0],c[1],!1)}return l.push(R(e,t)),l}if("interval"===n){for(var d=["step",["number",a]],y=0,m=r;y<m.length;y+=1){var h=m[y];W(d,h[0],h[1],!0)}return V(d),void 0===e.default?d:["case",["==",["typeof",a],"number"],d,D(e.default)]}
605if("exponential"===n){for(var v=void 0!==e.base?e.base:1,g=[P(e),1===v?["linear"]:["exponential",v],["number",a]],b=0,x=r;b<x.length;b+=1){var w=x[b];W(g,w[0],w[1],!1)}return void 0===e.default?g:["case",["==",["typeof",a],"number"],g,D(e.default)]}throw new Error("Unknown property function type "+n)}function G(e,t,r,n){void 0===n&&(n=["zoom"]);var a,i=Z(e,t),o=!1;if("interval"===i)a=["step",n],o=!0;else{if("exponential"!==i)throw new Error('Unknown zoom function type "'+i+'"');var s=void 0!==e.base?e.base:1;a=[P(e),1===s?["linear"]:["exponential",s],n]}for(var u=0,l=r;u<l.length;u+=1){var p=l[u];W(a,p[0],p[1],o)}return V(a),a}function V(e){"step"===e[0]&&3===e.length&&(e.push(0),e.push(e[3]))}function W(e,t,r,n){e.length>3&&t===e[e.length-2]||(n&&2===e.length||e.push(t),e.push(r))}function Z(e,t){return e.type?e.type:t.expression.interpolated?"exponential":"interval"}function J(e){for(var t=["concat"],r=/{([^{}]+)}/g,n=0,a=r.exec(e);null!==a;a=r.exec(e)){var i=e.slice(n,r.lastIndex-a[0].length);n=r.lastIndex,i.length>0&&t.push(i),t.push(["get",a[1]])}if(1===t.length)return e;if(n<e.length)t.push(e.slice(n));else if(2===t.length)return["to-string",t[1]];return t}I.parse=function(e){if(e){if(e instanceof I)return e;if("string"==typeof e){var t=S(e);if(t)return new I(t[0]/255*t[3],t[1]/255*t[3],t[2]/255*t[3],t[3])}}},I.prototype.toString=function(){var e=this.toArray(),t=e[0],r=e[1],n=e[2],a=e[3];return"rgba("+Math.round(t)+","+Math.round(r)+","+Math.round(n)+","+a+")"},I.prototype.toArray=function(){var e=this.r,t=this.g,r=this.b,n=this.a;return 0===n?[0,0,0,0]:[255*e/n,255*t/n,255*r/n,n]},I.prototype.toArray01=function(){var e=this.r,t=this.g,r=this.b,n=this.a;return 0===n?[0,0,0,0]:[e/n,t/n,r/n,n]},I.prototype.toArray01PremultipliedAlpha=function(){return[this.r,this.g,this.b,this.a]},I.black=new I(0,0,0,1),I.white=new I(1,1,1,1),I.transparent=new I(0,0,0,0),I.red=new I(1,0,0,1),I.blue=new I(0,0,1,1);var $=function(e){function t(t,r){e.call(this,r),this.message=r,this.key=t}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(Error),B=function(e,t){void 0===t&&(t=[]),this.parent=e,this.bindings={};for(var r=0,n=t;r<n.length;r+=1){var a=n[r],i=a[0],o=a[1];this.bindings[i]=o}};B.prototype.concat=function(e){return new B(this,e)},B.prototype.get=function(e){if(this.bindings[e])return this.bindings[e];if(this.parent)return this.parent.get(e);throw new Error(e+" not found in scope.")},B.prototype.has=function(e){return!!this.bindings[e]||!!this.parent&&this.parent.has(e)};var X={kind:"null"},H={kind:"number"},Y={kind:"string"},K={kind:"boolean"},Q={kind:"color"},ee={kind:"object"},te={kind:"value"},re={kind:"error"},ne={kind:"collator"},ae={kind:"formatted"},ie={kind:"resolvedImage"};function oe(e,t){return{kind:"array",itemType:e,N:t}}function se(e){if("array"===e.kind){var t=se(e.itemType);return"number"==typeof e.N?"array<"+t+", "+e.N+">":"value"===e.itemType.kind?"array":"array<"+t+">"}return e.kind}var ue=[X,H,Y,K,Q,ae,ee,oe(te),ie];function le(e,t){if("error"===t.kind)return null;if("array"===e.kind){if("array"===t.kind&&(0===t.N&&"value"===t.itemType.kind||!le(e.itemType,t.itemType))&&("number"!=typeof e.N||e.N===t.N))return null}else{if(e.kind===t.kind)return null;if("value"===e.kind)for(var r=0,n=ue;r<n.length;r+=1){if(!le(n[r],t))return null}}return"Expected "+se(e)+" but found "+se(t)+" instead."}function pe(e,t){return t.some(function(t){return t.kind===e.kind})}function fe(e,t){return t.some(function(t){return"null"===t?null===e:"array"===t?Array.isArray(e):"object"===t?e&&!Array.isArray(e)&&"object"==typeof e:t===typeof e})}var ce=function(e,t,r){this.sensitivity=e?t?"variant":"case":t?"accent":"base",this.locale=r,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};ce.prototype.compare=function(e,t){return this.collator.compare(e,t)},ce.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var de=function(e,t,r,n,a){this.text=e.normalize?e.normalize():e,this.image=t,this.scale=r,this.fontStack=n,this.textColor=a},ye=function(e){this.sections=e};ye.fromString=function(e){return new ye([new de(e,null,null,null,null)])},ye.prototype.isEmpty=function(){return 0===this.sections.length||!this.sections.some(function(e){return 0!==e.text.length||e.image&&0!==e.image.name.length})},ye.factory=function(e){return e instanceof ye?e:ye.fromString(e)},ye.prototype.toString=function(){return 0===this.sections.length?"":this.sections.map(function(e){return e.text}).join("")},ye.prototype.serialize=function(){for(var e=["format"],t=0,r=this.sections;t<r.length;t+=1){var n=r[t];if(n.image)e.push(["image",n.image.name]);else{e.push(n.text);var a={};n.fontStack&&(a["text-font"]=["literal",n.fontStack.split(",")]),n.scale&&(a["font-scale"]=n.scale),n.textColor&&(a["text-color"]=["rgba"].concat(n.textColor.toArray())),e.push(a)}}return e};var me=function(e){this.name=e.name,this.available=e.available};function he(e,t,r,n){return"number"==typeof e&&e>=0&&e<=255&&"number"==typeof t&&t>=0&&t<=255&&"number"==typeof r&&r>=0&&r<=255?void 0===n||"number"==typeof n&&n>=0&&n<=1?null:"Invalid rgba value ["+[e,t,r,n].join(", ")+"]: 'a' must be between 0 and 1.":"Invalid rgba value ["+("number"==typeof n?[e,t,r,n]:[e,t,r]).join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}function ve(e){if(null===e)return!0;
vendor: 20,944 bytes, line 605
605if("string"==typeof e)return!0;if("boolean"==typeof e)return!0;if("number"==typeof e)return!0;if(e instanceof I)return!0;if(e instanceof ce)return!0;if(e instanceof ye)return!0;if(e instanceof me)return!0;if(Array.isArray(e)){for(var t=0,r=e;t<r.length;t+=1){if(!ve(r[t]))return!1}return!0}if("object"==typeof e){for(var n in e)if(!ve(e[n]))return!1;return!0}return!1}function ge(e){if(null===e)return X;if("string"==typeof e)return Y;if("boolean"==typeof e)return K;if("number"==typeof e)return H;if(e instanceof I)return Q;if(e instanceof ce)return ne;if(e instanceof ye)return ae;if(e instanceof me)return ie;if(Array.isArray(e)){for(var t,r=e.length,n=0,a=e;n<a.length;n+=1){var i=ge(a[n]);if(t){if(t===i)continue;t=te;break}t=i}return oe(t||te,r)}return ee}function be(e){var t=typeof e;return null===e?"":"string"===t||"number"===t||"boolean"===t?String(e):e instanceof I||e instanceof ye||e instanceof me?e.toString():JSON.stringify(e)}me.prototype.toString=function(){return this.name},me.fromString=function(e){return e?new me({name:e,available:!1}):null},me.prototype.serialize=function(){return["image",this.name]};var xe=function(e,t){this.type=e,this.value=t};xe.parse=function(e,t){if(2!==e.length)return t.error("'literal' expression requires exactly one argument, but found "+(e.length-1)+" instead.");if(!ve(e[1]))return t.error("invalid value");var r=e[1],n=ge(r),a=t.expectedType;return"array"!==n.kind||0!==n.N||!a||"array"!==a.kind||"number"==typeof a.N&&0!==a.N||(n=a),new xe(n,r)},xe.prototype.evaluate=function(){return this.value},xe.prototype.eachChild=function(){},xe.prototype.outputDefined=function(){return!0},xe.prototype.serialize=function(){return"array"===this.type.kind||"object"===this.type.kind?["literal",this.value]:this.value instanceof I?["rgba"].concat(this.value.toArray()):this.value instanceof ye?this.value.serialize():this.value};var we=function(e){this.name="ExpressionEvaluationError",this.message=e};we.prototype.toJSON=function(){return this.message};var ke={string:Y,number:H,boolean:K,object:ee},ze=function(e,t){this.type=e,this.args=t};ze.parse=function(e,t){if(e.length<2)return t.error("Expected at least one argument.");var r,n=1,a=e[0];if("array"===a){var i,o;if(e.length>2){var s=e[1];if("string"!=typeof s||!(s in ke)||"object"===s)return t.error('The item type argument of "array" must be one of string, number, boolean',1);i=ke[s],n++}else i=te;if(e.length>3){if(null!==e[2]&&("number"!=typeof e[2]||e[2]<0||e[2]!==Math.floor(e[2])))return t.error('The length argument to "array" must be a positive integer literal',2);o=e[2],n++}r=oe(i,o)}else r=ke[a];for(var u=[];n<e.length;n++){var l=t.parse(e[n],n,te);if(!l)return null;u.push(l)}return new ze(r,u)},ze.prototype.evaluate=function(e){for(var t=0;t<this.args.length;t++){var r=this.args[t].evaluate(e);if(!le(this.type,ge(r)))return r;if(t===this.args.length-1)throw new we("Expected value to be of type "+se(this.type)+", but found "+se(ge(r))+" instead.")}return null},ze.prototype.eachChild=function(e){this.args.forEach(e)},ze.prototype.outputDefined=function(){return this.args.every(function(e){return e.outputDefined()})},ze.prototype.serialize=function(){var e=this.type,t=[e.kind];if("array"===e.kind){var r=e.itemType;if("string"===r.kind||"number"===r.kind||"boolean"===r.kind){t.push(r.kind);var n=e.N;("number"==typeof n||this.args.length>1)&&t.push(n)}}return t.concat(this.args.map(function(e){return e.serialize()}))};var Se=function(e){this.type=ae,this.sections=e};Se.parse=function(e,t){if(e.length<2)return t.error("Expected at least one argument.");var r=e[1];if(!Array.isArray(r)&&"object"==typeof r)return t.error("First argument must be an image or text section.");for(var n=[],a=!1,i=1;i<=e.length-1;++i){var o=e[i];if(a&&"object"==typeof o&&!Array.isArray(o)){a=!1;var s=null;if(o["font-scale"]&&!(s=t.parse(o["font-scale"],1,H)))return null;var u=null;if(o["text-font"]&&!(u=t.parse(o["text-font"],1,oe(Y))))return null;var l=null;if(o["text-color"]&&!(l=t.parse(o["text-color"],1,Q)))return null;var p=n[n.length-1];p.scale=s,p.font=u,p.textColor=l}else{var f=t.parse(e[i],1,te);if(!f)return null;var c=f.type.kind;if("string"!==c&&"value"!==c&&"null"!==c&&"resolvedImage"!==c)return t.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");a=!0,n.push({content:f,scale:null,font:null,textColor:null})}}return new Se(n)},Se.prototype.evaluate=function(e){return new ye(this.sections.map(function(t){var r=t.content.evaluate(e);return ge(r)===ie?new de("",r,null,null,null):new de(be(r),null,t.scale?t.scale.evaluate(e):null,t.font?t.font.evaluate(e).join(","):null,t.textColor?t.textColor.evaluate(e):null)}))},Se.prototype.eachChild=function(e){for(var t=0,r=this.sections;t<r.length;t+=1){var n=r[t];e(n.content),n.scale&&e(n.scale),n.font&&e(n.font),n.textColor&&e(n.textColor)}},Se.prototype.outputDefined=function(){return!1},Se.prototype.serialize=function(){for(var e=["format"],t=0,r=this.sections;t<r.length;t+=1){var n=r[t];e.push(n.content.serialize());var a={};n.scale&&(a["font-scale"]=n.scale.serialize()),n.font&&(a["text-font"]=n.font.serialize()),n.textColor&&(a["text-color"]=n.textColor.serialize()),e.push(a)}return e};var qe=function(e){this.type=ie,this.input=e};qe.parse=function(e,t){if(2!==e.length)return t.error("Expected two arguments.");var r=t.parse(e[1],1,Y);return r?new qe(r):t.error("No image name provided.")},qe.prototype.evaluate=function(e){var t=this.input.evaluate(e),r=me.fromString(t);return r&&e.availableImages&&(r.available=e.availableImages.indexOf(t)>-1),r},qe.prototype.eachChild=function(e){e(this.input)},qe.prototype.outputDefined=function(){return!1},qe.prototype.serialize=function(){return["image",this.input.serialize()]};var Me={"to-boolean":K,"to-color":Q,"to-number":H,"to-string":Y},_e=function(e,t){this.type=e,this.args=t};_e.parse=function(e,t){if(e.length<2)return t.error("Expected at least one argument.");var r=e[0];if(("to-boolean"===r||"to-string"===r)&&2!==e.length)return t.error("Expected one argument.");for(var n=Me[r],a=[],i=1;i<e.length;i++){var o=t.parse(e[i],i,te);if(!o)return null;a.push(o)}return new _e(n,a)},_e.prototype.evaluate=function(e){if("boolean"===this.type.kind)return Boolean(this.args[0].evaluate(e));if("color"===this.type.kind){for(var t,r,n=0,a=this.args;n<a.length;n+=1){if(r=null,(t=a[n].evaluate(e))instanceof I)return t;if("string"==typeof t){var i=e.parseColor(t);if(i)return i}else if(Array.isArray(t)&&!(r=t.length<3||t.length>4?"Invalid rbga value "+JSON.stringify(t)+": expected an array containing either three or four numeric values.":he(t[0],t[1],t[2],t[3])))return new I(t[0]/255,t[1]/255,t[2]/255,t[3])}throw new we(r||"Could not parse color from value '"+("string"==typeof t?t:String(JSON.stringify(t)))+"'")}if("number"===this.type.kind){for(var o=null,s=0,u=this.args;s<u.length;s+=1){if(null===(o=u[s].evaluate(e)))return 0;var l=Number(o);if(!isNaN(l))return l}throw new we("Could not convert "+JSON.stringify(o)+" to number.")}return"formatted"===this.type.kind?ye.fromString(be(this.args[0].evaluate(e))):"resolvedImage"===this.type.kind?me.fromString(be(this.args[0].evaluate(e))):be(this.args[0].evaluate(e))},_e.prototype.eachChild=function(e){this.args.forEach(e)},_e.prototype.outputDefined=function(){return this.args.every(function(e){return e.outputDefined()})},_e.prototype.serialize=function(){if("formatted"===this.type.kind)return new Se([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if("resolvedImage"===this.type.kind)return new qe(this.args[0]).serialize();var e=["to-"+this.type.kind];return this.eachChild(function(t){e.push(t.serialize())}),e};var Te=["Unknown","Point","LineString","Polygon"],Ce=function(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null,this.featureTileCoord=null,this.featureDistanceData=null};Ce.prototype.id=function(){return this.feature&&"id"in this.feature&&this.feature.id?this.feature.id:null},Ce.prototype.geometryType=function(){return this.feature?"number"==typeof this.feature.type?Te[this.feature.type]:this.feature.type:null},Ce.prototype.geometry=function(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null},Ce.prototype.canonicalID=function(){return this.canonical},Ce.prototype.properties=function(){return this.feature&&this.feature.properties||{}},Ce.prototype.distanceFromCenter=function(){if(this.featureTileCoord&&this.featureDistanceData){var e=this.featureDistanceData.center,t=this.featureDistanceData.scale,r=this.featureTileCoord,n=r.x,a=r.y,i=n*t-e[0],o=a*t-e[1];return this.featureDistanceData.bearing[0]*i+this.featureDistanceData.bearing[1]*o}return 0},Ce.prototype.parseColor=function(e){var t=this._parseColorCache[e];return t||(t=this._parseColorCache[e]=I.parse(e)),t};var Ee=function(e,t,r,n){this.name=e,this.type=t,this._evaluate=r,this.args=n};function je(e){return Array.isArray(e)?"("+e.map(se).join(", ")+")":"("+se(e.type)+"...)"}Ee.prototype.evaluate=function(e){return this._evaluate(e,this.args)},Ee.prototype.eachChild=function(e){this.args.forEach(e)},Ee.prototype.outputDefined=function(){return!1},Ee.prototype.serialize=function(){return[this.name].concat(this.args.map(function(e){return e.serialize()}))},Ee.parse=function(e,t){var r,n=e[0],a=Ee.definitions[n];if(!a)return t.error('Unknown expression "'+n+'". If you wanted a literal array, use ["literal", [...]].',0);for(var i=Array.isArray(a)?a[0]:a.type,o=Array.isArray(a)?[[a[1],a[2]]]:a.overloads,s=o.filter(function(t){var r=t[0];return!Array.isArray(r)||r.length===e.length-1}),u=null,l=0,p=s;l<p.length;l+=1){var f=p[l],c=f[0],d=f[1];u=new ut(t.registry,t.path,null,t.scope);for(var y=[],m=!1,h=1;h<e.length;h++){var v=e[h],g=Array.isArray(c)?c[h-1]:c.type,b=u.parse(v,1+y.length,g);if(!b){m=!0;break}y.push(b)}if(!m)if(Array.isArray(c)&&c.length!==y.length)u.error("Expected "+c.length+" arguments, but found "+y.length+" instead.");else{for(var x=0;x<y.length;x++){var w=Array.isArray(c)?c[x]:c.type,k=y[x];u.concat(x+1).checkSubtype(w,k.type)}if(0===u.errors.length)return new Ee(n,i,d,y)}}if(1===s.length)(r=t.errors).push.apply(r,u.errors);else{for(var z=(s.length?s:o).map(function(e){return je(e[0])}).join(" | "),S=[],q=1;q<e.length;q++){var M=t.parse(e[q],1+S.length);if(!M)return null;S.push(se(M.type))}t.error("Expected arguments of type "+z+", but found ("+S.join(", ")+") instead.")}return null},Ee.register=function(e,t){for(var r in Ee.definitions=t,t)e[r]=Ee};var Ae=function(e,t,r){this.type=ne,this.locale=r,this.caseSensitive=e,this.diacriticSensitive=t};Ae.parse=function(e,t){if(2!==e.length)return t.error("Expected one argument.");var r=e[1];if("object"!=typeof r||Array.isArray(r))return t.error("Collator options argument must be an object.");var n=t.parse(void 0!==r["case-sensitive"]&&r["case-sensitive"],1,K);if(!n)return null;var a=t.parse(void 0!==r["diacritic-sensitive"]&&r["diacritic-sensitive"],1,K);if(!a)return null;var i=null;return r.locale&&!(i=t.parse(r.locale,1,Y))?null:new Ae(n,a,i)},Ae.prototype.evaluate=function(e){return new ce(this.caseSensitive.evaluate(e),this.diacriticSensitive.evaluate(e),this.locale?this.locale.evaluate(e):null)},Ae.prototype.eachChild=function(e){e(this.caseSensitive),e(this.diacriticSensitive),this.locale&&e(this.locale)},Ae.prototype.outputDefined=function(){return!1},Ae.prototype.serialize=function(){var e={};return e["case-sensitive"]=this.caseSensitive.serialize(),e["diacritic-sensitive"]=this.diacriticSensitive.serialize(),this.locale&&(e.locale=this.locale.serialize()),["collator",e]};var Ie=8192;function De(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.max(e[2],t[0]),e[3]=Math.max(e[3],t[1])}function Fe(e){return(180+e)/360}function Oe(e){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+e*Math.PI/360)))/360}function Pe(e,t){return!(e[0]<=t[0])&&(!(e[2]>=t[2])&&(!(e[1]<=t[1])&&!(e[3]>=t[3])))}function Le(e,t){var r=Fe(e[0]),n=Oe(e[1]),a=Math.pow(2,t.z);return[Math.round(r*a*Ie),Math.round(n*a*Ie)]}function Ne(e,t,r){var n=e[0]-t[0],a=e[1]-t[1],i=e[0]-r[0],o=e[1]-r[1];return n*o-i*a==0&&n*i<=0&&a*o<=0}function Re(e,t,r){return t[1]>e[1]!=r[1]>e[1]&&e[0]<(r[0]-t[0])*(e[1]-t[1])/(r[1]-t[1])+t[0]}function Ue(e,t){for(var r=!1,n=0,a=t.length;n<a;n++)for(var i=t[n],o=0,s=i.length;o<s-1;o++){if(Ne(e,i[o],i[o+1]))return!1;Re(e,i[o],i[o+1])&&(r=!r)}return r}function Ge(e,t){for(var r=0;r<t.length;r++)if(Ue(e,t[r]))return!0;return!1}function Ve(e,t){return e[0]*t[1]-e[1]*t[0]}function We(e,t,r,n){var a=e[0]-r[0],i=e[1]-r[1],o=t[0]-r[0],s=t[1]-r[1],u=n[0]-r[0],l=n[1]-r[1],p=a*l-u*i,f=o*l-u*s;return p>0&&f<0||p<0&&f>0}function Ze(e,t,r,n){var a=[t[0]-e[0],t[1]-e[1]];return 0!==Ve([n[0]-r[0],n[1]-r[1]],a)&&!(!We(e,t,r,n)||!We(r,n,e,t))}function Je(e,t,r){for(var n=0,a=r;n<a.length;n+=1)for(var i=a[n],o=0;o<i.length-1;++o)if(Ze(e,t,i[o],i[o+1]))return!0;return!1}function $e(e,t){for(var r=0;r<e.length;++r)if(!Ue(e[r],t))return!1;for(var n=0;n<e.length-1;++n)if(Je(e[n],e[n+1],t))return!1;return!0}function Be(e,t){for(var r=0;r<t.length;r++)if($e(e,t[r]))return!0;return!1}function Xe(e,t,r){for(var n=[],a=0;a<e.length;a++){for(var i=[],o=0;o<e[a].length;o++){var s=Le(e[a][o],r);De(t,s),i.push(s)}n.push(i)}return n}function He(e,t,r){for(var n=[],a=0;a<e.length;a++){var i=Xe(e[a],t,r);n.push(i)}return n}function Ye(e,t,r,n){if(e[0]<r[0]||e[0]>r[2]){var a=.5*n,i=e[0]-r[0]>a?-n:r[0]-e[0]>a?n:0;0===i&&(i=e[0]-r[2]>a?-n:r[2]-e[0]>a?n:0),e[0]+=i}De(t,e)}function Ke(e){e[0]=e[1]=1/0,e[2]=e[3]=-1/0}function Qe(e,t,r,n){var a=Math.pow(2,n.z)*Ie,i=[n.x*Ie,n.y*Ie],o=[];if(!e)return o;for(var s=0,u=e;s<u.length;s+=1)for(var l=0,p=u[s];l<p.length;l+=1){var f=p[l],c=[f.x+i[0],f.y+i[1]];Ye(c,t,r,a),o.push(c)}return o}function et(e,t,r,n){var a=Math.pow(2,n.z)*Ie,i=[n.x*Ie,n.y*Ie],o=[];if(!e)return o;for(var s=0,u=e;s<u.length;s+=1){for(var l=[],p=0,f=u[s];p<f.length;p+=1){var c=f[p],d=[c.x+i[0],c.y+i[1]];De(t,d),l.push(d)}o.push(l)}if(t[2]-t[0]<=a/2){Ke(t);for(var y=0,m=o;y<m.length;y+=1)for(var h=0,v=m[y];h<v.length;h+=1){Ye(v[h],t,r,a)}}return o}function tt(e,t){var r=[1/0,1/0,-1/0,-1/0],n=[1/0,1/0,-1/0,-1/0],a=e.canonicalID();if(!a)return!1;if("Polygon"===t.type){var i=Xe(t.coordinates,n,a),o=Qe(e.geometry(),r,n,a);if(!Pe(r,n))return!1;for(var s=0,u=o;s<u.length;s+=1){if(!Ue(u[s],i))return!1}}if("MultiPolygon"===t.type){var l=He(t.coordinates,n,a),p=Qe(e.geometry(),r,n,a);if(!Pe(r,n))return!1;for(var f=0,c=p;f<c.length;f+=1){if(!Ge(c[f],l))return!1}}return!0}function rt(e,t){var r=[1/0,1/0,-1/0,-1/0],n=[1/0,1/0,-1/0,-1/0],a=e.canonicalID();if(!a)return!1;if("Polygon"===t.type){var i=Xe(t.coordinates,n,a),o=et(e.geometry(),r,n,a);if(!Pe(r,n))return!1;for(var s=0,u=o;s<u.length;s+=1){if(!$e(u[s],i))return!1}}if("MultiPolygon"===t.type){var l=He(t.coordinates,n,a),p=et(e.geometry(),r,n,a);if(!Pe(r,n))return!1;for(var f=0,c=p;f<c.length;f+=1){if(!Be(c[f],l))return!1}}return!0}var nt=function(e,t){this.type=K,this.geojson=e,this.geometries=t};function at(e){if(e instanceof Ee){if("get"===e.name&&1===e.args.length)return!1;if("feature-state"===e.name)return!1;if("has"===e.name&&1===e.args.length)return!1;if("properties"===e.name||"geometry-type"===e.name||"id"===e.name)return!1;if(/^filter-/.test(e.name))return!1}if(e instanceof nt)return!1;var t=!0;return e.eachChild(function(e){t&&!at(e)&&(t=!1)}),t}function it(e){if(e instanceof Ee&&"feature-state"===e.name)return!1;var t=!0;return e.eachChild(function(e){t&&!it(e)&&(t=!1)}),t}function ot(e,t){if(e instanceof Ee&&t.indexOf(e.name)>=0)return!1;var r=!0;return e.eachChild(function(e){r&&!ot(e,t)&&(r=!1)}),r}nt.parse=function(e,t){if(2!==e.length)return t.error("'within' expression requires exactly one argument, but found "+(e.length-1)+" instead.");if(ve(e[1])){var r=e[1];if("FeatureCollection"===r.type)for(var n=0;n<r.features.length;++n){var a=r.features[n].geometry.type;if("Polygon"===a||"MultiPolygon"===a)return new nt(r,r.features[n].geometry)}else if("Feature"===r.type){var i=r.geometry.type;if("Polygon"===i||"MultiPolygon"===i)return new nt(r,r.geometry)}else if("Polygon"===r.type||"MultiPolygon"===r.type)return new nt(r,r)}return t.error("'within' expression requires valid geojson object that contains polygon geometry type.")},nt.prototype.evaluate=function(e){if(null!=e.geometry()&&null!=e.canonicalID()){if("Point"===e.geometryType())return tt(e,this.geometries);if("LineString"===e.geometryType())return rt(e,this.geometries)}return!1},nt.prototype.eachChild=function(){},nt.prototype.outputDefined=function(){return!0},nt.prototype.serialize=function(){return["within",this.geojson]};var st=function(e,t){this.type=t.type,this.name=e,this.boundExpression=t};st.parse=function(e,t){if(2!==e.length||"string"!=typeof e[1])return t.error("'var' expression requires exactly one string literal argument.");var r=e[1];return t.scope.has(r)?new st(r,t.scope.get(r)):t.error('Unknown variable "'+r+'". Make sure "'+r+'" has been bound in an enclosing "let" expression before using it.',1)},st.prototype.evaluate=function(e){return this.boundExpression.evaluate(e)},st.prototype.eachChild=function(){},st.prototype.outputDefined=function(){return!1},st.prototype.serialize=function(){return["var",this.name]};var ut=function(e,t,r,n,a){void 0===t&&(t=[]),void 0===n&&(n=new B),void 0===a&&(a=[]),this.registry=e,this.path=t,this.key=t.map(function(e){return"["+e+"]"}).join(""),this.scope=n,this.errors=a,this.expectedType=r};function lt(e){if(e instanceof st)return lt(e.boundExpression);if(e instanceof Ee&&"error"===e.name)return!1;if(e instanceof Ae)return!1;if(e instanceof nt)return!1;var t=e instanceof _e||e instanceof ze,r=!0;return e.eachChild(function(e){r=t?r&&lt(e):r&&e instanceof xe}),!!r&&(at(e)&&ot(e,["zoom","heatmap-density","line-progress","sky-radial-progress","accumulated","is-supported-script","pitch","distance-from-center"]))}function pt(e,t){for(var r,n,a=e.length-1,i=0,o=a,s=0;i<=o;)if(r=e[s=Math.floor((i+o)/2)],n=e[s+1],r<=t){if(s===a||t<n)return s;i=s+1}else{if(!(r>t))throw new we("Input is not a number.");o=s-1}return 0}ut.prototype.parse=function(e,t,r,n,a){return void 0===a&&(a={}),t?this.concat(t,r,n)._parse(e,a):this._parse(e,a)},ut.prototype._parse=function(e,t){function r(e,t,r){return"assert"===r?new ze(t,[e]):"coerce"===r?new _e(t,[e]):e}if(null!==e&&"string"!=typeof e&&"boolean"!=typeof e&&"number"!=typeof e||(e=["literal",e]),Array.isArray(e)){if(0===e.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var n=e[0];if("string"!=typeof n)return this.error("Expression name must be a string, but found "+typeof n+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var a=this.registry[n];if(a){var i=a.parse(e,this);if(!i)return null;if(this.expectedType){var o=this.expectedType,s=i.type;if("string"!==o.kind&&"number"!==o.kind&&"boolean"!==o.kind&&"object"!==o.kind&&"array"!==o.kind||"value"!==s.kind)if("color"!==o.kind&&"formatted"!==o.kind&&"resolvedImage"!==o.kind||"value"!==s.kind&&"string"!==s.kind){if(this.checkSubtype(o,s))return null}else i=r(i,o,t.typeAnnotation||"coerce");else i=r(i,o,t.typeAnnotation||"assert")}if(!(i instanceof xe)&&"resolvedImage"!==i.type.kind&&lt(i)){var u=new Ce;try{i=new xe(i.type,i.evaluate(u))}catch(Ta){return this.error(Ta.message),null}}return i}return this.error('Unknown expression "'+n+'". If you wanted a literal array, use ["literal", [...]].',0)}return void 0===e?this.error("'undefined' value invalid. Use null instead."):"object"==typeof e?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found "+typeof e+" instead.")},ut.prototype.concat=function(e,t,r){var n="number"==typeof e?this.path.concat(e):this.path,a=r?this.scope.concat(r):this.scope;return new ut(this.registry,n,t||null,a,this.errors)},ut.prototype.error=function(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];var n=""+this.key+t.map(function(e){return"["+e+"]"}).join("");this.errors.push(new $(n,e))},ut.prototype.checkSubtype=function(e,t){var r=le(e,t);return r&&this.error(r),r};var ft=function(e,t,r){this.type=e,this.input=t,this.labels=[],this.outputs=[];for(var n=0,a=r;n<a.length;n+=1){var i=a[n],o=i[0],s=i[1];this.labels.push(o),this.outputs.push(s)}};ft.parse=function(e,t){if(e.length-1<4)return t.error("Expected at least 4 arguments, but found only "+(e.length-1)+".");if((e.length-1)%2!=0)return t.error("Expected an even number of arguments.");var r=t.parse(e[1],1,H);if(!r)return null;var n=[],a=null;t.expectedType&&"value"!==t.expectedType.kind&&(a=t.expectedType);for(var i=1;i<e.length;i+=2){var o=1===i?-1/0:e[i],s=e[i+1],u=i,l=i+1;if("number"!=typeof o)return t.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not c
605omputed expressions) for the input values.',u);if(n.length&&n[n.length-1][0]>=o)return t.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',u);var p=t.parse(s,l,a);if(!p)return null;a=a||p.type,n.push([o,p])}return new ft(a,r,n)},ft.prototype.evaluate=function(e){var t=this.labels,r=this.outputs;if(1===t.length)return r[0].evaluate(e);var n=this.input.evaluate(e);if(n<=t[0])return r[0].evaluate(e);var a=t.length;return n>=t[a-1]?r[a-1].evaluate(e):r[pt(t,n)].evaluate(e)},ft.prototype.eachChild=function(e){e(this.input);for(var t=0,r=this.outputs;t<r.length;t+=1){e(r[t])}},ft.prototype.outputDefined=function(){return this.outputs.every(function(e){return e.outputDefined()})},ft.prototype.serialize=function(){for(var e=["step",this.input.serialize()],t=0;t<this.labels.length;t++)t>0&&e.push(this.labels[t]),e.push(this.outputs[t].serialize());return e};var ct=dt;function dt(e,t,r,n){this.cx=3*e,this.bx=3*(r-e)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*t,this.by=3*(n-t)-this.cy,this.ay=1-this.cy-this.by,this.p1x=e,this.p1y=n,this.p2x=r,this.p2y=n}function yt(e,t,r){return e*(1-r)+t*r}function mt(e,t,r){return new I(yt(e.r,t.r,r),yt(e.g,t.g,r),yt(e.b,t.b,r),yt(e.a,t.a,r))}function ht(e,t,r){return e.map(function(e,n){return yt(e,t[n],r)})}dt.prototype.sampleCurveX=function(e){return((this.ax*e+this.bx)*e+this.cx)*e},dt.prototype.sampleCurveY=function(e){return((this.ay*e+this.by)*e+this.cy)*e},dt.prototype.sampleCurveDerivativeX=function(e){return(3*this.ax*e+2*this.bx)*e+this.cx},dt.prototype.solveCurveX=function(e,t){var r,n,a,i,o;for(void 0===t&&(t=1e-6),a=e,o=0;o<8;o++){if(i=this.sampleCurveX(a)-e,Math.abs(i)<t)return a;var s=this.sampleCurveDerivativeX(a);if(Math.abs(s)<1e-6)break;a-=i/s}if((a=e)<(r=0))return r;if(a>(n=1))return n;for(;r<n;){if(i=this.sampleCurveX(a),Math.abs(i-e)<t)return a;e>i?r=a:n=a,a=.5*(n-r)+r}return a},dt.prototype.solve=function(e,t){return this.sampleCurveY(this.solveCurveX(e,t))};var vt=Object.freeze({__proto__:null,number:yt,color:mt,array:ht}),gt=.95047,bt=1,xt=1.08883,wt=4/29,kt=6/29,zt=3*kt*kt,St=kt*kt*kt,qt=Math.PI/180,Mt=180/Math.PI;function _t(e){return e>St?Math.pow(e,1/3):e/zt+wt}function Tt(e){return e>kt?e*e*e:zt*(e-wt)}function Ct(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Et(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function jt(e){var t=Et(e.r),r=Et(e.g),n=Et(e.b),a=_t((.4124564*t+.3575761*r+.1804375*n)/gt),i=_t((.2126729*t+.7151522*r+.072175*n)/bt);return{l:116*i-16,a:500*(a-i),b:200*(i-_t((.0193339*t+.119192*r+.9503041*n)/xt)),alpha:e.a}}function At(e){var t=(e.l+16)/116,r=isNaN(e.a)?t:t+e.a/500,n=isNaN(e.b)?t:t-e.b/200;return t=bt*Tt(t),r=gt*Tt(r),n=xt*Tt(n),new I(Ct(3.2404542*r-1.5371385*t-.4985314*n),Ct(-.969266*r+1.8760108*t+.041556*n),Ct(.0556434*r-.2040259*t+1.0572252*n),e.alpha)}function It(e,t,r){return{l:yt(e.l,t.l,r),a:yt(e.a,t.a,r),b:yt(e.b,t.b,r),alpha:yt(e.alpha,t.alpha,r)}}function Dt(e){var t=jt(e),r=t.l,n=t.a,a=t.b,i=Math.atan2(a,n)*Mt;return{h:i<0?i+360:i,c:Math.sqrt(n*n+a*a),l:r,alpha:e.a}}function Ft(e){var t=e.h*qt,r=e.c;return At({l:e.l,a:Math.cos(t)*r,b:Math.sin(t)*r,alpha:e.alpha})}function Ot(e,t,r){var n=t-e;return e+r*(n>180||n<-180?n-360*Math.round(n/360):n)}function Pt(e,t,r){return{h:Ot(e.h,t.h,r),c:yt(e.c,t.c,r),l:yt(e.l,t.l,r),alpha:yt(e.alpha,t.alpha,r)}}var Lt={forward:jt,reverse:At,interpolate:It},Nt={forward:Dt,reverse:Ft,interpolate:Pt},Rt=function(e,t,r,n,a){this.type=e,this.operator=t,this.interpolation=r,this.input=n,this.labels=[],this.outputs=[];for(var i=0,o=a;i<o.length;i+=1){var s=o[i],u=s[0],l=s[1];this.labels.push(u),this.outputs.push(l)}};function Ut(e,t,r,n){var a=n-r,i=e-r;return 0===a?0:1===t?i/a:(Math.pow(t,i)-1)/(Math.pow(t,a)-1)}Rt.interpolationFactor=function(e,t,r,n){var a=0;if("exponential"===e.name)a=Ut(t,e.base,r,n);else if("linear"===e.name)a=Ut(t,1,r,n);else if("cubic-bezier"===e.name){var i=e.controlPoints;a=new ct(i[0],i[1],i[2],i[3]).solve(Ut(t,1,r,n))}return a},Rt.parse=function(e,t){var r=e[0],n=e[1],a=e[2],i=e.slice(3);if(!Array.isArray(n)||0===n.length)return t.error("Expected an interpolation type expression.",1);if("linear"===n[0])n={name:"linear"};else if("exponential"===n[0]){var o=n[1];if("number"!=typeof o)return t.error("Exponential interpolation requires a numeric base.",1,1);n={name:"exponential",base:o}}else{if("cubic-bezier"!==n[0])return t.error("Unknown interpolation type "+String(n[0]),1,0);var s=n.slice(1);if(4!==s.length||s.some(function(e){return"number"!=typeof e||e<0||e>1}))return t.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);n={name:"cubic-bezier",controlPoints:s}}if(e.length-1<4)return t.error("Expected at least 4 arguments, but found only "+(e.length-1)+".");if((e.length-1)%2!=0)return t.error("Expected an even number of arguments.");if(!(a=t.parse(a,2,H)))return null;var u=[],l=null;"interpolate-hcl"===r||"interpolate-lab"===r?l=Q:t.expectedType&&"value"!==t.expectedType.kind&&(l=t.expectedType);for(var p=0;p<i.length;p+=2){var f=i[p],c=i[p+1],d=p+3,y=p+4;if("number"!=typeof f)return t.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not c
605omputed expressions) for the input values.',d);if(u.length&&u[u.length-1][0]>=f)return t.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',d);var m=t.parse(c,y,l);if(!m)return null;l=l||m.type,u.push([f,m])}return"number"===l.kind||"color"===l.kind||"array"===l.kind&&"number"===l.itemType.kind&&"number"==typeof l.N?new Rt(l,r,n,a,u):t.error("Type "+se(l)+" is not interpolatable.")},Rt.prototype.evaluate=function(e){var t=this.labels,r=this.outputs;if(1===t.length)return r[0].evaluate(e);var n=this.input.evaluate(e);if(n<=t[0])return r[0].evaluate(e);var a=t.length;if(n>=t[a-1])return r[a-1].evaluate(e);var i=pt(t,n),o=t[i],s=t[i+1],u=Rt.interpolationFactor(this.interpolation,n,o,s),l=r[i].evaluate(e),p=r[i+1].evaluate(e);return"interpolate"===this.operator?vt[this.type.kind.toLowerCase()](l,p,u):"interpolate-hcl"===this.operator?Nt.reverse(Nt.interpolate(Nt.forward(l),Nt.forward(p),u)):Lt.reverse(Lt.interpolate(Lt.forward(l),Lt.forward(p),u))},Rt.prototype.eachChild=function(e){e(this.input);for(var t=0,r=this.outputs;t<r.length;t+=1){e(r[t])}},Rt.prototype.outputDefined=function(){return this.outputs.every(function(e){return e.outputDefined()})},Rt.prototype.serialize=function(){var e;e="linear"===this.interpolation.name?["linear"]:"exponential"===this.interpolation.name?1===this.interpolation.base?["linear"]:["exponential",this.interpolation.base]:["cubic-bezier"].concat(this.interpolation.controlPoints);for(var t=[this.operator,e,this.input.serialize()],r=0;r<this.labels.length;r++)t.push(this.labels[r],this.outputs[r].serialize());return t};var Gt=function(e,t){this.type=e,this.args=t};Gt.parse=function(e,t){if(e.length<2)return t.error("Expectected at least one argument.");var r=null,n=t.expectedType;n&&"value"!==n.kind&&(r=n);for(var a=[],i=0,o=e.slice(1);i<o.length;i+=1){var s=o[i],u=t.parse(s,1+a.length,r,void 0,{typeAnnotation:"omit"});if(!u)return null;r=r||u.type,a.push(u)}var l=n&&a.some(function(e){return le(n,e.type)});return new Gt(l?te:r,a)},Gt.prototype.evaluate=function(e){for(var t,r=null,n=0,a=0,i=this.args;a<i.length;a+=1){if(n++,(r=i[a].evaluate(e))&&r instanceof me&&!r.available&&(t||(t=r),r=null,n===this.args.length))return t;if(null!==r)break}return r},Gt.prototype.eachChild=function(e){this.args.forEach(e)},Gt.prototype.outputDefined=function(){return this.args.every(function(e){return e.outputDefined()})},Gt.prototype.serialize=function(){var e=["coalesce"];return this.eachChild(function(t){e.push(t.serialize())}),e};var Vt=function(e,t){this.type=t.type,this.bindings=[].concat(e),this.result=t};Vt.prototype.evaluate=function(e){return this.result.evaluate(e)},Vt.prototype.eachChild=function(e){for(var t=0,r=this.bindings;t<r.length;t+=1){e(r[t][1])}e(this.result)},Vt.parse=function(e,t){if(e.length<4)return t.error("Expected at least 3 arguments, but found "+(e.length-1)+" instead.");for(var r=[],n=1;n<e.length-1;n+=2){var a=e[n];if("string"!=typeof a)return t.error("Expected string, but found "+typeof a+" instead.",n);if(/[^a-zA-Z0-9_]/.test(a))return t.error("Variable names must contain only alphanumeric characters or '_'.",n);var i=t.parse(e[n+1],n+1);if(!i)return null;r.push([a,i])}var o=t.parse(e[e.length-1],e.length-1,t.expectedType,r);return o?new Vt(r,o):null},Vt.prototype.outputDefined=function(){return this.result.outputDefined()},Vt.prototype.serialize=function(){for(var e=["let"],t=0,r=this.bindings;t<r.length;t+=1){var n=r[t],a=n[0],i=n[1];e.push(a,i.serialize())}return e.push(this.result.serialize()),e};var Wt=function(e,t,r){this.type=e,this.index=t,this.input=r};Wt.parse=function(e,t){if(3!==e.length)return t.error("Expected 2 arguments, but found "+(e.length-1)+" instead.");var r=t.parse(e[1],1,H),n=t.parse(e[2],2,oe(t.expectedType||te));if(!r||!n)return null;var a=n.type;return new Wt(a.itemType,r,n)},Wt.prototype.evaluate=function(e){var t=this.index.evaluate(e),r=this.input.evaluate(e);if(t<0)throw new we("Array index out of bounds: "+t+" < 0.");if(t>=r.length)throw new we("Array index out of bounds: "+t+" > "+(r.length-1)+".");if(t!==Math.floor(t))throw new we("Array index must be an integer, but found "+t+" instead.");return r[t]},Wt.prototype.eachChild=function(e){e(this.index),e(this.input)},Wt.prototype.outputDefined=function(){return!1},Wt.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var Zt=function(e,t){this.type=K,this.needle=e,this.haystack=t};Zt.parse=function(e,t){if(3!==e.length)return t.error("Expected 2 arguments, but found "+(e.length-1)+" instead.");var r=t.parse(e[1],1,te),n=t.parse(e[2],2,te);return r&&n?pe(r.type,[K,Y,H,X,te])?new Zt(r,n):t.error("Expected first argument to be of type boolean, string, number or null, but found "+se(r.type)+" instead"):null},Zt.prototype.evaluate=function(e){var t=this.needle.evaluate(e),r=this.haystack.evaluate(e);if(null==r)return!1;if(!fe(t,["boolean","string","number","null"]))throw new we("Expected first argument to be of type boolean, string, number or null, but found "+se(ge(t))+" instead.");if(!fe(r,["string","array"]))throw new we("Expected second argument to be of type array or string, but found "+se(ge(r))+" instead.");return r.indexOf(t)>=0},Zt.prototype.eachChild=function(e){e(this.needle),e(this.haystack)},Zt.prototype.outputDefined=function(){return!0},Zt.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var Jt=function(e,t,r){this.type=H,this.needle=e,this.haystack=t,this.fromIndex=r};Jt.parse=function(e,t){if(e.length<=2||e.length>=5)return t.error("Expected 3 or 4 arguments, but found "+(e.length-1)+" instead.");var r=t.parse(e[1],1,te),n=t.parse(e[2],2,te);if(!r||!n)return null;if(!pe(r.type,[K,Y,H,X,te]))return t.error("Expected first argument to be of type boolean, string, number or null, but found "+se(r.type)+" instead");if(4===e.length){var a=t.parse(e[3],3,H);return a?new Jt(r,n,a):null}return new Jt(r,n)},Jt.prototype.evaluate=function(e){var t=this.needle.evaluate(e),r=this.haystack.evaluate(e);if(!fe(t,["boolean","string","number","null"]))throw new we("Expected first argument to be of type boolean, string, number or null, but found "+se(ge(t))+" instead.");if(!fe(r,["string","array"]))throw new we("Expected second argument to be of type array or string, but found "+se(ge(r))+" instead.");if(this.fromIndex){var n=this.fromIndex.evaluate(e);return r.indexOf(t,n)}return r.indexOf(t)},Jt.prototype.eachChild=function(e){e(this.needle),e(this.haystack),this.fromIndex&&e(this.fromIndex)},Jt.prototype.outputDefined=function(){return!1},Jt.prototype.serialize=function(){if(null!=this.fromIndex&&void 0!==this.fromIndex){var e=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),e]}return["index-of",this.needle.serialize(),this.haystack.serialize()]};var $t=function(e,t,r,n,a,i){this.inputType=e,this.type=t,this.input=r,this.cases=n,this.outputs=a,this.otherwise=i};$t.parse=function(e,t){if(e.length<5)return t.error("Expected at least 4 arguments, but found only "+(e.length-1)+".");if(e.length%2!=1)return t.error("Expected an even number of arguments.");var r,n;t.expectedType&&"value"!==t.expectedType.kind&&(n=t.expectedType);for(var a={},i=[],o=2;o<e.length-1;o+=2){var s=e[o],u=e[o+1];Array.isArray(s)||(s=[s]);var l=t.concat(o);if(0===s.length)return l.error("Expected at least one branch label.");for(var p=0,f=s;p<f.length;p+=1){var c=f[p];if("number"!=typeof c&&"string"!=typeof c)return l.error("Branch labels must be numbers or strings.");if("number"==typeof c&&Math.abs(c)>Number.MAX_SAFE_INTEGER)return l.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if("number"==typeof c&&Math.floor(c)!==c)return l.error("Numeric branch labels must be integer values.");if(r){if(l.checkSubtype(r,ge(c)))return null}else r=ge(c);if(void 0!==a[String(c)])return l.error("Branch labels must be unique.");a[String(c)]=i.length}var d=t.parse(u,o,n);if(!d)return null;n=n||d.type,i.push(d)}var y=t.parse(e[1],1,te);if(!y)return null;var m=t.parse(e[e.length-1],e.length-1,n);return m?"value"!==y.type.kind&&t.concat(1).checkSubtype(r,y.type)?null:new $t(r,n,y,a,i,m):null},$t.prototype.evaluate=function(e){var t=this.input.evaluate(e);return(ge(t)===this.inputType&&this.outputs[this.cases[t]]||this.otherwise).evaluate(e)},$t.prototype.eachChild=function(e){e(this.input),this.outputs.forEac
vendor: 16,384 bytes, line 605
605h(e),e(this.otherwise)},$t.prototype.outputDefined=function(){return this.outputs.every(function(e){return e.outputDefined()})&&this.otherwise.outputDefined()},$t.prototype.serialize=function(){for(var e=this,t=["match",this.input.serialize()],r=[],n={},a=0,i=Object.keys(this.cases).sort();a<i.length;a+=1){var o=i[a];void 0===(f=n[this.cases[o]])?(n[this.cases[o]]=r.length,r.push([this.cases[o],[o]])):r[f][1].push(o)}for(var s=function(t){return"number"===e.inputType.kind?Number(t):t},u=0,l=r;u<l.length;u+=1){var p=l[u],f=p[0],c=p[1];1===c.length?t.push(s(c[0])):t.push(c.map(s)),t.push(this.outputs[outputIndex$1].serialize())}return t.push(this.otherwise.serialize()),t};var Bt=function(e,t,r){this.type=e,this.branches=t,this.otherwise=r};Bt.parse=function(e,t){if(e.length<4)return t.error("Expected at least 3 arguments, but found only "+(e.length-1)+".");if(e.length%2!=0)return t.error("Expected an odd number of arguments.");var r;t.expectedType&&"value"!==t.expectedType.kind&&(r=t.expectedType);for(var n=[],a=1;a<e.length-1;a+=2){var i=t.parse(e[a],a,K);if(!i)return null;var o=t.parse(e[a+1],a+1,r);if(!o)return null;n.push([i,o]),r=r||o.type}var s=t.parse(e[e.length-1],e.length-1,r);return s?new Bt(r,n,s):null},Bt.prototype.evaluate=function(e){for(var t=0,r=this.branches;t<r.length;t+=1){var n=r[t],a=n[0],i=n[1];if(a.evaluate(e))return i.evaluate(e)}return this.otherwise.evaluate(e)},Bt.prototype.eachChild=function(e){for(var t=0,r=this.branches;t<r.length;t+=1){var n=r[t],a=n[0],i=n[1];e(a),e(i)}e(this.otherwise)},Bt.prototype.outputDefined=function(){return this.branches.every(function(e){return e[0],e[1].outputDefined()})&&this.otherwise.outputDefined()},Bt.prototype.serialize=function(){var e=["case"];return this.eachChild(function(t){e.push(t.serialize())}),e};var Xt=function(e,t,r,n){this.type=e,this.input=t,this.beginIndex=r,this.endIndex=n};function Ht(e,t){return"=="===e||"!="===e?"boolean"===t.kind||"string"===t.kind||"number"===t.kind||"null"===t.kind||"value"===t.kind:"string"===t.kind||"number"===t.kind||"value"===t.kind}function Yt(e,t,r){return t===r}function Kt(e,t,r){return t!==r}function Qt(e,t,r){return t<r}function er(e,t,r){return t>r}function tr(e,t,r){return t<=r}function rr(e,t,r){return t>=r}function nr(e,t,r,n){return 0===n.compare(t,r)}function ar(e,t,r,n){return!nr(e,t,r,n)}function ir(e,t,r,n){return n.compare(t,r)<0}function or(e,t,r,n){return n.compare(t,r)>0}function sr(e,t,r,n){return n.compare(t,r)<=0}function ur(e,t,r,n){return n.compare(t,r)>=0}function lr(e,t,r){var n="=="!==e&&"!="!==e;return function(){function a(e,t,r){this.type=K,this.lhs=e,this.rhs=t,this.collator=r,this.hasUntypedArgument="value"===e.type.kind||"value"===t.type.kind}return a.parse=function(e,t){if(3!==e.length&&4!==e.length)return t.error("Expected two or three arguments.");var r=e[0],i=t.parse(e[1],1,te);if(!i)return null;if(!Ht(r,i.type))return t.concat(1).error('"'+r+"\" comparisons are not supported for type '"+se(i.type)+"'.");var o=t.parse(e[2],2,te);if(!o)return null;if(!Ht(r,o.type))return t.concat(2).error('"'+r+"\" comparisons are not supported for type '"+se(o.type)+"'.");if(i.type.kind!==o.type.kind&&"value"!==i.type.kind&&"value"!==o.type.kind)return t.error("Cannot compare types '"+se(i.type)+"' and '"+se(o.type)+"'.");n&&("value"===i.type.kind&&"value"!==o.type.kind?i=new ze(o.type,[i]):"value"!==i.type.kind&&"value"===o.type.kind&&(o=new ze(i.type,[o])));var s=null;if(4===e.length){if("string"!==i.type.kind&&"string"!==o.type.kind&&"value"!==i.type.kind&&"value"!==o.type.kind)return t.error("Cannot use collator to compare non-string types.");if(!(s=t.parse(e[3],3,ne)))return null}return new a(i,o,s)},a.prototype.evaluate=function(a){var i=this.lhs.evaluate(a),o=this.rhs.evaluate(a);if(n&&this.hasUntypedArgument){var s=ge(i),u=ge(o);if(s.kind!==u.kind||"string"!==s.kind&&"number"!==s.kind)throw new we('Expected arguments for "'+e+'" to be (string, string) or (number, number), but found ('+s.kind+", "+u.kind+") instead.")}if(this.collator&&!n&&this.hasUntypedArgument){var l=ge(i),p=ge(o);if("string"!==l.kind||"string"!==p.kind)return t(a,i,o)}return this.collator?r(a,i,o,this.collator.evaluate(a)):t(a,i,o)},a.prototype.eachChild=function(e){e(this.lhs),e(this.rhs),this.collator&&e(this.collator)},a.prototype.outputDefined=function(){return!0},a.prototype.serialize=function(){var t=[e];return this.eachChild(function(e){t.push(e.serialize())}),t},a}()}Xt.parse=function(e,t){if(e.length<=2||e.length>=5)return t.error("Expected 3 or 4 arguments, but found "+(e.length-1)+" instead.");var r=t.parse(e[1],1,te),n=t.parse(e[2],2,H);if(!r||!n)return null;if(!pe(r.type,[oe(te),Y,te]))return t.error("Expected first argument to be of type array or string, but found "+se(r.type)+" instead");if(4===e.length){var a=t.parse(e[3],3,H);return a?new Xt(r.type,r,n,a):null}return new Xt(r.type,r,n)},Xt.prototype.evaluate=function(e){var t=this.input.evaluate(e),r=this.beginIndex.evaluate(e);if(!fe(t,["string","array"]))throw new we("Expected first argument to be of type array or string, but found "+se(ge(t))+" instead.");if(this.endIndex){var n=this.endIndex.evaluate(e);return t.slice(r,n)}return t.slice(r)},Xt.prototype.eachChild=function(e){e(this.input),e(this.beginIndex),this.endIndex&&e(this.endIndex)},Xt.prototype.outputDefined=function(){return!1},Xt.prototype.serialize=function(){if(null!=this.endIndex&&void 0!==this.endIndex){var e=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),e]}return["slice",this.input.serialize(),this.beginIndex.serialize()]};var pr=lr("==",Yt,nr),fr=lr("!=",Kt,ar),cr=lr("<",Qt,ir),dr=lr(">",er,or),yr=lr("<=",tr,sr),mr=lr(">=",rr,ur),hr=function(e,t,r,n,a){this.type=Y,this.number=e,this.locale=t,this.currency=r,this.minFractionDigits=n,this.maxFractionDigits=a};hr.parse=function(e,t){if(3!==e.length)return t.error("Expected two arguments.");var r=t.parse(e[1],1,H);if(!r)return null;var n=e[2];if("object"!=typeof n||Array.isArray(n))return t.error("NumberFormat options argument must be an object.");var a=null;if(n.locale&&!(a=t.parse(n.locale,1,Y)))return null;var i=null;if(n.currency&&!(i=t.parse(n.currency,1,Y)))return null;var o=null;if(n["min-fraction-digits"]&&!(o=t.parse(n["min-fraction-digits"],1,H)))return null;var s=null;return n["max-fraction-digits"]&&!(s=t.parse(n["max-fraction-digits"],1,H))?null:new hr(r,a,i,o,s)},hr.prototype.evaluate=function(e){return new Intl.NumberFormat(this.locale?this.locale.evaluate(e):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(e):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(e):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(e):void 0}).format(this.number.evaluate(e))},hr.prototype.eachChild=function(e){e(this.number),this.locale&&e(this.locale),this.currency&&e(this.currency),this.minFractionDigits&&e(this.minFractionDigits),this.maxFractionDigits&&e(this.maxFractionDigits)},hr.prototype.outputDefined=function(){return!1},hr.prototype.serialize=function(){var e={};return this.locale&&(e.locale=this.locale.serialize()),this.currency&&(e.currency=this.currency.serialize()),this.minFractionDigits&&(e["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(e["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),e]};var vr=function(e){this.type=H,this.input=e};vr.parse=function(e,t){if(2!==e.length)return t.error("Expected 1 argument, but found "+(e.length-1)+" instead.");var r=t.parse(e[1],1);return r?"array"!==r.type.kind&&"string"!==r.type.kind&&"value"!==r.type.kind?t.error("Expected argument of type string or array, but found "+se(r.type)+" instead."):new vr(r):null},vr.prototype.evaluate=function(e){var t=this.input.evaluate(e);if("string"==typeof t)return t.length;if(Array.isArray(t))return t.length;throw new we("Expected value to be of type string or array, but found "+se(ge(t))+" instead.")},vr.prototype.eachChild=function(e){e(this.input)},vr.prototype.outputDefined=function(){return!1},vr.prototype.serialize=function(){var e=["length"];return this.eachChild(function(t){e.push(t.serialize())}),e};var gr={"==":pr,"!=":fr,">":dr,"<":cr,">=":mr,"<=":yr,array:ze,at:Wt,boolean:ze,case:Bt,coalesce:Gt,collator:Ae,format:Se,image:qe,in:Zt,"index-of":Jt,interpolate:Rt,"interpolate-hcl":Rt,"interpolate-lab":Rt,length:vr,let:Vt,literal:xe,match:$t,number:ze,"number-format":hr,object:ze,slice:Xt,step:ft,string:ze,"to-boolean":_e,"to-color":_e,"to-number":_e,"to-string":_e,var:st,within:nt};function br(e,t){var r=t[0],n=t[1],a=t[2],i=t[3];r=r.evaluate(e),n=n.evaluate(e),a=a.evaluate(e);var o=i?i.evaluate(e):1,s=he(r,n,a,o);if(s)throw new we(s);return new I(r/255*o,n/255*o,a/255*o,o)}function xr(e,t){return e in t}function wr(e,t){var r=t[e];return void 0===r?null:r}function kr(e,t,r,n){for(;r<=n;){var a=r+n>>1;if(t[a]===e)return!0;t[a]>e?n=a-1:r=a+1}return!1}function zr(e){return{type:e}}function Sr(e){return{result:"success",value:e}}function qr(e){return{result:"error",value:e}}function Mr(e){return"data-driven"===e["property-type"]||"cross-faded-data-driven"===e["property-type"]}function _r(e){return!!e.expression&&e.expression.parameters.indexOf("zoom")>-1}function Tr(e){return!!e.expression&&e.expression.interpolated}function Cr(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}Ee.register(gr,{error:[re,[Y],function(e,t){var r=t[0];throw new we(r.evaluate(e))}],typeof:[Y,[te],function(e,t){return se(ge(t[0].evaluate(e)))}],"to-rgba":[oe(H,4),[Q],function(e,t){return t[0].evaluate(e).toArray()}],rgb:[Q,[H,H,H],br],rgba:[Q,[H,H,H,H],br],has:{type:K,overloads:[[[Y],function(e,t){return xr(t[0].evaluate(e),e.properties())}],[[Y,ee],function(e,t){var r=t[0],n=t[1];return xr(r.evaluate(e),n.evaluate(e))}]]},get:{type:te,overloads:[[[Y],function(e,t){return wr(t[0].evaluate(e),e.properties())}],[[Y,ee],function(e,t){var r=t[0],n=t[1];return wr(r.evaluate(e),n.evaluate(e))}]]},"feature-state":[te,[Y],function(e,t){return wr(t[0].evaluate(e),e.featureState||{})}],properties:[ee,[],function(e){return e.properties()}],"geometry-type":[Y,[],function(e){return e.geometryType()}],id:[te,[],function(e){return e.id()}],zoom:[H,[],function(e){return e.globals.zoom}],pitch:[H,[],function(e){return e.globals.pitch||0}],"distance-from-center":[H,[],function(e){return e.distanceFromCenter()}],"heatmap-density":[H,[],function(e){return e.globals.heatmapDensity||0}],"line-progress":[H,[],function(e){return e.globals.lineProgress||0}],"sky-radial-progress":[H,[],function(e){return e.globals.skyRadialProgress||0}],accumulated:[te,[],function(e){return void 0===e.globals.accumulated?null:e.globals.accumulated}],"+":[H,zr(H),function(e,t){for(var r=0,n=0,a=t;n<a.length;n+=1){r+=a[n].evaluate(e)}return r}],"*":[H,zr(H),function(e,t){for(var r=1,n=0,a=t;n<a.length;n+=1){r*=a[n].evaluate(e)}return r}],"-":{type:H,overloads:[[[H,H],function(e,t){var r=t[0],n=t[1];return r.evaluate(e)-n.evaluate(e)}],[[H],function(e,t){return-t[0].evaluate(e)}]]},"/":[H,[H,H],function(e,t){var r=t[0],n=t[1];return r.evaluate(e)/n.evaluate(e)}],"%":[H,[H,H],function(e,t){var r=t[0],n=t[1];return r.evaluate(e)%n.evaluate(e)}],ln2:[H,[],function(){return Math.LN2}],pi:[H,[],function(){return Math.PI}],e:[H,[],function(){return Math.E}],"^":[H,[H,H],function(e,t){var r=t[0],n=t[1];return Math.pow(r.evaluate(e),n.evaluate(e))}],sqrt:[H,[H],function(e,t){var r=t[0];return Math.sqrt(r.evaluate(e))}],log10:[H,[H],function(e,t){var r=t[0];return Math.log(r.evaluate(e))/Math.LN10}],ln:[H,[H],function(e,t){var r=t[0];return Math.log(r.evaluate(e))}],log2:[H,[H],function(e,t){var r=t[0];return Math.log(r.evaluate(e))/Math.LN2}],sin:[H,[H],function(e,t){var r=t[0];return Math.sin(r.evaluate(e))}],cos:[H,[H],function(e,t){var r=t[0];return Math.cos(r.evaluate(e))}],tan:[H,[H],function(e,t){var r=t[0];return Math.tan(r.evaluate(e))}],asin:[H,[H],function(e,t){var r=t[0];return Math.asin(r.evaluate(e))}],acos:[H,[H],function(e,t){var r=t[0];return Math.acos(r.evaluate(e))}],atan:[H,[H],function(e,t){var r=t[0];return Math.atan(r.evaluate(e))}],min:[H,zr(H),function(e,t){return Math.min.apply(Math,t.map(function(t){return t.evaluate(e)}))}],max:[H,zr(H),function(e,t){return Math.max.apply(Math,t.map(function(t){return t.evaluate(e)}))}],abs:[H,[H],function(e,t){var r=t[0];return Math.abs(r.evaluate(e))}],round:[H,[H],function(e,t){var r=t[0].evaluate(e);return r<0?-Math.round(-r):Math.round(r)}],floor:[H,[H],function(e,t){var r=t[0];return Math.floor(r.evaluate(e))}],ceil:[H,[H],function(e,t){var r=t[0];return Math.ceil(r.evaluate(e))}],"filter-==":[K,[Y,te],function(e,t){var r=t[0],n=t[1];return e.properties()[r.value]===n.value}],"filter-id-==":[K,[te],function(e,t){var r=t[0];return e.id()===r.value}],"filter-type-==":[K,[Y],function(e,t){var r=t[0];return e.geometryType()===r.value}],"filter-<":[K,[Y,te],function(e,t){var r=t[0],n=t[1],a=e.properties()[r.value],i=n.value;return typeof a==typeof i&&a<i}],"filter-id-<":[K,[te],function(e,t){var r=t[0],n=e.id(),a=r.value;return typeof n==typeof a&&n<a}],"filter->":[K,[Y,te],function(e,t){var r=t[0],n=t[1],a=e.properties()[r.value],i=n.value;return typeof a==typeof i&&a>i}],"filter-id->":[K,[te],function(e,t){var r=t[0],n=e.id(),a=r.value;return typeof n==typeof a&&n>a}],"filter-<=":[K,[Y,te],function(e,t){var r=t[0],n=t[1],a=e.properties()[r.value],i=n.value;return typeof a==typeof i&&a<=i}],"filter-id-<=":[K,[te],function(e,t){var r=t[0],n=e.id(),a=r.value;return typeof n==typeof a&&n<=a}],"filter->=":[K,[Y,te],function(e,t){var r=t[0],n=t[1],a=e.properties()[r.value],i=n.value;return typeof a==typeof i&&a>=i}],"filter-id->=":[K,[te],function(e,t){var r=t[0],n=e.id(),a=r.value;return typeof n==typeof a&&n>=a}],"filter-has":[K,[te],function(e,t){return t[0].value in e.properties()}],"filter-has-id":[K,[],function(e){return null!==e.id()&&void 0!==e.id()}],"filter-type-in":[K,[oe(Y)],function(e,t){return t[0].value.indexOf(e.geometryType())>=0}],"filter-id-in":[K,[oe(te)],function(e,t){return t[0].value.indexOf(e.id())>=0}],"filter-in-small":[K,[Y,oe(te)],function(e,t){var r=t[0];return t[1].value.indexOf(e.properties()[r.value])>=0}],"filter-in-large":[K,[Y,oe(te)],function(e,t){var r=t[0],n=t[1];return kr(e.properties()[r.value],n.value,0,n.value.length-1)}],all:{type:K,overloads:[[[K,K],function(e,t){var r=t[0],n=t[1];return r.evaluate(e)&&n.evaluate(e)}],[zr(K),function(e,t){for(var r=0,n=t;r<n.length;r+=1){if(!n[r].evaluate(e))return!1}return!0}]]},any:{type:K,overloads:[[[K,K],function(e,t){var r=t[0],n=t[1];return r.evaluate(e)||n.evaluate(e)}],[zr(K),function(e,t){for(var r=0,n=t;r<n.length;r+=1){if(n[r].evaluate(e))return!0}return!1}]]},"!":[K,[K],function(e,t){return!t[0].evaluate(e)}],"is-supported-script":[K,[Y],function(e,t){var r=t[0],n=e.globals&&e.globals.isSupportedScript;return!n||n(r.evaluate(e))}],upcase:[Y,[Y],function(e,t){return t[0].evaluate(e).toUpperCase()}],downcase:[Y,[Y],function(e,t){return t[0].evaluate(e).toLowerCase()}],concat:[Y,zr(te),function(e,t){return t.map(function(t){return be(t.evaluate(e))}).join("")}],"resolved-locale":[Y,[ne],function(e,t){return t[0].evaluate(e).resolvedLocale()}]});var Er=function(e,t){this.expression=e,this._warningHistory={},this._evaluator=new Ce,this._defaultValue=t?Lr(t):null,this._enumValues=t&&"enum"===t.type?t.values:null};function jr(e){return Array.isArray(e)&&e.length>0&&"string"==typeof e[0]&&e[0]in gr}function Ar(e,t){var r=new ut(gr,[],t?Pr(t):void 0),n=r.parse(e,void 0,void 0,void 0,t&&"string"===t.type?{typeAnnotation:"coerce"}:void 0);return n?Sr(new Er(n,t)):qr(r.errors)}Er.prototype.evaluateWithoutErrorHandling=function(e,t,r,n,a,i,o,s){return this._evaluator.globals=e,this._evaluator.feature=t,this._evaluator.featureState=r,this._evaluator.canonical=n||null,this._evaluator.availableImages=a||null,this._evaluator.formattedSection=i,this._evaluator.featureTileCoord=o||null,this._evaluator.featureDistanceData=s||null,this.expression.evaluate(this._evaluator)},Er.prototype.evaluate=function(e,t,r,n,a,i,o,s){this._evaluator.globals=e,this._evaluator.feature=t||null,this._evaluator.featureState=r||null,this._evaluator.canonical=n||null,this._evaluator.availableImages=a||null,this._evaluator.f
605ormattedSection=i||null,this._evaluator.featureTileCoord=o||null,this._evaluator.featureDistanceData=s||null;try{var u=this.expression.evaluate(this._evaluator);if(null==u||"number"==typeof u&&u!=u)return this._defaultValue;if(this._enumValues&&!(u in this._enumValues))throw new we("Expected value to be one of "+Object.keys(this._enumValues).map(function(e){return JSON.stringify(e)}).join(", ")+", but found "+JSON.stringify(u)+" instead.");return u}catch(Ta){return this._warningHistory[Ta.message]||(this._warningHistory[Ta.message]=!0,"undefined"!=typeof console&&console.warn(Ta.message)),this._defaultValue}};var Ir=function(e,t){this.kind=e,this._styleExpression=t,this.isStateDependent="constant"!==e&&!it(t.expression)};Ir.prototype.evaluateWithoutErrorHandling=function(e,t,r,n,a,i){return this._styleExpression.evaluateWithoutErrorHandling(e,t,r,n,a,i)},Ir.prototype.evaluate=function(e,t,r,n,a,i){return this._styleExpression.evaluate(e,t,r,n,a,i)};var Dr=function(e,t,r,n){this.kind=e,this.zoomStops=r,this._styleExpression=t,this.isStateDependent="camera"!==e&&!it(t.expression),this.interpolationType=n};function Fr(e,t){if("error"===(e=Ar(e,t)).result)return e;var r=e.value.expression,n=at(r);if(!n&&!Mr(t))return qr([new $("","data expressions not supported")]);var a=ot(r,["zoom","pitch","distance-from-center"]);if(!a&&!_r(t))return qr([new $("","zoom expressions not supported")]);var i=Or(r);if(!i&&!a)return qr([new $("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(i instanceof $)return qr([i]);if(i instanceof Rt&&!Tr(t))return qr([new $("",'"interpolate" expressions cannot be used with this property')]);if(!i)return Sr(new Ir(n?"constant":"source",e.value));var o=i instanceof Rt?i.interpolation:void 0;return Sr(new Dr(n?"camera":"composite",e.value,i.labels,o))}function Or(e){var t=null;if(e instanceof Vt)t=Or(e.result);else if(e instanceof Gt)for(var r=0,n=e.args;r<n.length;r+=1){var a=n[r];if(t=Or(a))break}else(e instanceof ft||e instanceof Rt)&&e.input instanceof Ee&&"zoom"===e.input.name&&(t=e);return t instanceof $?t:(e.eachChild(function(e){var r=Or(e);r instanceof $?t=r:!t&&r?t=new $("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):t&&r&&t!==r&&(t=new $("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),t)}function Pr(e){var t={color:Q,string:Y,number:H,enum:Y,boolean:K,formatted:ae,resolvedImage:ie};return"array"===e.type?oe(t[e.value]||te,e.length):t[e.type]}function Lr(e){return"color"===e.type&&(Cr(e.default)||Array.isArray(e.default))?new I(0,0,0,0):"color"===e.type?I.parse(e.default)||null:void 0===e.default?null:e.default}function Nr(e){return e instanceof Number||e instanceof String||e instanceof Boolean?e.valueOf():e}function Rr(e){if(Array.isArray(e))return e.map(Rr);if(e instanceof Object&&!(e instanceof Number||e instanceof String||e instanceof Boolean)){var t={};for(var r in e)t[r]=Rr(e[r]);return t}return Nr(e)}Dr.prototype.evaluateWithoutErrorHandling=function(e,t,r,n,a,i){return this._styleExpression.evaluateWithoutErrorHandling(e,t,r,n,a,i)},Dr.prototype.evaluate=function(e,t,r,n,a,i){return this._styleExpression.evaluate(e,t,r,n,a,i)},Dr.prototype.interpolationFactor=function(e,t,r){return this.interpolationType?Rt.interpolationFactor(this.interpolationType,e,t,r):0};var Ur
vendor: 35,940 bytes, line 605
605={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},terrain:{type:"terrain"},fog:{type:"fog"},sources:{required:!0,type:"sources"},sprite:{type:"string"},glyphs:{type:"string"},transition:{type:"transition"},projection:{type:"projection"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{}},default:"mapbox"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"*"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{},sky:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background","layout_sky"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_sky:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},filter:{type:"array",value:"*"},filter_symbol:{type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature","pitch","distance-from-center"]}},filter_fill:{type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},filter_line:{type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},filter_circle:{type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},"filter_fill-extrusion":{type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},filter_heatmap:{type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{},within:{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},expression_name:{type:"enum",values:{let:{group:"Variable binding"},var:{group:"Variable binding"},literal:{group:"Types"},array:{group:"Types"},at:{group:"Lookup"},in:{group:"Lookup"},"index-of":{group:"Lookup"},slice:{group:"Lookup"},case:{group:"Decision"},match:{group:"Decision"},coalesce:{group:"Decision"},step:{group:"Ramps, scales, curves"},interpolate:{group:"Ramps, scales, curves"},"interpolate-hcl":{group:"Ramps, scales, curves"},"interpolate-lab":{group:"Ramps, scales, curves"},ln2:{group:"Math"},pi:{group:"Math"},e:{group:"Math"},typeof:{group:"Types"},string:{group:"Types"},number:{group:"Types"},boolean:{group:"Types"},object:{group:"Types"},collator:{group:"Types"},format:{group:"Types"},image:{group:"Types"},"number-format":{group:"Types"},"to-string":{group:"Types"},"to-number":{group:"Types"},"to-boolean":{group:"Types"},"to-rgba":{group:"Color"},"to-color":{group:"Types"},rgb:{group:"Color"},rgba:{group:"Color"},get:{group:"Lookup"},has:{group:"Lookup"},length:{group:"Lookup"},properties:{group:"Feature data"},"feature-state":{group:"Feature data"},"geometry-type":{group:"Feature data"},id:{group:"Feature data"},zoom:{group:"Camera"},pitch:{group:"Camera"},"distance-from-center":{group:"Camera"},"heatmap-density":{group:"Heatmap"},"line-progress":{group:"Feature data"},"sky-radial-progress":{group:"sky"},accumulated:{group:"Feature data"},"+":{group:"Math"},"*":{group:"Math"},"-":{group:"Math"},"/":{group:"Math"},"%":{group:"Math"},"^":{group:"Math"},sqrt:{group:"Math"},log10:{group:"Math"},ln:{group:"Math"},log2:{group:"Math"},sin:{group:"Math"},cos:{group:"Math"},tan:{group:"Math"},asin:{group:"Math"},acos:{group:"Math"},atan:{group:"Math"},min:{group:"Math"},max:{group:"Math"},round:{group:"Math"},abs:{group:"Math"},ceil:{group:"Math"},floor:{group:"Math"},distance:{group:"Math"},"==":{group:"Decision"},"!=":{group:"Decision"},">":{group:"Decision"},"<":{group:"Decision"},">=":{group:"Decision"},"<=":{group:"Decision"},all:{group:"Decision"},any:{group:"Decision"},"!":{group:"Decision"},within:{group:"Decision"},"is-supported-script":{group:"String"},upcase:{group:"String"},downcase:{group:"String"},concat:{group:"String"},"resolved-locale":{group:"String"}}},fog:{range:{type:"array",default:[.5,10],minimum:-20,maximum:20,length:2,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"high-color":{type:"color","property-type":"data-constant",default:"#245cdf",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"space-color":{type:"color","property-type":"data-constant",default:["interpolate",["linear"],["zoom"],4,"#010b19",7,"#367ab9"],expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-blend":{type:"number","property-type":"data-constant",default:["interpolate",["linear"],["zoom"],4,.2,7,.1],minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"star-intensity":{type:"number","property-type":"data-constant",default:["interpolate",["linear"],["zoom"],5,.35,6,0],minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},projection:{name:{type:"enum",values:{albers:{},equalEarth:{},equirectangular:{},lambertConformalConic:{},mercator:{},naturalEarth:{},winkelTripel:{},globe:{}},default:"mercator",required:!0},center:{type:"array",length:2,value:"number","property-type":"data-constant",minimum:[-180,-90],maximum:[180,90],transition:!1,requires:[{name:["albers","lambertConformalConic"]}]},parallels:{type:"array",length:2,value:"number","property-type":"data-constant",minimum:[-90,-90],maximum:[90,90],transition:!1,requires:[{name:["albers","lambertConformalConic"]}]}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number","property-type":"data-constant",default:1,minimum:0,maximum:1e3,expression:{interpolated:!0,parameters:["zoom"]},transition:!0,requires:["source"]}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background","paint_sky"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"},"line-trim-offset":{type:"array",value:"number",length:2,default:[0,0],minimum:[0,0],maximum:[1,1],transition:!1,requires:[{source:"geojson",has:{lineMetrics:!0}}],"property-type":"constant"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_sky:{"sky-type":{type:"enum",values:{gradient:{},atmosphere:{}},default:"atmosphere",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun":{type:"array",value:"number",length:2,units:"degrees",minimum:[0,0],maximum:[360,180],transition:!1,requires:[{"sky-type":"atmosphere"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun-intensity":{type:"number",requires:[{"sky-type":"atmosphere"}],default:10,minimum:0,maximum:100,transition:!1,"property-type":"data-constant"},"sky-gradient-center":{type:"array",requires:[{"sky-type":"gradient"}],value:"number",default:[0,0],length:2,units:"degrees",minimum:[0,0],maximum:[360,180],transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-gradient-radius":{type:"number",requires:[{"sky-type":"gradient"}],default:90,minimum:0,maximum:180,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-gradient":{type:"color",default:["interpolate",["linear"],["sky-radial-progress"],.8,"#87ceeb",1,"white"],transition:!1,requires:[{"sky-type":"gradient"}],expression:{interpolated:!0,parameters:["sky-radial-progress"]},"property-type":"color-ramp"},"sky-atmosphere-halo-color":{type:"color",default:"white",transition:!1,requires:[{"sky-type":"atmosphere"}],"property-type":"data-constant"},"sky-atmosphere-color":{type:"color",default:"white",transition:!1,requires:[{"sky-type":"atmosphere"}],"property-type":"data-constant"},"sky-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}}};function 
605Gr(e){if(!0===e||!1===e)return!0;if(!Array.isArray(e)||0===e.length)return!1;switch(e[0]){case"has":return e.length>=2&&"$id"!==e[1]&&"$type"!==e[1];case"in":return e.length>=3&&("string"!=typeof e[1]||Array.isArray(e[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return 3!==e.length||Array.isArray(e[1])||Array.isArray(e[2]);case"any":case"all":for(var t=0,r=e.slice(1);t<r.length;t+=1){var n=r[t];if(!Gr(n)&&"boolean"!=typeof n)return!1}return!0;default:return!0}}function Vr(e,t){if(void 0===t&&(t="fill"),null==e)return{filter:function(){return!0},needGeometry:!1,needFeature:!1};Gr(e)||(e=Qr(e));var r=e,n=!0;try{n=Wr(r)}catch(Ta){console.warn("Failed to extract static filter. Filter will continue working, but at higher memory usage and slower framerate.\nThis is most likely a bug, please report this via https://github.com/mapbox/mapbox-gl-js/issues/new?assignees=&labels=&template=Bug_report.md\nand paste the contents of this message in the report.\nThank you!\nFilter Expression:\n"+JSON.stringify(r,null,2)+"\n        ")}var a=Ur["filter_"+t],i=Ar(n,a),o=null;if("error"===i.result)throw new Error(i.value.map(function(e){return e.key+": "+e.message}).join(", "));o=function(e,t,r){return i.value.evaluate(e,t,{},r)};var s=null,u=null;if(n!==r){var l=Ar(r,a);if("error"===l.result)throw new Error(l.value.map(function(e){return e.key+": "+e.message}).join(", "));s=function(e,t,r,n,a){return l.value.evaluate(e,t,{},r,void 0,void 0,n,a)},u=!at(l.value.expression)}return{filter:o=o,dynamicFilter:s||void 0,needGeometry:Kr(n),needFeature:!!u}}function Wr(e){if(!$r(e))return e;var t=Rr(e);return Jr(t),t=Zr(t)}function Zr(e){if(!Array.isArray(e))return e;var t=Hr(e);return!0===t?t:t.map(function(e){return Zr(e)})}function Jr(e){var t=!1,r=[];if("case"===e[0]){for(var n=1;n<e.length-1;n+=2)t=t||$r(e[n]),r.push(e[n+1]);r.push(e[e.length-1])}else if("match"===e[0]){t=t||$r(e[1]);for(var a=2;a<e.length-1;a+=2)r.push(e[a+1]);r.push(e[e.length-1])}else if("step"===e[0]){t=t||$r(e[1]);for(var i=1;i<e.length-1;i+=2)r.push(e[i+1])}t&&(e.length=0,e.push.apply(e,["any"].concat(r)));for(var o=1;o<e.length;o++)Jr(e[o])}function $r(e){if(!Array.isArray(e))return!1;if(Br(e[0]))return!0;for(var t=1;t<e.length;t++){if($r(e[t]))return!0}return!1}function Br(e){return"pitch"===e||"distance-from-center"===e}var Xr=new Set(["in","==","!=",">",">=","<","<=","to-boolean"]);function Hr(e){if(Xr.has(e[0]))for(var t=1;t<e.length;t++){if($r(e[t]))return!0}return e}function Yr(e,t){return e<t?-1:e>t?1:0}function Kr(e){if(!Array.isArray(e))return!1;if("within"===e[0])return!0;for(var t=1;t<e.length;t++)if(Kr(e[t]))return!0;return!1}function Qr(e){if(!e)return!0;var t=e[0];return e.length<=1?"any"!==t:"=="===t?en(e[1],e[2],"=="):"!="===t?an(en(e[1],e[2],"==")):"<"===t||">"===t||"<="===t||">="===t?en(e[1],e[2],t):"any"===t?tn(e.slice(1)):"all"===t?["all"].concat(e.slice(1).map(Qr)):"none"===t?["all"].concat(e.slice(1).map(Qr).map(an)):"in"===t?rn(e[1],e.slice(2)):"!in"===t?an(rn(e[1],e.slice(2))):"has"===t?nn(e[1]):"!has"===t?an(nn(e[1])):"within"!==t||e}function en(e,t,r){switch(e){case"$type":return["filter-type-"+r,t];case"$id":return["filter-id-"+r,t];default:return["filter-"+r,e,t]}}function tn(e){return["any"].concat(e.map(Qr))}function rn(e,t){if(0===t.length)return!1;switch(e){case"$type":return["filter-type-in",["literal",t]];case"$id":return["filter-id-in",["literal",t]];default:return t.length>200&&!t.some(function(e){return typeof e!=typeof t[0]})?["filter-in-large",e,["literal",t.sort(Yr)]]:["filter-in-small",e,["literal",t]]}}function nn(e){switch(e){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",e]}}function an(e){return["!",e]}var on=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function sn(e,t){var r={};for(var n in e)"ref"!==n&&(r[n]=e[n]);return on.forEach(function(e){e in t&&(r[e]=t[e])}),r}function un(e){e=e.slice();for(var t=Object.create(null),r=0;r<e.length;r++)t[e[r].id]=e[r];for(var n=0;n<e.length;n++)"ref"in e[n]&&(e[n]=sn(e[n],t[e[n].ref]));return e}var ln={thin:100,hairline:100,"ultra-light":100,"extra-light":100,light:200,book:300,regular:400,normal:400,plain:400,roman:400,standard:400,medium:500,"semi-bold":600,"demi-bold":600,bold:700,heavy:800,black:800,"extra-bold":800,"ultra-black":900,"extra-black":900,"ultra-bold":900,"heavy-black":900,fat:900,poster:900},pn=" ",fn=/(italic|oblique)$/i,cn={},dn=function(e,t,r){var n=cn[e];if(!n){Array.isArray(e)||(e=[e]);for(var a=400,i="normal",o=[],s=0,u=e.length;s<u;++s){var l=e[s].split(" "),p=l[l.length-1].toLowerCase();for(var f in"normal"==p||"italic"==p||"oblique"==p?(i=p,l.pop(),p=l[l.length-1].toLowerCase()):fn.test(p)&&(p=p.replace(fn,""),i=l[l.length-1].replace(p,"")),ln){var c=l.length>1?l[l.length-2].toLowerCase():"";if(p==f||p==f.replace("-","")||c+"-"+p==f){a=ln[f],l.pop(),c&&f.startsWith(c)&&l.pop();break}}"number"==typeof p&&(a=p);var d=l.join(pn).replace("Klokantech Noto Sans","Noto Sans");-1!==d.indexOf(pn)&&(d='"'+d+'"'),o.push(d)}n=cn[e]=[i,a,o]}return n[0]+pn+n[1]+pn+t+"px"+(r?"/"+r:"")+pn+n[2]},yn="https://api.mapbox.com";function mn(e){return 0!==e.indexOf("mapbox://")?"":e.slice("mapbox://".length)}function hn(e,t,r){var n=mn(e);if(!n)return decodeURI(new URL(e,r).href);if(0!==n.indexOf("sprites/"))throw new Error("unexpected sprites url: "+e);var a=n.slice("sprites/".length);return yn+"/styles/v1/"+a+"/sprite?access_token="+t}function vn(e,t){var r=mn(e);if(!r)return decodeURI(new URL(e,location.href).href);if(0!==r.indexOf("styles/"))throw new Error("unexpected style url: "+e);var n=r.slice("styles/".length);return yn+"/styles/v1/"+n+"?&access_token="+t}function gn(e,t,r,n){var a=new URL(e,n),i=mn(e);return i?"https://{a-d}.tiles.mapbox.com/v4/"+i+"/{z}/{x}/{y}.vector.pbf?access_token="+t:t?(a.searchParams.set(r,t),decodeURI(a.href)):decodeURI(a.href)}function bn(e){return e*Math.PI/180}var xn=function(){for(var e=[],t=78271.51696402048;e.length<=24;t/=2)e.push(t);return e}();function wn(e,t){if("undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"undefined"!=typeof OffscreenCanvas)return new OffscreenCanvas(e,t);var r=document.createElement("canvas");return r.width=e,r.height=t,r}function kn(e,t){for(var r=0,n=t.length;r<n;++r){if(t[r]<e&&r+1<n){var a=t[r]/t[r+1];return r+Math.log(t[r]/e)/Math.log(a)}}return n-1}var zn={};function Sn(e,t,r){if(void 0===r&&(r={}),t in zn)return zn[t];
605var n=r.transformRequest&&r.transformRequest(t,e)||new Request(t);n.headers.get("Accept")||n.headers.set("Accept","application/json");var a=fetch(n).then(function(e){return delete zn[t],e.ok?e.json():Promise.reject(new Error("Error fetching source "+t))}).catch(function(e){return delete zn[t],Promise.reject(new Error("Error fetching source "+t))});return zn[t]=a,a}function qn(e,t){if("string"!=typeof e)return Promise.resolve(e);if(!e.trim().startsWith("{"))return Sn("Style",e=vn(e,t.accessToken),t);try{var r=JSON.parse(e);return Promise.resolve(r)}catch(qr){return Promise.reject(qr)}}var Mn={};function _n(e,t,r){void 0===r&&(r={});var n=[t,JSON.stringify(e)].toString(),a=Mn[n];if(!a||r.transformRequest){var i=e.url;if(i&&!e.tiles){var o=gn(i,r.accessToken,r.accessTokenParam||"access_token",t||location.href);a=i.startsWith("mapbox://")?Promise.resolve(Object.assign({},e,{url:void 0,tiles:o})):Sn("Source",o,r).then(function(e){for(var t=0,n=e.tiles.length;t<n;++t){var a=e.tiles[t];if(r.transformRequest){var i=r.transformRequest(o,"Source");i&&(o=i.url)}var s=gn(a,r.accessToken,r.accessTokenParam||"access_token",o);if(r.transformRequest){var u=r.transformRequest(s,"Tiles");u instanceof Request&&(s=decodeURI(u.url))}e.tiles[t]=s}return Promise.resolve(e)})}else e=Object.assign({},e,{tiles:e.tiles.map(function(e){return gn(e,r.accessToken,r.accessTokenParam||"access_token",t||location.href)})}),a=Promise.resolve(Object.assign({},e));Mn[n]=a}return a}var Tn,Cn=Array(256).join(" ");function En(e,t){if(t>=.05){for(var r="",n=e.split("\n"),a=Cn.slice(0,Math.round(t/.1)),i=0,o=n.length;i<o;++i)i>0&&(r+="\n"),r+=n[i].split("").join(a);return r}return e}function jn(){return Tn||(Tn=wn(1,1).getContext("2d")),Tn}function An(e,t){return jn().measureText(e).width+(e.length-1)*t}var In={};function Dn(e,t,r,n){if(-1!==e.indexOf("\n")){for(var a=e.split("\n"),i=[],o=0,s=a.length;o<s;++o)i.push(Dn(a[o],t,r,n));return i.join("\n")}var u=r+","+t+","+e+","+n,l=In[u];if(!l){var p=e.split(" ");if(p.length>1){var f=jn();f.font=t;for(var c=f.measureText("M").width*r,d="",y=[],m=0,h=p.length;m<h;++m){var v=p[m],g=d+(d?" ":"")+v;An(g,n)<=c?d=g:(d&&y.push(d),d=v)}d&&y.push(d);for(var b=0,x=y.length;b<x&&x>1;++b){var w=y[b];if(An(w,n)<.35*c){var k=b>0?An(y[b-1],n):1/0,z=b<x-1?An(y[b+1],n):1/0;y.splice(b,1),x-=1,k<z?(y[b-1]+=" "+w,b-=1):y[b]=w+" "+y[b]}}for(var S=0,q=y.length-1;S<q;++S){var M=y[S],_=y[S+1];if(An(M,n)>.7*c&&An(_,n)<.6*c){var T=M.split(" "),C=T.pop();An(C,n)<.2*c&&(y[S]=T.join(" "),y[S+1]=C+" "+_),q-=1}}l=y.join("\n")}else l=e;l=En(l,n),In[u]=l}return l}var Fn,On=/font-family: ?([^;]*);/,Pn=/("|')/g;function Ln(e){if(!Fn){Fn={};for(var t=document.styleSheets,r=0,n=t.length;r<n;++r){var a=t[r];try{var i=a.rules||a.cssRules;if(i)for(var o=0,s=i.length;o<s;++o){var u=i[o];if(5==u.type){var l=u.cssText.match(On);Fn[l[1].replace(Pn,"")]=!0}}}catch(Ta){}}}return e in Fn}var Nn={};function Rn(e){var t=e.toString();if(t in Nn)return Nn[t];for(var r=[],n=0,a=e.length;n<a;++n){e[n]=e[n].replace("Arial Unicode MS","Arial");var i=e[n],o=dn(i,1);(0,s.registerFont)(o);var u=o.split(" ");r.push([u.slice(3).join(" ").replace(/"/g,""),u[1],u[0]])}for(var l=0,p=r.length;l<p;++l){var f=r[l],c=f[0];if(!Ln(c)&&100!==s.checkedFonts.get(f[2]+"\n"+f[1]+" \n"+c)){var d="https://fonts.googleapis.com/css?family="+c.replace(/ /g,"+")+":"+f[1]+f[2];if(!document.querySelector('link[href="'+d+'"]')){var y=document.createElement("link");y.href=d,y.rel="stylesheet",document.head.appendChild(y)}}}return Nn[t]=e,e}var Un,Gn,Vn={Point:1,MultiPoint:1,LineString:2,MultiLineString:2,Polygon:3,MultiPolygon:3},Wn={center:[.5,.5],left:[0,.5],right:[1,.5],top:[.5,0],bottom:[.5,1],"top-left":[0,0],"top-right":[1,0],"bottom-left":[0,1],"bottom-right":[1,1]},Zn=function(e,t){var r=Fr(e,t);if("error"===r.result)throw new Error(r.value.map(function(e){return e.key+": "+e.message}).join(", "));return r.value},Jn={},$n={zoom:0};function Bn(e,t,r,n,a,i,o){var s=e.id;i||(i={},console.warn("No functionCache provided to getValue()")),i[s]||(i[s]={});var u=i[s];if(!u[r]){var l=(e[t]||Jn)[r],p=Ur[t+"_"+e.type][r];void 0===l&&(l=p.default);var f=jr(l);
605if(!f&&Cr(l)&&(l=F(l,p),f=!0),f){var c=Zn(l,p);u[r]=c.evaluate.bind(c)}else"color"==p.type&&(l=I.parse(l)),u[r]=function(){return l}}return $n.zoom=n,u[r]($n,a,o)}function Xn(e,t,r,n){return Bn(e,"layout","icon-allow-overlap",t,r,n)?Bn(e,"layout","icon-ignore-placement",t,r,n)?"none":"obstacle":"declutter"}function Hn(e,t,r,n,a){return a||console.warn("No filterCache provided to evaluateFilter()"),e in a||(a[e]=Vr(t).filter),$n.zoom=n,a[e]($n,r)}var Yn=!1;function Kn(e){Yn=e}function Qn(e,t){if(e){if(!Yn&&(0===e.a||0===t))return;var r=e.a;return t=void 0===t?1:t,0===r?"transparent":"rgba("+Math.round(255*e.r/r)+","+Math.round(255*e.g/r)+","+Math.round(255*e.b/r)+","+r*t+")"}return e}var ea=/\{[^{}}]*\}/g;function ta(e,t){return e.replace(ea,function(e){return t[e.slice(1,-1)]||""})}var ra=!1;function na(e){void 0===e&&(e=!1),ra=e}function aa(s,u,l,p,f,c,d){if(void 0===p&&(p=xn),void 0===f&&(f=void 0),void 0===c&&(c=void 0),void 0===d&&(d=void 0),"string"==typeof u&&(u=JSON.parse(u)),8!=u.version)throw new Error("glStyle version 8 required.");var y,m;if(c)if("undefined"!=typeof Image){var h=new Image;h.crossOrigin="anonymous",h.onload=function(){y=h,m=[h.width,h.height],s.changed(),h.onload=null},h.src=c}else if("undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope){var v=self;v.postMessage({action:"loadImage",src:c}),v.addEventListener("message",function(e){"imageLoaded"===e.data.action&&e.data.src===c&&(y=e.data.image,m=[y.width,y.height])})}for(var g,b=un(u.layers),x={},w=[],k={},z={},S={},q={},M=0,_=b.length;M<_;++M){var T=b[M],C=T.id;if("string"==typeof l&&T.source==l||-1!==l.indexOf(C)){var E=T["source-layer"];if(g){if(T.source!==g)throw new Error('Layer "'+C+'" does not use source "'+g)}else{g=T.source;var j=u.sources[g];if(!j)throw new Error('Source "'+g+'" is not defined');var A=j.type;if("vector"!==A&&"geojson"!==A)throw new Error('Source "'+g+'" is not of type "vector" or "geojson", but "'+A+'"')}var I=x[E];I||(I=[],x[E]=I),I.push({layer:T,index:M}),w.push(C)}}var D=new a.default,F=new t.default,O=[],P=function(u,l){var c=u.getProperties(),h=x[c.layer];if(h){var v=p.indexOf(l);-1==v&&(v=kn(l,p));for(var g,b=Vn[u.getGeometry().getType()],w={properties:c,type:b},M=s.get("mapbox-featurestate")[u.getId()],_=-1,T=0,C=h.length;T<C;++T){var E=h[T],j=E.layer,A=j.id,I=j.layout||Jn,P=j.paint||Jn;if(!("none"===I.visibility||"minzoom"in j&&v<j.minzoom||"maxzoom"in j&&v>=j.maxzoom)){var L=j.filter;if(!L||Hn(A,L,w,v,q)){g=j;var N=void 0,R=void 0,U=void 0,G=void 0,V=void 0,W=void 0,Z=E.index;if(3==b&&("fill"==j.type||"fill-extrusion"==j.type))if(R=Bn(j,"paint",j.type+"-opacity",v,w,S,M),j.type+"-pattern"in P){var J=Bn(j,"paint",j.type+"-pattern",v,w,S,M);if(J){var $="string"==typeof J?ta(J,c):J.toString();if(y&&f&&f[$]){(W=O[++_])&&W.getFill()&&!W.getStroke()&&!W.getText()||(W=new i.default({fill:new t.default}),O[_]=W),U=W.getFill(),W.setZIndex(Z);var B=$+"."+R,X=z[B];if(!X){var H=f[$],Y=wn(H.width,H.height),K=Y.getContext("2d");K.globalAlpha=R,K.drawImage(y,H.x,H.y,H.width,H.height,0,0,H.width,H.height),X=K.createPattern(Y,"repeat"),z[B]=X}U.setColor(X)}}}else N=Qn(Bn(j,"paint",j.type+"-color",v,w,S,M),R),j.type+"-outline-color"in P&&(V=Qn(Bn(j,"paint",j.type+"-outline-color",v,w,S,M),R)),V||(V=N),(N||V)&&((!(W=O[++_])||N&&!W.getFill
605()||!N&&W.getFill()||V&&!W.getStroke()||!V&&W.getStroke()||W.getText())&&(W=new i.default({fill:N?new t.default:void 0,stroke:V?new a.default:void 0}),O[_]=W),N&&(U=W.getFill()).setColor(N),V&&((G=W.getStroke()).setColor(V),G.setWidth(.5)),W.setZIndex(Z));if(1!=b&&"line"==j.type){N=!("line-pattern"in P)&&"line-color"in P?Qn(Bn(j,"paint","line-color",v,w,S,M),Bn(j,"paint","line-opacity",v,w,S,M)):void 0;var Q=Bn(j,"paint","line-width",v,w,S,M);N&&Q>0&&((W=O[++_])&&W.getStroke()&&!W.getFill()&&!W.getText()||(W=new i.default({stroke:new a.default}),O[_]=W),(G=W.getStroke()).setLineCap(Bn(j,"layout","line-cap",v,w,S,M)),G.setLineJoin(Bn(j,"layout","line-join",v,w,S,M)),G.setMiterLimit(Bn(j,"layout","line-miter-limit",v,w,S,M)),G.setColor(N),G.setWidth(Q),G.setLineDash(P["line-dasharray"]?Bn(j,"paint","line-dasharray",v,w,S,M).map(function(e){return e*Q}):null),W.setZIndex(Z))}var ee=!1,te=null,re=0,ne=void 0,ae=void 0,ie=void 0;if((1==b||2==b)&&"icon-image"in I){var oe=Bn(j,"layout","icon-image",v,w,S,M);if(oe){ne="string"==typeof oe?ta(oe,c):oe.toString();var se=void 0;if(y&&f&&f[ne]){var ue=Bn(j,"layout","icon-rotation-alignment",v,w,S,M);if(2==b){var le=u.getGeometry();if(le.getFlatMidpoint||le.getFlatMidpoints){var pe=le.getExtent();if(Math.sqrt(Math.max(Math.pow((pe[2]-pe[0])/l,2),Math.pow((pe[3]-pe[1])/l,2)))>150){var fe="MultiLineString"===le.getType()?le.getFlatMidpoints():le.getFlatMidpoint();if(Gn||(Un=[NaN,NaN],Gn=new n.default("Point",Un,[],{},null)),se=Gn,Un[0]=fe[0],Un[1]=fe[1],"line"===Bn(j,"layout","symbol-placement",v,w,S,M)&&"map"===ue)for(var ce=le.getStride(),de=le.getFlatCoordinates(),ye=0,me=de.length-ce;ye<me;ye+=ce){var he=de[ye],ve=de[ye+1],ge=de[ye+ce],be=de[ye+ce+1],xe=Math.min(he,ge),we=Math.min(ve,be),ke=Math.max(he,ge),ze=Math.max(ve,be);if(fe[0]>=xe&&fe[0]<=ke&&fe[1]>=we&&fe[1]<=ze){re=Math.atan2(ve-be,ge-he);break}}}}}if(2!==b||se){var Se=Bn(j,"layout","icon-size",v,w,S,M),qe=void 0!==P["icon-color"]?Bn(j,"paint","icon-color",v,w,S,M):null;if(!qe||0!==qe.a){var Me=ne+"."+Se;if(null!==qe&&(Me+="."+qe),!(ae=k[Me])){var _e=f[ne],Te=Xn(j,v,w,S);ae=new r.default({color:qe?[255*qe.r,255*qe.g,255*qe.b,qe.a]:void 0,img:y,imgSize:m,size:[_e.width,_e.height],offset:[_e.x,_e.y],rotateWithView:"map"===ue,scale:Se/_e.pixelRatio,displacement:"icon-offset"in I?Bn(j,"layout","icon-offset",v,w,S,M).map(function(e){return-e*_e.pixelRatio}):void 0,declutterMode:Te}),k[Me]=ae}}
605ae&&((W=O[++_])&&W.getImage()&&!W.getFill()&&!W.getStroke()||(W=new i.default,O[_]=W),W.setGeometry(se),ae.setRotation(re+bn(Bn(j,"layout","icon-rotate",v,w,S,M))),ae.setOpacity(Bn(j,"paint","icon-opacity",v,w,S,M)),ae.setAnchor(Wn[Bn(j,"layout","icon-anchor",v,w,S,M)]),W.setImage(ae),te=W.getText(),W.setText(void 0),W.setZIndex(Z),ee=!0,ie=!1)}else ie=!0}}}if(1==b&&"circle"===j.type){(W=O[++_])&&W.getImage()&&!W.getFill()&&!W.getStroke()||(W=new i.default,O[_]=W);var Ce="circle-radius"in P?Bn(j,"paint","circle-radius",v,w,S,M):5,Ee=Qn(Bn(j,"paint","circle-stroke-color",v,w,S,M),Bn(j,"paint","circle-stroke-opacity",v,w,S,M)),je=Qn(Bn(j,"paint","circle-color",v,w,S,M),Bn(j,"paint","circle-opacity",v,w,S,M)),Ae=Bn(j,"paint","circle-stroke-width",v,w,S,M),Ie=Ce+"."+Ee+"."+je+"."+Ae;(ae=k[Ie])||(ae=new e.default({radius:Ce,stroke:Ee&&Ae>0?new a.default({width:Ae,color:Ee}):void 0,fill:je?new t.default({color:je}):void 0,declutterMode:"none"}),k[Ie]=ae),W.setImage(ae),te=W.getText(),W.setText(void 0),W.setGeometry(void 0),W.setZIndex(Z),ee=!0}var De=void 0,Fe=void 0,Oe=void 0,Pe=void 0,Le=void 0,Ne=void 0;if("text-field"in I){Pe=Math.round(Bn(j,"layout","text-size",v,w,S,M));var Re=Bn(j,"layout","text-font",v,w,S,M);Oe=Bn(j,"layout","text-line-height",v,w,S,M),(Fe=dn(d?d(Re):Re,Pe,Oe)).includes("sans-serif")||(Fe+=",sans-serif"),Le=Bn(j,"layout","text-letter-spacing",v,w,S,M),Ne=Bn(j,"layout","text-max-width",v,w,S,M);var Ue=Bn(j,"layout","text-field",v,w,S,M);De="object"==typeof Ue&&Ue.sections?1===Ue.sections.length?Ue.toString():Ue.sections.reduce(function(e,t,r){var n=t.fontStack?t.fontStack.split(","):Re,a=dn(d?d(n):n,Pe*(t.scale||1),Oe),i=t.text;if("\n"===i)return e.push("\n",""),e;if(2!=b){for(var o=0,s=(i=Dn(i,a,Ne,Le).split("\n")).length;o<s;++o)o>0&&e.push("\n",""),e.push(i[o],a);return e}e.push(En(i,Le),a)},[]):ta(Ue,c).trim(),R=Bn(j,"paint","text-opacity",v,w,S,M)}
605if(De&&R&&!ie){ee||((W=O[++_])&&W.getText()&&!W.getFill()&&!W.getStroke()||(W=new i.default,O[_]=W),W.setImage(void 0),W.setGeometry(void 0)),W.getText()||W.setText(te||new o.default({padding:[2,2,2,2]})),te=W.getText();var Ge=I["text-transform"];"uppercase"==Ge?De=Array.isArray(De)?De.map(function(e,t){return t%2?e:e.toUpperCase()}):De.toUpperCase():"lowercase"==Ge&&(De=Array.isArray(De)?De.map(function(e,t){return t%2?e:e.toLowerCase()}):De.toLowerCase());var Ve=Array.isArray(De)?De:2==b?En(De,Le):Dn(De,Fe,Ne,Le);te.setText(Ve),te.setFont(Fe),te.setRotation(bn(Bn(j,"layout","text-rotate",v,w,S,M)));var We=Bn(j,"layout","text-anchor",v,w,S,M),Ze=ee||1==b?"point":Bn(j,"layout","symbol-placement",v,w,S,M);te.setPlacement(Ze),te.setOverflow("point"===Ze);var Je=Bn(j,"paint","text-halo-width",v,w,S,M),$e=Bn(j,"layout","text-offset",v,w,S,M),Be=Bn(j,"paint","text-translate",v,w,S,M),Xe=0,He=0;if("point"==Ze){var Ye="center";-1!==We.indexOf("left")?(Ye="left",He=Je):-1!==We.indexOf("right")&&(Ye="right",He=-Je),te.setTextAlign(Ye);var Ke=Bn(j,"layout","text-rotation-alignment",v,w,S,M);te.setRotateWithView("map"==Ke)}else te.setMaxAngle(bn(Bn(j,"layout","text-max-angle",v,w,S,M))*De.length/Ve.length),te.setTextAlign(),te.setRotateWithView(!1);var Qe="middle";0==We.indexOf("bottom")?(Qe="bottom",Xe=-Je-.5*(Oe-1)*Pe):0==We.indexOf("top")&&(Qe="top",Xe=Je+.5*(Oe-1)*Pe),te.setTextBaseline(Qe),te.setOffsetX($e[0]*Pe+He+Be[0]),te.setOffsetY($e[1]*Pe+Xe+Be[1]),F.setColor(Qn(Bn(j,"paint","text-color",v,w,S,M),R)),te.setFill(F);var et=Qn(Bn(j,"paint","text-halo-color",v,w,S,M),R);if(et){D.setColor(et),Je*=2;var tt=.5*Pe;D.setWidth(Je<=tt?Je:tt),te.setStroke(D)}else te.setStroke(void 0);var rt=Bn(j,"layout","text-padding",v,w,S,M),nt=te.getPadding();rt!==nt[0]&&(nt[0]=rt,nt[1]=rt,nt[2]=rt,nt[3]=rt),W.setZIndex(Z)}}}}return _>-1?(O.length=_+1,ra&&("function"==typeof u.set?u.set("mapbox-layer",g):u.getProperties()["mapbox-layer"]=g),O):void 0}};return s.setStyle(P),s.set("mapbox-source",g),s.set("mapbox-layers",w),s.set("mapbox-featurestate",{}),P}function ia(e,t){t.accessToken||(t=Object.assign({},t),new URL(e).searchParams.forEach(function(e,r){t.accessToken=e,t.accessTokenParam=r}));return t}function oa(e,t,r,n,a){var i,o,s;return void 0===r&&(r=""),void 0===n&&(n={}),void 0===a&&(a=void 0),"string"==typeof n?(i=n,s={}):(i=n.styleUrl,s=n),a||(a=s.resolutions),i||"string"!=typeof t||t.trim().startsWith("{")||(i=t),i&&(i=i.startsWith("data:")?location.href:vn(i,s.accessToken),s=ia(i,s)),new Promise(function(n,u){qn(t,s).then(function(t){if(8!=t.version)return u(new Error("glStyle version 8 required."));if(!(e instanceof y.default||e instanceof h.default))return u(new Error("Can only apply to VectorLayer or VectorTileLayer"));var l,p,f,c=e instanceof h.default?"vector":"geojson";if(r?o=Array.isArray(r)?t.layers.find(function(e){return e.id===r[0]}).source:r:(o=Object.keys(t.sources).find(function(e){return t.sources[e].type===c}),r=o),!o)return u(new Error("No "+c+" source found in the glStyle."));function d(){if(e instanceof h.default)return da(t.sources[o],i,s).then(function(t){var r=e.getSource();if(r?t!==r&&(r.setTileUrlFunction(t.getTileUrlFunction()),r.format_||(r.format_=t.format_),r.getAttributions()||r.setAttributions(t.getAttributions()),r.getTileLoadFunction()===v.defaultLoadFunction&&r.setTileLoadFunction(t.getTileLoadFunction()),(0,x.equivalent)(r.getProjection(),t.getProjection())&&(r.tileGrid=t.getTileGrid())):e.setSource(t),!isFinite(e.getMaxResolution())&&!isFinite(e.getMinZoom())){var n=e.getSource().getTileGrid();e.setMaxResolution(n.getResolution(n.getMinZoom()))}});var r=t.sources[o],n=e.getSource();n&&n.get("mapbox-source")===r||(n=va(r,i,s));var a=e.getSource();return a?n!==a&&(a.getAttributions()||a.setAttributions(n.getAttributions()),a.format_||(a.format_=n.getFormat()),a.url_=n.getUrl()):e.setSource(n),Promise.resolve()}function m(){f||t.sprite&&!l?f?(e.setStyle(f),d().then(n).catch(u)):u(new Error("Something went wrong trying to apply style.")):(f=aa(e,t,r,a,l,p,Rn),e.getStyle()?d().then(n).catch(u):u(new Error("Nothing to show for source ["+o+"]")))}
605if(t.sprite){var g=new URL(hn(t.sprite,s.accessToken,i||location.href)),b=.5==(window.devicePixelRatio>=1.5?.5:1)?"@2x":"",w=g.origin+g.pathname+b+".json"+g.search;new Promise(function(e,t){Sn("Sprite",w,s).then(e).catch(function(r){Sn("Sprite",w=g.origin+g.pathname+".json"+g.search,s).then(e).catch(t)})}).then(function(e){if(void 0===e&&u(new Error("No sprites found.")),l=e,p=g.origin+g.pathname+b+".png"+g.search,s.transformRequest){var t=s.transformRequest(p,"SpriteImage");t instanceof Request&&(p=encodeURI(t.url))}m()}).catch(function(e){u(new Error("Sprites cannot be loaded: "+w+": "+e.message))})}else m()}).catch(u)})}var sa={};function ua(e,t){var r={id:t.id,type:t.type},n={};function a(a){var i=t.layout||{},o=t.paint||{};r.paint=o;var s,u,l="function"==typeof e.getSource?e.getSource().getTileGrid().getZForResolution(a):e.getView().getZoom(),p="function"==typeof e.getTargetElement?e.getTargetElement():void 0;if(void 0!==o["background-color"]&&(s=Bn(r,"paint","background-color",l,sa,n),p&&(p.style.background=I.parse(s).toString())),void 0!==o["background-opacity"]&&(u=Bn(r,"paint","background-opacity",l,sa,n),p&&(p.style.opacity=u)),"none"!=i.visibility)return Qn(s,u);p&&(p.style.backgroundColor="",p.style.opacity="")}if("function"==typeof e.getTargetElement)e.getTargetElement()&&a(),e.on(["change:resolution","change:target"],a);else{if("function"!=typeof e.setBackground)throw new Error("Unable to apply background.");e.setBackground(a)}}function la(e,t){t.layers.some(function(t){if("background"===t.type)return ua(e,t),!0})}function pa(e,t,r){return void 0===r&&(r={}),"object"==typeof t?(la(e,t),Promise.resolve()):qn(t,r).then(function(t){la(e,t)})}function fa(e,t){var r;return e.some(function(e){if(e.id==t)return r=e.source,!0}),r}function ca(e){var t=e.bounds;if(t){var r=(0,x.fromLonLat)([t[0],t[1]]),n=(0,x.fromLonLat)([t[2],t[3]]);return[r[0],r[1],n[0],n[1]]}}function da(e,t,r){return new Promise(function(n,a){_n(e,t,r).then(function(e){var t=new c.default({tileJSON:e}),r=t.getTileJSON(),a=t.getTileGrid(),i=ca(r),o=r.minzoom||0,s=r.maxzoom||22,u={attributions:t.getAttributions(),format:new l.default,tileGrid:new f.default({origin:a.getOrigin(0),extent:i||a.getExtent(),minZoom:o,resolutions:xn.slice(0,s+1),tileSize:512})};Array.isArray(r.tiles)?u.urls=r.tiles:u.url=r.tiles,e.olSourceOptions&&Object.assign(u,e.olSourceOptions),n(new v.default(u))}).catch(a)})}function ya(e,t,r){var n=new h.default({declutter:!0,visible:!1});return da(e,t,r).then(function(t){t.set("mapbox-source",e),n.setSource(t)}).catch(function(e){n.setSource(void 0)}),n}function ma(e,t,r){var n=new d.default;return _n(e,t,r).then(function(t){var r=new c.default({transition:0,crossOrigin:"anonymous",tileJSON:t}),a=ca(t),i=r.getTileGrid(),o=e.tileSize||t.tileSize||512,s=t.minzoom||0,u=t.maxzoom||22;r.tileGrid=new f.default({origin:i.getOrigin(0),extent:a||i.getExtent(),minZoom:s,resolutions:(0,b.createXYZ)({maxZoom:u,tileSize:o}).getResolutions(),tileSize:o});var l=r.getTileUrlFunction();r.setTileUrlFunction(function(e,t,n){var a=l(e,t,n);if(-1!=a.indexOf("{bbox-epsg-3857}")){var i=r.getTileGrid().getTileCoordExtent(e);a=a.replace("{bbox-epsg-3857}",i.toString())}return a}),r.set("mapbox-source",e),n.setSource(r)}).catch(function(e){n.setSource(void 0)}),n}var ha=new u.default;function va(e,t,r){var n=e.data,a={};if("string"==typeof n){var i=gn(n,r.accessToken,r.accessTokenParam||"access_token",t||location.href);if(r.transformRequest){var o=r.transformRequest(i,"GeoJSON");o instanceof Request&&(i=encodeURI(o.url))}a.url=i}else a.features=ha.readFeatures(n,{featureProjection:(0,x.getUserProjection)()||"EPSG:3857"});var s=new m.default(Object.assign({attributions:e.attribution,format:ha},a));return s.set("mapbox-source",e),s}function ga(e,t,r){return new y.default({declutter:!0,source:va(e,t,r),visible:!1})}function ba(e,t,r,n){var a=Bn(e,"paint","raster-opacity",r.getZoom(),sa,n);t.setOpacity(a)}function xa(e,t,r,n){var a=[],i=t.getView();i.isDef()||i.getRotation()||i.getResolutions()||(i=new g.default(Object.assign(i.getProperties(),{maxResolution:xn[0]})),t.setView(i)),"center"in e&&!i.getCenter()&&i.setCenter((0,x.fromLonLat)(e.center)),"zoom"in e&&void 0===i.getZoom()&&i.setResolution(xn[0]/Math.pow(2,e.zoom)),i.getCenter()&&void 0!==i.getZoom()||i.fit(i.getProjection().getExtent(),{nearest:!0,size:t.getSize()});for(var o,s,u,l,p,f=e.layers,c=[],d=0,y=f.length;d<y;++d){var m=(o=f[d]).type;if("heatmap"==m||"hillshade"==m)throw new Error(m+" layers are not supported");if("background"==m)ua(t,o);else{if((l=o.source||fa(f,o.ref))!=u){if(c.length&&(a.push(ka(p,c,e,r,t,n)),c=[]),"vector"==(s=e.sources[l]).type)p=ya(s,r,n);else if("raster"==s.type){(p=ma(s,r,n)).setVisible(!o.layout||"none"!==o.layout.visibility);var h={};i.on("change:resolution",ba.bind(this,o,p,i,h)),ba(o,p,i,h)}else"geojson"==s.type&&(p=ga(s,r,n));u=l,p&&p.set("mapbox-source",u)}c.push(o.id)}}return a.push(ka(p,c,e,r,t,n)),t.set("mapbox-style",e),Promise.all(a)}function wa(e,t,r){var n;if(void 0===r&&(r={}),("string"==typeof e||e instanceof HTMLElement)&&(e=new p.default({target:e})),"string"==typeof t){var a=t.startsWith("data:")?location.href:vn(t,r.accessToken);r=ia(a,r),n=new Promise(function(n,i){qn(t,r).then(function(t){xa(t,e,a,r).then(function(){n(e)}).catch(i)}).catch(function(e){i(new Error("Could not load "+t+": "+e.message))})})}else n=new Promise(function(n,a){xa(t,e,!r.styleUrl||r.styleUrl.startsWith("data:")?location.href:vn(r.styleUrl,r.accessToken),r).then(function(){n(e)}).catch(a)});return n}function ka(e,t,r,n,a,i){void 0===i&&(i={});for(var o=24,s=0,u=r.layers,l=0,p=u.length;l<p;++l){var f=u[l];
605-1!==t.indexOf(f.id)&&(o=Math.min("minzoom"in f?f.minzoom:0,o),s=Math.max("maxzoom"in f?f.maxzoom:24,s))}return new Promise(function(u,l){var p=function(){var a=e.getSource();if(a&&"error"!==a.getState()){if("getTileGrid"in a){var p=a.getTileGrid();if(p){var f=p.getMinZoom();(o>0||f>0)&&e.setMaxResolution(Math.min(xn[o],p.getResolution(f))+1e-9),s<24&&e.setMinResolution(xn[s]+1e-9)}}a instanceof m.default||a instanceof v.default?oa(e,r,t,Object.assign({styleUrl:n},i)).then(function(){e.setVisible(!0),u()}).catch(l):u()}else l(new Error("Error accessing data for source "+e.get("mapbox-source")))};e.set("mapbox-layers",t),-1===a.getLayers().getArray().indexOf(e)&&a.addLayer(e),e.getSource()?p():e.once("change:source",p)})}function za(e,t){for(var r=e.getLayers().getArray(),n=0,a=r.length;n<a;++n){var i=r[n].get("mapbox-layers");if(i&&-1!==i.indexOf(t))return r[n]}}function Sa(e,t){for(var r=[],n=e.getAllLayers(),a=0,i=n.length;a<i;++a)n[a].get("mapbox-source")===t&&r.push(n[a]);return r}function qa(e,t){for(var r=e.getLayers().getArray(),n=0,a=r.length;n<a;++n){var i=r[n].getSource();if(r[n].get("mapbox-source")===t)return i}}function Ma(e,t,r){for(var n=("getLayers"in e?Sa(e,t.source):[e]),a=0,i=n.length;a<i;++a){var o=n[a].get("mapbox-featurestate");if(!o)throw new Error('Map or layer for source "'+t.source+'" not found.');r?o[t.id]=r:delete o[t.id],n[a].changed()}}function _a(e,t){for(var r=("getLayers"in e?Sa(e,t.source):[e]),n=0,a=r.length;n<a;++n){var i=r[n].get("mapbox-featurestate");if(i&&i[t.id])return i[t.id]}return null}
606},{"ol/style/Circle.js":"cdf1","ol/style/Fill.js":"AFcg","ol/style/Icon.js":"z2xv","ol/render/Feature.js":"IFOM","ol/style/Stroke.js":"TXDt","ol/style/Style.js":"he4w","ol/style/Text.js":"RPsG","ol/render/canvas.js":"iAG7","ol/format/GeoJSON.js":"qBlb","ol/format/MVT.js":"bjcz","ol/Map.js":"kYy5","ol/tilegrid/TileGrid.js":"dpZ6","ol/source/TileJSON.js":"V9RY","ol/layer/Tile.js":"BUEc","ol/layer/Vector.js":"dflx","ol/source/Vector.js":"ZS12","ol/layer/VectorTile.js":"zOJv","ol/source/VectorTile.js":"A6uo","ol/View.js":"hNqE","ol/tilegrid.js":"ExRx","ol/proj.js":"Diht"}],"VqZN":[function(require,module,exports) {
607"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=i(require("../events/Event.js")),r=i(require("../events/EventType.js")),t=i(require("../format/MVT.js")),n=i(require("../layer/VectorTile.js")),o=i(require("../source/VectorTile.js")),a=require("ol-mapbox-style");function i(e){return e&&e.__esModule?e:{default:e}}var s=function(){var e=function(r,t){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t])})(r,t)};return function(r,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=r}e(r,t),r.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}}(),u=function(e){function t(t){var n=e.call(this,r.default.ERROR)||this;return n.error=t,n}return s(t,e),t}(e.default),c=function(e){function r(r){var n=this,i=!("declutter"in r)||r.declutter,s=new o.default({state:"loading",format:new t.default});n=e.call(this,{source:s,background:r.background,declutter:i,className:r.className,opacity:r.opacity,visible:r.visible,zIndex:r.zIndex,minResolution:r.minResolution,maxResolution:r.maxResolution,minZoom:r.minZoom,maxZoom:r.maxZoom,renderOrder:r.renderOrder,renderBuffer:r.renderBuffer,renderMode:r.renderMode,map:r.map,updateWhileAnimating:r.updateWhileAnimating,updateWhileInteracting:r.updateWhileInteracting,preload:r.preload,useInterimTilesOnError:r.useInterimTilesOnError,properties:r.properties})||this,r.accessToken&&(n.accessToken=r.accessToken);var c=r.styleUrl;return(0,a.applyStyle)(n,c,r.layers||r.source,{accessToken:n.accessToken}).then(function(){s.setState("ready")}).catch(function(e){n.dispatchEvent(new u(e)),n.getSource().setState("error")}),void 0===n.getBackground()&&(0,a.applyBackground)(n,r.styleUrl,{accessToken:n.accessToken}),n}return s(r,e),r}(n.default),l=exports.default=c;
608},{"../events/Event.js":"fKNg","../events/EventType.js":"C8cu","../format/MVT.js":"bjcz","../layer/VectorTile.js":"zOJv","../source/VectorTile.js":"A6uo","ol-mapbox-style":"CreQ"}],"K7j2":[function(require,module,exports) {
609"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=r(require("./ImageBase.js")),e=r(require("./ImageState.js"));function r(t){return t&&t.__esModule?t:{default:t}}var o=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function o(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),n=function(t){function r(r,o,n,a,u){var i=this,s=void 0!==u?e.default.IDLE:e.default.LOADED;return(i=t.call(this,r,o,n,s)||this).loader_=void 0!==u?u:null,i.c
609anvas_=a,i.error_=null,i}return o(r,t),r.prototype.getError=function(){return this.error_},r.prototype.handleLoad_=function(t){t?(this.error_=t,this.state=e.default.ERROR):this.state=e.default.LOADED,this.changed()},r.prototype.load=function(){this.state==e.default.IDLE&&(this.state=e.default.LOADING,this.changed(),this.loader_(this.handleLoad_.bind(this)))},r.prototype.getImage=function(){return this.canvas_},r}(t.default),a=exports.default=n;
610},{"./ImageBase.js":"Ojbp","./ImageState.js":"Xz9x"}],"GITV":[function(require,module,exports) {
611"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=c(require("./ImageLayer.js")),t=c(require("./VectorLayer.js")),r=c(require("../../events/EventType.js")),o=c(require("../../ImageCanvas.js")),n=c(require("../../ImageState.js")),a=c(require("rbush")),i=c(require("../../ViewHint.js")),s=require("../../transform.js"),u=require("../../obj.js"),l=require("../../extent.js");function c(e){return e&&e.__esModule?e:{default:e}}var d=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),p=function(e){function c(r){var o=e.call(this,r)||this;return o.vectorRenderer_=new t.default(r),o.layerImageRatio_=r.getImageRatio(),o.coordinateToVectorPixelTransform_=(0,s.create)(),o.renderedPixelToCoordinateTransform_=null,o}return d(c,e),c.prototype.disposeInternal=function(){this.vectorRenderer_.dispose(),e.prototype.disposeInternal.call(this)},c.prototype.getFeatures=function(e){if(!this.vectorRenderer_)return new Promise(function(e){return e([])});var t=(0,s.apply)(this.coordinateToVectorPixelTransform_,(0,s.apply)(this.renderedPixelToCoordinateTransform_,e.slice()));return this.vectorRenderer_.getFeatures(t)},c.prototype.handleFontsChanged=function(){this.vectorRenderer_.handleFontsChanged()},c.prototype.prepareFrame=function(e){var t=e.pixelRatio,c=e.viewState,d=c.resolution,p=e.viewHints,f=this.vectorRenderer_,h=e.extent;1!==this.layerImageRatio_&&(h=h.slice(0),(0,l.scaleFromCenter)(h,this.layerImageRatio_));var y=(0,l.getWidth)(h)/d,_=(0,l.getHeight)(h)/d;if(!p[i.default.ANIMATING]&&!p[i.default.INTERACTING]&&!(0,l.isEmpty)(h)){f.useContainer(null,null);var v=f.context,g=e.layerStatesArray[e.layerIndex];v.globalAlpha=g.opacity;var m=(0,u.assign)({},g,{opacity:1}),T=(0,u.assign)({},e,{declutterTree:new a.default(9),extent:h,size:[y,_],viewState:(0,u.assign)({},e.viewState,{rotation:0}),layerStatesArray:[m],layerIndex:0}),x=!0,R=new o.default(h,d,t,v.canvas,function(e){f.prepareFrame(T)&&f.replayGroupChanged&&(f.clipping=!1,f.renderFrame(T,null)&&(f.renderDeclutter(T),x=!1),e())});R.addEventListener(r.default.CHANGE,function(){if(R.getState()===n.default.LOADED){this.image_=x?null:R;var e=R.getResolution(),r=R.getPixelRatio(),o=e*t/r;this.renderedResolution=o,this.coordinateToVectorPixelTransform_=(0,s.compose)(this.coordinateToVectorPixelTransform_,y/2,_/2,1/o,-1/o,0,-c.center[0],-c.center[1])}}.bind(this)),R.load()}return this.image_&&(this.renderedPixelToCoordinateTransform_=e.pixelToCoordinateTransform.slice()),!!this.image_},c.prototype.preRender=function(){},c.prototype.postRender=function(){},c.prototype.renderDeclutter=function(){},c.prototype.forEachFeatureAtCoordinate=function(t,r,o,n,a){return this.vectorRenderer_?this.vectorRenderer_.forEachFeatureAtCoordinate(t,r,o,n,a):e.prototype.forEachFeatureAtCoordinate.call(this,t,r,o,n,a)},c}(e.default),f=exports.default=p;
612},{"./ImageLayer.js":"rzNj","./VectorLayer.js":"F2e3","../../events/EventType.js":"C8cu","../../ImageCanvas.js":"K7j2","../../ImageState.js":"
612Xz9x","rbush":"XGea","../../ViewHint.js":"cuLW","../../transform.js":"P4eA","../../obj.js":"mH6q","../../extent.js":"QDir"}],"VV4h":[function(require,module,exports) {
613"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=o(require("./BaseVector.js")),e=o(require("../renderer/canvas/VectorImageLayer.js")),r=require("../obj.js");function o(t){return t&&t.__esModule?t:{default:t}}var n=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function o(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),i=function(t){function o(e){var o=this,n=e||{},i=(0,r.assign)({},n);return delete i.imageRatio,(o=t.call(this,i)||this).imageRatio_=void 0!==n.imageRatio?n.imageRatio:1,o}return n(o,t),o.prototype.getImageRatio=function(){return this.imageRatio_},o.prototype.createRenderer=function(){return new e.default(this)},o}(t.default),a=exports.default=i;
614},{"./BaseVector.js":"pskK","../renderer/canvas/VectorImageLayer.js":"GITV","../obj.js":"mH6q"}],"kAnk":[function(require,module,exports) {
615"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=function(){function t(t,e){this.name=t,this.data=e,this.texture_=null}return t.prototype.getTexture=function(t){if(!this.texture_){var e=t.createTexture();t.bindTexture(t.TEXTURE_2D,e),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.NEAREST),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,this.data.length/4,1,0,t.RGBA,t.UNSIGNED_BYTE,this.data),this.texture_=e}return this.texture_},t}(),e=exports.default=t;
616},{}],"cjIB":[function(require,module,exports) {
617"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=r(require("./Tile.js")),e=r(require("./TileState.js"));function r(t){return t&&t.__esModule?t:{default:t}}var o=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function o(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),n=function(t){function r(r){var o=this,n=e.default.IDLE;return(o=t.call(this,r.tileCoord,n,{transition:r.transition,interpolate:r.interpolate})||this).loader_=r.loader,o.data_=null,o.error_=null,o.size_=r.size||[256,256],o}return o(r,t),r.prototype.getSize=function(){return this.size_},r.prototype.getData=function(){return this.data_},r.prototype.getError=function(){return this.error_},r.prototype.load=function(){if(this.state===e.default.IDLE||this.state===e.default.ERROR){this.state=e.default.LOADING,this.changed();var t=this;this.loader_().then(function(r){t.data_=r,t.state=e.default.LOADED,t.changed()}).catch(function(r){t.error_=r,t.state=e.default.ERROR,t.changed()})}},r}(t.default),i=exports.default=n;
618}
618,{"./Tile.js":"IWZI","./TileState.js":"Xz9x"}],"uSmT":[function(require,module,exports) {
619"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=u(require("../DataTile.js")),t=u(require("../events/Target.js")),r=u(require("../events/EventType.js")),a=u(require("../ImageTile.js")),i=u(require("../reproj/Tile.js")),n=u(require("../TileState.js")),o=u(require("./Buffer.js")),s=require("../webgl.js"),l=require("../size.js");function u(e){return e&&e.__esModule?e:{default:e}}var h=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function a(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(a.prototype=r.prototype,new a)}}();function f(e,t,r){var a=r?e.LINEAR:e.NEAREST;e.bindTexture(e.TEXTURE_2D,t),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,a),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,a)}function d(e,t,r,a){f(e,t,a),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,r)}function _(e,t,r,a,i,n){var o,s,l=e.getGL();r instanceof Float32Array?(o=l.FLOAT,e.getExtension("OES_texture_float"),s=null!==e.getExtension("OES_texture_float_linear")):(o=l.UNSIGNED_BYTE,s=!0);f(l,t,n&&s);var u,h=r.byteLength/a[1],d=1;switch(h%8==0?d=8:h%4==0?d=4:h%2==0&&(d=2),i){case 1:u=l.LUMINANCE;break;case 2:u=l.LUMINANCE_ALPHA;break;case 3:u=l.RGB;break;case 4:u=l.RGBA;break;default:throw new Error("Unsupported number of bands: ".concat(i))}var _=l.getParameter(l.UNPACK_ALIGNMENT);l.pixelStorei(l.UNPACK_ALIGNMENT,d),l.texImage2D(l.TEXTURE_2D,0,u,a[0],a[1],0,u,o,r),l.pixelStorei(l.UNPACK_ALIGNMENT,_)}var c=null;function E(){var e=document.createElement("canvas");e.width=1,e.height=1,c=e.getContext("2d")}var T=function(t){function u(e){var r=t.call(this)||this;r.tile,r.textures=[],r.handleTileChange_=r.handleTileChange_.bind(r),r.renderSize_=(0,l.toSize)(e.grid.getTileSize(e.tile.tileCoord[0])),r.gutter_=e.gutter||0,r.bandCount=NaN,r.helper_=e.helper;var a=new o.default(s.ARRAY_BUFFER,s.STATIC_DRAW);return a.fromArray([0,1,1,1,1,0,0,0]),r.helper_.flushBufferData(a),r.coords=a,r.setTile(e.tile),r}return h(u,t),u.prototype.setTile=function(e){if(e!==this.tile)if(this.tile&&this.tile.removeEventListener(r.default.CHANGE,this.handleTileChange_),this.tile=e,this.textures.length=0,this.loaded=e.getState()===n.default.LOADED,this.loaded)this.uploadTile_();else{if(e instanceof a.default){var t=e.getImage();t instanceof Image&&!t.crossOrigin&&(t.crossOrigin="anonymous")}e.addEventListener(r.default.CHANGE,this.handleTileChange_)}},u.prototype.uploadTile_=function(){var e=this.helper_,t=e.getGL(),r=this.tile;if(r instanceof a.default||r instanceof i.default){var n=t.createTexture();return this.textures.push(n),this.bandCount=4,void d(t,n,r.getImage(),r.interpolate)}var o=r.getSize(),s=[o[0]+2*this.gutter_,o[1]+2*this.gutter_],l=r.getData(),u=l instanceof Float32Array,h=s[0]*s[1],f=u?Float32Array:Uint8Array,c=f.BYTES_PER_ELEMENT,E=l.byteLength/s[1];this.bandCount=Math.floor(E/c/s[0]);var T=Math.ceil(this.bandCount/4);if(1===T){n=t.createTexture();return this.textures.push(n),void _(e,n,l,s,this.bandCount,r.interpolate)}for(var g=new Array(T),p=0;p<T;++p){n=t.createTexture();this.textures.push(n);var v=p<T-1?4:this.bandCount%4;g[p]=new f(h*v)}for(var A=0,C=0,x=s[0]*this.bandCount,b=0;b<s[1];++b){for(var y=0;y<x;++y){var N=l[C+y],R=Math.floor(A/this.bandCount),D=y%this.bandCount;(L=g[p=Math.floor(D/4)])[R*(v=L.length/h)+D%4]=N,++A}C+=E/c}for(p=0;p<T;++p){var L;_(e,n=this.textures[p],L=g[p],s,v=L.length/h,r.interpolate)}},u.prototype.handleTileChange_=function(){this.tile.getState()===n.default.LOADED&&(this.loaded=!0,this.uploadTile_(),this.dispatchEvent(r.default.CHANGE))},u.prototype.disposeInternal=function(){var e=this.helper_.getGL();this.helper_.deleteBuffer(this.coords);for(var t=0;t<this.textures.length;++t)e.deleteTexture(this.textures[t]);this.tile.removeEventListener(r.default.CHANGE,this.handleTileChange_)},u.prototype.getPixelData=function(t,r){if(!this.loaded)return null;var a=this.renderSize_[0],i=this.renderSize_[1],n=this.gutter_;if(this.tile instanceof e.default){var o=this.tile.getSize(),s=o[0],l=o[1],u=s+2*n,h=l+2*n,f=n+Math.floor(s*(t/a)),d=n+Math.floor(l*(r/i)),_=this.tile.getData();if(_ instanceof DataView){var T=_.byteLength/(u*h),g=T*(d*u+f),p=_.buffer.slice(g,g+T);return new DataView(p)}var v=this.bandCount*(d*u+f);return _.slice(v,v+this.bandCount)}c||E(),c.clearRect(0,0,1,1);var A,C=this.tile.getImage(),x=C.width-2*n,b=C.height-2*n,y=n+Math.floor(x*(t/a)),N=n+Math.floor(b*(r/i));try{c.drawImage(C,y,N,1,1,0,0,1,1),A=c.getImageData(0,0,1,1).data}catch(R){return c=null,null}return A},u}(t.default),g=exports.default=T;
620},{"../DataTile.js":"cjIB","../events/Target.js":"CR4Y","../events/EventType.js":"C8cu","../ImageTile.js":"TOsW","../reproj/Tile.js":"WlOd","../TileState.js":"
620Xz9x","./Buffer.js":"zsRd","../webgl.js":"SCyv","../size.js":"TAHd"}],"colh":[function(require,module,exports) {
621"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.Uniforms=exports.Attributes=void 0;var e=g(require("../../structs/LRUCache.js")),t=g(require("../../TileRange.js")),r=g(require("../../TileState.js")),i=g(require("../../webgl/TileTexture.js")),o=g(require("../../webgl/Buffer.js")),n=g(require("./Layer.js")),a=require("../../webgl/Helper.js"),s=require("../../webgl.js"),l=require("../../transform.js"),u=require("../../extent.js"),h=require("../../vec/mat4.js"),p=require("../../tilecoord.js"),f=require("../../proj.js"),T=require("../../util.js"),c=require("../../array.js"),d=require("../../size.js");function g(e){return e&&e.__esModule?e:{default:e}}var _=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),m=exports.Uniforms={TILE_TEXTURE_ARRAY:"u_tileTextures",TILE_TRANSFORM:"u_tileTransform",TRANSITION_ALPHA:"u_transitionAlpha",DEPTH:"u_depth",TEXTURE_PIXEL_WIDTH:"u_texturePixelWidth",TEXTURE_PIXEL_HEIGHT:"u_texturePixelHeight",TEXTURE_RESOLUTION:"u_textureResolution",TEXTURE_ORIGIN_X:"u_textureOriginX",TEXTURE_ORIGIN_Y:"u_textureOriginY",RENDER_EXTENT:"u_renderExtent",RESOLUTION:"u_resolution",ZOOM:"u_zoom"},E=exports.Attributes={TEXTURE_COORD:"a_textureCoord"},v=[{name:E.TEXTURE_COORD,size:2,type:a.AttributeType.FLOAT}],x={};function R(e){return 2*(1-1/(e+1))-1}function y(e,t,r){r in e||(e[r]=[]),e[r].push(t)}function S(e,t){var r=e.layerStatesArray[e.layerIndex];r.extent&&(t=(0,u.getIntersection)(t,(0,f.fromUserExtent)(r.extent,e.viewState.projection)));var i=r.layer.getRenderSource();if(!i.getWrapX()){var o=i.getTileGridForProjection(e.viewState.projection).getExtent();o&&(t=(0,u.getIntersection)(t,o))}return t}function U(e,t){return"".concat(e.getKey(),",").concat((0,p.getKey)(t))}var O=function(n){function a(r,i){var a=n.call(this,r,{uniforms:i.uniforms})||this;a.renderComplete=!1,a.tileTransform_=(0,l.create)(),a.tempMat4_=(0,h.create)(),a.tempTileRange_=new t.default(0,0,0,0),a.tempTileCoord_=(0,p.createOrUpdate)(0,0,0),a.tempSize_=[0,0],a.program_,a.vertexShader_=i.vertexShader,a.fragmentShader_=i.fragmentShader,a.indices_=new o.default(s.ELEMENT_ARRAY_BUFFER,s.STATIC_DRAW),a.indices_.fromArray([0,1,3,1,2,3]);var u=void 0!==i.cacheSize?i.cacheSize:512;return a.tileTextureCache_=new e.default(u),a.paletteTextures_=i.paletteTextures||[],a.frameState_=null,a}return _(a,n),a.prototype.reset=function(e){n.prototype.reset.call(this,{uniforms:e.uniforms}),this.vertexShader_=e.vertexShader,this.fragmentShader_=e.fragmentShader,this.paletteTextures_=e.paletteTextures||[],this.helper&&(this.program_=this.helper.getProgram(this.fragmentShader_,this.vertexShader_))},a.prototype.afterHelperCreated=function(){this.program_=this.helper.getProgram(this.fragmentShader_,this.vertexShader_),this.helper.flushBufferData(this.indices_)},a.prototype.isDrawableTile_=function(e){var t=this.getLayer(),i=e.getState(),o=t.getUseInterimTilesOnError();return i==r.default.LOADED||i==r.default.EMPTY||i==r.default.ERROR&&!o},a.prototype.prepareFrameInternal=function(e){var t=this.getLayer().getRenderSource();return!!t&&(!(0,u.isEmpty)(S(e,e.extent))&&"ready"===t.getState())},a.prototype.enqueueTiles=function(e,t,o,n){var a=e.viewState,s=this.getLayer(),l=s.getRenderSource(),u=l.getTileGridForProjection(a.projection),h=l.getGutterForProjection(a.projection),f=(0,T.getUid)(l);f in e.wantedTiles||(e.wantedTiles[f]={});for(var c=e.wantedTiles[f],d=this.tileTextureCache_,g=Math.max(o-s.getPreload(),u.getMinZoom(),s.getMinZoom()),_=o;_>=g;--_)for(var m=u.getTileRangeForExtentAndZ(t,_,this.tempTileRange_),E=u.getResolution(_),v=m.minX;v<=m.maxX;++v)for(var x=m.minY;x<=m.maxY;++x){var R=(0,p.createOrUpdate)(_,v,x,this.tempTileCoord_),S=U(l,R),O=void 0,I=void 0;if(d.containsKey(S)&&(I=(O=d.get(S)).tile),!O||O.tile.key!==l.getKey())if(I=l.getTile(_,v,x,e.pixelRatio,a.projection),O)if(this.isDrawableTile_(I))O.setTile(I);else{var j=I.getInterimTile();O.setTile(j)}else O=new i.default({tile:I,grid:u,helper:this.helper,gutter:h}),d.set(S,O);y(n,O,_);var C=I.getKey();c[C]=!0,I.getState()===r.default.IDLE&&(e.tileQueue.isKeyQueued(C)||e.tileQueue.enqueue([I,f,u.getTileCoordCenter(R),E]))}},a.prototype.renderFrame=function(e){this.frameState_=e,this.renderComplete=!0;var t=this.helper.getGL();this.preRender(t,e);var r=e.viewState,i=this.getLayer().getRenderSource(),o=i.getTileGridForProjection(r.projection),n=i.getGutterForProjection(r.projection),a=S(e,e.extent),s=o.getZForResolution(r.resolution,i.zDirection),f={};if(e.nextExtent){var g=o.getZForResolution(r.nextResolution,i.zDirection),_=S(e,e.nextExtent);this.enqueueTiles(e,_,g,f)}this.enqueueTiles(e,a,s,f);for(var E={},y=(0,T.getUid)(this),U=e.time,O=!1,I=f[s],j=0,C=I.length;j<C;++j){var A=(k=(he=I[j]).tile).tileCoord;if(he.loaded){if(1===(Q=k.getAlpha(y,U))){k.endTransition(y);continue}O=!0,E[J=(0,p.getKey)(A)]=Q}if(this.renderComplete=!1,!this.findAltTiles_(o,A,s+1,f))for(var X=o.getMinZoom(),F=s-1;F>=X;--F){if(this.findAltTiles_(o,A,F,f))break}}this.helper.useProgram(this.program_),this.helper.prepareDraw(e,!O);for(var L=Object.keys(f).map(Number).sort(c.numberSafeCompareFunction),P=r.center[0],b=r.center[1],w=0,D=L.length;w<D;++w){var q=L[w],N=o.getResolution(q),z=(0,d.toSize)(o.getTileSize(q),this.tempSize_),M=o.getOrigin(q),G=z[0]+2*n,H=z[1]+2*n,Z=G/H,V=(P-M[
6210])/(z[0]*N),Y=(M[1]-b)/(z[1]*N),K=r.resolution/N,B=R(q),W=f[q];for(j=0,C=W.length;j<C;++j){if((he=W[j]).loaded){A=(k=he.tile).tileCoord;var k,Q,J=(0,p.getKey)(A),$=A[1],ee=A[2];(0,l.reset)(this.tileTransform_),(0,l.scale)(this.tileTransform_,2/(e.size[0]*K/G),-2/(e.size[1]*K/G)),(0,l.rotate)(this.tileTransform_,r.rotation),(0,l.scale)(this.tileTransform_,1,1/Z),(0,l.translate)(this.tileTransform_,(z[0]*($-V)-n)/G,(z[1]*(ee-Y)-n)/H),this.helper.setUniformMatrixValue(m.TILE_TRANSFORM,(0,h.fromTransform)(this.tempMat4_,this.tileTransform_)),this.helper.bindBuffer(he.coords),this.helper.bindBuffer(this.indices_),this.helper.enableAttributes(v);for(var te=0;te<he.textures.length;){var re="TEXTURE"+te,ie="".concat(m.TILE_TEXTURE_ARRAY,"[").concat(te,"]");t.activeTexture(t[re]),t.bindTexture(t.TEXTURE_2D,he.textures[te]),t.uniform1i(this.helper.getUniformLocation(ie),te),++te}for(var oe=0;oe<this.paletteTextures_.length;++oe){var ne=this.paletteTextures_[oe];t.activeTexture(t["TEXTURE"+te]);var ae=ne.getTexture(t);t.bindTexture(t.TEXTURE_2D,ae),t.uniform1i(this.helper.getUniformLocation(ne.name),te),++te}(Q=J in E?E[J]:1)<1&&(e.animate=!0),this.helper.setUniformFloatValue(m.TRANSITION_ALPHA,Q),this.helper.setUniformFloatValue(m.DEPTH,B),this.helper.setUniformFloatValue(m.TEXTURE_PIXEL_WIDTH,G),this.helper.setUniformFloatValue(m.TEXTURE_PIXEL_HEIGHT,H),this.helper.setUniformFloatValue(m.TEXTURE_RESOLUTION,N),this.helper.setUniformFloatValue(m.TEXTURE_ORIGIN_X,M[0]+$*z[0]*N-n*N),this.helper.setUniformFloatValue(m.TEXTURE_ORIGIN_Y,M[1]-ee*z[1]*N+n*N);var se=a;n>0&&(se=o.getTileCoordExtent(A),(0,u.getIntersection)(se,a,se)),this.helper.setUniformFloatVec4(m.RENDER_EXTENT,se),this.helper.setUniformFloatValue(m.RESOLUTION,r.resolution),this.helper.setUniformFloatValue(m.ZOOM,r.zoom),this.helper.drawElements(0,this.indices_.getSize())}}}this.helper.finalizeDraw(e,this.dispatchPreComposeEvent,this.dispatchPostComposeEvent);for(var le=this.helper.getCanvas(),ue=this.tileTextureCache_;ue.canExpireCache();){var he;(he=ue.pop()).dispose()}return e.postRenderFunctions.push(function(e,t){i.expireCache(t.viewState.projection,x)}),this.postRender(t,e),le},a.prototype.getData=function(e){if(!this.helper.getGL())return null;var t=this.frameState_;if(!t)return null;var r=this.getLayer(),i=(0,l.apply)(t.pixelToCoordinateTransform,e.slice()),o=t.viewState,n=r.getExtent();if(n&&!(0,u.containsCoordinate)((0,f.fromUserExtent)(n,o.projection),i))return null;var a,s,h,p=r.getSources((0,u.boundingExtent)([i]),o.resolution);for(a=p.length-1;a>=0;--a)if("ready"===(s=p[a]).getState()){if(h=s.getTileGridForProjection(o.projection),s.getWrapX())break;var T=h.getExtent();if(!T||(0,u.containsCoordinate)(T,i))break}if(a<0)return null;for(var c=this.tileTextureCache_,g=h.getZForResolution(o.resolution);g>=h.getMinZoom();--g){var _=h.getTileCoordForCoordAndZ(i,g),m=U(s,_);if(c.containsKey(m)){var E=c.get(m);if(E.loaded){var v=h.getOrigin(g),x=(0,d.toSize)(h.getTileSize(g)),R=h.getResolution(g),y=(i[0]-v[0])/R-_[1]*x[0],S=(v[1]-i[1])/R-_[2]*x[1];return E.getPixelData(y,S)}}}return null},a.prototype.findAltTiles_=function(e,t,r,i){var o=e.getTileRangeForTileCoordAndZ(t,r,this.tempTileRange_);if(!o)return!1;for(var n=!0,a=this.tileTextureCache_,s=this.getLayer().getRenderSource(),l=o.minX;l<=o.maxX;++l)for(var u=o.minY;u<=o.maxY;++u){var h=U(s,[r,l,u]),p=!1;if(a.containsKey(h)){var f=a.get(h);f.loaded&&(y(i,f,r),p=!0)}p||(n=!1)}return n},a.prototype.removeHelper=function(){if(this.helper){var e=this.tileTextureCache_;e.forEach(function(e){return e.dispose()}),e.clear()}n.prototype.removeHelper.call(this)},a.prototype.disposeInternal=function(){var e=this.helper;e&&(e.getGL().deleteProgram(this.program_),delete this.program_,e.deleteBuffer(this.indices_));n.prototype.disposeInternal.call(this),delete this.indices_,delete this.tileTextureCache_,delete this.frameState_},a}(n.default),I=exports.default=O;
622},{"../../structs/LRUCache.js":"oMDz","../../TileRange.js":"snev","../../TileState.js":"
622Xz9x","../../webgl/TileTexture.js":"uSmT","../../webgl/Buffer.js":"zsRd","./Layer.js":"nUxs","../../webgl/Helper.js":"w1WE","../../webgl.js":"SCyv","../../transform.js":"P4eA","../../extent.js":"QDir","../../vec/mat4.js":"UkOi","../../tilecoord.js":"faTr","../../proj.js":"Diht","../../util.js":"KniQ","../../array.js":"luEr","../../size.js":"TAHd"}],"xlCh":[function(require,module,exports) {
623"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ValueTypes=exports.PALETTE_TEXTURE_ARRAY=exports.Operators=void 0,exports.arrayToGlsl=f,exports.colorToGlsl=s,exports.expressionToGlsl=R,exports.getStringNumberEquivalent=g,exports.getValueType=u,exports.isTypeUnique=i,exports.numberToGlsl=l,exports.stringToGlsl=p,exports.uniformNameForVariable=x;var t=o(require("../webgl/PaletteTexture.js")),n=require("../renderer/webgl/TileLayer.js"),e=require("../color.js"),r=require("../math.js");function o(t){return t&&t.__esModule?t:{default:t}}var c=exports.ValueTypes={NUMBER:1,STRING:2,COLOR:4,BOOLEAN:8,NUMBER_ARRAY:16,ANY:31,NONE:0},a=exports.Operators={};function u(t){if("number"==typeof t)return c.NUMBER;if("boolean"==typeof t)return c.BOOLEAN;if("string"==typeof t)return(0,e.isStringColor)(t)?c.COLOR|c.STRING:c.STRING;if(!Array.isArray(t))throw new Error("Unhandled value type: ".concat(JSON.stringify(t)));var n=t;if(n.every(function(t){return"number"==typeof t}))return 3===n.length||4===n.length?c.COLOR|c.NUMBER_ARRAY:c.NUMBER_ARRAY;if("string"!=typeof n[0])throw new Error("Expected an expression operator but received: ".concat(JSON.stringify(n)));var r=a[n[0]];if(void 0===r)throw new Error("Unrecognized expression operator: ".concat(JSON.stringify(n)));return r.getReturnType(n.slice(1))}function i(t){return(0,r.log2)(t)%1==0}function l(t){var n=t.toString();return-1===n.indexOf(".")?n+".0":n}function f(t){if(t.length<2||t.length>4)throw new Error("`formatArray` can only output `vec2`, `vec3` or `vec4` arrays.");return"vec".concat(t.length,"(").concat(t.map(l).join(", "),")")}function s(t){var n=(0,e.asArray)(t).slice();return n.length<4&&n.push(1),f(n.map(function(t,n){return n<3?t/255:t}))}function g(t,n){return void 0===t.stringLiteralsMap[n]&&(t.stringLiteralsMap[n]=Object.keys(t.stringLiteralsMap).length),t.stringLiteralsMap[n]}function p(t,n){return l(g(t,n))}function R(t,n,e){if(Array.isArray(n)&&"string"==typeof n[0]){var r=a[n[0]];if(void 0===r)throw new Error("Unrecognized expression operator: ".concat(JSON.stringify(n)));return r.toGlsl(t,n.slice(1),e)}var o=u(n);if((o&c.NUMBER)>0)return l(n);if((o&c.BOOLEAN)>0)return n.toString();if((o&c.STRING)>0&&(void 0===e||e==c.STRING))return p(t,n.toString());if((o&c.COLOR)>0&&(void 0===e||e==c.COLOR))return s(n);if((o&c.NUMBER_ARRAY)>0)return f(n);throw new Error("Unexpected expression ".concat(n," (expected type ").concat(e,")"))}function y(t){if(!(u(t)&c.NUMBER))throw new Error("A numeric value was expected, got ".concat(JSON.stringify(t)," instead"))}function E(t){for(var n=0;n<t.length;n++)y(t[n])}function v(t){if(!(u(t)&c.STRING))throw new Error("A string value was expected, got ".concat(JSON.stringify(t)," instead"))}function T(t){if(!(u(t)&c.BOOLEAN))throw new Error("A boolean value was expected, got ".concat(JSON.stringify(t)," instead"))}function h(t,n){if(t.length!==n)throw new Error("Exactly ".concat(n," arguments were expected, got ").concat(t.length," instead"))}function N(t,n){if(t.length<n)throw new Error("At least ".concat(n," arguments were expected, got ").concat(t.length," instead"))}function d(t,n){if(t.length>n)throw new Error("At most ".concat(n," arguments were expected, got ").concat(t.length," instead"))}function O(t){if(t.length%2!=0)throw new Error("An even amount of arguments was expected, got ".concat(t," instead"))}function A(t){if(t.length%2==0)throw new Error("An odd amount of arguments was expected, got ".concat(t," instead"))}function w(t,n){if(!i(n))throw new Error("Could not infer only one type from the following expression: ".concat(JSON.stringify(t)))}function x(t){return"u_var_"+t}a.get={getReturnType:function(t){return c.ANY},toGlsl:function(t,n){h(n,1),v(n[0]);var e=n[0].toString();return-1===t.attributes.indexOf(e)&&t.attributes.push(e),(t.inFragmentShader?"v_":"a_")+e}},a.var={getReturnType:function(t){return c.ANY},toGlsl:function(t,n){h(n,1),v(n[0]);var e=n[0].toString();return-1===t.variables.indexOf(e)&&t.variables.push(e),x(e)}};var G=exports.PALETTE_TEXTURE_ARRAY="u_paletteTextures";a.palette={getReturnType:function(t){return c.COLOR},toGlsl:function(n,r){h(r,2),y(r[0]);var o=R(n,r[0]),c=r[1];if(!Array.isArray(c))throw new Error("The second argument of palette must be an array");for(var a=c.length,u=new Uint8Array(4*a),i=0;i<a;i++){var l=c[i],f=void 0;if("string"==typeof l)f=(0,e.fromString)(l);else{if(!Array.isArray(l))throw new Error("The second argument of palette must be an array of str
623ings or colors");var s=l.length;if(4===s)f=l;else{if(3!==s)throw new Error("Expected palette color to have 3 or 4 values, got ".concat(s));f=[l[0],l[1],l[2],1]}}var g=4*i;u[g]=f[0],u[g+1]=f[1],u[g+2]=f[2],u[g+3]=255*f[3]}n.paletteTextures||(n.paletteTextures=[]);var p="".concat(G,"[").concat(n.paletteTextures.length,"]"),E=new t.default(p,u);return n.paletteTextures.push(E),"texture2D(".concat(p,", vec2((").concat(o," + 0.5) / ").concat(a,".0, 0.5))")}};var m="getBandValue";function B(t){return{getReturnType:function(t){return c.BOOLEAN},toGlsl:function(n,e){h(e,2);for(var r=c.ANY,o=0;o<e.length;o++)r&=u(e[o]);if(r===c.NONE)throw new Error("All arguments should be of compatible type, got ".concat(JSON.stringify(e)," instead"));return r&=~c.COLOR,"(".concat(R(n,e[0],r)," ").concat(t," ").concat(R(n,e[1],r),")")}}}function U(t){return{getReturnType:function(t){return c.BOOLEAN},toGlsl:function(n,e){N(e,2);for(var r=0;r<e.length;r++)T(e[r]);var o="";return o=e.map(function(t){return R(n,t)}).join(" ".concat(t," ")),o="(".concat(o,")")}}}a.band={getReturnType:function(t){return c.NUMBER},toGlsl:function(t,e){N(e,1),d(e,3);var r=e[0];if(!(m in t.functions)){for(var o="",c=t.bandCount||1,a=0;a<c;a++){var u=Math.floor(a/4),i=a%4;i===c-1&&1===i&&(i=3);var l="".concat(n.Uniforms.TILE_TEXTURE_ARRAY,"[").concat(u,"]");o+="\n          if (band == ".concat(a+1,".0) {\n            return texture2D(").concat(l,", v_textureCoord + vec2(dx, dy))[").concat(i,"];\n          }\n        ")}t.functions[m]="\n        float getBandValue(float band, float xOffset, float yOffset) {\n          float dx = xOffset / ".concat(n.Uniforms.TEXTURE_PIXEL_WIDTH,";\n          float dy = yOffset / ").concat(n.Uniforms.TEXTURE_PIXEL_HEIGHT,";\n          ").concat(o,"\n        }\n      ")}var f=R(t,r),s=R(t,e[1]||0),g=R(t,e[2]||0);return"".concat(m,"(").concat(f,", ").concat(s,", ").concat(g,")")}},a.time={getReturnType:function(t){return c.NUMBER},toGlsl:function(t,n){return h(n,0),"u_time"}},a.zoom={getReturnType:function(t){return c.NUMBER},toGlsl:function(t,n){return h(n,0),"u_zoom"}},a.resolution={getReturnType:function(t){return c.NUMBER},toGlsl:function(t,n){return h(n,0),"u_resolution"}},a["*"]={getReturnType:function(t){return c.NUMBER},toGlsl:function(t,n){return h(n,2),E(n),"(".concat(R(t,n[0])," * ").concat(R(t,n[1]),")")}},a["/"]={getReturnType:function(t){return c.NUMBER},toGlsl:function(t,n){return h(n,2),E(n),"(".concat(R(t,n[0])," / ").concat(R(t,n[1]),")")}},a["+"]={getReturnType:function(t){return c.NUMBER},toGlsl:function(t,n){return h(n,2),E(n),"(".concat(R(t,n[0])," + ").concat(R(t,n[1]),")")}},a["-"]={getReturnType:function(t){return c.NUMBER},toGlsl:function(t,n){return h(n,2),E(n),"(".concat(R(t,n[0])," - ").concat(R(t,n[1]),")")}},a.clamp={getReturnType:function(t){return c.NUMBER},toGlsl:function(t,n){h(n,3),E(n);var e=R(t,n[1]),r=R(t,n[2]);return"clamp(".concat(R(t,n[0]),", ").concat(e,", ").concat(r,")")}},a["%"]={getReturnType:function(t){return c.NUMBER},toGlsl:function(t,n){return h(n,2),E(n),"mod(".concat(R(t,n[0]),", ").concat(R(t,n[1]),")")}},a["^"]={getReturnType:function(t){return c.NUMBER},toGlsl:function(t,n){return h(n,2),E(n),"pow(".concat(R(t,n[0]),", ").concat(R(t,n[1]),")")}},a.abs={getReturnType:function(t){return c.NUMBER},toGlsl:function(t,n){return h(n,1),E(n),"abs(".concat(R(t,n[0]),")")}},a.floor={getReturnType:function(t){return c.NUMBER},toGlsl:function(t,n){return h(n,1),E(n),"floor(".concat(R(t,n[0]),")")}},a.round={getReturnType:function(t){return c.NUMBER},toGlsl:function(t,n){return h(n,1),E(n),"floor(".concat(R(t,n[0])," + 0.5)")}},a.ceil={getReturnType:function(t){return c.NUMBER},toGlsl:function(t,n){return h(n,1),E(n),"ceil(".concat(R(t,n[0]),")")}},a.sin={getReturnType:function(t){return c.NUMBER},toGlsl:function(t,n){return h(n,1),E(n),"sin(".concat(R(t,n[0]),")")}},a.cos={getReturnType:function(t){return c.NUMBER},toGlsl:function(t,n){return h(n,1),E(n),"cos(".concat(R(t,n[0]),")")}},a.atan={getReturnType:function(t){return c.NUMBER},toGlsl:function(t,n){return N(n,1),d(n,2),E(n),2===n.length?"atan(".concat(R(t,n[0]),", ").concat(R(t,n[1]),")"):"atan(".concat(R(t,n[0]),")")}},a[">"]={getReturnType:function(t){return c.BOOLEAN},toGlsl:function(t,n){return h(n,2),E(n),"(".concat(R(t,n[0])," > ").concat(R(t,n[1]),")")}},a[">="]={getReturnType:function(t){return c.BOOLEAN},toGlsl:function(t,n){return h(n,2),E(n),"(".concat(R(t,n[0])," >= ").concat(R(t,n[1]),")")}},a["<"]={getReturnType:function(t){return c.BOOLEAN},toGlsl:function(t,n){return h(n,2),E(n),"(".concat(R(t,n[0])," < ").concat(R(t,n[1]),")")}},a["<="]={getReturnType:function(t){return c.BOOLEAN},toGlsl:function(t,n){return h(n,2),E(n),"(".concat(R(t,n[0])," <= ").concat(R(t,n[1]),")")}},a["=="]=B("=="),a["!="]=B("!="),a["!"]={getReturnType:function(t){return c.BOOLEAN},toGlsl:function(t,n){return h(n,1),T(n[0]),"(!".concat(R(t,n[0]),")")}},a.all=U("&&"),a.any=U("||"),a.between={getReturnType:function(t){return c.BOOLEAN},toGlsl:function(t,n){h(n,3),E(n);
623var e=R(t,n[1]),r=R(t,n[2]),o=R(t,n[0]);return"(".concat(o," >= ").concat(e," && ").concat(o," <= ").concat(r,")")}},a.array={getReturnType:function(t){return c.NUMBER_ARRAY},toGlsl:function(t,n){N(n,2),d(n,4),E(n);var e=n.map(function(n){return R(t,n,c.NUMBER)});return"vec".concat(n.length,"(").concat(e.join(", "),")")}},a.color={getReturnType:function(t){return c.COLOR},toGlsl:function(t,n){N(n,3),d(n,4),E(n);var e=n;3===n.length&&e.push(1);var r=n.map(function(n,e){return R(t,n,c.NUMBER)+(e<3?" / 255.0":"")});return"vec".concat(n.length,"(").concat(r.join(", "),")")}},a.interpolate={getReturnType:function(t){for(var n=c.COLOR|c.NUMBER,e=3;e<t.length;e+=2)n&=u(t[e]);return n},toGlsl:function(t,n,e){O(n),N(n,6);var r,o=n[0];switch(o[0]){case"linear":r=1;break;case"exponential":r=o[1];break;default:r=null}if(!r)throw new Error('Invalid interpolation type for "interpolate" operator, received: '.concat(JSON.stringify(o)));var u=void 0!==e?e:c.ANY,i=a.interpolate.getReturnType(n)&u;w(n,i);for(var f=R(t,n[1]),s=l(r),g="",p=2;p<n.length-2;p+=2){var y=R(t,n[p]),E=g||R(t,n[p+1],i),v=R(t,n[p+2]),T=R(t,n[p+3],i);g="mix(".concat(E,", ").concat(T,", pow(clamp((").concat(f," - ").concat(y,") / (").concat(v," - ").concat(y,"), 0.0, 1.0), ").concat(s,"))")}return g}},a.match={getReturnType:function(t){for(var n=c.ANY,e=2;e<t.length;e+=2)n&=u(t[e]);return n&=u(t[t.length-1])},toGlsl:function(t,n,e){O(n),N(n,4);var r=void 0!==e?e:c.ANY,o=a.match.getReturnType(n)&r;w(n,o);for(var u=R(t,n[0]),i=R(t,n[n.length-1],o),l=null,f=n.length-3;f>=1;f-=2){var s=R(t,n[f]),g=R(t,n[f+1],o);l="(".concat(u," == ").concat(s," ? ").concat(g," : ").concat(l||i,")")}return l}},a.case={getReturnType:function(t){for(var n=c.ANY,e=1;e<t.length;e+=2)n&=u(t[e]);return n&=u(t[t.length-1])},toGlsl:function(t,n,e){A(n),N(n,3);var r=void 0!==e?e:c.ANY,o=a.case.getReturnType(n)&r;w(n,o);for(var u=0;u<n.length-1;u+=2)T(n[u]);var i=R(t,n[n.length-1],o),l=null;for(u=n.length-3;u>=0;u-=2){var f=R(t,n[u]),s=R(t,n[u+1],o);l="(".concat(f," ? ").concat(s," : ").concat(l||i,")")}return l}};
624},{"../webgl/PaletteTexture.js":"kAnk","../renderer/webgl/TileLayer.js":"colh","../color.js":"eucy","../math.js":"B96G"}],"iRdz":[function(require,module,exports) {
625"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ShaderBuilder=void 0,exports.parseLiteralStyle=o;var t=require("../style/expressions.js"),e=exports.ShaderBuilder=function(){function t(){this.uniforms=[],this.attributes=[],this.varyings=[],this.sizeExpression="vec2(1.0)",this.rotationExpression="0.0",this.offsetExpression="vec2(0.0)",this.colorExpression="vec4(1.0)",this.texCoordExpression="vec4(0.0, 0.0, 1.0, 1.0)",this.discardExpression="false",this.rotateWithView=!1}return t.prototype.addUniform=function(t){return this.uniforms.push(t),this},t.prototype.addAttribute=function(t){return this.attributes.push(t),this},t.prototype.addVarying=function(t,e,o){return this.varyings.push({name:t,type:e,expression:o}),this},t.prototype.setSizeExpression=function(t){return this.sizeExpression=t,this},t.prototype.setRotationExpression=function(t){return this.rotationExpression=t,this},t.prototype.setSymbolOffsetExpression=function(t){return this.offsetExpression=t,this},t.prototype.setColorExpression=function(t){return this.colorExpression=t,this},t.prototype.setTextureCoordinateExpression=function(t){return this.texCoordExpression=t,this},t.prototype.setFragmentDiscardExpression=function(t){return this.discardExpression=t,this},t.prototype.setSymbolRotateWithView=function(t){return this.rotateWithView=t,this},t.prototype.getSizeExpression=function(){return this.sizeExpression},t.prototype.getOffsetExpression=function(){return this.offsetExpression},t.prototype.getColorExpression=function(){return this.colorExpression},t.prototype.getTextureCoordinateExpression=function(){return this.texCoordExpression},t.prototype.getFragmentDiscardExpression=function(){return this.discardExpression},t.prototype.getSymbolVertexShader=function(t){var e=this.rotateWithView?"u_offsetScaleMatrix * u_offsetRotateMatrix":"u_offsetScaleMatrix",o=this.attributes,n=this.varyings;return t&&(o=o.concat("vec4 a_hitColor"),n=n.concat({name:"v_hitColor",type:"vec4",expression:"a_hitColor"})),"precision mediump float;\nuniform mat4 u_projectionMatrix;\nuniform mat4 u_offsetScaleMatrix;\nuniform mat4 u_offsetRotateMatrix;\nuniform float u_time;\nuniform float u_zoom;\nuniform float u_resolution;\n".concat(this.uniforms.map(function(t){return"uniform "+t+";"}).join("\n"),"\nattribute vec2 a_position;\nattribute float a_index;\n").concat(o.map(function(t){return"attribute "+t+";"}).join("\n"),"\nvarying vec2 v_texCoord;\nvarying vec2 v_quadCoord;\n").concat(n.map(function(t){return"varying "+t.type+" "+t.name+";"}
625).join("\n"),"\nvoid main(void) {\n  mat4 offsetMatrix = ").concat(e,";\n  vec2 halfSize = ").concat(this.sizeExpression," * 0.5;\n  vec2 offset = ").concat(this.offsetExpression,";\n  float angle = ").concat(this.rotationExpression,";\n  float offsetX;\n  float offsetY;\n  if (a_index == 0.0) {\n    offsetX = (offset.x - halfSize.x) * cos(angle) + (offset.y - halfSize.y) * sin(angle);\n    offsetY = (offset.y - halfSize.y) * cos(angle) - (offset.x - halfSize.x) * sin(angle);\n  } else if (a_index == 1.0) {\n    offsetX = (offset.x + halfSize.x) * cos(angle) + (offset.y - halfSize.y) * sin(angle);\n    offsetY = (offset.y - halfSize.y) * cos(angle) - (offset.x + halfSize.x) * sin(angle);\n  } else if (a_index == 2.0) {\n    offsetX = (offset.x + halfSize.x) * cos(angle) + (offset.y + halfSize.y) * sin(angle);\n    offsetY = (offset.y + halfSize.y) * cos(angle) - (offset.x + halfSize.x) * sin(angle);\n  } else {\n    offsetX = (offset.x - halfSize.x) * cos(angle) + (offset.y + halfSize.y) * sin(angle);\n    offsetY = (offset.y + halfSize.y) * cos(angle) - (offset.x - halfSize.x) * sin(angle);\n  }\n  vec4 offsets = offsetMatrix * vec4(offsetX, offsetY, 0.0, 0.0);\n  gl_Position = u_projectionMatrix * vec4(a_position, 0.0, 1.0) + offsets;\n  vec4 texCoord = ").concat(this.texCoordExpression,";\n  float u = a_index == 0.0 || a_index == 3.0 ? texCoord.s : texCoord.p;\n  float v = a_index == 2.0 || a_index == 3.0 ? texCoord.t : texCoord.q;\n  v_texCoord = vec2(u, v);\n  u = a_index == 0.0 || a_index == 3.0 ? 0.0 : 1.0;\n  v = a_index == 2.0 || a_index == 3.0 ? 0.0 : 1.0;\n  v_quadCoord = vec2(u, v);\n").concat(n.map(function(t){return"  "+t.name+" = "+t.expression+";"}).join("\n"),"\n}")},t.prototype.getSymbolFragmentShader=function(t){var e=t?"  if (gl_FragColor.a < 0.1) { discard; } gl_FragColor = v_hitColor;":"",o=this.varyings;return t&&(o=o.concat({name:"v_hitColor",type:"vec4",expression:"a_hitColor"})),"precision mediump float;\nuniform float u_time;\nuniform float u_zoom;\nuniform float u_resolution;\n".concat(this.uniforms.map(function(t){return"uniform "+t+";"}).join("\n"),"\nvarying vec2 v_texCoord;\nvarying vec2 v_quadCoord;\n").concat(o.map(function(t){return"varying "+t.type+" "+t.name+";"}).join("\n"),"\nvoid main(void) {\n  if (").concat(this.discardExpression,") { discard; }\n  gl_FragColor = ").concat(this.colorExpression,";\n  gl_FragColor.rgb *= gl_FragColor.a;\n").concat(e,"\n}")},t}();function o(o){var n=o.symbol,i=void 0!==n.size?n.size:1,s=n.color||"white",r=n.textureCoord||[0,0,1,1],a=n.offset||[0,0],f=void 0!==n.opacity?n.opacity:1,c=void 0!==n.rotation?n.rotation:0,u={inFragmentShader:!1,variables:[],attributes:[],stringLiteralsMap:{},functions:{}},l=(0,t.expressionToGlsl)(u,i,t.ValueTypes.NUMBER_ARRAY|t.ValueTypes.NUMBER),p=(0,t.expressionToGlsl)(u,a,t.ValueTypes.NUMBER_ARRAY),x=(0,t.expressionToGlsl)(u,r,t.ValueTypes.NUMBER_ARRAY),d=(0,t.expressionToGlsl)(u,c,t.ValueTypes.NUMBER),h={inFragmentShader:!0,variables:u.variables,attributes:[],stringLiteralsMap:u.stringLiteralsMap,functions:{}},v=(0,t.expressionToGlsl)(h,s,t.ValueTypes.COLOR),y=(0,t.expressionToGlsl)(h,f,t.ValueTypes.NUMBER),m="1.0",g="vec2(".concat((0,t.expressionToGlsl)(h,i,t.ValueTypes.NUMBER_ARRAY|t.ValueTypes.NUMBER),").x");switch(n.symbolType){case"square":case"image":break;case"circle":m="(1.0-smoothstep(1.-4./".concat(g,",1.,dot(v_quadCoord-.5,v_quadCoord-.5)*4.))");break;case"triangle":var _="(v_quadCoord*2.-1.)",E="(atan(".concat(_,".x,").concat(_,".y))");m="(1.0-smoothstep(.5-3./".concat(g,",.5,cos(floor(.5+").concat(E,"/2.094395102)*2.094395102-").concat(E,")*length(").concat(_,")))");break;default:throw new Error("Unexpected symbol type: "+n.symbolType)}var b=(new e).setSizeExpression("vec2(".concat(l,")")).setRotationExpression(d).setSymbolOffsetExpression(p).setTextureCoordinateExpression(x).setSymbolRotateWithView(!!n.rotateWithView).setColorExpression("vec4(".concat(v,".rgb, ").concat(v,".a * ").concat(y," * ").concat(m,")"));if(o.filter){var C=(0,t.expressionToGlsl)(h,o.filter,t.ValueTypes.BOOLEAN);b.setFragmentDiscardExpression("!".concat(C))}var S={};
625if(h.variables.forEach(function(e){var n=(0,t.uniformNameForVariable)(e);b.addUniform("float ".concat(n)),S[n]=function(){if(!o.variables||void 0===o.variables[e])throw new Error("The following variable is missing from the style: ".concat(e));var n=o.variables[e];return"string"==typeof n&&(n=(0,t.getStringNumberEquivalent)(u,n)),void 0!==n?n:-9999999}}),"image"===n.symbolType&&n.src){var z=new Image;z.crossOrigin=void 0===n.crossOrigin?"anonymous":n.crossOrigin,z.src=n.src,b.addUniform("sampler2D u_texture").setColorExpression(b.getColorExpression()+" * texture2D(u_texture, v_texCoord)"),S.u_texture=z}return h.attributes.forEach(function(t){-1===u.attributes.indexOf(t)&&u.attributes.push(t),b.addVarying("v_".concat(t),"float","a_".concat(t))}),u.attributes.forEach(function(t){b.addAttribute("float a_".concat(t))}),{builder:b,attributes:u.attributes.map(function(e){return{name:e,callback:function(o,n){var i=n[e];return"string"==typeof i&&(i=(0,t.getStringNumberEquivalent)(u,i)),void 0!==i?i:-9999999}}}),uniforms:S}}
626},{"../style/expressions.js":"xlCh"}],"sCa7":[function(require,module,exports) {
627"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=i(require("./Layer.js")),t=i(require("../renderer/webgl/PointsLayer.js")),r=require("../obj.js"),s=require("../webgl/ShaderBuilder.js");function i(e){return e&&e.__esModule?e:{default:e}}var a=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function s(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(s.prototype=r.prototype,new s)}}(),n=function(e){function i(t){var i=this,a=(0,r.assign)({},t);return(i=e.call(this,a)||this).parseResult_=(0,s.parseLiteralStyle)(t.style),i.styleVariables_=t.style.variables||{},i.hitDetectionDisabled_=!!t.disableHitDetection,i}return a(i,e),i.prototype.createRenderer=function(){return new t.default(this,{vertexShader:this.parseResult_.builder.getSymbolVertexShader(),fragmentShader:this.parseResult_.builder.getSymbolFragmentShader(),hitVertexShader:!this.hitDetectionDisabled_&&this.parseResult_.builder.getSymbolVertexShader(!0),hitFragmentShader:!this.hitDetectionDisabled_&&this.parseResult_.builder.getSymbolFragmentShader(!0),uniforms:this.parseResult_.uniforms,attributes:this.parseResult_.attributes})},i.prototype.updateStyleVariables=function(e){(0,r.assign)(this.styleVariables_,e),this.changed()},i}(e.default),o=exports.default=n;
628},{"./Layer.js":"GCgv","../renderer/webgl/PointsLayer.js":"m8cI","../obj.js":"mH6q","../webgl/ShaderBuilder.js":"iRdz"}],"LDVw":[function(require,module,exports) {
629"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=s(require("./BaseTile.js")),r=s(require("../layer/Property.js")),t=i(require("../renderer/webgl/TileLayer.js")),n=require("../style/expressions.js"),o=require("../obj.js");function a(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap,t=new WeakMap;return(a=function(e){return e?t:r})(e)}function i(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=a(r);if(t&&t.has(e))return t.get(e);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.hasOwnProperty.call(e,i)){var s=o?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(n,i,s):n[i]=e[i]}return n.default=e,t&&t.set(e,n),n}function s(e){return e&&e.__esModule?e:{default:e}}var c=function(){var e=function(r,t){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t])})(r,t)};return function(r,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=r}e(r,t),r.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}}();function u(e,r){var o="\n    attribute vec2 ".concat(t.Attributes.TEXTURE_COORD,";\n    uniform mat4 ").concat(t.Uniforms.TILE_TRANSFORM,";\n    uniform float ").concat(t.Uniforms.TEXTURE_PIXEL_WIDTH,";\n    uniform float ").concat(t.Uniforms.TEXTURE_PIXEL_HEIGHT,";\n    uniform float ").concat(t.Uniforms.TEXTURE_RESOLUTION,";\n    uniform float ").concat(t.Uniforms.TEXTURE_ORIGIN_X,";\n    uniform float ").concat(t.Uniforms.TEXTURE_ORIGIN_Y,";\n    uniform float ").concat(t.Uniforms.DEPTH,";\n\n    varying vec2 v_textureCoord;\n    varying vec2 v_mapCoord;\n\n    void main() {\n      v_textureCoord = ").concat(t.Attributes.TEXTURE_COORD,";\n      v_mapCoord = vec2(\n        ").concat(t.Uniforms.TEXTURE_ORIGIN_X," + ").concat(t.Uniforms.TEXTURE_RESOLUTION," * ").concat(t.Uniforms.TEXTURE_PIXEL_WIDTH," * v_textureCoord[0],\n        ").concat(t.Uniforms.TEXTURE_ORIGIN_Y," - ").concat(t.Uniforms.TEXTURE_RESOLUTION," * ").concat(t.Uniforms.TEXTURE_PIXEL_HEIGHT," * v_textureCoord[1]\n      );\n      gl_Position = ").concat(t.Uniforms.TILE_TRANSFORM," * vec4(").concat(t.Attributes.TEXTURE_COORD,", ").concat(t.Uniforms.DEPTH,", 1.0);\n    }\n  "),a={inFragmentShader:!0,variables:[],attributes:[],stringLiteralsMap:{},functions:{},bandCount:r},i=[];if(void 0!==e.color){var s=(0,n.expressionToGlsl)(a,e.color,n.ValueTypes.COLOR);i.push("color = ".concat(s,";"))}if(void 0!==e.contrast){var c=(0,n.expressionToGlsl)(a,e.contrast,n.ValueTypes.NUMBER);i.push("color.rgb = clamp((".concat(c," + 1.0) * color.rgb - (").concat(c," / 2.0), vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0));"))}if(void 0!==e.exposure){var u=(0,n.expressionToGlsl)(a,e.exposure,n.ValueTypes.NUMBER);i.push("color.rgb = clamp((".concat(u," + 1.0) * color.rgb, vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0));"))}if(void 0!==e.saturation){var l=(0,n.expressionToGlsl)(a,e.saturation,n.ValueTypes.NUMBER);i.push("\n      float saturation = ".concat(l," + 1.0;\n      float sr = (1.0 - saturation) * 0.2126;\n      float sg = (1.0 - saturation) * 0.7152;\n      float sb = (1.0 - saturation) * 0.0722;\n      mat3 saturationMatrix = mat3(\n        sr + saturation, sr, sr,\n        sg, sg + saturation, sg,\n        sb, sb, sb + saturation\n      );\n      color.rgb = clamp(saturationMatrix * color.rgb, vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0));\n    "))}if(void 0!==e.gamma){var f=(0,n.expressionToGlsl)(a,e.gamma,n.ValueTypes.NUMBER);i.push("color.rgb = pow(color.rgb, vec3(1.0 / ".concat(f,"));"))}if(void 0!==e.brightness){var p=(0,n.expressionToGlsl)(a,e.brightness,n.ValueTypes.NUMBER);i.push("color.rgb = clamp(color.rgb + ".concat(p,", vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0));"))}var d={},_=a.variables.length;if(_>1&&!e.variables)throw new Error("Missing variables in style (expected ".concat(a.variables,")"));for(var v=function(r){var t=a.variables[r];if(!(t in e.variables))throw new Error("Missing '".concat(t,"' in style variables"));var o=(0,n.uniformNameForVariable)(t);d[o]=function(){var r=e.variables[t];return"string"==typeof r&&(r=(0,n.getStringNumberEquivalent)(a,r)),void 0!==r?r:-9999999}},T=0;T<_;++T)v(T);var E=Object.keys(d).map(function(e){return"uniform float ".concat(e,";")}),h=Math.ceil(r/4);E.push("uniform sampler2D ".concat(t.Uniforms.TILE_TEXTURE_ARRAY,"[").concat(h,"];")),a.paletteTextures&&E.push("uniform sampler2D ".concat(n.PALETTE_TEXTURE_ARRAY,"[").concat(a.paletteTextures.length,"];"));var m=Object.keys(a.functions).map(function(e){return a.functions[e]});return{vertexShader:o,fragmentShader:"\n    #ifdef GL_FRAGMENT_PRECISION_HIGH\n    precision highp float;\n    #else\n    precision mediump float;\n    #endif\n\n    varying vec2 v_textureCoord;\n    varying vec2 v_mapCoord;\n    uniform vec4 ".concat(t.Uniforms.RENDER_EXTENT,";\n    uniform float ").concat(t.Uniforms.TRANSITION_ALPHA,";\n    uniform float ").concat(t.Uniforms.TEXTURE_PIXEL_WIDTH,";\n    uniform float ").concat(t.Uniforms.TEXTURE_PIXEL_HEIGHT,";\n    uniform float ").concat(t.Uniforms.RESOLUTION,";\n    uniform float ").concat(t.Uniforms.ZOOM,";\n\n    ").concat(E.join("\n"),"\n\n    ").concat(m.join("\n"),"\n\n    void main() {\n      if (\n        v_mapCoord[0] < ").concat(t.Uniforms.RENDER_EXTENT,"[0] ||\n        v_mapCoord[1] < ").concat(t.Uniforms.RENDER_EXTENT,"[1] ||\n        v_mapCoord[0] > ").concat(t.Uniforms.RENDER_EXTENT,"[2] ||\n        v_mapCoord[1] > ").concat(t.Uniforms.RENDER_EXTENT,"[3]\n      ) {\n        discard;\n      }\n\n      vec4 color = texture2D(").concat(t.Uniforms.TILE_TEXTURE_ARRAY,"[0],  v_textureCoord);\n\n      ").concat(i.join("\n"),"\n\n      if (color.a == 0.0) {\n        discard;\n      }\n\n      gl_FragColor = color;\n      gl_FragColor.rgb *= gl_FragColor.a;\n      gl_FragColor *= ").concat(t.Uniforms.TRANSITION_ALPHA,";\n    }"),uniforms:d,paletteTextures:a.paletteTextures}}var l=function(e){function n(t){var n=this,a=t?(0,o.assign)({},t):{},i=a.style||{};delete a.style;var s=a.cacheSize;return delete a.cacheSize,(n=e.call(this,a)||this).sources_=a.sources,n.renderedSource_=null,n.renderedResolution_=NaN,n.style_=i,n.cacheSize_=s,n.styleVariables_=n.style_.variables||{},n.addChangeListener(r.default.SOURCE,n.handleSourceUpdate_),n}return c(n,e),n.prototype.getSources=function(e,r){var t=this.getSource();return this.sources_?"function"==typeof this.sources_?this.sources_(e,r):this.sources_:t?[t]:[]},n.prototype.getRenderSource=function(){return this.renderedSource_||this.get
629Source()},n.prototype.getSourceState=function(){var e=this.getRenderSource();return e?e.getState():"undefined"},n.prototype.handleSourceUpdate_=function(){this.getSource()&&this.setStyle(this.style_)},n.prototype.getSourceBandCount_=function(){var e=Number.MAX_SAFE_INTEGER,r=this.getSources([-e,-e,e,e],e);return r&&r.length&&"bandCount"in r[0]?r[0].bandCount:4},n.prototype.createRenderer=function(){var e=u(this.style_,this.getSourceBandCount_());return new t.default(this,{vertexShader:e.vertexShader,fragmentShader:e.fragmentShader,uniforms:e.uniforms,cacheSize:this.cacheSize_,paletteTextures:e.paletteTextures})},n.prototype.renderSources=function(e,r){for(var t,n=this.getRenderer(),o=0,a=r.length;o<a;++o)this.renderedSource_=r[o],n.prepareFrame(e)&&(t=n.renderFrame(e));return t},n.prototype.render=function(e,r){var t=this;this.rendered=!0;for(var n=e.viewState,o=this.getSources(e.extent,n.resolution),a=!0,i=function(e,r){var n=o[e],i=n.getState();if("loading"==i){var s=function(){"ready"==n.getState()&&(n.removeEventListener("change",s),t.changed())};n.addEventListener("change",s)}a=a&&"ready"==i},s=0,c=o.length;s<c;++s)i(s);var u=this.renderSources(e,o);if(this.getRenderer().renderComplete&&a)return this.renderedResolution_=n.resolution,u;if(this.renderedResolution_>.5*n.resolution){var l=this.getSources(e.extent,this.renderedResolution_).filter(function(e){return!o.includes(e)});if(l.length>0)return this.renderSources(e,l)}return u},n.prototype.setStyle=function(e){this.styleVariables_=e.variables||{},this.style_=e;var r=u(this.style_,this.getSourceBandCount_());this.getRenderer().reset({vertexShader:r.vertexShader,fragmentShader:r.fragmentShader,uniforms:r.uniforms,paletteTextures:r.paletteTextures}),this.changed()},n.prototype.updateStyleVariables=function(e){(0,o.assign)(this.styleVariables_,e),this.changed()},n}(e.default);l.prototype.dispose;var f=exports.default=l;
630},{"./BaseTile.js":"HTO1","../layer/Property.js":"HbeD","../renderer/webgl/TileLayer.js":"colh","../style/expressions.js":"xlCh","../obj.js":"mH6q"}],"ZVaS":[function(require,module,exports) {
631"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"Graticule",{enumerable:!0,get:function(){return e.default}}),Object.defineProperty(exports,"Group",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(exports,"Heatmap",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(exports,"Image",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(exports,"Layer",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(exports,"MapboxVector",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(exports,"Tile",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(exports,"Vector",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(exports,"VectorImage",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(exports,"VectorTile",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(exports,"WebGLPoints",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(exports,"WebGLTile",{enumerable:!0,get:function(){return p.default}});var e=b(require("./layer/Graticule.js")),r=b(require("./layer/Group.js")),t=b(require("./layer/Heatmap.js")),u=b(require("./layer/Image.js")),n=b(require("./layer/Layer.js")),o=b(require("./layer/MapboxVector.js")),a=b(require("./layer/Tile.js")),i=b(require("./layer/Vector.js")),l=b(require("./layer/VectorImage.js")),f=b(require("./layer/VectorTile.js")),c=b(require("./layer/WebGLPoints.js")),p=b(require("./layer/WebGLTile.js"));function b(e){return e&&e.__esModule?e:{default:e}}
632},{"./layer/Graticule.js":"wXs0","./layer/Group.js":"q0nK","./layer/Heatmap.js":"I4BI","./layer/Image.js":"KHBf","./layer/Layer.js":"GCgv","./layer/MapboxVector.js":"VqZN","./layer/Tile.js":"BUEc","./layer/Vector.js":"dflx","./layer/VectorImage.js":"VV4h","./layer/VectorTile.js":"zOJv","./layer/WebGLPoints.js":"sCa7","./layer/WebGLTile.js":"LDVw"}],"sr95":[function(require,module,exports) {
633var define;
634var t;!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n(require("ol/control/Control")):"function"==typeof t&&t.amd?t(["ol/control/Control"],n):(e="undefined"!=typeof globalThis?globalThis:e||self).ContextMenu=n(e.ol.control.Control)}(this,function(t){"use strict";var e=function(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}(t),n="ol-ctx-menu",i={namespace:n,container:n+"-container",separator:n+"-separator",submenu:n+"-submenu",hidden:n+"-hidden",icon:n+"-icon",zoomIn:n+"-zoom-in",zoomOut:n+"-zoom-out",unselectable:"ol-unselectable"},o=i,s="contextmenu",a={width:150,scrollAt:4,eventType:s,defaultItems:!0},r=[{text:"Zoom In",classname:i.zoomIn+" "+i.icon,callback:function(t,e){var n=e.getView();n.animate({zoom:+n.getZoom()+1,duration:700,center:t.coordinate})}},{text:"Zoom Out",classname:i.zoomOut+" "+i.icon,callback:function(t,e){var n=e.getView();n.animate({zoom:+n.getZoom()-1,duration:700,center:t.coordinate})}}];function l(t,e){if(void 0===e&&(e="Assertion failed"),!t){if("undefined"!=typeof Error)throw new Error(e);throw e}}function c(t){return/^\d+$/.test(t)}function h(t,e){return t.classList?t.classList.contains(e):m(e).test(t.className)}function p(t,e,n){void 0===e&&(e=window.document);var i=Array.prototype.slice,o=[];if(/^(#?[\w-]+|\.[\w-.]+)$/.test(t))switch(t[0]){case"#":o=[u(t.substr(1))];break;case".":o=i.call(e.getElementsByClassName(t.substr(1).replace(/\./g," ")));break;default:o=i.call(e.getElementsByTagName(t))}else o=i.call(e.querySelectorAll(t));return n?o:o[0]}function u(t){return t="#"===t[0]?t.substr(1,t.length):t,document.getElementById(t)}function d(t){var e=document.createDocumentFragment(),n=document.createElement("div");for(n.innerHTML=t;n.firstChild;)e.appendChild(n.firstChild);return e}
634function m(t){return new RegExp("(^|\\s+) "+t+" (\\s+|$)")}function f(t,e,n){t.classList?t.classList.add(e):t.className=(t.className+" "+e).trim(),n&&c(n)&&window.setTimeout(function(){return y(t,e)},n)}function y(t,e,n){t.classList?t.classList.remove(e):t.className=t.className.replace(m(e)," ").trim(),n&&c(n)&&window.setTimeout(function(){return f(t,e)},n)}var v=function(t){return this.Base=t,this.map=void 0,this.viewport=void 0,this.coordinateClicked=void 0,this.pixelClicked=void 0,this.lineHeight=0,this.items={},this.opened=!1,this.submenu={left:t.options.width-15+"px",lastLeft:""},this.eventHandler=this.handleEvent.bind(this),this.eventMapMoveHandler=this.handleMapMoveEvent.bind(this),this};v.prototype.init=function(t){this.map=t,this.viewport=t.getViewport(),this.setListeners(),this.Base.Html.createMenu(),this.lineHeight=this.getItemsLength()>0?this.Base.container.offsetHeight/this.getItemsLength():this.Base.Html.cloneAndGetLineHeight()},v.prototype.getItemsLength=function(){var t=this,e=0;return Object.keys(this.items).forEach(function(n){t.items[n].submenu||t.items[n].separator||e++}),e},v.prototype.getPixelClicked=function(){return this.pixelClicked},v.prototype.getCoordinateClicked=function(){return this.coordinateClicked},v.prototype.positionContainer=function(t){var e=this,n=this.Base.container,i=this.map.getSize(),s=i[1]-t[1],a=i[0]-t[0],r=n.offsetWidth,l=Math.round(this.lineHeight*this.getItemsLength()),c=p("li."+o.submenu+">div",n,!0);a>=r?(n.style.right="auto",n.style.left=t[0]+5+"px"):(n.style.left="auto",n.style.right="15px"),s>=l?(n.style.bottom="auto",n.style.top=t[1]-10+"px"):(n.style.top="auto",n.style.bottom=0),function t(e,n,i){if(Array.isArray(e))e.forEach(function(e){return t(e,n,i)});else for(var o=Array.isArray(n)?n:n.split(/\s+/),s=o.length;s--;)h(e,o[s])&&y(e,o[s],i)}(n,o.hidden),c.length&&(this.submenu.lastLeft=a<2*r?"-"+r+"px":this.submenu.left,c.forEach(function(t){window.innerWidth||document.documentElement.clientWidth;var n,i,o,a=window.innerHeight||document.documentElement.clientHeight,r=(i=(n=t).getBoundingClientRect(),o=document.documentElement,{left:i.left+window.pageXOffset-o.clientLeft,top:i.top+window.pageYOffset-o.clientTop,width:n.offsetWidth,height:n.offsetHeight}),l=r.height,c=s-l;c<0&&(c=l-(a-r.top),t.style.top="-"+c+"px"),t.style.left=e.submenu.lastLeft}))},v.prototype.openMenu=function(t,e){this.Base.dispatchEvent({type:"open",pixel:t,coordinate:e}),this.opened=!0,this.positionContainer(t)},v.prototype.closeMenu=function(){this.opened=!1,function t(e,n,i){if(Array.isArray(e))e.forEach(function(e){return t(e,n)});else for(var o=Array.isArray(n)?n:n.split(/\s+/),s=o.length;s--;)h(e,o[s])||f(e,o[s],i)}(this.Base.container,o.hidden),this.Base.dispatchEvent({type:"close"})},v.prototype.setListeners=function(){this.viewport.addEventListener(this.Base.options.eventType,this.eventHandler,!1),this.map.on("movestart",this.eventMapMoveHandler)},v.prototype.removeListeners=function(){this.viewport.removeEventListener(this.Base.options.eventType,this.eventHandler,!1),this.map.un("movestart",this.eventMapMoveHandler)},v.prototype.handleEvent=function(t){var e=this;this.coordinateClicked=this.map.getEventCoordinate(t),this.pixelClicked=this.map.getEventPixel(t),this.Base.dispatchEvent({type:"beforeopen",pixel:this.pixelClicked,coordinate:this.coordinateClicked}),this.Base.disabled||(this.Base.options.eventType===s&&(t.stopPropagation(),t.preventDefault()),this.openMenu(this.pixelClicked,this.coordinateClicked),t.target.addEventListener("pointerdown",{handleEvent:function(n){e.opened&&(e.closeMenu(),n.stopPropagation(),t.target.removeEventListener(n.type,this,!1))}},!1))},v.prototype.handleMapMoveEvent=function(t){this.closeMenu()},v.prototype.setItemListener=function(t,e){var n,i=this;t&&"function"==typeof this.items[e].callback&&(n=this.items[e].callback,t.addEventListener("click",function(t){t.preventDefault();var o={coordinate:i.getCoordinateClicked(),data:i.items[e].data||null};i.closeMenu(),n(o,i.map)},!1))};var g=function(t){return this.Base=t,this.Base.container=this.container=this.createContainer(!0),this};return g.prototype.createContainer=function(t){var e=document.createElement("div"),n=document.createElement("ul"),i=[o.container,o.unselectable];return t&&i.push(o.hidden),e.className=i.join(" "),e.style.width=parseInt(this.Base.options.width,10)+"px",e.appendChild(n),e},g.prototype.createMenu=function(){var t=[];if("items"in this.Base.options?t=this.Base.options.defaultItems?this.Base.options.items.concat(r):this.Base.options.items:this.Base.options.defaultItems&&(t=r),0===t.length)return!1;t.forEach(this.addMenuEntry,this)},g.prototype.addMenuEntry=function(t){var e,n=this;if(t.items&&Array.isArray(t.items)){t.classname=t.classname||"",e=o.submenu,~t.classname.indexOf(e)||(t.classname=t.classname.length?" "+o.submenu:o.submenu);var i=this.generateHtmlAndPublish(this.container,t),s=this.createContainer();s.style.left=this.Base.Internal.submenu.lastLeft||this.Base.Internal.submenu.left,i.appendChild(s),t.items.forEac
634h(function(t){n.generateHtmlAndPublish(s,t,!0)})}else this.generateHtmlAndPublish(this.container,t)},g.prototype.generateHtmlAndPublish=function(t,e,n){var i,s,a="_"+Math.random().toString(36).substr(2,9),r=!1;return"string"==typeof e&&"-"===e.trim()?(i=d('<li id="'+a+'" class="'+o.separator+'"><hr></li>'),s=[].slice.call(i.childNodes,0)[0],t.firstChild.appendChild(i),r=!0):(e.classname=e.classname||"",i=d("<span>"+e.text+"</span>"),s=document.createElement("li"),e.icon&&(""===e.classname?e.classname=o.icon:-1===e.classname.indexOf(o.icon)&&(e.classname+=" "+o.icon),s.setAttribute("style","background-image:url("+e.icon+")")),s.id=a,s.className=e.classname,s.appendChild(i),t.firstChild.appendChild(s)),this.Base.Internal.items[a]={id:a,submenu:n||0,separator:r,callback:e.callback,data:e.data||null},this.Base.Internal.setItemListener(s,a),s},g.prototype.removeMenuEntry=function(t){var e=p("#"+t,this.container.firstChild);e&&this.container.firstChild.removeChild(e),delete this.Base.Internal.items[t]},g.prototype.cloneAndGetLineHeight=function(){var t=this.container.cloneNode(),e=d("<span>Foo</span>"),n=d("<span>Foo</span>"),i=document.createElement("li"),o=document.createElement("li");i.appendChild(e),o.appendChild(n),t.appendChild(i),t.appendChild(o),this.container.parentNode.appendChild(t);var s=t.offsetHeight/2;return this.container.parentNode.removeChild(t),s},function(t){function e(e){void 0===e&&(e={}),l("object"==typeof e,"@param `opt_options` should be object type!"),this.options=function(t,e){var n={};for(var i in t)n[i]=t[i];for(var o in e)n[o]=e[o];return n}(a,e),this.disabled=!1,this.Internal=new v(this),this.Html=new g(this),t.call(this,{element:this.container})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clear=function(){Object.keys(this.Internal.items).forEach(this.Html.removeMenuEntry,this.Html)},e.prototype.close=function(){this.Internal.closeMenu()},e.prototype.enable=function(){this.disabled=!1},e.prototype.disable=function(){this.disabled=!0},e.prototype.getDefaultItems=function(){return r},e.prototype.countItems=function(){return Object.keys(this.Internal.items).length},e.prototype.extend=function(t){l(Array.isArray(t),"@param `arr` should be an Array."),t.forEach(this.push,this)},e.prototype.isOpen=function(){return this.Internal.opened},e.prototype.updatePosition=function(t){l(Array.isArray(t),"@param `pixel` should be an Array."),this.isOpen()&&this.Internal.positionContainer(t)},e.prototype.pop=function(){var t=Object.keys(this.Internal.items);this.Html.removeMenuEntry(t[t.length-1])},e.prototype.push=function(t){l(null!=t,"@param `item` must be informed."),this.Html.addMenuEntry(t)},e.prototype.shift=function(){this.Html.removeMenuEntry(Object.keys(this.Internal.items)[0])},e.prototype.setMap=function(e){t.prototype.setMap.call(this,e),e?this.Internal.init(e,this):this.Internal.removeListeners()},e}(e.default)});
635},{"ol/control/Control":"xxE2"}],"rePj":[function(require,module,exports) {
636"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ol_ext_inherits=exports.default=void 0,window.ol&&!ol.ext&&(ol.ext={});var e=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e};exports.ol_ext_inherits=e,window.ol&&(ol.inherits||(ol.inherits=e)),window.NodeList&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach),window.Element&&!Element.prototype.remove&&(Element.prototype.remove=function(){this.parentNode&&this.parentNode.removeChild(this)});var t=exports.default=e;
637},{}],"dlS6":[function(require,module,exports) {
638"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=s(require("../util/ext")),e=s(require("ol/style/RegularShape")),i=s(require("ol/style/Fill")),a=require("ol/color");function s(t){return t&&t.__esModule?t:{default:t}}var o=function(t){var a=t||{},s=0;t.stroke&&(s=t.stroke.getWidth()),e.default.call(this,{radius:a.radius+s,fill:new i.default({color:[0,0,0]}),rotation:a.rotation,displacement:a.displacement,snapToPixel:a.snapToPixel}),a.scale&&this.setScale(a.scale),this._stroke=a.stroke,this._radius=a.radius||20,this._donutratio=a.donutRatio||.5,this._type=a.type,this._offset=[a.offsetX?a.offsetX:0,a.offsetY?a.offsetY:0],this._animation="number"==typeof a.animation?{animate:!0,step:a.animation}:this._animation={animate:!1,step:1},this._max=a.max,this._data=a.data,a.colors instanceof Array?this._colors=a.colors:(this._colors=o.colors[a.colors],this._colors||(this._colors=o.colors.classic)),this.renderChart_()};(0,t.default)(o,e.default),o.colors={classic:["#ffa500","blue","red","green","cyan","magenta","yellow","#0f0"],dark:["#960","#003","#900","#060","#099","#909","#990","#090"],pale:["#fd0","#369","#f64","#3b7","#880","#b5d","#666"],pastel:["#fb4","#79c","#f66","#7d7","#acc","#fdd","#ff9","#b9b"],neon:["#ff0","#0ff","#0f0","#f0f","#f00","#00f"]},o.prototype.clone=function(){var t=new o({type:this._type,radius:this._radius,rotation:this.getRotation(),scale:this.getScale(),data:this.getData(),snapToPixel:!!this.getSnapToPixel&&this.get
638SnapToPixel(),stroke:this._stroke,colors:this._colors,offsetX:this._offset[0],offsetY:this._offset[1],animation:this._animation});return t.setScale(this.getScale()),t.setOpacity(this.getOpacity()),t},o.prototype.getData=function(){return this._data},o.prototype.setData=function(t){this._data=t,this.renderChart_()},o.prototype.getRadius=function(){return this._radius},o.prototype.setRadius=function(t,e){this._radius=t,this.donuratio_=e||this.donuratio_,this.renderChart_()},o.prototype.setAnimation=function(t){if(!1===t){if(0==this._animation.animate)return;this._animation.animate=!1}else{if(this._animation.step==t)return;this._animation.animate=!0,this._animation.step=t}this.renderChart_()},o.prototype.renderChart_=function(t){if(t){var e,i=0;this._stroke&&(e=(0,a.asString)(this._stroke.getColor()),i=this._stroke.getWidth());var s=this.getImage(t),o=s.getContext("2d");o.save(),o.setTransform(t,0,0,t,0,0),o.clearRect(0,0,s.width,s.height),o.lineJoin="round";var r,h,n=0;for(r=0;r<this._data.length;r++)n+=this._data[r];o.translate(0,0);var l=this._animation.animate?this._animation.step:1;switch(this._type){case"donut":case"pie3D":case"pie":var d,f=Math.PI*(l-1.5);for(h=s.width/2/t,o.strokeStyle=e,o.lineWidth=i,o.save(),"pie3D"==this._type&&(o.translate(0,.3*h),o.scale(1,.7),o.beginPath(),o.fillStyle="#369",o.arc(h,1.4*h,this._radius*l,0,2*Math.PI),o.fill(),o.stroke()),"donut"==this._type&&(o.save(),o.beginPath(),o.rect(0,0,2*h,2*h),o.arc(h,h,this._radius*l*this._donutratio,0,2*Math.PI),o.clip("evenodd")),r=0;r<this._data.length;r++)o.beginPath(),o.moveTo(h,h),o.fillStyle=this._colors[r%this._colors.length],d=f+2*Math.PI*this._data[r]/n*l,o.arc(h,h,this._radius*l,f,d),o.closePath(),o.fill(),o.stroke(),f=d;"donut"==this._type&&(o.restore(),o.beginPath(),o.strokeStyle=e,o.lineWidth=i,o.arc(h,h,this._radius*l*this._donutratio,Math.PI*(l-1.5),f),o.stroke()),o.restore();break;case"bar":default:var _=0;if(this._max)_=this._max;else for(r=0;r<this._data.length;r++)_<this._data[r]&&(_=this._data[r]);var c=Math.min(5,2*this._radius/this._data.length);h=s.width/2/t;var u,p=s.width/t-i,g=h-this._data.length*c/2;for(o.strokeStyle=e,o.lineWidth=i,r=0;r<this._data.length;r++){o.beginPath(),o.fillStyle=this._colors[r%this._colors.length],u=g+c;var m=this._data[r]/_*2*this._radius*l;o.rect(g,p-m,c,m),o.closePath(),o.fill(),o.stroke(),g=u}}if(o.restore(),!this.setDisplacement){var y=this.getAnchor();y[0]=h-this._offset[0],y[1]=h-this._offset[1]}}else this.getPixelRatio?(t=window.devicePixelRatio,this.renderChart_(t),this.getPixelRatio&&1!==t&&this.renderChart_(1)):this.renderChart_(1)};var r=exports.default=o;
639},{"../util/ext":"rePj","ol/style/RegularShape":"il3X","ol/style/Fill":"AFcg","ol/color":"eucy"}],"DiVX":[function(require,module,exports) {
640"use strict";function o(){var o=new Object;return o.wcagSetFontSizeReset=function(){o.wcagSetFontSizeHtml("100%"),o.wcagSetFontSize(0)},o.wcagSetContrastReset=function(){o.wcagSetContrast(0)},o.wcagSetContrast=function(o){(jQuery("body").removeClass("we-wcag-contrast-1 we-wcag-contrast-2 we-wcag-contrast-3"),void 0!==o)?((o=parseInt(o))&&jQuery("body").addClass("we-wcag-contrast-"+o),jQuery.cookie("wcagSetContrast",o,{path:"/"})):((o=void 0!==(o=jQuery.cookie("wcagSetContrast"))?(o=parseInt(o)+1)>3?0:o:1)&&jQuery("body").addClass("we-wcag-contrast-"+o),jQuery.cookie("wcagSetContrast",o,{path:"/"}))},o.wcagSetFontSize=function(o){(jQuery("body").removeClass("we-wcag-fontsize-1 we-wcag-fontsize-2 we-wcag-fontsize-3"),void 0!==o)?((o=parseInt(o))&&jQuery("body").addClass("we-wcag-fontsize-"+o),jQuery.cookie("wcagSetFontSize",o,{path:"/"})):((o=void 0!==(o=jQuery.cookie("wcagSetFontSize"))?(o=parseInt(o)+1)>3?0:o:1)&&jQuery("body").addClass("we-wcag-fontsize-"+o),jQuery.cookie("wcagSetFontSize",o,{path:"/"}))},o.wcagSetFontSizeHtml=function(o){void 0!==o&&o&&(jQuery("html").css("font-size",o),jQuery.cookie("wcagSetFontSizeHtml",o,{path:"/"}))},o.WysiwygEditor=function(o){"undefined"!=typeof tinymce&&""!=o&&tinymce.init({selector:"textarea#"+o,language:"pl",plugins:["code","autolink","link","image","lists","advlist","hr","nonbreaking","autoresize","searchreplace","wordcount","visualblocks","visualchars","fullscreen","insertdatetime","paste","table"],autoresize_max_height:500,toolbar:"insertfile und
640o redo | bold italic underline strikethrough removeformat | link image | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | styleselect fontsizeselect",fontsize_formats:"0.5em 0.6em 0.7em 0.8em 0.9em 1.0em 1.1em 1.2em 1.3em 1.4em 1.5em 1.6em 1.7em 1.8em 1.9em 2.0em 2.1em 2.2em 2.3em 2.4em 2.5em 2.6em 2.7em 2.8em 2.9em 3.0em",convert_urls:!1,relative_urls:!1,entity_encoding:"raw"})},o.Get3100FormError=function(o,a){a=a||"wystąpił błąd: #000",o&&(jQuery("#"+o+"Modal .modal-body").html(a),jQuery("#"+o+"Modal").modal("show"))},o.Get3100FormWait=function(o){o&&(jQuery("#"+o+"Modal .modal-body").html('<p class="p-0 m-0">czekaj, wysyłamy dane na serwer....</p>'),jQuery("#"+o+"Modal").modal("show"))},o.Get3100FormNext=function(o,a){o&&(jQuery("#"+o+"Modal .modal-body-message").html(a),jQuery("#"+o+"Modal").modal("show"))},o.Get3100FormModalHide=function(o){o&&jQuery("#"+o+"Modal").modal("hide")},o.Get3100FormSuccess=function(o){o&&(jQuery("#"+o+" .we-structure-div-form").addClass("d-none"),jQuery("#"+o+" .we-structure-div-info").removeClass("d-none").addClass("d-block"),setTimeout(function(){jQuery("#"+o+"Modal").modal("hide")},1e3))},o.Get1190LogIn=function(a){var e=void 0!==a.SERVICE?a.SERVICE:null,l=void 0!==a.IDDOCMOD?a.IDDOCMOD:null,d=void 0!==a.IDDOCUMENT?a.IDDOCUMENT:null,r=void 0!==a.IDMODULE?a.IDMODULE:null,n=void 0!==a.CODE?a.CODE:null;if(null==e||null==l||null==n)jQuery("#Modal"+l+" .modal-body").html('<p class="p-0 m-0">Błędne wywołanie parametrów - odśwież stronę i spróbuj ponownie.</p>'),jQuery("#Modal"+l).modal("show");else{var s=jQuery("#WEFORMUSERNAME"+l).val(),t=jQuery("#WEFORMPASSWORD"+l).val();""!=s&&""!=t?jQuery.ajax({type:"POST",url:e,data:{IDSERVICE:9050,IDMODULE:1151,IDTOOLS:800,IDDOCMOD:l,IDDOC:d,IDMOD:r,CODE:n},beforeSend:function(){jQuery("#Modal"+l+" .modal-body").html('<p class="p-0 m-0">Czekaj, pobieram token...</p>'),jQuery("#Modal"+l).modal("show")},success:function(a){if(void 0!==a.STATUS||void 0!==a.TOKEN){var u=void 0!==a.STATUS?parseInt(a.STATUS):0,i=void 0!==a.TOKEN?a.TOKEN:"";if(1==u&&i.length>0){(m=new jsSHA("SHA-512","TEXT")).update(t);var m,y=m.getHash("HEX");(m=new jsSHA("SHA-512","TEXT")).update(y+i);var p=m.getHash("HEX");jQuery.ajax({type:"POST",url:e,data:{IDSERVICE:1190,IDMODULE:1151,IDTOOLS:800,IDRUN:100,IDDOCMOD:l,IDDOC:d,IDMOD:r,TOKEN:i,CODE:n,LOGIN:s,PASSW:p},beforeSend:function(){jQuery("#Modal"+l+" .modal-body").html('<p class="p-0 m-0">Czekaj, wysyłam dane do logowania na serwer.</p>'),jQuery("#Modal"+l).modal("show")},success:function(o){if(void 0!==o.STATUS||void 0!==o.IDUSER){var a=void 0!==o.STATUS?parseInt(o.STATUS):0,e=void 0!==o.IDUSER?parseInt(o.IDUSER):0;1==a&&e>0?(jQuery("#Modal"+l+" .modal-body").html('<p class="p-0 m-0">Zalogowano do systemu.</p>'),jQuery("#Modal"+l).modal("show"),window.location.reload(!1)):(jQuery("#Modal"+l+" .modal-body").html('<p class="p-0 m-0">Podane dane do logowania są niepoprawne, konto nie istnieje, jest nieuwieżytelnione lub zablokowane.</p>'),jQuery("#Modal"+l).modal("show"))}else jQuery("#Modal"+l+" .modal-body").html('<p class="p-0 m-0">Wystąpił błąd w komunikacji z serwerem.</p>'),jQuery("#Modal"+l).modal("show")},error:function(a,e,d){var r=o.BSAjaxError(a,e,d);jQuery("#Modal"+l+" .modal-body").html('<p class="p-0 m-0">'+r+"</p>"),jQuery("#Modal"+l).modal("show")},complete:function(){},dataType:"json"})}else jQuery("#Modal"+l+" .modal-body").html('<p class="p-0 m-0">Nie udało się pobrać unikalny klucz z serwera. Proszę spróbować ponownie.</p>'),jQuery("#Modal"+l).modal("show")}else jQuery("#Modal"+l+" .modal-body").html('<p class="p-0 m-0">Wystąpił błąd w komunikacji z serwerem.</p>'),jQuery("#Modal"+l).modal("show")},error:function(a,e,d){var r=o.BSAjaxError(a,e,d);jQuery("#Modal"+l+" .modal-body").html('<p class="p-0 m-0">'+r+"</p>"),jQuery("#Modal"+l).modal("show")},complete:function(){},dataType:"json"}):(jQuery("#Modal"+l+" .modal-body").html('<p class="p-0 m-0">Proszę podać nazwę użytkownika oraz hasło przypisane do konta.</p>'),jQuery("#Modal"+l).modal("show"))}},o.Get1190LogOut=function(a){var e=void 0!==a.SERVICE?a.SERVICE:null,l=void 0!==a.IDDOCMOD?a.IDDOCMOD:null,d=void 0!==a.IDDOCUMENT?a.IDDOCUMENT:null,r=void 0!==a.IDMODULE?a.IDMODULE:null,n=void 0!==a.IDUSER?a.IDUSER:null,s=void 0!==a.CODE?a.CODE:null;
640null==e||null==l||null==n||null==s?(jQuery("#Modal"+l+" .modal-body").html('<p class="p-0 m-0">Błędne wywołanie parametrów - odśwież stronę i spróbuj ponownie.</p>'),jQuery("#Modal"+l).modal("show")):jQuery.ajax({type:"POST",url:e,data:{IDSERVICE:1190,IDMODULE:1151,IDTOOLS:800,IDRUN:200,IDDOCMOD:l,IDDOC:d,IDMOD:r,IDUSER:n,CODE:s},beforeSend:function(){jQuery("#Modal"+l+" .modal-body").html('<p class="p-0 m-0">Czekaj, wysyłam dane do wylogowania z serwera.</p>'),jQuery("#Modal"+l).modal("show")},success:function(o){void 0!==o.STATUS?1==(void 0!==o.STATUS?parseInt(o.STATUS):0)?(jQuery("#Modal"+l+" .modal-body").html('<p class="p-0 m-0">Wylogowano ...</p>'),jQuery("#Modal"+l).modal("show"),window.location.reload(!1)):(jQuery("#Modal"+l+" .modal-body").html('<p class="p-0 m-0">Nie udało się wylogować, spróbuj ponownie.</p>'),jQuery("#Modal"+l).modal("show")):(jQuery("#Modal"+l+" .modal-body").html('<p class="p-0 m-0">Wystąpił błąd w komunikacji z serwerem.</p>'),jQuery("#Modal"+l).modal("show"))},error:function(a,e,d){var r=o.BSAjaxError(a,e,d);jQuery("#Modal"+l+" .modal-body").html('<p class="p-0 m-0">'+r+"</p>"),jQuery("#Modal"+l).modal("show")},complete:function(){},dataType:"json"})},o.Get1190Registration=function(a){var e=void 0!==a.SERVICE?a.SERVICE:null,l=void 0!==a.IDDOCMOD?a.IDDOCMOD:null,d=void 0!==a.IDDOCUMENT?a.IDDOCUMENT:null,r=void 0!==a.IDMODULE?a.IDMODULE:null,n=void 0!==a.CODE?a.CODE:null;if(null==e||null==l||null==n)jQuery("#Modal"+l+" .modal-body").html('<p class="p-0 m-0">Błędne wywołanie parametrów - odśwież stronę i spróbuj ponownie.</p>'),jQuery("#Modal"+l).modal("show");else{var s=jQuery("#WEFORMUSERNAME"+l).val(),t=jQuery("#WEFORMIMIE"+l).val(),u=jQuery("#WEFORMNAZWISKO"+l).val(),i=jQuery("#WEFORMZGODA"+l).is(":checked")?1:0;!!new RegExp(/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$/).test(s)&&s.length>1&&t.length>1&&u.length>1&&1==i?jQuery.ajax({type:"POST",url:e,data:{IDSERVICE:9050,IDMODULE:1151,IDTOOLS:800,IDDOCMOD:l,IDDOC:d,IDMOD:r,CODE:n},beforeSend:function(){jQuery("#Modal"+l+" .modal-body").html('<p class="p-0 m-0">Czekaj, pobieram token...</p>'),jQuery("#Modal"+l).modal("show")},success:function(a){if(void 0!==a.STATUS||void 0!==a.TOKEN){var i=void 0!==a.STATUS?parseInt(a.STATUS):0,m=void 0!==a.TOKEN?a.TOKEN:"";1==i&&m.length>0?jQuery.ajax({type:"POST",url:e,data:{IDSERVICE:1190,IDMODULE:1151,IDTOOLS:810,IDRUN:100,IDDOCMOD:l,IDDOC:d,IDMOD:r,TOKEN:m,CODE:n,USERNAME:s,IMIE:t,NAZWISKO:u},beforeSend:function(){jQuery("#Modal"+l+" .modal-body").html('<p class="p-0 m-0">Czekaj, wysyłam dane do logowania na serwer.</p>'),jQuery("#Modal"+l).modal("show")},success:function(o){if(void 0!==o.ERROR||void 0!==o.IDUSER){var a=void 0!==o.ERROR?parseInt(o.ERROR):0,e=void 0!==o.IDUSER?parseInt(o.IDUSER):0;if(0==a&&e>0){jQuery("#WEFORMUSERNAME"+l).val(""),jQuery("#WEFORMIMIE"+l).val(""),jQuery("#WEFORMNAZWISKO"+l).val(""),jQuery("#WEFORMZGODA"+l).prop("checked",!1),jQuery("#Modal"+l+" .modal-body").html('<p class="p-0 m-0">Twoje konto zostało utworzone. Sprawdź skrzynkę pocztową podaną na etapie rejestracji (zwyczajowo poczta dochodzi do kilku minut, sprawdź czy wiadomość nie znajduje się w spamie).</p>'),jQuery("#Modal"+l).modal("show")}else 2==a?(jQuery("#Modal"+l+" .modal-body").html('<p class="p-0 m-0">Nie można utworzyć konta o podanej nazwie użytkownika - konto istnieje w systemie. Użyj procedury odzyskania / przypomnienia hasła by uzyskać dostęp do swojego konta.</p>'),jQuery("#Modal"+l).modal("show")):(jQuery("#Modal"+l+" .modal-body").html('<p class="p-0 m-0">Nie można utworzyć konta o podanej nazwie użytkownika - błąd komunikacyjny.</p>'),jQuery("#Modal"+l).modal("show"))}else jQuery("#Modal"+l+" .modal-body").html('<p class="p-0 m-0">Wystąpił błąd w komunikacji z serwerem.</p>'),jQuery("#Modal"+l).modal("show")},error:function(a,e,d){var r=o.BSAjaxError(a,e,d);jQuery("#Modal"+l+" .modal-body").html('<p class="p-0 m-0">'+r+"</p>"),jQuery("#Modal"+l).modal("show")},complete:function(){},dataType:"json"}
640):(jQuery("#Modal"+l+" .modal-body").html('<p class="p-0 m-0">Nie udało się pobrać unikalnego klucz z serwera. Proszę spróbować ponownie.</p>'),jQuery("#Modal"+l).modal("show"))}else jQuery("#Modal"+l+" .modal-body").html('<p class="p-0 m-0">Wystąpił błąd w komunikacji z serwerem.</p>'),jQuery("#Modal"+l).modal("show")},error:function(a,e,d){var r=o.BSAjaxError(a,e,d);jQuery("#Modal"+l+" .modal-body").html('<p class="p-0 m-0">'+r+"</p>"),jQuery("#Modal"+l).modal("show")},complete:function(){},dataType:"json"}):(jQuery("#Modal"+l+" .modal-body").html('<p class="p-0 m-0">Proszę podać <strong>wszystkie wymagane dane</strong> oraz zaznaczyć <strong>zgody obligatoryjne</strong>. Nie można zarejestrować nowego konta w&nbsp;przypadku brakujących danych.</p>'),jQuery("#Modal"+l).modal("show"))}},o.Get1190NewPasswordSendLink=function(a){var e=void 0!==a.SERVICE?a.SERVICE:null,l=void 0!==a.IDDOCMOD?a.IDDOCMOD:null,d=void 0!==a.IDDOCUMENT?a.IDDOCUMENT:null,r=void 0!==a.IDMODULE?a.IDMODULE:null,n=void 0!==a.CODE?a.CODE:null;if(null==e||null==l||null==n)jQuery("#Modal"+l+" .modal-body").html('<p class="p-0 m-0">Błędne wywołanie parametrów - odśwież stronę i spróbuj ponownie.</p>'),jQuery("#Modal"+l).modal("show");else{var s=jQuery("#WEFORMEMAIL"+l).val();!!new RegExp(/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$/).test(s)&&s.length>1?jQuery.ajax({type:"POST",url:e,data:{IDSERVICE:9050,IDMODULE:1151,IDTOOLS:800,IDDOCMOD:l,IDDOC:d,IDMOD:r,CODE:n},beforeSend:function(){jQuery("#Modal"+l+" .modal-body").html('<p class="p-0 m-0">Czekaj, pobieram token...</p>'),jQuery("#Modal"+l).modal("show")},success:function(a){if(void 0!==a.STATUS||void 0!==a.TOKEN){var t=void 0!==a.STATUS?parseInt(a.STATUS):0,u=void 0!==a.TOKEN?a.TOKEN:"";1==t&&u.length>0?jQuery.ajax({type:"POST",url:e,data:{IDSERVICE:1190,IDMODULE:1151,IDTOOLS:811,IDRUN:100,IDDOCMOD:l,IDDOC:d,IDMOD:r,TOKEN:u,CODE:n,EMAIL:s},beforeSend:function(){jQuery("#Modal"+l+" .modal-body").html('<p class="p-0 m-0">Czekaj, wysyłam dane na serwer.</p>'),jQuery("#Modal"+l).modal("show")},success:function(o){if(void 0!==o.ERROR||void 0!==o.IDUSER){var a=void 0!==o.ERROR?parseInt(o.ERROR):0,e=void 0!==o.IDUSER?parseInt(o.IDUSER):0;if(0==a&&e>0){jQuery("#WEFORMEMAIL"+l).val(""),jQuery("#Modal"+l+" .modal-body").html('<p class="p-0 m-0">Wysłano link pozwalający na odzyskanie hasła. Sprawdź skrzynkę pocztową podaną na etapie rejestracji (zwyczajowo poczta dochodzi do kilku minut, sprawdź czy wiadomość nie znajduje się w spamie).</p>'),jQuery("#Modal"+l).modal("show")}else 4==a?(jQuery("#Modal"+l+" .modal-body").html('<p class="p-0 m-0">Nie można wysłać linka - błędna konfiguracja modułu - brak lub usuniety template</p>'),jQuery("#Modal"+l).modal("show")):3==a?(jQuery("#Modal"+l+" .modal-body").html('<p class="p-0 m-0">Nie można wysłać linka - błędna konfiguracja modułu - brak szablonu e-mail</p>'),jQuery("#Modal"+l).modal("show")):2==a?(jQuery("#Modal"+l+" .modal-body").html('<p class="p-0 m-0">Nie można wysłać linka - brak adresu e-mail w koncie</p>'),jQuery("#Modal"+l).modal("show")):(jQuery("#Modal"+l+" .modal-body").html('<p class="p-0 m-0">Nie można wysłać linka - nie istnieje konto z podanym adresem e-mail.</p>'),jQuery("#Modal"+l).modal("show"))}else jQuery("#Modal"+l+" .modal-body").html('<p class="p-0 m-0">Wystąpił błąd w komunikacji z serwerem.</p>'),jQuery("#Modal"+l).modal("show")},error:function(a,e,d){var r=o.BSAjaxError(a,e,d);jQuery("#Modal"+l+" .modal-body").html('<p class="p-0 m-0">'+r+"</p>"),jQuery("#Modal"+l).modal("show")},complete:function(){},dataType:"json"}):(jQuery("#Modal"+l+" .modal-body").html('<p class="p-0 m-0">Nie udało się pobrać unikalnego klucz z serwera. Proszę spróbować ponownie.</p>'),jQuery("#Modal"+l).modal("show"))}else jQuery("#Modal"+l+" .modal-body").html('<p class="p-0 m-0">Wystąpił błąd w komunikacji z serwerem.</p>'),jQuery("#Modal"+l).modal("show")},error:function(a,e,d){var r=o.BSAjaxError(a,e,d);jQuery("#Modal"+l+" .modal-body").html('<p class="p-0 m-0">'+r+"</p>"),jQuery("#Modal"+l).modal("show")},complete:function(){},dataType:"json"}
640):(jQuery("#Modal"+l+" .modal-body").html('<p class="p-0 m-0">Proszę podać <strong>adres e-mail</strong> użyty podczas rejestracji konta.</p>'),jQuery("#Modal"+l).modal("show"))}},o.Get1190NewPasswordSendLinkNewPassword=function(a){var e=void 0!==a.SERVICE?a.SERVICE:null,l=void 0!==a.IDDOCMOD?a.IDDOCMOD:null,d=void 0!==a.IDDOCUMENT?a.IDDOCUMENT:null,r=void 0!==a.IDMODULE?a.IDMODULE:null,n=void 0!==a.IDUSER?a.IDUSER:null,s=void 0!==a.CODE?a.CODE:null;if(null==e||null==l||null==n||null==s)jQuery("#Modal"+l+" .modal-body").html('<p class="p-0 m-0">Błędne wywołanie parametrów - odśwież stronę i spróbuj ponownie.</p>'),jQuery("#Modal"+l).modal("show");else{var t=jQuery("#WEFORMPASSWORD1"+l).val(),u=jQuery("#WEFORMPASSWORD2"+l).val();if(!!new RegExp(/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*\W+).{8,}$/).test(t)&&t==u&&t.length>1){var i=new jsSHA("SHA-512","TEXT");i.update(t);var m=i.getHash("HEX");jQuery.ajax({type:"POST",url:e,data:{IDSERVICE:1190,IDMODULE:1151,IDTOOLS:812,IDRUN:100,IDDOCMOD:l,IDDOC:d,IDMOD:r,CODE:s,IDUSER:n,PASSWORDNEW:m},beforeSend:function(){jQuery("#Modal"+l+" .modal-body").html('<p class="p-0 m-0">Czekaj, wysyłam dane do logowania na serwer.</p>'),jQuery("#Modal"+l).modal("show")},success:function(o){if(void 0!==o.STATUS)if(1==(void 0!==o.STATUS?parseInt(o.STATUS):0)){jQuery("#WEFORMPASSWORD1"+l).val(""),jQuery("#WEFORMPASSWORD2"+l).val(""),jQuery("#Modal"+l+" .modal-body").html('<p class="p-0 m-0">Hasło do Twojego konto w Profilu Wnioskodawcy zostało zmienione - przejdź do logowania.</p>'),jQuery("#Modal"+l).modal("show")}else jQuery("#Modal"+l+" .modal-body").html('<p class="p-0 m-0">Nie można zmienić hasła do konta. Procedura mogła zostać wczesniej zakończona. Spróbuj ponownie lub skontaktuj się z Administratorem.</p>'),jQuery("#Modal"+l).modal("show");else jQuery("#Modal"+l+" .modal-body").html('<p class="p-0 m-0">Wystąpił błąd w komunikacji z serwerem.</p>'),jQuery("#Modal"+l).modal("show")},error:function(a,e,d){var r=o.BSAjaxError(a,e,d);jQuery("#Modal"+l+" .modal-body").html('<p class="p-0 m-0">'+r+"</p>"),jQuery("#Modal"+l).modal("show")},complete:function(){},dataType:"json"})}else jQuery("#Modal"+l+" .modal-body").html('<p class="p-0 m-0">Proszę wpisać hasło do konta. Identyczne hasło musi być wpisane w obu polach formularza.</p>'),jQuery("#Modal"+l).modal("show")}},o.Get1190ChangePassword=function(a){var e=void 0!==a.SERVICE?a.SERVICE:null,l=void 0!==a.IDDOCMOD?a.IDDOCMOD:null,d=void 0!==a.IDDOCUMENT?a.IDDOCUMENT:null,r=void 0!==a.IDMODULE?a.IDMODULE:null,n=void 0!==a.IDUSER?a.IDUSER:null,s=void 0!==a.CODE?a.CODE:null,t=void 0!==a.CODEUSER?a.CODEUSER:null;if(null==e||null==l||null==n||null==s||null==t)jQuery("#Modal"+l+" .modal-body").html('<p class="p-0 m-0">Błędne wywołanie parametrów - odśwież stronę i spróbuj ponownie.</p>'),jQuery("#Modal"+l).modal("show");else{var u=jQuery("#WEFORMPASSWORD"+l).val(),i=jQuery("#WEFORMPASSWORD1"+l).val(),m=jQuery("#WEFORMPASSWORD2"+l).val();!!new RegExp(/(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*\W+).{8,}/).test(i)&&u.length>1&&i.length>1&&m.length>1&&i==m?jQuery.ajax({type:"POST",url:e,data:{IDSERVICE:9050,IDMODULE:1151,IDTOOLS:800,IDDOCMOD:l,IDDOC:d,IDMOD:r,CODE:s},beforeSend:function(){jQuery("#Modal"+l+" .modal-body").html('<p class="p-0 m-0">Czekaj, pobieram token...</p>'),jQuery("#Modal"+l).modal("show")},success:function(a){if(void 0!==a.STATUS||void 0!==a.TOKEN){var s=void 0!==a.STATUS?parseInt(a.STATUS):0,m=void 0!==a.TOKEN?a.TOKEN:"";if(1==s&&m.length>0){(y=new jsSHA("SHA-512","TEXT")).update(u);var y,p=y.getHash("HEX");(y=new jsSHA("SHA-512","TEXT")).update(i);var j=y.getHash("HEX");jQuery.ajax({type:"POST",url:e,data:{IDSERVICE:1190,IDMODULE:1151,IDTOOLS:821,IDRUN:100,IDDOCMOD:l,IDDOC:d,IDMOD:r,TOKEN:m,CODE:t,IDUSER:n,PASSWORD:p,PASSWORDNEW:j},beforeSend:function(){jQuery("#Modal"+l+" .modal-body").html('<p class="p-0 m-0">Czekaj, wysyłam dane do zmiany hasła na serwer.</p>'),jQuery("#Modal"+l).modal("show")},success:function(o){if(void 0!==o.ERROR||void 0!==o.IDUSER){var a=void 0!==o.ERROR?parseInt(o.ERROR):0,e=void 0!==o.IDUSER?parseInt(o.IDUSER):0;if(0==a&&e>0){jQuery("#WEFORMPASSWORD"+l).val(""),jQuery("#WEFORMPASSWORD1"+l).val(""),jQuery("#WEFORMPASSWORD2"+l).val(""),jQuery("#Modal"+l+" .modal
640-body").html('<p class="p-0 m-0">Twoje hasło do konto zostało zmienione.</p>'),jQuery("#Modal"+l).modal("show")}else jQuery("#Modal"+l+" .modal-body").html('<p class="p-0 m-0">Nie można zmienić hasła do Twojego konta sprawdź czy podałeś poprawne dane.</p>'),jQuery("#Modal"+l).modal("show")}else jQuery("#Modal"+l+" .modal-body").html('<p class="p-0 m-0">Wystąpił błąd w komunikacji z serwerem.</p>'),jQuery("#Modal"+l).modal("show")},error:function(a,e,d){var r=o.BSAjaxError(a,e,d);jQuery("#Modal"+l+" .modal-body").html('<p class="p-0 m-0">'+r+"</p>"),jQuery("#Modal"+l).modal("show")},complete:function(){},dataType:"json"})}else jQuery("#Modal"+l+" .modal-body").html('<p class="p-0 m-0">Nie udało się pobrać unikalnego klucz z serwera. Proszę spróbować ponownie.</p>'),jQuery("#Modal"+l).modal("show")}else jQuery("#Modal"+l+" .modal-body").html('<p class="p-0 m-0">Wystąpił błąd w komunikacji z serwerem.</p>'),jQuery("#Modal"+l).modal("show")},error:function(a,e,d){var r=o.BSAjaxError(a,e,d);jQuery("#Modal"+l+" .modal-body").html('<p class="p-0 m-0">'+r+"</p>"),jQuery("#Modal"+l).modal("show")},complete:function(){},dataType:"json"}):(jQuery("#Modal"+l+" .modal-body").html('<p class="p-0 m-0">Proszę poprawnie wypełnić formularz. Nie można zmienić hasła do Twojego konta w przypadku gdy podane hasła są puste lub nowe hasło nie jest poprawnie powtórzone.</p>'),jQuery("#Modal"+l).modal("show"))}},o.Get1190RegistrationConfirmed=function(a){var e=void 0!==a.SERVICE?a.SERVICE:null,l=void 0!==a.IDDOCMOD?a.IDDOCMOD:null,d=void 0!==a.IDDOCUMENT?a.IDDOCUMENT:null,r=void 0!==a.IDMODULE?a.IDMODULE:null,n=void 0!==a.IDUSER?a.IDUSER:null,s=void 0!==a.CODE?a.CODE:null;if(null==e||null==l||null==n||null==s)jQuery("#Modal"+l+" .modal-body").html('<p class="p-0 m-0">Błędne wywołanie parametrów - odśwież stronę i spróbuj ponownie.</p>'),jQuery("#Modal"+l).modal("show");else{var t=jQuery("#WEFORMPASSWORD1"+l).val(),u=jQuery("#WEFORMPASSWORD2"+l).val();if(!!new RegExp(/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*\W+).{8,}$/).test(t)&&t==u&&t.length>1){var i=new jsSHA("SHA-512","TEXT");i.update(t);var m=i.getHash("HEX");jQuery.ajax({type:"POST",url:e,data:{IDSERVICE:1190,IDMODULE:1151,IDTOOLS:820,IDRUN:100,IDDOCMOD:l,IDDOC:d,IDMOD:r,CODE:s,IDUSER:n,PASSWORDNEW:m},beforeSend:function(){jQuery("#Modal"+l+" .modal-body").html('<p class="p-0 m-0">Czekaj, wysyłam dane do logowania na serwer.</p>'),jQuery("#Modal"+l).modal("show")},success:function(o){if(void 0!==o.STATUS){var a=void 0!==o.STATUS?parseInt(o.STATUS):0;if(1==a){var e="";jQuery("#WEFORMPASSWORD1"+l).val(e),jQuery("#WEFORMPASSWORD2"+l).val(e),jQuery("#Modal"+l+" .modal-body").html('<p class="p-0 m-0">Konto zostało utworzone - przejdź do logowania.</p>'),jQuery("#Modal"+l).modal("show")}else if(2==a){e="";jQuery("#WEFORMPASSWORD1"+l).val(e),jQuery("#WEFORMPASSWORD2"+l).val(e),jQuery("#Modal"+l+" .modal-body").html('<p class="p-0 m-0">Konto jest już potwierdzone - przejdź do logowania.</p>'),jQuery("#Modal"+l).modal("show")}else jQuery("#Modal"+l+" .modal-body").html('<p class="p-0 m-0">Nie można uwieżytelnić konta lub nadać mu podanego hasła. Konto może już być uwierzytelnione. Spróbuj ponownie lub skontaktuj się z Administratorem.</p>'),jQuery("#Modal"+l).modal("show")}else jQuery("#Modal"+l+" .modal-body").html('<p class="p-0 m-0">Wystąpił błąd w komunikacji z serwerem.</p>'),jQuery("#Modal"+l).modal("show")},error:function(a,e,d){var r=o.BSAjaxError(a,e,d);jQuery("#Modal"+l+" .modal-body").html('<p class="p-0 m-0">'+r+"</p>"),jQuery("#Modal"+l).modal("show")},complete:function(){},dataType:"json"})}else jQuery("#Modal"+l+" .modal-body").html('<p class="p-0 m-0">Proszę wpisać hasło do konta. Identyczne hasło musi być wpisane w obu polach formularza.</p>'),jQuery("#Modal"+l).modal("show")}},o.Get3100Tools860AnalizeDateTimeGenerateList=function(a){var e=void 0!==a.SERVICE?a.SERVICE:null,l=void 0!==a.IDBAZA?a.IDBAZA:null,d=void 0!==a.IDCONFIG?a.IDCONFIG:null,r=void 0!==a.IDPOLE?a.IDPOLE:null,n=void 0!==a.FIELDDATE?a.FIELDDATE:null,s=void 0!==a.FIELDSELECT?a.FIELDSELECT:null,t=void 0!==a.CODE?a.CODE:null;if(null==e||null==l||null==d||null==r||null==n||null==s||null==t)alert("Brak podstawowych parametrów.");else{var u=jQuery("#"+n).val();
640jQuery.ajax({type:"POST",url:e,data:{IDSERVICE:3100,IDMODULE:3100,IDTOOLS:860,IDRUN:100,IDBAZA:l,IDPOLE:r,IDCONFIG:d,CHECKDATE:u,CODE:t},beforeSend:function(){},success:function(o){if(void 0!==o.STATUS||void 0!==o.ELEMENTS){var a=void 0!==o.STATUS?parseInt(o.STATUS):0,e=void 0!==o.ELEMENTS?o.ELEMENTS:[];if(1==a){var l=jQuery("#"+s);l.empty(),e.length>0&&jQuery.each(e,function(o,a){var e=jQuery("<option></option>").attr("value",a.value).text(a.label);l.append(e)})}else alert("Brak wykonanego skryptu analizy")}else alert("Wystąpił błąd w komunikacji z serwerem.")},error:function(a,e,l){var d=o.BSAjaxError(a,e,l);alert(d)},complete:function(){},dataType:"json"})}},o.BSAjaxError=function(o,a,e){return"Wystąpił błąd: "+(0===o.status?"Brak połączenia z serwerwm.":404==o.status?"Wywoływana strona nie istniej. [404]":500==o.status?"Wewnątrzny błąd serwera [500].":"parsererror"===a?"Przesłany plik JSON jest wadliwy.":"timeout"===a?"Za długi czas oczekiwania.":"abort"===a?"Przerwano transmisję danych.":"Błąd "+o.responseText)},o}Object.defineProperty(exports,"__esModule",{value:!0}),exports.WEInit=o;
641},{}],"Focm":[function(require,module,exports) {
642"use strict";var e=A(require("jquery"));require("@fortawesome/fontawesome-free/css/all.css"),require("@mdi/font/css/materialdesignicons.css"),require("bootstrap/dist/css/bootstrap.min.css");var t=A(require("js-cookie")),a=A(require("jssha")),r=A(require("moment")),i=A(require("chart.js"));require("spectrum-colorpicker/spectrum.css");var o=A(require("dropzone"));require("dropzone/dist/min/dropzone.min.css"),require("ekko-lightbox/dist/ekko-lightbox.css"),require("jquery.fancytree/dist/skin-win8/ui.fancytree.min.css"),require("./bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css"),require("./bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js"),require("ol/ol.css");var n=A(require("ol/Map.js")),d=A(require("ol/View.js")),s=require("ol/control.js"),l=A(require("ol/source/Stamen.js")),c=require("ol/proj"),u=A(require("ol/layer/Tile.js")),f=A(require("ol/source/TileWMS.js")),p=A(require("ol/Overlay.js")),m=A(require("ol/source/XYZ.js")),v=A(require("ol/source/OSM.js")),h=A(require("ol/source/Cluster.js")),g=A(require("ol/source/Vector.js")),y=A(require("ol/format/GeoJSON")),w=A(require("ol/format/WKT")),b=A(require("ol/control/MousePosition.js")),k=require("ol/coordinate.js"),S=A(require("ol/format/KML.js")),z=require("ol/layer.js");require("ol-contextmenu/dist/ol-contextmenu.css");var M=A(require("ol-contextmenu/dist/ol-contextmenu.js")),x=require("ol/interaction"),P=require("ol/extent"),j=A(require("ol-ext/style/Chart")),I=require("ol/style.js"),O=A(require("ol/Feature")),C=A(require("ol/geom/Point"));require("./index_we.css");var q=require("./index_we.js");function A(e){return e&&e.__esModule?e:{default:e}}function E(e,t){return H(e)||W(e,t)||L(e,t)||D()}function D(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function L(e,t){if(e){if("string"==typeof e)return Y(e,t);var a={}.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?Y(e,t):void 0}}function Y(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,r=Array(t);a<t;a++)r[a]=e[a];return r}function W(e,t){var a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var r,i,o,n,d=[],s=!0,l=!1;try{if(o=(a=a.call(e)).next,0===t){if(Object(a)!==a)return;s=!1}else for(;!(s=(r=o.call(a)).done)&&(d.push(r.value),d.length!==t);s=!0);}catch(e){l=!0,i=e}finally{try{if(!s&&null!=a.return&&(n=a.return(),Object(n)!==n))return}finally{if(l)throw i}}return d}}function H(e){if(Array.isArray(e))return e}function Z(e){return(Z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}window.$=window.jQuery=e.default,require("popper.js"),require("bootstrap"),window.Cookies=t.default,window.jsSHA=a.default,window.moment=r.default,window.Chart=i.default,require("jquery.cookie"),require("jquery-countdown"),require("jquery-knob"),require("spectrum-colorpicker"),require("spectrum-colorpicker/i18n/jquery.spectrum-pl"),window.Dropzone=o.default,require("ekko-lightbox/dist/ekko-lightbox.js");var R=require("jquery.fancytree");window.fancytree=R,require("jquery.fancytree/dist/modules/jquery.fancytree.dnd5"),require("jquery.fancytree/dist/modules/jquery.fancytree.edit"),require("jquery.fancytree/dist/modules/jquery.fancytree.gridnav"),require("jquery.fancytree/dist/modules/jquery.fancytree.table"),require("jquery.fancytree/dist/modules/jquery.fancytree.persist"),require("jquery.fancytree/dist/modules/jquery.fancytree.filter");var T=require("detect-browser"),U=T.detect,G=U();window.DetectBrowser=G;var F=require("tinymce/tinymce");require("tinymce/themes/silver"),require("./tinymce/langs/pl.js"),window.tinymce=F;var _={};window.ubermenu_data=_;var V=require("what-input");function X(e){var t=!1;if("stamen"==e.provider){t=!0;var a=new u.default({opacity:e.opacity,visible:e.visible,source:new l.default({layer:e.scheme})})}else if("osm"==e.provider){t=!0;a=new u.default({opacity:e.opacity,visible:e.visible,source:new v.default({layer:e.scheme})})}else if("here"==e.provider){t=!0;a=new u.default({opacity:e.opacity,visible:e.visible,preload:1/0,source:new m.default({url:J(e),attributions:e.attributions})})}else if("xyz"==e.provider){t=!0;a=new u.default({opacity:e.opacity,visible:e.visible,preload:1/0,source:new m.default({url:e.url,attributions:e.attributions})})}else if("wms-geoserver"==e.provider){t=!0;a=new u.default({opacity:e.opacity,visible:e.visible,source:new f.default({url:e.url,params:{layers:e.layers},serverType:"geoserver",attributions:e.attributions,transition:0})})}else if("kml"==e.provider){t=!0;a=new z.Vector({visible:e.visible,opacity:e.opacity,source:new g.default({url:e.url,format:new S.default,attributions:e.attributions})})}else if("kml-chart"==e.provider){t=!0;a=new z.Vector({visible:e.visible,opacity:e.opacity,source:new h.default({distance:40,source:new g.default({url:e.url,format:new S.default({extractStyles:!1,extractAttributes:!0})}),attributions:e.attributions}),style:function(e,t){var a,r=e.get("features").length;if(r>1){for(var i=(0,P.createEmpty)(),o=e.get("features"),n=o.length-1;n>=0;--n)(0,P.extend)(i,o[n].getGeometry().getExtent());var d=.35*((0,P.getWidth)(i)+(0,P.getHeight)(i))/t;a=new I.Style({image:new I.Circle({radius:d,fill:new I.Fill({color:"rgba(255, 153, 0, 0.4)"}),stroke:new I.Stroke({color:"rgba(255, 153, 0, 0.6)",width:1})}),text:new I.Text({text:r.toString(),scale:1.5,fill:new I.Fill({color:"#fff"}),stroke:new I.Stroke({color:"rgba(0, 0, 0, 0.6)",width:2})})})}else a=B(e.get("features")[0],!1);return a}})}else if("kml-marker"==e.provider){t=!0;a=new z.Vector({visible:e.visible,opacity:e.opacity,source:new g.default({url:e.url,format:new S.default({extractStyles:!1,extractAttributes:!0}),attributions:e.attributions}),style:function(t){var a=e.iconSrc,r=e.iconAnchorX,i=e.iconAnchorY,o=e.anchorXUnits,n=e.anchorYUnits,d=e.iconOpacity,s=t.get("markerIconSrc"),l=t.get("markerIconAnchorX"),c=t.get("markerIconAnchorY"),u=t.get("markerAnchorXUnits"),f=t.get("markerAnchorYUnits"),p=t.get("markerIconOpacity");void 0!==s&&(a=s),void 0!==l&&(r=l),void 0!==c&&(i=c),void 0!==u&&(o=u),void 0!==f&&(n=f),void 0!==p&&(d=p);var m=new I.Style({image:new I.Icon({anchor:[r,i],anchorXUnits:o,anchorYUnits:n,opacity:d,src:a})});return m}})}
642else if("kml-marker-cluster"==e.provider){t=!0;a=new z.Vector({visible:e.visible,opacity:e.opacity,source:new h.default({distance:40,source:new g.default({url:e.url,format:new S.default({extractStyles:!1,extractAttributes:!0})}),attributions:e.attributions}),style:function(t,a){var r=t.get("features").length;if(r>1){for(var i=(0,P.createEmpty)(),o=t.get("features"),n=o.length-1;n>=0;--n)(0,P.extend)(i,o[n].getGeometry().getExtent());var d=.45*((0,P.getWidth)(i)+(0,P.getHeight)(i))/a;b=new I.Style({image:new I.Circle({radius:d,fill:new I.Fill({color:"rgba(255, 153, 0, 0.4)"}),stroke:new I.Stroke({color:"rgba(255, 153, 0, 0.6)",width:1})}),text:new I.Text({text:r.toString(),scale:1.5,fill:new I.Fill({color:"#fff"}),stroke:new I.Stroke({color:"rgba(0, 0, 0, 0.6)",width:2})})})}else{var s=e.iconSrc,l=e.iconAnchorX,c=e.iconAnchorY,u=e.anchorXUnits,f=e.anchorYUnits,p=e.iconOpacity,m=t.get("markerIconSrc"),v=t.get("markerIconAnchorX"),h=t.get("markerIconAnchorY"),g=t.get("markerAnchorXUnits"),y=t.get("markerAnchorYUnits"),w=t.get("markerIconOpacity");void 0!==m&&(s=m),void 0!==v&&(l=v),void 0!==h&&(c=h),void 0!==g&&(u=g),void 0!==y&&(f=y),void 0!==w&&(p=w);var b=new I.Style({image:new I.Icon({anchor:[l,c],anchorXUnits:u,anchorYUnits:f,opacity:p,src:s})})}return b}})}else if("kml-heatmap"==e.provider);else if("geojson"==e.provider){t=!0;a=new z.Vector({opacity:e.opacity,visible:e.visible,source:new g.default({url:e.url,format:new y.default,attributions:e.attributions})})}else if("geojson-marker"==e.provider){t=!0;a=new z.Vector({opacity:e.opacity,visible:e.visible,source:new g.default({url:e.url,format:new y.default,attributions:e.attributions}),style:function(t){var a=e.iconSrc,r=e.iconAnchorX,i=e.iconAnchorY,o=e.anchorXUnits,n=e.anchorYUnits,d=e.iconOpacity,s=t.get("markerIconSrc"),l=t.get("markerIconAnchorX"),c=t.get("markerIconAnchorY"),u=t.get("markerAnchorXUnits"),f=t.get("markerAnchorYUnits"),p=t.get("markerIconOpacity");void 0!==s&&(a=s),void 0!==l&&(r=l),void 0!==c&&(i=c),void 0!==u&&(o=u),void 0!==f&&(n=f),void 0!==p&&(d=p);var m=new I.Style({image:new I.Icon({anchor:[r,i],anchorXUnits:o,anchorYUnits:n,opacity:d,src:a})});return m}})}else if("geojson-marker-cluster"==e.provider){t=!0;a=new z.Vector({visible:e.visible,opacity:e.opacity,source:new h.default({distance:40,source:new g.default({url:e.url,format:new y.default}),attributions:e.attributions}),style:function(t,a){var r=t.get("features").length;if(r>1){for(var i=(0,P.createEmpty)(),o=t.get("features"),n=o.length-1;n>=0;--n)(0,P.extend)(i,o[n].getGeometry().getExtent());var d=.5*((0,P.getWidth)(i)+(0,P.getHeight)(i))/a;b=new I.Style({image:new I.Circle({radius:d,fill:new I.Fill({color:"rgba(255, 153, 0, 0.4)"}),stroke:new I.Stroke({color:"rgba(255, 153, 0, 0.6)",width:1})}),text:new I.Text({text:r.toString(),scale:1.5,fill:new I.Fill({color:"#fff"}),stroke:new I.Stroke({color:"rgba(0, 0, 0, 0.6)",width:2})})})}else{var s=e.iconSrc,l=e.iconAnchorX,c=e.iconAnchorY,u=e.anchorXUnits,f=e.anchorYUnits,p=e.iconOpacity,m=t.get("markerIconSrc"),v=t.get("markerIconAnchorX"),h=t.get("markerIconAnchorY"),g=t.get("markerAnchorXUnits"),y=t.get("markerAnchorYUnits"),w=t.get("markerIconOpacity");void 0!==m&&(s=m),void 0!==v&&(l=v),void 0!==h&&(c=h),void 0!==g&&(u=g),void 0!==y&&(f=y),void 0!==w&&(p=w);var b=new I.Style({image:new I.Icon({anchor:[l,c],anchorXUnits:u,anchorYUnits:f,opacity:p,src:s})})}return b}})}else if("marker-array"==e.provider&&e.markers.length>0){for(var r=[],i=0;i<e.markers.length;i++){var o=new O.default({geometry:new C.default((0,c.fromLonLat)([e.markers[i].lon,e.markers[i].lat])),name:e.markers[i].name,description:e.markers[i].description});o.setStyle(new I.Style({image:new I.Icon({anchor:[e.markers[i].iconAnchorX,e.markers[i].iconAnchorY],anchorXUnits:e.markers[i].anchorXUnits,anchorYUnits:e.markers[i].anchorYUnits,opacity:e.markers[i].iconOpacity,src:e.markers[i].iconSrc})})),r.push(o)}t=!0;a=new z.Vector({opacity:e.opacity,visible:e.visible,source:new g.default({features:r,attributions:e.attributions})})}return t?a:null}function N(t,a,r,i,o,n,d,s,l){fetch("https://nominatim.openstreetmap.org/reverse?format=json&addressdetails=1&limit=1&lon="+s+"&lat="+l).then(function(e){return e.json()}).then(function(s){void 0!==t&&(void 0!==s&&void 0!==s.address&&void 0!==s.address.country&&""!==s.address.country?(0,e.default)("#"+t).val(s.address.country):void 0!==s&&void 0!==s.address&&void 0!==s.address.local_administrative_area&&""!==s.address.local_administrative_area?(0,e.default)("#"+t).val(s.address.local_administrative_area):(0,e.default)("#"+t).val("")),void 0!==a&&(void 0!==s&&void 0!==s.address&&void 0!==s.address.postcode?(0,e.default)("#"+a).val(s.address.postcode):(0,e.default)("#"+a).val("")),void 0!==r&&(void 0!==s&&void 0!==s.address&&void 0!==s.address.city&&""!==s.address.city?(0,e.default)("#"+r).val(s.address.city):void 0!==s&&void 0!==s.address&&void 0!==s.address.town&&""!==s.address.town?(0,e.default)("#"+r).val(s.address.town):void 0!==s&&void 0!==s.address&&void 0!==s.address.municipality&&""!==s.address.municipality?(0,e.default)("#"+r).val(s.address.municipality):(0,e.default)("#"+r).val("")),void 0!==i&&(void 0!==s&&void 0!==s.address&&void 0!==s.address.village&&""!==s.address.village?(0,e.default)("#"+i).val(s.address.village):void 0!==s&&void 0!==s.address&&void 0!==s.address.hamlet&&""!==s.address.hamlet?(0,e.default)("#"+i).val(s.address.hamlet):void 0!==s&&void 0!==s.address&&void 0!==s.address.locality&&""!==s.address.locality?(0,e.default)("#"+i).val(s.address.locality):void 0!==s&&void 0!==s.address&&void 0!==s.address.croft&&""!==s.address.croft?(0,e.default)("#"+i).val(s.address.croft):(0,e.default)("#"+i).val("")),void 0!==o&&(void 0!==s&&void 0!==s.address&&void 0!==s.address.road&&""!==s.address.road?(0,e.default)("#"+o).val(s.address.road):void 0!==s&&void 0!==s.address&&void 0!==s.address.footway&&""!==s.address.footway?(0,e.default)("#"+o).val(s.address.footway):void 0!==s&&void 0!==s.address&&void 0!==s.address.street&&""!==s.address.street?(0,e.default)("#"+o).val(s.address.street):void 0!==s&&void 0!==s.address&&void 0!==s.address.street_name&&""!==s.address.street_name?(0,e.default)("#"+o).val(s.address.street_name):void 0!==s&&void 0!==s.address&&void 0!==s.address.residential&&""!==s.address.residential?(0,e.default)("#"+o).val(s.address.residential):void 0!==s&&void 0!==s.address&&void 0!==s.address.path&&""!==s.address.path?(0,e.default)("#"+o).val(s.address.path):void 0!==s&&void 0!==s.address&&void 0!==s.address.pede
642strian&&""!==s.address.pedestrian?(0,e.default)("#"+o).val(s.address.pedestrian):void 0!==s&&void 0!==s.address&&void 0!==s.address.road_reference&&""!==s.address.road_reference?(0,e.default)("#"+o).val(s.address.road_reference):void 0!==s&&void 0!==s.address&&void 0!==s.address.road_reference_intl&&""!==s.address.road_reference_intl?(0,e.default)("#"+o).val(s.address.road_reference_intl):(0,e.default)("#"+o).val("")),void 0!==n&&(void 0!==s&&void 0!==s.address&&void 0!==s.address.house_number&&""!==s.address.house_number?(0,e.default)("#"+n).val(s.address.house_number):(0,e.default)("#"+n).val("")),void 0!==d&&(void 0!==s&&void 0!==s.address&&void 0!==s.display_name?(0,e.default)("#"+d).val(s.display_name):(0,e.default)("#"+d).val(""))})}function J(e){return e.url.replace("{base}",e.base).replace("{type}",e.type).replace("{scheme}",e.scheme).replace("{app_id}",e.app_id).replace("{app_code}",e.app_code)}function B(e,t){if(void 0!==e.get("chartElem")&&void 0!==e.get("chartType")&&void 0!==e.get("chartColors")){for(var a=e.get("chartType"),r=e.get("chartColors"),i=Number(e.get("chartElem")),o=Number(e.get("chartRadius")),n=0,d=[],s=0;s<i;s++)if(void 0!==e.get("value"+s)){var l=Number(e.get("value"+s));n+=l,d.push(l)}var c=o||25;c*=t?1.3:1;var u=[new I.Style({image:new j.default({type:a,radius:c,data:d,rotateWithView:!0,colors:r,stroke:new I.Stroke({color:"#fff",width:2})})})];if(t){var f=0;for(s=0;s<d.length;s++){var p=d[s],m=(2*f+p)/n*Math.PI-Math.PI/2,v=Math.round(p/n*1e3);v>0&&u.push(new I.Style({text:new I.Text({text:v/10+"% "+p.toString(),offsetX:Math.cos(m)*(c+5),offsetY:Math.sin(m)*(c+5),textAlign:m<Math.PI/2?"left":"right",textBaseline:"middle",stroke:new I.Stroke({color:"#fff",width:5}),fill:new I.Fill({color:"#000"})})})),f+=p}}return u}}function $(){(0,e.default)(".container-countdown").each(function(){var t=(0,e.default)(this),a=(0,e.default)(this).data("countdown");t.countdown(a,function(e){var a=e.strftime("%S"),r=e.strftime("%M"),i=e.strftime("%H"),o=e.strftime("%D");t.find(".countdown-ds").val(o).trigger("change"),t.find(".countdown-hr").val(i).trigger("change"),t.find(".countdown-min").val(r).trigger("change"),t.find(".countdown-sec").val(a).trigger("change")}),(0,e.default)(".knob").knob();var r=Math.floor(t.width()/4);t.find(".knob").trigger("configure",{width:r,height:r})})}function K(t,a,r){var i="#"+a+t+r,o=(0,e.default)(i).attr("data-terytinfo");o=void 0!==o?o:"","WOJ"==t||"POW"==t||"GMI"==t?(0,e.default)("#"+a+"RODZ"+r).val(""):"ADRESWOJ"!=t&&"ADRESPOW"!=t&&"ADRESGMI"!=t||(0,e.default)("#"+a+"ADRESRODZ"+r).val(""),(0,e.default)(i).find("option").remove().end().append('<option value="">'+o+"</option>").val("")}function Q(t,a,r){var i="#"+a+t+r,o=(0,e.default)(i).attr("data-teryturlservice");o=void 0!==o?o:"";var n=0,d=0,s=0,l=0,c=0;"POW"==t?(n=(0,e.default)("#"+a+"WOJ"+r).val(),l=(0,e.default)("#"+a+"RODZ"+r).val()):"ADRESPOW"==t?(n=(0,e.default)("#"+a+"ADRESWOJ"+r).val(),l=(0,e.default)("#"+a+"ADRESRODZ"+r).val()):"GMI"==t?(n=(0,e.default)("#"+a+"WOJ"+r).val(),d=(0,e.default)("#"+a+"POW"+r).val(),l=(0,e.default)("#"+a+"RODZ"+r).val()):"ADRESGMI"==t?(n=(0,e.default)("#"+a+"ADRESWOJ"+r).val(),d=(0,e.default)("#"+a+"ADRESPOW"+r).val(),l=(0,e.default)("#"+a+"ADRESRODZ"+r).val()):"SYM"==t?(n=(0,e.default)("#"+a+"WOJ"+r).val(),d=(0,e.default)("#"+a+"POW"+r).val(),s=(0,e.default)("#"+a+"GMI"+r).val(),l=(0,e.default)("#"+a+"RODZ"+r).val()):"ADRESSYM"==t?(n=(0,e.default)("#"+a+"ADRESWOJ"+r).val(),d=(0,e.default)("#"+a+"ADRESPOW"+r).val(),s=(0,e.default)("#"+a+"ADRESGMI"+r).val(),l=(0,e.default)("#"+a+"ADRESRODZ"+r).val()):"SYMUL"==t?(n=(0,e.default)("#"+a+"WOJ"+r).val(),d=(0,e.default)("#"+a+"POW"+r).val(),s=(0,e.default)("#"+a+"GMI"+r).val(),c=(0,e.default)("#"+a+"SYM"+r).val(),l=(0,e.default)("#"+a+"RODZ"+r).val()):"ADRESSYMUL"==t&&(n=(0,e.default)("#"+a+"ADRESWOJ"+r).val(),d=(0,e.default)("#"+a+"ADRESPOW"+r).val(),s=(0,e.default)("#"+a+"ADRESGMI"+r).val(),c=(0,e.default)("#"+a+"ADRESSYM"+r).val(),l=(0,e.default)("#"+a+"ADRESRODZ"+r).val()),n=void 0!==n?n:0,d=void 0!==d?d:0,s=void 0!==s?s:0,c=void 0!==c?c:0,l=void 0!==l?l:0,e.default.ajax({type:"POST",url:o+"/service-9206-1151-100-1000000000-0000000000000000000000000000000",data:{type:t,woj:n,pow:d,rodz:l,gmi:s,sym:c},beforeSend:function(){},success:function(t){void 0!==t.STATUS&&void 0!==t.DATA&&1==parseInt(t.STATUS)&&(t.DATA.length>0?e.default.each(t.DATA,function(t,a){var r=(0,e.default)("<option>",{value:a.id,text:a.nazwa});void 0!==a.rodz&&r.attr("data-rodz",a.rodz),(0,e.default)(i).append(r)}):c>0&&(0,e.default)(i).append((0,e.default)("<option>",{value:1,text:"wybrana miejscowość nie posiada zdefiniowanych ulic"}
642)))},error:function(e,t,a){var r=obj.BSAjaxError(e,t,a);console.log(r)},complete:function(){},dataType:"json"})}function ee(){if((0,e.default)("#we-content-menu-top").length){var t=(0,e.default)(window).scrollTop(),a=(0,e.default)("#we-content-menu-top").height();t>(0,e.default)("#we-content-menu-top").position().top?((0,e.default)("#we-content-menu-top").css("position","fixed").css("top",0),(0,e.default)("#we-content-menu-top-margin").css("height",a)):((0,e.default)("#we-content-menu-top").css("position","relative").css("top",0),(0,e.default)("#we-content-menu-top-margin").css("height",0))}}window.whatInput=V,window.WE=window.WE=new q.WEInit,(0,e.default)(window).on("scroll",function(){ee()}),(0,e.default)(window).on("resize",function(){$(),ee()}),(0,e.default)(document).ready(function(){void 0!==G.name&&(0,e.default)("body").addClass("we-browser-name-"+G.name.replace(/[^a-z0-9]/gi,"").toLowerCase()),void 0!==G.type&&(0,e.default)("body").addClass("we-browser-type-"+G.type.replace(/[^a-z0-9]/gi,"").toLowerCase()),void 0!==G.os&&(0,e.default)("body").addClass("we-browser-os-"+G.os.replace(/[^a-z0-9]/gi,"").toLowerCase()),void 0!==G.version&&(0,e.default)("body").addClass("we-browser-version-"+G.version.replace(/[^a-z0-9]/gi,"").toLowerCase()),(0,e.default)(".we-form-control").on("change keyup paste click",function(t){var a=(0,e.default)(this).attr("data-type"),r=(0,e.default)(this).prop("required"),i=(0,e.default)(this).attr("data-displayonoff-checkboxchecked");if(void 0!==i&&((0,e.default)(this).is(":checked")?(0,e.default)("#"+i).removeClass("d-none"):(0,e.default)("#"+i).addClass("d-none")),"checkbox"==a)void 0!==r&&1==r&&((0,e.default)(this).prop("checked")?(0,e.default)(this).removeClass("is-invalid").addClass("is-valid"):(0,e.default)(this).removeClass("is-valid").addClass("is-invalid"));else if("pesel"==a){if(g=(g=(0,e.default)(this).val()).replace(/[^\d]/g,""),(0,e.default)(this).val(g),g.length>0||void 0!==r&&1==r){var o=!0;if((w=new RegExp(/^[0-9]{11}$/g)).test(g)){var n=0;n+=1*parseInt(g.substring(0,1)),n+=3*parseInt(g.substring(1,2)),n+=7*parseInt(g.substring(2,3)),n+=9*parseInt(g.substring(3,4)),n+=1*parseInt(g.substring(4,5)),n+=3*parseInt(g.substring(5,6)),n+=7*parseInt(g.substring(6,7)),n+=9*parseInt(g.substring(7,8)),n+=1*parseInt(g.substring(8,9)),(d=10==(d=10-(n+=3*parseInt(g.substring(9,10)))%10)?0:d)==parseInt(g.substring(10,11))&&(o=!1)}o?(0,e.default)(this).removeClass("is-valid").addClass("is-invalid"):(0,e.default)(this).removeClass("is-invalid").addClass("is-valid")}else(0,e.default)(this).removeClass("is-invalid").removeClass("is-valid")}else if("nip"==a){if(g=(g=(0,e.default)(this).val()).replace(/[^\d]/g,""),(0,e.default)(this).val(g),g.length>0||void 0!==r&&1==r){o=!0;if((w=new RegExp(/^[0-9]{10}$/g)).test(g)){n=0;n+=6*parseInt(g.substring(0,1)),n+=5*parseInt(g.substring(1,2)),n+=7*parseInt(g.substring(2,3)),n+=2*parseInt(g.substring(3,4)),n+=3*parseInt(g.substring(4,5)),n+=4*parseInt(g.substring(5,6)),n+=5*parseInt(g.substring(6,7)),n+=6*parseInt(g.substring(7,8)),(d=(n+=7*parseInt(g.substring(8,9)))%11)==parseInt(g.substring(9,10))&&(o=!1)}o?(0,e.default)(this).removeClass("is-valid").addClass("is-invalid"):(0,e.default)(this).removeClass("is-invalid").addClass("is-valid")}else(0,e.default)(this).removeClass("is-invalid").removeClass("is-valid")}else if("regon"==a){if(g=(g=(0,e.default)(this).val()).replace(/[^\d]/g,""),(0,e.default)(this).val(g),g.length>0||void 0!==r&&1==r){for(;g.length<9;)g="0"+g;o=!0;if((w=new RegExp(/^[0-9]{9}$/g)).test(g)){n=0;n+=8*parseInt(g.substring(0,1)),n+=9*parseInt(g.substring(1,2)),n+=2*parseInt(g.substring(2,3)),n+=3*parseInt(g.substring(3,4)),n+=4*parseInt(g.substring(4,5)),n+=5*parseInt(g.substring(5,6)),n+=6*parseInt(g.substring(6,7)),(d=(n+=7*parseInt(g.substring(7,8)))%11)==parseInt(g.substring(8,9))&&(o=!1)}else{if((w=new RegExp(/^[0-9]{14}$/g)).test(g)){var d;n=0;n+=2*parseInt(g.substring(0,1)),n+=4*parseInt(g.substring(1,2)),n+=8*parseInt(g.substring(2,3)),n+=5*parseInt(g.substring(3,4)),n+=0*parseInt(g.substring(4,5)),n+=9*parseInt(g.substring(5,6)),n+=7*parseInt(g.substring(6,7)),n+=3*parseInt(g.substring(7,8)),n+=6*parseInt(g.substring(8,9)),n+=1*parseInt(g.substring(9,10)),n+=2*parseInt(g.substring(10,11)),n+=4*parseInt(g.substring(11,12)),(d=(n+=8*parseInt(g.substring(12,13)))%11)==parseInt(g.substring(13,14))&&(o=!1)}}o?(0,e.default)(this).removeClass("is-valid").addClass("is-invalid"):(0,e.default)(this).removeClass("is-invalid").addClass("is-valid")}else(0,e.default)(this).removeClass("is-invalid").removeClass("is-valid")}
642else if("nrb"==a){if(g=(g=(0,e.default)(this).val()).replace(/[^\d]/g,""),(0,e.default)(this).val(g),g.length>0||void 0!==r&&1==r){o=!0;if((w=new RegExp(/^[0-9]{26}$/g)).test(g)){var s=new Array(1,10,3,30,9,90,27,76,81,34,49,5,50,15,53,45,62,38,89,17,73,51,25,56,75,71,31,19,93,57);g=(g+="2521").substr(2)+g.substr(0,2);for(var l=0,c=0;c<30;c++)l+=g[29-c]*s[c];l%97==1&&(o=!1)}o?(0,e.default)(this).removeClass("is-valid").addClass("is-invalid"):(0,e.default)(this).removeClass("is-invalid").addClass("is-valid")}else(0,e.default)(this).removeClass("is-invalid").removeClass("is-valid")}else if("teryt"==a){if("change"==(void 0!==t.type?t.type:"")){var u=(0,e.default)(this).attr("data-id");u=void 0!==u?u:"";var f=(0,e.default)(this).attr("data-teryttype");f=void 0!==f?f:"";var p=(0,e.default)(this).attr("data-idlang");if(p=void 0!==p?p:0,"WOJ"==f)K("POW",u,p),K("GMI",u,p),K("SYM",u,p),K("SYMUL",u,p),Q("POW",u,p);else if("POW"==f)K("GMI",u,p),K("SYM",u,p),K("SYMUL",u,p),Q("GMI",u,p);else if("GMI"==f){var m=u+"RODZ"+p;if((0,e.default)("#"+m).length>0){var v=void 0!==(h=(0,e.default)("option:selected",this).attr("data-rodz"))?h:0;(0,e.default)("#"+m).val(v)}K("SYM",u,p),K("SYMUL",u,p),Q("SYM",u,p)}else if("SYM"==f)K("SYMUL",u,p),Q("SYMUL",u,p);else if("ADRESWOJ"==f)K("ADRESPOW",u,p),K("ADRESGMI",u,p),K("ADRESSYM",u,p),K("ADRESSYMUL",u,p),Q("ADRESPOW",u,p);else if("ADRESPOW"==f)K("ADRESGMI",u,p),K("ADRESSYM",u,p),K("ADRESSYMUL",u,p),Q("ADRESGMI",u,p);else if("ADRESGMI"==f){m=u+"ADRESRODZ"+p;if((0,e.default)("#"+m).length>0){var h;v=void 0!==(h=(0,e.default)("option:selected",this).attr("data-rodz"))?h:0;(0,e.default)("#"+m).val(v)}K("ADRESSYM",u,p),K("ADRESSYMUL",u,p),Q("ADRESSYM",u,p)}else"ADRESSYM"==f&&(K("ADRESSYMUL",u,p),Q("ADRESSYMUL",u,p))}}else{var g=(0,e.default)(this).val(),y=(0,e.default)(this).attr("data-pattern"),w=(0,e.default)(this).attr("pattern");if(void 0!==y&&void 0!==w&&(w=y),"text-number-decimal"==a){g=g.replace(",",".").replace(/[^\d\.\-]/g,"");var b=/(-?\d*)[^\.]*((?:\.\d{0,2})?)/g.exec(g.replace(/[^\d\.\-]/g,""));g=b[1]+b[2],(0,e.default)(this).val(g)}else if("text-number-decimal-double"==a){g=g.replace(",",".").replace(/[^\d\.\-]/g,"");b=/(-?\d*)[^\.]*((?:\.\d{0,15})?)/g.exec(g.replace(/[^\d\.\-]/g,""));g=b[1]+b[2],(0,e.default)(this).val(g)}else"text-number-tinyint"==a||"text-number-int"==a||"text-number-bigint"==a||"phonenumber"==a?(g=g.replace(/[^\d\-]/g,""),(0,e.default)(this).val(g)):"text-year"==a&&(g=g.replace(/[^\d\-]/g,""),(0,e.default)(this).val(g));if(g.length>0||void 0!==r&&1==r){var k=!1,S=!1;if(void 0!==r&&1==r&&(k=!0,S=void 0!==g&&g.length>0),void 0!==g&&g.length>0&&void 0!==w&&w.length>0){k=!0;var z=new RegExp(w,"gm");S=null!==z&&"object"===Z(z)&&!!z.test(g)}k&&(S?(0,e.default)(this).removeClass("is-invalid").addClass("is-valid"):(0,e.default)(this).removeClass("is-valid").addClass("is-invalid"))}else(0,e.default)(this).removeClass("is-invalid").removeClass("is-valid")}}),(0,e.default)(".we-datetimepicker-datetime").each(function(){var t=(0,e.default)(this).attr("date-startdate");void 0===t&&(t=!1);var a=(0,e.default)(this).attr("date-enddate");void 0===a&&(a=!1);var r=(0,e.default)(this).attr("date-disabled-weekend");r=void 0!==r&&[0,6];var i=(0,e.default)(this).attr("date-disabledHours");void 0===i&&(i=!1);var o=(0,e.default)(this).attr("date-enabledHours");void 0===o&&(o=!1),(0,e.default)(this).datetimepicker({calendarWeeks:!0,showClose:!0,showClear:!0,showTodayButton:!0,format:"YYYY-MM-DD HH:mm:ss",minDate:t,maxDate:a,daysOfWeekDisabled:r,disabledHours:i,enabledHours:o,icons:{time:"far fa-clock",date:"far fa-calendar-alt",up:"far fa-arrow-alt-circle-up",down:"far fa-arrow-alt-circle-down",previous:"far fa-arrow-alt-circle-left",next:"far fa-arrow-alt-circle-right",today:"far fa-calendar-check",clear:"far fa-minus-square",close:"far fa-window-close"},tooltips:{today:"Ustaw bieżącą datę i czas do formularza",clear:"Wyczyść datę i czas w formularzu",close:"Zamknij okno",selectMonth:"Wybierz miesiąc",prevMonth:"Poprzedni miesiąc",nextMonth:"Następny miesiąc",selectYear:"Wybierz rok",prevYear:"Poprzedni rok",nextYear:"Nastepny rok",selectDecade:"Wybierz dekadę",prevDecade:"Poprzednia dekada",nextDecade:"Nastepna dekada",prevCentury:"Poprzedni wiek",nextCentury:"Nastepny wiek",pickHour:"Pick Hour",incrementHour:"Zwiększ godzinę",decrementHour:"Zmniejsz godzinę",pickMinute:"Pick Minute",incrementMinute:"Zwiększ minuty",decrementMinute:"Zmniejsz minuty",pickSecond:"Pick Second",incrementSecond:"Zwiększ sekundy",decrementSecond:"Zmniejsz sekundy",togglePeriod:"Zmień zakres",selectTime:"Wybierz czas"}})}),(0,e.default)(".we-datetimepicker-datetime-noseconds").each(function(){var t=(0,e.default)(this).attr("date-startdate");void 0===t&&(t=!1);var a=(0,e.default)(this).attr("date-enddate");void 0===a&&(a=!1);var r=(0,e.default)(this).attr("date-disabled-weekend");r=void 0!==r&&[0,6];var i=(0,e.default)(this).attr("date-disabledHours");void 0===i&&(i=!1);var o=(0,e.default)(this).attr("date-enabledHours");void 0===o&&(o=!1),(0,e.default)(this).datetimepicker({calendarWeeks:!0,showClose:!0,showClear:!0,showTodayButton:!0,format:"YYYY-MM-DD HH:mm",minDate:t,maxDate:a,daysOfWeekDisabled:r,disabledHours:i,enabledHours:o,icons:{time:"far fa-clock",date:"far fa-calendar-alt",up:"far fa-arrow-alt-circle-up",down:"far fa-arrow-alt-circle-down",previous:"far fa-arrow-alt-circle-left",next:"far fa-arrow-alt-circle-right",today:"far fa-calendar-check",clear:"far fa-minus-square",close:"far fa-window-close"},tooltips:{today:"Ustaw bieżącą datę i czas do formularza",clear:"Wyczyść datę i czas w formularzu",close:"Zamknij okno",selectMonth:"Wybierz miesiąc",prevMonth:"Poprzedni miesiąc",nextMonth:"Następny miesiąc",selectYear:"Wybierz rok",prevYear:"Poprzedni rok",nextYear:"Nastepny rok",selectDecade:"Wybierz dekadę",prevDecade:"Poprzednia dekada",nextDecade:"Nastepna dekada",prevCentury:"Poprzedni wiek",nextCentury:"Nastepny wiek",pickHour:"Pick Hour",incrementHour:"Zwiększ godzinę",decrementHour:"Zmniejsz godzinę",pickMinute:"Pick Minute",incrementMinute:"Zwiększ minuty",decrementMinute:"Zmniejsz minuty",pickSecond:"Pick Second",incrementSecond:"Zwiększ sekundy",decrementSecond:"Zmniejsz sekundy",togglePeriod:"Zmień zakres",selectTime:"Wybierz czas"}})}),(0,e.default)(".we-datetimepicker-date").each(function(){var t=(0,e.default)(this).attr("date-startdate");void 0===t&&(t=!1);var a=(0,e.default)(this).attr("date-enddate");void 0===a&&(a=!1);var r=(0,e.default)(this).attr("date-disabled-weekend");r=void 0!==r&&[0,6],(0,e.default)(this).datetimepicker({calendarWeeks:!0,showClose:!0,showClear:!0,showTodayButton:!0,format:"YYYY-MM-DD",minDate:t,maxDate:a,daysOfWeekDisabled:r,icons:{time:"far fa-clock",date:"far fa-calendar-alt",up:"far fa-arrow-alt-circle-up",down:"far fa-arrow-alt-circle-down",previous:"far fa-arrow-alt-circle-left",next:"far fa-arrow-alt-circle-right",today:"far fa-calendar-check",clear:"far fa-minus-square",close:"far fa-window-close"},tooltips:{today:"Ustaw bieżącą datę i czas do formularza",clear:"Wyczyść datę i czas w formularzu",close:"Zamknij okno",selectMonth:"Wybierz miesiąc",prevMonth:"Poprzedni miesiąc",nextMonth:"Następny miesiąc",selectYear:"Wybierz rok",prevYear:"Poprzedni rok",nextYear:"Nastepny rok",selectDecade:"Wybierz dekadę",prevDecade:"Poprzednia dekada",nextDecade:"Nastepna dekada",prevCentury:"Poprzedni wiek",nextCentury:"Nastepny wiek",pickHour:"Pick Hour",incrementHour:"Zwiększ godzinę",decrementHour:"Zmniejsz godzinę",pickMinute:"Pick Minute",incrementMinute:"Zwiększ minuty",decrementMinute:"Zmniejsz minuty",pickSecond:"Pick Second",incrementSecond:"Zwiększ sekundy",decrementSecond:"Zmniejsz sekundy",togglePeriod:"Zmień zakres",selectTime:"Wybierz czas"}})}),(0,e.default)(".we-datetimepicker-time").each(function(){var t=(0,e.default)(this).attr("date-disabled-weekend");t=void 0!==t&&[0,6];var a=(0,e.default)(this).attr("date-disabledHours");void 0===a&&(a=!1);var r=(0,e.default)(this).attr("date-enabledHours");void 0===r&&(r=!1),(0,e.default)(this).datetimepicker({calendarWeeks:!0,showClose:!0,showClear:!0,showTodayButton:!0,format:"HH:mm:ss",daysOfWeekDisabled:t,disabledHours:a,enabledHours:r,icons:{time:"far fa-clock",date:"far fa-calendar-alt",up:"far fa-arrow-alt-circle-up",down:"far fa-arrow-alt-circle-down",previous:"far fa-arrow-alt-circle-left",next:"far fa-arrow-alt-circle-right",today:"far fa-calendar-check",clear:"far fa-minus-square",close:"far fa-window-close"},tooltips:{today:"Ustaw bieżącą datę i czas do formularza",clear:"Wyczyść datę i czas w formularzu",close:"Zamknij okno",selectMonth:"Wybierz miesiąc",prevMonth:"Poprzedni miesiąc",nextMonth:"Następny miesiąc",selectYear:"Wybierz rok",prevYear:"Poprzedni rok",nextYear:"Nastepny rok",selectDecade:"Wybierz dekadę",prevDecade:"Poprzednia dekada",nextDecade:"Nastepna dekada",prevCentury:"Poprzedni wiek",nextCentury:"Nastepny wiek",pickHour:"Pick Hour",incrementHour:"Zwiększ godzinę",decrementHour:"Zmniejsz godzinę",pickMinute:"Pick Minute",incrementMinute:"Zwiększ minuty",decrementMinute:"Zmniejsz minuty",pickSecond:"Pick Second",incrementSecond:"Zwiększ sekundy",decrementSecond:"Zmniejsz sekundy",togglePeriod:"Zmień zakres",selectTime:"Wybierz czas"}})}),(0,e.default)(".we-datetimepicker-time-noseconds").each(function(){var t=(0,e.default)(this).attr("date-disabled-weekend");t=void 0!==t&&[0,6];var a=(0,e.default)(this).attr("date-disabledHours");void 0===a&&(a=!1);var r=(0,e.default)(this).attr("date-enabledHours");void 0===r&&(r=!1),(0,e.default)(this).datetimepicker({calendarWeeks:!0,showClose:!0,showClear:!0,showTodayButton:!0,format:"HH:mm",daysOfWeekDisabled:t,disabledHours:a,enabledHours:r,icons:{time:"far fa-clock",date:"far fa-calendar-alt",up:"far fa-arrow-alt-circle-up",down:"far fa-arrow-alt-circle-down",previous:"far fa-arrow-alt-circle-left",next:"far fa-arrow-alt-circle-right",today:"far fa-calendar-check",clear:"far fa-minus-square",close:"far fa-window-close"},tooltips:{today:"Ustaw bieżącą datę i czas do formularza",clear:"Wyczyść datę i czas w formularzu",close:"Zamknij okno",selectMonth:"Wybierz miesiąc",prevMonth:"Poprzedni miesiąc",nextMonth:"Następny miesiąc",selectYear:"Wybierz rok",prevYear:"Poprzedni rok",nextYear:"Nastepny rok",selectDecade:"Wybierz dekadę",prevDecade:"Poprzednia dekada",nextDecade:"Nastepna dekada",prevCentury:"Poprzedni wiek",nextCentury:"Nastepny wiek",pickHour:"Pick Hour",incrementHour:"Zwiększ godzinę",decrementHour:"Zmniejsz godzinę",pickMinute:"Pick Minute",incrementMinute:"Zwiększ minuty",decrementMinute:"Zmniejsz minuty",pickSecond:"Pick Second",incrementSecond:"Zwiększ sekundy",decrementSecond:"Zmniejsz sekundy",togglePeriod:"Zmień zakres",selectTime:"Wybierz czas"}})}),(0,e.default)(document).on("click",'[data-toggle="lightbox"]',function(t){t.preventDefault(),(0,e.default)(this).ekkoLightbox()});var t=[["#000","#444","#666","#999","#ccc","#eee","#f3f3f3","#fff"],["#f00","#f90","#ff0","#0f0","#0ff","#00f","#90f","#f0f"],["#f4cccc","#fce5cd","#fff2cc","#d9ead3","#d0e0e3","#cfe2f3","#d9d2e9","#ead1dc"],["#ea9999","#f9cb9c","#ffe599","#b6d7a8","#a2c4c9","#9fc5e8","#b4a7d6","#d5a6bd"],["#e06666","#f6b26b","#ffd966","#93c47d","#76a5af","#6fa8dc","#8e7cc3","#c27ba0"],["#c00","#e69138","#f1c232","#6aa84f","#45818e","#3d85c6","#674ea7","#a64d79"],["#900","#b45f06","#bf9000","#38761d","#134f5c","#0b5394","#351c75","#741b47"],["#600","#783f04","#7f6000","#274e13","#0c343d","#073763","#20124d","#4c1130"]];(0,e.default)(".we-colorpicker").spectrum({showInput:!0,showInitial:!0,allowEmpty:!0,showAlpha:!0,showPalette:!0,preferredFormat:"rgb",palette:t}),(0,e.default)(".we-colorpicker-hex").spectrum({showInput:!0,showInitial:!0,allowEmpty:!0,showAlpha:!1,showPalette:!0,preferredFormat:"hex",palette:t}),(0,e.default)(".we-form-calculate-elements").on("change keyup paste click",function(){var t=0,a=(0,e.default)(this).attr("data-calculate-elements"),r=(0,e.default)(this).attr("data-calculate-sum");(0,e.default)("."+a).each(function(){var a=(0,e.default)(this).val();a.length>0&&(t+=parseFloat(a))}),(0,e.default)("."+r).val(t.toFixed(2))}),(0,e.default)(".we-button-pagination-submit").on("click",function(){var t=(0,e.default)(this).attr("data-operation"),a=(0,e.default)(this).attr("data-target");"next"==t?((0,e.default)("#"+a+" option:selected").next().attr("selected","selected"),(0,e.default)("#Formularz").trigger("submit")):"prev"==t?((0,e.default)("#"+a+" option:selected").prev().attr("selected","selected"),(0,e.default)("#Formularz").trigger("submit")):"last"==t?((0,e.default)("#"+a+" option:last").attr("selected","selected"),(0,e.default)("#Formularz").trigger("submit")):((0,e.default)("#"+a+" option:first").attr("selected","selected"),(0,e.default)("#Formularz").trigger("submit"))}),void 0!==F&&(0,e.default)("textarea.tinymce").length&&F.init({selector:"textarea.tinymce",language:"pl",plugins:["code","autolink","link","image","lists","advlist","hr","nonbreaking","autoresize","searchreplace","wordcount","visualblocks","visualchars","fullscreen","insertdatetime","paste","table"],autoresize_max_height:500,toolbar:"insertfile und
642o redo | bold italic underline strikethrough removeformat | link image | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | styleselect fontsizeselect",fontsize_formats:"0.5rem 0.6rem 0.7rem 0.8rem 0.9rem 1.0rem 1.1rem 1.2rem 1.3rem 1.4rem 1.5rem 1.6rem 1.7rem 1.8rem 1.9rem 2.0rem 2.1rem 2.2rem 2.3rem 2.4rem 2.5rem 2.6rem 2.7rem 2.8rem 2.9rem 3.0rem",convert_urls:!1,relative_urls:!1,entity_encoding:"raw"}),(0,e.default)(".we-over-comments").on("mouseover",function(){var t=(0,e.default)(this).attr("data-we-over-comments");t&&parent.FrameComments&&parent.FrameComments(t)}),(0,e.default)(".we-checkbox-controler-clickallchecked").on("click",function(){var t=(0,e.default)(this).attr("data-class-controler");(0,e.default)("input."+t+":checkbox").prop("checked",this.checked)}),(0,e.default)(".we-radio-controler-setallvalue").on("click",function(){var t=(0,e.default)(this).attr("data-class-controler");(0,e.default)("input."+t+":radio").filter('[value="'+(0,e.default)(this).val()+'"]').prop("checked",!0)}),(0,e.default)(".we-form-control").on("change keyup paste",function(){(0,e.default)("button.nav-link.active").addClass("we-change-data")}),(0,e.default)(".we-form-search-field-text").on("keypress",function(t){"Enter"==t.key&&(0,e.default)("#Formularz").trigger("submit")}),(0,e.default)(".we-button-click-submit-hidden").on("click",function(){(0,e.default)("#"+(0,e.default)(this).attr("id")+"hidden").val(1),(0,e.default)("#Formularz").trigger("submit")}),(0,e.default)(".we-change-form-submit-id").on("change",function(){var t=(0,e.default)(this).attr("data-we-change-form-submit-id");t&&(0,e.default)("#"+t).trigger("submit")}),(0,e.default)(".we-click-form-submit-id").on("click",function(){var t=(0,e.default)(this).attr("data-we-click-form-submit-id");t&&(0,e.default)("#"+t).trigger("submit")}),(0,e.default)(".we-mapcreator").each(function(){var t=[],a=[],r=[],i=[],o=null,l=(0,e.default)(this).attr("id"),f=parseInt((0,e.default)(this).attr("data-idmap")),m=parseFloat((0,e.default)(this).attr("data-default-lon")),h=parseFloat((0,e.default)(this).attr("data-default-lat")),j=parseInt((0,e.default)(this).attr("data-default-zoom")),q=parseInt((0,e.default)(this).attr("data-addmarker")),A=(0,e.default)(this).attr("data-addmarker-image"),D=(0,e.default)(this).attr("data-addmarker-icon-anchor-x-units"),L=(0,e.default)(this).attr("data-addmarker-icon-anchor-y-units"),Y=parseFloat((0,e.default)(this).attr("data-addmarker-icon-anchor-x")),W=parseFloat((0,e.default)(this).attr("data-addmarker-icon-anchor-y")),H=parseFloat((0,e.default)(this).attr("data-addmarker-icon-opacity")),R=!!(0,e.default)(this).attr("data-get-latlon"),T=(0,e.default)(this).attr("data-form-lon"),U=(0,e.default)(this).attr("data-form-lat"),G=(0,e.default)(this).attr("data-form-zoom"),F=(0,e.default)(this).attr("data-form-info"),_=(0,e.default)(this).attr("data-form-postcode"),V=(0,e.default)(this).attr("data-form-city"),J=(0,e.default)(this).attr("data-form-village"),$=(0,e.default)(this).attr("data-form-country"),K=(0,e.default)(this).attr("data-form-road"),Q=(0,e.default)(this).attr("data-form-house-number"),ee="1"==(0,e.default)(this).attr("data-controls-overviewmap")||"true"==(0,e.default)(this).attr("data-controls-overviewmap"),te="0"==(0,e.default)(this).attr("data-controls-overviewmap")||"false"==(0,e.default)(this).attr("data-controls-overviewmap"),ae="1"==(0,e.default)(this).attr("data-default-interactions-onfocusonly")||"true"==(0,e.default)(this).attr("data-default-interactions-onfocusonly"),re="0"==(0,e.default)(this).attr("data-default-interactions-onfocusonly")||"false"==(0,e.default)(this).attr("data-default-interactions-onfocusonly"),ie=(0,e.default)(this).attr("data-geojson-url"),oe="1"==(0,e.default)(this).attr("data-geojson-fit")||"true"==(0,e.default)(this).attr("data-geojson-fit"),ne=(0,e.default)(this).attr("data-geojson-object");ne="undefined"!==Z(ne)&&!1!==ne?JSON.parse(decodeURIComponent(ne)):"";var de="1"==(0,e.default)(this).attr("data-wkt-fit")||"true"==(0,e.default)(this).attr("data-wkt-fit"),se=30;(0,e.default)(this).attr("data-wkt-padding")&&(se=(0,e.default)(this).attr("data-wkt-padding"));var le=(0,e.default)(this).attr("data-wkt-object");le="undefined"!==Z(le)&&!1!==le?decodeURIComponent(le):"";var ce=(0,e.default)(this).attr("data-kml-url"),ue="1"==(0,e.default)(this).attr("data-kml-fit")||"true"==(0,e.default)(this).attr("data-kml-fit"),fe="1"==(0,e.default)(this).attr("data-search-on")||"true"==(0,e.default)(this).attr("data-search-on"),pe="we-map-id-"+l,me=f&&"undefined"!=typeof weMapCreatorConfig&&weMapCreatorConfig&&weMapCreatorConfig.hasOwnProperty(f)?weMapCreatorConfig[f]:{config:{defaulthref:"/we/ext/we/",defaultMap:{Lon:0,Lat:0,Zoom:12},defaultInteractions:{OnFocusOnly:!0},defaultControls:{OverviewMap:!1,ZoomSlider:!1,ScaleLine:!1,MousePosition:!1,ContextMenu:!1}}
642,groups:[{openpanel:!1,id:1,label:"Podkład",type:"radio",addempty:!1,addemptylabel:"",addmenu:0,layers:[{provider:"osm",layerid:10,opacity:1,visible:!0,selectable:!1,addmenu:!1,label:"Open Street Maps",scheme:"osm"}]}]},ve=me.hasOwnProperty("config")?me.config:{defaulthref:"/we/ext/we/",defaultMap:{Lon:0,Lat:0,Zoom:12},defaultInteractions:{OnFocusOnly:!0},defaultControls:{OverviewMap:!1,ZoomSlider:!1,ScaleLine:!1,MousePosition:!1,ContextMenu:!1}},he=ve.hasOwnProperty("defaulthref")?ve.defaulthref:"/we/ext/we/",ge=ve.hasOwnProperty("defaultInteractions")?ve.defaultInteractions:{OnFocusOnly:!0},ye=!ge.hasOwnProperty("OnFocusOnly")||ge.OnFocusOnly;ae&&(ye=!0),re&&(ye=!1);var we=ve.hasOwnProperty("defaultControls")?ve.defaultControls:{OverviewMap:!1,ZoomSlider:!1,ScaleLine:!1,MousePosition:!1,ContextMenu:!1},be=!!we.hasOwnProperty("OverviewMap")&&we.OverviewMap,ke=!!we.hasOwnProperty("ZoomSlider")&&we.ZoomSlider,Se=!!we.hasOwnProperty("ScaleLine")&&we.ScaleLine,ze=!!we.hasOwnProperty("MousePosition")&&we.MousePosition,Me=!!we.hasOwnProperty("ContextMenu")&&we.ContextMenu,xe=ve.hasOwnProperty("defaultMap")?ve.defaultMap:{Lon:0,Lat:0,Zoom:12};m=m||(xe.hasOwnProperty("Lon")?xe.Lon:0),h=h||(xe.hasOwnProperty("Lat")?xe.Lat:0),j=j||(xe.hasOwnProperty("Zoom")?xe.Zoom:15);var Pe=[{text:"Przybliż mapę",icon:he+"image/maps-marker/context-menu-zoom-in.png",callback:function(e,t){var a=t.getView();a.animate({zoom:a.getZoom()+1,duration:700,center:e.coordinate})}},{text:"Oddal mapę",icon:he+"image/maps-marker/context-menu-zoom-out.png",callback:function(e,t){var a=t.getView();a.animate({zoom:a.getZoom()-1,duration:700,center:e.coordinate})}},{text:"Wycentruj mapę",icon:he+"image/maps-marker/context-menu-center.png",callback:function(e){nt.animate({duration:700,center:e.coordinate})}}];if(me.hasOwnProperty("groups"))for(var je=0;je<me.groups.length;je++){if((qe=me.groups[je]).hasOwnProperty("layers"))for(var Ie=0;Ie<qe.layers.length;Ie++){(Oe=X(Re=qe.layers[Ie]))&&(Oe.set("id",l),Oe.set("idmap",f),Oe.set("grouptype",qe.type),Oe.set("groupid",qe.id),Oe.set("provider",Re.provider),Oe.set("layerid",Re.id),Oe.set("selectable",Re.selectable),t.unshift(Oe))}}if(me.hasOwnProperty("layers"))for(Ie=0;Ie<me.layers.length;Ie++){var Oe;(Oe=X(Re=me.layers[Ie]))&&(Oe.set("id",l),Oe.set("idmap",f),Oe.set("grouptype","checkbox"),Oe.set("groupid",1),Oe.set("provider",Re.provider),Oe.set("layerid",Re.id),Oe.set("selectable",Re.selectable),t.unshift(Oe))}if(t.length>0){(0,e.default)(this).append('<div class="we-map-content"><div id="'+pe+'" class="we-map"></div></div>'),fe&&(0,e.default)(this).append('<div id="'+pe+'-search" class="we-map-search-position"><div class="input-group input-group-sm"><input type="text" id="'+pe+'-search-query" class="form-control" placeholder="szukaj miejsca na mapie" aria-label="szukaj" aria-describedby="wyszukiwarka"><div class="input-group-prepend"><div class="input-group-text"><input type="checkbox" id="'+pe+'-search-query-type" aria-label="Wyniki jako punkty" title="Pokaż wyniki jako punkty na mapie"></div></div> <div class="input-group-append"><button class="btn btn-sm btn-secondary we-map-search-btn" data-search-query-id="'+pe+'-search-query" data-idmap="'+f+'" type="button">szukaj</button></div></div></div>'),(0,e.default)(this).append('<div id="'+pe+'-mouse-position" class="we-map-mouse-position"></div>'),(0,e.default)(this).append('<div id="'+pe+'-popup" class="ol-popup"><div id="'+pe+'-popup-closer" class="ol-popup-closer"></div><div id="'+pe+'-popup-title" class="ol-popup-title"></div><div id="'+pe+'-popup-content" class="ol-popup-content"></div></div>');var Ce=[];if(me.hasOwnProperty("groups")){for(je=0;je<me.groups.length;je++){var qe,Ae=(qe=me.groups[je]).hasOwnProperty("id")?qe.id:"",Ee=qe.hasOwnProperty("type")?qe.type:"",De=!!qe.hasOwnProperty("addempty")&&qe.addempty,Le=qe.hasOwnProperty("addemptylabel")?""==qe.addemptylabel?"brak / pusty":qe.addemptylabel:"brak / pusty",Ye=qe.hasOwnProperty("label")?qe.label:"Lista elementów",We=!!qe.hasOwnProperty("addmenu")&&qe.addmenu,He=qe.hasOwnProperty("openpanel")&&qe.openpanel?"show":"";if(We){var Ze=[];if(Ee&&qe.hasOwnProperty("layers"))for(Ie=0;Ie<qe.layers.length;Ie++){var Re;if((Re=qe.layers[Ie]).hasOwnProperty("addmenu")&&Re.addmenu){var Te=Re.hasOwnProperty("label")?Re.label:"brak nazwy";"radio"==Ee?Ze.push('<div class="form-check"><input class="form-check-input we-map-layer" type="radio" data-group-type="'+Ee+'" data-group-id="'+Ae+'" data-id="'+l+'" data-idmap="'+f+'" data-layer-id="'+Re.id+'" name="'+pe+"-"+Ae+'-layer" id="'+pe+"-"+Ae+"-"+Re.id+'-layer" value="'+Re.id+'"'+(1==Re.visible?" checked":"")+'><label class="form-check-label" for="'+pe+"-"+Ae+"-"+Re.id+'-layer">'+Te+"</label></div>"):"checkbox"==Ee&&Ze.push('<div class="form-check"><input class="form-check-input we-map-layer" type="checkbox" data-group-type="'+Ee+'" data-group-id="'+Ae+'"  data-id="'+l+'" data-idmap="'+f+'"  data-layer-id="'+Re.id+'" name="'+pe+"-"+Ae+"-layer
642-id-"+Re.id+'" id="'+pe+"-"+Ae+"-layer-id-"+Re.id+'" value="1"'+(1==Re.visible?" checked":"")+'><label class="form-check-label" for="'+pe+"-"+Ae+"-layer-id-"+Re.id+'">'+Te+"</label></div>")}}Ze.length>0&&(Ce.push('<div class="card rounded-0 border-0"><div class="card-header p-0 m-0" id="'+pe+"-heading"+je+'"><button class="btn btn-link rounded-0" type="button" data-toggle="collapse" data-target="#'+pe+"-collapse"+je+'" aria-expanded="true" aria-controls="'+pe+"-collapse"+je+'">'+Ye+'</button></div><div id="'+pe+"-collapse"+je+'" class="collapse '+He+'" aria-labelledby="'+pe+"-heading"+je+'" data-parent="#'+pe+'-accordion"><div class="card-body py-2">'),De&&Ce.push('<div class="form-check"><input class="form-check-input we-map-layer" type="radio" data-group-type="'+Ee+'" data-group-id="'+Ae+'"  data-id="'+l+'" data-idmap="'+f+'"  data-layer-id="0" name="'+pe+"-"+Ae+'-layer" id="'+pe+"-"+Ae+'-0-layer" value="0"><label class="form-check-label" for="'+pe+"-"+Ae+'-0-layer">'+Le+"</label></div>"),Ce.push(Ze.join("")),Ce.push("</div></div></div>"))}}Ce.length>0&&(0,e.default)(this).append('<div id="'+pe+'-menu" class="we-map-menu border"><div id="'+pe+'-accordion" class="accordion we-map-accordion">'+Ce.join("")+"</div>")}var Ue=document.getElementById(pe+"-popup"),Ge=document.getElementById(pe+"-popup-title"),Fe=document.getElementById(pe+"-popup-content"),_e=document.getElementById(pe+"-popup-closer"),Ve=new p.default({element:Ue,autoPan:!0,autoPanAnimation:{duration:250}});_e.onclick=function(){return Ge.innerHTML="",Fe.innerHTML="",Ve.setPosition(void 0),_e.blur(),!1},A=A||he+"image/maps-marker/map-marker-default.png",Y=Y||.5,W=W||1,D=D||"fraction",L=L||"fraction",H=H||1;var Xe=new I.Icon({anchor:[Y,W],anchorXUnits:D,anchorYUnits:L,src:A});if(q){var Ne=new z.Vector({source:new g.default({features:[new O.default({geometry:new C.default((0,c.fromLonLat)([m,h]))})],attributions:'&copy; <a href="http://d17.pl/" target="_blank">d17.pl</a>'}),style:new I.Style({image:Xe}),opacity:H});Ne.set("selectable",!0),Ne.set("provider","marker"),t.push(Ne)}var Je={Point:new I.Style({image:Xe}),LineString:new I.Style({stroke:new I.Stroke({color:"blue",width:2})}),MultiLineString:new I.Style({stroke:new I.Stroke({color:"blue",width:2})}),MultiPoint:new I.Style({image:Xe}),MultiPolygon:new I.Style({stroke:new I.Stroke({color:"blue",width:2}),fill:new I.Fill({color:"rgba(0, 0, 255, 0.1)"})}),Polygon:new I.Style({stroke:new I.Stroke({color:"blue",width:2}),fill:new I.Fill({color:"rgba(0, 0, 255, 0.1)"})}),GeometryCollection:new I.Style({stroke:new I.Stroke({color:"blue",width:2}),fill:new I.Fill({color:"magenta"}),image:new I.Circle({radius:10,fill:null,stroke:new I.Stroke({color:"magenta"})})}),Circle:new I.Style({stroke:new I.Stroke({color:"blue",width:2}),fill:new I.Fill({color:"rgba(255,0,0,0.2)"})})},Be=function(e){return Je[e.getGeometry().getType()]};if(le){var $e=(new w.default).readFeature(le,{dataProjection:"EPSG:4326",featureProjection:"EPSG:3857"}),Ke=new g.default({features:[$e],attributions:'&copy; <a href="http://d17.pl/" target="_blank">d17.pl</a>'}),Qe=new z.Vector({source:Ke,style:Be,visible:1,opacity:1});if(Qe.set("selectable",!0),Qe.set("provider","dataWKT"),t.push(Qe),de){var et=Ke.getFeatures();et&&(o=(0,P.createEmpty)(),et.length&&et.forEach(function(e){var t=e.getGeometry();t&&(0,P.extend)(o,t.getExtent())}))}}if(ne){var tt,at=new g.default({features:(new y.default).readFeatures(ne,{dataProjection:"EPSG:4326",featureProjection:"EPSG:3857"}),attributions:'&copy; <a href="http://d17.pl/" target="_blank">d17.pl</a>'});if((tt=new z.Vector({source:at,style:Be,visible:1,opacity:1})).set("selectable",!0),tt.set("provider","dataGeojson"),t.push(tt),oe){var rt=at.getFeatures();rt.length&&(o=(0,P.createEmpty)(),rt.forEach(function(e){var t=e.getGeometry();t&&(0,P.extend)(o,t.getExtent())}))}}if(ie)(tt=new z.Vector({source:new g.default({url:ie,format:new y.default({dataProjection:"EPSG:4326",featureProjection:"EPSG:3857"}),attributions:'&copy; <a href="http://d17.pl/" target="_blank">d17.pl</a>'}),style:Be,visible:1,opacity:1})).set("selectable",!0),tt.set("provider","dataGeojson"),t.push(tt),Ge.innerHTML="Czekaj...",Fe.innerHTML="Trwa pobieranie danych...",Ve.setPosition((0,c.fromLonLat)([m,h])),tt.getSource().on("change",function(e){var t=e.target;if("ready"===t.getState()){if(oe){var a=t.getFeatures();a&&(o=(0,P.createEmpty)(),a.forEach(function(e){var t=e.getGeometry();t&&(0,P.extend)(o,t.getExtent())}),dt.getView().fit(o,{padding:[se,se,se,se]}))}Ve.setPosition(void 0)}});if(ce){var it=new z.Vector({source:new g.default({url:ce,projection:"EPSG:3857",format:new S.default({extractStyles:!0,extractAttributes:!0,maxDepth:10})}),visible:1,opacity:1});
642it.set("selectable",!0),it.set("provider","kml"),t.push(it),Ge.innerHTML="Czekaj...",Fe.innerHTML="Trwa pobieranie danych...",Ve.setPosition((0,c.fromLonLat)([m,h])),it.getSource().on("change",function(e){var t=e.target;if("ready"===t.getState()){if(ue){var a=t.getFeatures();a&&(o=(0,P.createEmpty)(),a.forEach(function(e){var t=e.getGeometry();t&&(0,P.extend)(o,t.getExtent())}),dt.getView().fit(o,{padding:[se,se,se,se]}))}Ve.setPosition(void 0)}})}r.push(Ve),a.push(new s.Attribution({collapsible:!1})),ee&&(be=!0),te&&(be=!1),be&&a.push(new s.OverviewMap({layers:[new u.default({source:new v.default})]})),ke&&a.push(new s.ZoomSlider),Se&&a.push(new s.ScaleLine),ze&&a.push(new b.default({coordinateFormat:(0,k.createStringXY)(8),projection:"EPSG:4326",className:"custom-mouse-position",target:document.getElementById(pe+"-mouse-position"),undefinedHTML:""})),Me&&a.push(new M.default({width:210,defaultItems:!1,items:Pe}));var ot=new O.default;ot.setStyle(new I.Style({image:new I.Icon({anchor:[.5,1],src:he+"image/maps-marker/map-marker-getlatlon.png"})})),ot.setGeometry((0,c.fromLonLat)([m,h])?new C.default((0,c.fromLonLat)([m,h])):null);var nt=new d.default({center:(0,c.fromLonLat)([m,h]),zoom:j}),dt=new n.default({interactions:(0,x.defaults)({onFocusOnly:ye}),controls:(0,s.defaults)({attribution:!1}).extend(a),layers:t,overlays:r,loadTilesWhileInteracting:!0,target:pe,view:nt});o&&dt.getView().fit(o,{padding:[se,se,se,se]}),dt.getView().on("change:resolution",function(t){R&&G&&(0,e.default)("#"+G).val(dt.getView().getZoom().toFixed(2))}),dt.on("click",function(t){if(i.length>0){for(var a=0;a<i.length;a++)i[a].setStyle(null);i=[]}if(dt.forEachFeatureAtPixel(t.pixel,function(e,a){if(Ge.innerHTML="",Fe.innerHTML="",Ve.setPosition(void 0),a&&1==a.get("selectable"))if("dataGeojson"==a.get("provider")){var r=e.getProperties();if(r){var o=[];Object.entries(r).forEach(function(e){var t=E(e,2),a=t[0],r=t[1];"object"!==Z(r)&&o.push(a+": "+r)}),o.length>0&&(Ge.innerHTML="szczegóły:",Fe.innerHTML=o.join("<br>"),Ve.setPosition(t.coordinate))}}else if("kml-chart"==a.get("provider")){var n=e.get("features");if(n.length>1){var d=e.getGeometry().getCoordinates();Ge.innerHTML="Grupa obiektów: "+n.length,Fe.innerHTML="W tym miejscu znajduje się więcej obiektów.<br>Przybliż mapę do tego miejsca aby zobaczyć szczegóły.",Ve.setPosition(d)}else if(1==n.length){if(void 0!==n[0].get("name")||void 0!==n[0].get("description")){d=n[0].getGeometry().getCoordinates();void 0!==n[0].get("name")&&(Ge.innerHTML=n[0].get("name")),void 0!==n[0].get("description")&&(Fe.innerHTML=n[0].get("description")),Ve.setPosition(d)}e.setStyle(B(n[0],!0)),i.push(e)}}else if("kml-marker-cluster"==a.get("provider")||"geojson-marker-cluster"==a.get("provider")){var s=e.get("features");if(s.length>1){d=e.getGeometry().getCoordinates();Ge.innerHTML="Grupa obiektów: "+s.length,Fe.innerHTML="W tym miejscu znajduje się więcej obiektów.<br>Przybliż mapę do tego miejsca aby zobaczyć szczegóły.",Ve.setPosition(d)}else if(1==s.length&&(void 0!==s[0].get("name")||void 0!==s[0].get("description"))){d=s[0].getGeometry().getCoordinates();void 0!==s[0].get("name")&&(Ge.innerHTML=s[0].get("name")),void 0!==s[0].get("description")&&(Fe.innerHTML=s[0].get("description")),Ve.setPosition(d)}}else if(void 0!==e.get("name")||void 0!==e.get("description")){d=e.getGeometry().getCoordinates();void 0!==e.get("name")&&(Ge.innerHTML=e.get("name")),void 0!==e.get("description")&&(Fe.innerHTML=e.get("description")),Ve.setPosition(d)}}),R){var r=(0,c.toLonLat)(t.coordinate);nt.animate({duration:500,center:(0,c.fromLonLat)(r)}),ot.setGeometry(t.coordinate?new C.default(t.coordinate):null),T&&(0,e.default)("#"+T).val(r[0]).trigger("change"),U&&(0,e.default)("#"+U).val(r[1]).trigger("change"),G&&(0,e.default)("#"+G).val(dt.getView().getZoom().toFixed(2)).trigger("change"),N($,_,V,J,K,Q,F,r[0],r[1])}}),(0,e.default)("button.we-map-search-btn").on("click",function(){var t=(0,e.default)(this).attr("data-search-query-id"),a=(0,e.default)(this).attr("data-idmap"),r=(0,e.default)("#"+t)?(0,e.default)("#"+t).val():"",i=1;if((0,e.default)("#"+t+"-type").is(":checked")&&(i=0),f==a&&(dt.getLayers().getArray().forEac
642h(function(e,t){"searchLayer"==e.get("provider")&&dt.removeLayer(e)}),r)){var n=new g.default({url:"https://nominatim.openstreetmap.org/search?format=geojson&polygon_geojson="+i+"&q="+r,format:new y.default}),d=new z.Vector({source:n,style:Be,visible:1,opacity:1});d.set("selectable",!0),d.set("provider","searchLayer"),dt.addLayer(d),n.on("change",function(e){if("ready"==n.getState()){o=(0,P.createEmpty)();var t=n.getFeatures();t.length&&(t.forEach(function(e){(0,P.extend)(o,e.getGeometry().getExtent())}),dt.getView().fit(o,{padding:[se,se,se,se],minZoom:19}))}})}}),dt.once("postrender",function(a){(0,e.default)(".we-map-layer").on("change",function(){var a=(0,e.default)(this).attr("name"),r=(0,e.default)(this).attr("data-id"),i=(0,e.default)(this).attr("data-idmap"),o=(0,e.default)(this).attr("data-group-id"),n=(0,e.default)(this).attr("data-group-type"),d=(0,e.default)(this).attr("data-layer-id");if("radio"==n){for(var s=(0,e.default)("input[type=radio][name="+a+"]:checked").val(),l=0;l<t.length;l++)if(t[l].get("id")==r&&t[l].get("idmap")==i&&t[l].get("groupid")==o){var c=t[l].get("layerid")==s;t[l].setVisible(c)}}else if("checkbox"==n)for(l=0;l<t.length;l++)if(t[l].get("id")==r&&t[l].get("idmap")==i&&t[l].get("groupid")==o&&t[l].get("layerid")==d){c=!!(0,e.default)("input[type=checkbox][name="+a+"]:checked").val();t[l].setVisible(c)}}),R&&new z.Vector({map:dt,source:new g.default({features:[ot]})})})}}),$(),ee()});
643},{"jquery":"HlZQ","popper.js":"v5IM","bootstrap":"pe4o","@fortawesome/fontawesome-free/css/all.css":"Eofe","@mdi/font/css/materialdesignicons.css":"FWXb","bootstrap/dist/css/bootstrap.min.css":"H97Y","js-cookie":"lMlK","jssha":"XEp8","moment":"iROh","chart.js":"IvHv","jquery.cookie":"RkNv","jquery-countdown":"f12I","jquery-knob":"uc98","spectrum-colorpicker":"VWng","spectrum-colorpicker/i18n/jquery.spectrum-pl":"n0k7","spectrum-colorpicker/spectrum.css":"H97Y","dropzone":"OEzi","dropzone/dist/min/dropzone.min.css":"H97Y","ekko-lightbox/dist/ekko-lightbox.css":"H97Y","ekko-lightbox/dist/ekko-lightbox.js":"xIWz","jquery.fancytree/dist/skin-win8/ui.fancytree.min.css":"kqo8","jquery.fancytree":"laCd","jquery.fancytree/dist/modules/jquery.fancytree.dnd5":"kCJZ","jquery.fancytree/dist/modules/jquery.fancytree.edit":"kHDm","jquery.fancytree/dist/modules/jquery.fancytree.gridnav":"ICrm","jquery.fancytree/dist/modules/jquery.fancytree.table":"ovbB","jquery.fancytree/dist/modules/jquery.fancytree.persist":"MKUk","jquery.fancytree/dist/modules/jquery.fancytree.filter":"MaIk","detect-browser":"MXTL","tinymce/tinymce":"PBio","tinymce/themes/silver":"wAqg","./tinymce/langs/pl.js":"xPuB","./bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css":"Adhb","./bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js":"E26t","what-input":"w4x1","ol/ol.css":"H97Y","ol/Map.js":"kYy5","ol/View.js":"hNqE","ol/control.js":"ucqx","ol/source/Stamen.js":"ehVO","ol/proj":"Diht","ol/layer/Tile.js":"BUEc","ol/source/TileWMS.js":"IcO7","ol/Overlay.js":"qWcX","ol/source/XYZ.js":"knlU","ol/source/OSM.js":"Rmo4","ol/source/Cluster.js":"sV2m","ol/source/Vector.js":"ZS12","ol/format/GeoJSON":"qBlb","ol/format/WKT":"FkYy","ol/control/MousePosition.js":"Cbl8","ol/coordinate.js":"nGsj","ol/format/KML.js":"DiYy","ol/layer.js":"ZVaS","ol-contextmenu/dist/ol-contextmenu.css":"H97Y","ol-contextmenu/dist/ol-contextmenu.js":"sr95","ol/interaction":"aMDX","ol/extent":"QDir","ol-ext/style/Chart":"dlS6","ol/style.js":"qeKX","ol/Feature":"mYW9","ol/geom/Point":"gLcY","./index_we.css":"H97Y","./index_we.js":"DiVX"}]},{},["Focm"], null)
644//# sourceMappingURL=we.4be18e03.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.