lujanfernaud/prevy

View on GitHub
public/assets/application-baeeec15d12f7810ef4f54ed91ad25fe6103b1377eb37bd5d78731d7ab8d896c.js

Summary

Maintainability
A
0 mins
Test Coverage
(function(){var t=this;(function(){(function(){this.Rails={linkClickSelector:"a[data-confirm], a[data-method], a[data-remote]:not([disabled]), a[data-disable-with], a[data-disable]",buttonClickSelector:{selector:"button[data-remote]:not([form]), button[data-confirm]:not([form])",exclude:"form button"},inputChangeSelector:"select[data-remote], input[data-remote], textarea[data-remote]",formSubmitSelector:"form",formInputClickSelector:"form input[type=submit], form input[type=image], form button[type=submit], form button:not([type]), input[type=submit][form], input[type=image][form], button[type=submit][form], button[form]:not([type])",formDisableSelector:"input[data-disable-with]:enabled, button[data-disable-with]:enabled, textarea[data-disable-with]:enabled, input[data-disable]:enabled, button[data-disable]:enabled, textarea[data-disable]:enabled",formEnableSelector:"input[data-disable-with]:disabled, button[data-disable-with]:disabled, textarea[data-disable-with]:disabled, input[data-disable]:disabled, button[data-disable]:disabled, textarea[data-disable]:disabled",fileInputSelector:"input[name][type=file]:not([disabled])",linkDisableSelector:"a[data-disable-with], a[data-disable]",buttonDisableSelector:"button[data-remote][data-disable-with], button[data-remote][data-disable]"}}).call(this)}).call(t);var y=t.Rails;(function(){(function(){var i,n;n=Element.prototype.matches||Element.prototype.matchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.oMatchesSelector||Element.prototype.webkitMatchesSelector,y.matches=function(t,e){return null!=e.exclude?n.call(t,e.selector)&&!n.call(t,e.exclude):n.call(t,e)},i="_ujsData",y.getData=function(t,e){var n;return null!=(n=t[i])?n[e]:void 0},y.setData=function(t,e,n){return null==t[i]&&(t[i]={}),t[i][e]=n},y.$=function(t){return Array.prototype.slice.call(document.querySelectorAll(t))}}).call(this),function(){var n,i,o;n=y.$,o=y.csrfToken=function(){var t;return(t=document.querySelector("meta[name=csrf-token]"))&&t.content},i=y.csrfParam=function(){var t;return(t=document.querySelector("meta[name=csrf-param]"))&&t.content},y.CSRFProtection=function(t){var e;if(null!=(e=o()))return t.setRequestHeader("X-CSRF-Token",e)},y.refreshCSRFTokens=function(){var t,e;if(e=o(),t=i(),null!=e&&null!=t)return n('form input[name="'+t+'"]').forEach(function(t){return t.value=e})}}.call(this),function(){var o,e,r;r=y.matches,"function"!=typeof(o=window.CustomEvent)&&((o=function(t,e){var n;return(n=document.createEvent("CustomEvent")).initCustomEvent(t,e.bubbles,e.cancelable,e.detail),n}).prototype=window.Event.prototype),e=y.fire=function(t,e,n){var i;return i=new o(e,{bubbles:!0,cancelable:!0,detail:n}),t.dispatchEvent(i),!i.defaultPrevented},y.stopEverything=function(t){return e(t.target,"ujs:everythingStopped"),t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation()},y.delegate=function(t,n,e,i){return t.addEventListener(e,function(t){var e;for(e=t.target;e instanceof Element&&!r(e,n);)e=e.parentNode;if(e instanceof Element&&!1===i.call(e,t))return t.preventDefault(),t.stopPropagation()})}}.call(this),function(){var e,i,t,o,r;i=y.CSRFProtection,y.fire,e={"*":"*/*",text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript",script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},y.ajax=function(e){var n;return e=o(e),n=t(e,function(){var t;return t=r(n.response,n.getResponseHeader("Content-Type")),2===Math.floor(n.status/100)?"function"==typeof e.success&&e.success(t,n.statusText,n):"function"==typeof e.error&&e.error(t,n.statusText,n),"function"==typeof e.complete?e.complete(n,n.statusText):void 0}),!("function"!=typeof e.beforeSend||!e.beforeSend(n,e))&&(n.readyState===XMLHttpRequest.OPENED?n.send(e.data):void 0)},o=function(t){return t.url=t.url||location.href,t.type=t.type.toUpperCase(),"GET"===t.type&&t.data&&(t.url.indexOf("?")<0?t.url+="?"+t.data:t.url+="&"+t.data),null==e[t.dataType]&&(t.dataType="*"),t.accept=e[t.dataType],"*"!==t.dataType&&(t.accept+=", */*; q=0.01"),t},t=function(t,e){var n;return(n=new XMLHttpRequest).open(t.type,t.url,!0),n.setRequestHeader("Accept",t.accept),"string"==typeof t.data&&n.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),t.crossDomain||n.setRequestHeader("X-Requested-With","XMLHttpRequest"),i(n),n.withCredentials=!!t.withCredentials,n.onreadystatechange=function(){if(n.readyState===XMLHttpRequest.DONE)return e(n)},n},r=function(t,e){var n,i;if("string"==typeof t&&"string"==typeof e)if(e.match(/\bjson\b/))try{t=JSON.parse(t)}catch(o){}else if(e.match(/\b(?:java|ecma)script\b/))(i=document.createElement("script")).text=t,document.head.appendChild(i).parentNode.removeChild(i);else if(e.match(/\b(xml|html|svg)\b/)){n=new DOMParser,e=e.replace(/;.+/,"");try{t=n.parseFromString(t,e)}catch(o){}}return t},y.href=function(t){return t.href},y.isCrossDomain=function(t){var e,n;(e=document.createElement("a")).href=location.href,n=document.createElement("a");try{return n.href=t,!((!n.protocol||":"===n.protocol)&&!n.host||e.protocol+"//"+e.host==n.protocol+"//"+n.host)}catch(i){return i,!0}}}.call(this),function(){var o,r;o=y.matches,r=function(t){return Array.prototype.slice.call(t)},y.serializeElement=function(t,e){var n,i;return n=[t],o(t,"form")&&(n=r(t.elements)),i=[],n.forEach(function(e){if(e.name&&!e.disabled)return o(e,"select")?r(e.options).forEach(function(t){if(t.selected)return i.push({name:e.name,value:t.value})}):e.checked||-1===["radio","checkbox","submit"].indexOf(e.type)?i.push({name:e.name,value:e.value}):void 0}),e&&i.push(e),i.map(function(t){return null!=t.name?encodeURIComponent(t.name)+"="+encodeURIComponent(t.value):t}).join("&")},y.formElements=function(t,e){return o(t,"form")?r(t.elements).filter(function(t){return o(t,e)}):r(t.querySelectorAll(e))}}.call(this),function(){var e,r,n;r=y.fire,n=y.stopEverything,y.handleConfirm=function(t){if(!e(this))return n(t)},e=function(t){var e,n,i;if(!(i=t.getAttribute("data-confirm")))return!0;if(e=!1,r(t,"confirm")){try{e=confirm(i)}catch(o){}n=r(t,"confirm:complete",[e])}return e&&n}}.call(this),function(){var n,i,o,r,s,a,e,u,l,c,h;l=y.matches,u=y.getData,c=y.setData,h=y.stopEverything,e=y.formElements,y.handleDisabledElement=function(t){if(this.disabled)return h(t)},y.enableElement=function(t){var e;return e=t instanceof Event?t.target:t,l(e,y.linkDisableSelector)?a(e):l(e,y.buttonDisableSelector)||l(e,y.formEnableSelector)?r(e):l(e,y.formSubmitSelector)?s(e):void 0},y.disableElement=function(t){var e;return e=t instanceof Event?t.target:t,l(e,y.linkDisableSelector)?o(e):l(e,y.buttonDisableSelector)||l(e,y.formDisableSelector)?n(e):l(e,y.formSubmitSelector)?i(e):void 0},o=function(t){var e;return null!=(e=t.getAttribute("data-disable-with"))&&(c(t,"ujs:enable-with",t.innerHTML),t.innerHTML=e),t.addEventListener("click",h),c(t,"ujs:disabled",!0)},a=function(t){var e;return null!=(e=u(t,"ujs:enable-with"))&&(t.innerHTML=e,c(t,"ujs:enable-with",null)),t.removeEventListener("click",h),c(t,"ujs:disabled",null)},i=function(t){return e(t,y.formDisableSelector).forEach(n)},n=function(t){var e;return null!=(e=t.getAttribute("data-disable-with"))&&(l(t,"button")?(c(t,"ujs:enable-with",t.innerHTML),t.innerHTML=e):(c(t,"ujs:enable-with",t.value),t.value=e)),t.disabled=!0,c(t,"ujs:disabled",!0)},s=function(t){return e(t,y.formEnableSelector).forEach(r)},r=function(t){var e;return null!=(e=u(t,"ujs:enable-with"))&&(l(t,"button")?t.innerHTML=e:t.value=e,c(t,"ujs:enable-with",null)),t.disabled=!1,c(t,"ujs:disabled",null)}}.call(this),function(){var u;u=y.stopEverything,y.handleMethod=function(t){var e,n,i,o,r,s,a;if(a=(s=this).getAttribute("data-method"))return r=y.href(s),n=y.csrfToken(),e=y.csrfParam(),i=document.createElement("form"),o="<input name='_method' value='"+a+"' type='hidden' />",null==e||null==n||y.isCrossDomain(r)||(o+="<input name='"+e+"' value='"+n+"' type='hidden' />"),o+='<input type="submit" />',i.method="post",i.action=r,i.target=s.target,i.innerHTML=o,i.style.display="none",document.body.appendChild(i),i.querySelector('[type="submit"]').click(),u(t)}}.call(this),function(){var u,l,c,h,d,p,f,m,g,v=[].slice;p=y.matches,c=y.getData,m=y.setData,l=y.fire,g=y.stopEverything,u=y.ajax,h=y.isCrossDomain,f=y.serializeElement,d=function(t){var e;return null!=(e=t.getAttribute("data-remote"))&&"false"!==e},y.handleRemote=function(t){var e,n,i,o,r,s,a;return!d(o=this)||(l(o,"ajax:before")?(a=o.getAttribute("data-with-credentials"),i=o.getAttribute("data-type")||"script",p(o,y.formSubmitSelector)?(e=c(o,"ujs:submit-button"),r=c(o,"ujs:submit-button-formmethod")||o.method,s=c(o,"ujs:submit-button-formaction")||o.getAttribute("action")||location.href,"GET"===r.toUpperCase()&&(s=s.replace(/\?.*$/,"")),"multipart/form-data"===o.enctype?(n=new FormData(o),null!=e&&n.append(e.name,e.value)):n=f(o,e),m(o,"ujs:submit-button",null),m(o,"ujs:submit-button-formmethod",null),m(o,"ujs:submit-button-formaction",null)):p(o,y.buttonClickSelector)||p(o,y.inputChangeSelector)?(r=o.getAttribute("data-method"),s=o.getAttribute("data-url"),n=f(o,o.getAttribute("data-params"))):(r=o.getAttribute("data-method"),s=y.href(o),n=o.getAttribute("data-params")),u({type:r||"GET",url:s,data:n,dataType:i,beforeSend:function(t,e){return l(o,"ajax:beforeSend",[t,e])?l(o,"ajax:send",[t]):(l(o,"ajax:stopped"),!1)},success:function(){var t;return t=1<=arguments.length?v.call(arguments,0):[],l(o,"ajax:success",t)},error:function(){var t;return t=1<=arguments.length?v.call(arguments,0):[],l(o,"ajax:error",t)},complete:function(){var t;return t=1<=arguments.length?v.call(arguments,0):[],l(o,"ajax:complete",t)},crossDomain:h(s),withCredentials:null!=a&&"false"!==a}),g(t)):(l(o,"ajax:stopped"),!1))},y.formSubmitButtonClick=function(){var t,e;if(e=(t=this).form)return t.name&&m(e,"ujs:submit-button",{name:t.name,value:t.value}),m(e,"ujs:formnovalidate-button",t.formNoValidate),m(e,"ujs:submit-button-formaction",t.getAttribute("formaction")),m(e,"ujs:submit-button-formmethod",t.getAttribute("formmethod"))},y.handleMetaClick=function(t){var e,n,i;if(i=((n=this).getAttribute("data-method")||"GET").toUpperCase(),e=n.getAttribute("data-params"),(t.metaKey||t.ctrlKey)&&"GET"===i&&!e)return t.stopImmediatePropagation()}}.call(this),function(){var t,i,e,n,o,r,s,a,u,l,c,h,d,p;r=y.fire,e=y.delegate,a=y.getData,t=y.$,p=y.refreshCSRFTokens,i=y.CSRFProtection,o=y.enableElement,n=y.disableElement,l=y.handleDisabledElement,u=y.handleConfirm,d=y.handleRemote,s=y.formSubmitButtonClick,c=y.handleMetaClick,h=y.handleMethod,"undefined"==typeof jQuery||null===jQuery||null==jQuery.ajax||jQuery.rails||(jQuery.rails=y,jQuery.ajaxPrefilter(function(t,e,n){if(!t.crossDomain)return i(n)})),y.start=function(){if(window._rails_loaded)throw new Error("rails-ujs has already been loaded!");return window.addEventListener("pageshow",function(){return t(y.formEnableSelector).forEach(function(t){if(a(t,"ujs:disabled"))return o(t)}),t(y.linkDisableSelector).forEach(function(t){if(a(t,"ujs:disabled"))return o(t)})}),e(document,y.linkDisableSelector,"ajax:complete",o),e(document,y.linkDisableSelector,"ajax:stopped",o),e(document,y.buttonDisableSelector,"ajax:complete",o),e(document,y.buttonDisableSelector,"ajax:stopped",o),e(document,y.linkClickSelector,"click",l),e(document,y.linkClickSelector,"click",u),e(document,y.linkClickSelector,"click",c),e(document,y.linkClickSelector,"click",n),e(document,y.linkClickSelector,"click",d),e(document,y.linkClickSelector,"click",h),e(document,y.buttonClickSelector,"click",l),e(document,y.buttonClickSelector,"click",u),e(document,y.buttonClickSelector,"click",n),e(document,y.buttonClickSelector,"click",d),e(document,y.inputChangeSelector,"change",l),e(document,y.inputChangeSelector,"change",u),e(document,y.inputChangeSelector,"change",d),e(document,y.formSubmitSelector,"submit",l),e(document,y.formSubmitSelector,"submit",u),e(document,y.formSubmitSelector,"submit",d),e(document,y.formSubmitSelector,"submit",function(t){return setTimeout(function(){return n(t)},13)}),e(document,y.formSubmitSelector,"ajax:send",n),e(document,y.formSubmitSelector,"ajax:complete",o),e(document,y.formInputClickSelector,"click",l),e(document,y.formInputClickSelector,"click",u),e(document,y.formInputClickSelector,"click",s),document.addEventListener("DOMContentLoaded",p),window._rails_loaded=!0},window.Rails===y&&r(document,"rails:attachBindings")&&y.start()}.call(this)}).call(this),"object"==typeof module&&module.exports?module.exports=y:"function"==typeof define&&define.amd&&define(y)}).call(this),function(t,e){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=t.document?e(t,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return e(t)}:e(t)}("undefined"!=typeof window?window:this,function(E,t){"use strict";function m(t,e){var n=(e=e||nt).createElement("script");n.text=t,e.head.appendChild(n).parentNode.removeChild(n)}function a(t){var e=!!t&&"length"in t&&t.length,n=mt.type(t);return"function"!==n&&!mt.isWindow(t)&&("array"===n||0===e||"number"==typeof e&&0<e&&e-1 in t)}function l(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()}function e(t,n,i){return mt.isFunction(n)?mt.grep(t,function(t,e){return!!n.call(t,e,t)!==i}):n.nodeType?mt.grep(t,function(t){return t===n!==i}):"string"!=typeof n?mt.grep(t,function(t){return-1<at.call(n,t)!==i}):Ct.test(n)?mt.filter(n,t,i):(n=mt.filter(n,t),mt.grep(t,function(t){return-1<at.call(n,t)!==i&&1===t.nodeType}))}function n(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}function c(t){var n={};return mt.each(t.match(Pt)||[],function(t,e){n[e]=!0}),n}function h(t){return t}function d(t){throw t}function u(t,e,n,i){var o;try{t&&mt.isFunction(o=t.promise)?o.call(t).done(e).fail(n):t&&mt.isFunction(o=t.then)?o.call(t,e,n):e.apply(undefined,[t].slice(i))}catch(t){n.apply(undefined,[t])}}function i(){nt.removeEventListener("DOMContentLoaded",i),E.removeEventListener("load",i),mt.ready()}function o(){this.expando=mt.expando+o.uid++}function r(t){return"true"===t||"false"!==t&&("null"===t?null:t===+t+""?+t:Bt.test(t)?JSON.parse(t):t)}function p(t,e,n){var i;if(n===undefined&&1===t.nodeType)if(i="data-"+e.replace(jt,"-$&").toLowerCase(),"string"==typeof(n=t.getAttribute(i))){try{n=r(n)}catch(o){}Mt.set(t,e,n)}else n=undefined;return n}function f(t,e,n,i){var o,r=1,s=20,a=i?function(){return i.cur()}:function(){return mt.css(t,e,"")},u=a(),l=n&&n[3]||(mt.cssNumber[e]?"":"px"),c=(mt.cssNumber[e]||"px"!==l&&+u)&&zt.exec(mt.css(t,e));if(c&&c[3]!==l)for(l=l||c[3],n=n||[],c=+u||1;c/=r=r||".5",mt.style(t,e,c+l),r!==(r=a()/u)&&1!==r&&--s;);return n&&(c=+c||+u||0,o=n[1]?c+(n[1]+1)*n[2]:+n[2],i&&(i.unit=l,i.start=c,i.end=o)),o}function g(t){var e,n=t.ownerDocument,i=t.nodeName,o=Vt[i];return o||(e=n.body.appendChild(n.createElement(i)),o=mt.css(e,"display"),e.parentNode.removeChild(e),"none"===o&&(o="block"),Vt[i]=o)}function v(t,e){for(var n,i,o=[],r=0,s=t.length;r<s;r++)(i=t[r]).style&&(n=i.style.display,e?("none"===n&&(o[r]=Nt.get(i,"display")||null,o[r]||(i.style.display="")),""===i.style.display&&Wt(i)&&(o[r]=g(i))):"none"!==n&&(o[r]="none",Nt.set(i,"display",n)));for(r=0;r<s;r++)null!=o[r]&&(t[r].style.display=o[r]);return t}function y(t,e){var n;return n="undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e||"*"):"undefined"!=typeof t.querySelectorAll?t.querySelectorAll(e||"*"):[],e===undefined||e&&l(t,e)?mt.merge([t],n):n}function _(t,e){for(var n=0,i=t.length;n<i;n++)Nt.set(t[n],"globalEval",!e||Nt.get(e[n],"globalEval"))}function b(t,e,n,i,o){for(var r,s,a,u,l,c,h=e.createDocumentFragment(),d=[],p=0,f=t.length;p<f;p++)if((r=t[p])||0===r)if("object"===mt.type(r))mt.merge(d,r.nodeType?[r]:r);else if(Yt.test(r)){for(s=s||h.appendChild(e.createElement("div")),a=(Zt.exec(r)||["",""])[1].toLowerCase(),u=Gt[a]||Gt._default,s.innerHTML=u[1]+mt.htmlPrefilter(r)+u[2],c=u[0];c--;)s=s.lastChild;mt.merge(d,s.childNodes),(s=h.firstChild).textContent=""}else d.push(e.createTextNode(r));for(h.textContent="",p=0;r=d[p++];)if(i&&-1<mt.inArray(r,i))o&&o.push(r);else if(l=mt.contains(r.ownerDocument,r),s=y(h.appendChild(r),"script"),l&&_(s),n)for(c=0;r=s[c++];)Kt.test(r.type||"")&&n.push(r);return h}function s(){return!0}function w(){return!1}function x(){try{return nt.activeElement}catch(t){}}function A(t,e,n,i,o,r){var s,a;if("object"==typeof e){for(a in"string"!=typeof n&&(i=i||n,n=undefined),e)A(t,a,n,i,e[a],r);return t}if(null==i&&null==o?(o=n,i=n=undefined):null==o&&("string"==typeof n?(o=i,i=undefined):(o=i,i=n,n=undefined)),!1===o)o=w;else if(!o)return t;return 1===r&&(s=o,(o=function(t){return mt().off(t),s.apply(this,arguments)}).guid=s.guid||(s.guid=mt.guid++)),t.each(function(){mt.event.add(this,e,o,i,n)})}function C(t,e){return l(t,"table")&&l(11!==e.nodeType?e:e.firstChild,"tr")&&mt(">tbody",t)[0]||t}function T(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function S(t){var e=re.exec(t.type);return e?t.type=e[1]:t.removeAttribute("type"),t}function L(t,e){var n,i,o,r,s,a,u,l;if(1===e.nodeType){if(Nt.hasData(t)&&(r=Nt.access(t),s=Nt.set(e,r),l=r.events))for(o in delete s.handle,s.events={},l)for(n=0,i=l[o].length;n<i;n++)mt.event.add(e,o,l[o][n]);Mt.hasData(t)&&(a=Mt.access(t),u=mt.extend({},a),Mt.set(e,u))}}function k(t,e){var n=e.nodeName.toLowerCase();"input"===n&&Ut.test(t.type)?e.checked=t.checked:"input"!==n&&"textarea"!==n||(e.defaultValue=t.defaultValue)}function P(n,i,o,r){i=rt.apply([],i);var t,e,s,a,u,l,c=0,h=n.length,d=h-1,p=i[0],f=mt.isFunction(p);if(f||1<h&&"string"==typeof p&&!pt.checkClone&&oe.test(p))return n.each(function(t){var e=n.eq(t);f&&(i[0]=p.call(this,t,e.html())),P(e,i,o,r)});if(h&&(e=(t=b(i,n[0].ownerDocument,!1,n,r)).firstChild,1===t.childNodes.length&&(t=e),e||r)){for(a=(s=mt.map(y(t,"script"),T)).length;c<h;c++)u=t,c!==d&&(u=mt.clone(u,!0,!0),a&&mt.merge(s,y(u,"script"))),o.call(n[c],u,c);if(a)for(l=s[s.length-1].ownerDocument,mt.map(s,S),c=0;c<a;c++)u=s[c],Kt.test(u.type||"")&&!Nt.access(u,"globalEval")&&mt.contains(l,u)&&(u.src?mt._evalUrl&&mt._evalUrl(u.src):m(u.textContent.replace(se,""),l))}return n}function D(t,e,n){for(var i,o=e?mt.filter(e,t):t,r=0;null!=(i=o[r]);r++)n||1!==i.nodeType||mt.cleanData(y(i)),i.parentNode&&(n&&mt.contains(i.ownerDocument,i)&&_(y(i,"script")),i.parentNode.removeChild(i));return t}function O(t,e,n){var i,o,r,s,a=t.style;return(n=n||le(t))&&(""!==(s=n.getPropertyValue(e)||n[e])||mt.contains(t.ownerDocument,t)||(s=mt.style(t,e)),!pt.pixelMarginRight()&&ue.test(s)&&ae.test(e)&&(i=a.width,o=a.minWidth,r=a.maxWidth,a.minWidth=a.maxWidth=a.width=s,s=n.width,a.width=i,a.minWidth=o,a.maxWidth=r)),s!==undefined?s+"":s}function I(t,e){return{get:function(){if(!t())return(this.get=e).apply(this,arguments);delete this.get}}}function R(t){if(t in me)return t;for(var e=t[0].toUpperCase()+t.slice(1),n=fe.length;n--;)if((t=fe[n]+e)in me)return t}function N(t){var e=mt.cssProps[t];return e||(e=mt.cssProps[t]=R(t)||t),e}function M(t,e,n){var i=zt.exec(e);return i?Math.max(0,i[2]-(n||0))+(i[3]||"px"):e}function B(t,e,n,i,o){var r,s=0;for(r=n===(i?"border":"content")?4:"width"===e?1:0;r<4;r+=2)"margin"===n&&(s+=mt.css(t,n+Ht[r],!0,o)),i?("content"===n&&(s-=mt.css(t,"padding"+Ht[r],!0,o)),"margin"!==n&&(s-=mt.css(t,"border"+Ht[r]+"Width",!0,o))):(s+=mt.css(t,"padding"+Ht[r],!0,o),"padding"!==n&&(s+=mt.css(t,"border"+Ht[r]+"Width",!0,o)));return s}function j(t,e,n){var i,o=le(t),r=O(t,e,o),s="border-box"===mt.css(t,"boxSizing",!1,o);return ue.test(r)?r:(i=s&&(pt.boxSizingReliable()||r===t.style[e]),"auto"===r&&(r=t["offset"+e[0].toUpperCase()+e.slice(1)]),(r=parseFloat(r)||0)+B(t,e,n||(s?"border":"content"),i,o)+"px")}function F(t,e,n,i,o){return new F.prototype.init(t,e,n,i,o)}function z(){ve&&(!1===nt.hidden&&E.requestAnimationFrame?E.requestAnimationFrame(z):E.setTimeout(z,mt.fx.interval),mt.fx.tick())}function H(){return E.setTimeout(function(){ge=undefined}),ge=mt.now()}function W(t,e){var n,i=0,o={height:t};for(e=e?1:0;i<4;i+=2-e)o["margin"+(n=Ht[i])]=o["padding"+n]=t;return e&&(o.opacity=o.width=t),o}function q(t,e,n){for(var i,o=(Z.tweeners[e]||[]).concat(Z.tweeners["*"]),r=0,s=o.length;r<s;r++)if(i=o[r].call(n,e,t))return i}function V(t,e,n){var i,o,r,s,a,u,l,c,h="width"in e||"height"in e,d=this,p={},f=t.style,m=t.nodeType&&Wt(t),g=Nt.get(t,"fxshow");for(i in n.queue||(null==(s=mt._queueHooks(t,"fx")).unqueued&&(s.unqueued=0,a=s.empty.fire,s.empty.fire=function(){s.unqueued||a()}),s.unqueued++,d.always(function(){d.always(function(){s.unqueued--,mt.queue(t,"fx").length||s.empty.fire()})})),e)if(o=e[i],be.test(o)){if(delete e[i],r=r||"toggle"===o,o===(m?"hide":"show")){if("show"!==o||!g||g[i]===undefined)continue;m=!0}p[i]=g&&g[i]||mt.style(t,i)}if((u=!mt.isEmptyObject(e))||!mt.isEmptyObject(p))for(i in h&&1===t.nodeType&&(n.overflow=[f.overflow,f.overflowX,f.overflowY],null==(l=g&&g.display)&&(l=Nt.get(t,"display")),"none"===(c=mt.css(t,"display"))&&(l?c=l:(v([t],!0),l=t.style.display||l,c=mt.css(t,"display"),v([t]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===mt.css(t,"float")&&(u||(d.done(function(){f.display=l}),null==l&&(c=f.display,l="none"===c?"":c)),f.display="inline-block")),n.overflow&&(f.overflow="hidden",d.always(function(){f.overflow=n.overflow[0],f.overflowX=n.overflow[1],f.overflowY=n.overflow[2]})),u=!1,p)u||(g?"hidden"in g&&(m=g.hidden):g=Nt.access(t,"fxshow",{display:l}),r&&(g.hidden=!m),m&&v([t],!0),d.done(function(){for(i in m||v([t]),Nt.remove(t,"fxshow"),p)mt.style(t,i,p[i])})),u=q(m?g[i]:0,i,d),i in g||(g[i]=u.start,m&&(u.end=u.start,u.start=0))}function U(t,e){var n,i,o,r,s;for(n in t)if(o=e[i=mt.camelCase(n)],r=t[n],Array.isArray(r)&&(o=r[1],r=t[n]=r[0]),n!==i&&(t[i]=r,delete t[n]),(s=mt.cssHooks[i])&&"expand"in s)for(n in r=s.expand(r),delete t[i],r)n in t||(t[n]=r[n],e[n]=o);else e[i]=o}function Z(r,t,e){var n,s,i=0,o=Z.prefilters.length,a=mt.Deferred().always(function(){delete u.elem}),u=function(){if(s)return!1;for(var t=ge||H(),e=Math.max(0,l.startTime+l.duration-t),n=1-(e/l.duration||0),i=0,o=l.tweens.length;i<o;i++)l.tweens[i].run(n);return a.notifyWith(r,[l,n,e]),n<1&&o?e:(o||a.notifyWith(r,[l,1,0]),a.resolveWith(r,[l]),!1)},l=a.promise({elem:r,props:mt.extend({},t),opts:mt.extend(!0,{specialEasing:{},easing:mt.easing._default},e),originalProperties:t,originalOptions:e,startTime:ge||H(),duration:e.duration,tweens:[],createTween:function(t,e){var n=mt.Tween(r,l.opts,t,e,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(n),n},stop:function(t){var e=0,n=t?l.tweens.length:0;if(s)return this;for(s=!0;e<n;e++)l.tweens[e].run(1);return t?(a.notifyWith(r,[l,1,0]),a.resolveWith(r,[l,t])):a.rejectWith(r,[l,t]),this}}),c=l.props;for(U(c,l.opts.specialEasing);i<o;i++)if(n=Z.prefilters[i].call(l,r,c,l.opts))return mt.isFunction(n.stop)&&(mt._queueHooks(l.elem,l.opts.queue).stop=mt.proxy(n.stop,n)),n;return mt.map(c,q,l),mt.isFunction(l.opts.start)&&l.opts.start.call(r,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),mt.fx.timer(mt.extend(u,{elem:r,anim:l,queue:l.opts.queue})),l}function K(t){return(t.match(Pt)||[]).join(" ")}function G(t){return t.getAttribute&&t.getAttribute("class")||""}function J(n,t,i,o){var e;if(Array.isArray(t))mt.each(t,function(t,e){i||De.test(n)?o(n,e):J(n+"["+("object"==typeof e&&null!=e?t:"")+"]",e,i,o)});else if(i||"object"!==mt.type(t))o(n,t);else for(e in t)J(n+"["+e+"]",t[e],i,o)}function $(r){return function(t,e){"string"!=typeof t&&(e=t,t="*");var n,i=0,o=t.toLowerCase().match(Pt)||[];if(mt.isFunction(e))for(;n=o[i++];)"+"===n[0]?(n=n.slice(1)||"*",(r[n]=r[n]||[]).unshift(e)):(r[n]=r[n]||[]).push(e)}}function Y(e,o,r,s){function a(t){var i;return u[t]=!0,mt.each(e[t]||[],function(t,e){var n=e(o,r,s);return"string"!=typeof n||l||u[n]?l?!(i=n):void 0:(o.dataTypes.unshift(n),a(n),!1)}),i}var u={},l=e===qe;return a(o.dataTypes[0])||!u["*"]&&a("*")}function X(t,e){var n,i,o=mt.ajaxSettings.flatOptions||{};for(n in e)e[n]!==undefined&&((o[n]?t:i||(i={}))[n]=e[n]);return i&&mt.extend(!0,t,i),t}function Q(t,e,n){for(var i,o,r,s,a=t.contents,u=t.dataTypes;"*"===u[0];)u.shift(),i===undefined&&(i=t.mimeType||e.getResponseHeader("Content-Type"));if(i)for(o in a)if(a[o]&&a[o].test(i)){u.unshift(o);break}if(u[0]in n)r=u[0];else{for(o in n){if(!u[0]||t.converters[o+" "+u[0]]){r=o;break}s||(s=o)}r=r||s}if(r)return r!==u[0]&&u.unshift(r),n[r]}function tt(t,e,n,i){var o,r,s,a,u,l={},c=t.dataTypes.slice();if(c[1])for(s in t.converters)l[s.toLowerCase()]=t.converters[s];for(r=c.shift();r;)if(t.responseFields[r]&&(n[t.responseFields[r]]=e),!u&&i&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),u=r,r=c.shift())if("*"===r)r=u;else if("*"!==u&&u!==r){if(!(s=l[u+" "+r]||l["* "+r]))for(o in l)if((a=o.split(" "))[1]===r&&(s=l[u+" "+a[0]]||l["* "+a[0]])){!0===s?s=l[o]:!0!==l[o]&&(r=a[0],c.unshift(a[1]));break}if(!0!==s)if(s&&t["throws"])e=s(e);else try{e=s(e)}catch(h){return{state:"parsererror",error:s?h:"No conversion from "+u+" to "+r}}}return{state:"success",data:e}}var et=[],nt=E.document,it=Object.getPrototypeOf,ot=et.slice,rt=et.concat,st=et.push,at=et.indexOf,ut={},lt=ut.toString,ct=ut.hasOwnProperty,ht=ct.toString,dt=ht.call(Object),pt={},ft="3.2.1",mt=function(t,e){return new mt.fn.init(t,e)},gt=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,vt=/^-ms-/,yt=/-([a-z])/g,_t=function(t,e){return e.toUpperCase()};mt.fn=mt.prototype={jquery:ft,constructor:mt,length:0,toArray:function(){return ot.call(this)},get:function(t){return null==t?ot.call(this):t<0?this[t+this.length]:this[t]},pushStack:function(t){var e=mt.merge(this.constructor(),t);return e.prevObject=this,e},each:function(t){return mt.each(this,t)},map:function(n){return this.pushStack(mt.map(this,function(t,e){return n.call(t,e,t)}))},slice:function(){return this.pushStack(ot.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(t){var e=this.length,n=+t+(t<0?e:0);return this.pushStack(0<=n&&n<e?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:st,sort:et.sort,splice:et.splice},mt.extend=mt.fn.extend=function(t){var e,n,i,o,r,s,a=t||{},u=1,l=arguments.length,c=!1;for("boolean"==typeof a&&(c=a,a=arguments[u]||{},u++),"object"==typeof a||mt.isFunction(a)||(a={}),u===l&&(a=this,u--);u<l;u++)if(null!=(e=arguments[u]))for(n in e)i=a[n],a!==(o=e[n])&&(c&&o&&(mt.isPlainObject(o)||(r=Array.isArray(o)))?(r?(r=!1,s=i&&Array.isArray(i)?i:[]):s=i&&mt.isPlainObject(i)?i:{},a[n]=mt.extend(c,s,o)):o!==undefined&&(a[n]=o));return a},mt.extend({expando:"jQuery"+(ft+Math.random()).replace(/\D/g,""),isReady:!0,error:function(t){throw new Error(t)},noop:function(){},isFunction:function(t){return"function"===mt.type(t)},isWindow:function(t){return null!=t&&t===t.window},isNumeric:function(t){var e=mt.type(t);return("number"===e||"string"===e)&&!isNaN(t-parseFloat(t))},isPlainObject:function(t){var e,n;return!(!t||"[object Object]"!==lt.call(t))&&(!(e=it(t))||"function"==typeof(n=ct.call(e,"constructor")&&e.constructor)&&ht.call(n)===dt)},isEmptyObject:function(t){var e;for(e in t)return!1;return!0},type:function(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?ut[lt.call(t)]||"object":typeof t},globalEval:function(t){m(t)},camelCase:function(t){return t.replace(vt,"ms-").replace(yt,_t)},each:function(t,e){var n,i=0;if(a(t))for(n=t.length;i<n&&!1!==e.call(t[i],i,t[i]);i++);else for(i in t)if(!1===e.call(t[i],i,t[i]))break;return t},trim:function(t){return null==t?"":(t+"").replace(gt,"")},makeArray:function(t,e){var n=e||[];return null!=t&&(a(Object(t))?mt.merge(n,"string"==typeof t?[t]:t):st.call(n,t)),n},inArray:function(t,e,n){return null==e?-1:at.call(e,t,n)},merge:function(t,e){for(var n=+e.length,i=0,o=t.length;i<n;i++)t[o++]=e[i];return t.length=o,t},grep:function(t,e,n){for(var i=[],o=0,r=t.length,s=!n;o<r;o++)!e(t[o],o)!==s&&i.push(t[o]);return i},map:function(t,e,n){var i,o,r=0,s=[];if(a(t))for(i=t.length;r<i;r++)null!=(o=e(t[r],r,n))&&s.push(o);else for(r in t)null!=(o=e(t[r],r,n))&&s.push(o);return rt.apply([],s)},guid:1,proxy:function(t,e){var n,i,o;return"string"==typeof e&&(n=t[e],e=t,t=n),mt.isFunction(t)?(i=ot.call(arguments,2),(o=function(){return t.apply(e||this,i.concat(ot.call(arguments)))}).guid=t.guid=t.guid||mt.guid++,o):undefined},now:Date.now,support:pt}),"function"==typeof Symbol&&(mt.fn[Symbol.iterator]=et[Symbol.iterator]),mt.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(t,e){ut["[object "+e+"]"]=e.toLowerCase()});var bt=function(n){function b(t,e,n,i){var o,r,s,a,u,l,c,h=e&&e.ownerDocument,d=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==d&&9!==d&&11!==d)return n;if(!i&&((e?e.ownerDocument||e:H)!==I&&O(e),e=e||I,N)){if(11!==d&&(u=vt.exec(t)))if(o=u[1]){if(9===d){if(!(s=e.getElementById(o)))return n;if(s.id===o)return n.push(s),n}else if(h&&(s=h.getElementById(o))&&F(e,s)&&s.id===o)return n.push(s),n}else{if(u[2])return X.apply(n,e.getElementsByTagName(t)),n;if((o=u[3])&&x.getElementsByClassName&&e.getElementsByClassName)return X.apply(n,e.getElementsByClassName(o)),n}if(x.qsa&&!Z[t+" "]&&(!M||!M.test(t))){if(1!==d)h=e,c=t;else if("object"!==e.nodeName.toLowerCase()){for((a=e.getAttribute("id"))?a=a.replace(wt,xt):e.setAttribute("id",a=z),r=(l=T(t)).length;r--;)l[r]="#"+a+" "+m(l[r]);c=l.join(","),h=yt.test(t)&&f(e.parentNode)||e}if(c)try{return X.apply(n,h.querySelectorAll(c)),n}catch(p){}finally{a===z&&e.removeAttribute("id")}}}return L(t.replace(at,"$1"),e,n,i)}function t(){function n(t,e){return i.push(t+" ")>A.cacheLength&&delete n[i.shift()],n[t+" "]=e}var i=[];return n}function u(t){return t[z]=!0,t}function o(t){var e=I.createElement("fieldset");try{return!!t(e)}catch(n){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function e(t,e){for(var n=t.split("|"),i=n.length;i--;)A.attrHandle[n[i]]=e}function l(t,e){var n=e&&t,i=n&&1===t.nodeType&&1===e.nodeType&&t.sourceIndex-e.sourceIndex;if(i)return i;if(n)for(;n=n.nextSibling;)if(n===e)return-1;return t?1:-1}function i(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function r(n){return function(t){var e=t.nodeName.toLowerCase();return("input"===e||"button"===e)&&t.type===n}}function s(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&&Et(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function a(s){return u(function(r){return r=+r,u(function(t,e){for(var n,i=s([],t.length,r),o=i.length;o--;)t[n=i[o]]&&(t[n]=!(e[n]=t[n]))})})}function f(t){return t&&"undefined"!=typeof t.getElementsByTagName&&t}function c(){}function m(t){for(var e=0,n=t.length,i="";e<n;e++)i+=t[e].value;return i}function h(a,t,e){var u=t.dir,l=t.next,c=l||u,h=e&&"parentNode"===c,d=q++;return t.first?function(t,e,n){for(;t=t[u];)if(1===t.nodeType||h)return a(t,e,n);return!1}:function(t,e,n){var i,o,r,s=[W,d];if(n){for(;t=t[u];)if((1===t.nodeType||h)&&a(t,e,n))return!0}else for(;t=t[u];)if(1===t.nodeType||h)if(o=(r=t[z]||(t[z]={}))[t.uniqueID]||(r[t.uniqueID]={}),l&&l===t.nodeName.toLowerCase())t=t[u]||t;else{if((i=o[c])&&i[0]===W&&i[1]===d)return s[2]=i[2];if((o[c]=s)[2]=a(t,e,n))return!0}return!1}}function d(o){return 1<o.length?function(t,e,n){for(var i=o.length;i--;)if(!o[i](t,e,n))return!1;return!0}:o[0]}function y(t,e,n){for(var i=0,o=e.length;i<o;i++)b(t,e[i],n);return n}function w(t,e,n,i,o){for(var r,s=[],a=0,u=t.length,l=null!=e;a<u;a++)(r=t[a])&&(n&&!n(r,i,o)||(s.push(r),l&&e.push(a)));return s}function _(p,f,m,g,v,t){return g&&!g[z]&&(g=_(g)),v&&!v[z]&&(v=_(v,t)),u(function(t,e,n,i){var o,r,s,a=[],u=[],l=e.length,c=t||y(f||"*",n.nodeType?[n]:n,[]),h=!p||!t&&f?c:w(c,a,p,n,i),d=m?v||(t?p:l||g)?[]:e:h;if(m&&m(h,d,n,i),g)for(o=w(d,u),g(o,[],n,i),r=o.length;r--;)(s=o[r])&&(d[u[r]]=!(h[u[r]]=s));if(t){if(v||p){if(v){for(o=[],r=d.length;r--;)(s=d[r])&&o.push(h[r]=s);v(null,d=[],o,i)}for(r=d.length;r--;)(s=d[r])&&-1<(o=v?tt(t,s):a[r])&&(t[o]=!(e[o]=s))}}else d=w(d===e?d.splice(l,d.length):d),v?v(null,e,d,i):X.apply(e,d)})}function p(t){for(var o,e,n,i=t.length,r=A.relative[t[0].type],s=r||A.relative[" "],a=r?1:0,u=h(function(t){return t===o},s,!0),l=h(function(t){return-1<tt(o,t)},s,!0),c=[function(t,e,n){var i=!r&&(n||e!==k)||((o=e).nodeType?u(t,e,n):l(t,e,n));return o=null,i}];a<i;a++)if(e=A.relative[t[a].type])c=[h(d(c),e)];else{if((e=A.filter[t[a].type].apply(null,t[a].matches))[z]){for(n=++a;n<i&&!A.relative[t[n].type];n++);return _(1<a&&d(c),1<a&&m(t.slice(0,a-1).concat({
value:" "===t[a-2].type?"*":""})).replace(at,"$1"),e,a<n&&p(t.slice(a,n)),n<i&&p(t=t.slice(n)),n<i&&m(t))}c.push(e)}return d(c)}function g(g,v){var y=0<v.length,_=0<g.length,t=function(t,e,n,i,o){var r,s,a,u=0,l="0",c=t&&[],h=[],d=k,p=t||_&&A.find.TAG("*",o),f=W+=null==d?1:Math.random()||.1,m=p.length;for(o&&(k=e===I||e||o);l!==m&&null!=(r=p[l]);l++){if(_&&r){for(s=0,e||r.ownerDocument===I||(O(r),n=!N);a=g[s++];)if(a(r,e||I,n)){i.push(r);break}o&&(W=f)}y&&((r=!a&&r)&&u--,t&&c.push(r))}if(u+=l,y&&l!==u){for(s=0;a=v[s++];)a(c,h,e,n);if(t){if(0<u)for(;l--;)c[l]||h[l]||(h[l]=$.call(i));h=w(h)}X.apply(i,h),o&&!t&&0<h.length&&1<u+v.length&&b.uniqueSort(i)}return o&&(W=f,k=d),c};return y?u(t):t}var v,x,A,E,C,T,S,L,k,P,D,O,I,R,N,M,B,j,F,z="sizzle"+1*new Date,H=n.document,W=0,q=0,V=t(),U=t(),Z=t(),K=function(t,e){return t===e&&(D=!0),0},G={}.hasOwnProperty,J=[],$=J.pop,Y=J.push,X=J.push,Q=J.slice,tt=function(t,e){for(var n=0,i=t.length;n<i;n++)if(t[n]===e)return n;return-1},et="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",nt="[\\x20\\t\\r\\n\\f]",it="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",ot="\\["+nt+"*("+it+")(?:"+nt+"*([*^$|!~]?=)"+nt+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+it+"))|)"+nt+"*\\]",rt=":("+it+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+ot+")*)|.*)\\)|)",st=new RegExp(nt+"+","g"),at=new RegExp("^"+nt+"+|((?:^|[^\\\\])(?:\\\\.)*)"+nt+"+$","g"),ut=new RegExp("^"+nt+"*,"+nt+"*"),lt=new RegExp("^"+nt+"*([>+~]|"+nt+")"+nt+"*"),ct=new RegExp("="+nt+"*([^\\]'\"]*?)"+nt+"*\\]","g"),ht=new RegExp(rt),dt=new RegExp("^"+it+"$"),pt={ID:new RegExp("^#("+it+")"),CLASS:new RegExp("^\\.("+it+")"),TAG:new RegExp("^("+it+"|[*])"),ATTR:new RegExp("^"+ot),PSEUDO:new RegExp("^"+rt),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+nt+"*(even|odd|(([+-]|)(\\d*)n|)"+nt+"*(?:([+-]|)"+nt+"*(\\d+)|))"+nt+"*\\)|)","i"),bool:new RegExp("^(?:"+et+")$","i"),needsContext:new RegExp("^"+nt+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+nt+"*((?:-\\d)?\\d*)"+nt+"*\\)|)(?=[^-]|$)","i")},ft=/^(?:input|select|textarea|button)$/i,mt=/^h\d$/i,gt=/^[^{]+\{\s*\[native \w/,vt=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,yt=/[+~]/,_t=new RegExp("\\\\([\\da-f]{1,6}"+nt+"?|("+nt+")|.)","ig"),bt=function(t,e,n){var i="0x"+e-65536;return i!=i||n?e:i<0?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320)},wt=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,xt=function(t,e){return e?"\0"===t?"\ufffd":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t},At=function(){O()},Et=h(function(t){return!0===t.disabled&&("form"in t||"label"in t)},{dir:"parentNode",next:"legend"});try{X.apply(J=Q.call(H.childNodes),H.childNodes),J[H.childNodes.length].nodeType}catch(Ct){X={apply:J.length?function(t,e){Y.apply(t,Q.call(e))}:function(t,e){for(var n=t.length,i=0;t[n++]=e[i++];);t.length=n-1}}}for(v in x=b.support={},C=b.isXML=function(t){var e=t&&(t.ownerDocument||t).documentElement;return!!e&&"HTML"!==e.nodeName},O=b.setDocument=function(t){var e,n,i=t?t.ownerDocument||t:H;return i!==I&&9===i.nodeType&&i.documentElement&&(R=(I=i).documentElement,N=!C(I),H!==I&&(n=I.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",At,!1):n.attachEvent&&n.attachEvent("onunload",At)),x.attributes=o(function(t){return t.className="i",!t.getAttribute("className")}),x.getElementsByTagName=o(function(t){return t.appendChild(I.createComment("")),!t.getElementsByTagName("*").length}),x.getElementsByClassName=gt.test(I.getElementsByClassName),x.getById=o(function(t){return R.appendChild(t).id=z,!I.getElementsByName||!I.getElementsByName(z).length}),x.getById?(A.filter.ID=function(t){var e=t.replace(_t,bt);return function(t){return t.getAttribute("id")===e}},A.find.ID=function(t,e){if("undefined"!=typeof e.getElementById&&N){var n=e.getElementById(t);return n?[n]:[]}}):(A.filter.ID=function(t){var n=t.replace(_t,bt);return function(t){var e="undefined"!=typeof t.getAttributeNode&&t.getAttributeNode("id");return e&&e.value===n}},A.find.ID=function(t,e){if("undefined"!=typeof e.getElementById&&N){var n,i,o,r=e.getElementById(t);if(r){if((n=r.getAttributeNode("id"))&&n.value===t)return[r];for(o=e.getElementsByName(t),i=0;r=o[i++];)if((n=r.getAttributeNode("id"))&&n.value===t)return[r]}return[]}}),A.find.TAG=x.getElementsByTagName?function(t,e){return"undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t):x.qsa?e.querySelectorAll(t):void 0}:function(t,e){var n,i=[],o=0,r=e.getElementsByTagName(t);if("*"===t){for(;n=r[o++];)1===n.nodeType&&i.push(n);return i}return r},A.find.CLASS=x.getElementsByClassName&&function(t,e){if("undefined"!=typeof e.getElementsByClassName&&N)return e.getElementsByClassName(t)},B=[],M=[],(x.qsa=gt.test(I.querySelectorAll))&&(o(function(t){R.appendChild(t).innerHTML="<a id='"+z+"'></a><select id='"+z+"-\r\\' msallowcapture=''><option selected=''></option></select>",t.querySelectorAll("[msallowcapture^='']").length&&M.push("[*^$]="+nt+"*(?:''|\"\")"),t.querySelectorAll("[selected]").length||M.push("\\["+nt+"*(?:value|"+et+")"),t.querySelectorAll("[id~="+z+"-]").length||M.push("~="),t.querySelectorAll(":checked").length||M.push(":checked"),t.querySelectorAll("a#"+z+"+*").length||M.push(".#.+[+~]")}),o(function(t){t.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var e=I.createElement("input");e.setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),t.querySelectorAll("[name=d]").length&&M.push("name"+nt+"*[*^$|!~]?="),2!==t.querySelectorAll(":enabled").length&&M.push(":enabled",":disabled"),R.appendChild(t).disabled=!0,2!==t.querySelectorAll(":disabled").length&&M.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),M.push(",.*:")})),(x.matchesSelector=gt.test(j=R.matches||R.webkitMatchesSelector||R.mozMatchesSelector||R.oMatchesSelector||R.msMatchesSelector))&&o(function(t){x.disconnectedMatch=j.call(t,"*"),j.call(t,"[s!='']:x"),B.push("!=",rt)}),M=M.length&&new RegExp(M.join("|")),B=B.length&&new RegExp(B.join("|")),e=gt.test(R.compareDocumentPosition),F=e||gt.test(R.contains)?function(t,e){var n=9===t.nodeType?t.documentElement:t,i=e&&e.parentNode;return t===i||!(!i||1!==i.nodeType||!(n.contains?n.contains(i):t.compareDocumentPosition&&16&t.compareDocumentPosition(i)))}:function(t,e){if(e)for(;e=e.parentNode;)if(e===t)return!0;return!1},K=e?function(t,e){if(t===e)return D=!0,0;var n=!t.compareDocumentPosition-!e.compareDocumentPosition;return n||(1&(n=(t.ownerDocument||t)===(e.ownerDocument||e)?t.compareDocumentPosition(e):1)||!x.sortDetached&&e.compareDocumentPosition(t)===n?t===I||t.ownerDocument===H&&F(H,t)?-1:e===I||e.ownerDocument===H&&F(H,e)?1:P?tt(P,t)-tt(P,e):0:4&n?-1:1)}:function(t,e){if(t===e)return D=!0,0;var n,i=0,o=t.parentNode,r=e.parentNode,s=[t],a=[e];if(!o||!r)return t===I?-1:e===I?1:o?-1:r?1:P?tt(P,t)-tt(P,e):0;if(o===r)return l(t,e);for(n=t;n=n.parentNode;)s.unshift(n);for(n=e;n=n.parentNode;)a.unshift(n);for(;s[i]===a[i];)i++;return i?l(s[i],a[i]):s[i]===H?-1:a[i]===H?1:0}),I},b.matches=function(t,e){return b(t,null,null,e)},b.matchesSelector=function(t,e){if((t.ownerDocument||t)!==I&&O(t),e=e.replace(ct,"='$1']"),x.matchesSelector&&N&&!Z[e+" "]&&(!B||!B.test(e))&&(!M||!M.test(e)))try{var n=j.call(t,e);if(n||x.disconnectedMatch||t.document&&11!==t.document.nodeType)return n}catch(Ct){}return 0<b(e,I,null,[t]).length},b.contains=function(t,e){return(t.ownerDocument||t)!==I&&O(t),F(t,e)},b.attr=function(t,e){(t.ownerDocument||t)!==I&&O(t);var n=A.attrHandle[e.toLowerCase()],i=n&&G.call(A.attrHandle,e.toLowerCase())?n(t,e,!N):undefined;return i!==undefined?i:x.attributes||!N?t.getAttribute(e):(i=t.getAttributeNode(e))&&i.specified?i.value:null},b.escape=function(t){return(t+"").replace(wt,xt)},b.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},b.uniqueSort=function(t){var e,n=[],i=0,o=0;if(D=!x.detectDuplicates,P=!x.sortStable&&t.slice(0),t.sort(K),D){for(;e=t[o++];)e===t[o]&&(i=n.push(o));for(;i--;)t.splice(n[i],1)}return P=null,t},E=b.getText=function(t){var e,n="",i=0,o=t.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)n+=E(t)}else if(3===o||4===o)return t.nodeValue}else for(;e=t[i++];)n+=E(e);return n},(A=b.selectors={cacheLength:50,createPseudo:u,match:pt,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(_t,bt),t[3]=(t[3]||t[4]||t[5]||"").replace(_t,bt),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||b.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&b.error(t[0]),t},PSEUDO:function(t){var e,n=!t[6]&&t[2];return pt.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":n&&ht.test(n)&&(e=T(n,!0))&&(e=n.indexOf(")",n.length-e)-n.length)&&(t[0]=t[0].slice(0,e),t[2]=n.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(_t,bt).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=V[t+" "];return e||(e=new RegExp("(^|"+nt+")"+t+"("+nt+"|$)"))&&V(t,function(t){return e.test("string"==typeof t.className&&t.className||"undefined"!=typeof t.getAttribute&&t.getAttribute("class")||"")})},ATTR:function(n,i,o){return function(t){var e=b.attr(t,n);return null==e?"!="===i:!i||(e+="","="===i?e===o:"!="===i?e!==o:"^="===i?o&&0===e.indexOf(o):"*="===i?o&&-1<e.indexOf(o):"$="===i?o&&e.slice(-o.length)===o:"~="===i?-1<(" "+e.replace(st," ")+" ").indexOf(o):"|="===i&&(e===o||e.slice(0,o.length+1)===o+"-"))}},CHILD:function(f,t,e,m,g){var v="nth"!==f.slice(0,3),y="last"!==f.slice(-4),_="of-type"===t;return 1===m&&0===g?function(t){return!!t.parentNode}:function(t,e,n){var i,o,r,s,a,u,l=v!==y?"nextSibling":"previousSibling",c=t.parentNode,h=_&&t.nodeName.toLowerCase(),d=!n&&!_,p=!1;if(c){if(v){for(;l;){for(s=t;s=s[l];)if(_?s.nodeName.toLowerCase()===h:1===s.nodeType)return!1;u=l="only"===f&&!u&&"nextSibling"}return!0}if(u=[y?c.firstChild:c.lastChild],y&&d){for(p=(a=(i=(o=(r=(s=c)[z]||(s[z]={}))[s.uniqueID]||(r[s.uniqueID]={}))[f]||[])[0]===W&&i[1])&&i[2],s=a&&c.childNodes[a];s=++a&&s&&s[l]||(p=a=0)||u.pop();)if(1===s.nodeType&&++p&&s===t){o[f]=[W,a,p];break}}else if(d&&(p=a=(i=(o=(r=(s=t)[z]||(s[z]={}))[s.uniqueID]||(r[s.uniqueID]={}))[f]||[])[0]===W&&i[1]),!1===p)for(;(s=++a&&s&&s[l]||(p=a=0)||u.pop())&&((_?s.nodeName.toLowerCase()!==h:1!==s.nodeType)||!++p||(d&&((o=(r=s[z]||(s[z]={}))[s.uniqueID]||(r[s.uniqueID]={}))[f]=[W,p]),s!==t)););return(p-=g)===m||p%m==0&&0<=p/m}}},PSEUDO:function(t,r){var e,s=A.pseudos[t]||A.setFilters[t.toLowerCase()]||b.error("unsupported pseudo: "+t);return s[z]?s(r):1<s.length?(e=[t,t,"",r],A.setFilters.hasOwnProperty(t.toLowerCase())?u(function(t,e){for(var n,i=s(t,r),o=i.length;o--;)t[n=tt(t,i[o])]=!(e[n]=i[o])}):function(t){return s(t,0,e)}):s}},pseudos:{not:u(function(t){var i=[],o=[],a=S(t.replace(at,"$1"));return a[z]?u(function(t,e,n,i){for(var o,r=a(t,null,i,[]),s=t.length;s--;)(o=r[s])&&(t[s]=!(e[s]=o))}):function(t,e,n){return i[0]=t,a(i,null,n,o),i[0]=null,!o.pop()}}),has:u(function(e){return function(t){return 0<b(e,t).length}}),contains:u(function(e){return e=e.replace(_t,bt),function(t){return-1<(t.textContent||t.innerText||E(t)).indexOf(e)}}),lang:u(function(n){return dt.test(n||"")||b.error("unsupported lang: "+n),n=n.replace(_t,bt).toLowerCase(),function(t){var e;do{if(e=N?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(e=e.toLowerCase())===n||0===e.indexOf(n+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var e=n.location&&n.location.hash;return e&&e.slice(1)===t.id},root:function(t){return t===R},focus:function(t){return t===I.activeElement&&(!I.hasFocus||I.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:s(!1),disabled:s(!0),checked:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&!!t.checked||"option"===e&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,!0===t.selected},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!A.pseudos.empty(t)},header:function(t){return mt.test(t.nodeName)},input:function(t){return ft.test(t.nodeName)},button:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&"button"===t.type||"button"===e},text:function(t){var e;return"input"===t.nodeName.toLowerCase()&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:a(function(){return[0]}),last:a(function(t,e){return[e-1]}),eq:a(function(t,e,n){return[n<0?n+e:n]}),even:a(function(t,e){for(var n=0;n<e;n+=2)t.push(n);return t}),odd:a(function(t,e){for(var n=1;n<e;n+=2)t.push(n);return t}),lt:a(function(t,e,n){for(var i=n<0?n+e:n;0<=--i;)t.push(i);return t}),gt:a(function(t,e,n){for(var i=n<0?n+e:n;++i<e;)t.push(i);return t})}}).pseudos.nth=A.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})A.pseudos[v]=i(v);for(v in{submit:!0,reset:!0})A.pseudos[v]=r(v);return c.prototype=A.filters=A.pseudos,A.setFilters=new c,T=b.tokenize=function(t,e){var n,i,o,r,s,a,u,l=U[t+" "];if(l)return e?0:l.slice(0);for(s=t,a=[],u=A.preFilter;s;){for(r in n&&!(i=ut.exec(s))||(i&&(s=s.slice(i[0].length)||s),a.push(o=[])),n=!1,(i=lt.exec(s))&&(n=i.shift(),o.push({value:n,type:i[0].replace(at," ")}),s=s.slice(n.length)),A.filter)!(i=pt[r].exec(s))||u[r]&&!(i=u[r](i))||(n=i.shift(),o.push({value:n,type:r,matches:i}),s=s.slice(n.length));if(!n)break}return e?s.length:s?b.error(t):U(t,a).slice(0)},S=b.compile=function(t,e){var n,i=[],o=[],r=Z[t+" "];if(!r){for(e||(e=T(t)),n=e.length;n--;)(r=p(e[n]))[z]?i.push(r):o.push(r);(r=Z(t,g(o,i))).selector=t}return r},L=b.select=function(t,e,n,i){var o,r,s,a,u,l="function"==typeof t&&t,c=!i&&T(t=l.selector||t);if(n=n||[],1===c.length){if(2<(r=c[0]=c[0].slice(0)).length&&"ID"===(s=r[0]).type&&9===e.nodeType&&N&&A.relative[r[1].type]){if(!(e=(A.find.ID(s.matches[0].replace(_t,bt),e)||[])[0]))return n;l&&(e=e.parentNode),t=t.slice(r.shift().value.length)}for(o=pt.needsContext.test(t)?0:r.length;o--&&(s=r[o],!A.relative[a=s.type]);)if((u=A.find[a])&&(i=u(s.matches[0].replace(_t,bt),yt.test(r[0].type)&&f(e.parentNode)||e))){if(r.splice(o,1),!(t=i.length&&m(r)))return X.apply(n,i),n;break}}return(l||S(t,c))(i,e,!N,n,!e||yt.test(t)&&f(e.parentNode)||e),n},x.sortStable=z.split("").sort(K).join("")===z,x.detectDuplicates=!!D,O(),x.sortDetached=o(function(t){return 1&t.compareDocumentPosition(I.createElement("fieldset"))}),o(function(t){return t.innerHTML="<a href='#'></a>","#"===t.firstChild.getAttribute("href")})||e("type|href|height|width",function(t,e,n){if(!n)return t.getAttribute(e,"type"===e.toLowerCase()?1:2)}),x.attributes&&o(function(t){return t.innerHTML="<input/>",t.firstChild.setAttribute("value",""),""===t.firstChild.getAttribute("value")})||e("value",function(t,e,n){if(!n&&"input"===t.nodeName.toLowerCase())return t.defaultValue}),o(function(t){return null==t.getAttribute("disabled")})||e(et,function(t,e,n){var i;if(!n)return!0===t[e]?e.toLowerCase():(i=t.getAttributeNode(e))&&i.specified?i.value:null}),b}(E);mt.find=bt,mt.expr=bt.selectors,mt.expr[":"]=mt.expr.pseudos,mt.uniqueSort=mt.unique=bt.uniqueSort,mt.text=bt.getText,mt.isXMLDoc=bt.isXML,mt.contains=bt.contains,mt.escapeSelector=bt.escape;var wt=function(t,e,n){for(var i=[],o=n!==undefined;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(o&&mt(t).is(n))break;i.push(t)}return i},xt=function(t,e){for(var n=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&n.push(t);return n},At=mt.expr.match.needsContext,Et=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i,Ct=/^.[^:#\[\.,]*$/;mt.filter=function(t,e,n){var i=e[0];return n&&(t=":not("+t+")"),1===e.length&&1===i.nodeType?mt.find.matchesSelector(i,t)?[i]:[]:mt.find.matches(t,mt.grep(e,function(t){return 1===t.nodeType}))},mt.fn.extend({find:function(t){var e,n,i=this.length,o=this;if("string"!=typeof t)return this.pushStack(mt(t).filter(function(){for(e=0;e<i;e++)if(mt.contains(o[e],this))return!0}));for(n=this.pushStack([]),e=0;e<i;e++)mt.find(t,o[e],n);return 1<i?mt.uniqueSort(n):n},filter:function(t){return this.pushStack(e(this,t||[],!1))},not:function(t){return this.pushStack(e(this,t||[],!0))},is:function(t){return!!e(this,"string"==typeof t&&At.test(t)?mt(t):t||[],!1).length}});var Tt,St=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(mt.fn.init=function(t,e,n){var i,o;if(!t)return this;if(n=n||Tt,"string"==typeof t){if(!(i="<"===t[0]&&">"===t[t.length-1]&&3<=t.length?[null,t,null]:St.exec(t))||!i[1]&&e)return!e||e.jquery?(e||n).find(t):this.constructor(e).find(t);if(i[1]){if(e=e instanceof mt?e[0]:e,mt.merge(this,mt.parseHTML(i[1],e&&e.nodeType?e.ownerDocument||e:nt,!0)),Et.test(i[1])&&mt.isPlainObject(e))for(i in e)mt.isFunction(this[i])?this[i](e[i]):this.attr(i,e[i]);return this}return(o=nt.getElementById(i[2]))&&(this[0]=o,this.length=1),this}return t.nodeType?(this[0]=t,this.length=1,this):mt.isFunction(t)?n.ready!==undefined?n.ready(t):t(mt):mt.makeArray(t,this)}).prototype=mt.fn,Tt=mt(nt);var Lt=/^(?:parents|prev(?:Until|All))/,kt={children:!0,contents:!0,next:!0,prev:!0};mt.fn.extend({has:function(t){var e=mt(t,this),n=e.length;return this.filter(function(){for(var t=0;t<n;t++)if(mt.contains(this,e[t]))return!0})},closest:function(t,e){var n,i=0,o=this.length,r=[],s="string"!=typeof t&&mt(t);if(!At.test(t))for(;i<o;i++)for(n=this[i];n&&n!==e;n=n.parentNode)if(n.nodeType<11&&(s?-1<s.index(n):1===n.nodeType&&mt.find.matchesSelector(n,t))){r.push(n);break}return this.pushStack(1<r.length?mt.uniqueSort(r):r)},index:function(t){return t?"string"==typeof t?at.call(mt(t),this[0]):at.call(this,t.jquery?t[0]:t):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(mt.uniqueSort(mt.merge(this.get(),mt(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),mt.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return wt(t,"parentNode")},parentsUntil:function(t,e,n){return wt(t,"parentNode",n)},next:function(t){return n(t,"nextSibling")},prev:function(t){return n(t,"previousSibling")},nextAll:function(t){return wt(t,"nextSibling")},prevAll:function(t){return wt(t,"previousSibling")},nextUntil:function(t,e,n){return wt(t,"nextSibling",n)},prevUntil:function(t,e,n){return wt(t,"previousSibling",n)},siblings:function(t){return xt((t.parentNode||{}).firstChild,t)},children:function(t){return xt(t.firstChild)},contents:function(t){return l(t,"iframe")?t.contentDocument:(l(t,"template")&&(t=t.content||t),mt.merge([],t.childNodes))}},function(i,o){mt.fn[i]=function(t,e){var n=mt.map(this,o,t);return"Until"!==i.slice(-5)&&(e=t),e&&"string"==typeof e&&(n=mt.filter(e,n)),1<this.length&&(kt[i]||mt.uniqueSort(n),Lt.test(i)&&n.reverse()),this.pushStack(n)}});var Pt=/[^\x20\t\r\n\f]+/g;mt.Callbacks=function(i){i="string"==typeof i?c(i):mt.extend({},i);var o,t,e,n,r=[],s=[],a=-1,u=function(){for(n=n||i.once,e=o=!0;s.length;a=-1)for(t=s.shift();++a<r.length;)!1===r[a].apply(t[0],t[1])&&i.stopOnFalse&&(a=r.length,t=!1);i.memory||(t=!1),o=!1,n&&(r=t?[]:"")},l={add:function(){return r&&(t&&!o&&(a=r.length-1,s.push(t)),function n(t){mt.each(t,function(t,e){mt.isFunction(e)?i.unique&&l.has(e)||r.push(e):e&&e.length&&"string"!==mt.type(e)&&n(e)})}(arguments),t&&!o&&u()),this},remove:function(){return mt.each(arguments,function(t,e){for(var n;-1<(n=mt.inArray(e,r,n));)r.splice(n,1),n<=a&&a--}),this},has:function(t){return t?-1<mt.inArray(t,r):0<r.length},empty:function(){return r&&(r=[]),this},disable:function(){return n=s=[],r=t="",this},disabled:function(){return!r},lock:function(){return n=s=[],t||o||(r=t=""),this},locked:function(){return!!n},fireWith:function(t,e){return n||(e=[t,(e=e||[]).slice?e.slice():e],s.push(e),o||u()),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!e}};return l},mt.extend({Deferred:function(t){var r=[["notify","progress",mt.Callbacks("memory"),mt.Callbacks("memory"),2],["resolve","done",mt.Callbacks("once memory"),mt.Callbacks("once memory"),0,"resolved"],["reject","fail",mt.Callbacks("once memory"),mt.Callbacks("once memory"),1,"rejected"]],o="pending",s={state:function(){return o},always:function(){return a.done(arguments).fail(arguments),this},"catch":function(t){return s.then(null,t)},pipe:function(){var o=arguments;return mt.Deferred(function(i){mt.each(r,function(t,e){var n=mt.isFunction(o[e[4]])&&o[e[4]];a[e[1]](function(){var t=n&&n.apply(this,arguments);t&&mt.isFunction(t.promise)?t.promise().progress(i.notify).done(i.resolve).fail(i.reject):i[e[0]+"With"](this,n?[t]:arguments)})}),o=null}).promise()},then:function(e,n,i){function l(r,s,a,u){return function(){var n=this,i=arguments,e=function(){var t,e;if(!(r<c)){if((t=a.apply(n,i))===s.promise())throw new TypeError("Thenable self-resolution");e=t&&("object"==typeof t||"function"==typeof t)&&t.then,mt.isFunction(e)?u?e.call(t,l(c,s,h,u),l(c,s,d,u)):(c++,e.call(t,l(c,s,h,u),l(c,s,d,u),l(c,s,h,s.notifyWith))):(a!==h&&(n=undefined,i=[t]),(u||s.resolveWith)(n,i))}},o=u?e:function(){try{e()}catch(t){mt.Deferred.exceptionHook&&mt.Deferred.exceptionHook(t,o.stackTrace),c<=r+1&&(a!==d&&(n=undefined,i=[t]),s.rejectWith(n,i))}};r?o():(mt.Deferred.getStackHook&&(o.stackTrace=mt.Deferred.getStackHook()),E.setTimeout(o))}}var c=0;return mt.Deferred(function(t){r[0][3].add(l(0,t,mt.isFunction(i)?i:h,t.notifyWith)),r[1][3].add(l(0,t,mt.isFunction(e)?e:h)),r[2][3].add(l(0,t,mt.isFunction(n)?n:d))}).promise()},promise:function(t){return null!=t?mt.extend(t,s):s}},a={};return mt.each(r,function(t,e){var n=e[2],i=e[5];s[e[1]]=n.add,i&&n.add(function(){o=i},r[3-t][2].disable,r[0][2].lock),n.add(e[3].fire),a[e[0]]=function(){return a[e[0]+"With"](this===a?undefined:this,arguments),this},a[e[0]+"With"]=n.fireWith}),s.promise(a),t&&t.call(a,a),a},when:function(t){var n=arguments.length,e=n,i=Array(e),o=ot.call(arguments),r=mt.Deferred(),s=function(e){return function(t){i[e]=this,o[e]=1<arguments.length?ot.call(arguments):t,--n||r.resolveWith(i,o)}};if(n<=1&&(u(t,r.done(s(e)).resolve,r.reject,!n),"pending"===r.state()||mt.isFunction(o[e]&&o[e].then)))return r.then();for(;e--;)u(o[e],s(e),r.reject);return r.promise()}});var Dt=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;mt.Deferred.exceptionHook=function(t,e){E.console&&E.console.warn&&t&&Dt.test(t.name)&&E.console.warn("jQuery.Deferred exception: "+t.message,t.stack,e)},mt.readyException=function(t){E.setTimeout(function(){throw t})};var Ot=mt.Deferred();mt.fn.ready=function(t){return Ot.then(t)["catch"](function(t){mt.readyException(t)}),this},mt.extend({isReady:!1,readyWait:1,ready:function(t){(!0===t?--mt.readyWait:mt.isReady)||(mt.isReady=!0)!==t&&0<--mt.readyWait||Ot.resolveWith(nt,[mt])}}),mt.ready.then=Ot.then,"complete"===nt.readyState||"loading"!==nt.readyState&&!nt.documentElement.doScroll?E.setTimeout(mt.ready):(nt.addEventListener("DOMContentLoaded",i),E.addEventListener("load",i));var It=function(t,e,n,i,o,r,s){var a=0,u=t.length,l=null==n;if("object"===mt.type(n))for(a in o=!0,n)It(t,e,a,n[a],!0,r,s);else if(i!==undefined&&(o=!0,mt.isFunction(i)||(s=!0),l&&(s?(e.call(t,i),e=null):(l=e,e=function(t,e,n){return l.call(mt(t),n)})),e))for(;a<u;a++)e(t[a],n,s?i:i.call(t[a],a,e(t[a],n)));return o?t:l?e.call(t):u?e(t[0],n):r},Rt=function(t){return 1===t.nodeType||9===t.nodeType||!+t.nodeType};o.uid=1,o.prototype={cache:function(t){var e=t[this.expando];return e||(e={},Rt(t)&&(t.nodeType?t[this.expando]=e:Object.defineProperty(t,this.expando,{value:e,configurable:!0}))),e},set:function(t,e,n){var i,o=this.cache(t);if("string"==typeof e)o[mt.camelCase(e)]=n;else for(i in e)o[mt.camelCase(i)]=e[i];return o},get:function(t,e){return e===undefined?this.cache(t):t[this.expando]&&t[this.expando][mt.camelCase(e)]},access:function(t,e,n){return e===undefined||e&&"string"==typeof e&&n===undefined?this.get(t,e):(this.set(t,e,n),n!==undefined?n:e)},remove:function(t,e){var n,i=t[this.expando];if(i!==undefined){if(e!==undefined){n=(e=Array.isArray(e)?e.map(mt.camelCase):(e=mt.camelCase(e))in i?[e]:e.match(Pt)||[]).length;for(;n--;)delete i[e[n]]}(e===undefined||mt.isEmptyObject(i))&&(t.nodeType?t[this.expando]=undefined:delete t[this.expando])}},hasData:function(t){var e=t[this.expando];return e!==undefined&&!mt.isEmptyObject(e)}};var Nt=new o,Mt=new o,Bt=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,jt=/[A-Z]/g;mt.extend({hasData:function(t){return Mt.hasData(t)||Nt.hasData(t)},data:function(t,e,n){return Mt.access(t,e,n)},removeData:function(t,e){Mt.remove(t,e)},_data:function(t,e,n){return Nt.access(t,e,n)},_removeData:function(t,e){Nt.remove(t,e)}}),mt.fn.extend({data:function(n,t){var e,i,o,r=this[0],s=r&&r.attributes;if(n===undefined){if(this.length&&(o=Mt.get(r),1===r.nodeType&&!Nt.get(r,"hasDataAttrs"))){for(e=s.length;e--;)s[e]&&0===(i=s[e].name).indexOf("data-")&&(i=mt.camelCase(i.slice(5)),p(r,i,o[i]));Nt.set(r,"hasDataAttrs",!0)}return o}return"object"==typeof n?this.each(function(){Mt.set(this,n)}):It(this,function(t){var e;if(r&&t===undefined)return(e=Mt.get(r,n))!==undefined?e:(e=p(r,n))!==undefined?e:void 0;this.each(function(){Mt.set(this,n,t)})},null,t,1<arguments.length,null,!0)},removeData:function(t){return this.each(function(){Mt.remove(this,t)})}}),mt.extend({queue:function(t,e,n){var i;if(t)return e=(e||"fx")+"queue",i=Nt.get(t,e),n&&(!i||Array.isArray(n)?i=Nt.access(t,e,mt.makeArray(n)):i.push(n)),i||[]},dequeue:function(t,e){e=e||"fx";var n=mt.queue(t,e),i=n.length,o=n.shift(),r=mt._queueHooks(t,e),s=function(){mt.dequeue(t,e)};"inprogress"===o&&(o=n.shift(),i--),o&&("fx"===e&&n.unshift("inprogress"),delete r.stop,o.call(t,s,r)),!i&&r&&r.empty.fire()},_queueHooks:function(t,e){var n=e+"queueHooks";return Nt.get(t,n)||Nt.access(t,n,{empty:mt.Callbacks("once memory").add(function(){Nt.remove(t,[e+"queue",n])})})}}),mt.fn.extend({queue:function(e,n){var t=2;return"string"!=typeof e&&(n=e,e="fx",t--),arguments.length<t?mt.queue(this[0],e):n===undefined?this:this.each(function(){var t=mt.queue(this,e,n);mt._queueHooks(this,e),"fx"===e&&"inprogress"!==t[0]&&mt.dequeue(this,e)})},dequeue:function(t){return this.each(function(){mt.dequeue(this,t)})},clearQueue:function(t){return this.queue(t||"fx",[])},promise:function(t,e){var n,i=1,o=mt.Deferred(),r=this,s=this.length,a=function(){--i||o.resolveWith(r,[r])};for("string"!=typeof t&&(e=t,t=undefined),t=t||"fx";s--;)(n=Nt.get(r[s],t+"queueHooks"))&&n.empty&&(i++,n.empty.add(a));return a(),o.promise(e)}});var Ft=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,zt=new RegExp("^(?:([+-])=|)("+Ft+")([a-z%]*)$","i"),Ht=["Top","Right","Bottom","Left"],Wt=function(t,e){return"none"===(t=e||t).style.display||""===t.style.display&&mt.contains(t.ownerDocument,t)&&"none"===mt.css(t,"display")},qt=function(t,e,n,i){var o,r,s={};for(r in e)s[r]=t.style[r],t.style[r]=e[r];for(r in o=n.apply(t,i||[]),e)t.style[r]=s[r];return o},Vt={};mt.fn.extend({show:function(){return v(this,!0)},hide:function(){return v(this)},toggle:function(t){return"boolean"==typeof t?t?this.show():this.hide():this.each(function(){Wt(this)?mt(this).show():mt(this).hide()})}});var Ut=/^(?:checkbox|radio)$/i,Zt=/<([a-z][^\/\0>\x20\t\r\n\f]+)/i,Kt=/^$|\/(?:java|ecma)script/i,Gt={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};Gt.optgroup=Gt.option,Gt.tbody=Gt.tfoot=Gt.colgroup=Gt.caption=Gt.thead,Gt.th=Gt.td;var Jt,$t,Yt=/<|&#?\w+;/;Jt=nt.createDocumentFragment().appendChild(nt.createElement("div")),($t=nt.createElement("input")).setAttribute("type","radio"),$t.setAttribute("checked","checked"),$t.setAttribute("name","t"),Jt.appendChild($t),pt.checkClone=Jt.cloneNode(!0).cloneNode(!0).lastChild.checked,Jt.innerHTML="<textarea>x</textarea>",pt.noCloneChecked=!!Jt.cloneNode(!0).lastChild.defaultValue;var Xt=nt.documentElement,Qt=/^key/,te=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,ee=/^([^.]*)(?:\.(.+)|)/;mt.event={global:{},add:function(e,t,n,i,o){var r,s,a,u,l,c,h,d,p,f,m,g=Nt.get(e);if(g)for(n.handler&&(n=(r=n).handler,o=r.selector),o&&mt.find.matchesSelector(Xt,o),n.guid||(n.guid=mt.guid++),(u=g.events)||(u=g.events={}),(s=g.handle)||(s=g.handle=function(t){return void 0!==mt&&mt.event.triggered!==t.type?mt.event.dispatch.apply(e,arguments):undefined}),l=(t=(t||"").match(Pt)||[""]).length;l--;)p=m=(a=ee.exec(t[l])||[])[1],f=(a[2]||"").split(".").sort(),p&&(h=mt.event.special[p]||{},p=(o?h.delegateType:h.bindType)||p,h=mt.event.special[p]||{},c=mt.extend({type:p,origType:m,data:i,handler:n,guid:n.guid,selector:o,needsContext:o&&mt.expr.match.needsContext.test(o),namespace:f.join(".")},r),(d=u[p])||((d=u[p]=[]).delegateCount=0,h.setup&&!1!==h.setup.call(e,i,f,s)||e.addEventListener&&e.addEventListener(p,s)),h.add&&(h.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),o?d.splice(d.delegateCount++,0,c):d.push(c),mt.event.global[p]=!0)},remove:function(t,e,n,i,o){var r,s,a,u,l,c,h,d,p,f,m,g=Nt.hasData(t)&&Nt.get(t);if(g&&(u=g.events)){for(l=(e=(e||"").match(Pt)||[""]).length;l--;)if(p=m=(a=ee.exec(e[l])||[])[1],f=(a[2]||"").split(".").sort(),p){for(h=mt.event.special[p]||{},d=u[p=(i?h.delegateType:h.bindType)||p]||[],a=a[2]&&new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=r=d.length;r--;)c=d[r],!o&&m!==c.origType||n&&n.guid!==c.guid||a&&!a.test(c.namespace)||i&&i!==c.selector&&("**"!==i||!c.selector)||(d.splice(r,1),c.selector&&d.delegateCount--,h.remove&&h.remove.call(t,c));s&&!d.length&&(h.teardown&&!1!==h.teardown.call(t,f,g.handle)||mt.removeEvent(t,p,g.handle),delete u[p])}else for(p in u)mt.event.remove(t,p+e[l],n,i,!0);mt.isEmptyObject(u)&&Nt.remove(t,"handle events")}},dispatch:function(t){var e,n,i,o,r,s,a=mt.event.fix(t),u=new Array(arguments.length),l=(Nt.get(this,"events")||{})[a.type]||[],c=mt.event.special[a.type]||{};for(u[0]=a,e=1;e<arguments.length;e++)u[e]=arguments[e];if(a.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,a)){for(s=mt.event.handlers.call(this,a,l),e=0;(o=s[e++])&&!a.isPropagationStopped();)for(a.currentTarget=o.elem,n=0;(r=o.handlers[n++])&&!a.isImmediatePropagationStopped();)a.rnamespace&&!a.rnamespace.test(r.namespace)||(a.handleObj=r,a.data=r.data,(i=((mt.event.special[r.origType]||{}).handle||r.handler).apply(o.elem,u))!==undefined&&!1===(a.result=i)&&(a.preventDefault(),a.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,a),a.result}},handlers:function(t,e){var n,i,o,r,s,a=[],u=e.delegateCount,l=t.target;if(u&&l.nodeType&&!("click"===t.type&&1<=t.button))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==t.type||!0!==l.disabled)){for(r=[],s={},n=0;n<u;n++)s[o=(i=e[n]).selector+" "]===undefined&&(s[o]=i.needsContext?-1<mt(o,this).index(l):mt.find(o,this,null,[l]).length),s[o]&&r.push(i);r.length&&a.push({elem:l,handlers:r})}return l=this,u<e.length&&a.push({elem:l,handlers:e.slice(u)}),a},addProp:function(e,t){Object.defineProperty(mt.Event.prototype,e,{enumerable:!0,configurable:!0,get:mt.isFunction(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set:function(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(t){return t[mt.expando]?t:new mt.Event(t)},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==x()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===x()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&&l(this,"input"))return this.click(),!1},_default:function(t){return l(t.target,"a")}},beforeunload:{postDispatch:function(t){t.result!==undefined&&t.originalEvent&&(t.originalEvent.returnValue=t.result)}}}},mt.removeEvent=function(t,e,n){t.removeEventListener&&t.removeEventListener(e,n)},mt.Event=function(t,e){if(!(this instanceof mt.Event))return new mt.Event(t,e);t&&t.type?(this.originalEvent=t,this.type=t.type,this.isDefaultPrevented=t.defaultPrevented||t.defaultPrevented===undefined&&!1===t.returnValue?s:w,this.target=t.target&&3===t.target.nodeType?t.target.parentNode:t.target,
this.currentTarget=t.currentTarget,this.relatedTarget=t.relatedTarget):this.type=t,e&&mt.extend(this,e),this.timeStamp=t&&t.timeStamp||mt.now(),this[mt.expando]=!0},mt.Event.prototype={constructor:mt.Event,isDefaultPrevented:w,isPropagationStopped:w,isImmediatePropagationStopped:w,isSimulated:!1,preventDefault:function(){var t=this.originalEvent;this.isDefaultPrevented=s,t&&!this.isSimulated&&t.preventDefault()},stopPropagation:function(){var t=this.originalEvent;this.isPropagationStopped=s,t&&!this.isSimulated&&t.stopPropagation()},stopImmediatePropagation:function(){var t=this.originalEvent;this.isImmediatePropagationStopped=s,t&&!this.isSimulated&&t.stopImmediatePropagation(),this.stopPropagation()}},mt.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,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:function(t){var e=t.button;return null==t.which&&Qt.test(t.type)?null!=t.charCode?t.charCode:t.keyCode:!t.which&&e!==undefined&&te.test(t.type)?1&e?1:2&e?3:4&e?2:0:t.which}},mt.event.addProp),mt.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(t,r){mt.event.special[t]={delegateType:r,bindType:r,handle:function(t){var e,n=this,i=t.relatedTarget,o=t.handleObj;return i&&(i===n||mt.contains(n,i))||(t.type=o.origType,e=o.handler.apply(this,arguments),t.type=r),e}}}),mt.fn.extend({on:function(t,e,n,i){return A(this,t,e,n,i)},one:function(t,e,n,i){return A(this,t,e,n,i,1)},off:function(t,e,n){var i,o;if(t&&t.preventDefault&&t.handleObj)return i=t.handleObj,mt(t.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof t){for(o in t)this.off(o,e,t[o]);return this}return!1!==e&&"function"!=typeof e||(n=e,e=undefined),!1===n&&(n=w),this.each(function(){mt.event.remove(this,t,n,e)})}});var ne=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,ie=/<script|<style|<link/i,oe=/checked\s*(?:[^=]|=\s*.checked.)/i,re=/^true\/(.*)/,se=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;mt.extend({htmlPrefilter:function(t){return t.replace(ne,"<$1></$2>")},clone:function(t,e,n){var i,o,r,s,a=t.cloneNode(!0),u=mt.contains(t.ownerDocument,t);if(!(pt.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||mt.isXMLDoc(t)))for(s=y(a),i=0,o=(r=y(t)).length;i<o;i++)k(r[i],s[i]);if(e)if(n)for(r=r||y(t),s=s||y(a),i=0,o=r.length;i<o;i++)L(r[i],s[i]);else L(t,a);return 0<(s=y(a,"script")).length&&_(s,!u&&y(t,"script")),a},cleanData:function(t){for(var e,n,i,o=mt.event.special,r=0;(n=t[r])!==undefined;r++)if(Rt(n)){if(e=n[Nt.expando]){if(e.events)for(i in e.events)o[i]?mt.event.remove(n,i):mt.removeEvent(n,i,e.handle);n[Nt.expando]=undefined}n[Mt.expando]&&(n[Mt.expando]=undefined)}}}),mt.fn.extend({detach:function(t){return D(this,t,!0)},remove:function(t){return D(this,t)},text:function(t){return It(this,function(t){return t===undefined?mt.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=t)})},null,t,arguments.length)},append:function(){return P(this,arguments,function(t){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||C(this,t).appendChild(t)})},prepend:function(){return P(this,arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=C(this,t);e.insertBefore(t,e.firstChild)}})},before:function(){return P(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this)})},after:function(){return P(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)})},empty:function(){for(var t,e=0;null!=(t=this[e]);e++)1===t.nodeType&&(mt.cleanData(y(t,!1)),t.textContent="");return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map(function(){return mt.clone(this,t,e)})},html:function(t){return It(this,function(t){var e=this[0]||{},n=0,i=this.length;if(t===undefined&&1===e.nodeType)return e.innerHTML;if("string"==typeof t&&!ie.test(t)&&!Gt[(Zt.exec(t)||["",""])[1].toLowerCase()]){t=mt.htmlPrefilter(t);try{for(;n<i;n++)1===(e=this[n]||{}).nodeType&&(mt.cleanData(y(e,!1)),e.innerHTML=t);e=0}catch(o){}}e&&this.empty().append(t)},null,t,arguments.length)},replaceWith:function(){var n=[];return P(this,arguments,function(t){var e=this.parentNode;mt.inArray(this,n)<0&&(mt.cleanData(y(this)),e&&e.replaceChild(t,this))},n)}}),mt.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(t,s){mt.fn[t]=function(t){for(var e,n=[],i=mt(t),o=i.length-1,r=0;r<=o;r++)e=r===o?this:this.clone(!0),mt(i[r])[s](e),st.apply(n,e.get());return this.pushStack(n)}});var ae=/^margin/,ue=new RegExp("^("+Ft+")(?!px)[a-z%]+$","i"),le=function(t){var e=t.ownerDocument.defaultView;return e&&e.opener||(e=E),e.getComputedStyle(t)};!function(){function t(){if(s){s.style.cssText="box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",s.innerHTML="",Xt.appendChild(r);var t=E.getComputedStyle(s);e="1%"!==t.top,o="2px"===t.marginLeft,n="4px"===t.width,s.style.marginRight="50%",i="4px"===t.marginRight,Xt.removeChild(r),s=null}}var e,n,i,o,r=nt.createElement("div"),s=nt.createElement("div");s.style&&(s.style.backgroundClip="content-box",s.cloneNode(!0).style.backgroundClip="",pt.clearCloneStyle="content-box"===s.style.backgroundClip,r.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",r.appendChild(s),mt.extend(pt,{pixelPosition:function(){return t(),e},boxSizingReliable:function(){return t(),n},pixelMarginRight:function(){return t(),i},reliableMarginLeft:function(){return t(),o}}))}();var ce=/^(none|table(?!-c[ea]).+)/,he=/^--/,de={position:"absolute",visibility:"hidden",display:"block"},pe={letterSpacing:"0",fontWeight:"400"},fe=["Webkit","Moz","ms"],me=nt.createElement("div").style;mt.extend({cssHooks:{opacity:{get:function(t,e){if(e){var n=O(t,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(t,e,n,i){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var o,r,s,a=mt.camelCase(e),u=he.test(e),l=t.style;if(u||(e=N(a)),s=mt.cssHooks[e]||mt.cssHooks[a],n===undefined)return s&&"get"in s&&(o=s.get(t,!1,i))!==undefined?o:l[e];"string"===(r=typeof n)&&(o=zt.exec(n))&&o[1]&&(n=f(t,e,o),r="number"),null!=n&&n==n&&("number"===r&&(n+=o&&o[3]||(mt.cssNumber[a]?"":"px")),pt.clearCloneStyle||""!==n||0!==e.indexOf("background")||(l[e]="inherit"),s&&"set"in s&&(n=s.set(t,n,i))===undefined||(u?l.setProperty(e,n):l[e]=n))}},css:function(t,e,n,i){var o,r,s,a=mt.camelCase(e);return he.test(e)||(e=N(a)),(s=mt.cssHooks[e]||mt.cssHooks[a])&&"get"in s&&(o=s.get(t,!0,n)),o===undefined&&(o=O(t,e,i)),"normal"===o&&e in pe&&(o=pe[e]),""===n||n?(r=parseFloat(o),!0===n||isFinite(r)?r||0:o):o}}),mt.each(["height","width"],function(t,s){mt.cssHooks[s]={get:function(t,e,n){if(e)return!ce.test(mt.css(t,"display"))||t.getClientRects().length&&t.getBoundingClientRect().width?j(t,s,n):qt(t,de,function(){return j(t,s,n)})},set:function(t,e,n){var i,o=n&&le(t),r=n&&B(t,s,n,"border-box"===mt.css(t,"boxSizing",!1,o),o);return r&&(i=zt.exec(e))&&"px"!==(i[3]||"px")&&(t.style[s]=e,e=mt.css(t,s)),M(t,e,r)}}}),mt.cssHooks.marginLeft=I(pt.reliableMarginLeft,function(t,e){if(e)return(parseFloat(O(t,"marginLeft"))||t.getBoundingClientRect().left-qt(t,{marginLeft:0},function(){return t.getBoundingClientRect().left}))+"px"}),mt.each({margin:"",padding:"",border:"Width"},function(o,r){mt.cssHooks[o+r]={expand:function(t){for(var e=0,n={},i="string"==typeof t?t.split(" "):[t];e<4;e++)n[o+Ht[e]+r]=i[e]||i[e-2]||i[0];return n}},ae.test(o)||(mt.cssHooks[o+r].set=M)}),mt.fn.extend({css:function(t,e){return It(this,function(t,e,n){var i,o,r={},s=0;if(Array.isArray(e)){for(i=le(t),o=e.length;s<o;s++)r[e[s]]=mt.css(t,e[s],!1,i);return r}return n!==undefined?mt.style(t,e,n):mt.css(t,e)},t,e,1<arguments.length)}}),(mt.Tween=F).prototype={constructor:F,init:function(t,e,n,i,o,r){this.elem=t,this.prop=n,this.easing=o||mt.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=i,this.unit=r||(mt.cssNumber[n]?"":"px")},cur:function(){var t=F.propHooks[this.prop];return t&&t.get?t.get(this):F.propHooks._default.get(this)},run:function(t){var e,n=F.propHooks[this.prop];return this.options.duration?this.pos=e=mt.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):F.propHooks._default.set(this),this}},F.prototype.init.prototype=F.prototype,F.propHooks={_default:{get:function(t){var e;return 1!==t.elem.nodeType||null!=t.elem[t.prop]&&null==t.elem.style[t.prop]?t.elem[t.prop]:(e=mt.css(t.elem,t.prop,""))&&"auto"!==e?e:0},set:function(t){mt.fx.step[t.prop]?mt.fx.step[t.prop](t):1!==t.elem.nodeType||null==t.elem.style[mt.cssProps[t.prop]]&&!mt.cssHooks[t.prop]?t.elem[t.prop]=t.now:mt.style(t.elem,t.prop,t.now+t.unit)}}},F.propHooks.scrollTop=F.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},mt.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},mt.fx=F.prototype.init,mt.fx.step={};var ge,ve,ye,_e,be=/^(?:toggle|show|hide)$/,we=/queueHooks$/;mt.Animation=mt.extend(Z,{tweeners:{"*":[function(t,e){var n=this.createTween(t,e);return f(n.elem,t,zt.exec(e),n),n}]},tweener:function(t,e){mt.isFunction(t)?(e=t,t=["*"]):t=t.match(Pt);for(var n,i=0,o=t.length;i<o;i++)n=t[i],Z.tweeners[n]=Z.tweeners[n]||[],Z.tweeners[n].unshift(e)},prefilters:[V],prefilter:function(t,e){e?Z.prefilters.unshift(t):Z.prefilters.push(t)}}),mt.speed=function(t,e,n){var i=t&&"object"==typeof t?mt.extend({},t):{complete:n||!n&&e||mt.isFunction(t)&&t,duration:t,easing:n&&e||e&&!mt.isFunction(e)&&e};return mt.fx.off?i.duration=0:"number"!=typeof i.duration&&(i.duration in mt.fx.speeds?i.duration=mt.fx.speeds[i.duration]:i.duration=mt.fx.speeds._default),null!=i.queue&&!0!==i.queue||(i.queue="fx"),i.old=i.complete,i.complete=function(){mt.isFunction(i.old)&&i.old.call(this),i.queue&&mt.dequeue(this,i.queue)},i},mt.fn.extend({fadeTo:function(t,e,n,i){return this.filter(Wt).css("opacity",0).show().end().animate({opacity:e},t,n,i)},animate:function(e,t,n,i){var o=mt.isEmptyObject(e),r=mt.speed(t,n,i),s=function(){var t=Z(this,mt.extend({},e),r);(o||Nt.get(this,"finish"))&&t.stop(!0)};return s.finish=s,o||!1===r.queue?this.each(s):this.queue(r.queue,s)},stop:function(o,t,r){var s=function(t){var e=t.stop;delete t.stop,e(r)};return"string"!=typeof o&&(r=t,t=o,o=undefined),t&&!1!==o&&this.queue(o||"fx",[]),this.each(function(){var t=!0,e=null!=o&&o+"queueHooks",n=mt.timers,i=Nt.get(this);if(e)i[e]&&i[e].stop&&s(i[e]);else for(e in i)i[e]&&i[e].stop&&we.test(e)&&s(i[e]);for(e=n.length;e--;)n[e].elem!==this||null!=o&&n[e].queue!==o||(n[e].anim.stop(r),t=!1,n.splice(e,1));!t&&r||mt.dequeue(this,o)})},finish:function(s){return!1!==s&&(s=s||"fx"),this.each(function(){var t,e=Nt.get(this),n=e[s+"queue"],i=e[s+"queueHooks"],o=mt.timers,r=n?n.length:0;for(e.finish=!0,mt.queue(this,s,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===s&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;t<r;t++)n[t]&&n[t].finish&&n[t].finish.call(this);delete e.finish})}}),mt.each(["toggle","show","hide"],function(t,i){var o=mt.fn[i];mt.fn[i]=function(t,e,n){return null==t||"boolean"==typeof t?o.apply(this,arguments):this.animate(W(i,!0),t,e,n)}}),mt.each({slideDown:W("show"),slideUp:W("hide"),slideToggle:W("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(t,i){mt.fn[t]=function(t,e,n){return this.animate(i,t,e,n)}}),mt.timers=[],mt.fx.tick=function(){var t,e=0,n=mt.timers;for(ge=mt.now();e<n.length;e++)(t=n[e])()||n[e]!==t||n.splice(e--,1);n.length||mt.fx.stop(),ge=undefined},mt.fx.timer=function(t){mt.timers.push(t),mt.fx.start()},mt.fx.interval=13,mt.fx.start=function(){ve||(ve=!0,z())},mt.fx.stop=function(){ve=null},mt.fx.speeds={slow:600,fast:200,_default:400},mt.fn.delay=function(i,t){return i=mt.fx&&mt.fx.speeds[i]||i,t=t||"fx",this.queue(t,function(t,e){var n=E.setTimeout(t,i);e.stop=function(){E.clearTimeout(n)}})},ye=nt.createElement("input"),_e=nt.createElement("select").appendChild(nt.createElement("option")),ye.type="checkbox",pt.checkOn=""!==ye.value,pt.optSelected=_e.selected,(ye=nt.createElement("input")).value="t",ye.type="radio",pt.radioValue="t"===ye.value;var xe,Ae=mt.expr.attrHandle;mt.fn.extend({attr:function(t,e){return It(this,mt.attr,t,e,1<arguments.length)},removeAttr:function(t){return this.each(function(){mt.removeAttr(this,t)})}}),mt.extend({attr:function(t,e,n){var i,o,r=t.nodeType;if(3!==r&&8!==r&&2!==r)return"undefined"==typeof t.getAttribute?mt.prop(t,e,n):(1===r&&mt.isXMLDoc(t)||(o=mt.attrHooks[e.toLowerCase()]||(mt.expr.match.bool.test(e)?xe:undefined)),n!==undefined?null===n?void mt.removeAttr(t,e):o&&"set"in o&&(i=o.set(t,n,e))!==undefined?i:(t.setAttribute(e,n+""),n):o&&"get"in o&&null!==(i=o.get(t,e))?i:null==(i=mt.find.attr(t,e))?undefined:i)},attrHooks:{type:{set:function(t,e){if(!pt.radioValue&&"radio"===e&&l(t,"input")){var n=t.value;return t.setAttribute("type",e),n&&(t.value=n),e}}}},removeAttr:function(t,e){var n,i=0,o=e&&e.match(Pt);if(o&&1===t.nodeType)for(;n=o[i++];)t.removeAttribute(n)}}),xe={set:function(t,e,n){return!1===e?mt.removeAttr(t,n):t.setAttribute(n,n),n}},mt.each(mt.expr.match.bool.source.match(/\w+/g),function(t,e){var s=Ae[e]||mt.find.attr;Ae[e]=function(t,e,n){var i,o,r=e.toLowerCase();return n||(o=Ae[r],Ae[r]=i,i=null!=s(t,e,n)?r:null,Ae[r]=o),i}});var Ee=/^(?:input|select|textarea|button)$/i,Ce=/^(?:a|area)$/i;mt.fn.extend({prop:function(t,e){return It(this,mt.prop,t,e,1<arguments.length)},removeProp:function(t){return this.each(function(){delete this[mt.propFix[t]||t]})}}),mt.extend({prop:function(t,e,n){var i,o,r=t.nodeType;if(3!==r&&8!==r&&2!==r)return 1===r&&mt.isXMLDoc(t)||(e=mt.propFix[e]||e,o=mt.propHooks[e]),n!==undefined?o&&"set"in o&&(i=o.set(t,n,e))!==undefined?i:t[e]=n:o&&"get"in o&&null!==(i=o.get(t,e))?i:t[e]},propHooks:{tabIndex:{get:function(t){var e=mt.find.attr(t,"tabindex");return e?parseInt(e,10):Ee.test(t.nodeName)||Ce.test(t.nodeName)&&t.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),pt.optSelected||(mt.propHooks.selected={get:function(t){var e=t.parentNode;return e&&e.parentNode&&e.parentNode.selectedIndex,null},set:function(t){var e=t.parentNode;e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex)}}),mt.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){mt.propFix[this.toLowerCase()]=this}),mt.fn.extend({addClass:function(e){var t,n,i,o,r,s,a,u=0;if(mt.isFunction(e))return this.each(function(t){mt(this).addClass(e.call(this,t,G(this)))});if("string"==typeof e&&e)for(t=e.match(Pt)||[];n=this[u++];)if(o=G(n),i=1===n.nodeType&&" "+K(o)+" "){for(s=0;r=t[s++];)i.indexOf(" "+r+" ")<0&&(i+=r+" ");o!==(a=K(i))&&n.setAttribute("class",a)}return this},removeClass:function(e){var t,n,i,o,r,s,a,u=0;if(mt.isFunction(e))return this.each(function(t){mt(this).removeClass(e.call(this,t,G(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof e&&e)for(t=e.match(Pt)||[];n=this[u++];)if(o=G(n),i=1===n.nodeType&&" "+K(o)+" "){for(s=0;r=t[s++];)for(;-1<i.indexOf(" "+r+" ");)i=i.replace(" "+r+" "," ");o!==(a=K(i))&&n.setAttribute("class",a)}return this},toggleClass:function(o,e){var r=typeof o;return"boolean"==typeof e&&"string"===r?e?this.addClass(o):this.removeClass(o):mt.isFunction(o)?this.each(function(t){mt(this).toggleClass(o.call(this,t,G(this),e),e)}):this.each(function(){var t,e,n,i;if("string"===r)for(e=0,n=mt(this),i=o.match(Pt)||[];t=i[e++];)n.hasClass(t)?n.removeClass(t):n.addClass(t);else o!==undefined&&"boolean"!==r||((t=G(this))&&Nt.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===o?"":Nt.get(this,"__className__")||""))})},hasClass:function(t){var e,n,i=0;for(e=" "+t+" ";n=this[i++];)if(1===n.nodeType&&-1<(" "+K(G(n))+" ").indexOf(e))return!0;return!1}});var Te=/\r/g;mt.fn.extend({val:function(n){var i,t,o,e=this[0];return arguments.length?(o=mt.isFunction(n),this.each(function(t){var e;1===this.nodeType&&(null==(e=o?n.call(this,t,mt(this).val()):n)?e="":"number"==typeof e?e+="":Array.isArray(e)&&(e=mt.map(e,function(t){return null==t?"":t+""})),(i=mt.valHooks[this.type]||mt.valHooks[this.nodeName.toLowerCase()])&&"set"in i&&i.set(this,e,"value")!==undefined||(this.value=e))})):e?(i=mt.valHooks[e.type]||mt.valHooks[e.nodeName.toLowerCase()])&&"get"in i&&(t=i.get(e,"value"))!==undefined?t:"string"==typeof(t=e.value)?t.replace(Te,""):null==t?"":t:void 0}}),mt.extend({valHooks:{option:{get:function(t){var e=mt.find.attr(t,"value");return null!=e?e:K(mt.text(t))}},select:{get:function(t){var e,n,i,o=t.options,r=t.selectedIndex,s="select-one"===t.type,a=s?null:[],u=s?r+1:o.length;for(i=r<0?u:s?r:0;i<u;i++)if(((n=o[i]).selected||i===r)&&!n.disabled&&(!n.parentNode.disabled||!l(n.parentNode,"optgroup"))){if(e=mt(n).val(),s)return e;a.push(e)}return a},set:function(t,e){for(var n,i,o=t.options,r=mt.makeArray(e),s=o.length;s--;)((i=o[s]).selected=-1<mt.inArray(mt.valHooks.option.get(i),r))&&(n=!0);return n||(t.selectedIndex=-1),r}}}}),mt.each(["radio","checkbox"],function(){mt.valHooks[this]={set:function(t,e){if(Array.isArray(e))return t.checked=-1<mt.inArray(mt(t).val(),e)}},pt.checkOn||(mt.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})});var Se=/^(?:focusinfocus|focusoutblur)$/;mt.extend(mt.event,{trigger:function(t,e,n,i){var o,r,s,a,u,l,c,h=[n||nt],d=ct.call(t,"type")?t.type:t,p=ct.call(t,"namespace")?t.namespace.split("."):[];if(r=s=n=n||nt,3!==n.nodeType&&8!==n.nodeType&&!Se.test(d+mt.event.triggered)&&(-1<d.indexOf(".")&&(d=(p=d.split(".")).shift(),p.sort()),u=d.indexOf(":")<0&&"on"+d,(t=t[mt.expando]?t:new mt.Event(d,"object"==typeof t&&t)).isTrigger=i?2:3,t.namespace=p.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=undefined,t.target||(t.target=n),e=null==e?[t]:mt.makeArray(e,[t]),c=mt.event.special[d]||{},i||!c.trigger||!1!==c.trigger.apply(n,e))){if(!i&&!c.noBubble&&!mt.isWindow(n)){for(a=c.delegateType||d,Se.test(a+d)||(r=r.parentNode);r;r=r.parentNode)h.push(r),s=r;s===(n.ownerDocument||nt)&&h.push(s.defaultView||s.parentWindow||E)}for(o=0;(r=h[o++])&&!t.isPropagationStopped();)t.type=1<o?a:c.bindType||d,(l=(Nt.get(r,"events")||{})[t.type]&&Nt.get(r,"handle"))&&l.apply(r,e),(l=u&&r[u])&&l.apply&&Rt(r)&&(t.result=l.apply(r,e),!1===t.result&&t.preventDefault());return t.type=d,i||t.isDefaultPrevented()||c._default&&!1!==c._default.apply(h.pop(),e)||!Rt(n)||u&&mt.isFunction(n[d])&&!mt.isWindow(n)&&((s=n[u])&&(n[u]=null),n[mt.event.triggered=d](),mt.event.triggered=undefined,s&&(n[u]=s)),t.result}},simulate:function(t,e,n){var i=mt.extend(new mt.Event,n,{type:t,isSimulated:!0});mt.event.trigger(i,null,e)}}),mt.fn.extend({trigger:function(t,e){return this.each(function(){mt.event.trigger(t,e,this)})},triggerHandler:function(t,e){var n=this[0];if(n)return mt.event.trigger(t,e,n,!0)}}),mt.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(t,n){mt.fn[n]=function(t,e){return 0<arguments.length?this.on(n,null,t,e):this.trigger(n)}}),mt.fn.extend({hover:function(t,e){return this.mouseenter(t).mouseleave(e||t)}}),pt.focusin="onfocusin"in E,pt.focusin||mt.each({focus:"focusin",blur:"focusout"},function(n,i){var o=function(t){mt.event.simulate(i,t.target,mt.event.fix(t))};mt.event.special[i]={setup:function(){var t=this.ownerDocument||this,e=Nt.access(t,i);e||t.addEventListener(n,o,!0),Nt.access(t,i,(e||0)+1)},teardown:function(){var t=this.ownerDocument||this,e=Nt.access(t,i)-1;e?Nt.access(t,i,e):(t.removeEventListener(n,o,!0),Nt.remove(t,i))}}});var Le=E.location,ke=mt.now(),Pe=/\?/;mt.parseXML=function(t){var e;if(!t||"string"!=typeof t)return null;try{e=(new E.DOMParser).parseFromString(t,"text/xml")}catch(n){e=undefined}return e&&!e.getElementsByTagName("parsererror").length||mt.error("Invalid XML: "+t),e};var De=/\[\]$/,Oe=/\r?\n/g,Ie=/^(?:submit|button|image|reset|file)$/i,Re=/^(?:input|select|textarea|keygen)/i;mt.param=function(t,e){var n,i=[],o=function(t,e){var n=mt.isFunction(e)?e():e;i[i.length]=encodeURIComponent(t)+"="+encodeURIComponent(null==n?"":n)};if(Array.isArray(t)||t.jquery&&!mt.isPlainObject(t))mt.each(t,function(){o(this.name,this.value)});else for(n in t)J(n,t[n],e,o);return i.join("&")},mt.fn.extend({serialize:function(){return mt.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var t=mt.prop(this,"elements");return t?mt.makeArray(t):this}).filter(function(){var t=this.type;return this.name&&!mt(this).is(":disabled")&&Re.test(this.nodeName)&&!Ie.test(t)&&(this.checked||!Ut.test(t))}).map(function(t,e){var n=mt(this).val();return null==n?null:Array.isArray(n)?mt.map(n,function(t){return{name:e.name,value:t.replace(Oe,"\r\n")}}):{name:e.name,value:n.replace(Oe,"\r\n")}}).get()}});var Ne=/%20/g,Me=/#.*$/,Be=/([?&])_=[^&]*/,je=/^(.*?):[ \t]*([^\r\n]*)$/gm,Fe=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,ze=/^(?:GET|HEAD)$/,He=/^\/\//,We={},qe={},Ve="*/".concat("*"),Ue=nt.createElement("a");Ue.href=Le.href,mt.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Le.href,type:"GET",isLocal:Fe.test(Le.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Ve,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":mt.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?X(X(t,mt.ajaxSettings),e):X(mt.ajaxSettings,t)},ajaxPrefilter:$(We),ajaxTransport:$(qe),ajax:function(t,e){function n(t,e,n,i){var o,r,s,a,u,l=e;f||(f=!0,p&&E.clearTimeout(p),c=undefined,d=i||"",x.readyState=0<t?4:0,o=200<=t&&t<300||304===t,n&&(a=Q(g,x,n)),a=tt(g,a,x,o),o?(g.ifModified&&((u=x.getResponseHeader("Last-Modified"))&&(mt.lastModified[h]=u),(u=x.getResponseHeader("etag"))&&(mt.etag[h]=u)),204===t||"HEAD"===g.type?l="nocontent":304===t?l="notmodified":(l=a.state,r=a.data,o=!(s=a.error))):(s=l,!t&&l||(l="error",t<0&&(t=0))),x.status=t,x.statusText=(e||l)+"",o?_.resolveWith(v,[r,l,x]):_.rejectWith(v,[x,l,s]),x.statusCode(w),w=undefined,m&&y.trigger(o?"ajaxSuccess":"ajaxError",[x,g,o?r:s]),b.fireWith(v,[x,l]),m&&(y.trigger("ajaxComplete",[x,g]),--mt.active||mt.event.trigger("ajaxStop")))}"object"==typeof t&&(e=t,t=undefined),e=e||{};var c,h,d,i,p,o,f,m,r,s,g=mt.ajaxSetup({},e),v=g.context||g,y=g.context&&(v.nodeType||v.jquery)?mt(v):mt.event,_=mt.Deferred(),b=mt.Callbacks("once memory"),w=g.statusCode||{},a={},u={},l="canceled",x={readyState:0,getResponseHeader:function(t){var e;if(f){if(!i)for(i={};e=je.exec(d);)i[e[1].toLowerCase()]=e[2];e=i[t.toLowerCase()]}return null==e?null:e},getAllResponseHeaders:function(){return f?d:null},setRequestHeader:function(t,e){return null==f&&(t=u[t.toLowerCase()]=u[t.toLowerCase()]||t,a[t]=e),this},overrideMimeType:function(t){return null==f&&(g.mimeType=t),this},statusCode:function(t){var e;if(t)if(f)x.always(t[x.status]);else for(e in t)w[e]=[w[e],t[e]];return this},abort:function(t){var e=t||l;return c&&c.abort(e),n(0,e),this}};if(_.promise(x),g.url=((t||g.url||Le.href)+"").replace(He,Le.protocol+"//"),g.type=e.method||e.type||g.method||g.type,g.dataTypes=(g.dataType||"*").toLowerCase().match(Pt)||[""],null==g.crossDomain){o=nt.createElement("a");try{o.href=g.url,o.href=o.href,g.crossDomain=Ue.protocol+"//"+Ue.host!=o.protocol+"//"+o.host}catch(A){g.crossDomain=!0}}if(g.data&&g.processData&&"string"!=typeof g.data&&(g.data=mt.param(g.data,g.traditional)),Y(We,g,e,x),f)return x;for(r in(m=mt.event&&g.global)&&0==mt.active++&&mt.event.trigger("ajaxStart"),g.type=g.type.toUpperCase(),g.hasContent=!ze.test(g.type),h=g.url.replace(Me,""),g.hasContent?g.data&&g.processData&&0===(g.contentType||"").indexOf("application/x-www-form-urlencoded")&&(g.data=g.data.replace(Ne,"+")):(s=g.url.slice(h.length),g.data&&(h+=(Pe.test(h)?"&":"?")+g.data,delete g.data),!1===g.cache&&(h=h.replace(Be,"$1"),s=(Pe.test(h)?"&":"?")+"_="+ke+++s),g.url=h+s),g.ifModified&&(mt.lastModified[h]&&x.setRequestHeader("If-Modified-Since",mt.lastModified[h]),mt.etag[h]&&x.setRequestHeader("If-None-Match",mt.etag[h])),(g.data&&g.hasContent&&!1!==g.contentType||e.contentType)&&x.setRequestHeader("Content-Type",g.contentType),x.setRequestHeader("Accept",g.dataTypes[0]&&g.accepts[g.dataTypes[0]]?g.accepts[g.dataTypes[0]]+("*"!==g.dataTypes[0]?", "+Ve+"; q=0.01":""):g.accepts["*"]),g.headers)x.setRequestHeader(r,g.headers[r]);if(g.beforeSend&&(!1===g.beforeSend.call(v,x,g)||f))return x.abort();if(l="abort",b.add(g.complete),x.done(g.success),x.fail(g.error),c=Y(qe,g,e,x)){if(x.readyState=1,m&&y.trigger("ajaxSend",[x,g]),f)return x;g.async&&0<g.timeout&&(p=E.setTimeout(function(){x.abort("timeout")},g.timeout));try{f=!1,c.send(a,n)}catch(A){if(f)throw A;n(-1,A)}}else n(-1,"No Transport");return x},getJSON:function(t,e,n){return mt.get(t,e,n,"json")},getScript:function(t,e){return mt.get(t,undefined,e,"script")}}),mt.each(["get","post"],function(t,o){mt[o]=function(t,e,n,i){return mt.isFunction(e)&&(i=i||n,n=e,e=undefined),mt.ajax(mt.extend({url:t,type:o,dataType:i,data:e,success:n},mt.isPlainObject(t)&&t))}}),mt._evalUrl=function(t){return mt.ajax({url:t,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,"throws":!0})},mt.fn.extend({wrapAll:function(t){var e;return this[0]&&(mt.isFunction(t)&&(t=t.call(this[0])),e=mt(t,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&e.insertBefore(this[0]),e.map(function(){for(var t=this;t.firstElementChild;)t=t.firstElementChild;return t}).append(this)),this},wrapInner:function(n){return mt.isFunction(n)?this.each(function(t){mt(this).wrapInner(n.call(this,t))}):this.each(function(){var t=mt(this),e=t.contents();e.length?e.wrapAll(n):t.append(n)})},wrap:function(e){var n=mt.isFunction(e);return this.each(function(t){mt(this).wrapAll(n?e.call(this,t):e)})},unwrap:function(t){return this.parent(t).not("body").each(function(){mt(this).replaceWith(this.childNodes)}),this}}),mt.expr.pseudos.hidden=function(t){return!mt.expr.pseudos.visible(t)},mt.expr.pseudos.visible=function(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},mt.ajaxSettings.xhr=function(){try{return new E.XMLHttpRequest}catch(t){}};var Ze={0:200,1223:204},Ke=mt.ajaxSettings.xhr();pt.cors=!!Ke&&"withCredentials"in Ke,pt.ajax=Ke=!!Ke,mt.ajaxTransport(function(r){var s,a;if(pt.cors||Ke&&!r.crossDomain)return{send:function(t,e){var n,i=r.xhr();if(i.open(r.type,r.url,r.async,r.username,r.password),r.xhrFields)for(n in r.xhrFields)i[n]=r.xhrFields[n];for(n in r.mimeType&&i.overrideMimeType&&i.overrideMimeType(r.mimeType),r.crossDomain||t["X-Requested-With"]||(t["X-Requested-With"]="XMLHttpRequest"),t)i.setRequestHeader(n,t[n]);s=function(t){return function(){s&&(s=a=i.onload=i.onerror=i.onabort=i.onreadystatechange=null,"abort"===t?i.abort():"error"===t?"number"!=typeof i.status?e(0,"error"):e(i.status,i.statusText):e(Ze[i.status]||i.status,i.statusText,"text"!==(i.responseType||"text")||"string"!=typeof i.responseText?{binary:i.response}:{text:i.responseText},i.getAllResponseHeaders()))}},i.onload=s(),a=i.onerror=s("error"),i.onabort!==undefined?i.onabort=a:i.onreadystatechange=function(){4===i.readyState&&E.setTimeout(function(){s&&a()})},s=s("abort");try{i.send(r.hasContent&&r.data||null)}catch(o){if(s)throw o}},abort:function(){s&&s()}}}),mt.ajaxPrefilter(function(t){t.crossDomain&&(t.contents.script=!1)}),mt.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(t){return mt.globalEval(t),t}}}),mt.ajaxPrefilter("script",function(t){t.cache===undefined&&(t.cache=!1),t.crossDomain&&(t.type="GET")}),mt.ajaxTransport("script",function(n){var i,o;if(n.crossDomain)return{send:function(t,e){i=mt("<script>").prop({charset:n.scriptCharset,src:n.url}).on("load error",o=function(t){i.remove(),o=null,t&&e("error"===t.type?404:200,t.type)}),nt.head.appendChild(i[0])},abort:function(){o&&o()}}});var Ge,Je=[],$e=/(=)\?(?=&|$)|\?\?/;mt.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=Je.pop()||mt.expando+"_"+ke++;return this[t]=!0,t}}),mt.ajaxPrefilter("json jsonp",function(t,e,n){var i,o,r,s=!1!==t.jsonp&&($e.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&$e.test(t.data)&&"data");if(s||"jsonp"===t.dataTypes[0])return i=t.jsonpCallback=mt.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace($e,"$1"+i):!1!==t.jsonp&&(t.url+=(Pe.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return r||mt.error(i+" was not called"),r[0]},t.dataTypes[0]="json",o=E[i],E[i]=function(){r=arguments},n.always(function(){o===undefined?mt(E).removeProp(i):E[i]=o,t[i]&&(t.jsonpCallback=e.jsonpCallback,Je.push(i)),r&&mt.isFunction(o)&&o(r[0]),r=o=undefined}),"script"}),pt.createHTMLDocument=((Ge=nt.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Ge.childNodes.length),mt.parseHTML=function(t,e,n){return"string"!=typeof t?[]:("boolean"==typeof e&&(n=e,e=!1),e||(pt.createHTMLDocument?((i=(e=nt.implementation.createHTMLDocument("")).createElement("base")).href=nt.location.href,e.head.appendChild(i)):e=nt),r=!n&&[],(o=Et.exec(t))?[e.createElement(o[1])]:(o=b([t],e,r),r&&r.length&&mt(r).remove(),mt.merge([],o.childNodes)));var i,o,r},mt.fn.load=function(t,e,n){var i,o,r,s=this,a=t.indexOf(" ");return-1<a&&(i=K(t.slice(a)),t=t.slice(0,a)),mt.isFunction(e)?(n=e,e=undefined):e&&"object"==typeof e&&(o="POST"),0<s.length&&mt.ajax({url:t,type:o||"GET",dataType:"html",data:e}).done(function(t){r=arguments,s.html(i?mt("<div>").append(mt.parseHTML(t)).find(i):t)}).always(n&&function(t,e){s.each(function(){n.apply(this,r||[t.responseText,e,t])})}),this},mt.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(t,e){mt.fn[e]=function(t){return this.on(e,t)}}),mt.expr.pseudos.animated=function(e){return mt.grep(mt.timers,function(t){return e===t.elem}).length},mt.offset={setOffset:function(t,e,n){var i,o,r,s,a,u,l=mt.css(t,"position"),c=mt(t),h={};"static"===l&&(t.style.position="relative"),a=c.offset(),r=mt.css(t,"top"),u=mt.css(t,"left"),("absolute"===l||"fixed"===l)&&-1<(r+u).indexOf("auto")?(s=(i=c.position()).top,o=i.left):(s=parseFloat(r)||0,o=parseFloat(u)||0),mt.isFunction(e)&&(e=e.call(t,n,mt.extend({},a))),null!=e.top&&(h.top=e.top-a.top+s),null!=e.left&&(h.left=e.left-a.left+o),"using"in e?e.using.call(t,h):c.css(h)}},mt.fn.extend({offset:function(e){if(arguments.length)return e===undefined?this:this.each(function(t){mt.offset.setOffset(this,e,t)});var t,n,i,o,r=this[0];return r?r.getClientRects().length?(i=r.getBoundingClientRect(),n=(t=r.ownerDocument).documentElement,o=t.defaultView,{top:i.top+o.pageYOffset-n.clientTop,left:i.left+o.pageXOffset-n.clientLeft}):{top:0,left:0}:void 0},position:function(){if(this[0]){var t,e,n=this[0],i={top:0,left:0};return"fixed"===mt.css(n,"position")?e=n.getBoundingClientRect():(t=this.offsetParent(),e=this.offset(),l(t[0],"html")||(i=t.offset()),i={top:i.top+mt.css(t[0],"borderTopWidth",!0),left:i.left+mt.css(t[0],"borderLeftWidth",!0)}),{top:e.top-i.top-mt.css(n,"marginTop",!0),left:e.left-i.left-mt.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent;t&&"static"===mt.css(t,"position");)t=t.offsetParent;return t||Xt})}}),mt.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"
},function(e,o){var r="pageYOffset"===o;mt.fn[e]=function(t){return It(this,function(t,e,n){var i;if(mt.isWindow(t)?i=t:9===t.nodeType&&(i=t.defaultView),n===undefined)return i?i[o]:t[e];i?i.scrollTo(r?i.pageXOffset:n,r?n:i.pageYOffset):t[e]=n},e,t,arguments.length)}}),mt.each(["top","left"],function(t,n){mt.cssHooks[n]=I(pt.pixelPosition,function(t,e){if(e)return e=O(t,n),ue.test(e)?mt(t).position()[n]+"px":e})}),mt.each({Height:"height",Width:"width"},function(s,a){mt.each({padding:"inner"+s,content:a,"":"outer"+s},function(i,r){mt.fn[r]=function(t,e){var n=arguments.length&&(i||"boolean"!=typeof t),o=i||(!0===t||!0===e?"margin":"border");return It(this,function(t,e,n){var i;return mt.isWindow(t)?0===r.indexOf("outer")?t["inner"+s]:t.document.documentElement["client"+s]:9===t.nodeType?(i=t.documentElement,Math.max(t.body["scroll"+s],i["scroll"+s],t.body["offset"+s],i["offset"+s],i["client"+s])):n===undefined?mt.css(t,e,o):mt.style(t,e,n,o)},a,n?t:undefined,n)}})}),mt.fn.extend({bind:function(t,e,n){return this.on(t,null,e,n)},unbind:function(t,e){return this.off(t,null,e)},delegate:function(t,e,n,i){return this.on(e,t,n,i)},undelegate:function(t,e,n){return 1===arguments.length?this.off(t,"**"):this.off(e,t||"**",n)}}),mt.holdReady=function(t){t?mt.readyWait++:mt.ready(!0)},mt.isArray=Array.isArray,mt.parseJSON=JSON.parse,mt.nodeName=l,"function"==typeof define&&define.amd&&define("jquery",[],function(){return mt});var Ye=E.jQuery,Xe=E.$;return mt.noConflict=function(t){return E.$===mt&&(E.$=Xe),t&&E.jQuery===mt&&(E.jQuery=Ye),mt},t||(E.jQuery=E.$=mt),mt}),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.Popper=e()}(this,function(){"use strict";function t(t){var e=!1;return function(){e||(e=!0,window.Promise.resolve().then(function(){e=!1,t()}))}}function e(t){var e=!1;return function(){e||(e=!0,setTimeout(function(){e=!1,t()},at))}}function a(t){return t&&"[object Function]"==={}.toString.call(t)}function b(t,e){if(1!==t.nodeType)return[];var n=getComputedStyle(t,null);return e?n[e]:n}function h(t){return"HTML"===t.nodeName?t:t.parentNode||t.host}function p(t){if(!t)return document.body;switch(t.nodeName){case"HTML":case"BODY":return t.ownerDocument.body;case"#document":return t.body}var e=b(t),n=e.overflow,i=e.overflowX,o=e.overflowY;return/(auto|scroll)/.test(n+o+i)?t:p(h(t))}function y(t){var e=t&&t.offsetParent,n=e&&e.nodeName;return n&&"BODY"!==n&&"HTML"!==n?-1!==["TD","TABLE"].indexOf(e.nodeName)&&"static"===b(e,"position")?y(e):e:t?t.ownerDocument.documentElement:document.documentElement}function u(t){var e=t.nodeName;return"BODY"!==e&&("HTML"===e||y(t.firstElementChild)===t)}function l(t){return null!==t.parentNode?l(t.parentNode):t}function d(t,e){if(!(t&&t.nodeType&&e&&e.nodeType))return document.documentElement;var n=t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING,i=n?t:e,o=n?e:t,r=document.createRange();r.setStart(i,0),r.setEnd(o,0);var s=r.commonAncestorContainer;if(t!==s&&e!==s||i.contains(o))return u(s)?s:y(s);var a=l(t);return a.host?d(a.host,e):d(t,l(e).host)}function f(t,e){var n="top"===(1<arguments.length&&e!==undefined?e:"top")?"scrollTop":"scrollLeft",i=t.nodeName;if("BODY"===i||"HTML"===i){var o=t.ownerDocument.documentElement;return(t.ownerDocument.scrollingElement||o)[n]}return t[n]}function m(t,e,n){var i=2<arguments.length&&n!==undefined&&n,o=f(e,"top"),r=f(e,"left"),s=i?-1:1;return t.top+=o*s,t.bottom+=o*s,t.left+=r*s,t.right+=r*s,t}function g(t,e){var n="x"===e?"Left":"Top",i="Left"===n?"Right":"Bottom";return parseFloat(t["border"+n+"Width"],10)+parseFloat(t["border"+i+"Width"],10)}function i(t,e,n,i){return Math.max(e["offset"+t],e["scroll"+t],n["client"+t],n["offset"+t],n["scroll"+t],ht()?n["offset"+t]+i["margin"+("Height"===t?"Top":"Left")]+i["margin"+("Height"===t?"Bottom":"Right")]:0)}function v(){var t=document.body,e=document.documentElement,n=ht()&&getComputedStyle(e);return{height:i("Height",t,e,n),width:i("Width",t,e,n)}}function w(t){return mt({},t,{right:t.left+t.width,bottom:t.top+t.height})}function _(t){var e={};if(ht())try{e=t.getBoundingClientRect();var n=f(t,"top"),i=f(t,"left");e.top+=n,e.left+=i,e.bottom+=n,e.right+=i}catch(h){}else e=t.getBoundingClientRect();var o={left:e.left,top:e.top,width:e.right-e.left,height:e.bottom-e.top},r="HTML"===t.nodeName?v():{},s=r.width||t.clientWidth||o.right-o.left,a=r.height||t.clientHeight||o.bottom-o.top,u=t.offsetWidth-s,l=t.offsetHeight-a;if(u||l){var c=b(t);u-=g(c,"x"),l-=g(c,"y"),o.width-=u,o.height-=l}return w(o)}function x(t,e){var n=ht(),i="HTML"===e.nodeName,o=_(t),r=_(e),s=p(t),a=b(e),u=parseFloat(a.borderTopWidth,10),l=parseFloat(a.borderLeftWidth,10),c=w({top:o.top-r.top-u,left:o.left-r.left-l,width:o.width,height:o.height});if(c.marginTop=0,c.marginLeft=0,!n&&i){var h=parseFloat(a.marginTop,10),d=parseFloat(a.marginLeft,10);c.top-=u-h,c.bottom-=u-h,c.left-=l-d,c.right-=l-d,c.marginTop=h,c.marginLeft=d}return(n?e.contains(s):e===s&&"BODY"!==s.nodeName)&&(c=m(c,e)),c}function A(t){var e=t.ownerDocument.documentElement,n=x(t,e),i=Math.max(e.clientWidth,window.innerWidth||0),o=Math.max(e.clientHeight,window.innerHeight||0),r=f(e),s=f(e,"left");return w({top:r-n.top+n.marginTop,left:s-n.left+n.marginLeft,width:i,height:o})}function E(t){var e=t.nodeName;return"BODY"!==e&&"HTML"!==e&&("fixed"===b(t,"position")||E(h(t)))}function C(t,e,n,i){var o={top:0,left:0},r=d(t,e);if("viewport"===i)o=A(r);else{var s=void 0;"scrollParent"===i?"BODY"===(s=p(h(e))).nodeName&&(s=t.ownerDocument.documentElement):s="window"===i?t.ownerDocument.documentElement:i;var a=x(s,r);if("HTML"!==s.nodeName||E(r))o=a;else{var u=v(),l=u.height,c=u.width;o.top+=a.top-a.marginTop,o.bottom=l+a.top,o.left+=a.left-a.marginLeft,o.right=c+a.left}}return o.left+=n,o.top+=n,o.right-=n,o.bottom-=n,o}function T(t){return t.width*t.height}function c(t,e,i,n,o,r){var s=5<arguments.length&&r!==undefined?r:0;if(-1===t.indexOf("auto"))return t;var a=C(i,n,s,o),u={top:{width:a.width,height:e.top-a.top},right:{width:a.right-e.right,height:a.height},bottom:{width:a.width,height:a.bottom-e.bottom},left:{width:e.left-a.left,height:a.height}},l=Object.keys(u).map(function(t){return mt({key:t},u[t],{area:T(u[t])})}).sort(function(t,e){return e.area-t.area}),c=l.filter(function(t){var e=t.width,n=t.height;return e>=i.clientWidth&&n>=i.clientHeight}),h=0<c.length?c[0].key:l[0].key,d=t.split("-")[1];return h+(d?"-"+d:"")}function S(t,e,n){return x(n,d(e,n))}function L(t){var e=getComputedStyle(t),n=parseFloat(e.marginTop)+parseFloat(e.marginBottom),i=parseFloat(e.marginLeft)+parseFloat(e.marginRight);return{width:t.offsetWidth+i,height:t.offsetHeight+n}}function k(t){var e={left:"right",right:"left",bottom:"top",top:"bottom"};return t.replace(/left|right|bottom|top/g,function(t){return e[t]})}function P(t,e,n){n=n.split("-")[0];var i=L(t),o={width:i.width,height:i.height},r=-1!==["right","left"].indexOf(n),s=r?"top":"left",a=r?"left":"top",u=r?"height":"width",l=r?"width":"height";return o[s]=e[s]+e[u]/2-i[u]/2,o[a]=n===a?e[a]-i[l]:e[k(a)],o}function D(t,e){return Array.prototype.find?t.find(e):t.filter(e)[0]}function o(t,e,n){if(Array.prototype.findIndex)return t.findIndex(function(t){return t[e]===n});var i=D(t,function(t){return t[e]===n});return t.indexOf(i)}function O(t,n,e){return(e===undefined?t:t.slice(0,o(t,"name",e))).forEach(function(t){t["function"]&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var e=t["function"]||t.fn;t.enabled&&a(e)&&(n.offsets.popper=w(n.offsets.popper),n.offsets.reference=w(n.offsets.reference),n=e(n,t))}),n}function n(){if(!this.state.isDestroyed){var t={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};t.offsets.reference=S(this.state,this.popper,this.reference),t.placement=c(this.options.placement,t.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),t.originalPlacement=t.placement,t.offsets.popper=P(this.popper,t.offsets.reference,t.placement),t.offsets.popper.position="absolute",t=O(this.modifiers,t),this.state.isCreated?this.options.onUpdate(t):(this.state.isCreated=!0,this.options.onCreate(t))}}function r(t,n){return t.some(function(t){var e=t.name;return t.enabled&&e===n})}function I(t){for(var e=[!1,"ms","Webkit","Moz","O"],n=t.charAt(0).toUpperCase()+t.slice(1),i=0;i<e.length-1;i++){var o=e[i],r=o?""+o+n:t;if("undefined"!=typeof document.body.style[r])return r}return null}function R(){return this.state.isDestroyed=!0,r(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.left="",this.popper.style.position="",this.popper.style.top="",this.popper.style[I("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function s(t){var e=t.ownerDocument;return e?e.defaultView:window}function N(t,e,n,i){var o="BODY"===t.nodeName,r=o?t.ownerDocument.defaultView:t;r.addEventListener(e,n,{passive:!0}),o||N(p(r.parentNode),e,n,i),i.push(r)}function M(t,e,n,i){n.updateBound=i,s(t).addEventListener("resize",n.updateBound,{passive:!0});var o=p(t);return N(o,"scroll",n.updateBound,n.scrollParents),n.scrollElement=o,n.eventsEnabled=!0,n}function B(){this.state.eventsEnabled||(this.state=M(this.reference,this.options,this.state,this.scheduleUpdate))}function j(t,e){return s(t).removeEventListener("resize",e.updateBound),e.scrollParents.forEach(function(t){t.removeEventListener("scroll",e.updateBound)}),e.updateBound=null,e.scrollParents=[],e.scrollElement=null,e.eventsEnabled=!1,e}function F(){this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=j(this.reference,this.state))}function z(t){return""!==t&&!isNaN(parseFloat(t))&&isFinite(t)}function H(n,i){Object.keys(i).forEach(function(t){var e="";-1!==["width","height","top","right","bottom","left"].indexOf(t)&&z(i[t])&&(e="px"),n.style[t]=i[t]+e})}function W(e,n){Object.keys(n).forEach(function(t){!1!==n[t]?e.setAttribute(t,n[t]):e.removeAttribute(t)})}function q(t){return H(t.instance.popper,t.styles),W(t.instance.popper,t.attributes),t.arrowElement&&Object.keys(t.arrowStyles).length&&H(t.arrowElement,t.arrowStyles),t}function V(t,e,n,i,o){var r=S(o,e,t),s=c(n.placement,r,e,t,n.modifiers.flip.boundariesElement,n.modifiers.flip.padding);return e.setAttribute("x-placement",s),H(e,{position:"absolute"}),n}function U(t,e){var n=e.x,i=e.y,o=t.offsets.popper,r=D(t.instance.modifiers,function(t){return"applyStyle"===t.name}).gpuAcceleration;r!==undefined&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var s=r!==undefined?r:e.gpuAcceleration,a=_(y(t.instance.popper)),u={position:o.position},l={left:Math.floor(o.left),top:Math.floor(o.top),bottom:Math.floor(o.bottom),right:Math.floor(o.right)},c="bottom"===n?"top":"bottom",h="right"===i?"left":"right",d=I("transform"),p=void 0,f=void 0;if(f="bottom"===c?-a.height+l.bottom:l.top,p="right"===h?-a.width+l.right:l.left,s&&d)u[d]="translate3d("+p+"px, "+f+"px, 0)",u[c]=0,u[h]=0,u.willChange="transform";else{var m="bottom"===c?-1:1,g="right"===h?-1:1;u[c]=f*m,u[h]=p*g,u.willChange=c+", "+h}var v={"x-placement":t.placement};return t.attributes=mt({},v,t.attributes),t.styles=mt({},u,t.styles),t.arrowStyles=mt({},t.offsets.arrow,t.arrowStyles),t}function Z(t,e,n){var i=D(t,function(t){return t.name===e}),o=!!i&&t.some(function(t){return t.name===n&&t.enabled&&t.order<i.order});if(!o){var r="`"+e+"`",s="`"+n+"`";console.warn(s+" modifier is required by "+r+" modifier in order to work, be sure to include it before "+r+"!")}return o}function K(t,e){var n;if(!Z(t.instance.modifiers,"arrow","keepTogether"))return t;var i=e.element;if("string"==typeof i){if(!(i=t.instance.popper.querySelector(i)))return t}else if(!t.instance.popper.contains(i))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),t;var o=t.placement.split("-")[0],r=t.offsets,s=r.popper,a=r.reference,u=-1!==["left","right"].indexOf(o),l=u?"height":"width",c=u?"Top":"Left",h=c.toLowerCase(),d=u?"left":"top",p=u?"bottom":"right",f=L(i)[l];a[p]-f<s[h]&&(t.offsets.popper[h]-=s[h]-(a[p]-f)),a[h]+f>s[p]&&(t.offsets.popper[h]+=a[h]+f-s[p]),t.offsets.popper=w(t.offsets.popper);var m=a[h]+a[l]/2-f/2,g=b(t.instance.popper),v=parseFloat(g["margin"+c],10),y=parseFloat(g["border"+c+"Width"],10),_=m-t.offsets.popper[h]-v-y;return _=Math.max(Math.min(s[l]-f,_),0),t.arrowElement=i,t.offsets.arrow=(ft(n={},h,Math.round(_)),ft(n,d,""),n),t}function G(t){return"end"===t?"start":"start"===t?"end":t}function J(t,e){var n=1<arguments.length&&e!==undefined&&e,i=vt.indexOf(t),o=vt.slice(i+1).concat(vt.slice(0,i));return n?o.reverse():o}function $(p,f){if(r(p.instance.modifiers,"inner"))return p;if(p.flipped&&p.placement===p.originalPlacement)return p;var m=C(p.instance.popper,p.instance.reference,f.padding,f.boundariesElement),g=p.placement.split("-")[0],v=k(g),y=p.placement.split("-")[1]||"",_=[];switch(f.behavior){case yt.FLIP:_=[g,v];break;case yt.CLOCKWISE:_=J(g);break;case yt.COUNTERCLOCKWISE:_=J(g,!0);break;default:_=f.behavior}return _.forEach(function(t,e){if(g!==t||_.length===e+1)return p;g=p.placement.split("-")[0],v=k(g);var n=p.offsets.popper,i=p.offsets.reference,o=Math.floor,r="left"===g&&o(n.right)>o(i.left)||"right"===g&&o(n.left)<o(i.right)||"top"===g&&o(n.bottom)>o(i.top)||"bottom"===g&&o(n.top)<o(i.bottom),s=o(n.left)<o(m.left),a=o(n.right)>o(m.right),u=o(n.top)<o(m.top),l=o(n.bottom)>o(m.bottom),c="left"===g&&s||"right"===g&&a||"top"===g&&u||"bottom"===g&&l,h=-1!==["top","bottom"].indexOf(g),d=!!f.flipVariations&&(h&&"start"===y&&s||h&&"end"===y&&a||!h&&"start"===y&&u||!h&&"end"===y&&l);(r||c||d)&&(p.flipped=!0,(r||c)&&(g=_[e+1]),d&&(y=G(y)),p.placement=g+(y?"-"+y:""),p.offsets.popper=mt({},p.offsets.popper,P(p.instance.popper,p.offsets.reference,p.placement)),p=O(p.instance.modifiers,p,"flip"))}),p}function Y(t){var e=t.offsets,n=e.popper,i=e.reference,o=t.placement.split("-")[0],r=Math.floor,s=-1!==["top","bottom"].indexOf(o),a=s?"right":"bottom",u=s?"left":"top",l=s?"width":"height";return n[a]<r(i[u])&&(t.offsets.popper[u]=r(i[u])-n[l]),n[u]>r(i[a])&&(t.offsets.popper[u]=r(i[a])),t}function X(t,e,n,i){var o=t.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),r=+o[1],s=o[2];if(!r)return t;if(0===s.indexOf("%")){var a=void 0;switch(s){case"%p":a=n;break;case"%":case"%r":default:a=i}return w(a)[e]/100*r}if("vh"===s||"vw"===s){return("vh"===s?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*r}return r}function Q(t,o,r,e){var s=[0,0],a=-1!==["right","left"].indexOf(e),n=t.split(/(\+|\-)/).map(function(t){return t.trim()}),i=n.indexOf(D(n,function(t){return-1!==t.search(/,|\s/)}));n[i]&&-1===n[i].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var u=/\s*,\s*|\s+/,l=-1!==i?[n.slice(0,i).concat([n[i].split(u)[0]]),[n[i].split(u)[1]].concat(n.slice(i+1))]:[n];return(l=l.map(function(t,e){var n=(1===e?!a:a)?"height":"width",i=!1;return t.reduce(function(t,e){return""===t[t.length-1]&&-1!==["+","-"].indexOf(e)?(t[t.length-1]=e,i=!0,t):i?(t[t.length-1]+=e,i=!1,t):t.concat(e)},[]).map(function(t){return X(t,n,o,r)})})).forEach(function(n,i){n.forEach(function(t,e){z(t)&&(s[i]+=t*("-"===n[e-1]?-1:1))})}),s}function tt(t,e){var n=e.offset,i=t.placement,o=t.offsets,r=o.popper,s=o.reference,a=i.split("-")[0],u=void 0;return u=z(+n)?[+n,0]:Q(n,r,s,a),"left"===a?(r.top+=u[0],r.left-=u[1]):"right"===a?(r.top+=u[0],r.left+=u[1]):"top"===a?(r.left+=u[0],r.top-=u[1]):"bottom"===a&&(r.left+=u[0],r.top+=u[1]),t.popper=r,t}function et(t,i){var e=i.boundariesElement||y(t.instance.popper);t.instance.reference===e&&(e=y(e));var o=C(t.instance.popper,t.instance.reference,i.padding,e);i.boundaries=o;var n=i.priority,r=t.offsets.popper,s={primary:function(t){var e=r[t];return r[t]<o[t]&&!i.escapeWithReference&&(e=Math.max(r[t],o[t])),ft({},t,e)},secondary:function(t){var e="right"===t?"left":"top",n=r[e];return r[t]>o[t]&&!i.escapeWithReference&&(n=Math.min(r[e],o[t]-("right"===t?r.width:r.height))),ft({},e,n)}};return n.forEach(function(t){var e=-1!==["left","top"].indexOf(t)?"primary":"secondary";r=mt({},r,s[e](t))}),t.offsets.popper=r,t}function nt(t){var e=t.placement,n=e.split("-")[0],i=e.split("-")[1];if(i){var o=t.offsets,r=o.reference,s=o.popper,a=-1!==["bottom","top"].indexOf(n),u=a?"left":"top",l=a?"width":"height",c={start:ft({},u,r[u]),end:ft({},u,r[u]+r[l]-s[l])};t.offsets.popper=mt({},s,c[i])}return t}function it(t){if(!Z(t.instance.modifiers,"hide","preventOverflow"))return t;var e=t.offsets.reference,n=D(t.instance.modifiers,function(t){return"preventOverflow"===t.name}).boundaries;if(e.bottom<n.top||e.left>n.right||e.top>n.bottom||e.right<n.left){if(!0===t.hide)return t;t.hide=!0,t.attributes["x-out-of-boundaries"]=""}else{if(!1===t.hide)return t;t.hide=!1,t.attributes["x-out-of-boundaries"]=!1}return t}function ot(t){var e=t.placement,n=e.split("-")[0],i=t.offsets,o=i.popper,r=i.reference,s=-1!==["left","right"].indexOf(n),a=-1===["top","left"].indexOf(n);return o[s?"left":"top"]=r[n]-(a?o[s?"width":"height"]:0),t.placement=k(e),t.offsets.popper=w(o),t}for(var rt="undefined"!=typeof window&&"undefined"!=typeof document,st=["Edge","Trident","Firefox"],at=0,ut=0;ut<st.length;ut+=1)if(rt&&0<=navigator.userAgent.indexOf(st[ut])){at=1;break}var lt=rt&&window.Promise?t:e,ct=undefined,ht=function(){return ct===undefined&&(ct=-1!==navigator.appVersion.indexOf("MSIE 10")),ct},dt=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},pt=function(){function i(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)}}return function(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t}}(),ft=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},mt=Object.assign||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},gt=["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"],vt=gt.slice(3),yt={FLIP:"flip",CLOCKWISE:"clockwise",COUNTERCLOCKWISE:"counterclockwise"},_t={placement:"bottom",eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:{shift:{order:100,enabled:!0,fn:nt},offset:{order:200,enabled:!0,fn:tt,offset:0},preventOverflow:{order:300,enabled:!0,fn:et,priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:Y},arrow:{order:500,enabled:!0,fn:K,element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:$,behavior:"flip",padding:5,boundariesElement:"viewport"},inner:{order:700,enabled:!1,fn:ot},hide:{order:800,enabled:!0,fn:it},computeStyle:{order:850,enabled:!0,fn:U,gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:q,onLoad:V,gpuAcceleration:undefined}}},bt=function(){function s(t,e,n){var i=this,o=2<arguments.length&&n!==undefined?n:{};dt(this,s),this.scheduleUpdate=function(){return requestAnimationFrame(i.update)},this.update=lt(this.update.bind(this)),this.options=mt({},s.Defaults,o),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=t&&t.jquery?t[0]:t,this.popper=e&&e.jquery?e[0]:e,this.options.modifiers={},Object.keys(mt({},s.Defaults.modifiers,o.modifiers)).forEach(function(t){i.options.modifiers[t]=mt({},s.Defaults.modifiers[t]||{},o.modifiers?o.modifiers[t]:{})}),this.modifiers=Object.keys(this.options.modifiers).map(function(t){return mt({name:t},i.options.modifiers[t])}).sort(function(t,e){return t.order-e.order}),this.modifiers.forEach(function(t){t.enabled&&a(t.onLoad)&&t.onLoad(i.reference,i.popper,i.options,t,i.state)}),this.update();var r=this.options.eventsEnabled;r&&this.enableEventListeners(),this.state.eventsEnabled=r}return pt(s,[{key:"update",value:function(){return n.call(this)}},{key:"destroy",value:function(){return R.call(this)}},{key:"enableEventListeners",value:function(){return B.call(this)}},{key:"disableEventListeners",value:function(){return F.call(this)}}]),s}();return bt.Utils=("undefined"!=typeof window?window:global).PopperUtils,bt.placements=gt,bt.Defaults=_t,bt}),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("jquery"),require("popper.js")):"function"==typeof define&&define.amd?define(["exports","jquery","popper.js"],e):e(t.bootstrap={},t.jQuery,t.Popper)}(this,function(t,e,c){"use strict";function i(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 s(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t}function h(){return(h=Object.assign||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 n(t,e){t.prototype=Object.create(e.prototype),(t.prototype.constructor=t).__proto__=e}e=e&&e.hasOwnProperty("default")?e["default"]:e,c=c&&c.hasOwnProperty("default")?c["default"]:c;var o,r,a,u,l,d,p,f,m,g,v,y,_,b,w,x,A,E,C,T,S,L,k,P,D,O,I,R,N,M,B,j,F,z,H,W,q,V,U,Z,K,G,J,$,Y,X,Q,tt,et,nt,it,ot,rt,st,at,ut,lt,ct,ht,dt,pt,ft,mt,gt,vt,yt,_t,bt,wt,xt,At,Et,Ct,Tt,St,Lt,kt,Pt,Dt,Ot,It,Rt,Nt,Mt,Bt,jt,Ft,zt,Ht,Wt,qt,Vt,Ut,Zt,Kt,Gt,Jt,$t,Yt,Xt,Qt,te,ee,ne,ie,oe,re,se,ae,ue,le,ce,he,de,pe,fe,me,ge,ve,ye,_e,be,we,xe,Ae,Ee,Ce,Te,Se,Le,ke,Pe,De,Oe,Ie,Re,Ne,Me,Be,je,Fe,ze,He,We,qe,Ve,Ue,Ze,Ke,Ge,Je,$e=function(i){function a(t){return{}.toString.call(t).match(/\s([a-zA-Z]+)/)[1].toLowerCase()}function t(){return{bindType:s.end,delegateType:s.end,handle:function(t){return i(t.target).is(this)?t.handleObj.handler.apply(this,arguments):undefined}}}function e(){return("undefined"==typeof window||!window.QUnit)&&{end:"transitionend"}}function n(t){var e=this,n=!1;return i(this).one(l.TRANSITION_END,function(){n=!0}),setTimeout(function(){n||l.triggerTransitionEnd(e)},t),this}function o(){s=e(),i.fn.emulateTransitionEnd=n,l.supportsTransitionEnd()&&(i.event.special[l.TRANSITION_END]=t())}function r(t){return t="function"==typeof i.escapeSelector?i.escapeSelector(t).substr(1):t.replace(/(:|\.|\[|\]|,|=|@)/g,"\\$1")}var s=!1,u=1e6,l={TRANSITION_END:"bsTransitionEnd",getUID:function(t){for(;t+=~~(Math.random()*u),document.getElementById(t););return t},getSelectorFromElement:function(t){var e=t.getAttribute("data-target");e&&"#"!==e||(e=t.getAttribute("href")||""),"#"===e.charAt(0)&&(e=r(e));try{return 0<i(document).find(e).length?e:null}catch(n){return null}},reflow:function(t){return t.offsetHeight},triggerTransitionEnd:function(t){i(t).trigger(s.end)},supportsTransitionEnd:function(){return Boolean(s)},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],r=e[i],s=r&&l.isElement(r)?"element":a(r);if(!new RegExp(o).test(s))throw new Error(t.toUpperCase()+': Option "'+i+'" provided type "'+s+'" but expected type "'+o+'".')}}};return o(),l}(e),Ye=(r="alert",a="4.0.0",l="."+(u="bs.alert"),d=".data-api",p=(o=e).fn[r],f=150,m={DISMISS:'[data-dismiss="alert"]'},g={CLOSE:"close"+l,CLOSED:"closed"+l,CLICK_DATA_API:"click"+l+d},v={ALERT:"alert",FADE:"fade",SHOW:"show"},y=function(){function i(t){this._element=t}var t=i.prototype;return t.close=function(t){t=t||this._element;var e=this._getRootElement(t);this._triggerCloseEvent(e).isDefaultPrevented()||this._removeElement(e)},t.dispose=function(){o.removeData(this._element,u),this._element=null},t._getRootElement=function(t){var e=$e.getSelectorFromElement(t),n=!1;return e&&(n=o(e)[0]),n||(n=o(t).closest("."+v.ALERT)[0]),n},t._triggerCloseEvent=function(t){var e=o.Event(g.CLOSE);return o(t).trigger(e),e},t._removeElement=function(e){var n=this;o(e).removeClass(v.SHOW),$e.supportsTransitionEnd()&&o(e).hasClass(v.FADE)?o(e).one($e.TRANSITION_END,function(t){return n._destroyElement(e,t)}).emulateTransitionEnd(f):this._destroyElement(e)},t._destroyElement=function(t){o(t).detach().trigger(g.CLOSED).remove()},i._jQueryInterface=function(n){return this.each(function(){var t=o(this),e=t.data(u);e||(e=new i(this),t.data(u,e)),"close"===n&&e[n](this)})},i._handleDismiss=function(e){return function(t){t&&t.preventDefault(),e.close(this)}},s(i,null,[{key:"VERSION",get:function(){return a}}]),i}(),o(document).on(g.CLICK_DATA_API,m.DISMISS,y._handleDismiss(new y)),o.fn[r]=y._jQueryInterface,o.fn[r].Constructor=y,o.fn[r].noConflict=function(){return o.fn[r]=p,y._jQueryInterface},y),Xe=(b="button",w="4.0.0",A="."+(x="bs.button"),E=".data-api",C=(_=e).fn[b],T={ACTIVE:"active",BUTTON:"btn",FOCUS:"focus"},S={DATA_TOGGLE_CARROT:'[data-toggle^="button"]',DATA_TOGGLE:'[data-toggle="buttons"]',INPUT:"input",ACTIVE:".active",BUTTON:".btn"},L={CLICK_DATA_API:"click"+A+E,FOCUS_BLUR_DATA_API:"focus"+A+E+" blur"+A+E},k=function(){function n(t){this._element=t}var t=n.prototype;return t.toggle=function(){var t=!0,e=!0,n=_(this._element).closest(S.DATA_TOGGLE)[0];if(n){var i=_(this._element).find(S.INPUT)[0];if(i){if("radio"===i.type)if(i.checked&&_(this._element).hasClass(T.ACTIVE))t=!1;else{var o=_(n).find(S.ACTIVE)[0];o&&_(o).removeClass(T.ACTIVE)}if(t){if(i.hasAttribute("disabled")||n.hasAttribute("disabled")||i.classList.contains("disabled")||n.classList.contains("disabled"))return;i.checked=!_(this._element).hasClass(T.ACTIVE),_(i).trigger("change")}i.focus(),e=!1}}e&&this._element.setAttribute("aria-pressed",!_(this._element).hasClass(T.ACTIVE)),t&&_(this._element).toggleClass(T.ACTIVE)},t.dispose=function(){_.removeData(this._element,x),this._element=null},n._jQueryInterface=function(e){return this.each(function(){var t=_(this).data(x);t||(t=new n(this),_(this).data(x,t)),"toggle"===e&&t[e]()})},s(n,null,[{key:"VERSION",get:function(){return w}}]),n}(),_(document).on(L.CLICK_DATA_API,S.DATA_TOGGLE_CARROT,function(t){t.preventDefault();var e=t.target;_(e).hasClass(T.BUTTON)||(e=_(e).closest(S.BUTTON)),k._jQueryInterface.call(_(e),"toggle")}).on(L.FOCUS_BLUR_DATA_API,S.DATA_TOGGLE_CARROT,function(t){var e=_(t.target).closest(S.BUTTON)[0];_(e).toggleClass(T.FOCUS,/^focus(in)?$/.test(t.type))}),_.fn[b]=k._jQueryInterface,_.fn[b].Constructor=k,_.fn[b].noConflict=function(){return _.fn[b]=C,k._jQueryInterface},k),Qe=(D="carousel",O="4.0.0",R="."+(I="bs.carousel"),N=".data-api",M=(P=e).fn[D],B=600,j=37,F=39,H={interval:5e3,keyboard:!0,slide:!(z=500),pause:"hover",wrap:!0},W={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean"},q={NEXT:"next",PREV:"prev",LEFT:"left",RIGHT:"right"},V={SLIDE:"slide"+R,SLID:"slid"+R,KEYDOWN:"keydown"+R,MOUSEENTER:"mouseenter"+R,MOUSELEAVE:"mouseleave"+R,TOUCHEND:"touchend"+R,LOAD_DATA_API:"load"+R+N,CLICK_DATA_API:"click"+R+N},U={CAROUSEL:"carousel",ACTIVE:"active",SLIDE:"slide",RIGHT:"carousel-item-right",LEFT:"carousel-item-left",NEXT:"carousel-item-next",PREV:"carousel-item-prev",ITEM:"carousel-item"},Z={ACTIVE:".active",ACTIVE_ITEM:".active.carousel-item",ITEM:".carousel-item",NEXT_PREV:".carousel-item-next, .carousel-item-prev",INDICATORS:".carousel-indicators",DATA_SLIDE:"[data-slide], [data-slide-to]",DATA_RIDE:'[data-ride="carousel"]'},K=function(){function r(t,e){this._items=null,this._interval=null,this._activeElement=null,this._isPaused=!1,this._isSliding=!1,this.touchTimeout=null,this._config=this._getConfig(e),this._element=P(t)[0],this._indicatorsElement=P(this._element).find(Z.INDICATORS)[0],this._addEventListeners()}var t=r.prototype;return t.next=function(){this._isSliding||this._slide(q.NEXT)},t.nextWhenVisible=function(){!document.hidden&&P(this._element).is(":visible")&&"hidden"!==P(this._element).css("visibility")&&this.next()},t.prev=function(){this._isSliding||this._slide(q.PREV)},t.pause=function(t){t||(this._isPaused=!0),P(this._element).find(Z.NEXT_PREV)[0]&&$e.supportsTransitionEnd()&&($e.triggerTransitionEnd(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null},t.cycle=function(t){t||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config.interval&&!this._isPaused&&(this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))},t.to=function(t){var e=this;this._activeElement=P(this._element).find(Z.ACTIVE_ITEM)[0];var n=this._getItemIndex(this._activeElement);if(!(t>this._items.length-1||t<0))if(this._isSliding)P(this._element).one(V.SLID,function(){return e.to(t)});else{if(n===t)return this.pause(),void this.cycle();var i=n<t?q.NEXT:q.PREV;this._slide(i,this._items[t])}},t.dispose=function(){P(this._element).off(R),P.removeData(this._element,I),this._items=null,this._config=null,this._element=null,this._interval=null,this._isPaused=null,this._isSliding=null,this._activeElement=null,this._indicatorsElement=null},t._getConfig=function(t){return t=h({},H,t),$e.typeCheckConfig(D,t,W),t},t._addEventListeners=function(){var e=this;this._config.keyboard&&P(this._element).on(V.KEYDOWN,function(t){return e._keydown(t)}),"hover"===this._config.pause&&(P(this._element).on(V.MOUSEENTER,function(t){return e.pause(t)}).on(V.MOUSELEAVE,function(t){return e.cycle(t)}),"ontouchstart"in document.documentElement&&P(this._element).on(V.TOUCHEND,function(){e.pause(),e.touchTimeout&&clearTimeout(e.touchTimeout),e.touchTimeout=setTimeout(function(t){return e.cycle(t)},z+e._config.interval)}))},t._keydown=function(t){if(!/input|textarea/i.test(t.target.tagName))switch(t.which){case j:t.preventDefault(),this.prev();break;case F:t.preventDefault(),this.next()}},t._getItemIndex=function(t){return this._items=P.makeArray(P(t).parent().find(Z.ITEM)),this._items.indexOf(t)},t._getItemByDirection=function(t,e){var n=t===q.NEXT,i=t===q.PREV,o=this._getItemIndex(e),r=this._items.length-1;if((i&&0===o||n&&o===r)&&!this._config.wrap)return e;var s=(o+(t===q.PREV?-1:1))%this._items.length;return-1===s?this._items[this._items.length-1]:this._items[s]},t._triggerSlideEvent=function(t,e){var n=this._getItemIndex(t),i=this._getItemIndex(P(this._element).find(Z.ACTIVE_ITEM)[0]),o=P.Event(V.SLIDE,{relatedTarget:t,direction:e,from:i,to:n});return P(this._element).trigger(o),o},t._setActiveIndicatorElement=function(t){if(this._indicatorsElement){P(this._indicatorsElement).find(Z.ACTIVE).removeClass(U.ACTIVE);var e=this._indicatorsElement.children[this._getItemIndex(t)];e&&P(e).addClass(U.ACTIVE)}},t._slide=function(t,e){var n,i,o,r=this,s=P(this._element).find(Z.ACTIVE_ITEM)[0],a=this._getItemIndex(s),u=e||s&&this._getItemByDirection(t,s),l=this._getItemIndex(u),c=Boolean(this._interval);if(t===q.NEXT?(n=U.LEFT,i=U.NEXT,o=q.LEFT):(n=U.RIGHT,i=U.PREV,o=q.RIGHT),u&&P(u).hasClass(U.ACTIVE))this._isSliding=!1;else if(!this._triggerSlideEvent(u,o).isDefaultPrevented()&&s&&u){this._isSliding=!0,c&&this.pause(),this._setActiveIndicatorElement(u);var h=P.Event(V.SLID,{relatedTarget:u,direction:o,from:a,to:l});$e.supportsTransitionEnd()&&P(this._element).hasClass(U.SLIDE)?(P(u).addClass(i),$e.reflow(u),P(s).addClass(n),P(u).addClass(n),P(s).one($e.TRANSITION_END,function(){P(u).removeClass(n+" "+i).addClass(U.ACTIVE),P(s).removeClass(U.ACTIVE+" "+i+" "+n),r._isSliding=!1,setTimeout(function(){return P(r._element).trigger(h)},0)}).emulateTransitionEnd(B)):(P(s).removeClass(U.ACTIVE),P(u).addClass(U.ACTIVE),this._isSliding=!1,P(this._element).trigger(h)),c&&this.cycle()}},r._jQueryInterface=function(i){return this.each(function(){var t=P(this).data(I),e=h({},H,P(this).data());"object"==typeof i&&(e=h({},e,i));var n="string"==typeof i?i:e.slide;if(t||(t=new r(this,e),P(this).data(I,t)),"number"==typeof i)t.to(i);else if("string"==typeof n){if("undefined"==typeof t[n])throw new TypeError('No method named "'+n+'"');t[n]()}else e.interval&&(t.pause(),t.cycle())})},r._dataApiClickHandler=function(t){var e=$e.getSelectorFromElement(this);if(e){var n=P(e)[0];if(n&&P(n).hasClass(U.CAROUSEL)){var i=h({},P(n).data(),P(this).data()),o=this.getAttribute("data-slide-to");o&&(i.interval=!1),r._jQueryInterface.call(P(n),i),o&&P(n).data(I).to(o),t.preventDefault()}}},s(r,null,[{key:"VERSION",get:function(){return O}},{key:"Default",get:function(){return H}}]),r}(),P(document).on(V.CLICK_DATA_API,Z.DATA_SLIDE,K._dataApiClickHandler),
P(window).on(V.LOAD_DATA_API,function(){P(Z.DATA_RIDE).each(function(){var t=P(this);K._jQueryInterface.call(t,t.data())})}),P.fn[D]=K._jQueryInterface,P.fn[D].Constructor=K,P.fn[D].noConflict=function(){return P.fn[D]=M,K._jQueryInterface},K),tn=(J="collapse",$="4.0.0",X="."+(Y="bs.collapse"),Q=".data-api",tt=(G=e).fn[J],et=600,nt={toggle:!0,parent:""},it={toggle:"boolean",parent:"(string|element)"},ot={SHOW:"show"+X,SHOWN:"shown"+X,HIDE:"hide"+X,HIDDEN:"hidden"+X,CLICK_DATA_API:"click"+X+Q},rt={SHOW:"show",COLLAPSE:"collapse",COLLAPSING:"collapsing",COLLAPSED:"collapsed"},st={WIDTH:"width",HEIGHT:"height"},at={ACTIVES:".show, .collapsing",DATA_TOGGLE:'[data-toggle="collapse"]'},ut=function(){function a(t,e){this._isTransitioning=!1,this._element=t,this._config=this._getConfig(e),this._triggerArray=G.makeArray(G('[data-toggle="collapse"][href="#'+t.id+'"],[data-toggle="collapse"][data-target="#'+t.id+'"]'));for(var n=G(at.DATA_TOGGLE),i=0;i<n.length;i++){var o=n[i],r=$e.getSelectorFromElement(o);null!==r&&0<G(r).filter(t).length&&(this._selector=r,this._triggerArray.push(o))}this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle()}var t=a.prototype;return t.toggle=function(){G(this._element).hasClass(rt.SHOW)?this.hide():this.show()},t.show=function(){var t,e,n=this;if(!this._isTransitioning&&!G(this._element).hasClass(rt.SHOW)&&(this._parent&&0===(t=G.makeArray(G(this._parent).find(at.ACTIVES).filter('[data-parent="'+this._config.parent+'"]'))).length&&(t=null),!(t&&(e=G(t).not(this._selector).data(Y))&&e._isTransitioning))){var i=G.Event(ot.SHOW);if(G(this._element).trigger(i),!i.isDefaultPrevented()){t&&(a._jQueryInterface.call(G(t).not(this._selector),"hide"),e||G(t).data(Y,null));var o=this._getDimension();G(this._element).removeClass(rt.COLLAPSE).addClass(rt.COLLAPSING),(this._element.style[o]=0)<this._triggerArray.length&&G(this._triggerArray).removeClass(rt.COLLAPSED).attr("aria-expanded",!0),this.setTransitioning(!0);var r=function(){G(n._element).removeClass(rt.COLLAPSING).addClass(rt.COLLAPSE).addClass(rt.SHOW),n._element.style[o]="",n.setTransitioning(!1),G(n._element).trigger(ot.SHOWN)};if($e.supportsTransitionEnd()){var s="scroll"+(o[0].toUpperCase()+o.slice(1));G(this._element).one($e.TRANSITION_END,r).emulateTransitionEnd(et),this._element.style[o]=this._element[s]+"px"}else r()}}},t.hide=function(){var t=this;if(!this._isTransitioning&&G(this._element).hasClass(rt.SHOW)){var e=G.Event(ot.HIDE);if(G(this._element).trigger(e),!e.isDefaultPrevented()){var n=this._getDimension();if(this._element.style[n]=this._element.getBoundingClientRect()[n]+"px",$e.reflow(this._element),G(this._element).addClass(rt.COLLAPSING).removeClass(rt.COLLAPSE).removeClass(rt.SHOW),0<this._triggerArray.length)for(var i=0;i<this._triggerArray.length;i++){var o=this._triggerArray[i],r=$e.getSelectorFromElement(o);if(null!==r)G(r).hasClass(rt.SHOW)||G(o).addClass(rt.COLLAPSED).attr("aria-expanded",!1)}this.setTransitioning(!0);var s=function(){t.setTransitioning(!1),G(t._element).removeClass(rt.COLLAPSING).addClass(rt.COLLAPSE).trigger(ot.HIDDEN)};this._element.style[n]="",$e.supportsTransitionEnd()?G(this._element).one($e.TRANSITION_END,s).emulateTransitionEnd(et):s()}}},t.setTransitioning=function(t){this._isTransitioning=t},t.dispose=function(){G.removeData(this._element,Y),this._config=null,this._parent=null,this._element=null,this._triggerArray=null,this._isTransitioning=null},t._getConfig=function(t){return(t=h({},nt,t)).toggle=Boolean(t.toggle),$e.typeCheckConfig(J,t,it),t},t._getDimension=function(){return G(this._element).hasClass(st.WIDTH)?st.WIDTH:st.HEIGHT},t._getParent=function(){var n=this,t=null;$e.isElement(this._config.parent)?(t=this._config.parent,"undefined"!=typeof this._config.parent.jquery&&(t=this._config.parent[0])):t=G(this._config.parent)[0];var e='[data-toggle="collapse"][data-parent="'+this._config.parent+'"]';return G(t).find(e).each(function(t,e){n._addAriaAndCollapsedClass(a._getTargetFromElement(e),[e])}),t},t._addAriaAndCollapsedClass=function(t,e){if(t){var n=G(t).hasClass(rt.SHOW);0<e.length&&G(e).toggleClass(rt.COLLAPSED,!n).attr("aria-expanded",n)}},a._getTargetFromElement=function(t){var e=$e.getSelectorFromElement(t);return e?G(e)[0]:null},a._jQueryInterface=function(i){return this.each(function(){var t=G(this),e=t.data(Y),n=h({},nt,t.data(),"object"==typeof i&&i);if(!e&&n.toggle&&/show|hide/.test(i)&&(n.toggle=!1),e||(e=new a(this,n),t.data(Y,e)),"string"==typeof i){if("undefined"==typeof e[i])throw new TypeError('No method named "'+i+'"');e[i]()}})},s(a,null,[{key:"VERSION",get:function(){return $}},{key:"Default",get:function(){return nt}}]),a}(),G(document).on(ot.CLICK_DATA_API,at.DATA_TOGGLE,function(t){"A"===t.currentTarget.tagName&&t.preventDefault();var n=G(this),e=$e.getSelectorFromElement(this);G(e).each(function(){var t=G(this),e=t.data(Y)?"toggle":n.data();ut._jQueryInterface.call(t,e)})}),G.fn[J]=ut._jQueryInterface,G.fn[J].Constructor=ut,G.fn[J].noConflict=function(){return G.fn[J]=tt,ut._jQueryInterface},ut),en=(ct="dropdown",ht="4.0.0",pt="."+(dt="bs.dropdown"),ft=".data-api",mt=(lt=e).fn[ct],gt=27,vt=32,yt=9,_t=38,bt=40,wt=3,xt=new RegExp(_t+"|"+bt+"|"+gt),At={HIDE:"hide"+pt,HIDDEN:"hidden"+pt,SHOW:"show"+pt,SHOWN:"shown"+pt,CLICK:"click"+pt,CLICK_DATA_API:"click"+pt+ft,KEYDOWN_DATA_API:"keydown"+pt+ft,KEYUP_DATA_API:"keyup"+pt+ft},Et={DISABLED:"disabled",SHOW:"show",DROPUP:"dropup",DROPRIGHT:"dropright",DROPLEFT:"dropleft",MENURIGHT:"dropdown-menu-right",MENULEFT:"dropdown-menu-left",POSITION_STATIC:"position-static"},Ct={DATA_TOGGLE:'[data-toggle="dropdown"]',FORM_CHILD:".dropdown form",MENU:".dropdown-menu",NAVBAR_NAV:".navbar-nav",VISIBLE_ITEMS:".dropdown-menu .dropdown-item:not(.disabled)"},Tt={TOP:"top-start",TOPEND:"top-end",BOTTOM:"bottom-start",BOTTOMEND:"bottom-end",RIGHT:"right-start",RIGHTEND:"right-end",LEFT:"left-start",LEFTEND:"left-end"},St={offset:0,flip:!0,boundary:"scrollParent"},Lt={offset:"(number|string|function)",flip:"boolean",boundary:"(string|element)"},kt=function(){function u(t,e){this._element=t,this._popper=null,this._config=this._getConfig(e),this._menu=this._getMenuElement(),this._inNavbar=this._detectNavbar(),this._addEventListeners()}var t=u.prototype;return t.toggle=function(){if(!this._element.disabled&&!lt(this._element).hasClass(Et.DISABLED)){var t=u._getParentFromElement(this._element),e=lt(this._menu).hasClass(Et.SHOW);if(u._clearMenus(),!e){var n={relatedTarget:this._element},i=lt.Event(At.SHOW,n);if(lt(t).trigger(i),!i.isDefaultPrevented()){if(!this._inNavbar){if(void 0===c)throw new TypeError("Bootstrap dropdown require Popper.js (https://popper.js.org)");var o=this._element;lt(t).hasClass(Et.DROPUP)&&(lt(this._menu).hasClass(Et.MENULEFT)||lt(this._menu).hasClass(Et.MENURIGHT))&&(o=t),"scrollParent"!==this._config.boundary&&lt(t).addClass(Et.POSITION_STATIC),this._popper=new c(o,this._menu,this._getPopperConfig())}"ontouchstart"in document.documentElement&&0===lt(t).closest(Ct.NAVBAR_NAV).length&&lt("body").children().on("mouseover",null,lt.noop),this._element.focus(),this._element.setAttribute("aria-expanded",!0),lt(this._menu).toggleClass(Et.SHOW),lt(t).toggleClass(Et.SHOW).trigger(lt.Event(At.SHOWN,n))}}}},t.dispose=function(){lt.removeData(this._element,dt),lt(this._element).off(pt),this._element=null,(this._menu=null)!==this._popper&&(this._popper.destroy(),this._popper=null)},t.update=function(){this._inNavbar=this._detectNavbar(),null!==this._popper&&this._popper.scheduleUpdate()},t._addEventListeners=function(){var e=this;lt(this._element).on(At.CLICK,function(t){t.preventDefault(),t.stopPropagation(),e.toggle()})},t._getConfig=function(t){return t=h({},this.constructor.Default,lt(this._element).data(),t),$e.typeCheckConfig(ct,t,this.constructor.DefaultType),t},t._getMenuElement=function(){if(!this._menu){var t=u._getParentFromElement(this._element);this._menu=lt(t).find(Ct.MENU)[0]}return this._menu},t._getPlacement=function(){var t=lt(this._element).parent(),e=Tt.BOTTOM;return t.hasClass(Et.DROPUP)?(e=Tt.TOP,lt(this._menu).hasClass(Et.MENURIGHT)&&(e=Tt.TOPEND)):t.hasClass(Et.DROPRIGHT)?e=Tt.RIGHT:t.hasClass(Et.DROPLEFT)?e=Tt.LEFT:lt(this._menu).hasClass(Et.MENURIGHT)&&(e=Tt.BOTTOMEND),e},t._detectNavbar=function(){return 0<lt(this._element).closest(".navbar").length},t._getPopperConfig=function(){var e=this,t={};return"function"==typeof this._config.offset?t.fn=function(t){return t.offsets=h({},t.offsets,e._config.offset(t.offsets)||{}),t}:t.offset=this._config.offset,{placement:this._getPlacement(),modifiers:{offset:t,flip:{enabled:this._config.flip},preventOverflow:{boundariesElement:this._config.boundary}}}},u._jQueryInterface=function(e){return this.each(function(){var t=lt(this).data(dt);if(t||(t=new u(this,"object"==typeof e?e:null),lt(this).data(dt,t)),"string"==typeof e){if("undefined"==typeof t[e])throw new TypeError('No method named "'+e+'"');t[e]()}})},u._clearMenus=function(t){if(!t||t.which!==wt&&("keyup"!==t.type||t.which===yt))for(var e=lt.makeArray(lt(Ct.DATA_TOGGLE)),n=0;n<e.length;n++){var i=u._getParentFromElement(e[n]),o=lt(e[n]).data(dt),r={relatedTarget:e[n]};if(o){var s=o._menu;if(lt(i).hasClass(Et.SHOW)&&!(t&&("click"===t.type&&/input|textarea/i.test(t.target.tagName)||"keyup"===t.type&&t.which===yt)&&lt.contains(i,t.target))){var a=lt.Event(At.HIDE,r);lt(i).trigger(a),a.isDefaultPrevented()||("ontouchstart"in document.documentElement&&lt("body").children().off("mouseover",null,lt.noop),e[n].setAttribute("aria-expanded","false"),lt(s).removeClass(Et.SHOW),lt(i).removeClass(Et.SHOW).trigger(lt.Event(At.HIDDEN,r)))}}}},u._getParentFromElement=function(t){var e,n=$e.getSelectorFromElement(t);return n&&(e=lt(n)[0]),e||t.parentNode},u._dataApiKeydownHandler=function(t){if((/input|textarea/i.test(t.target.tagName)?!(t.which===vt||t.which!==gt&&(t.which!==bt&&t.which!==_t||lt(t.target).closest(Ct.MENU).length)):xt.test(t.which))&&(t.preventDefault(),t.stopPropagation(),!this.disabled&&!lt(this).hasClass(Et.DISABLED))){var e=u._getParentFromElement(this),n=lt(e).hasClass(Et.SHOW);if((n||t.which===gt&&t.which===vt)&&(!n||t.which!==gt&&t.which!==vt)){var i=lt(e).find(Ct.VISIBLE_ITEMS).get();if(0!==i.length){var o=i.indexOf(t.target);t.which===_t&&0<o&&o--,t.which===bt&&o<i.length-1&&o++,o<0&&(o=0),i[o].focus()}}else{if(t.which===gt){var r=lt(e).find(Ct.DATA_TOGGLE)[0];lt(r).trigger("focus")}lt(this).trigger("click")}}},s(u,null,[{key:"VERSION",get:function(){return ht}},{key:"Default",get:function(){return St}},{key:"DefaultType",get:function(){return Lt}}]),u}(),lt(document).on(At.KEYDOWN_DATA_API,Ct.DATA_TOGGLE,kt._dataApiKeydownHandler).on(At.KEYDOWN_DATA_API,Ct.MENU,kt._dataApiKeydownHandler).on(At.CLICK_DATA_API+" "+At.KEYUP_DATA_API,kt._clearMenus).on(At.CLICK_DATA_API,Ct.DATA_TOGGLE,function(t){t.preventDefault(),t.stopPropagation(),kt._jQueryInterface.call(lt(this),"toggle")}).on(At.CLICK_DATA_API,Ct.FORM_CHILD,function(t){t.stopPropagation()}),lt.fn[ct]=kt._jQueryInterface,lt.fn[ct].Constructor=kt,lt.fn[ct].noConflict=function(){return lt.fn[ct]=mt,kt._jQueryInterface},kt),nn=(Dt="modal",Ot="4.0.0",Rt="."+(It="bs.modal"),Nt=".data-api",Mt=(Pt=e).fn[Dt],Bt=300,jt=150,Ft=27,zt={backdrop:!0,keyboard:!0,focus:!0,show:!0},Ht={backdrop:"(boolean|string)",keyboard:"boolean",focus:"boolean",show:"boolean"},Wt={HIDE:"hide"+Rt,HIDDEN:"hidden"+Rt,SHOW:"show"+Rt,SHOWN:"shown"+Rt,FOCUSIN:"focusin"+Rt,RESIZE:"resize"+Rt,CLICK_DISMISS:"click.dismiss"+Rt,KEYDOWN_DISMISS:"keydown.dismiss"+Rt,MOUSEUP_DISMISS:"mouseup.dismiss"+Rt,MOUSEDOWN_DISMISS:"mousedown.dismiss"+Rt,CLICK_DATA_API:"click"+Rt+Nt},qt={SCROLLBAR_MEASURER:"modal-scrollbar-measure",BACKDROP:"modal-backdrop",OPEN:"modal-open",FADE:"fade",SHOW:"show"},Vt={DIALOG:".modal-dialog",DATA_TOGGLE:'[data-toggle="modal"]',DATA_DISMISS:'[data-dismiss="modal"]',FIXED_CONTENT:".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",STICKY_CONTENT:".sticky-top",NAVBAR_TOGGLER:".navbar-toggler"},Ut=function(){function o(t,e){this._config=this._getConfig(e),this._element=t,this._dialog=Pt(t).find(Vt.DIALOG)[0],this._backdrop=null,this._isShown=!1,this._isBodyOverflowing=!1,this._ignoreBackdropClick=!1,this._originalBodyPadding=0,this._scrollbarWidth=0}var t=o.prototype;return t.toggle=function(t){return this._isShown?this.hide():this.show(t)},t.show=function(t){var e=this;if(!this._isTransitioning&&!this._isShown){$e.supportsTransitionEnd()&&Pt(this._element).hasClass(qt.FADE)&&(this._isTransitioning=!0);var n=Pt.Event(Wt.SHOW,{relatedTarget:t});Pt(this._element).trigger(n),this._isShown||n.isDefaultPrevented()||(this._isShown=!0,this._checkScrollbar(),this._setScrollbar(),this._adjustDialog(),Pt(document.body).addClass(qt.OPEN),this._setEscapeEvent(),this._setResizeEvent(),Pt(this._element).on(Wt.CLICK_DISMISS,Vt.DATA_DISMISS,function(t){return e.hide(t)}),Pt(this._dialog).on(Wt.MOUSEDOWN_DISMISS,function(){Pt(e._element).one(Wt.MOUSEUP_DISMISS,function(t){Pt(t.target).is(e._element)&&(e._ignoreBackdropClick=!0)})}),this._showBackdrop(function(){return e._showElement(t)}))}},t.hide=function(t){var e=this;if(t&&t.preventDefault(),!this._isTransitioning&&this._isShown){var n=Pt.Event(Wt.HIDE);if(Pt(this._element).trigger(n),this._isShown&&!n.isDefaultPrevented()){this._isShown=!1;var i=$e.supportsTransitionEnd()&&Pt(this._element).hasClass(qt.FADE);i&&(this._isTransitioning=!0),this._setEscapeEvent(),this._setResizeEvent(),Pt(document).off(Wt.FOCUSIN),Pt(this._element).removeClass(qt.SHOW),Pt(this._element).off(Wt.CLICK_DISMISS),Pt(this._dialog).off(Wt.MOUSEDOWN_DISMISS),i?Pt(this._element).one($e.TRANSITION_END,function(t){return e._hideModal(t)}).emulateTransitionEnd(Bt):this._hideModal()}}},t.dispose=function(){Pt.removeData(this._element,It),Pt(window,document,this._element,this._backdrop).off(Rt),this._config=null,this._element=null,this._dialog=null,this._backdrop=null,this._isShown=null,this._isBodyOverflowing=null,this._ignoreBackdropClick=null,this._scrollbarWidth=null},t.handleUpdate=function(){this._adjustDialog()},t._getConfig=function(t){return t=h({},zt,t),$e.typeCheckConfig(Dt,t,Ht),t},t._showElement=function(t){var e=this,n=$e.supportsTransitionEnd()&&Pt(this._element).hasClass(qt.FADE);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.scrollTop=0,n&&$e.reflow(this._element),Pt(this._element).addClass(qt.SHOW),this._config.focus&&this._enforceFocus();var i=Pt.Event(Wt.SHOWN,{relatedTarget:t}),o=function(){e._config.focus&&e._element.focus(),e._isTransitioning=!1,Pt(e._element).trigger(i)};n?Pt(this._dialog).one($e.TRANSITION_END,o).emulateTransitionEnd(Bt):o()},t._enforceFocus=function(){var e=this;Pt(document).off(Wt.FOCUSIN).on(Wt.FOCUSIN,function(t){document!==t.target&&e._element!==t.target&&0===Pt(e._element).has(t.target).length&&e._element.focus()})},t._setEscapeEvent=function(){var e=this;this._isShown&&this._config.keyboard?Pt(this._element).on(Wt.KEYDOWN_DISMISS,function(t){t.which===Ft&&(t.preventDefault(),e.hide())}):this._isShown||Pt(this._element).off(Wt.KEYDOWN_DISMISS)},t._setResizeEvent=function(){var e=this;this._isShown?Pt(window).on(Wt.RESIZE,function(t){return e.handleUpdate(t)}):Pt(window).off(Wt.RESIZE)},t._hideModal=function(){var t=this;this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._isTransitioning=!1,this._showBackdrop(function(){Pt(document.body).removeClass(qt.OPEN),t._resetAdjustments(),t._resetScrollbar(),Pt(t._element).trigger(Wt.HIDDEN)})},t._removeBackdrop=function(){this._backdrop&&(Pt(this._backdrop).remove(),this._backdrop=null)},t._showBackdrop=function(t){var e=this,n=Pt(this._element).hasClass(qt.FADE)?qt.FADE:"";if(this._isShown&&this._config.backdrop){var i=$e.supportsTransitionEnd()&&n;if(this._backdrop=document.createElement("div"),this._backdrop.className=qt.BACKDROP,n&&Pt(this._backdrop).addClass(n),Pt(this._backdrop).appendTo(document.body),Pt(this._element).on(Wt.CLICK_DISMISS,function(t){e._ignoreBackdropClick?e._ignoreBackdropClick=!1:t.target===t.currentTarget&&("static"===e._config.backdrop?e._element.focus():e.hide())}),i&&$e.reflow(this._backdrop),Pt(this._backdrop).addClass(qt.SHOW),!t)return;if(!i)return void t();Pt(this._backdrop).one($e.TRANSITION_END,t).emulateTransitionEnd(jt)}else if(!this._isShown&&this._backdrop){Pt(this._backdrop).removeClass(qt.SHOW);var o=function(){e._removeBackdrop(),t&&t()};$e.supportsTransitionEnd()&&Pt(this._element).hasClass(qt.FADE)?Pt(this._backdrop).one($e.TRANSITION_END,o).emulateTransitionEnd(jt):o()}else t&&t()},t._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")},t._resetAdjustments=function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},t._checkScrollbar=function(){var t=document.body.getBoundingClientRect();this._isBodyOverflowing=t.left+t.right<window.innerWidth,this._scrollbarWidth=this._getScrollbarWidth()},t._setScrollbar=function(){var o=this;if(this._isBodyOverflowing){Pt(Vt.FIXED_CONTENT).each(function(t,e){var n=Pt(e)[0].style.paddingRight,i=Pt(e).css("padding-right");Pt(e).data("padding-right",n).css("padding-right",parseFloat(i)+o._scrollbarWidth+"px")}),Pt(Vt.STICKY_CONTENT).each(function(t,e){var n=Pt(e)[0].style.marginRight,i=Pt(e).css("margin-right");Pt(e).data("margin-right",n).css("margin-right",parseFloat(i)-o._scrollbarWidth+"px")}),Pt(Vt.NAVBAR_TOGGLER).each(function(t,e){var n=Pt(e)[0].style.marginRight,i=Pt(e).css("margin-right");Pt(e).data("margin-right",n).css("margin-right",parseFloat(i)+o._scrollbarWidth+"px")});var t=document.body.style.paddingRight,e=Pt("body").css("padding-right");Pt("body").data("padding-right",t).css("padding-right",parseFloat(e)+this._scrollbarWidth+"px")}},t._resetScrollbar=function(){Pt(Vt.FIXED_CONTENT).each(function(t,e){var n=Pt(e).data("padding-right");void 0!==n&&Pt(e).css("padding-right",n).removeData("padding-right")}),Pt(Vt.STICKY_CONTENT+", "+Vt.NAVBAR_TOGGLER).each(function(t,e){var n=Pt(e).data("margin-right");void 0!==n&&Pt(e).css("margin-right",n).removeData("margin-right")});var t=Pt("body").data("padding-right");void 0!==t&&Pt("body").css("padding-right",t).removeData("padding-right")},t._getScrollbarWidth=function(){var t=document.createElement("div");t.className=qt.SCROLLBAR_MEASURER,document.body.appendChild(t);var e=t.getBoundingClientRect().width-t.clientWidth;return document.body.removeChild(t),e},o._jQueryInterface=function(n,i){return this.each(function(){var t=Pt(this).data(It),e=h({},o.Default,Pt(this).data(),"object"==typeof n&&n);if(t||(t=new o(this,e),Pt(this).data(It,t)),"string"==typeof n){if("undefined"==typeof t[n])throw new TypeError('No method named "'+n+'"');t[n](i)}else e.show&&t.show(i)})},s(o,null,[{key:"VERSION",get:function(){return Ot}},{key:"Default",get:function(){return zt}}]),o}(),Pt(document).on(Wt.CLICK_DATA_API,Vt.DATA_TOGGLE,function(t){var e,n=this,i=$e.getSelectorFromElement(this);i&&(e=Pt(i)[0]);var o=Pt(e).data(It)?"toggle":h({},Pt(e).data(),Pt(this).data());"A"!==this.tagName&&"AREA"!==this.tagName||t.preventDefault();var r=Pt(e).one(Wt.SHOW,function(t){t.isDefaultPrevented()||r.one(Wt.HIDDEN,function(){Pt(n).is(":visible")&&n.focus()})});Ut._jQueryInterface.call(Pt(e),o,this)}),Pt.fn[Dt]=Ut._jQueryInterface,Pt.fn[Dt].Constructor=Ut,Pt.fn[Dt].noConflict=function(){return Pt.fn[Dt]=Mt,Ut._jQueryInterface},Ut),on=(Kt="tooltip",Gt="4.0.0",$t="."+(Jt="bs.tooltip"),Yt=(Zt=e).fn[Kt],Xt=150,Qt="bs-tooltip",te=new RegExp("(^|\\s)"+Qt+"\\S+","g"),ie={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:!(ne={AUTO:"auto",TOP:"top",RIGHT:"right",BOTTOM:"bottom",LEFT:"left"}),selector:!(ee={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"(number|string)",container:"(string|element|boolean)",fallbackPlacement:"(string|array)",boundary:"(string|element)"}),placement:"top",offset:0,container:!1,fallbackPlacement:"flip",boundary:"scrollParent"},oe={SHOW:"show",OUT:"out"},re={HIDE:"hide"+$t,HIDDEN:"hidden"+$t,SHOW:"show"+$t,SHOWN:"shown"+$t,INSERTED:"inserted"+$t,CLICK:"click"+$t,FOCUSIN:"focusin"+$t,FOCUSOUT:"focusout"+$t,MOUSEENTER:"mouseenter"+$t,MOUSELEAVE:"mouseleave"+$t},se={FADE:"fade",SHOW:"show"},ae={TOOLTIP:".tooltip",TOOLTIP_INNER:".tooltip-inner",ARROW:".arrow"},ue={HOVER:"hover",FOCUS:"focus",CLICK:"click",MANUAL:"manual"},le=function(){function l(t,e){if(void 0===c)throw new TypeError("Bootstrap tooltips require Popper.js (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 t=l.prototype;return t.enable=function(){this._isEnabled=!0},t.disable=function(){this._isEnabled=!1},t.toggleEnabled=function(){this._isEnabled=!this._isEnabled},t.toggle=function(t){if(this._isEnabled)if(t){var e=this.constructor.DATA_KEY,n=Zt(t.currentTarget).data(e);n||(n=new this.constructor(t.currentTarget,this._getDelegateConfig()),Zt(t.currentTarget).data(e,n)),n._activeTrigger.click=!n._activeTrigger.click,n._isWithActiveTrigger()?n._enter(null,n):n._leave(null,n)}else{if(Zt(this.getTipElement()).hasClass(se.SHOW))return void this._leave(null,this);this._enter(null,this)}},t.dispose=function(){clearTimeout(this._timeout),Zt.removeData(this.element,this.constructor.DATA_KEY),Zt(this.element).off(this.constructor.EVENT_KEY),Zt(this.element).closest(".modal").off("hide.bs.modal"),this.tip&&Zt(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},t.show=function(){var e=this;if("none"===Zt(this.element).css("display"))throw new Error("Please use show on visible elements");var t=Zt.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){Zt(this.element).trigger(t);var n=Zt.contains(this.element.ownerDocument.documentElement,this.element);if(t.isDefaultPrevented()||!n)return;var i=this.getTipElement(),o=$e.getUID(this.constructor.NAME);i.setAttribute("id",o),this.element.setAttribute("aria-describedby",o),this.setContent(),this.config.animation&&Zt(i).addClass(se.FADE);var r="function"==typeof this.config.placement?this.config.placement.call(this,i,this.element):this.config.placement,s=this._getAttachment(r);this.addAttachmentClass(s);var a=!1===this.config.container?document.body:Zt(this.config.container);Zt(i).data(this.constructor.DATA_KEY,this),Zt.contains(this.element.ownerDocument.documentElement,this.tip)||Zt(i).appendTo(a),Zt(this.element).trigger(this.constructor.Event.INSERTED),this._popper=new c(this.element,i,{placement:s,modifiers:{offset:{offset:this.config.offset},flip:{behavior:this.config.fallbackPlacement},arrow:{element:ae.ARROW},preventOverflow:{boundariesElement:this.config.boundary}},onCreate:function(t){t.originalPlacement!==t.placement&&e._handlePopperPlacementChange(t)},onUpdate:function(t){e._handlePopperPlacementChange(t)}}),Zt(i).addClass(se.SHOW),"ontouchstart"in document.documentElement&&Zt("body").children().on("mouseover",null,Zt.noop);var u=function(){e.config.animation&&e._fixTransition();var t=e._hoverState;e._hoverState=null,Zt(e.element).trigger(e.constructor.Event.SHOWN),t===oe.OUT&&e._leave(null,e)};$e.supportsTransitionEnd()&&Zt(this.tip).hasClass(se.FADE)?Zt(this.tip).one($e.TRANSITION_END,u).emulateTransitionEnd(l._TRANSITION_DURATION):u()}},t.hide=function(t){var e=this,n=this.getTipElement(),i=Zt.Event(this.constructor.Event.HIDE),o=function(){e._hoverState!==oe.SHOW&&n.parentNode&&n.parentNode.removeChild(n),e._cleanTipClass(),e.element.removeAttribute("aria-describedby"),Zt(e.element).trigger(e.constructor.Event.HIDDEN),null!==e._popper&&e._popper.destroy(),t&&t()};Zt(this.element).trigger(i),i.isDefaultPrevented()||(Zt(n).removeClass(se.SHOW),"ontouchstart"in document.documentElement&&Zt("body").children().off("mouseover",null,Zt.noop),this._activeTrigger[ue.CLICK]=!1,this._activeTrigger[ue.FOCUS]=!1,this._activeTrigger[ue.HOVER]=!1,$e.supportsTransitionEnd()&&Zt(this.tip).hasClass(se.FADE)?Zt(n).one($e.TRANSITION_END,o).emulateTransitionEnd(Xt):o(),this._hoverState="")},t.update=function(){null!==this._popper&&this._popper.scheduleUpdate()},t.isWithContent=function(){return Boolean(this.getTitle())},t.addAttachmentClass=function(t){Zt(this.getTipElement()).addClass(Qt+"-"+t)},t.getTipElement=function(){return this.tip=this.tip||Zt(this.config.template)[0],this.tip},t.setContent=function(){var t=Zt(this.getTipElement());this.setElementContent(t.find(ae.TOOLTIP_INNER),this.getTitle()),t.removeClass(se.FADE+" "+se.SHOW)},t.setElementContent=function(t,e){var n=this.config.html;"object"==typeof e&&(e.nodeType||e.jquery)?n?Zt(e).parent().is(t)||t.empty().append(e):t.text(Zt(e).text()):t[n?"html":"text"](e)},t.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},t._getAttachment=function(t){return ne[t.toUpperCase()]},t._setListeners=function(){var i=this;this.config.trigger.split(" ").forEach(function(t){if("click"===t)Zt(i.element).on(i.constructor.Event.CLICK,i.config.selector,function(t){return i.toggle(t)});else if(t!==ue.MANUAL){var e=t===ue.HOVER?i.constructor.Event.MOUSEENTER:i.constructor.Event.FOCUSIN,n=t===ue.HOVER?i.constructor.Event.MOUSELEAVE:i.constructor.Event.FOCUSOUT;Zt(i.element).on(e,i.config.selector,function(t){return i._enter(t)}).on(n,i.config.selector,function(t){return i._leave(t)})}Zt(i.element).closest(".modal").on("hide.bs.modal",function(){return i.hide()})}),this.config.selector?this.config=h({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},t._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",""))},t._enter=function(t,e){var n=this.constructor.DATA_KEY;(e=e||Zt(t.currentTarget).data(n))||(e=new this.constructor(t.currentTarget,this._getDelegateConfig()),Zt(t.currentTarget).data(n,e)),t&&(e._activeTrigger["focusin"===t.type?ue.FOCUS:ue.HOVER]=!0),Zt(e.getTipElement()).hasClass(se.SHOW)||e._hoverState===oe.SHOW?e._hoverState=oe.SHOW:(clearTimeout(e._timeout),e._hoverState=oe.SHOW,e.config.delay&&e.config.delay.show?e._timeout=setTimeout(function(){e._hoverState===oe.SHOW&&e.show()},e.config.delay.show):e.show())},t._leave=function(t,e){var n=this.constructor.DATA_KEY;(e=e||Zt(t.currentTarget).data(n))||(e=new this.constructor(t.currentTarget,this._getDelegateConfig()),Zt(t.currentTarget).data(n,e)),t&&(e._activeTrigger["focusout"===t.type?ue.FOCUS:ue.HOVER]=!1),e._isWithActiveTrigger()||(clearTimeout(e._timeout),e._hoverState=oe.OUT,e.config.delay&&e.config.delay.hide?e._timeout=setTimeout(function(){e._hoverState===oe.OUT&&e.hide()},e.config.delay.hide):e.hide())},t._isWithActiveTrigger=function(){for(var t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1},t._getConfig=function(t){return"number"==typeof(t=h({},this.constructor.Default,Zt(this.element).data(),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()),$e.typeCheckConfig(Kt,t,this.constructor.DefaultType),t},t._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},t._cleanTipClass=function(){var t=Zt(this.getTipElement()),e=t.attr("class").match(te);null!==e&&0<e.length&&t.removeClass(e.join(""))},t._handlePopperPlacementChange=function(t){this._cleanTipClass(),this.addAttachmentClass(this._getAttachment(t.placement))},t._fixTransition=function(){var t=this.getTipElement(),e=this.config.animation;null===t.getAttribute("x-placement")&&(Zt(t).removeClass(se.FADE),this.config.animation=!1,this.hide(),this.show(),this.config.animation=e)},l._jQueryInterface=function(n){return this.each(function(){var t=Zt(this).data(Jt),e="object"==typeof n&&n;if((t||!/dispose|hide/.test(n))&&(t||(t=new l(this,e),Zt(this).data(Jt,t)),"string"==typeof n)){if("undefined"==typeof t[n])throw new TypeError('No method named "'+n+'"');t[n]()}})},s(l,null,[{key:"VERSION",get:function(){return Gt}},{key:"Default",get:function(){return ie}},{key:"NAME",get:function(){return Kt}},{key:"DATA_KEY",get:function(){return Jt}},{key:"Event",get:function(){return re}},{key:"EVENT_KEY",get:function(){return $t}},{key:"DefaultType",get:function(){return ee}}]),l}(),Zt.fn[Kt]=le._jQueryInterface,Zt.fn[Kt].Constructor=le,Zt.fn[Kt].noConflict=function(){return Zt.fn[Kt]=Yt,le._jQueryInterface},le),rn=(he="popover",de="4.0.0",fe="."+(pe="bs.popover"),me=(ce=e).fn[he],ge="bs-popover",ve=new RegExp("(^|\\s)"+ge+"\\S+","g"),ye=h({},on.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>'}),_e=h({},on.DefaultType,{content:"(string|element|function)"}),be={FADE:"fade",SHOW:"show"},we={TITLE:".popover-header",CONTENT:".popover-body"},xe={HIDE:"hide"+fe,HIDDEN:"hidden"+fe,SHOW:"show"+fe,SHOWN:"shown"+fe,INSERTED:"inserted"+fe,CLICK:"click"+fe,FOCUSIN:"focusin"+fe,FOCUSOUT:"focusout"+fe,MOUSEENTER:"mouseenter"+fe,MOUSELEAVE:"mouseleave"+fe},Ae=function(t){function i(){return t.apply(this,arguments)||this}n(i,t);var e=i.prototype;return e.isWithContent=function(){return this.getTitle()||this._getContent()},e.addAttachmentClass=function(t){ce(this.getTipElement()).addClass(ge+"-"+t)},e.getTipElement=function(){return this.tip=this.tip||ce(this.config.template)[0],this.tip},e.setContent=function(){var t=ce(this.getTipElement());this.setElementContent(t.find(we.TITLE),this.getTitle());var e=this._getContent();"function"==typeof e&&(e=e.call(this.element)),this.setElementContent(t.find(we.CONTENT),e),t.removeClass(be.FADE+" "+be.SHOW)},e._getContent=function(){return this.element.getAttribute("data-content")||this.config.content},e._cleanTipClass=function(){var t=ce(this.getTipElement()),e=t.attr("class").match(ve);null!==e&&0<e.length&&t.removeClass(e.join(""))},i._jQueryInterface=function(n){return this.each(function(){var t=ce(this).data(pe),e="object"==typeof n?n:null;if((t||!/destroy|hide/.test(n))&&(t||(t=new i(this,e),ce(this).data(pe,t)),"string"==typeof n)){if("undefined"==typeof t[n])throw new TypeError('No method named "'+n+'"');t[n]()}})},s(i,null,[{key:"VERSION",get:function(){return de}},{key:"Default",get:function(){return ye}},{key:"NAME",get:function(){return he}},{key:"DATA_KEY",get:function(){return pe}},{key:"Event",get:function(){return xe}},{key:"EVENT_KEY",get:function(){return fe}},{key:"DefaultType",get:function(){return _e}}]),i}(on),ce.fn[he]=Ae._jQueryInterface,ce.fn[he].Constructor=Ae,ce.fn[he].noConflict=function(){return ce.fn[he]=me,Ae._jQueryInterface},Ae),sn=(Ce="scrollspy",Te="4.0.0",Le="."+(Se="bs.scrollspy"),ke=".data-api",Pe=(Ee=e).fn[Ce],De={offset:10,method:"auto",target:""},Oe={offset:"number",method:"string",target:"(string|element)"},Ie={ACTIVATE:"activate"+Le,SCROLL:"scroll"+Le,LOAD_DATA_API:"load"+Le+ke},Re={DROPDOWN_ITEM:"dropdown-item",DROPDOWN_MENU:"dropdown-menu",ACTIVE:"active"},Ne={DATA_SPY:'[data-spy="scroll"]',ACTIVE:".active",NAV_LIST_GROUP:".nav, .list-group",NAV_LINKS:".nav-link",NAV_ITEMS:".nav-item",LIST_ITEMS:".list-group-item",DROPDOWN:".dropdown",DROPDOWN_ITEMS:".dropdown-item",DROPDOWN_TOGGLE:".dropdown-toggle"},Me={OFFSET:"offset",POSITION:"position"},Be=function(){function n(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+" "+Ne.NAV_LINKS+","+this._config.target+" "+Ne.LIST_ITEMS+","+this._config.target+" "+Ne.DROPDOWN_ITEMS,this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,
Ee(this._scrollElement).on(Ie.SCROLL,function(t){return n._process(t)}),this.refresh(),this._process()}var t=n.prototype;return t.refresh=function(){var e=this,t=this._scrollElement===this._scrollElement.window?Me.OFFSET:Me.POSITION,o="auto"===this._config.method?t:this._config.method,r=o===Me.POSITION?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),Ee.makeArray(Ee(this._selector)).map(function(t){var e,n=$e.getSelectorFromElement(t);if(n&&(e=Ee(n)[0]),e){var i=e.getBoundingClientRect();if(i.width||i.height)return[Ee(e)[o]().top+r,n]}return null}).filter(function(t){return t}).sort(function(t,e){return t[0]-e[0]}).forEach(function(t){e._offsets.push(t[0]),e._targets.push(t[1])})},t.dispose=function(){Ee.removeData(this._element,Se),Ee(this._scrollElement).off(Le),this._element=null,this._scrollElement=null,this._config=null,this._selector=null,this._offsets=null,this._targets=null,this._activeTarget=null,this._scrollHeight=null},t._getConfig=function(t){if("string"!=typeof(t=h({},De,t)).target){var e=Ee(t.target).attr("id");e||(e=$e.getUID(Ce),Ee(t.target).attr("id",e)),t.target="#"+e}return $e.typeCheckConfig(Ce,t,Oe),t},t._getScrollTop=function(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop},t._getScrollHeight=function(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)},t._getOffsetHeight=function(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height},t._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(),n<=t){var i=this._targets[this._targets.length-1];this._activeTarget!==i&&this._activate(i)}else{if(this._activeTarget&&t<this._offsets[0]&&0<this._offsets[0])return this._activeTarget=null,void this._clear();for(var o=this._offsets.length;o--;){this._activeTarget!==this._targets[o]&&t>=this._offsets[o]&&("undefined"==typeof this._offsets[o+1]||t<this._offsets[o+1])&&this._activate(this._targets[o])}}},t._activate=function(e){this._activeTarget=e,this._clear();var t=this._selector.split(",");t=t.map(function(t){return t+'[data-target="'+e+'"],'+t+'[href="'+e+'"]'});var n=Ee(t.join(","));n.hasClass(Re.DROPDOWN_ITEM)?(n.closest(Ne.DROPDOWN).find(Ne.DROPDOWN_TOGGLE).addClass(Re.ACTIVE),n.addClass(Re.ACTIVE)):(n.addClass(Re.ACTIVE),n.parents(Ne.NAV_LIST_GROUP).prev(Ne.NAV_LINKS+", "+Ne.LIST_ITEMS).addClass(Re.ACTIVE),n.parents(Ne.NAV_LIST_GROUP).prev(Ne.NAV_ITEMS).children(Ne.NAV_LINKS).addClass(Re.ACTIVE)),Ee(this._scrollElement).trigger(Ie.ACTIVATE,{relatedTarget:e})},t._clear=function(){Ee(this._selector).filter(Ne.ACTIVE).removeClass(Re.ACTIVE)},n._jQueryInterface=function(e){return this.each(function(){var t=Ee(this).data(Se);if(t||(t=new n(this,"object"==typeof e&&e),Ee(this).data(Se,t)),"string"==typeof e){if("undefined"==typeof t[e])throw new TypeError('No method named "'+e+'"');t[e]()}})},s(n,null,[{key:"VERSION",get:function(){return Te}},{key:"Default",get:function(){return De}}]),n}(),Ee(window).on(Ie.LOAD_DATA_API,function(){for(var t=Ee.makeArray(Ee(Ne.DATA_SPY)),e=t.length;e--;){var n=Ee(t[e]);Be._jQueryInterface.call(n,n.data())}}),Ee.fn[Ce]=Be._jQueryInterface,Ee.fn[Ce].Constructor=Be,Ee.fn[Ce].noConflict=function(){return Ee.fn[Ce]=Pe,Be._jQueryInterface},Be),an=(Fe="tab",ze="4.0.0",We="."+(He="bs.tab"),qe=".data-api",Ve=(je=e).fn[Fe],Ue=150,Ze={HIDE:"hide"+We,HIDDEN:"hidden"+We,SHOW:"show"+We,SHOWN:"shown"+We,CLICK_DATA_API:"click"+We+qe},Ke={DROPDOWN_MENU:"dropdown-menu",ACTIVE:"active",DISABLED:"disabled",FADE:"fade",SHOW:"show"},Ge={DROPDOWN:".dropdown",NAV_LIST_GROUP:".nav, .list-group",ACTIVE:".active",ACTIVE_UL:"> li > .active",DATA_TOGGLE:'[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',DROPDOWN_TOGGLE:".dropdown-toggle",DROPDOWN_ACTIVE_CHILD:"> .dropdown-menu .active"},Je=function(){function i(t){this._element=t}var t=i.prototype;return t.show=function(){var n=this;if(!(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&je(this._element).hasClass(Ke.ACTIVE)||je(this._element).hasClass(Ke.DISABLED))){var t,i,e=je(this._element).closest(Ge.NAV_LIST_GROUP)[0],o=$e.getSelectorFromElement(this._element);if(e){var r="UL"===e.nodeName?Ge.ACTIVE_UL:Ge.ACTIVE;i=(i=je.makeArray(je(e).find(r)))[i.length-1]}var s=je.Event(Ze.HIDE,{relatedTarget:this._element}),a=je.Event(Ze.SHOW,{relatedTarget:i});if(i&&je(i).trigger(s),je(this._element).trigger(a),!a.isDefaultPrevented()&&!s.isDefaultPrevented()){o&&(t=je(o)[0]),this._activate(this._element,e);var u=function(){var t=je.Event(Ze.HIDDEN,{relatedTarget:n._element}),e=je.Event(Ze.SHOWN,{relatedTarget:i});je(i).trigger(t),je(n._element).trigger(e)};t?this._activate(t,t.parentNode,u):u()}}},t.dispose=function(){je.removeData(this._element,He),this._element=null},t._activate=function(t,e,n){var i=this,o=("UL"===e.nodeName?je(e).find(Ge.ACTIVE_UL):je(e).children(Ge.ACTIVE))[0],r=n&&$e.supportsTransitionEnd()&&o&&je(o).hasClass(Ke.FADE),s=function(){return i._transitionComplete(t,o,n)};o&&r?je(o).one($e.TRANSITION_END,s).emulateTransitionEnd(Ue):s()},t._transitionComplete=function(t,e,n){if(e){je(e).removeClass(Ke.SHOW+" "+Ke.ACTIVE);var i=je(e.parentNode).find(Ge.DROPDOWN_ACTIVE_CHILD)[0];i&&je(i).removeClass(Ke.ACTIVE),"tab"===e.getAttribute("role")&&e.setAttribute("aria-selected",!1)}if(je(t).addClass(Ke.ACTIVE),"tab"===t.getAttribute("role")&&t.setAttribute("aria-selected",!0),$e.reflow(t),je(t).addClass(Ke.SHOW),t.parentNode&&je(t.parentNode).hasClass(Ke.DROPDOWN_MENU)){var o=je(t).closest(Ge.DROPDOWN)[0];o&&je(o).find(Ge.DROPDOWN_TOGGLE).addClass(Ke.ACTIVE),t.setAttribute("aria-expanded",!0)}n&&n()},i._jQueryInterface=function(n){return this.each(function(){var t=je(this),e=t.data(He);if(e||(e=new i(this),t.data(He,e)),"string"==typeof n){if("undefined"==typeof e[n])throw new TypeError('No method named "'+n+'"');e[n]()}})},s(i,null,[{key:"VERSION",get:function(){return ze}}]),i}(),je(document).on(Ze.CLICK_DATA_API,Ge.DATA_TOGGLE,function(t){t.preventDefault(),Je._jQueryInterface.call(je(this),"show")}),je.fn[Fe]=Je._jQueryInterface,je.fn[Fe].Constructor=Je,je.fn[Fe].noConflict=function(){return je.fn[Fe]=Ve,Je._jQueryInterface},Je);!function(t){if(void 0===t)throw new TypeError("Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript.");var e=t.fn.jquery.split(" ")[0].split("."),n=1,i=2,o=9,r=1,s=4;if(e[0]<i&&e[1]<o||e[0]===n&&e[1]===o&&e[2]<r||e[0]>=s)throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")}(e),t.Util=$e,t.Alert=Ye,t.Button=Xe,t.Carousel=Qe,t.Collapse=tn,t.Dropdown=en,t.Modal=nn,t.Popover=rn,t.Scrollspy=sn,t.Tab=an,t.Tooltip=on,Object.defineProperty(t,"__esModule",{value:!0})}),function(){this.Turbolinks={supported:null!=window.history.pushState&&null!=window.requestAnimationFrame&&null!=window.addEventListener,visit:function(t,e){return Turbolinks.controller.visit(t,e)},clearCache:function(){return Turbolinks.controller.clearCache()},setProgressBarDelay:function(t){return Turbolinks.controller.setProgressBarDelay(t)}}}.call(this),function(){var n,i,u,t,e,o,r,s,a,l=[].slice;Turbolinks.copyObject=function(t){var e,n,i;for(e in n={},t)i=t[e],n[e]=i;return n},Turbolinks.closest=function(t,e){return n.call(t,e)},n=null!=(a=document.documentElement.closest)?a:function(t){var e;for(e=this;e;){if(e.nodeType===Node.ELEMENT_NODE&&i.call(e,t))return e;e=e.parentNode}},Turbolinks.defer=function(t){return setTimeout(t,1)},Turbolinks.throttle=function(n){var i;return i=null,function(){var t,e;return t=1<=arguments.length?l.call(arguments,0):[],null!=i?i:i=requestAnimationFrame((e=this,function(){return i=null,n.apply(e,t)}))}},Turbolinks.dispatch=function(t,e){var n,i,o,r,s,a;return a=(s=null!=e?e:{}).target,n=s.cancelable,i=s.data,(o=document.createEvent("Events")).initEvent(t,!0,!0===n),o.data=null!=i?i:{},o.cancelable&&!u&&(r=o.preventDefault,o.preventDefault=function(){return this.defaultPrevented||Object.defineProperty(this,"defaultPrevented",{get:function(){return!0}}),r.call(this)}),(null!=a?a:document).dispatchEvent(o),o},(s=document.createEvent("Events")).initEvent("test",!0,!0),s.preventDefault(),u=s.defaultPrevented,Turbolinks.match=function(t,e){return i.call(t,e)},i=null!=(e=null!=(o=null!=(r=(t=document.documentElement).matchesSelector)?r:t.webkitMatchesSelector)?o:t.msMatchesSelector)?e:t.mozMatchesSelector,Turbolinks.uuid=function(){var t,e,n;for(n="",t=e=1;e<=36;t=++e)n+=9===t||14===t||19===t||24===t?"-":15===t?"4":20===t?(Math.floor(4*Math.random())+8).toString(16):Math.floor(15*Math.random()).toString(16);return n}}.call(this),function(){Turbolinks.Location=function(){function t(t){var e,n;null==t&&(t=""),(n=document.createElement("a")).href=t.toString(),this.absoluteURL=n.href,(e=n.hash.length)<2?this.requestURL=this.absoluteURL:(this.requestURL=this.absoluteURL.slice(0,-e),this.anchor=n.hash.slice(1))}var e,n,i,o;return t.wrap=function(t){return t instanceof this?t:new this(t)},t.prototype.getOrigin=function(){return this.absoluteURL.split("/",3).join("/")},t.prototype.getPath=function(){var t,e;return null!=(t=null!=(e=this.requestURL.match(/\/\/[^\/]*(\/[^?;]*)/))?e[1]:void 0)?t:"/"},t.prototype.getPathComponents=function(){return this.getPath().split("/").slice(1)},t.prototype.getLastPathComponent=function(){return this.getPathComponents().slice(-1)[0]},t.prototype.getExtension=function(){var t,e;return null!=(t=null!=(e=this.getLastPathComponent().match(/\.[^.]*$/))?e[0]:void 0)?t:""},t.prototype.isHTML=function(){return this.getExtension().match(/^(?:|\.(?:htm|html|xhtml))$/)},t.prototype.isPrefixedBy=function(t){var e;return e=n(t),this.isEqualTo(t)||o(this.absoluteURL,e)},t.prototype.isEqualTo=function(t){return this.absoluteURL===(null!=t?t.absoluteURL:void 0)},t.prototype.toCacheKey=function(){return this.requestURL},t.prototype.toJSON=function(){return this.absoluteURL},t.prototype.toString=function(){return this.absoluteURL},t.prototype.valueOf=function(){return this.absoluteURL},n=function(t){return e(t.getOrigin()+t.getPath())},e=function(t){return i(t,"/")?t:t+"/"},o=function(t,e){return t.slice(0,e.length)===e},i=function(t,e){return t.slice(-e.length)===e},t}()}.call(this),function(){var i=function(t,e){return function(){return t.apply(e,arguments)}};Turbolinks.HttpRequest=function(){function t(t,e,n){this.delegate=t,this.requestCanceled=i(this.requestCanceled,this),this.requestTimedOut=i(this.requestTimedOut,this),this.requestFailed=i(this.requestFailed,this),this.requestLoaded=i(this.requestLoaded,this),this.requestProgressed=i(this.requestProgressed,this),this.url=Turbolinks.Location.wrap(e).requestURL,this.referrer=Turbolinks.Location.wrap(n).absoluteURL,this.createXHR()}return t.NETWORK_FAILURE=0,t.TIMEOUT_FAILURE=-1,t.timeout=60,t.prototype.send=function(){var t;return this.xhr&&!this.sent?(this.notifyApplicationBeforeRequestStart(),this.setProgress(0),this.xhr.send(),this.sent=!0,"function"==typeof(t=this.delegate).requestStarted?t.requestStarted():void 0):void 0},t.prototype.cancel=function(){return this.xhr&&this.sent?this.xhr.abort():void 0},t.prototype.requestProgressed=function(t){return t.lengthComputable?this.setProgress(t.loaded/t.total):void 0},t.prototype.requestLoaded=function(){return this.endRequest((e=this,function(){var t;return 200<=(t=e.xhr.status)&&t<300?e.delegate.requestCompletedWithResponse(e.xhr.responseText,e.xhr.getResponseHeader("Turbolinks-Location")):(e.failed=!0,e.delegate.requestFailedWithStatusCode(e.xhr.status,e.xhr.responseText))}));var e},t.prototype.requestFailed=function(){return this.endRequest((t=this,function(){return t.failed=!0,t.delegate.requestFailedWithStatusCode(t.constructor.NETWORK_FAILURE)}));var t},t.prototype.requestTimedOut=function(){return this.endRequest((t=this,function(){return t.failed=!0,t.delegate.requestFailedWithStatusCode(t.constructor.TIMEOUT_FAILURE)}));var t},t.prototype.requestCanceled=function(){return this.endRequest()},t.prototype.notifyApplicationBeforeRequestStart=function(){return Turbolinks.dispatch("turbolinks:request-start",{data:{url:this.url,xhr:this.xhr}})},t.prototype.notifyApplicationAfterRequestEnd=function(){return Turbolinks.dispatch("turbolinks:request-end",{data:{url:this.url,xhr:this.xhr}})},t.prototype.createXHR=function(){return this.xhr=new XMLHttpRequest,this.xhr.open("GET",this.url,!0),this.xhr.timeout=1e3*this.constructor.timeout,this.xhr.setRequestHeader("Accept","text/html, application/xhtml+xml"),this.xhr.setRequestHeader("Turbolinks-Referrer",this.referrer),this.xhr.onprogress=this.requestProgressed,this.xhr.onload=this.requestLoaded,this.xhr.onerror=this.requestFailed,this.xhr.ontimeout=this.requestTimedOut,this.xhr.onabort=this.requestCanceled},t.prototype.endRequest=function(t){return this.xhr?(this.notifyApplicationAfterRequestEnd(),null!=t&&t.call(this),this.destroy()):void 0},t.prototype.setProgress=function(t){var e;return this.progress=t,"function"==typeof(e=this.delegate).requestProgressed?e.requestProgressed(this.progress):void 0},t.prototype.destroy=function(){var t;return this.setProgress(1),"function"==typeof(t=this.delegate).requestFinished&&t.requestFinished(),this.delegate=null,this.xhr=null},t}()}.call(this),function(){var n=function(t,e){return function(){return t.apply(e,arguments)}};Turbolinks.ProgressBar=function(){function t(){this.trickle=n(this.trickle,this),this.stylesheetElement=this.createStylesheetElement(),this.progressElement=this.createProgressElement()}var e;return e=300,t.defaultCSS=".turbolinks-progress-bar {\n  position: fixed;\n  display: block;\n  top: 0;\n  left: 0;\n  height: 3px;\n  background: #0076ff;\n  z-index: 9999;\n  transition: width "+e+"ms ease-out, opacity "+e/2+"ms "+e/2+"ms ease-in;\n  transform: translate3d(0, 0, 0);\n}",t.prototype.show=function(){return this.visible?void 0:(this.visible=!0,this.installStylesheetElement(),this.installProgressElement(),this.startTrickling())},t.prototype.hide=function(){return this.visible&&!this.hiding?(this.hiding=!0,this.fadeProgressElement((t=this,function(){return t.uninstallProgressElement(),t.stopTrickling(),t.visible=!1,t.hiding=!1}))):void 0;var t},t.prototype.setValue=function(t){return this.value=t,this.refresh()},t.prototype.installStylesheetElement=function(){return document.head.insertBefore(this.stylesheetElement,document.head.firstChild)},t.prototype.installProgressElement=function(){return this.progressElement.style.width=0,this.progressElement.style.opacity=1,document.documentElement.insertBefore(this.progressElement,document.body),this.refresh()},t.prototype.fadeProgressElement=function(t){return this.progressElement.style.opacity=0,setTimeout(t,1.5*e)},t.prototype.uninstallProgressElement=function(){return this.progressElement.parentNode?document.documentElement.removeChild(this.progressElement):void 0},t.prototype.startTrickling=function(){return null!=this.trickleInterval?this.trickleInterval:this.trickleInterval=setInterval(this.trickle,e)},t.prototype.stopTrickling=function(){return clearInterval(this.trickleInterval),this.trickleInterval=null},t.prototype.trickle=function(){return this.setValue(this.value+Math.random()/100)},t.prototype.refresh=function(){return requestAnimationFrame((t=this,function(){return t.progressElement.style.width=10+90*t.value+"%"}));var t},t.prototype.createStylesheetElement=function(){var t;return(t=document.createElement("style")).type="text/css",t.textContent=this.constructor.defaultCSS,t},t.prototype.createProgressElement=function(){var t;return(t=document.createElement("div")).className="turbolinks-progress-bar",t},t}()}.call(this),function(){var o=function(t,e){return function(){return t.apply(e,arguments)}};Turbolinks.BrowserAdapter=function(){function t(t){this.controller=t,this.showProgressBar=o(this.showProgressBar,this),this.progressBar=new Turbolinks.ProgressBar}var n,i,e;return e=Turbolinks.HttpRequest,n=e.NETWORK_FAILURE,i=e.TIMEOUT_FAILURE,t.prototype.visitProposedToLocationWithAction=function(t,e){return this.controller.startVisitToLocationWithAction(t,e)},t.prototype.visitStarted=function(t){return t.issueRequest(),t.changeHistory(),t.loadCachedSnapshot()},t.prototype.visitRequestStarted=function(t){return this.progressBar.setValue(0),t.hasCachedSnapshot()||"restore"!==t.action?this.showProgressBarAfterDelay():this.showProgressBar()},t.prototype.visitRequestProgressed=function(t){return this.progressBar.setValue(t.progress)},t.prototype.visitRequestCompleted=function(t){return t.loadResponse()},t.prototype.visitRequestFailedWithStatusCode=function(t,e){switch(e){case n:case i:return this.reload();default:return t.loadResponse()}},t.prototype.visitRequestFinished=function(){return this.hideProgressBar()},t.prototype.visitCompleted=function(t){return t.followRedirect()},t.prototype.pageInvalidated=function(){return this.reload()},t.prototype.showProgressBarAfterDelay=function(){return this.progressBarTimeout=setTimeout(this.showProgressBar,this.controller.progressBarDelay)},t.prototype.showProgressBar=function(){return this.progressBar.show()},t.prototype.hideProgressBar=function(){return this.progressBar.hide(),clearTimeout(this.progressBarTimeout)},t.prototype.reload=function(){return window.location.reload()},t}()}.call(this),function(){var e=function(t,e){return function(){return t.apply(e,arguments)}};Turbolinks.History=function(){function t(t){this.delegate=t,this.onPageLoad=e(this.onPageLoad,this),this.onPopState=e(this.onPopState,this)}return t.prototype.start=function(){return this.started?void 0:(addEventListener("popstate",this.onPopState,!1),addEventListener("load",this.onPageLoad,!1),this.started=!0)},t.prototype.stop=function(){return this.started?(removeEventListener("popstate",this.onPopState,!1),removeEventListener("load",this.onPageLoad,!1),this.started=!1):void 0},t.prototype.push=function(t,e){return t=Turbolinks.Location.wrap(t),this.update("push",t,e)},t.prototype.replace=function(t,e){return t=Turbolinks.Location.wrap(t),this.update("replace",t,e)},t.prototype.onPopState=function(t){var e,n,i,o;return this.shouldHandlePopState()&&(o=null!=(n=t.state)?n.turbolinks:void 0)?(e=Turbolinks.Location.wrap(window.location),i=o.restorationIdentifier,this.delegate.historyPoppedToLocationWithRestorationIdentifier(e,i)):void 0},t.prototype.onPageLoad=function(){return Turbolinks.defer((t=this,function(){return t.pageLoaded=!0}));var t},t.prototype.shouldHandlePopState=function(){return this.pageIsLoaded()},t.prototype.pageIsLoaded=function(){return this.pageLoaded||"complete"===document.readyState},t.prototype.update=function(t,e,n){var i;return i={turbolinks:{restorationIdentifier:n}},history[t+"State"](i,null,e)},t}()}.call(this),function(){Turbolinks.Snapshot=function(){function t(t){var e,n;n=t.head,e=t.body,this.head=null!=n?n:document.createElement("head"),this.body=null!=e?e:document.createElement("body")}return t.wrap=function(t){return t instanceof this?t:this.fromHTML(t)},t.fromHTML=function(t){var e;return(e=document.createElement("html")).innerHTML=t,this.fromElement(e)},t.fromElement=function(t){return new this({head:t.querySelector("head"),body:t.querySelector("body")})},t.prototype.clone=function(){return new t({head:this.head.cloneNode(!0),body:this.body.cloneNode(!0)})},t.prototype.getRootLocation=function(){var t,e;return e=null!=(t=this.getSetting("root"))?t:"/",new Turbolinks.Location(e)},t.prototype.getCacheControlValue=function(){return this.getSetting("cache-control")},t.prototype.getElementForAnchor=function(t){try{return this.body.querySelector("[id='"+t+"'], a[name='"+t+"']")}catch(e){}},t.prototype.hasAnchor=function(t){return null!=this.getElementForAnchor(t)},t.prototype.isPreviewable=function(){return"no-preview"!==this.getCacheControlValue()},t.prototype.isCacheable=function(){return"no-cache"!==this.getCacheControlValue()},t.prototype.isVisitable=function(){return"reload"!==this.getSetting("visit-control")},t.prototype.getSetting=function(t){var e,n;return null!=(e=(n=this.head.querySelectorAll("meta[name='turbolinks-"+t+"']"))[n.length-1])?e.getAttribute("content"):void 0},t}()}.call(this),function(){var r=[].slice;Turbolinks.Renderer=function(){function t(){}var n;return t.render=function(t,e){var n,i,o;return i=t,n=e,(o=function(t,e,n){n.prototype=t.prototype;var i=new n,o=t.apply(i,e);return Object(o)===o?o:i}(this,3<=arguments.length?r.call(arguments,2):[],function(){})).delegate=i,o.render(n),o},t.prototype.renderView=function(t){return this.delegate.viewWillRender(this.newBody),t(),this.delegate.viewRendered(this.newBody)},t.prototype.invalidateView=function(){return this.delegate.viewInvalidated()},t.prototype.createScriptElement=function(t){var e;return"false"===t.getAttribute("data-turbolinks-eval")?t:((e=document.createElement("script")).textContent=t.textContent,e.async=!1,n(e,t),e)},n=function(t,e){var n,i,o,r,s,a,u;for(a=[],n=0,i=(r=e.attributes).length;n<i;n++)o=(s=r[n]).name,u=s.value,a.push(t.setAttribute(o,u));return a},t}()}.call(this),function(){Turbolinks.HeadDetails=function(){function t(t){var e,n,i,o,r,s;for(this.element=t,this.elements={},i=0,r=(s=this.element.childNodes).length;i<r;i++)(n=s[i]).nodeType===Node.ELEMENT_NODE&&(o=n.outerHTML,(null!=(e=this.elements)[o]?e[o]:e[o]={type:u(n),tracked:a(n),elements:[]}).elements.push(n))}var e,n,a,u;return t.prototype.hasElementWithKey=function(t){return t in this.elements},t.prototype.getTrackedElementSignature=function(){var n;return function(){var t,e;for(n in e=[],t=this.elements)t[n].tracked&&e.push(n);return e}.call(this).join("")},t.prototype.getScriptElementsNotInDetails=function(t){return this.getElementsMatchingTypeNotInDetails("script",t)},t.prototype.getStylesheetElementsNotInDetails=function(t){return this.getElementsMatchingTypeNotInDetails("stylesheet",t)},t.prototype.getElementsMatchingTypeNotInDetails=function(t,e){var n,i,o,r,s,a;for(i in s=[],o=this.elements)a=(r=o[i]).type,n=r.elements,a!==t||e.hasElementWithKey(i)||s.push(n[0]);return s},t.prototype.getProvisionalElements=function(){var t,e,n,i,o,r,s;for(e in n=[],i=this.elements)s=(o=i[e]).type,r=o.tracked,t=o.elements,null!=s||r?1<t.length&&n.push.apply(n,t.slice(1)):n.push.apply(n,t);return n},u=function(t){return e(t)?"script":n(t)?"stylesheet":void 0},a=function(t){return"reload"===t.getAttribute("data-turbolinks-track")},e=function(t){return"script"===t.tagName.toLowerCase()},n=function(t){var e;return"style"===(e=t.tagName.toLowerCase())||"link"===e&&"stylesheet"===t.getAttribute("rel")},t}()}.call(this),function(){var n=function(t,e){function n(){this.constructor=t}for(var i in e)o.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty;Turbolinks.SnapshotRenderer=function(t){function e(t,e,n){this.currentSnapshot=t,this.newSnapshot=e,this.isPreview=n,this.currentHeadDetails=new Turbolinks.HeadDetails(this.currentSnapshot.head),this.newHeadDetails=new Turbolinks.HeadDetails(this.newSnapshot.head),this.newBody=this.newSnapshot.body}return n(e,t),e.prototype.render=function(t){return this.shouldRender()?(this.mergeHead(),this.renderView((e=this,function(){return e.replaceBody(),e.isPreview||e.focusFirstAutofocusableElement(),t()}))):this.invalidateView();var e},e.prototype.mergeHead=function(){return this.copyNewHeadStylesheetElements(),this.copyNewHeadScriptElements(),this.removeCurrentHeadProvisionalElements(),this.copyNewHeadProvisionalElements()},e.prototype.replaceBody=function(){return this.activateBodyScriptElements(),this.importBodyPermanentElements(),this.assignNewBody()},e.prototype.shouldRender=function(){return this.newSnapshot.isVisitable()&&this.trackedElementsAreIdentical()},e.prototype.trackedElementsAreIdentical=function(){return this.currentHeadDetails.getTrackedElementSignature()===this.newHeadDetails.getTrackedElementSignature()},e.prototype.copyNewHeadStylesheetElements=function(){var t,e,n,i,o;for(o=[],e=0,n=(i=this.getNewHeadStylesheetElements()).length;e<n;e++)t=i[e],o.push(document.head.appendChild(t));return o},e.prototype.copyNewHeadScriptElements=function(){var t,e,n,i,o;for(o=[],e=0,n=(i=this.getNewHeadScriptElements()).length;e<n;e++)t=i[e],o.push(document.head.appendChild(this.createScriptElement(t)));return o},e.prototype.removeCurrentHeadProvisionalElements=function(){var t,e,n,i,o;for(o=[],e=0,n=(i=this.getCurrentHeadProvisionalElements()).length;e<n;e++)t=i[e],o.push(document.head.removeChild(t));return o},e.prototype.copyNewHeadProvisionalElements=function(){var t,e,n,i,o;for(o=[],e=0,n=(i=this.getNewHeadProvisionalElements()).length;e<n;e++)t=i[e],o.push(document.head.appendChild(t));return o},e.prototype.importBodyPermanentElements=function(){var t,e,n,i,o,r;for(r=[],e=0,n=(i=this.getNewBodyPermanentElements()).length;e<n;e++)o=i[e],(t=this.findCurrentBodyPermanentElement(o))?r.push(o.parentNode.replaceChild(t,o)):r.push(void 0);return r},e.prototype.activateBodyScriptElements=function(){var t,e,n,i,o,r;for(r=[],e=0,n=(i=this.getNewBodyScriptElements()).length;e<n;e++)o=i[e],t=this.createScriptElement(o),r.push(o.parentNode.replaceChild(t,o));return r},e.prototype.assignNewBody=function(){return document.body=this.newBody},e.prototype.focusFirstAutofocusableElement=function(){var t;return null!=(t=this.findFirstAutofocusableElement())?t.focus():void 0},e.prototype.getNewHeadStylesheetElements=function(){return this.newHeadDetails.getStylesheetElementsNotInDetails(this.currentHeadDetails)},e.prototype.getNewHeadScriptElements=function(){return this.newHeadDetails.getScriptElementsNotInDetails(this.currentHeadDetails)},e.prototype.getCurrentHeadProvisionalElements=function(){return this.currentHeadDetails.getProvisionalElements()},e.prototype.getNewHeadProvisionalElements=function(){return this.newHeadDetails.getProvisionalElements()},e.prototype.getNewBodyPermanentElements=function(){return this.newBody.querySelectorAll("[id][data-turbolinks-permanent]")},e.prototype.findCurrentBodyPermanentElement=function(t){return document.body.querySelector("#"+t.id+"[data-turbolinks-permanent]")},e.prototype.getNewBodyScriptElements=function(){return this.newBody.querySelectorAll("script")},e.prototype.findFirstAutofocusableElement=function(){return document.body.querySelector("[autofocus]")},e}(Turbolinks.Renderer)}.call(this),function(){var n=function(t,e){function n(){this.constructor=t}for(var i in e)o.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty;Turbolinks.ErrorRenderer=function(t){function e(t){this.html=t}return n(e,t),e.prototype.render=function(t){return this.renderView((e=this,function(){return e.replaceDocumentHTML(),e.activateBodyScriptElements(),t()}));var e},e.prototype.replaceDocumentHTML=function(){return document.documentElement.innerHTML=this.html},e.prototype.activateBodyScriptElements=function(){var t,e,n,i,o,r;for(r=[],e=0,n=(i=this.getScriptElements()).length;e<n;e++)o=i[e],t=this.createScriptElement(o),r.push(o.parentNode.replaceChild(t,o));return r},e.prototype.getScriptElements=function(){return document.documentElement.querySelectorAll("script")},e}(Turbolinks.Renderer)}.call(this),function(){Turbolinks.View=function(){function t(t){this.delegate=t,this.element=document.documentElement}return t.prototype.getRootLocation=function(){return this.getSnapshot().getRootLocation()},t.prototype.getElementForAnchor=function(t){return this.getSnapshot().getElementForAnchor(t)},t.prototype.getSnapshot=function(){return Turbolinks.Snapshot.fromElement(this.element)},t.prototype.render=function(t,e){var n,i,o;return o=t.snapshot,n=t.error,i=t.isPreview,this.markAsPreview(i),null!=o?this.renderSnapshot(o,i,e):this.renderError(n,e)},t.prototype.markAsPreview=function(t){return t?this.element.setAttribute("data-turbolinks-preview",""):this.element.removeAttribute("data-turbolinks-preview")},t.prototype.renderSnapshot=function(t,e,n){return Turbolinks.SnapshotRenderer.render(this.delegate,n,this.getSnapshot(),Turbolinks.Snapshot.wrap(t),e)},t.prototype.renderError=function(t,e){return Turbolinks.ErrorRenderer.render(this.delegate,e,t)},t}()}.call(this),function(){var e=function(t,e){return function(){return t.apply(e,arguments)}};Turbolinks.ScrollManager=function(){function t(t){this.delegate=t,this.onScroll=e(this.onScroll,this),this.onScroll=Turbolinks.throttle(this.onScroll)}return t.prototype.start=function(){return this.started?void 0:(addEventListener("scroll",this.onScroll,!1),this.onScroll(),this.started=!0)},t.prototype.stop=function(){return this.started?(removeEventListener("scroll",this.onScroll,!1),this.started=!1):void 0},t.prototype.scrollToElement=function(t){return t.scrollIntoView()},t.prototype.scrollToPosition=function(t){var e,n;return e=t.x,n=t.y,window.scrollTo(e,n)},t.prototype.onScroll=function(){return this.updatePosition({x:window.pageXOffset,y:window.pageYOffset})},t.prototype.updatePosition=function(t){var e;return this.position=t,null!=(e=this.delegate)?e.scrollPositionChanged(this.position):void 0},t}()}.call(this),function(){Turbolinks.SnapshotCache=function(){function t(t){this.size=t,this.keys=[],this.snapshots={}}var i;return t.prototype.has=function(t){return i(t)in this.snapshots},t.prototype.get=function(t){var e;if(this.has(t))return e=this.read(t),this.touch(t),e},t.prototype.put=function(t,e){return this.write(t,e),this.touch(t),e},t.prototype.read=function(t){var e;return e=i(t),this.snapshots[e]},t.prototype.write=function(t,e){var n;return n=i(t),this.snapshots[n]=e},t.prototype.touch=function(t){var e,n;return n=i(t),-1<(e=this.keys.indexOf(n))&&this.keys.splice(e,1),this.keys.unshift(n),this.trim()},t.prototype.trim=function(){var t,e,n,i,o;for(o=[],t=0,n=(i=this.keys.splice(this.size)).length;t<n;t++)e=i[t],o.push(delete this.snapshots[e]);return o},i=function(t){return Turbolinks.Location.wrap(t).toCacheKey()},t}()}.call(this),function(){var i=function(t,e){return function(){return t.apply(e,arguments)}};Turbolinks.Visit=function(){function t(t,e,n){this.controller=t,this.action=n,this.performScroll=i(this.performScroll,this),this.identifier=Turbolinks.uuid(),this.location=Turbolinks.Location.wrap(e),this.adapter=this.controller.adapter,this.state="initialized",this.timingMetrics={}}var n;return t.prototype.start=function(){return"initialized"===this.state?(this.recordTimingMetric("visitStart"),this.state="started",this.adapter.visitStarted(this)):void 0},t.prototype.cancel=function(){var t;return"started"===this.state?(null!=(t=this.request)&&t.cancel(),this.cancelRender(),this.state="canceled"):void 0},t.prototype.complete=function(){var t;return"started"===this.state?(this.recordTimingMetric("visitEnd"),this.state="completed","function"==typeof(t=this.adapter).visitCompleted&&t.visitCompleted(this),this.controller.visitCompleted(this)):void 0},t.prototype.fail=function(){var t;return"started"===this.state?(this.state="failed","function"==typeof(t=this.adapter).visitFailed?t.visitFailed(this):void 0):void 0},t.prototype.changeHistory=function(){var t,e;return this.historyChanged?void 0:(t=this.location.isEqualTo(this.referrer)?"replace":this.action,e=n(t),this.controller[e](this.location,this.restorationIdentifier),this.historyChanged=!0)},t.prototype.issueRequest=function(){return this.shouldIssueRequest()&&null==this.request?(this.progress=0,this.request=new Turbolinks.HttpRequest(this,this.location,this.referrer),this.request.send()):void 0},t.prototype.getCachedSnapshot=function(){var t;return!(t=this.controller.getCachedSnapshotForLocation(this.location))||null!=this.location.anchor&&!t.hasAnchor(this.location.anchor)||"restore"!==this.action&&!t.isPreviewable()?void 0:t},t.prototype.hasCachedSnapshot=function(){return null!=this.getCachedSnapshot()},t.prototype.loadCachedSnapshot=function(){var e,n;return(n=this.getCachedSnapshot())?(e=this.shouldIssueRequest(),this.render(function(){var t;return this.cacheSnapshot(),this.controller.render({snapshot:n,isPreview:e},this.performScroll),"function"==typeof(t=this.adapter).visitRendered&&t.visitRendered(this),e?void 0:this.complete()})):void 0},t.prototype.loadResponse=function(){return null!=this.response?this.render(function(){var t,e;return this.cacheSnapshot(),this.request.failed?(this.controller.render({error:this.response},this.performScroll),"function"==typeof(t=this.adapter).visitRendered&&t.visitRendered(this),this.fail()):(this.controller.render({snapshot:this.response},this.performScroll),
"function"==typeof(e=this.adapter).visitRendered&&e.visitRendered(this),this.complete())}):void 0},t.prototype.followRedirect=function(){return this.redirectedToLocation&&!this.followedRedirect?(this.location=this.redirectedToLocation,this.controller.replaceHistoryWithLocationAndRestorationIdentifier(this.redirectedToLocation,this.restorationIdentifier),this.followedRedirect=!0):void 0},t.prototype.requestStarted=function(){var t;return this.recordTimingMetric("requestStart"),"function"==typeof(t=this.adapter).visitRequestStarted?t.visitRequestStarted(this):void 0},t.prototype.requestProgressed=function(t){var e;return this.progress=t,"function"==typeof(e=this.adapter).visitRequestProgressed?e.visitRequestProgressed(this):void 0},t.prototype.requestCompletedWithResponse=function(t,e){return this.response=t,null!=e&&(this.redirectedToLocation=Turbolinks.Location.wrap(e)),this.adapter.visitRequestCompleted(this)},t.prototype.requestFailedWithStatusCode=function(t,e){return this.response=e,this.adapter.visitRequestFailedWithStatusCode(this,t)},t.prototype.requestFinished=function(){var t;return this.recordTimingMetric("requestEnd"),"function"==typeof(t=this.adapter).visitRequestFinished?t.visitRequestFinished(this):void 0},t.prototype.performScroll=function(){return this.scrolled?void 0:("restore"===this.action?this.scrollToRestoredPosition()||this.scrollToTop():this.scrollToAnchor()||this.scrollToTop(),this.scrolled=!0)},t.prototype.scrollToRestoredPosition=function(){var t,e;return null!=(t=null!=(e=this.restorationData)?e.scrollPosition:void 0)?(this.controller.scrollToPosition(t),!0):void 0},t.prototype.scrollToAnchor=function(){return null!=this.location.anchor?(this.controller.scrollToAnchor(this.location.anchor),!0):void 0},t.prototype.scrollToTop=function(){return this.controller.scrollToPosition({x:0,y:0})},t.prototype.recordTimingMetric=function(t){var e;return null!=(e=this.timingMetrics)[t]?e[t]:e[t]=(new Date).getTime()},t.prototype.getTimingMetrics=function(){return Turbolinks.copyObject(this.timingMetrics)},n=function(t){switch(t){case"replace":return"replaceHistoryWithLocationAndRestorationIdentifier";case"advance":case"restore":return"pushHistoryWithLocationAndRestorationIdentifier"}},t.prototype.shouldIssueRequest=function(){return"restore"!==this.action||!this.hasCachedSnapshot()},t.prototype.cacheSnapshot=function(){return this.snapshotCached?void 0:(this.controller.cacheSnapshot(),this.snapshotCached=!0)},t.prototype.render=function(t){return this.cancelRender(),this.frame=requestAnimationFrame((e=this,function(){return e.frame=null,t.call(e)}));var e},t.prototype.cancelRender=function(){return this.frame?cancelAnimationFrame(this.frame):void 0},t}()}.call(this),function(){var e=function(t,e){return function(){return t.apply(e,arguments)}};Turbolinks.Controller=function(){function t(){this.clickBubbled=e(this.clickBubbled,this),this.clickCaptured=e(this.clickCaptured,this),this.pageLoaded=e(this.pageLoaded,this),this.history=new Turbolinks.History(this),this.view=new Turbolinks.View(this),this.scrollManager=new Turbolinks.ScrollManager(this),this.restorationData={},this.clearCache(),this.setProgressBarDelay(500)}return t.prototype.start=function(){return Turbolinks.supported&&!this.started?(addEventListener("click",this.clickCaptured,!0),addEventListener("DOMContentLoaded",this.pageLoaded,!1),this.scrollManager.start(),this.startHistory(),this.started=!0,this.enabled=!0):void 0},t.prototype.disable=function(){return this.enabled=!1},t.prototype.stop=function(){return this.started?(removeEventListener("click",this.clickCaptured,!0),removeEventListener("DOMContentLoaded",this.pageLoaded,!1),this.scrollManager.stop(),this.stopHistory(),this.started=!1):void 0},t.prototype.clearCache=function(){return this.cache=new Turbolinks.SnapshotCache(10)},t.prototype.visit=function(t,e){var n,i;return null==e&&(e={}),t=Turbolinks.Location.wrap(t),this.applicationAllowsVisitingLocation(t)?this.locationIsVisitable(t)?(n=null!=(i=e.action)?i:"advance",this.adapter.visitProposedToLocationWithAction(t,n)):window.location=t:void 0},t.prototype.startVisitToLocationWithAction=function(t,e,n){var i;return Turbolinks.supported?(i=this.getRestorationDataForIdentifier(n),this.startVisit(t,e,{restorationData:i})):window.location=t},t.prototype.setProgressBarDelay=function(t){return this.progressBarDelay=t},t.prototype.startHistory=function(){return this.location=Turbolinks.Location.wrap(window.location),this.restorationIdentifier=Turbolinks.uuid(),this.history.start(),this.history.replace(this.location,this.restorationIdentifier)},t.prototype.stopHistory=function(){return this.history.stop()},t.prototype.pushHistoryWithLocationAndRestorationIdentifier=function(t,e){return this.restorationIdentifier=e,this.location=Turbolinks.Location.wrap(t),this.history.push(this.location,this.restorationIdentifier)},t.prototype.replaceHistoryWithLocationAndRestorationIdentifier=function(t,e){return this.restorationIdentifier=e,this.location=Turbolinks.Location.wrap(t),this.history.replace(this.location,this.restorationIdentifier)},t.prototype.historyPoppedToLocationWithRestorationIdentifier=function(t,e){var n;return this.restorationIdentifier=e,this.enabled?(n=this.getRestorationDataForIdentifier(this.restorationIdentifier),this.startVisit(t,"restore",{restorationIdentifier:this.restorationIdentifier,restorationData:n,historyChanged:!0}),this.location=Turbolinks.Location.wrap(t)):this.adapter.pageInvalidated()},t.prototype.getCachedSnapshotForLocation=function(t){var e;return(e=this.cache.get(t))?e.clone():void 0},t.prototype.shouldCacheSnapshot=function(){return this.view.getSnapshot().isCacheable()},t.prototype.cacheSnapshot=function(){var t;return this.shouldCacheSnapshot()?(this.notifyApplicationBeforeCachingSnapshot(),t=this.view.getSnapshot(),this.cache.put(this.lastRenderedLocation,t.clone())):void 0},t.prototype.scrollToAnchor=function(t){var e;return(e=this.view.getElementForAnchor(t))?this.scrollToElement(e):this.scrollToPosition({x:0,y:0})},t.prototype.scrollToElement=function(t){return this.scrollManager.scrollToElement(t)},t.prototype.scrollToPosition=function(t){return this.scrollManager.scrollToPosition(t)},t.prototype.scrollPositionChanged=function(t){return this.getCurrentRestorationData().scrollPosition=t},t.prototype.render=function(t,e){return this.view.render(t,e)},t.prototype.viewInvalidated=function(){return this.adapter.pageInvalidated()},t.prototype.viewWillRender=function(t){return this.notifyApplicationBeforeRender(t)},t.prototype.viewRendered=function(){return this.lastRenderedLocation=this.currentVisit.location,this.notifyApplicationAfterRender()},t.prototype.pageLoaded=function(){return this.lastRenderedLocation=this.location,this.notifyApplicationAfterPageLoad()},t.prototype.clickCaptured=function(){return removeEventListener("click",this.clickBubbled,!1),addEventListener("click",this.clickBubbled,!1)},t.prototype.clickBubbled=function(t){var e,n,i;return this.enabled&&this.clickEventIsSignificant(t)&&(n=this.getVisitableLinkForNode(t.target))&&(i=this.getVisitableLocationForLink(n))&&this.applicationAllowsFollowingLinkToLocation(n,i)?(t.preventDefault(),e=this.getActionForLink(n),this.visit(i,{action:e})):void 0},t.prototype.applicationAllowsFollowingLinkToLocation=function(t,e){return!this.notifyApplicationAfterClickingLinkToLocation(t,e).defaultPrevented},t.prototype.applicationAllowsVisitingLocation=function(t){return!this.notifyApplicationBeforeVisitingLocation(t).defaultPrevented},t.prototype.notifyApplicationAfterClickingLinkToLocation=function(t,e){return Turbolinks.dispatch("turbolinks:click",{target:t,data:{url:e.absoluteURL},cancelable:!0})},t.prototype.notifyApplicationBeforeVisitingLocation=function(t){return Turbolinks.dispatch("turbolinks:before-visit",{data:{url:t.absoluteURL},cancelable:!0})},t.prototype.notifyApplicationAfterVisitingLocation=function(t){return Turbolinks.dispatch("turbolinks:visit",{data:{url:t.absoluteURL}})},t.prototype.notifyApplicationBeforeCachingSnapshot=function(){return Turbolinks.dispatch("turbolinks:before-cache")},t.prototype.notifyApplicationBeforeRender=function(t){return Turbolinks.dispatch("turbolinks:before-render",{data:{newBody:t}})},t.prototype.notifyApplicationAfterRender=function(){return Turbolinks.dispatch("turbolinks:render")},t.prototype.notifyApplicationAfterPageLoad=function(t){return null==t&&(t={}),Turbolinks.dispatch("turbolinks:load",{data:{url:this.location.absoluteURL,timing:t}})},t.prototype.startVisit=function(t,e,n){var i;return null!=(i=this.currentVisit)&&i.cancel(),this.currentVisit=this.createVisit(t,e,n),this.currentVisit.start(),this.notifyApplicationAfterVisitingLocation(t)},t.prototype.createVisit=function(t,e,n){var i,o,r,s,a;return s=(o=null!=n?n:{}).restorationIdentifier,r=o.restorationData,i=o.historyChanged,(a=new Turbolinks.Visit(this,t,e)).restorationIdentifier=null!=s?s:Turbolinks.uuid(),a.restorationData=Turbolinks.copyObject(r),a.historyChanged=i,a.referrer=this.location,a},t.prototype.visitCompleted=function(t){return this.notifyApplicationAfterPageLoad(t.getTimingMetrics())},t.prototype.clickEventIsSignificant=function(t){return!(t.defaultPrevented||t.target.isContentEditable||1<t.which||t.altKey||t.ctrlKey||t.metaKey||t.shiftKey)},t.prototype.getVisitableLinkForNode=function(t){return this.nodeIsVisitable(t)?Turbolinks.closest(t,"a[href]:not([target]):not([download])"):void 0},t.prototype.getVisitableLocationForLink=function(t){var e;return e=new Turbolinks.Location(t.getAttribute("href")),this.locationIsVisitable(e)?e:void 0},t.prototype.getActionForLink=function(t){var e;return null!=(e=t.getAttribute("data-turbolinks-action"))?e:"advance"},t.prototype.nodeIsVisitable=function(t){var e;return!(e=Turbolinks.closest(t,"[data-turbolinks]"))||"false"!==e.getAttribute("data-turbolinks")},t.prototype.locationIsVisitable=function(t){return t.isPrefixedBy(this.view.getRootLocation())&&t.isHTML()},t.prototype.getCurrentRestorationData=function(){return this.getRestorationDataForIdentifier(this.restorationIdentifier)},t.prototype.getRestorationDataForIdentifier=function(t){var e;return null!=(e=this.restorationData)[t]?e[t]:e[t]={}},t}()}.call(this),function(){!function(){var t,e;if((t=e=document.currentScript)&&!e.hasAttribute("data-turbolinks-suppress-warning"))for(;t=t.parentNode;)if(t===document.body)return console.warn("You are loading Turbolinks from a <script> element inside the <body> element. This is probably not what you meant to do!\n\nLoad your application\u2019s JavaScript bundle inside the <head> element instead. <script> elements in <body> are evaluated with each page change.\n\nFor more information, see: https://github.com/turbolinks/turbolinks#working-with-script-elements\n\n\u2014\u2014\nSuppress this warning by adding a `data-turbolinks-suppress-warning` attribute to: %s",e.outerHTML)}()}.call(this),function(){var t,e,n;Turbolinks.start=function(){return e()?(null==Turbolinks.controller&&(Turbolinks.controller=t()),Turbolinks.controller.start()):void 0},e=function(){return null==window.Turbolinks&&(window.Turbolinks=Turbolinks),n()},t=function(){var t;return(t=new Turbolinks.Controller).adapter=new Turbolinks.BrowserAdapter(t),t},(n=function(){return window.Turbolinks===Turbolinks})()&&Turbolinks.start()}.call(this),function(){}.call(this),function(){null==window.Set&&(window.Set=function(){function t(){this.clear()}return t.prototype.clear=function(){return this.values=[]},t.prototype.has=function(t){return-1!==this.values.indexOf(t)},t.prototype.add=function(t){return this.has(t)||this.values.push(t),this},t.prototype["delete"]=function(t){var e;return-1!==(e=this.values.indexOf(t))&&(this.values.splice(e,1),!0)},t.prototype.forEach=function(){var t;return(t=this.values).forEach.apply(t,arguments)},t}())}.call(this),function(t){function i(){}function o(t,e){return function(){t.apply(e,arguments)}}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=[],h(t,this)}function s(n,i){for(;3===n._state;)n=n._value;return 0===n._state?void n._deferreds.push(i):(n._handled=!0,void d(function(){var t=1===n._state?i.onFulfilled:i.onRejected;if(null!==t){var e;try{e=t(n._value)}catch(s){return void u(i.promise,s)}a(i.promise,e)}else(1===n._state?a:u)(i.promise,n._value)}))}function a(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if(e instanceof r)return t._state=3,t._value=e,void l(t);if("function"==typeof n)return void h(o(n,e),t)}t._state=1,t._value=e,l(t)}catch(a){u(t,a)}}function u(t,e){t._state=2,t._value=e,l(t)}function l(t){2===t._state&&0===t._deferreds.length&&setTimeout(function(){t._handled||p(t._value)},1);for(var e=0,n=t._deferreds.length;e<n;e++)s(t,t._deferreds[e]);t._deferreds=null}function c(t,e,n){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof e?e:null,this.promise=n}function h(t,e){var n=!1;try{t(function(t){n||(n=!0,a(e,t))},function(t){n||(n=!0,u(e,t))})}catch(r){if(n)return;n=!0,u(e,r)}}var e=setTimeout,d="function"==typeof setImmediate&&setImmediate||function(t){e(t,1)},p=function(t){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",t)};r.prototype["catch"]=function(t){return this.then(null,t)},r.prototype.then=function(t,e){var n=new r(i);return s(this,new c(t,e,n)),n},r.all=function(t){var a=Array.prototype.slice.call(t);return new r(function(i,o){function r(e,t){try{if(t&&("object"==typeof t||"function"==typeof t)){var n=t.then;if("function"==typeof n)return void n.call(t,function(t){r(e,t)},o)}a[e]=t,0==--s&&i(a)}catch(c){o(c)}}if(0===a.length)return i([]);for(var s=a.length,t=0;t<a.length;t++)r(t,a[t])})},r.resolve=function(e){return e&&"object"==typeof e&&e.constructor===r?e:new r(function(t){t(e)})},r.reject=function(n){return new r(function(t,e){e(n)})},r.race=function(o){return new r(function(t,e){for(var n=0,i=o.length;n<i;n++)o[n].then(t,e)})},r._setImmediateFn=function(t){d=t},r._setUnhandledRejectionFn=function(t){p=t},"undefined"!=typeof module&&module.exports?module.exports=r:t.Promise||(t.Promise=r)}(this),"undefined"==typeof WeakMap&&function(){var i=Object.defineProperty,t=Date.now()%1e9,e=function(){this.name="__st"+(1e9*Math.random()>>>0)+t+++"__"};e.prototype={set:function(t,e){var n=t[this.name];return n&&n[0]===t?n[1]=e:i(t,this.name,{value:[t,e],writable:!0}),this},get:function(t){var e;return(e=t[this.name])&&e[0]===t?e[1]:void 0},"delete":function(t){var e=t[this.name];return!(!e||e[0]!==t)&&(e[0]=e[1]=void 0,!0)},has:function(t){var e=t[this.name];return!!e&&e[0]===t}},window.WeakMap=e}(),function(t){function o(t){x.push(t),w||(w=!0,m(e))}function r(t){return window.ShadowDOMPolyfill&&window.ShadowDOMPolyfill.wrapIfNeeded(t)||t}function e(){w=!1;var t=x;x=[],t.sort(function(t,e){return t.uid_-e.uid_});var n=!1;t.forEach(function(t){var e=t.takeRecords();i(t),e.length&&(t.callback_(e,t),n=!0)}),n&&e()}function i(n){n.nodes_.forEach(function(t){var e=g.get(t);e&&e.forEach(function(t){t.observer===n&&t.removeTransientObservers()})})}function h(t,e){for(var n=t;n;n=n.parentNode){var i=g.get(n);if(i)for(var o=0;o<i.length;o++){var r=i[o],s=r.options;if(n===t||s.subtree){var a=e(s);a&&r.enqueue(a)}}}}function n(t){this.callback_=t,this.nodes_=[],this.records_=[],this.uid_=++A}function s(t,e){this.type=t,this.target=e,this.addedNodes=[],this.removedNodes=[],this.previousSibling=null,this.nextSibling=null,this.attributeName=null,this.attributeNamespace=null,this.oldValue=null}function a(t){var e=new s(t.type,t.target);return e.addedNodes=t.addedNodes.slice(),e.removedNodes=t.removedNodes.slice(),e.previousSibling=t.previousSibling,e.nextSibling=t.nextSibling,e.attributeName=t.attributeName,e.attributeNamespace=t.attributeNamespace,e.oldValue=t.oldValue,e}function d(t,e){return _=new s(t,e)}function p(t){return b||((b=a(_)).oldValue=t,b)}function f(){_=b=void 0}function u(t){return t===b||t===_}function l(t,e){return t===e?t:b&&u(t)?b:null}function c(t,e,n){this.observer=t,this.target=e,this.options=n,this.transientObservedNodes=[]}if(!t.JsMutationObserver){var m,g=new WeakMap;if(/Trident|Edge/.test(navigator.userAgent))m=setTimeout;else if(window.setImmediate)m=window.setImmediate;else{var v=[],y=String(Math.random());window.addEventListener("message",function(t){if(t.data===y){var e=v;v=[],e.forEach(function(t){t()})}}),m=function(t){v.push(t),window.postMessage(y,"*")}}var _,b,w=!1,x=[],A=0;n.prototype={observe:function(t,e){if(t=r(t),!e.childList&&!e.attributes&&!e.characterData||e.attributeOldValue&&!e.attributes||e.attributeFilter&&e.attributeFilter.length&&!e.attributes||e.characterDataOldValue&&!e.characterData)throw new SyntaxError;var n=g.get(t);n||g.set(t,n=[]);for(var i,o=0;o<n.length;o++)if(n[o].observer===this){(i=n[o]).removeListeners(),i.options=e;break}i||(i=new c(this,t,e),n.push(i),this.nodes_.push(t)),i.addListeners()},disconnect:function(){this.nodes_.forEach(function(t){for(var e=g.get(t),n=0;n<e.length;n++){var i=e[n];if(i.observer===this){i.removeListeners(),e.splice(n,1);break}}},this),this.records_=[]},takeRecords:function(){var t=this.records_;return this.records_=[],t}},c.prototype={enqueue:function(t){var e=this.observer.records_,n=e.length;if(0<e.length){var i=l(e[n-1],t);if(i)return void(e[n-1]=i)}else o(this.observer);e[n]=t},addListeners:function(){this.addListeners_(this.target)},addListeners_:function(t){var e=this.options;e.attributes&&t.addEventListener("DOMAttrModified",this,!0),e.characterData&&t.addEventListener("DOMCharacterDataModified",this,!0),e.childList&&t.addEventListener("DOMNodeInserted",this,!0),(e.childList||e.subtree)&&t.addEventListener("DOMNodeRemoved",this,!0)},removeListeners:function(){this.removeListeners_(this.target)},removeListeners_:function(t){var e=this.options;e.attributes&&t.removeEventListener("DOMAttrModified",this,!0),e.characterData&&t.removeEventListener("DOMCharacterDataModified",this,!0),e.childList&&t.removeEventListener("DOMNodeInserted",this,!0),(e.childList||e.subtree)&&t.removeEventListener("DOMNodeRemoved",this,!0)},addTransientObserver:function(t){if(t!==this.target){this.addListeners_(t),this.transientObservedNodes.push(t);var e=g.get(t);e||g.set(t,e=[]),e.push(this)}},removeTransientObservers:function(){var t=this.transientObservedNodes;this.transientObservedNodes=[],t.forEach(function(t){this.removeListeners_(t);for(var e=g.get(t),n=0;n<e.length;n++)if(e[n]===this){e.splice(n,1);break}},this)},handleEvent:function(t){switch(t.stopImmediatePropagation(),t.type){case"DOMAttrModified":var e=t.attrName,n=t.relatedNode.namespaceURI,i=t.target;(r=new d("attributes",i)).attributeName=e,r.attributeNamespace=n;var o=t.attrChange===MutationEvent.ADDITION?null:t.prevValue;h(i,function(t){return!t.attributes||t.attributeFilter&&t.attributeFilter.length&&-1===t.attributeFilter.indexOf(e)&&-1===t.attributeFilter.indexOf(n)?void 0:t.attributeOldValue?p(o):r});break;case"DOMCharacterDataModified":var r=d("characterData",i=t.target);o=t.prevValue;h(i,function(t){return t.characterData?t.characterDataOldValue?p(o):r:void 0});break;case"DOMNodeRemoved":this.addTransientObserver(t.target);case"DOMNodeInserted":var s,a,u=t.target;"DOMNodeInserted"===t.type?(s=[u],a=[]):(s=[],a=[u]);var l=u.previousSibling,c=u.nextSibling;(r=d("childList",t.target.parentNode)).addedNodes=s,r.removedNodes=a,r.previousSibling=l,r.nextSibling=c,h(t.relatedNode,function(t){return t.childList?r:void 0})}f()}},t.JsMutationObserver=n,t.MutationObserver||((t.MutationObserver=n)._isPolyfilled=!0)}}(self),function(){"use strict";if(!window.performance){var t=Date.now();window.performance={now:function(){return Date.now()-t}}}var e,n;if(window.requestAnimationFrame||(window.requestAnimationFrame=(e=window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame)?function(t){return e(function(){t(performance.now())})}:function(t){return window.setTimeout(t,1e3/60)}),window.cancelAnimationFrame||(window.cancelAnimationFrame=window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||function(t){clearTimeout(t)}),!((n=document.createEvent("Event")).initEvent("foo",!0,!0),n.preventDefault(),n.defaultPrevented)){var i=Event.prototype.preventDefault;Event.prototype.preventDefault=function(){this.cancelable&&(i.call(this),Object.defineProperty(this,"defaultPrevented",{get:function(){return!0},configurable:!0}))}}var o=/Trident/.test(navigator.userAgent);if((!window.CustomEvent||o&&"function"!=typeof window.CustomEvent)&&(window.CustomEvent=function(t,e){e=e||{};var n=document.createEvent("CustomEvent");return n.initCustomEvent(t,Boolean(e.bubbles),Boolean(e.cancelable),e.detail),n},window.CustomEvent.prototype=window.Event.prototype),!window.Event||o&&"function"!=typeof window.Event){var r=window.Event;window.Event=function(t,e){e=e||{};var n=document.createEvent("Event");return n.initEvent(t,Boolean(e.bubbles),Boolean(e.cancelable)),n},window.Event.prototype=r.prototype}}(window.WebComponents),window.CustomElements=window.CustomElements||{flags:{}},function(e){var t=e.flags,n=[],i=function(t){n.push(t)},o=function(){n.forEach(function(t){t(e)})};e.addModule=i,e.initializeModules=o,e.hasNative=Boolean(document.registerElement),e.isIE=/Trident/.test(navigator.userAgent),e.useNative=!t.register&&e.hasNative&&!window.ShadowDOMPolyfill&&(!window.HTMLImports||window.HTMLImports.useNative)}(window.CustomElements),window.CustomElements.addModule(function(t){function i(t,e){o(t,function(t){return!!e(t)||void n(t,e)}),n(t,e)}function o(t,e,n){var i=t.firstElementChild;if(!i)for(i=t.firstChild;i&&i.nodeType!==Node.ELEMENT_NODE;)i=i.nextSibling;for(;i;)!0!==e(i,n)&&o(i,e,n),i=i.nextElementSibling;return null}function n(t,e){for(var n=t.shadowRoot;n;)i(n,e),n=n.olderShadowRoot}function e(t,e){a(t,e,[])}function a(t,e,n){if(t=window.wrap(t),!(0<=n.indexOf(t))){n.push(t);for(var i,o=t.querySelectorAll("link[rel="+u+"]"),r=0,s=o.length;r<s&&(i=o[r]);r++)i["import"]&&a(i["import"],e,n);e(t)}}var u=window.HTMLImports?window.HTMLImports.IMPORT_LINK_TYPE:"none";t.forDocumentTree=e,t.forSubtree=i}),window.CustomElements.addModule(function(n){function s(t,e){return i(t,e)||o(t,e)}function i(t,e){return!!n.upgrade(t,e)||void(e&&a(t))}function o(t,e){_(t,function(t){return!!i(t,e)||void 0})}function e(t){A.push(t),x||(x=!0,setTimeout(r))}function r(){x=!1;for(var t,e=A,n=0,i=e.length;n<i&&(t=e[n]);n++)t();A=[]}function a(t){w?e(function(){u(t)}):u(t)}function u(t){t.__upgraded__&&!t.__attached&&(t.__attached=!0,t.attachedCallback&&t.attachedCallback())}function l(t){c(t),_(t,function(t){c(t)})}function c(t){w?e(function(){h(t)}):h(t)}function h(t){t.__upgraded__&&t.__attached&&(t.__attached=!1,t.detachedCallback&&t.detachedCallback())}function d(t){for(var e=t,n=window.wrap(document);e;){if(e==n)return!0;e=e.parentNode||e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&e.host}}function t(t){if(t.shadowRoot&&!t.shadowRoot.__watched){y.dom&&console.log("watching shadow-root for: ",t.localName);for(var e=t.shadowRoot;e;)m(e),e=e.olderShadowRoot}}function p(t,e){if(y.dom){var n=e[0];if(n&&"childList"===n.type&&n.addedNodes&&n.addedNodes){for(var i=n.addedNodes[0];i&&i!==document&&!i.host;)i=i.parentNode;var o=i&&(i.URL||i._URL||i.host&&i.host.localName)||"";o=o.split("/?").shift().split("/").pop()}console.group("mutations (%d) [%s]",e.length,o||"")}var r=d(t);e.forEach(function(t){"childList"===t.type&&(E(t.addedNodes,function(t){t.localName&&s(t,r)}),E(t.removedNodes,function(t){t.localName&&l(t)}))}),y.dom&&console.groupEnd()}function f(t){for((t=window.wrap(t))||(t=window.wrap(document));t.parentNode;)t=t.parentNode;var e=t.__observer;e&&(p(t,e.takeRecords()),r())}function m(t){if(!t.__observer){var e=new MutationObserver(p.bind(this,t));e.observe(t,{childList:!0,subtree:!0}),t.__observer=e}}function g(t){t=window.wrap(t),y.dom&&console.group("upgradeDocument: ",t.baseURI.split("/").pop()),s(t,t===window.wrap(document)),m(t),y.dom&&console.groupEnd()}function v(t){b(t,g)}var y=n.flags,_=n.forSubtree,b=n.forDocumentTree,w=window.MutationObserver._isPolyfilled&&y["throttle-attached"];n.hasPolyfillMutations=w,n.hasThrottledAttached=w;var x=!1,A=[],E=Array.prototype.forEach.call.bind(Array.prototype.forEach),C=Element.prototype.createShadowRoot;C&&(Element.prototype.createShadowRoot=function(){var t=C.call(this);return window.CustomElements.watchShadow(this),t}),n.watchShadow=t,n.upgradeDocumentTree=v,n.upgradeDocument=g,n.upgradeSubtree=o,n.upgradeAll=s,n.attached=a,n.takeRecords=f}),window.CustomElements.addModule(function(o){function t(t,e){if("template"===t.localName&&window.HTMLTemplateElement&&HTMLTemplateElement.decorate&&HTMLTemplateElement.decorate(t),!t.__upgraded__&&t.nodeType===Node.ELEMENT_NODE){var n=t.getAttribute("is"),i=o.getRegisteredDefinition(t.localName)||o.getRegisteredDefinition(n);if(i&&(n&&i.tag==t.localName||!n&&!i["extends"]))return r(t,i,e)}}function r(t,e,n){return a.upgrade&&console.group("upgrade:",t.localName),e.is&&t.setAttribute("is",e.is),i(t,e),t.__upgraded__=!0,s(t),n&&o.attached(t),o.upgradeSubtree(t,n),a.upgrade&&console.groupEnd(),t}function i(t,e){Object.__proto__||n(t,e.prototype,e["native"]),t.__proto__=e.prototype}function n(t,e,n){for(var i={},o=e;o!==n&&o!==HTMLElement.prototype;){for(var r,s=Object.getOwnPropertyNames(o),a=0;r=s[a];a++)i[r]||(Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(o,r)),i[r]=1);o=Object.getPrototypeOf(o)}}function s(t){t.createdCallback&&t.createdCallback()}var a=o.flags;o.upgrade=t,o.upgradeWithDefinition=r,o.implementPrototype=i}),window.CustomElements.addModule(function(i){function t(t,e){var n=e||{};if(!t)throw new Error("document.registerElement: first argument `name` must not be empty");if(t.indexOf("-")<0)throw new Error("document.registerElement: first argument ('name') must contain a dash ('-'). Argument provided was '"+String(t)+"'.");if(s(t))throw new Error("Failed to execute 'registerElement' on 'Document': Registration failed for type '"+String(t)+"'. The type name is invalid.");if(c(t))throw new Error("DuplicateDefinitionError: a type with name '"+String(t)+"' is already registered");return n.prototype||(n.prototype=Object.create(HTMLElement.prototype)),n.__name=t.toLowerCase(),n["extends"]&&(n["extends"]=n["extends"].toLowerCase()),n.lifecycle=n.lifecycle||{},n.ancestry=a(n["extends"]),u(n),l(n),o(n.prototype),h(n.__name,n),n.ctor=d(n),n.ctor.prototype=n.prototype,n.prototype.constructor=n.ctor,i.ready&&g(document),n.ctor}function o(t){if(!t.setAttribute._polyfilled){var n=t.setAttribute;t.setAttribute=function(t,e){r.call(this,t,e,n)};var e=t.removeAttribute;t.removeAttribute=function(t){r.call(this,t,null,e)},t.setAttribute._polyfilled=!0}}function r(t,e,n){t=t.toLowerCase();var i=this.getAttribute(t);n.apply(this,arguments);var o=this.getAttribute(t);this.attributeChangedCallback&&o!==i&&this.attributeChangedCallback(t,i,o)}function s(t){for(var e=0;e<w.length;e++)if(t===w[e])return!0}function a(t){var e=c(t);return e?a(e["extends"]).concat([e]):[]}function u(t){for(var e,n=t["extends"],i=0;e=t.ancestry[i];i++)n=e.is&&e.tag;t.tag=n||t.__name,n&&(t.is=t.__name)}function l(t){if(!Object.__proto__){var e=HTMLElement.prototype;if(t.is){var n=document.createElement(t.tag);e=Object.getPrototypeOf(n)}for(var i,o=t.prototype,r=!1;o;)o==e&&(r=!0),(i=Object.getPrototypeOf(o))&&(o.__proto__=i),o=i;r||console.warn(t.tag+" prototype not found in prototype chain for "+t.is),t["native"]=e}}function e(t){return y(E(t.tag),t)}function c(t){return t?x[t.toLowerCase()]:void 0}function h(t,e){x[t]=e}function d(t){return function(){return e(t)}}function n(t,e,n){return t===A?p(e,n):C(t,e)}function p(t,e){t&&(t=t.toLowerCase()),e&&(e=e.toLowerCase());var n,i=c(e||t);if(i){if(t==i.tag&&e==i.is)return new i.ctor;if(!e&&!i.is)return new i.ctor}return e?(n=p(t)).setAttribute("is",e):(n=E(t),0<=t.indexOf("-")&&_(n,HTMLElement)),n}function f(t,e){var n=t[e];t[e]=function(){var t=n.apply(this,arguments);return v(t),t}}var m,g=(i.isIE,i.upgradeDocumentTree),v=i.upgradeAll,y=i.upgradeWithDefinition,_=i.implementPrototype,b=i.useNative,w=["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"],x={},A="http://www.w3.org/1999/xhtml",E=document.createElement.bind(document),C=document.createElementNS.bind(document);m=Object.__proto__||b?function(t,e){return t instanceof e}:function(t,e){if(t instanceof e)return!0;for(var n=t;n;){if(n===e.prototype)return!0;n=n.__proto__}return!1},f(Node.prototype,"cloneNode"),f(document,"importNode"),document.registerElement=t,document.createElement=p,document.createElementNS=n,i.registry=x,i["instanceof"]=m,i.reservedTagList=w,i.getRegisteredDefinition=c,document.register=document.registerElement}),function(t){function e(){r(window.wrap(document)),window.CustomElements.ready=!0,(window.requestAnimationFrame||function(t){setTimeout(t,16)})(function(){setTimeout(function(){window.CustomElements.readyTime=Date.now(),window.HTMLImports&&(window.CustomElements.elapsed=window.CustomElements.readyTime-window.HTMLImports.readyTime),document.dispatchEvent(new CustomEvent("WebComponentsReady",{bubbles:!0}))})})}var n=t.useNative,i=t.initializeModules;if(t.isIE,n){var o=function(){};t.watchShadow=o,t.upgrade=o,t.upgradeAll=o,t.upgradeDocumentTree=o,t.upgradeSubtree=o,t.takeRecords=o,t["instanceof"]=function(t,e){return t instanceof e}}else i();var r=t.upgradeDocumentTree,s=t.upgradeDocument;if(window.wrap||(window.ShadowDOMPolyfill?(window.wrap=window.ShadowDOMPolyfill.wrapIfNeeded,window.unwrap=window.ShadowDOMPolyfill.unwrapIfNeeded):window.wrap=window.unwrap=function(t){return t}),window.HTMLImports&&(window.HTMLImports.__importsParsingHook=function(t){t["import"]&&s(wrap(t["import"]))}),"complete"===document.readyState||t.flags.eager)e();else if("interactive"!==document.readyState||window.attachEvent||window.HTMLImports&&!window.HTMLImports.ready){var a=window.HTMLImports&&!window.HTMLImports.ready?"HTMLImportsLoaded":"DOMContentLoaded";window.addEventListener(a,e)}else e()}(window.CustomElements),function(){}.call(this),function(){var t=this;(function(){(function(){this.Trix={VERSION:"0.11.1",ZERO_WIDTH_SPACE:"\ufeff",NON_BREAKING_SPACE:"\xa0",OBJECT_REPLACEMENT_CHARACTER:"\ufffc",config:{}}}).call(this)}).call(t);var k=t.Trix;(function(){(function(){k.BasicObject=function(){function t(){}var s,a,i;return t.proxyMethod=function(t){var n,i,e,o,r;return e=a(t),n=e.name,o=e.toMethod,r=e.toProperty,i=e.optional,this.prototype[n]=function(){var t,e;return t=null!=o?i?"function"==typeof this[o]?this[o]():void 0:this[o]():null!=r?this[r]:void 0,i?null!=(e=null!=t?t[n]:void 0)?s.call(e,t,arguments):void 0:(e=t[n],s.call(e,t,arguments))}},a=function(t){var e,n;if(!(n=t.match(i)))throw new Error("can't parse @proxyMethod expression: "+t);return e={name:n[4]},null!=n[2]?e.toMethod=n[1]:e.toProperty=n[1],null!=n[3]&&(e.optional=!0),e},s=Function.prototype.apply,i=/^(.+?)(\(\))?(\?)?\.(.+?)$/,t}()}).call(this),function(){var i=function(t,e){function n(){this.constructor=t}for(var i in e)o.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty;k.Object=function(t){function e(){this.id=++n}var n;return i(e,t),n=0,e.fromJSONString=function(t){return this.fromJSON(JSON.parse(t))},e.prototype.hasSameConstructorAs=function(t){return this.constructor===(null!=t?t.constructor:void 0)},e.prototype.isEqualTo=function(t){return this===t},e.prototype.inspect=function(){var t,i,o;return t=function(){var t,e,n;for(i in n=[],e=null!=(t=this.contentsForInspection())?t:{})o=e[i],n.push(i+"="+o);return n}.call(this),"#<"+this.constructor.name+":"+this.id+(t.length?" "+t.join(", "):"")+">"},e.prototype.contentsForInspection=function(){},e.prototype.toJSONString=function(){return JSON.stringify(this)},e.prototype.toUTF16String=function(){return k.UTF16String.box(this)},e.prototype.getCacheKey=function(){return this.id.toString()},e}(k.BasicObject)}.call(this),function(){k.extend=function(t){var e,n;for(e in t)n=t[e],this[e]=n;return this}}.call(this),function(){k.extend({defer:function(t){return setTimeout(t,1)}})}.call(this),function(){var a,s;k.extend({normalizeSpaces:function(t){return t.replace(RegExp(""+k.ZERO_WIDTH_SPACE,"g"),"").replace(RegExp(""+k.NON_BREAKING_SPACE,"g")," ")},normalizeNewlines:function(t){return t.replace(/\r\n/g,"\n")},breakableWhitespacePattern:RegExp("[^\\S"+k.NON_BREAKING_SPACE+"]"),squishBreakableWhitespace:function(t){
return t.replace(RegExp(""+k.breakableWhitespacePattern.source,"g")," ").replace(/\ {2,}/g," ")},summarizeStringChange:function(t,e){var n,i,o,r;return t=k.UTF16String.box(t),(e=k.UTF16String.box(e)).length<t.length?(r=(i=s(t,e))[0],n=i[1]):(n=(o=s(e,t))[0],r=o[1]),{added:n,removed:r}}}),s=function(t,e){var n,i,o,r,s;return t.isEqualTo(e)?["",""]:(o=(r=(i=a(t,e)).utf16String.length)?(s=i.offset,n=t.codepoints.slice(0,s).concat(t.codepoints.slice(s+r)),a(e,k.UTF16String.fromCodepoints(n))):a(e,t),[i.utf16String.toString(),o.utf16String.toString()])},a=function(t,e){var n,i,o;for(n=0,i=t.length,o=e.length;n<i&&t.charAt(n).isEqualTo(e.charAt(n));)n++;for(;n+1<i&&t.charAt(i-1).isEqualTo(e.charAt(o-1));)i--,o--;return{utf16String:t.slice(n,i),offset:n}}}.call(this),function(){k.extend({copyObject:function(t){var e,n,i;for(e in null==t&&(t={}),n={},t)i=t[e],n[e]=i;return n},objectsAreEqual:function(t,e){var n;if(null==t&&(t={}),null==e&&(e={}),Object.keys(t).length!==Object.keys(e).length)return!1;for(n in t)if(t[n]!==e[n])return!1;return!0}})}.call(this),function(){var o=[].slice;k.extend({arraysAreEqual:function(t,e){var n,i,o;if(null==t&&(t=[]),null==e&&(e=[]),t.length!==e.length)return!1;for(i=n=0,o=t.length;n<o;i=++n)if(t[i]!==e[i])return!1;return!0},arrayStartsWith:function(t,e){return null==t&&(t=[]),null==e&&(e=[]),k.arraysAreEqual(t.slice(0,e.length),e)},spliceArray:function(t){var e,n,i;return n=t,e=2<=arguments.length?o.call(arguments,1):[],(i=n.slice(0)).splice.apply(i,e),i},summarizeArrayChange:function(t,e){var n,i,o,r,s,a,u,l,c,h,d;for(null==t&&(t=[]),null==e&&(e=[]),n=[],h=[],o=new Set,r=0,u=t.length;r<u;r++)d=t[r],o.add(d);for(i=new Set,s=0,l=e.length;s<l;s++)d=e[s],i.add(d),o.has(d)||n.push(d);for(a=0,c=t.length;a<c;a++)d=t[a],i.has(d)||h.push(d);return{added:n,removed:h}}})}.call(this),function(){var t,e,o,n;o=n=e=t=null,k.extend({getAllAttributeNames:function(){return null!=t?t:t=k.getTextAttributeNames().concat(k.getBlockAttributeNames())},getBlockConfig:function(t){return k.config.blockAttributes[t]},getBlockAttributeNames:function(){return null!=e?e:e=Object.keys(k.config.blockAttributes)},getTextConfig:function(t){return k.config.textAttributes[t]},getTextAttributeNames:function(){return null!=n?n:n=Object.keys(k.config.textAttributes)},getListAttributeNames:function(){var n,i;return null!=o?o:o=function(){var t,e;for(n in e=[],t=k.config.blockAttributes)null!=(i=t[n].listAttribute)&&e.push(i);return e}()}})}.call(this),function(){var p,n,t,e,i,o=[].indexOf||function(t){for(var e=0,n=this.length;e<n;e++)if(e in this&&this[e]===t)return e;return-1};p=document.documentElement,n=null!=(t=null!=(e=null!=(i=p.matchesSelector)?i:p.webkitMatchesSelector)?e:p.msMatchesSelector)?t:p.mozMatchesSelector,k.extend({handleEvent:function(t,e){var n,i,o,r,s,a,u,l,c,h,d;return s=(u=null!=e?e:{}).onElement,r=u.matchingSelector,d=u.withCallback,o=u.inPhase,a=u.preventDefault,c=u.times,n=null!=s?s:p,l=r,d,h="capturing"===o,(i=function(t){var e;return null!=c&&0==--c&&i.destroy(),null!=(e=k.findClosestElementFromNode(t.target,{matchingSelector:l}))&&(null!=d&&d.call(e,t,e),a)?t.preventDefault():void 0}).destroy=function(){return n.removeEventListener(t,i,h)},n.addEventListener(t,i,h),i},handleEventOnce:function(t,e){return null==e&&(e={}),e.times=1,k.handleEvent(t,e)},triggerEvent:function(t,e){var n,i,o,r,s,a,u;return a=(u=null!=e?e:{}).onElement,i=u.bubbles,o=u.cancelable,n=u.attributes,r=null!=a?a:p,i=!1!==i,o=!1!==o,(s=document.createEvent("Events")).initEvent(t,i,o),null!=n&&k.extend.call(s,n),r.dispatchEvent(s)},elementMatchesSelector:function(t,e){return 1===(null!=t?t.nodeType:void 0)?n.call(t,e):void 0},findClosestElementFromNode:function(t,e){var n,i,o;for(n=(i=null!=e?e:{}).matchingSelector,o=i.untilNode;null!=t&&t.nodeType!==Node.ELEMENT_NODE;)t=t.parentNode;if(null!=t){if(null==n)return t;if(t.closest&&null==o)return t.closest(n);for(;t&&t!==o;){if(k.elementMatchesSelector(t,n))return t;t=t.parentNode}}},findInnerElement:function(t){for(;null!=t?t.firstElementChild:void 0;)t=t.firstElementChild;return t},innerElementIsActive:function(t){return document.activeElement!==t&&k.elementContainsNode(t,document.activeElement)},elementContainsNode:function(t,e){if(t&&e)for(;e;){if(e===t)return!0;e=e.parentNode}},findNodeFromContainerAndOffset:function(t,e){var n;if(t)return t.nodeType===Node.TEXT_NODE?t:0===e?null!=(n=t.firstChild)?n:t:t.childNodes.item(e-1)},findElementFromContainerAndOffset:function(t,e){var n;return n=k.findNodeFromContainerAndOffset(t,e),k.findClosestElementFromNode(n)},findChildIndexOfNode:function(t){var e;if(null!=t?t.parentNode:void 0){for(e=0;t=t.previousSibling;)e++;return e}},walkTree:function(t,e){var n,i,o,r,s;return i=(o=null!=e?e:{}).onlyNodesOfType,r=o.usingFilter,n=o.expandEntityReferences,s=function(){switch(i){case"element":return NodeFilter.SHOW_ELEMENT;case"text":return NodeFilter.SHOW_TEXT;case"comment":return NodeFilter.SHOW_COMMENT;default:return NodeFilter.SHOW_ALL}}(),document.createTreeWalker(t,s,null!=r?r:null,!0===n)},tagName:function(t){var e;return null!=t&&null!=(e=t.tagName)?e.toLowerCase():void 0},makeElement:function(t,e){var n,i,o,r,s,a,u,l,c,h;if(null==e&&(e={}),"object"==typeof t?t=(e=t).tagName:e={attributes:e},i=document.createElement(t),null!=e.editable&&(null==e.attributes&&(e.attributes={}),e.attributes.contenteditable=e.editable),e.attributes)for(r in a=e.attributes)h=a[r],i.setAttribute(r,h);if(e.style)for(r in u=e.style)h=u[r],i.style[r]=h;if(e.data)for(r in l=e.data)h=l[r],i.dataset[r]=h;if(e.className)for(o=0,s=(c=e.className.split(" ")).length;o<s;o++)n=c[o],i.classList.add(n);return e.textContent&&(i.textContent=e.textContent),i},getBlockTagNames:function(){var n,i;return null!=k.blockTagNames?k.blockTagNames:k.blockTagNames=function(){var t,e;for(n in e=[],t=k.config.blockAttributes)i=t[n],e.push(i.tagName);return e}()},nodeIsBlockContainer:function(t){return k.nodeIsBlockStartComment(null!=t?t.firstChild:void 0)},nodeProbablyIsBlockContainer:function(t){var e,n;return e=k.tagName(t),0<=o.call(k.getBlockTagNames(),e)&&(n=k.tagName(t.firstChild),o.call(k.getBlockTagNames(),n)<0)},nodeIsBlockStart:function(t,e){return(null!=e?e:{strict:!0}).strict?k.nodeIsBlockStartComment(t):k.nodeIsBlockStartComment(t)||!k.nodeIsBlockStartComment(t.firstChild)&&k.nodeProbablyIsBlockContainer(t)},nodeIsBlockStartComment:function(t){return k.nodeIsCommentNode(t)&&"block"===(null!=t?t.data:void 0)},nodeIsCommentNode:function(t){return(null!=t?t.nodeType:void 0)===Node.COMMENT_NODE},nodeIsCursorTarget:function(t){return t?k.nodeIsTextNode(t)?t.data===k.ZERO_WIDTH_SPACE:k.nodeIsCursorTarget(t.firstChild):void 0},nodeIsAttachmentElement:function(t){return k.elementMatchesSelector(t,k.AttachmentView.attachmentSelector)},nodeIsEmptyTextNode:function(t){return k.nodeIsTextNode(t)&&""===(null!=t?t.data:void 0)},nodeIsTextNode:function(t){return(null!=t?t.nodeType:void 0)===Node.TEXT_NODE}})}.call(this),function(){var e,n,u,i,l;e=k.copyObject,i=k.objectsAreEqual,k.extend({normalizeRange:u=function(t){var e;if(null!=t)return Array.isArray(t)||(t=[t,t]),[n(t[0]),n(null!=(e=t[1])?e:t[0])]},rangeIsCollapsed:function(t){var e,n,i;if(null!=t)return i=(n=u(t))[0],e=n[1],l(i,e)},rangesAreEqual:function(t,e){var n,i,o,r,s,a;if(null!=t&&null!=e)return i=(o=u(t))[0],n=o[1],a=(r=u(e))[0],s=r[1],l(i,a)&&l(n,s)}}),n=function(t){return"number"==typeof t?t:e(t)},l=function(t,e){return"number"==typeof t?t===e:i(t,e)}}.call(this),function(){var l,n,c,h;l={extendsTagName:"div",css:"%t { display: block; }"},k.registerElement=function(t,e){var n,i,o,r,s,a,u;return null==e&&(e={}),t=t.toLowerCase(),r=null!=(u=(s=h(e)).extendsTagName)?u:l.extendsTagName,delete s.extendsTagName,i=s.defaultCSS,delete s.defaultCSS,null!=i&&r===l.extendsTagName?i+="\n"+l.css:i=l.css,c(i,t),(o=Object.getPrototypeOf(document.createElement(r))).__super__=o,a=Object.create(o,s),n=document.registerElement(t,{prototype:a}),Object.defineProperty(a,"constructor",{value:n}),n},c=function(t,e){return n(e).textContent=t.replace(/%t/g,e)},n=function(t){var e;return(e=document.createElement("style")).setAttribute("type","text/css"),e.setAttribute("data-tag-name",t.toLowerCase()),document.head.insertBefore(e,document.head.firstChild),e},h=function(t){var e,n,i;for(e in n={},t)i=t[e],n[e]="function"==typeof i?{value:i}:i;return n}}.call(this),function(){var n,e;k.extend({getDOMSelection:function(){var t;return 0<(t=window.getSelection()).rangeCount?t:void 0},getDOMRange:function(){var t,e;return(t=null!=(e=k.getDOMSelection())?e.getRangeAt(0):void 0)&&!n(t)?t:void 0},setDOMRange:function(t){var e;return(e=window.getSelection()).removeAllRanges(),e.addRange(t),k.selectionChangeObserver.update()}}),n=function(t){return e(t.startContainer)||e(t.endContainer)},e=function(t){return!Object.getPrototypeOf(t)}}.call(this),function(){}.call(this),function(){var s,u=function(t,e){function n(){this.constructor=t}for(var i in e)o.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty;s=k.arraysAreEqual,k.Hash=function(t){function e(t){null==t&&(t={}),this.values=r(t),e.__super__.constructor.apply(this,arguments)}var a,r,n,i,o;return u(e,t),e.fromCommonAttributesOfObjects=function(t){var e,n,i,o,r,s;if(null==t&&(t=[]),!t.length)return new this;for(i=(e=a(t[0])).getKeys(),n=0,o=(s=t.slice(1)).length;n<o;n++)r=s[n],i=e.getKeysCommonToHash(a(r)),e=e.slice(i);return e},e.box=function(t){return a(t)},e.prototype.add=function(t,e){return this.merge(i(t,e))},e.prototype.remove=function(t){return new k.Hash(r(this.values,t))},e.prototype.get=function(t){return this.values[t]},e.prototype.has=function(t){return t in this.values},e.prototype.merge=function(t){return new k.Hash(n(this.values,o(t)))},e.prototype.slice=function(t){var e,n,i,o;for(o={},e=0,i=t.length;e<i;e++)n=t[e],this.has(n)&&(o[n]=this.values[n]);return new k.Hash(o)},e.prototype.getKeys=function(){return Object.keys(this.values)},e.prototype.getKeysCommonToHash=function(t){var e,n,i,o,r;for(t=a(t),r=[],e=0,i=(o=this.getKeys()).length;e<i;e++)n=o[e],this.values[n]===t.values[n]&&r.push(n);return r},e.prototype.isEqualTo=function(t){return s(this.toArray(),a(t).toArray())},e.prototype.isEmpty=function(){return 0===this.getKeys().length},e.prototype.toArray=function(){var e,n,i;return(null!=this.array?this.array:this.array=function(){var t;for(e in n=[],t=this.values)i=t[e],n.push(e,i);return n}.call(this)).slice(0)},e.prototype.toObject=function(){return r(this.values)},e.prototype.toJSON=function(){return this.toObject()},e.prototype.contentsForInspection=function(){return{values:JSON.stringify(this.values)}},i=function(t,e){var n;return(n={})[t]=e,n},n=function(t,e){var n,i,o;for(n in i=r(t),e)o=e[n],i[n]=o;return i},r=function(t,e){var n,i,o,r,s;for(r={},n=0,o=(s=Object.keys(t).sort()).length;n<o;n++)(i=s[n])!==e&&(r[i]=t[i]);return r},a=function(t){return t instanceof k.Hash?t:new k.Hash(t)},o=function(t){return t instanceof k.Hash?t.values:t},e}(k.Object)}.call(this),function(){k.ObjectGroup=function(){function t(t,e){var n,i;this.objects=null!=t?t:[],i=e.depth,(n=e.asTree)&&(this.depth=i,this.objects=this.constructor.groupObjects(this.objects,{asTree:n,depth:this.depth+1}))}return t.groupObjects=function(t,e){var n,i,o,r,s,a,u,l,c;for(null==t&&(t=[]),o=(c=null!=e?e:{}).depth,(n=c.asTree)&&null==o&&(o=0),l=[],s=0,a=t.length;s<a;s++){if(u=t[s],r){if(("function"==typeof u.canBeGrouped?u.canBeGrouped(o):void 0)&&("function"==typeof(i=r[r.length-1]).canBeGroupedWith?i.canBeGroupedWith(u,o):void 0)){r.push(u);continue}l.push(new this(r,{depth:o,asTree:n})),r=null}("function"==typeof u.canBeGrouped?u.canBeGrouped(o):void 0)?r=[u]:l.push(u)}return r&&l.push(new this(r,{depth:o,asTree:n})),l},t.prototype.getObjects=function(){return this.objects},t.prototype.getDepth=function(){return this.depth},t.prototype.getCacheKey=function(){var t,e,n,i,o;for(e=["objectGroup"],t=0,n=(o=this.getObjects()).length;t<n;t++)i=o[t],e.push(i.getCacheKey());return e.join("/")},t}()}.call(this),function(){var n=function(t,e){function n(){this.constructor=t}for(var i in e)o.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty;k.ObjectMap=function(t){function e(t){var e,n,i,o,r;for(null==t&&(t=[]),this.objects={},i=0,o=t.length;i<o;i++)r=t[i],n=JSON.stringify(r),null==(e=this.objects)[n]&&(e[n]=r)}return n(e,t),e.prototype.find=function(t){var e;return e=JSON.stringify(t),this.objects[e]},e}(k.BasicObject)}.call(this),function(){k.ElementStore=function(){function t(t){this.reset(t)}var i;return t.prototype.add=function(t){var e;return e=i(t),this.elements[e]=t},t.prototype.remove=function(t){var e,n;return e=i(t),(n=this.elements[e])?(delete this.elements[e],n):void 0},t.prototype.reset=function(t){var e,n,i;for(null==t&&(t=[]),this.elements={},n=0,i=t.length;n<i;n++)e=t[n],this.add(e);return t},i=function(t){return t.dataset.trixStoreKey},t}()}.call(this),function(){}.call(this),function(){var n=function(t,e){function n(){this.constructor=t}for(var i in e)o.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty;k.Operation=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.isPerforming=function(){return!0===this.performing},e.prototype.hasPerformed=function(){return!0===this.performed},e.prototype.hasSucceeded=function(){return this.performed&&this.succeeded},e.prototype.hasFailed=function(){return this.performed&&!this.succeeded},e.prototype.getPromise=function(){return null!=this.promise?this.promise:this.promise=new Promise((o=this,function(n,i){return o.performing=!0,o.perform(function(t,e){return o.succeeded=t,o.performing=!1,o.performed=!0,o.succeeded?n(e):i(e)})}));var o},e.prototype.perform=function(t){return t(!1)},e.prototype.release=function(){var t;return null!=(t=this.promise)&&"function"==typeof t.cancel&&t.cancel(),this.promise=null,this.performing=null,this.performed=null,this.succeeded=null},e.proxyMethod("getPromise().then"),e.proxyMethod("getPromise().catch"),e}(k.BasicObject)}.call(this),function(){var t,e,n,i,o,r=function(t,e){function n(){this.constructor=t}for(var i in e)s.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},s={}.hasOwnProperty;k.UTF16String=function(t){function e(t,e){this.ucs2String=t,this.codepoints=e,this.length=this.codepoints.length,this.ucs2Length=this.ucs2String.length}return r(e,t),e.box=function(t){return null==t&&(t=""),t instanceof this?t:this.fromUCS2String(null!=t?t.toString():void 0)},e.fromUCS2String=function(t){return new this(t,i(t))},e.fromCodepoints=function(t){return new this(o(t),t)},e.prototype.offsetToUCS2Offset=function(t){return o(this.codepoints.slice(0,Math.max(0,t))).length},e.prototype.offsetFromUCS2Offset=function(t){return i(this.ucs2String.slice(0,Math.max(0,t))).length},e.prototype.slice=function(){var t;return this.constructor.fromCodepoints((t=this.codepoints).slice.apply(t,arguments))},e.prototype.charAt=function(t){return this.slice(t,t+1)},e.prototype.isEqualTo=function(t){return this.constructor.box(t).ucs2String===this.ucs2String},e.prototype.toJSON=function(){return this.ucs2String},e.prototype.getCacheKey=function(){return this.ucs2String},e.prototype.toString=function(){return this.ucs2String},e}(k.BasicObject),t=1===("function"==typeof Array.from?Array.from("\ud83d\udc7c").length:void 0),e=null!=("function"==typeof" ".codePointAt?" ".codePointAt(0):void 0),n=" \ud83d\udc7c"===("function"==typeof String.fromCodePoint?String.fromCodePoint(32,128124):void 0),i=t&&e?function(t){return Array.from(t).map(function(t){return t.codePointAt(0)})}:function(t){var e,n,i,o,r;for(o=[],e=0,i=t.length;e<i;)55296<=(r=t.charCodeAt(e++))&&r<=56319&&e<i&&(56320==(64512&(n=t.charCodeAt(e++)))?r=((1023&r)<<10)+(1023&n)+65536:e--),o.push(r);return o},o=n?function(t){return String.fromCodePoint.apply(String,t)}:function(i){var o,r;return function(){var t,e,n;for(n=[],t=0,e=i.length;t<e;t++)r=i[t],o="",65535<r&&(r-=65536,o+=String.fromCharCode(r>>>10&1023|55296),r=56320|1023&r),n.push(o+String.fromCharCode(r));return n}().join("")}}.call(this),function(){}.call(this),function(){}.call(this),function(){k.config.lang={bold:"Bold",bullets:"Bullets","byte":"Byte",bytes:"Bytes",captionPlaceholder:"Add a caption\u2026",code:"Code",heading1:"Heading",indent:"Increase Level",italic:"Italic",link:"Link",numbers:"Numbers",outdent:"Decrease Level",quote:"Quote",redo:"Redo",remove:"Remove",strike:"Strikethrough",undo:"Undo",unlink:"Unlink",urlPlaceholder:"Enter a URL\u2026",GB:"GB",KB:"KB",MB:"MB",PB:"PB",TB:"TB"}}.call(this),function(){k.config.css={attachment:"attachment",attachmentProgress:"attachment__progress",attachmentName:"attachment__name",attachmentSize:"attachment__size",attachmentRemove:"attachment__remove",attachmentCaption:"attachment__caption",attachmentCaptionEditor:"attachment__caption-editor"}}.call(this),function(){var e;k.config.blockAttributes=e={"default":{tagName:"div",parse:!1},quote:{tagName:"blockquote",nestable:!0},heading1:{tagName:"h1",terminal:!0,breakOnReturn:!0,group:!1},code:{tagName:"pre",terminal:!0,text:{plaintext:!0}},bulletList:{tagName:"ul",parse:!1},bullet:{tagName:"li",listAttribute:"bulletList",group:!1,nestable:!0,test:function(t){return k.tagName(t.parentNode)===e[this.listAttribute].tagName}},numberList:{tagName:"ol",parse:!1},number:{tagName:"li",listAttribute:"numberList",group:!1,nestable:!0,test:function(t){return k.tagName(t.parentNode)===e[this.listAttribute].tagName}}}}.call(this),function(){var i,o;i=k.config.lang,o=[i.bytes,i.KB,i.MB,i.GB,i.TB,i.PB],k.config.fileSize={prefix:"IEC",precision:2,formatter:function(t){var e,n;switch(t){case 0:return"0 "+i.bytes;case 1:return"1 "+i["byte"];default:return e=function(){switch(this.prefix){case"SI":return 1e3;case"IEC":return 1024}}.call(this),n=Math.floor(Math.log(t)/Math.log(e)),(t/Math.pow(e,n)).toFixed(this.precision).replace(/0*$/,"").replace(/\.$/,"")+" "+o[n]}}}}.call(this),function(){k.config.textAttributes={bold:{tagName:"strong",inheritable:!0,parser:function(t){var e;return"bold"===(e=window.getComputedStyle(t)).fontWeight||600<=e.fontWeight}},italic:{tagName:"em",inheritable:!0,parser:function(t){return"italic"===window.getComputedStyle(t).fontStyle}},href:{groupTagName:"a",parser:function(t){var e,n;return n="a:not("+k.AttachmentView.attachmentSelector+")",(e=k.findClosestElementFromNode(t,{matchingSelector:n}))?e.getAttribute("href"):void 0}},strike:{tagName:"del",inheritable:!0},frozen:{style:{backgroundColor:"highlight"}}}}.call(this),function(){var _,b,w,x,A;A="[data-trix-serialize=false]",x=["contenteditable","data-trix-id","data-trix-store-key","data-trix-mutable","data-trix-placeholder","tabindex"],w="["+(b="data-trix-serialized-attributes")+"]",_=new RegExp("<!--block-->","g"),k.extend({serializers:{"application/json":function(t){var e;if(t instanceof k.Document)e=t;else{if(!(t instanceof HTMLElement))throw new Error("unserializable object");e=k.Document.fromHTML(t.innerHTML)}return e.toSerializableDocument().toJSONString()},"text/html":function(t){var e,n,i,o,r,s,a,u,l,c,h,d,p,f,m,g,v;if(t instanceof k.Document)o=k.DocumentView.render(t);else{if(!(t instanceof HTMLElement))throw new Error("unserializable object");o=t.cloneNode(!0)}for(r=0,l=(f=o.querySelectorAll(A)).length;r<l;r++)(i=f[r]).parentNode.removeChild(i);for(s=0,c=x.length;s<c;s++)for(e=x[s],a=0,h=(m=o.querySelectorAll("["+e+"]")).length;a<h;a++)(i=m[a]).removeAttribute(e);for(u=0,d=(g=o.querySelectorAll(w)).length;u<d;u++){i=g[u];try{for(p in n=JSON.parse(i.getAttribute(b)),i.removeAttribute(b),n)v=n[p],i.setAttribute(p,v)}catch(y){}}return o.innerHTML.replace(_,"")}},deserializers:{"application/json":function(t){return k.Document.fromJSONString(t)},"text/html":function(t){return k.Document.fromHTML(t)}},serializeToContentType:function(t,e){var n;if(n=k.serializers[e])return n(t);throw new Error("unknown content type: "+e)},deserializeFromContentType:function(t,e){var n;if(n=k.deserializers[e])return n(t);throw new Error("unknown content type: "+e)}})}.call(this),function(){var t;t=k.config.lang,k.config.toolbar={getDefaultHTML:function(){return'<div class="trix-button-row">\n  <span class="trix-button-group trix-button-group--text-tools" data-trix-button-group="text-tools">\n    <button type="button" class="trix-button trix-button--icon trix-button--icon-bold" data-trix-attribute="bold" data-trix-key="b" title="'+t.bold+'" tabindex="-1">'+t.bold+'</button>\n    <button type="button" class="trix-button trix-button--icon trix-button--icon-italic" data-trix-attribute="italic" data-trix-key="i" title="'+t.italic+'" tabindex="-1">'+t.italic+'</button>\n    <button type="button" class="trix-button trix-button--icon trix-button--icon-strike" data-trix-attribute="strike" title="'+t.strike+'" tabindex="-1">'+t.strike+'</button>\n    <button type="button" class="trix-button trix-button--icon trix-button--icon-link" data-trix-attribute="href" data-trix-action="link" data-trix-key="k" title="'+t.link+'" tabindex="-1">'+t.link+'</button>\n  </span>\n\n  <span class="trix-button-group trix-button-group--block-tools" data-trix-button-group="block-tools">\n    <button type="button" class="trix-button trix-button--icon trix-button--icon-heading-1" data-trix-attribute="heading1" title="'+t.heading1+'" tabindex="-1">'+t.heading1+'</button>\n    <button type="button" class="trix-button trix-button--icon trix-button--icon-quote" data-trix-attribute="quote" title="'+t.quote+'" tabindex="-1">'+t.quote+'</button>\n    <button type="button" class="trix-button trix-button--icon trix-button--icon-code" data-trix-attribute="code" title="'+t.code+'" tabindex="-1">'+t.code+'</button>\n    <button type="button" class="trix-button trix-button--icon trix-button--icon-bullet-list" data-trix-attribute="bullet" title="'+t.bullets+'" tabindex="-1">'+t.bullets+'</button>\n    <button type="button" class="trix-button trix-button--icon trix-button--icon-number-list" data-trix-attribute="number" title="'+t.numbers+'" tabindex="-1">'+t.numbers+'</button>\n    <button type="button" class="trix-button trix-button--icon trix-button--icon-decrease-nesting-level" data-trix-action="decreaseNestingLevel" title="'+t.outdent+'" tabindex="-1">'+t.outdent+'</button>\n    <button type="button" class="trix-button trix-button--icon trix-button--icon-increase-nesting-level" data-trix-action="increaseNestingLevel" title="'+t.indent+'" tabindex="-1">'+t.indent+'</button>\n  </span>\n\n  <span class="trix-button-group trix-button-group--history-tools" data-trix-button-group="history-tools">\n    <button type="button" class="trix-button trix-button--icon trix-button--icon-undo" data-trix-action="undo" data-trix-key="z" title="'+t.undo+'" tabindex="-1">'+t.undo+'</button>\n    <button type="button" class="trix-button trix-button--icon trix-button--icon-redo" data-trix-action="redo" data-trix-key="shift+z" title="'+t.redo+'" tabindex="-1">'+t.redo+'</button>\n  </span>\n</div>\n\n<div class="trix-dialogs" data-trix-dialogs>\n  <div class="trix-dialog trix-dialog--link" data-trix-dialog="href" data-trix-dialog-attribute="href">\n    <div class="trix-dialog__link-fields">\n      <input type="url" name="href" class="trix-input trix-input--dialog" placeholder="'+t.urlPlaceholder+'" required data-trix-input>\n      <div class="trix-button-group">\n        <input type="button" class="trix-button trix-button--dialog" value="'+t.link+'" data-trix-method="setAttribute">\n        <input type="button" class="trix-button trix-button--dialog" value="'+t.unlink+'" data-trix-method="removeAttribute">\n      </div>\n    </div>\n  </div>\n</div>'}}}.call(this),function(){k.config.undoInterval=5e3}.call(this),function(){k.config.attachments={preview:{caption:{name:!0,size:!0}},file:{caption:{size:!0}}}}.call(this),function(){}.call(this),function(){k.registerElement("trix-toolbar",{defaultCSS:"%t {\n  white-space: nowrap;\n}\n\n%t [data-trix-dialog] {\n  display: none;\n}\n\n%t [data-trix-dialog][data-trix-active] {\n  display: block;\n}\n\n%t [data-trix-dialog] [data-trix-validate]:invalid {\n  background-color: #ffdddd;\n}",createdCallback:function(){return""===this.innerHTML?this.innerHTML=k.config.toolbar.getDefaultHTML():void 0}})}.call(this),function(){var n=function(t,e){function n(){this.constructor=t}for(var i in e)o.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty,s=[].indexOf||function(t){for(var e=0,n=this.length;e<n;e++)if(e in this&&this[e]===t)return e;return-1};k.ObjectView=function(t){function e(t,e){this.object=t,this.options=null!=e?e:{},this.childViews=[],this.rootView=this}return n(e,t),e.prototype.getNodes=function(){var t,e,n,i,o;for(null==this.nodes&&(this.nodes=this.createNodes()),o=[],t=0,e=(i=this.nodes).length;t<e;t++)n=i[t],o.push(n.cloneNode(!0));return o},e.prototype.invalidate=function(){var t;return(this.nodes=null)!=(t=this.parentView)?t.invalidate():void 0},e.prototype.invalidateViewForObject=function(t){var e;return null!=(e=this.findViewForObject(t))?e.invalidate():void 0},e.prototype.findOrCreateCachedChildView=function(t,e){var n;return(n=this.getCachedViewForObject(e))?this.recordChildView(n):(n=this.createChildView.apply(this,arguments),this.cacheViewForObject(n,e)),n},e.prototype.createChildView=function(t,e,n){var i;return null==n&&(n={}),e instanceof k.ObjectGroup&&(n.viewClass=t,t=k.ObjectGroupView),i=new t(e,n),this.recordChildView(i)},e.prototype.recordChildView=function(t){return t.parentView=this,t.rootView=this.rootView,s.call(this.childViews,t)<0&&this.childViews.push(t),t},e.prototype.getAllChildViews=function(){var t,e,n,i,o;for(o=[],e=0,n=(i=this.childViews).length;e<n;e++)t=i[e],o.push(t),o=o.concat(t.getAllChildViews());return o},e.prototype.findElement=function(){return this.findElementForObject(this.object)},e.prototype.findElementForObject=function(t){var e;return(e=null!=t?t.id:void 0)?this.rootView.element.querySelector("[data-trix-id='"+e+"']"):void 0},e.prototype.findViewForObject=function(t){var e,n,i,o;for(e=0,n=(i=this.getAllChildViews()).length;e<n;e++)if((o=i[e]).object===t)return o},e.prototype.getViewCache=function(){return this.rootView!==this?this.rootView.getViewCache():this.isViewCachingEnabled()?null!=this.viewCache?this.viewCache:this.viewCache={}:void 0},e.prototype.isViewCachingEnabled=function(){return!1!==this.shouldCacheViews},e.prototype.enableViewCaching=function(){return this.shouldCacheViews=!0},e.prototype.disableViewCaching=function(){return this.shouldCacheViews=!1},e.prototype.getCachedViewForObject=function(t){var e;return null!=(e=this.getViewCache())?e[t.getCacheKey()]:void 0},e.prototype.cacheViewForObject=function(t,e){var n;return null!=(n=this.getViewCache())?n[e.getCacheKey()]=t:void 0},e.prototype.garbageCollectCachedViews=function(){var t,e,n,i,o,r;if(t=this.getViewCache()){for(e in r=this.getAllChildViews().concat(this),n=function(){var t,e,n;for(n=[],t=0,e=r.length;t<e;t++)o=r[t],n.push(o.object.getCacheKey());return n}(),i=[],t)s.call(n,e)<0&&i.push(delete t[e]);return i}},e}(k.BasicObject)}.call(this),function(){var n=function(t,e){function n(){this.constructor=t}for(var i in e)o.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty;k.ObjectGroupView=function(t){function e(){e.__super__.constructor.apply(this,arguments),this.objectGroup=this.object,this.viewClass=this.options.viewClass,delete this.options.viewClass}return n(e,t),e.prototype.getChildViews=function(){var t,e,n,i;if(!this.childViews.length)for(t=0,e=(i=this.objectGroup.getObjects()).length;t<e;t++)n=i[t],this.findOrCreateCachedChildView(this.viewClass,n,this.options);return this.childViews},e.prototype.createNodes=function(){var t,e,n,i,o,r,s,a;for(t=this.createContainerElement(),e=0,i=(s=this.getChildViews()).length;e<i;e++)for(n=0,o=(a=s[e].getNodes()).length;n<o;n++)r=a[n],t.appendChild(r);return[t]},e.prototype.createContainerElement=function(t){return null==t&&(t=this.objectGroup.getDepth()),this.getChildViews()[0].createContainerElement(t)},e}(k.ObjectView)}.call(this),function(){var n=function(t,e){function n(){this.constructor=t}for(var i in e)o.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty;k.Controller=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e}(k.BasicObject)}.call(this),function(){var r,h,s,d,u,a,l=function(t,e){return function(){return t.apply(e,arguments)}},p=function(t,e){function n(){this.constructor=t}for(var i in e)o.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty,f=[].indexOf||function(t){for(var e=0,n=this.length;e<n;e++)if(e in this&&this[e]===t)return e;return-1};r=k.findClosestElementFromNode,s=k.nodeIsEmptyTextNode,h=k.nodeIsBlockStartComment,d=k.normalizeSpaces,u=k.summarizeStringChange,a=k.tagName,k.MutationObserver=function(t){function e(t){this.element=t,this.didMutate=l(this.didMutate,this),this.observer=new window.MutationObserver(this.didMutate),this.start()}var c,n,i,o;return p(e,t),i="["+(n="data-trix-mutable")+"]",o={attributes:!0,childList:!0,characterData:!0,characterDataOldValue:!0,subtree:!0},e.prototype.start=function(){return this.reset(),this.observer.observe(this.element,o)},e.prototype.stop=function(){return this.observer.disconnect()},e.prototype.didMutate=function(t){var e,n;return(e=this.mutations).push.apply(e,this.findSignificantMutations(t)),this.mutations.length?(null!=(n=this.delegate)&&"function"==typeof n.elementDidMutate&&n.elementDidMutate(this.getMutationSummary()),this.reset()):void 0},e.prototype.reset=function(){return this.mutations=[]},e.prototype.findSignificantMutations=function(t){var e,n,i,o;for(o=[],e=0,n=t.length;e<n;e++)i=t[e],this.mutationIsSignificant(i)&&o.push(i);return o},e.prototype.mutationIsSignificant=function(t){var e,n,i,o;for(e=0,n=(o=this.nodesModifiedByMutation(t)).length;e<n;e++)if(i=o[e],this.nodeIsSignificant(i))return!0;return!1},e.prototype.nodeIsSignificant=function(t){return t!==this.element&&!this.nodeIsMutable(t)&&!s(t)},e.prototype.nodeIsMutable=function(t){return r(t,{matchingSelector:i})},e.prototype.nodesModifiedByMutation=function(t){var e;switch(e=[],t.type){case"attributes":t.attributeName!==n&&e.push(t.target);break;case"characterData":e.push(t.target.parentNode),e.push(t.target);break;case"childList":e.push.apply(e,t.addedNodes),e.push.apply(e,t.removedNodes)}return e},e.prototype.getMutationSummary=function(){return this.getTextMutationSummary()},e.prototype.getTextMutationSummary=function(){var t,e,n,i,o,r,s,a,u,l,c;for(n=(a=this.getTextChangesFromCharacterData()).additions,o=a.deletions,r=0,s=(u=(c=this.getTextChangesFromChildList()).additions).length;r<s;r++)e=u[r],f.call(n,e)<0&&n.push(e);return o.push.apply(o,c.deletions),l={},(t=n.join(""))&&(l.textAdded=t),(i=o.join(""))&&(l.textDeleted=i),l},e.prototype.getMutationsByType=function(t){var e,n,i,o,r;for(r=[],e=0,n=(o=this.mutations).length;e<n;e++)(i=o[e]).type===t&&r.push(i);return r},e.prototype.getTextChangesFromChildList=function(){var t,e,i,n,o,r,s,a,u,l;for(t=[],s=[],e=0,n=(r=this.getMutationsByType("childList")).length;e<n;e++)o=r[e],t.push.apply(t,o.addedNodes),s.push.apply(s,o.removedNodes);return 0===t.length&&1===s.length&&h(s[0])?(u=[],l=["\n"]):(u=c(t),l=c(s)),{additions:function(){var t,e,n;for(n=[],i=t=0,e=u.length;t<e;i=++t)(a=u[i])!==l[i]&&n.push(d(a));return n}(),deletions:function(){var t,e,n;for(n=[],i=t=0,e=l.length;t<e;i=++t)(a=l[i])!==u[i]&&n.push(d(a));return n}()}},e.prototype.getTextChangesFromCharacterData=function(){var t,e,n,i,o,r,s,a;return(e=this.getMutationsByType("characterData")).length&&(a=e[0],n=e[e.length-1],o=d(a.oldValue),i=d(n.target.data),t=(r=u(o,i)).added,s=r.removed),{additions:t?[t]:[],deletions:s?[s]:[]}},c=function(t){var e,n,i,o;for(null==t&&(t=[]),o=[],e=0,n=t.length;e<n;e++)switch(i=t[e],i.nodeType){case Node.TEXT_NODE:o.push(i.data);break;case Node.ELEMENT_NODE:"br"===a(i)?o.push("\n"):o.push.apply(o,c(i.childNodes))}return o},e}(k.BasicObject)}.call(this),function(){var n=function(t,e){function n(){this.constructor=t}for(var i in e)o.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty;k.FileVerificationOperation=function(t){function e(t){this.file=t}return n(e,t),e.prototype.perform=function(e){var n,i
;return(n=new FileReader).onerror=function(){return e(!1)},n.onload=(i=this,function(){n.onerror=null;try{n.abort()}catch(t){}return e(!0,i.file)}),n.readAsArrayBuffer(this.file)},e}(k.Operation)}.call(this),function(){var n=function(t,e){function n(){this.constructor=t}for(var i in e)o.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty;k.CompositionInput=function(t){function e(t){var e;this.inputController=t,e=this.inputController,this.responder=e.responder,this.delegate=e.delegate,this.inputSummary=e.inputSummary,this.data={}}return n(e,t),e.prototype.start=function(t){var e,n;return this.data.start=t,"keypress"===this.inputSummary.eventName&&this.inputSummary.textAdded&&null!=(e=this.responder)&&e.deleteInDirection("left"),this.selectionIsExpanded()||(this.insertPlaceholder(),this.requestRender()),this.range=null!=(n=this.responder)?n.getSelectedRange():void 0},e.prototype.update=function(t){var e;return this.data.update=t,(e=this.selectPlaceholder())?(this.forgetPlaceholder(),this.range=e):void 0},e.prototype.end=function(t){var e,n,i,o;return this.data.end=t,this.forgetPlaceholder(),this.canApplyToDocument()?(this.setInputSummary({preferDocument:!0}),null!=(e=this.delegate)&&e.inputControllerWillPerformTyping(),null!=(n=this.responder)&&n.setSelectedRange(this.range),null!=(i=this.responder)&&i.insertString(this.data.end),null!=(o=this.responder)?o.setSelectedRange(this.range[0]+this.data.end.length):void 0):null!=this.data.start||null!=this.data.update?(this.requestReparse(),this.inputController.reset()):void 0},e.prototype.getEndData=function(){return this.data.end},e.prototype.isEnded=function(){return null!=this.getEndData()},e.prototype.canApplyToDocument=function(){var t,e;return 0===(null!=(t=this.data.start)?t.length:void 0)&&0<(null!=(e=this.data.end)?e.length:void 0)&&null!=this.range},e.proxyMethod("inputController.setInputSummary"),e.proxyMethod("inputController.requestRender"),e.proxyMethod("inputController.requestReparse"),e.proxyMethod("responder?.selectionIsExpanded"),e.proxyMethod("responder?.insertPlaceholder"),e.proxyMethod("responder?.selectPlaceholder"),e.proxyMethod("responder?.forgetPlaceholder"),e}(k.BasicObject)}.call(this),function(){var C,i,T,n,o,r,c,s,a,u,l,S,h,d,p=function(t,e){function n(){this.constructor=t}for(var i in e)f.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},f={}.hasOwnProperty,L=[].indexOf||function(t){for(var e=0,n=this.length;e<n;e++)if(e in this&&this[e]===t)return e;return-1};n=k.handleEvent,u=k.makeElement,r=k.innerElementIsActive,l=k.objectsAreEqual,k.tagName,k.InputController=function(t){function e(t){var e;for(e in this.element=t,this.resetInputSummary(),this.mutationObserver=new k.MutationObserver(this.element),(this.mutationObserver.delegate=this).events)n(e,{onElement:this.element,withCallback:this.handlerFor(e),inPhase:"capturing"})}var E;return p(e,t),E=0,e.keyNames={8:"backspace",9:"tab",13:"return",37:"left",39:"right",46:"delete",68:"d",72:"h",79:"o"},e.prototype.handlerFor=function(e){return n=this,function(t){return n.handleInput(function(){return r(this.element)?void 0:(this.eventName=e,this.events[e].call(this,t))})};var n},e.prototype.setInputSummary=function(t){var e,n;for(e in null==t&&(t={}),this.inputSummary.eventName=this.eventName,t)n=t[e],this.inputSummary[e]=n;return this.inputSummary},e.prototype.resetInputSummary=function(){return this.inputSummary={}},e.prototype.reset=function(){return this.resetInputSummary(),k.selectionChangeObserver.reset()},e.prototype.editorWillSyncDocumentView=function(){return this.mutationObserver.stop()},e.prototype.editorDidSyncDocumentView=function(){return this.mutationObserver.start()},e.prototype.requestRender=function(){var t;return null!=(t=this.delegate)&&"function"==typeof t.inputControllerDidRequestRender?t.inputControllerDidRequestRender():void 0},e.prototype.requestReparse=function(){var t;return null!=(t=this.delegate)&&"function"==typeof t.inputControllerDidRequestReparse&&t.inputControllerDidRequestReparse(),this.requestRender()},e.prototype.elementDidMutate=function(t){var e;return this.isComposing()?null!=(e=this.delegate)&&"function"==typeof e.inputControllerDidAllowUnhandledInput?e.inputControllerDidAllowUnhandledInput():void 0:this.handleInput(function(){return this.mutationIsSignificant(t)&&(this.mutationIsExpected(t)?this.requestRender():this.requestReparse()),this.reset()})},e.prototype.mutationIsExpected=function(t){var e,n,i,o,r,s,a,u,l;return s=t.textAdded,a=t.textDeleted,!!this.inputSummary.preferDocument||(e=null!=s?s===this.inputSummary.textAdded:!this.inputSummary.textAdded,n=null!=a?this.inputSummary.didDelete:!this.inputSummary.didDelete,l="\n"===a&&!n,!!(((u=("\n"===s||" \n"===s)&&!e)&&!l||l&&!u)&&(o=this.getSelectedRange())&&(i=u?s.replace(/\n$/,"").length||-1:(null!=s?s.length:void 0)||1,null!=(r=this.responder)?r.positionIsBlockBreak(o[1]+i):void 0))||e&&n)},e.prototype.mutationIsSignificant=function(t){var e,n,i;return i=0<Object.keys(t).length,e=""===(null!=(n=this.compositionInput)?n.getEndData():void 0),i||!e},e.prototype.attachFiles=function(i){var o,t,e;return t=function(){var t,e,n;for(n=[],t=0,e=i.length;t<e;t++)o=i[t],n.push(new k.FileVerificationOperation(o));return n}(),Promise.all(t).then((e=this,function(n){return e.handleInput(function(){var t,e;return null!=(t=this.delegate)&&t.inputControllerWillAttachFiles(),null!=(e=this.responder)&&e.insertFiles(n),this.requestRender()})}))},e.prototype.events={keydown:function(o){var t,e,n,i,r,s,a,u,l;if(this.isComposing()||this.resetInputSummary(),i=this.constructor.keyNames[o.keyCode]){for(e=this.keys,n=0,s=(u=["ctrl","alt","shift","meta"]).length;n<s;n++)a=u[n],o[a+"Key"]&&("ctrl"===a&&(a="control"),e=null!=e?e[a]:void 0);null!=(null!=e?e[i]:void 0)&&(this.setInputSummary({keyName:i}),k.selectionChangeObserver.reset(),e[i].call(this,o))}return c(o)&&(t=String.fromCharCode(o.keyCode).toLowerCase())&&((r=function(){var t,e,n,i;for(i=[],t=0,e=(n=["alt","shift"]).length;t<e;t++)a=n[t],o[a+"Key"]&&i.push(a);return i}()).push(t),null!=(l=this.delegate)?l.inputControllerDidReceiveKeyboardCommand(r):void 0)?o.preventDefault():void 0},keypress:function(t){var e,n,i;if(null==this.inputSummary.eventName&&(!t.metaKey&&!t.ctrlKey||t.altKey)&&!a(t)&&!s(t))return(i=h(t))?(null!=(e=this.delegate)&&e.inputControllerWillPerformTyping(),null!=(n=this.responder)&&n.insertString(i),this.setInputSummary({textAdded:i,didDelete:this.selectionIsExpanded()})):void 0},textInput:function(t){var e,n,i,o;return e=t.data,(o=this.inputSummary.textAdded)&&o!==e&&o.toUpperCase()===e?(n=this.getSelectedRange(),this.setSelectedRange([n[0],n[1]+o.length]),null!=(i=this.responder)&&i.insertString(e),this.setInputSummary({textAdded:e}),this.setSelectedRange(n)):void 0},dragenter:function(t){return t.preventDefault()},dragstart:function(t){var e;return t.target,this.serializeSelectionToDataTransfer(t.dataTransfer),this.draggedRange=this.getSelectedRange(),null!=(e=this.delegate)&&"function"==typeof e.inputControllerDidStartDrag?e.inputControllerDidStartDrag():void 0},dragover:function(t){var e,n;return!this.draggedRange&&!this.canAcceptDataTransfer(t.dataTransfer)||(t.preventDefault(),e={x:t.clientX,y:t.clientY},l(e,this.draggingPoint))?void 0:(this.draggingPoint=e,null!=(n=this.delegate)&&"function"==typeof n.inputControllerDidReceiveDragOverPoint?n.inputControllerDidReceiveDragOverPoint(this.draggingPoint):void 0)},dragend:function(){var t;return null!=(t=this.delegate)&&"function"==typeof t.inputControllerDidCancelDrag&&t.inputControllerDidCancelDrag(),this.draggedRange=null,this.draggingPoint=null},drop:function(t){var e,n,i,o,r,s,a,u,l;return t.preventDefault(),i=null!=(r=t.dataTransfer)?r.files:void 0,o={x:t.clientX,y:t.clientY},null!=(s=this.responder)&&s.setLocationRangeFromPointRange(o),(null!=i?i.length:void 0)?this.attachFiles(i):this.draggedRange?(null!=(a=this.delegate)&&a.inputControllerWillMoveText(),null!=(u=this.responder)&&u.moveTextFromRange(this.draggedRange),this.draggedRange=null,this.requestRender()):(n=t.dataTransfer.getData("application/x-trix-document"))&&(e=k.Document.fromJSONString(n),null!=(l=this.responder)&&l.insertDocument(e),this.requestRender()),this.draggedRange=null,this.draggingPoint=null},cut:function(t){var e,n;return(null!=(e=this.responder)?e.selectionIsExpanded():void 0)&&(this.serializeSelectionToDataTransfer(t.clipboardData)&&t.preventDefault(),null!=(n=this.delegate)&&n.inputControllerWillCutText(),this.deleteInDirection("backward"),t.defaultPrevented)?this.requestRender():void 0},copy:function(t){var e;return(null!=(e=this.responder)?e.selectionIsExpanded():void 0)&&this.serializeSelectionToDataTransfer(t.clipboardData)?t.preventDefault():void 0},paste:function(t){var e,n,i,o,r,s,a,u,l,c,h,d,p,f,m,g,v,y,_,b,w,x,A;return e=null!=(u=t.clipboardData)?u:t.testClipboardData,a={clipboard:e},null==e||S(t)?void this.getPastedHTMLUsingHiddenElement((A=this,function(t){var e,n,i;return a.type="text/html",a.html=t,null!=(e=A.delegate)&&e.inputControllerWillPaste(a),null!=(n=A.responder)&&n.insertHTML(a.html),A.requestRender(),null!=(i=A.delegate)?i.inputControllerDidPaste(a):void 0})):((o=e.getData("URL"))?(a.type="URL",a.href=o,a.string=(s=e.getData("public.url-name"))?k.squishBreakableWhitespace(s).trim():o,null!=(l=this.delegate)&&l.inputControllerWillPaste(a),this.setInputSummary({textAdded:a.string,didDelete:this.selectionIsExpanded()}),null!=(m=this.responder)&&m.insertText(k.Text.textForStringWithAttributes(a.string,{href:a.href})),this.requestRender(),null!=(g=this.delegate)&&g.inputControllerDidPaste(a)):C(e)?(a.type="text/plain",a.string=e.getData("text/plain"),null!=(v=this.delegate)&&v.inputControllerWillPaste(a),this.setInputSummary({textAdded:a.string,didDelete:this.selectionIsExpanded()}),null!=(y=this.responder)&&y.insertString(a.string),this.requestRender(),null!=(_=this.delegate)&&_.inputControllerDidPaste(a)):(r=e.getData("text/html"))?(a.type="text/html",a.html=r,null!=(b=this.delegate)&&b.inputControllerWillPaste(a),null!=(w=this.responder)&&w.insertHTML(a.html),this.requestRender(),null!=(x=this.delegate)&&x.inputControllerDidPaste(a)):0<=L.call(e.types,"Files")&&(i=null!=(c=e.items)&&null!=(h=c[0])&&"function"==typeof h.getAsFile?h.getAsFile():void 0)&&(!i.name&&(n=T(i))&&(i.name="pasted-file-"+ ++E+"."+n),a.type="File",a.file=i,null!=(d=this.delegate)&&d.inputControllerWillAttachFiles(),null!=(p=this.responder)&&p.insertFile(a.file),this.requestRender(),null!=(f=this.delegate)&&f.inputControllerDidPaste(a)),t.preventDefault())},compositionstart:function(t){return this.getCompositionInput().start(t.data)},compositionupdate:function(t){return this.getCompositionInput().update(t.data)},compositionend:function(t){return this.getCompositionInput().end(t.data)},input:function(t){return t.stopPropagation()}},e.prototype.keys={backspace:function(t){var e;return null!=(e=this.delegate)&&e.inputControllerWillPerformTyping(),this.deleteInDirection("backward",t)},"delete":function(t){var e;return null!=(e=this.delegate)&&e.inputControllerWillPerformTyping(),this.deleteInDirection("forward",t)},"return":function(){var t,e;return this.setInputSummary({preferDocument:!0}),null!=(t=this.delegate)&&t.inputControllerWillPerformTyping(),null!=(e=this.responder)?e.insertLineBreak():void 0},tab:function(t){var e,n;return(null!=(e=this.responder)?e.canIncreaseNestingLevel():void 0)?(null!=(n=this.responder)&&n.increaseNestingLevel(),this.requestRender(),t.preventDefault()):void 0},left:function(t){var e;return this.selectionIsInCursorTarget()?(t.preventDefault(),null!=(e=this.responder)?e.moveCursorInDirection("backward"):void 0):void 0},right:function(t){var e;return this.selectionIsInCursorTarget()?(t.preventDefault(),null!=(e=this.responder)?e.moveCursorInDirection("forward"):void 0):void 0},control:{d:function(t){var e;return null!=(e=this.delegate)&&e.inputControllerWillPerformTyping(),this.deleteInDirection("forward",t)},h:function(t){var e;return null!=(e=this.delegate)&&e.inputControllerWillPerformTyping(),this.deleteInDirection("backward",t)},o:function(t){var e,n;return t.preventDefault(),null!=(e=this.delegate)&&e.inputControllerWillPerformTyping(),null!=(n=this.responder)&&n.insertString("\n",{updatePosition:!1}),this.requestRender()}},shift:{"return":function(t){var e,n;return null!=(e=this.delegate)&&e.inputControllerWillPerformTyping(),null!=(n=this.responder)&&n.insertString("\n"),this.requestRender(),t.preventDefault()},tab:function(t){var e,n;return(null!=(e=this.responder)?e.canDecreaseNestingLevel():void 0)?(null!=(n=this.responder)&&n.decreaseNestingLevel(),this.requestRender(),t.preventDefault()):void 0},left:function(t){return this.selectionIsInCursorTarget()?(t.preventDefault(),this.expandSelectionInDirection("backward")):void 0},right:function(t){return this.selectionIsInCursorTarget()?(t.preventDefault(),this.expandSelectionInDirection("forward")):void 0}},alt:{backspace:function(){var t;return this.setInputSummary({preferDocument:!1}),null!=(t=this.delegate)?t.inputControllerWillPerformTyping():void 0}},meta:{backspace:function(){var t;return this.setInputSummary({preferDocument:!1}),null!=(t=this.delegate)?t.inputControllerWillPerformTyping():void 0}}},e.prototype.handleInput=function(t){var e,n;try{return null!=(e=this.delegate)&&e.inputControllerWillHandleInput(),t.call(this)}finally{null!=(n=this.delegate)&&n.inputControllerDidHandleInput()}},e.prototype.getCompositionInput=function(){return this.isComposing()?this.compositionInput:this.compositionInput=new k.CompositionInput(this)},e.prototype.isComposing=function(){return null!=this.compositionInput&&!this.compositionInput.isEnded()},e.prototype.deleteInDirection=function(t,e){var n;return!1!==(null!=(n=this.responder)?n.deleteInDirection(t):void 0)?this.setInputSummary({didDelete:!0}):e?(e.preventDefault(),this.requestRender()):void 0},e.prototype.serializeSelectionToDataTransfer=function(t){var e,n;if(i(t))return e=null!=(n=this.responder)?n.getSelectedDocument().toSerializableDocument():void 0,t.setData("application/x-trix-document",JSON.stringify(e)),t.setData("text/html",k.DocumentView.render(e).innerHTML),t.setData("text/plain",e.toString().replace(/\n$/,"")),!0},e.prototype.canAcceptDataTransfer=function(t){var e,n,i,o,r;for(r={},e=0,n=(o=null!=(i=null!=t?t.types:void 0)?i:[]).length;e<n;e++)r[o[e]]=!0;return r.Files||r["application/x-trix-document"]||r["text/html"]||r["text/plain"]},e.prototype.getPastedHTMLUsingHiddenElement=function(e){var n,i,t,o;return i=this.getSelectedRange(),t={position:"absolute",left:window.pageXOffset+"px",top:window.pageYOffset+"px",opacity:0},n=u({style:t,tagName:"div",editable:!0}),document.body.appendChild(n),n.focus(),requestAnimationFrame((o=this,function(){var t;return t=n.innerHTML,document.body.removeChild(n),o.setSelectedRange(i),e(t)}))},e.proxyMethod("responder?.getSelectedRange"),e.proxyMethod("responder?.setSelectedRange"),e.proxyMethod("responder?.expandSelectionInDirection"),e.proxyMethod("responder?.selectionIsInCursorTarget"),e.proxyMethod("responder?.selectionIsExpanded"),e}(k.BasicObject),T=function(t){var e,n;return null!=(e=t.type)&&null!=(n=e.match(/\/(\w+)$/))?n[1]:void 0},o=null!=("function"==typeof" ".codePointAt?" ".codePointAt(0):void 0),h=function(t){var e;return t.key&&o&&t.key.codePointAt(0)===t.keyCode?t.key:(null===t.which?e=t.keyCode:0!==t.which&&0!==t.charCode&&(e=t.charCode),null!=e?k.UTF16String.fromCodepoints([e]).toString():void 0)},a=function(t){return t.metaKey&&t.altKey&&!t.shiftKey&&94===t.keyCode},s=function(t){return t.metaKey&&t.altKey&&t.shiftKey&&9674===t.keyCode},c=function(t){return/Mac|^iP/.test(navigator.platform)?t.metaKey:t.ctrlKey},S=function(t){var e,n,i,o,r,s,a,u,l;if(a=t.clipboardData){if(0<=L.call(a.types,"text/html")){for(i=0,s=(u=a.types).length;i<s;i++)if(l=u[i],e=/^CorePasteboardFlavorType/.test(l),n=/^dyn\./.test(l)&&a.getData(l),e||n)return!0;return!1}return o=0<=L.call(a.types,"com.apple.webarchive"),r=0<=L.call(a.types,"com.apple.flat-rtfd"),o||r}},C=function(t){var e,n,i;return i=t.getData("text/plain"),n=t.getData("text/html"),i&&n?((e=u("div")).innerHTML=n,e.textContent===i?!e.querySelector(":not(meta)"):void 0):null!=i?i.length:void 0},d={"application/x-trix-feature-detection":"test"},i=function(t){var e,n;if(null!=(null!=t?t.setData:void 0)){for(e in d)if(n=d[e],!function(){try{return t.setData(e,n),t.getData(e)===n}catch(T){}}())return;return!0}}}.call(this),function(){var r,s,i,a,u,t,o,l=function(t,e){return function(){return t.apply(e,arguments)}},c=function(t,e){function n(){this.constructor=t}for(var i in e)h.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},h={}.hasOwnProperty;s=k.handleEvent,u=k.makeElement,o=k.tagName,i=k.InputController.keyNames,t=k.config,a=t.lang,r=t.css,k.AttachmentEditorController=function(t){function e(t,e,n){this.attachmentPiece=t,this.element=e,this.container=n,this.didBlurCaption=l(this.didBlurCaption,this),this.didChangeCaption=l(this.didChangeCaption,this),this.didInputCaption=l(this.didInputCaption,this),this.didKeyDownCaption=l(this.didKeyDownCaption,this),this.didClickCaption=l(this.didClickCaption,this),this.didClickRemoveButton=l(this.didClickRemoveButton,this),this.attachment=this.attachmentPiece.attachment,"a"===o(this.element)&&(this.element=this.element.firstChild),this.install()}var n;return c(e,t),n=function(e){return function(){var t;return(t=e.apply(this,arguments))["do"](),null==this.undos&&(this.undos=[]),this.undos.push(t.undo)}},e.prototype.install=function(){return this.makeElementMutable(),this.attachment.isPreviewable()&&this.makeCaptionEditable(),this.addRemoveButton()},e.prototype.uninstall=function(){var t,e;for(this.savePendingCaption();e=this.undos.pop();)e();return null!=(t=this.delegate)?t.didUninstallAttachmentEditor(this):void 0},e.prototype.savePendingCaption=function(){var t,e,n;return null!=this.pendingCaption?(t=this.pendingCaption,this.pendingCaption=null,t?null!=(e=this.delegate)&&"function"==typeof e.attachmentEditorDidRequestUpdatingAttributesForAttachment?e.attachmentEditorDidRequestUpdatingAttributesForAttachment({caption:t},this.attachment):void 0:null!=(n=this.delegate)&&"function"==typeof n.attachmentEditorDidRequestRemovingAttributeForAttachment?n.attachmentEditorDidRequestRemovingAttributeForAttachment("caption",this.attachment):void 0):void 0},e.prototype.makeElementMutable=n(function(){return{"do":(e=this,function(){return e.element.dataset.trixMutable=!0}),undo:(t=this,function(){return delete t.element.dataset.trixMutable})};var t,e}),e.prototype.makeCaptionEditable=n(function(){var t,e,n;return t=this.element.querySelector("figcaption"),e=null,{"do":(n=this,function(){return e=s("click",{onElement:t,withCallback:n.didClickCaption,inPhase:"capturing"})}),undo:function(){return e.destroy()}}}),e.prototype.addRemoveButton=n(function(){var t,e,n;return t=u({tagName:"button",textContent:a.remove,className:r.attachmentRemove+" "+r.attachmentRemove+"--icon",attributes:{type:"button",title:a.remove},data:{trixMutable:!0}}),s("click",{onElement:t,withCallback:this.didClickRemoveButton}),{"do":(n=this,function(){return n.element.appendChild(t)}),undo:(e=this,function(){return e.element.removeChild(t)})}}),e.prototype.editCaption=n(function(){var t,e,n,i,o;return(i=u({tagName:"textarea",className:r.attachmentCaptionEditor,attributes:{placeholder:a.captionPlaceholder}})).value=this.attachmentPiece.getCaption(),(o=i.cloneNode()).classList.add("trix-autoresize-clone"),t=function(){return o.value=i.value,i.style.height=o.scrollHeight+"px"},s("keydown",{onElement:i,withCallback:this.didKeyDownCaption}),s("input",{onElement:i,withCallback:this.didInputCaption}),s("change",{onElement:i,withCallback:this.didChangeCaption}),s("blur",{onElement:i,withCallback:this.didBlurCaption}),n=this.element.querySelector("figcaption"),e=n.cloneNode(),{"do":function(){return n.style.display="none",e.appendChild(i),e.appendChild(o),e.classList.add(r.attachmentCaption+"--editing"),n.parentElement.insertBefore(e,n),t(),i.focus()},undo:function(){return e.parentNode.removeChild(e),n.style.display=null}}}),e.prototype.didClickRemoveButton=function(t){var e;return t.preventDefault(),t.stopPropagation(),null!=(e=this.delegate)?e.attachmentEditorDidRequestRemovalOfAttachment(this.attachment):void 0},e.prototype.didClickCaption=function(t){return t.preventDefault(),this.editCaption()},e.prototype.didKeyDownCaption=function(t){var e;return"return"===i[t.keyCode]?(t.preventDefault(),this.savePendingCaption(),null!=(e=this.delegate)&&"function"==typeof e.attachmentEditorDidRequestDeselectingAttachment?e.attachmentEditorDidRequestDeselectingAttachment(this.attachment):void 0):void 0},e.prototype.didInputCaption=function(t){return this.pendingCaption=t.target.value.replace(/\s/g," ").trim()},e.prototype.didChangeCaption=function(){return this.savePendingCaption()},e.prototype.didBlurCaption=function(){return this.savePendingCaption()},e}(k.BasicObject)}.call(this),function(){var d,n,p,i=function(t,e){function n(){this.constructor=t}for(var i in e)o.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty;p=k.makeElement,d=k.config.css,k.AttachmentView=function(t){function e(){e.__super__.constructor.apply(this,arguments),this.attachment=this.object,(this.attachment.uploadProgressDelegate=this).attachmentPiece=this.options.piece}var h;return i(e,t),e.attachmentSelector="[data-trix-attachment]",e.prototype.createContentNodes=function(){return[]},e.prototype.createNodes=function(){var t,e,n,i,o,r,s,a,u,l,c;if(i=p({tagName:"figure",className:this.getClassName()}),this.attachment.hasContent())i.innerHTML=this.attachment.getContent();else for(r=0,a=(l=this.createContentNodes()).length;r<a;r++)u=l[r],i.appendChild(u);for(s in i.appendChild(this.createCaptionElement()),e={trixAttachment:JSON.stringify(this.attachment),trixContentType:this.attachment.getContentType(),trixId:this.attachment.id},(t=this.attachmentPiece.getAttributesForAttachment()).isEmpty()||(e.trixAttributes=JSON.stringify(t)),this.attachment.isPending()&&(this.progressElement=p({tagName:"progress",attributes:{"class":d.attachmentProgress,value:this.attachment.getUploadProgress(),max:100},data:{trixMutable:!0,trixStoreKey:["progressElement",this.attachment.id].join("/")}}),i.appendChild(this.progressElement),e.trixSerialize=!1),(o=this.getHref())?(n=p("a",{href:o,tabindex:-1})).appendChild(i):n=i,e)c=e[s],n.dataset[s]=c;return n.setAttribute("contenteditable",!1),[h("left"),n,h("right")]},e.prototype.createCaptionElement=function(){var t,e,n,i,o,r,s;return n=p({tagName:"figcaption",className:d.attachmentCaption}),(t=this.attachmentPiece.getCaption())?(n.classList.add(d.attachmentCaption+"--edited"),n.textContent=t):((e=this.getCaptionConfig()).name&&(i=this.attachment.getFilename()),e.size&&(r=this.attachment.getFormattedFilesize()),i&&(o=p({tagName:"span",className:d.attachmentName,textContent:i}),n.appendChild(o)),r&&(i&&n.appendChild(document.createTextNode(" ")),s=p({tagName:"span",className:d.attachmentSize,textContent:r}),n.appendChild(s))),n},e.prototype.getClassName=function(){var t,e;return e=[d.attachment,d.attachment+"--"+this.attachment.getType()],(t=this.attachment.getExtension())&&e.push(d.attachment+"--"+t),e.join(" ")},e.prototype.getHref=function(){return n(this.attachment.getContent(),"a")?void 0:this.attachment.getHref()},e.prototype.getCaptionConfig=function(){var t,e,n;return n=this.attachment.getType(),t=k.copyObject(null!=(e=k.config.attachments[n])?e.caption:void 0),"file"===n&&(t.name=!0),t},e.prototype.findProgressElement=function(){var t;return null!=(t=this.findElement())?t.querySelector("progress"):void 0},h=function(t){return p({tagName:"span",textContent:k.ZERO_WIDTH_SPACE,data:{trixCursorTarget:t,trixSerialize:!1}})},e.prototype.attachmentDidChangeUploadProgress=function(){var t,e;return e=this.attachment.getUploadProgress(),null!=(t=this.findProgressElement())?t.value=e:void 0},e}(k.ObjectView),n=function(t,e){var n;return(n=p("div")).innerHTML=null!=t?t:"",n.querySelector(e)}}.call(this),function(){var n,i=function(t,e){function n(){this.constructor=t}for(var i in e)o.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty;n=k.makeElement,k.PreviewableAttachmentView=function(t){function e(){e.__super__.constructor.apply(this,arguments),this.attachment.previewDelegate=this}return i(e,t),e.prototype.createContentNodes=function(){return this.image=n({tagName:"img",attributes:{src:""},data:{trixMutable:!0}}),this.refresh(this.image),[this.image]},e.prototype.createCaptionElement=function(){var t;return(t=e.__super__.createCaptionElement.apply(this,arguments)).textContent||t.setAttribute("data-trix-placeholder",k.config.lang.captionPlaceholder),t},e.prototype.refresh=function(t){var e;return null==t&&(t=null!=(e=this.findElement())?e.querySelector("img"):void 0),t?this.updateAttributesForImage(t):void 0},e.prototype.updateAttributesForImage=function(t){var e,n,i,o,r,s;return r=this.attachment.getURL(),n=this.attachment.getPreviewURL(),t.src=n||r,n===r?t.removeAttribute("data-trix-serialized-attributes"):(i=JSON.stringify({src:r}),t.setAttribute("data-trix-serialized-attributes",i)),s=this.attachment.getWidth(),e=this.attachment.getHeight(),null!=s&&(t.width=s),null!=e&&(t.height=e),o=["imageElement",this.attachment.id,t.src,t.width,t.height].join("/"),t.dataset.trixStoreKey=o},e.prototype.attachmentDidChangeAttributes=function(){return this.refresh(this.image),this.refresh()},e}(k.AttachmentView)}.call(this),function(){var s,l,c,i=function(t,e){function n(){this.constructor=t}for(var i in e)o.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty;c=k.makeElement,s=k.findInnerElement,l=k.getTextConfig,k.PieceView=function(t){function e(){var t;e.__super__.constructor.apply(this,arguments),this.piece=this.object,this.attributes=this.piece.getAttributes(),t=this.options,this.textConfig=t.textConfig,this.context=t.context,this.piece.attachment?this.attachment=this.piece.attachment:this.string=this.piece.toString()}var n;return i(e,t),e.prototype.createNodes=function(){var t,e,n,i,o,r;if(r=this.attachment?this.createAttachmentNodes():this.createStringNodes(),t=this.createElement()){for(n=s(t),e=0,i=r.length;e<i;e++)o=r[e],n.appendChild(o);r=[t]}return r},e.prototype.createAttachmentNodes=function(){var t;return t=this.attachment.isPreviewable()?k.PreviewableAttachmentView:k.AttachmentView,this.createChildView(t,this.piece.attachment,{piece:this.piece}).getNodes()},e.prototype.createStringNodes=function(){var t,e,n,i,o,r,s,a,u;if(null!=(s=this.textConfig)?s.plaintext:void 0)return[document.createTextNode(this.string)];for(r=[],n=e=0,i=(a=this.string.split("\n")).length;e<i;n=++e)u=a[n],0<n&&(t=c("br"),r.push(t)),u.length&&(o=document.createTextNode(this.preserveSpaces(u)),r.push(o));return r},e.prototype.createElement=function(){var t,e,n,i,o,r,s,a,u;for(i in a={},r=this.attributes)if(u=r[i],(t=l(i))&&(t.tagName&&(o=c(t.tagName),n?(n.appendChild(o),n=o):e=n=o),t.styleProperty&&(a[t.styleProperty]=u),t.style))for(i in s=t.style)u=s[i],a[i]=u;if(Object.keys(a).length)for(i in null==e&&(e=c("span")),a)u=a[i],e.style[i]=u;return e},e.prototype.createContainerElement=function(){var t,e,n,i,o;for(n in i=this.attributes)if(o=i[n],(e=l(n))&&e.groupTagName)return(t={})[n]=o,c(e.groupTagName,t)},n=k.NON_BREAKING_SPACE,e.prototype.preserveSpaces=function(t){return this.context.isLast&&(t=t.replace(/\ $/,n)),t=t.replace(/(\S)\ {3}(\S)/g,"$1 "+n+" $2").replace(/\ {2}/g,n+" ").replace(/\ {2}/g," "+n),(this.context.isFirst||this.context.followsWhitespace)&&(t=t.replace(/^\ /,n)),t},e}(k.ObjectView)}.call(this),function(){var n=function(t,e){function n(){this.constructor=t}for(var i in e)o.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty;k.TextView=function(t){function e(){e.__super__.constructor.apply(this,arguments),this.text=this.object,this.textConfig=this.options.textConfig}var c;return n(e,t),e.prototype.createNodes=function(){var t,e,n,i,o,r,s,a,u,l;for(r=[],i=(a=k.ObjectGroup.groupObjects(this.getPieces())).length-1,n=e=0,o=a.length;e<o;n=++e)s=a[n],t={},0===n&&(t.isFirst=!0),n===i&&(t.isLast=!0),c(u)&&(t.followsWhitespace=!0),l=this.findOrCreateCachedChildView(k.PieceView,s,{textConfig:this.textConfig,context:t}),r.push.apply(r,l.getNodes()),u=s;return r},e.prototype.getPieces=function(){var t,e,n,i,o;for(o=[],t=0,e=(i=this.text.getPieces()).length;t<e;t++)(n=i[t]).hasAttribute("blockBreak")||o.push(n);return o},c=function(t){return/\s$/.test(null!=t?t.toString():void 0)},e}(k.ObjectView)}.call(this),function(){var u,l,n=function(t,e){function n(){this.constructor=t}for(var i in e)o.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty;l=k.makeElement,u=k.getBlockConfig,k.BlockView=function(t){function e(){e.__super__.constructor.apply(this,arguments),this.block=this.object,this.attributes=this.block.getAttributes()}return n(e,t),e.prototype.createNodes=function(){var t,e,n,i,o,r,s,a;if(o=[document.createComment("block")],this.block.isEmpty()?o.push(l("br")):(s=null!=(r=u(this.block.getLastAttribute()))?r.text:void 0,a=this.findOrCreateCachedChildView(k.TextView,this.block.text,{textConfig:s}),o.push.apply(o,a.getNodes()),this.shouldAddExtraNewlineElement()&&o.push(l("br"))),this.attributes.length)return o;for(t=l(k.config.blockAttributes["default"].tagName),e=0,n=o.length;e<n;e++)i=o[e],t.appendChild(i);return[t]},e.prototype.createContainerElement=function(t){var e,n;return e=this.attributes[t],n=u(e),l(n.tagName)},e.prototype.shouldAddExtraNewlineElement=function(){return/\n\n$/.test(this.block.toString())},e}(k.ObjectView)}.call(this),function(){var o,a,r=function(t,e){function n(){this.constructor=t}for(var i in e)s.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},s={}.hasOwnProperty;o=k.defer,a=k.makeElement,k.DocumentView=function(t){function e(){e.__super__.constructor.apply(this,arguments),this.element=this.options.element,this.elementStore=new k.ElementStore,this.setDocument(this.object)}var n,c,i;return r(e,t),e.render=function(t){var e,n;return(n=new this(t,{element:e=a("div")})).render(),n.sync(),e},e.prototype.setDocument=function(t){return t.isEqualTo(this.document)?void 0:this.document=this.object=t},e.prototype.render=function(){var t,e,o,n,i,r,s;if(this.childViews=[],this.shadowElement=a("div"),!this.document.isEmpty()){for(r=[],t=0,e=(i=k.ObjectGroup.groupObjects(this.document.getBlocks(),{asTree:!0})).length;t<e;t++)n=i[t],s=this.findOrCreateCachedChildView(k.BlockView,n),r.push(function(){var t,e,n,i;for(i=[],t=0,e=(n=s.getNodes()).length;t<e;t++)o=n[t],i.push(this.shadowElement.appendChild(o));return i}.call(this));return r}},e.prototype.isSynced=function(){return n(this.shadowElement,this.element)},e.prototype.sync=function(){var t;for(t=this.createDocumentFragmentForSync();this.element.lastChild;)this.element.removeChild(this.element.lastChild);return this.element.appendChild(t),this.didSync()},e.prototype.didSync=function(){return this.elementStore.reset(c(this.element)),o((t=this,function(){return t.garbageCollectCachedViews()}));var t},e.prototype.createDocumentFragmentForSync=function(){var t,e,n,i,o,r,s,a,u,l;for(e=document.createDocumentFragment(),n=0,o=(a=this.shadowElement.childNodes).length;n<o;n++)s=a[n],e.appendChild(s.cloneNode(!0));for(i=0,r=(u=c(e)).length;i<r;i++)t=u[i],(l=this.elementStore.remove(t))&&t.parentNode.replaceChild(l,t);return e},c=function(t){return t.querySelectorAll("[data-trix-store-key]")},n=function(t,e){return i(t.innerHTML)===i(e.innerHTML)},i=function(t){return t.replace(/&nbsp;/g," ")},e}(k.ObjectView)}.call(this),function(){var n,i,o,r,s=function(t,e){return function(){return t.apply(e,arguments)}},a=function(t,e){function n(){this.constructor=t}for(var i in e)u.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},u={}.hasOwnProperty;o=k.handleEvent,r=k.innerElementIsActive,i=k.defer,n=k.AttachmentView.attachmentSelector,k.CompositionController=function(t){function e(t,e){this.element=t,this.composition=e,this.didClickAttachment=s(this.didClickAttachment,this),this.didBlur=s(this.didBlur,this),this.didFocus=s(this.didFocus,this),this.documentView=new k.DocumentView(this.composition.document,{
element:this.element}),o("focus",{onElement:this.element,withCallback:this.didFocus}),o("blur",{onElement:this.element,withCallback:this.didBlur}),o("click",{onElement:this.element,matchingSelector:"a[contenteditable=false]",preventDefault:!0}),o("mousedown",{onElement:this.element,matchingSelector:n,withCallback:this.didClickAttachment}),o("click",{onElement:this.element,matchingSelector:"a"+n,preventDefault:!0})}return a(e,t),e.prototype.didFocus=function(){var t,e,n,i;return t=function(){var t;return i.focused?void 0:(i.focused=!0,null!=(t=i.delegate)&&"function"==typeof t.compositionControllerDidFocus?t.compositionControllerDidFocus():void 0)},null!=(e=null!=(n=(i=this).blurPromise)?n.then(t):void 0)?e:t()},e.prototype.didBlur=function(){return this.blurPromise=new Promise((n=this,function(e){return i(function(){var t;return r(n.element)||(n.focused=null)!=(t=n.delegate)&&"function"==typeof t.compositionControllerDidBlur&&t.compositionControllerDidBlur(),n.blurPromise=null,e()})}));var n},e.prototype.didClickAttachment=function(t,e){var n,i;return n=this.findAttachmentForElement(e),null!=(i=this.delegate)&&"function"==typeof i.compositionControllerDidSelectAttachment?i.compositionControllerDidSelectAttachment(n):void 0},e.prototype.getSerializableElement=function(){return this.isEditingAttachment()?this.documentView.shadowElement:this.element},e.prototype.render=function(){var t,e,n;return this.revision!==this.composition.revision&&(this.documentView.setDocument(this.composition.document),this.documentView.render(),this.revision=this.composition.revision),this.canSyncDocumentView()&&!this.documentView.isSynced()&&(null!=(t=this.delegate)&&"function"==typeof t.compositionControllerWillSyncDocumentView&&t.compositionControllerWillSyncDocumentView(),this.documentView.sync(),null!=(e=this.delegate)&&"function"==typeof e.compositionControllerDidSyncDocumentView&&e.compositionControllerDidSyncDocumentView()),null!=(n=this.delegate)&&"function"==typeof n.compositionControllerDidRender?n.compositionControllerDidRender():void 0},e.prototype.rerenderViewForObject=function(t){return this.invalidateViewForObject(t),this.render()},e.prototype.invalidateViewForObject=function(t){return this.documentView.invalidateViewForObject(t)},e.prototype.isViewCachingEnabled=function(){return this.documentView.isViewCachingEnabled()},e.prototype.enableViewCaching=function(){return this.documentView.enableViewCaching()},e.prototype.disableViewCaching=function(){return this.documentView.disableViewCaching()},e.prototype.refreshViewCache=function(){return this.documentView.garbageCollectCachedViews()},e.prototype.isEditingAttachment=function(){return null!=this.attachmentEditor},e.prototype.installAttachmentEditorForAttachment=function(t){var e,n,i;if((null!=(i=this.attachmentEditor)?i.attachment:void 0)!==t&&(n=this.documentView.findElementForObject(t)))return this.uninstallAttachmentEditor(),e=this.composition.document.getAttachmentPieceForAttachment(t),this.attachmentEditor=new k.AttachmentEditorController(e,n,this.element),this.attachmentEditor.delegate=this},e.prototype.uninstallAttachmentEditor=function(){var t;return null!=(t=this.attachmentEditor)?t.uninstall():void 0},e.prototype.editAttachmentCaption=function(){var t;return null!=(t=this.attachmentEditor)?t.editCaption():void 0},e.prototype.didUninstallAttachmentEditor=function(){return this.attachmentEditor=null,this.render()},e.prototype.attachmentEditorDidRequestUpdatingAttributesForAttachment=function(t,e){var n;return null!=(n=this.delegate)&&"function"==typeof n.compositionControllerWillUpdateAttachment&&n.compositionControllerWillUpdateAttachment(e),this.composition.updateAttributesForAttachment(t,e)},e.prototype.attachmentEditorDidRequestRemovingAttributeForAttachment=function(t,e){var n;return null!=(n=this.delegate)&&"function"==typeof n.compositionControllerWillUpdateAttachment&&n.compositionControllerWillUpdateAttachment(e),this.composition.removeAttributeForAttachment(t,e)},e.prototype.attachmentEditorDidRequestRemovalOfAttachment=function(t){var e;return null!=(e=this.delegate)&&"function"==typeof e.compositionControllerDidRequestRemovalOfAttachment?e.compositionControllerDidRequestRemovalOfAttachment(t):void 0},e.prototype.attachmentEditorDidRequestDeselectingAttachment=function(t){var e;return null!=(e=this.delegate)&&"function"==typeof e.compositionControllerDidRequestDeselectingAttachment?e.compositionControllerDidRequestDeselectingAttachment(t):void 0},e.prototype.canSyncDocumentView=function(){return!this.isEditingAttachment()},e.prototype.findAttachmentForElement=function(t){return this.composition.document.getAttachmentById(parseInt(t.dataset.trixId,10))},e}(k.BasicObject)}.call(this),function(){var p,f,m,g=function(t,e){return function(){return t.apply(e,arguments)}},v=function(t,e){function n(){this.constructor=t}for(var i in e)o.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty;f=k.handleEvent,m=k.triggerEvent,p=k.findClosestElementFromNode,k.ToolbarController=function(t){function e(t){this.element=t,this.didKeyDownDialogInput=g(this.didKeyDownDialogInput,this),this.didClickDialogButton=g(this.didClickDialogButton,this),this.didClickAttributeButton=g(this.didClickAttributeButton,this),this.didClickActionButton=g(this.didClickActionButton,this),this.attributes={},this.actions={},this.resetDialogInputs(),f("mousedown",{onElement:this.element,matchingSelector:s,withCallback:this.didClickActionButton}),f("mousedown",{onElement:this.element,matchingSelector:a,withCallback:this.didClickAttributeButton}),f("click",{onElement:this.element,matchingSelector:d,preventDefault:!0}),f("click",{onElement:this.element,matchingSelector:i,withCallback:this.didClickDialogButton}),f("keydown",{onElement:this.element,matchingSelector:r,withCallback:this.didKeyDownDialogInput})}var s,n,a,i,r,o,u,c,l,h,d;return v(e,t),d=(a="[data-trix-attribute]")+", "+(s="[data-trix-action]"),n=(o="[data-trix-dialog]")+"[data-trix-active]",i=o+" [data-trix-method]",r=o+" [data-trix-input]",e.prototype.didClickActionButton=function(t,e){var n,i,o;return null!=(i=this.delegate)&&i.toolbarDidClickButton(),t.preventDefault(),n=u(e),this.getDialog(n)?this.toggleDialog(n):null!=(o=this.delegate)?o.toolbarDidInvokeAction(n):void 0},e.prototype.didClickAttributeButton=function(t,e){var n,i,o;return null!=(i=this.delegate)&&i.toolbarDidClickButton(),t.preventDefault(),n=c(e),this.getDialog(n)?this.toggleDialog(n):null!=(o=this.delegate)&&o.toolbarDidToggleAttribute(n),this.refreshAttributeButtons()},e.prototype.didClickDialogButton=function(t,e){var n;return n=p(e,{matchingSelector:o}),this[e.getAttribute("data-trix-method")].call(this,n)},e.prototype.didKeyDownDialogInput=function(t,e){var n,i;return 13===t.keyCode&&(t.preventDefault(),n=e.getAttribute("name"),i=this.getDialog(n),this.setAttribute(i)),27===t.keyCode?(t.preventDefault(),this.hideDialog()):void 0},e.prototype.updateActions=function(t){return this.actions=t,this.refreshActionButtons()},e.prototype.refreshActionButtons=function(){return this.eachActionButton((n=this,function(t,e){return t.disabled=!1===n.actions[e]}));var n},e.prototype.eachActionButton=function(t){var e,n,i,o,r;for(r=[],n=0,i=(o=this.element.querySelectorAll(s)).length;n<i;n++)e=o[n],r.push(t(e,u(e)));return r},e.prototype.updateAttributes=function(t){return this.attributes=t,this.refreshAttributeButtons()},e.prototype.refreshAttributeButtons=function(){return this.eachAttributeButton((n=this,function(t,e){return t.disabled=!1===n.attributes[e],n.attributes[e]||n.dialogIsVisible(e)?(t.setAttribute("data-trix-active",""),t.classList.add("trix-active")):(t.removeAttribute("data-trix-active"),t.classList.remove("trix-active"))}));var n},e.prototype.eachAttributeButton=function(t){var e,n,i,o,r;for(r=[],n=0,i=(o=this.element.querySelectorAll(a)).length;n<i;n++)e=o[n],r.push(t(e,c(e)));return r},e.prototype.applyKeyboardCommand=function(t){var e,n,i,o,r,s;for(o=JSON.stringify(t.sort()),i=0,r=(s=this.element.querySelectorAll("[data-trix-key]")).length;i<r;i++)if(n=(e=s[i]).getAttribute("data-trix-key").split("+"),JSON.stringify(n.sort())===o)return m("mousedown",{onElement:e}),!0;return!1},e.prototype.dialogIsVisible=function(t){var e;return(e=this.getDialog(t))?e.hasAttribute("data-trix-active"):void 0},e.prototype.toggleDialog=function(t){return this.dialogIsVisible(t)?this.hideDialog():this.showDialog(t)},e.prototype.showDialog=function(t){var e,n,i,o,r,s,a,u,l;for(this.hideDialog(),null!=(s=this.delegate)&&s.toolbarWillShowDialog(),(n=this.getDialog(t)).setAttribute("data-trix-active",""),n.classList.add("trix-active"),i=0,r=(a=n.querySelectorAll("input[disabled]")).length;i<r;i++)a[i].removeAttribute("disabled");return(e=c(n))&&(o=h(n,t))&&(o.value=null!=(u=this.attributes[e])?u:"",o.select()),null!=(l=this.delegate)?l.toolbarDidShowDialog(t):void 0},e.prototype.setAttribute=function(t){var e,n,i;return e=c(t),(n=h(t,e)).willValidate&&!n.checkValidity()?(n.setAttribute("data-trix-validate",""),n.classList.add("trix-validate"),n.focus()):(null!=(i=this.delegate)&&i.toolbarDidUpdateAttribute(e,n.value),this.hideDialog())},e.prototype.removeAttribute=function(t){var e,n;return e=c(t),null!=(n=this.delegate)&&n.toolbarDidRemoveAttribute(e),this.hideDialog()},e.prototype.hideDialog=function(){var t,e;return(t=this.element.querySelector(n))?(t.removeAttribute("data-trix-active"),t.classList.remove("trix-active"),this.resetDialogInputs(),null!=(e=this.delegate)?e.toolbarDidHideDialog(l(t)):void 0):void 0},e.prototype.resetDialogInputs=function(){var t,e,n,i,o;for(o=[],t=0,n=(i=this.element.querySelectorAll(r)).length;t<n;t++)(e=i[t]).setAttribute("disabled","disabled"),e.removeAttribute("data-trix-validate"),o.push(e.classList.remove("trix-validate"));return o},e.prototype.getDialog=function(t){return this.element.querySelector("[data-trix-dialog="+t+"]")},h=function(t,e){return null==e&&(e=c(t)),t.querySelector("[data-trix-input][name='"+e+"']")},u=function(t){return t.getAttribute("data-trix-action")},c=function(t){var e;return null!=(e=t.getAttribute("data-trix-attribute"))?e:t.getAttribute("data-trix-dialog-attribute")},l=function(t){return t.getAttribute("data-trix-dialog")},e}(k.BasicObject)}.call(this),function(){var n=function(t,e){function n(){this.constructor=t}for(var i in e)o.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty;k.ImagePreloadOperation=function(t){function e(t){this.url=t}return n(e,t),e.prototype.perform=function(t){var e,n;return(e=new Image).onload=(n=this,function(){return e.width=n.width=e.naturalWidth,e.height=n.height=e.naturalHeight,t(!0,e)}),e.onerror=function(){return t(!1)},e.src=this.url},e}(k.Operation)}.call(this),function(){var n=function(t,e){return function(){return t.apply(e,arguments)}},i=function(t,e){function n(){this.constructor=t}for(var i in e)o.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty;k.Attachment=function(t){function e(t){null==t&&(t={}),this.releaseFile=n(this.releaseFile,this),e.__super__.constructor.apply(this,arguments),this.attributes=k.Hash.box(t),this.didChangeAttributes()}return i(e,t),e.previewablePattern=/^image(\/(gif|png|jpe?g)|$)/,e.attachmentForFile=function(t){var e;return(e=new this(this.attributesForFile(t))).setFile(t),e},e.attributesForFile=function(t){return new k.Hash({filename:t.name,filesize:t.size,contentType:t.type})},e.fromJSON=function(t){return new this(t)},e.prototype.getAttribute=function(t){return this.attributes.get(t)},e.prototype.hasAttribute=function(t){return this.attributes.has(t)},e.prototype.getAttributes=function(){return this.attributes.toObject()},e.prototype.setAttributes=function(t){var e,n,i;return null==t&&(t={}),e=this.attributes.merge(t),this.attributes.isEqualTo(e)?void 0:(this.attributes=e,this.didChangeAttributes(),null!=(n=this.previewDelegate)&&"function"==typeof n.attachmentDidChangeAttributes&&n.attachmentDidChangeAttributes(this),null!=(i=this.delegate)&&"function"==typeof i.attachmentDidChangeAttributes?i.attachmentDidChangeAttributes(this):void 0)},e.prototype.didChangeAttributes=function(){return this.isPreviewable()?this.preloadURL():void 0},e.prototype.isPending=function(){return null!=this.file&&!(this.getURL()||this.getHref())},e.prototype.isPreviewable=function(){return this.attributes.has("previewable")?this.attributes.get("previewable"):this.constructor.previewablePattern.test(this.getContentType())},e.prototype.getType=function(){return this.hasContent()?"content":this.isPreviewable()?"preview":"file"},e.prototype.getURL=function(){return this.attributes.get("url")},e.prototype.getHref=function(){return this.attributes.get("href")},e.prototype.getFilename=function(){var t;return null!=(t=this.attributes.get("filename"))?t:""},e.prototype.getFilesize=function(){return this.attributes.get("filesize")},e.prototype.getFormattedFilesize=function(){var t;return"number"==typeof(t=this.attributes.get("filesize"))?k.config.fileSize.formatter(t):""},e.prototype.getExtension=function(){var t;return null!=(t=this.getFilename().match(/\.(\w+)$/))?t[1].toLowerCase():void 0},e.prototype.getContentType=function(){return this.attributes.get("contentType")},e.prototype.hasContent=function(){return this.attributes.has("content")},e.prototype.getContent=function(){return this.attributes.get("content")},e.prototype.getWidth=function(){return this.attributes.get("width")},e.prototype.getHeight=function(){return this.attributes.get("height")},e.prototype.getFile=function(){return this.file},e.prototype.setFile=function(t){return this.file=t,this.isPreviewable()?this.preloadFile():void 0},e.prototype.releaseFile=function(){return this.releasePreloadedFile(),this.file=null},e.prototype.getUploadProgress=function(){var t;return null!=(t=this.uploadProgress)?t:0},e.prototype.setUploadProgress=function(t){var e;return this.uploadProgress!==t?(this.uploadProgress=t,null!=(e=this.uploadProgressDelegate)&&"function"==typeof e.attachmentDidChangeUploadProgress?e.attachmentDidChangeUploadProgress(this):void 0):void 0},e.prototype.toJSON=function(){return this.getAttributes()},e.prototype.getCacheKey=function(){return[e.__super__.getCacheKey.apply(this,arguments),this.attributes.getCacheKey(),this.getPreviewURL()].join("/")},e.prototype.getPreviewURL=function(){return this.previewURL||this.preloadingURL},e.prototype.setPreviewURL=function(t){var e,n;return t!==this.getPreviewURL()?(this.previewURL=t,null!=(e=this.previewDelegate)&&"function"==typeof e.attachmentDidChangeAttributes&&e.attachmentDidChangeAttributes(this),null!=(n=this.delegate)&&"function"==typeof n.attachmentDidChangePreviewURL?n.attachmentDidChangePreviewURL(this):void 0):void 0},e.prototype.preloadURL=function(){return this.preload(this.getURL(),this.releaseFile)},e.prototype.preloadFile=function(){return this.file?(this.fileObjectURL=URL.createObjectURL(this.file),this.preload(this.fileObjectURL)):void 0},e.prototype.releasePreloadedFile=function(){return this.fileObjectURL?(URL.revokeObjectURL(this.fileObjectURL),this.fileObjectURL=null):void 0},e.prototype.preload=function(i,o){var r;return i&&i!==this.getPreviewURL()?(this.preloadingURL=i,new k.ImagePreloadOperation(i).then((r=this,function(t){var e,n;return n=t.width,e=t.height,r.setAttributes({width:n,height:e}),r.preloadingURL=null,r.setPreviewURL(i),"function"==typeof o?o():void 0}))):void 0},e}(k.Object)}.call(this),function(){var e=function(t,e){function n(){this.constructor=t}for(var i in e)o.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty;k.Piece=function(t){function n(t,e){null==e&&(e={}),n.__super__.constructor.apply(this,arguments),this.attributes=k.Hash.box(e)}return e(n,t),n.types={},n.registerType=function(t,e){return e.type=t,this.types[t]=e},n.fromJSON=function(t){var e;return(e=this.types[t.type])?e.fromJSON(t):void 0},n.prototype.copyWithAttributes=function(t){return new this.constructor(this.getValue(),t)},n.prototype.copyWithAdditionalAttributes=function(t){return this.copyWithAttributes(this.attributes.merge(t))},n.prototype.copyWithoutAttribute=function(t){return this.copyWithAttributes(this.attributes.remove(t))},n.prototype.copy=function(){return this.copyWithAttributes(this.attributes)},n.prototype.getAttribute=function(t){return this.attributes.get(t)},n.prototype.getAttributesHash=function(){return this.attributes},n.prototype.getAttributes=function(){return this.attributes.toObject()},n.prototype.getCommonAttributes=function(){var e,n,t;return(t=pieceList.getPieceAtIndex(0))?(e=t.attributes,n=e.getKeys(),pieceList.eachPiece(function(t){return n=e.getKeysCommonToHash(t.attributes),e=e.slice(n)}),e.toObject()):{}},n.prototype.hasAttribute=function(t){return this.attributes.has(t)},n.prototype.hasSameStringValueAsPiece=function(t){return null!=t&&this.toString()===t.toString()},n.prototype.hasSameAttributesAsPiece=function(t){return null!=t&&(this.attributes===t.attributes||this.attributes.isEqualTo(t.attributes))},n.prototype.isBlockBreak=function(){return!1},n.prototype.isEqualTo=function(t){return n.__super__.isEqualTo.apply(this,arguments)||this.hasSameConstructorAs(t)&&this.hasSameStringValueAsPiece(t)&&this.hasSameAttributesAsPiece(t)},n.prototype.isEmpty=function(){return 0===this.length},n.prototype.isSerializable=function(){return!0},n.prototype.toJSON=function(){return{type:this.constructor.type,attributes:this.getAttributes()}},n.prototype.contentsForInspection=function(){return{type:this.constructor.type,attributes:this.attributes.inspect()}},n.prototype.canBeGrouped=function(){return this.hasAttribute("href")},n.prototype.canBeGroupedWith=function(t){return this.getAttribute("href")===t.getAttribute("href")},n.prototype.getLength=function(){return this.length},n.prototype.canBeConsolidatedWith=function(){return!1},n}(k.Object)}.call(this),function(){var e=function(t,e){function n(){this.constructor=t}for(var i in e)o.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty;k.Piece.registerType("attachment",k.AttachmentPiece=function(t){function n(t){this.attachment=t,n.__super__.constructor.apply(this,arguments),this.length=1,this.ensureAttachmentExclusivelyHasAttribute("href")}return e(n,t),n.fromJSON=function(t){return new this(k.Attachment.fromJSON(t.attachment),t.attributes)},n.prototype.ensureAttachmentExclusivelyHasAttribute=function(t){return this.hasAttribute(t)&&this.attachment.hasAttribute(t)?this.attributes=this.attributes.remove(t):void 0},n.prototype.getValue=function(){return this.attachment},n.prototype.isSerializable=function(){return!this.attachment.isPending()},n.prototype.getCaption=function(){var t;return null!=(t=this.attributes.get("caption"))?t:""},n.prototype.getAttributesForAttachment=function(){return this.attributes.slice(["caption"])},n.prototype.canBeGrouped=function(){return n.__super__.canBeGrouped.apply(this,arguments)&&!this.attachment.hasAttribute("href")},n.prototype.isEqualTo=function(t){var e;return n.__super__.isEqualTo.apply(this,arguments)&&this.attachment.id===(null!=t&&null!=(e=t.attachment)?e.id:void 0)},n.prototype.toString=function(){return k.OBJECT_REPLACEMENT_CHARACTER},n.prototype.toJSON=function(){var t;return(t=n.__super__.toJSON.apply(this,arguments)).attachment=this.attachment,t},n.prototype.getCacheKey=function(){return[n.__super__.getCacheKey.apply(this,arguments),this.attachment.getCacheKey()].join("/")},n.prototype.toConsole=function(){return JSON.stringify(this.toString())},n}(k.Piece))}.call(this),function(){var n,i=function(t,e){function n(){this.constructor=t}for(var i in e)o.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty;n=k.normalizeNewlines,k.Piece.registerType("string",k.StringPiece=function(t){function e(t){e.__super__.constructor.apply(this,arguments),this.string=n(t),this.length=this.string.length}return i(e,t),e.fromJSON=function(t){return new this(t.string,t.attributes)},e.prototype.getValue=function(){return this.string},e.prototype.toString=function(){return this.string.toString()},e.prototype.isBlockBreak=function(){return"\n"===this.toString()&&!0===this.getAttribute("blockBreak")},e.prototype.toJSON=function(){var t;return(t=e.__super__.toJSON.apply(this,arguments)).string=this.string,t},e.prototype.canBeConsolidatedWith=function(t){return null!=t&&this.hasSameConstructorAs(t)&&this.hasSameAttributesAsPiece(t)},e.prototype.consolidateWith=function(t){return new this.constructor(this.toString()+t.toString(),this.attributes)},e.prototype.splitAtOffset=function(t){var e,n;return 0===t?(e=null,n=this):t===this.length?(e=this,n=null):(e=new this.constructor(this.string.slice(0,t),this.attributes),n=new this.constructor(this.string.slice(t),this.attributes)),[e,n]},e.prototype.toConsole=function(){var t;return 15<(t=this.string).length&&(t=t.slice(0,14)+"\u2026"),JSON.stringify(t.toString())},e}(k.Piece))}.call(this),function(){var i,o=function(t,e){function n(){this.constructor=t}for(var i in e)r.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},r={}.hasOwnProperty,u=[].slice;i=k.spliceArray,k.SplittableList=function(t){function e(t){null==t&&(t=[]),e.__super__.constructor.apply(this,arguments),this.objects=t.slice(0),this.length=this.objects.length}var s,n,a;return o(e,t),e.box=function(t){return t instanceof this?t:new this(t)},e.prototype.indexOf=function(t){return this.objects.indexOf(t)},e.prototype.splice=function(){var t;return t=1<=arguments.length?u.call(arguments,0):[],new this.constructor(i.apply(null,[this.objects].concat(u.call(t))))},e.prototype.eachObject=function(t){var e,n,i,o,r,s;for(s=[],n=e=0,i=(r=this.objects).length;e<i;n=++e)o=r[n],s.push(t(o,n));return s},e.prototype.insertObjectAtIndex=function(t,e){return this.splice(e,0,t)},e.prototype.insertSplittableListAtIndex=function(t,e){return this.splice.apply(this,[e,0].concat(u.call(t.objects)))},e.prototype.insertSplittableListAtPosition=function(t,e){var n,i,o;return i=(o=this.splitObjectAtPosition(e))[0],n=o[1],new this.constructor(i).insertSplittableListAtIndex(t,n)},e.prototype.editObjectAtIndex=function(t,e){return this.replaceObjectAtIndex(e(this.objects[t]),t)},e.prototype.replaceObjectAtIndex=function(t,e){return this.splice(e,1,t)},e.prototype.removeObjectAtIndex=function(t){return this.splice(t,1)},e.prototype.getObjectAtIndex=function(t){return this.objects[t]},e.prototype.getSplittableListInRange=function(t){var e,n,i,o;return n=(i=this.splitObjectsAtRange(t))[0],e=i[1],o=i[2],new this.constructor(n.slice(e,o+1))},e.prototype.selectSplittableList=function(o){var r,t;return t=function(){var t,e,n,i;for(i=[],t=0,e=(n=this.objects).length;t<e;t++)r=n[t],o(r)&&i.push(r);return i}.call(this),new this.constructor(t)},e.prototype.removeObjectsInRange=function(t){var e,n,i,o;return n=(i=this.splitObjectsAtRange(t))[0],e=i[1],o=i[2],new this.constructor(n).splice(e,o-e+1)},e.prototype.transformObjectsInRange=function(t,i){var o,r,s,a,e,u,n;return e=this.splitObjectsAtRange(t),a=e[0],r=e[1],u=e[2],n=function(){var t,e,n;for(n=[],o=t=0,e=a.length;t<e;o=++t)s=a[o],n.push(r<=o&&o<=u?i(s):s);return n}(),new this.constructor(n)},e.prototype.splitObjectsAtRange=function(t){var e,n,i,o,r;return n=(o=this.splitObjectAtPosition(a(t)))[0],e=o[1],i=o[2],[n=(r=new this.constructor(n).splitObjectAtPosition(s(t)+i))[0],e,r[1]-1]},e.prototype.getObjectAtPosition=function(t){var e,n;return e=(n=this.findIndexAndOffsetAtPosition(t)).index,n.offset,this.objects[e]},e.prototype.splitObjectAtPosition=function(t){var e,n,i,o,r,s,a,u,l;return e=(r=this.findIndexAndOffsetAtPosition(t)).index,o=r.offset,i=this.objects.slice(0),null!=e?0===o?(u=e,l=0):(n=(s=this.getObjectAtIndex(e).splitAtOffset(o))[0],a=s[1],i.splice(e,1,n,a),u=e+1,l=n.getLength()-o):(u=i.length,l=0),[i,u,l]},e.prototype.consolidate=function(){var t,e,n,i,o,r;for(i=[],o=this.objects[0],t=0,e=(r=this.objects.slice(1)).length;t<e;t++)n=r[t],("function"==typeof o.canBeConsolidatedWith?o.canBeConsolidatedWith(n):void 0)?o=o.consolidateWith(n):(i.push(o),o=n);return null!=o&&i.push(o),new this.constructor(i)},e.prototype.consolidateFromIndexToIndex=function(t,e){var n,i;return i=this.objects.slice(0).slice(t,e+1),n=new this.constructor(i).consolidate().toArray(),this.splice.apply(this,[t,i.length].concat(u.call(n)))},e.prototype.findIndexAndOffsetAtPosition=function(t){var e,n,i,o,r,s;for(i=n=e=0,o=(s=this.objects).length;n<o;i=++n){if(r=e+s[i].getLength(),e<=t&&t<r)return{index:i,offset:t-e};e=r}return{index:null,offset:null}},e.prototype.findPositionAtIndexAndOffset=function(t,e){var n,i,o,r,s,a;for(n=i=s=0,o=(a=this.objects).length;i<o;n=++i)if(r=a[n],n<t)s+=r.getLength();else if(n===t){s+=e;break}return s},e.prototype.getEndPosition=function(){var i,o;return null!=this.endPosition?this.endPosition:this.endPosition=function(){var t,e,n;for(t=o=0,e=(n=this.objects).length;t<e;t++)i=n[t],o+=i.getLength();return o}.call(this)},e.prototype.toString=function(){return this.objects.join("")},e.prototype.toArray=function(){return this.objects.slice(0)},e.prototype.toJSON=function(){return this.toArray()},e.prototype.isEqualTo=function(t){return e.__super__.isEqualTo.apply(this,arguments)||n(this.objects,null!=t?t.objects:void 0)},n=function(t,e){var n,i,o,r,s;if(null==e&&(e=[]),t.length!==e.length)return!1;for(s=!0,i=n=0,o=t.length;n<o;i=++n)r=t[i],s&&!r.isEqualTo(e[i])&&(s=!1);return s},e.prototype.contentsForInspection=function(){var o;return{objects:"["+function(){var t,e,n,i;for(i=[],t=0,e=(n=this.objects).length;t<e;t++)o=n[t],i.push(o.inspect());return i}.call(this).join(", ")+"]"}},a=function(t){return t[0]},s=function(t){return t[1]},e}(k.Object)}.call(this),function(){var e=function(t,e){function n(){this.constructor=t}for(var i in e)o.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty;k.Text=function(t){function n(i){var o;null==i&&(i=[]),n.__super__.constructor.apply(this,arguments),this.pieceList=new k.SplittableList(function(){var t,e,n;for(n=[],t=0,e=i.length;t<e;t++)(o=i[t]).isEmpty()||n.push(o);return n}())}return e(n,t),n.textForAttachmentWithAttributes=function(t,e){return new this([new k.AttachmentPiece(t,e)])},n.textForStringWithAttributes=function(t,e){return new this([new k.StringPiece(t,e)])},n.fromJSON=function(i){var o;return new this(function(){var t,e,n;for(n=[],t=0,e=i.length;t<e;t++)o=i[t],n.push(k.Piece.fromJSON(o));return n}())},n.prototype.copy=function(){return this.copyWithPieceList(this.pieceList)},n.prototype.copyWithPieceList=function(t){return new this.constructor(t.consolidate().toArray())},n.prototype.copyUsingObjectMap=function(r){var s,t;return t=function(){var t,e,n,i,o;for(o=[],t=0,e=(n=this.getPieces()).length;t<e;t++)s=n[t],o.push(null!=(i=r.find(s))?i:s);return o}.call(this),new this.constructor(t)},n.prototype.appendText=function(t){return this.insertTextAtPosition(t,this.getLength())},n.prototype.insertTextAtPosition=function(t,e){return this.copyWithPieceList(this.pieceList.insertSplittableListAtPosition(t.pieceList,e))},n.prototype.removeTextAtRange=function(t){return this.copyWithPieceList(this.pieceList.removeObjectsInRange(t))},n.prototype.replaceTextAtRange=function(t,e){return this.removeTextAtRange(e).insertTextAtPosition(t,e[0])},n.prototype.moveTextFromRangeToPosition=function(t,e){var n,i;if(!(t[0]<=e&&e<=t[1]))return n=(i=this.getTextAtRange(t)).getLength(),t[0]<e&&(e-=n),this.removeTextAtRange(t).insertTextAtPosition(i,e)},n.prototype.addAttributeAtRange=function(t,e,n){var i;return(i={})[t]=e,this.addAttributesAtRange(i,n)},n.prototype.addAttributesAtRange=function(e,t){return this.copyWithPieceList(this.pieceList.transformObjectsInRange(t,function(t){return t.copyWithAdditionalAttributes(e)}))},n.prototype.removeAttributeAtRange=function(e,t){return this.copyWithPieceList(this.pieceList.transformObjectsInRange(t,function(t){return t.copyWithoutAttribute(e)}))},n.prototype.setAttributesAtRange=function(e,t){return this.copyWithPieceList(this.pieceList.transformObjectsInRange(t,function(t){return t.copyWithAttributes(e)}))},n.prototype.getAttributesAtPosition=function(t){var e,n;return null!=(e=null!=(n=this.pieceList.getObjectAtPosition(t))?n.getAttributes():void 0)?e:{}},n.prototype.getCommonAttributes=function(){var t,o;return t=function(){var t,e,n,i;for(i=[],t=0,e=(n=this.pieceList.toArray()).length;t<e;t++)o=n[t],i.push(o.getAttributes());return i}.call(this),k.Hash.fromCommonAttributesOfObjects(t).toObject()},n.prototype.getCommonAttributesAtRange=function(t){var e;return null!=(e=this.getTextAtRange(t).getCommonAttributes())?e:{}},n.prototype.getExpandedRangeForAttributeAtOffset=function(t,e){var n,i,o;for(n=o=e,i=this.getLength();0<n&&this.getCommonAttributesAtRange([n-1,o])[t];)n--;for(;o<i&&this.getCommonAttributesAtRange([e,o+1])[t];)o++;return[n,o]},n.prototype.getTextAtRange=function(t){return this.copyWithPieceList(this.pieceList.getSplittableListInRange(t))},n.prototype.getStringAtRange=function(t){return this.pieceList.getSplittableListInRange(t).toString()},n.prototype.getStringAtPosition=function(t){return this.getStringAtRange([t,t+1])},n.prototype.startsWithString=function(t){return this.getStringAtRange([0,t.length])===t},n.prototype.endsWithString=function(t){var e;return e=this.getLength(),this.getStringAtRange([e-t.length,e])===t},n.prototype.getAttachmentPieces=function(){var t,e,n,i,o;for(o=[],t=0,e=(i=this.pieceList.toArray()).length;t<e;t++)null!=(n=i[t]).attachment&&o.push(n);return o},n.prototype.getAttachments=function(){var t,e,n,i,o;for(o=[],t=0,e=(i=this.getAttachmentPieces()).length;t<e;t++)n=i[t],o.push(n.attachment);return o},n.prototype.getAttachmentAndPositionById=function(t){var e,n,i,o,r,s;for(e=o=0,n=(r=this.pieceList.toArray()).length;e<n;e++){if((null!=(s=(i=r[e]).attachment)?s.id:void 0)===t)return{attachment:i.attachment,position:o};o+=i.length}return{attachment:null,position:null}},n.prototype.getAttachmentById=function(t){var e,n;return e=(n=this.getAttachmentAndPositionById(t)).attachment,n.position,e},n.prototype.getRangeOfAttachment=function(t){var e,n;return t=(n=this.getAttachmentAndPositionById(t.id)).attachment,e=n.position,null!=t?[e,e+1]:void 0},n.prototype.updateAttributesForAttachment=function(t,e){var n;return(n=this.getRangeOfAttachment(e))?this.addAttributesAtRange(t,n):this},n.prototype.getLength=function(){return this.pieceList.getEndPosition()},n.prototype.isEmpty=function(){return 0===this.getLength()},n.prototype.isEqualTo=function(t){var e;return n.__super__.isEqualTo.apply(this,arguments)||(null!=t&&null!=(e=t.pieceList)?e.isEqualTo(this.pieceList):void 0)},n.prototype.isBlockBreak=function(){return 1===this.getLength()&&this.pieceList.getObjectAtIndex(0).isBlockBreak()},n.prototype.eachPiece=function(t){return this.pieceList.eachObject(t)},n.prototype.getPieces=function(){return this.pieceList.toArray()},n.prototype.getPieceAtPosition=function(t){return this.pieceList.getObjectAtPosition(t)},n.prototype.contentsForInspection=function(){return{pieceList:this.pieceList.inspect()}},n.prototype.toSerializableText=function(){var t;return t=this.pieceList.selectSplittableList(function(t){return t.isSerializable()}),this.copyWithPieceList(t)},n.prototype.toString=function(){return this.pieceList.toString()},n.prototype.toJSON=function(){return this.pieceList.toJSON()},n.prototype.toConsole=function(){var o;return JSON.stringify(function(){var t,e,n,i;for(i=[],t=0,e=(n=this.pieceList.toArray()).length;t<e;t++)o=n[t],i.push(JSON.parse(o.toConsole()));return i}.call(this))},n}(k.Object)}.call(this),function(){var h,d,p,f,m=function(t,e){function n(){this.constructor=t}for(var i in e)o.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty,g=[].slice,v=[].indexOf||function(t){for(var e=0,n=this.length;e<n;e++)if(e in this&&this[e]===t)return e;return-1};h=k.arraysAreEqual,f=k.spliceArray,d=k.getBlockConfig,k.getBlockAttributeNames,p=k.getListAttributeNames,k.Block=function(t){function n(t,e){null==t&&(t=new k.Text),null==e&&(e=[]),n.__super__.constructor.apply(this,arguments),this.text=i(t),this.attributes=e}var e,i,o,r,s,a,u,l,c;return m(n,t),n.fromJSON=function(t){return new this(k.Text.fromJSON(t.text),t.attributes)},n.prototype.isEmpty=function(){return this.text.isBlockBreak()},n.prototype.isEqualTo=function(t){
return n.__super__.isEqualTo.apply(this,arguments)||this.text.isEqualTo(null!=t?t.text:void 0)&&h(this.attributes,null!=t?t.attributes:void 0)},n.prototype.copyWithText=function(t){return new this.constructor(t,this.attributes)},n.prototype.copyWithoutText=function(){return this.copyWithText(null)},n.prototype.copyWithAttributes=function(t){return new this.constructor(this.text,t)},n.prototype.copyUsingObjectMap=function(t){var e;return this.copyWithText((e=t.find(this.text))?e:this.text.copyUsingObjectMap(t))},n.prototype.addAttribute=function(t){var e;return e=this.attributes.concat(r(t)),this.copyWithAttributes(e)},n.prototype.removeAttribute=function(t){var e,n;return n=d(t).listAttribute,e=a(a(this.attributes,t),n),this.copyWithAttributes(e)},n.prototype.removeLastAttribute=function(){return this.removeAttribute(this.getLastAttribute())},n.prototype.getLastAttribute=function(){return s(this.attributes)},n.prototype.getAttributes=function(){return this.attributes.slice(0)},n.prototype.getAttributeLevel=function(){return this.attributes.length},n.prototype.getAttributeAtLevel=function(t){return this.attributes[t-1]},n.prototype.hasAttributes=function(){return 0<this.getAttributeLevel()},n.prototype.getLastNestableAttribute=function(){return s(this.getNestableAttributes())},n.prototype.getNestableAttributes=function(){var t,e,n,i,o;for(o=[],e=0,n=(i=this.attributes).length;e<n;e++)t=i[e],d(t).nestable&&o.push(t);return o},n.prototype.getNestingLevel=function(){return this.getNestableAttributes().length},n.prototype.decreaseNestingLevel=function(){var t;return(t=this.getLastNestableAttribute())?this.removeAttribute(t):this},n.prototype.increaseNestingLevel=function(){var t,e,n;return(t=this.getLastNestableAttribute())?(n=this.attributes.lastIndexOf(t),e=f.apply(null,[this.attributes,n+1,0].concat(g.call(r(t)))),this.copyWithAttributes(e)):this},n.prototype.getListItemAttributes=function(){var t,e,n,i,o;for(o=[],e=0,n=(i=this.attributes).length;e<n;e++)t=i[e],d(t).listAttribute&&o.push(t);return o},n.prototype.isListItem=function(){var t;return null!=(t=d(this.getLastAttribute()))?t.listAttribute:void 0},n.prototype.isTerminalBlock=function(){var t;return null!=(t=d(this.getLastAttribute()))?t.terminal:void 0},n.prototype.breaksOnReturn=function(){var t;return null!=(t=d(this.getLastAttribute()))?t.breakOnReturn:void 0},n.prototype.findLineBreakInDirectionFromPosition=function(t,e){var n,i;return i=this.toString(),-1!==(n=function(){switch(t){case"forward":return i.indexOf("\n",e);case"backward":return i.slice(0,e).lastIndexOf("\n")}}())?n:void 0},n.prototype.contentsForInspection=function(){return{text:this.text.inspect(),attributes:this.attributes}},n.prototype.toString=function(){return this.text.toString()},n.prototype.toJSON=function(){return{text:this.text,attributes:this.attributes}},n.prototype.getLength=function(){return this.text.getLength()},n.prototype.canBeConsolidatedWith=function(t){return!this.hasAttributes()&&!t.hasAttributes()},n.prototype.consolidateWith=function(t){var e,n;return e=k.Text.textForStringWithAttributes("\n"),n=this.getTextWithoutBlockBreak().appendText(e),this.copyWithText(n.appendText(t.text))},n.prototype.splitAtOffset=function(t){var e,n;return 0===t?(e=null,n=this):t===this.getLength()?(e=this,n=null):(e=this.copyWithText(this.text.getTextAtRange([0,t])),n=this.copyWithText(this.text.getTextAtRange([t,this.getLength()]))),[e,n]},n.prototype.getBlockBreakPosition=function(){return this.text.getLength()-1},n.prototype.getTextWithoutBlockBreak=function(){return u(this.text)?this.text.getTextAtRange([0,this.getBlockBreakPosition()]):this.text.copy()},n.prototype.canBeGrouped=function(t){return this.attributes[t]},n.prototype.canBeGroupedWith=function(t,e){var n,i,o,r;return i=(o=t.getAttributes())[e],(n=this.attributes[e])===i&&!(!1===d(n).group&&(r=o[e+1],v.call(p(),r)<0))},i=function(t){return t=c(t),e(t)},c=function(t){var e,i,n,o,r,s;return o=!1,s=t.getPieces(),i=2<=s.length?g.call(s,0,e=s.length-1):(e=0,[]),null==(n=s[e++])?t:(i=function(){var t,e,n;for(n=[],t=0,e=i.length;t<e;t++)(r=i[t]).isBlockBreak()?(o=!0,n.push(l(r))):n.push(r);return n}(),o?new k.Text(g.call(i).concat([n])):t)},o=k.Text.textForStringWithAttributes("\n",{blockBreak:!0}),e=function(t){return u(t)?t:t.appendText(o)},u=function(t){var e;return 0!==(e=t.getLength())&&t.getTextAtRange([e-1,e]).isBlockBreak()},l=function(t){return t.copyWithoutAttribute("blockBreak")},r=function(t){var e;return null!=(e=d(t).listAttribute)?[e,t]:[t]},s=function(t){return t.slice(-1)[0]},a=function(t,e){var n;return-1===(n=t.lastIndexOf(e))?t:f(t,n,1)},n}(k.Object)}.call(this),function(){var o,s,a,u=function(t,e){function n(){this.constructor=t}for(var i in e)r.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},r={}.hasOwnProperty,l=[].slice,c=[].indexOf||function(t){for(var e=0,n=this.length;e<n;e++)if(e in this&&this[e]===t)return e;return-1};s=k.tagName,a=k.walkTree,o=k.nodeIsAttachmentElement,k.HTMLSanitizer=function(t){function e(t,e){this.allowedAttributes=(null!=e?e:{}).allowedAttributes,null==this.allowedAttributes&&(this.allowedAttributes=n),this.body=i(t)}var n,i,r;return u(e,t),n="style href src width height class".split(" "),e.sanitize=function(t,e){var n;return(n=new this(t,e)).sanitize(),n},e.prototype.sanitize=function(){return this.sanitizeElements()},e.prototype.getHTML=function(){return this.body.innerHTML},e.prototype.getBody=function(){return this.body},e.prototype.sanitizeElements=function(){var t,e,n,i,o;for(o=a(this.body),i=[];o.nextNode();)switch(n=o.currentNode,n.nodeType){case Node.ELEMENT_NODE:r(n)?i.push(n):this.sanitizeElement(n);break;case Node.COMMENT_NODE:i.push(n)}for(t=0,e=i.length;t<e;t++)(n=i[t]).parentNode.removeChild(n);return this.body},e.prototype.sanitizeElement=function(t){var e,n,i,o;for(e=0,n=(o=l.call(t.attributes)).length;e<n;e++)i=o[e].name,0<=c.call(this.allowedAttributes,i)||0===i.indexOf("data-trix")||t.removeAttribute(i);return t},r=function(t){return(null!=t?t.nodeType:void 0)!==Node.ELEMENT_NODE||o(t)?void 0:"script"===s(t)||"false"===t.getAttribute("data-trix-serialize")},i=function(t){var e,n,i,o,r;for(null==t&&(t=""),t=t.replace(/<\/html[^>]*>[^]*$/i,"</html>"),(e=document.implementation.createHTMLDocument("")).documentElement.innerHTML=t,i=0,o=(r=e.head.querySelectorAll("style")).length;i<o;i++)n=r[i],e.body.appendChild(n);return e.body},e}(k.BasicObject)}.call(this),function(){var f,m,g,v,y,_,b,w,x,A,E,C=function(t,e){function n(){this.constructor=t}for(var i in e)o.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty,T=[].indexOf||function(t){for(var e=0,n=this.length;e<n;e++)if(e in this&&this[e]===t)return e;return-1};f=k.arraysAreEqual,_=k.makeElement,A=k.tagName,y=k.getBlockTagNames,E=k.walkTree,v=k.findClosestElementFromNode,g=k.elementContainsNode,b=k.nodeIsAttachmentElement,w=k.normalizeSpaces,m=k.breakableWhitespacePattern,x=k.squishBreakableWhitespace,k.HTMLParser=function(t){function e(t,e){this.html=t,this.referenceElement=(null!=e?e:{}).referenceElement,this.blocks=[],this.blockElements=[],this.processedElements=[]}var i,o,s,r,a,u,l,n,c,h,d,p;return C(e,t),e.parse=function(t,e){var n;return(n=new this(t,e)).parse(),n},e.prototype.getDocument=function(){return k.Document.fromJSON(this.blocks)},e.prototype.parse=function(){var t,e;try{for(this.createHiddenContainer(),t=k.HTMLSanitizer.sanitize(this.html).getHTML(),this.containerElement.innerHTML=t,e=E(this.containerElement,{usingFilter:n});e.nextNode();)this.processNode(e.currentNode);return this.translateBlockElementMarginsToNewlines()}finally{this.removeHiddenContainer()}},e.prototype.createHiddenContainer=function(){return this.referenceElement?(this.containerElement=this.referenceElement.cloneNode(!1),this.containerElement.removeAttribute("id"),this.containerElement.setAttribute("data-trix-internal",""),this.containerElement.style.display="none",this.referenceElement.parentNode.insertBefore(this.containerElement,this.referenceElement.nextSibling)):(this.containerElement=_({tagName:"div",style:{display:"none"}}),document.body.appendChild(this.containerElement))},e.prototype.removeHiddenContainer=function(){return this.containerElement.parentNode.removeChild(this.containerElement)},n=function(t){return"style"===A(t)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT},e.prototype.processNode=function(t){switch(t.nodeType){case Node.TEXT_NODE:return this.processTextNode(t);case Node.ELEMENT_NODE:return this.appendBlockForElement(t),this.processElement(t)}},e.prototype.appendBlockForElement=function(t){var e,n,i,o;if(i=this.isBlockElement(t),n=g(this.currentBlockElement,t),i&&!this.isBlockElement(t.firstChild)){if(!(this.isInsignificantTextNode(t.firstChild)&&this.isBlockElement(t.firstElementChild)||(e=this.getBlockAttributes(t),n&&f(e,this.currentBlock.attributes))))return this.currentBlock=this.appendBlockForAttributesWithElement(e,t),this.currentBlockElement=t}else if(this.currentBlockElement&&!n&&!i)return(o=this.findParentBlockElement(t))?this.appendBlockForElement(o):(this.currentBlock=this.appendEmptyBlock(),this.currentBlockElement=null)},e.prototype.findParentBlockElement=function(t){var e;for(e=t.parentElement;e&&e!==this.containerElement;){if(this.isBlockElement(e)&&0<=T.call(this.blockElements,e))return e;e=e.parentElement}return null},e.prototype.processTextNode=function(t){var e,n;return this.isInsignificantTextNode(t)?void 0:(n=t.data,o(t.parentNode)||(n=x(n),d(null!=(e=t.previousSibling)?e.textContent:void 0)&&(n=u(n))),this.appendStringWithAttributes(n,this.getTextAttributes(t.parentNode)))},e.prototype.processElement=function(t){var e,n,i,o,r;if(b(t))return e=s(t),Object.keys(e).length&&(o=this.getTextAttributes(t),this.appendAttachmentWithAttributes(e,o),t.innerHTML=""),this.processedElements.push(t);switch(A(t)){case"br":return this.isExtraBR(t)||this.isBlockElement(t.nextSibling)||this.appendStringWithAttributes("\n",this.getTextAttributes(t)),this.processedElements.push(t);case"img":for(n in e={url:t.getAttribute("src"),contentType:"image"},i=a(t))r=i[n],e[n]=r;return this.appendAttachmentWithAttributes(e,this.getTextAttributes(t)),this.processedElements.push(t);case"tr":if(t.parentNode.firstChild!==t)return this.appendStringWithAttributes("\n");break;case"td":if(t.parentNode.firstChild!==t)return this.appendStringWithAttributes(" | ")}},e.prototype.appendBlockForAttributesWithElement=function(t,e){var n;return this.blockElements.push(e),n=i(t),this.blocks.push(n),n},e.prototype.appendEmptyBlock=function(){return this.appendBlockForAttributesWithElement([],null)},e.prototype.appendStringWithAttributes=function(t,e){return this.appendPiece(h(t,e))},e.prototype.appendAttachmentWithAttributes=function(t,e){return this.appendPiece(c(t,e))},e.prototype.appendPiece=function(t){return 0===this.blocks.length&&this.appendEmptyBlock(),this.blocks[this.blocks.length-1].text.push(t)},e.prototype.appendStringToTextAtIndex=function(t,e){var n,i;return"string"===(null!=(n=(i=this.blocks[e].text)[i.length-1])?n.type:void 0)?n.string+=t:i.push(h(t))},e.prototype.prependStringToTextAtIndex=function(t,e){var n,i;return"string"===(null!=(n=(i=this.blocks[e].text)[0])?n.type:void 0)?n.string=t+n.string:i.unshift(h(t))},h=function(t,e){var n;return null==e&&(e={}),n="string",{string:t=w(t),attributes:e,type:n}},c=function(t,e){return null==e&&(e={}),{attachment:t,attributes:e,type:"attachment"}},i=function(t){return null==t&&(t={}),{text:[],attributes:t}},e.prototype.getTextAttributes=function(t){var e,n,i,o,r,s,a,u,l,c,h,d,p;for(e in i={},c=k.config.textAttributes)if((r=c[e]).tagName&&v(t,{matchingSelector:r.tagName,untilNode:this.containerElement}))i[e]=!0;else if(r.parser){if(p=r.parser(t)){for(n=!1,s=0,l=(h=this.findBlockElementAncestors(t)).length;s<l;s++)if(o=h[s],r.parser(o)===p){n=!0;break}n||(i[e]=p)}}else r.styleProperty&&(p=t.style[r.styleProperty])&&(i[e]=p);if(b(t)&&(a=t.getAttribute("data-trix-attributes")))for(u in d=JSON.parse(a))p=d[u],i[u]=p;return i},e.prototype.getBlockAttributes=function(t){var e,n,i,o;for(n=[];t&&t!==this.containerElement;){for(e in o=k.config.blockAttributes)!1!==(i=o[e]).parse&&A(t)===i.tagName&&(("function"==typeof i.test?i.test(t):void 0)||!i.test)&&(n.push(e),i.listAttribute&&n.push(i.listAttribute));t=t.parentNode}return n.reverse()},e.prototype.findBlockElementAncestors=function(t){var e,n;for(e=[];t&&t!==this.containerElement;)n=A(t),0<=T.call(y(),n)&&e.push(t),t=t.parentNode;return e},s=function(t){return JSON.parse(t.getAttribute("data-trix-attachment"))},a=function(t){var e,n,i;return i=t.getAttribute("width"),n=t.getAttribute("height"),e={},i&&(e.width=parseInt(i,10)),n&&(e.height=parseInt(n,10)),e},e.prototype.isBlockElement=function(t){var e;if((null!=t?t.nodeType:void 0)===Node.ELEMENT_NODE&&!v(t,{matchingSelector:"td",untilNode:this.containerElement}))return e=A(t),0<=T.call(y(),e)||"block"===window.getComputedStyle(t).display},e.prototype.isInsignificantTextNode=function(t){var e,n,i;if((null!=t?t.nodeType:void 0)===Node.TEXT_NODE&&p(t.data)&&(n=t.parentNode,i=t.previousSibling,e=t.nextSibling,(!l(n.previousSibling)||this.isBlockElement(n.previousSibling))&&!o(n)))return!i||this.isBlockElement(i)||!e||this.isBlockElement(e)},e.prototype.isExtraBR=function(t){return"br"===A(t)&&this.isBlockElement(t.parentNode)&&t.parentNode.lastChild===t},o=function(t){var e;return"pre"===(e=window.getComputedStyle(t).whiteSpace)||"pre-wrap"===e||"pre-line"===e},l=function(t){return t&&!d(t.textContent)},e.prototype.translateBlockElementMarginsToNewlines=function(){var t,e,n,i,o,r,s;for(t=this.getMarginOfDefaultBlockElement(),s=[],n=e=0,i=(r=this.blocks).length;e<i;n=++e)r[n],(o=this.getMarginOfBlockElementAtIndex(n))&&(o.top>2*t.top&&this.prependStringToTextAtIndex("\n",n),s.push(o.bottom>2*t.bottom?this.appendStringToTextAtIndex("\n",n):void 0));return s},e.prototype.getMarginOfBlockElementAtIndex=function(t){var e,n;return!(e=this.blockElements[t])||!e.textContent||(n=A(e),0<=T.call(y(),n)||0<=T.call(this.processedElements,e))?void 0:r(e)},e.prototype.getMarginOfDefaultBlockElement=function(){var t;return t=_(k.config.blockAttributes["default"].tagName),this.containerElement.appendChild(t),r(t)},r=function(t){var e;return"block"===(e=window.getComputedStyle(t)).display?{top:parseInt(e.marginTop),bottom:parseInt(e.marginBottom)}:void 0},u=function(t){return t.replace(RegExp("^"+m.source+"+"),"")},p=function(t){return RegExp("^"+m.source+"*$").test(t)},d=function(t){return/\s$/.test(t)},e}(k.BasicObject)}.call(this),function(){var f,a,_,b,n=function(t,e){function n(){this.constructor=t}for(var i in e)o.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty,d=[].slice,p=[].indexOf||function(t){for(var e=0,n=this.length;e<n;e++)if(e in this&&this[e]===t)return e;return-1};f=k.arraysAreEqual,_=k.normalizeRange,b=k.rangeIsCollapsed,a=k.getBlockConfig,k.Document=function(t){function e(t){null==t&&(t=[]),e.__super__.constructor.apply(this,arguments),0===t.length&&(t=[new k.Block]),this.blockList=k.SplittableList.box(t)}var h;return n(e,t),e.fromJSON=function(i){var o;return new this(function(){var t,e,n;for(n=[],t=0,e=i.length;t<e;t++)o=i[t],n.push(k.Block.fromJSON(o));return n}())},e.fromHTML=function(t,e){return k.HTMLParser.parse(t,e).getDocument()},e.fromString=function(t,e){var n;return n=k.Text.textForStringWithAttributes(t,e),new this([new k.Block(n)])},e.prototype.isEmpty=function(){var t;return 1===this.blockList.length&&((t=this.getBlockAtIndex(0)).isEmpty()&&!t.hasAttributes())},e.prototype.copy=function(t){var e;return null==t&&(t={}),e=t.consolidateBlocks?this.blockList.consolidate().toArray():this.blockList.toArray(),new this.constructor(e)},e.prototype.copyUsingObjectsFromDocument=function(t){var e;return e=new k.ObjectMap(t.getObjects()),this.copyUsingObjectMap(e)},e.prototype.copyUsingObjectMap=function(o){var r,t,s;return t=function(){var t,e,n,i;for(i=[],t=0,e=(n=this.getBlocks()).length;t<e;t++)r=n[t],i.push((s=o.find(r))?s:r.copyUsingObjectMap(o));return i}.call(this),new this.constructor(t)},e.prototype.copyWithBaseBlockAttributes=function(o){var r,s,t;return null==o&&(o=[]),t=function(){var t,e,n,i;for(i=[],t=0,e=(n=this.getBlocks()).length;t<e;t++)s=n[t],r=o.concat(s.getAttributes()),i.push(s.copyWithAttributes(r));return i}.call(this),new this.constructor(t)},e.prototype.replaceBlock=function(t,e){var n;return-1===(n=this.blockList.indexOf(t))?this:new this.constructor(this.blockList.replaceObjectAtIndex(e,n))},e.prototype.insertDocumentAtRange=function(t,e){var n,i,o,r,s,a,u;return i=t.blockList,s=(e=_(e))[0],o=(a=this.locationFromPosition(s)).index,r=a.offset,n=(u=this).getBlockAtPosition(s),b(e)&&n.isEmpty()&&!n.hasAttributes()?u=new this.constructor(u.blockList.removeObjectAtIndex(o)):n.getBlockBreakPosition()===r&&s++,u=u.removeTextAtRange(e),new this.constructor(u.blockList.insertSplittableListAtPosition(i,s))},e.prototype.mergeDocumentAtRange=function(t,e){var n,i,o,r,s,a,u,l,c,h,d,p;return d=(e=_(e))[0],h=this.locationFromPosition(d),i=this.getBlockAtIndex(h.index).getAttributes(),n=t.getBaseBlockAttributes(),p=i.slice(-n.length),f(n,p)?(u=i.slice(0,-n.length),a=t.copyWithBaseBlockAttributes(u)):a=t.copy({consolidateBlocks:!0}).copyWithBaseBlockAttributes(i),o=a.getBlockCount(),r=a.getBlockAtIndex(0),f(i,r.getAttributes())?(s=r.getTextWithoutBlockBreak(),c=this.insertTextAtRange(s,e),1<o&&(a=new this.constructor(a.getBlocks().slice(1)),l=d+s.getLength(),c=c.insertDocumentAtRange(a,l))):c=this.insertDocumentAtRange(a,e),c},e.prototype.insertTextAtRange=function(e,t){var n,i,o,r,s;return s=(t=_(t))[0],i=(r=this.locationFromPosition(s)).index,o=r.offset,n=this.removeTextAtRange(t),new this.constructor(n.blockList.editObjectAtIndex(i,function(t){return t.copyWithText(t.text.insertTextAtPosition(e,o))}))},e.prototype.removeTextAtRange=function(t){var e,n,i,o,r,s,a,u,l,c,h,d,p,f,m,g,v,y;return u=(c=t=_(t))[0],g=c[1],b(t)?this:(s=(h=this.locationRangeFromRange(t))[0],f=h[1],r=s.index,a=s.offset,o=this.getBlockAtIndex(r),p=f.index,m=f.offset,d=this.getBlockAtIndex(p),g-u==1&&o.getBlockBreakPosition()===a&&d.getBlockBreakPosition()!==m&&"\n"===d.text.getStringAtPosition(m)?i=this.blockList.editObjectAtIndex(p,function(t){return t.copyWithText(t.text.removeTextAtRange([m,m+1]))}):(l=o.text.getTextAtRange([0,a]),v=d.text.getTextAtRange([m,d.getLength()]),y=l.appendText(v),n=r!==p&&0===a&&o.getAttributeLevel()>=d.getAttributeLevel()?d.copyWithText(y):o.copyWithText(y),e=p+1-r,i=this.blockList.splice(r,e,n)),new this.constructor(i))},e.prototype.moveTextFromRangeToPosition=function(t,e){var n,i,o,r,s,a,u,l,c,h;if(c=(a=t=_(t))[0],o=a[1],c<=e&&e<=o)return this;if(i=this.getDocumentAtRange(t),l=this.removeTextAtRange(t),(s=c<e)&&(e-=i.getLength()),!l.firstBlockInRangeIsEntirelySelected(t)){if(r=(u=i.getBlocks())[0],0===(n=2<=u.length?d.call(u,1):[]).length?(h=r.getTextWithoutBlockBreak(),s&&(e+=1)):h=r.text,l=l.insertTextAtRange(h,e),0===n.length)return l;i=new this.constructor(n),e+=h.getLength()}return l.insertDocumentAtRange(i,e)},e.prototype.addAttributeAtRange=function(i,o,t){var r;return r=this.blockList,this.eachBlockAtRange(t,function(t,e,n){return r=r.editObjectAtIndex(n,function(){return a(i)?t.addAttribute(i,o):e[0]===e[1]?t:t.copyWithText(t.text.addAttributeAtRange(i,o,e))})}),new this.constructor(r)},e.prototype.addAttribute=function(n,i){var o;return o=this.blockList,this.eachBlock(function(t,e){return o=o.editObjectAtIndex(e,function(){return t.addAttribute(n,i)})}),new this.constructor(o)},e.prototype.removeAttributeAtRange=function(i,t){var o;return o=this.blockList,this.eachBlockAtRange(t,function(t,e,n){return a(i)?o=o.editObjectAtIndex(n,function(){return t.removeAttribute(i)}):e[0]!==e[1]?o=o.editObjectAtIndex(n,function(){return t.copyWithText(t.text.removeAttributeAtRange(i,e))}):void 0}),new this.constructor(o)},e.prototype.updateAttributesForAttachment=function(e,n){var t,i,o;return i=this.getRangeOfAttachment(n)[0],t=this.locationFromPosition(i).index,o=this.getTextAtIndex(t),new this.constructor(this.blockList.editObjectAtIndex(t,function(t){return t.copyWithText(o.updateAttributesForAttachment(e,n))}))},e.prototype.removeAttributeForAttachment=function(t,e){var n;return n=this.getRangeOfAttachment(e),this.removeAttributeAtRange(t,n)},e.prototype.insertBlockBreakAtRange=function(t){var e,n,i,o;return o=(t=_(t))[0],i=this.locationFromPosition(o).offset,n=this.removeTextAtRange(t),0===i&&(e=[new k.Block]),new this.constructor(n.blockList.insertSplittableListAtPosition(new k.SplittableList(e),o))},e.prototype.applyBlockAttributeAtRange=function(t,e,n){var i,o,r,s;return o=(r=this.expandRangeToLineBreaksAndSplitBlocks(n)).document,n=r.range,(i=a(t)).listAttribute?(o=(s=(o=o.removeLastListAttributeAtRange(n,{exceptAttributeName:t})).convertLineBreaksToBlockBreaksInRange(n)).document,n=s.range):o=i.terminal?o.removeLastTerminalAttributeAtRange(n):o.consolidateBlocksAtRange(n),o.addAttributeAtRange(t,e,n)},e.prototype.removeLastListAttributeAtRange=function(t,o){var r;return null==o&&(o={}),r=this.blockList,this.eachBlockAtRange(t,function(t,e,n){var i;if((i=t.getLastAttribute())&&a(i).listAttribute&&i!==o.exceptAttributeName)return r=r.editObjectAtIndex(n,function(){return t.removeAttribute(i)})}),new this.constructor(r)},e.prototype.removeLastTerminalAttributeAtRange=function(t){var o;return o=this.blockList,this.eachBlockAtRange(t,function(t,e,n){var i;if((i=t.getLastAttribute())&&a(i).terminal)return o=o.editObjectAtIndex(n,function(){return t.removeAttribute(i)})}),new this.constructor(o)},e.prototype.firstBlockInRangeIsEntirelySelected=function(t){var e,n,i,o,r,s;return s=(o=t=_(t))[0],e=o[1],n=this.locationFromPosition(s),r=this.locationFromPosition(e),0===n.offset&&n.index<r.index||n.index===r.index&&(i=this.getBlockAtIndex(n.index).getLength(),0===n.offset&&r.offset===i)},e.prototype.expandRangeToLineBreaksAndSplitBlocks=function(t){var e,n,i,o,r,s,a,u,l;return l=(s=t=_(t))[0],o=s[1],u=this.locationFromPosition(l),i=this.locationFromPosition(o),a=(e=this).getBlockAtIndex(u.index),null!=(u.offset=a.findLineBreakInDirectionFromPosition("backward",u.offset))&&(r=e.positionFromLocation(u),e=e.insertBlockBreakAtRange([r,r+1]),i.index+=1,i.offset-=e.getBlockAtIndex(u.index).getLength(),u.index+=1),(u.offset=0)===i.offset&&i.index>u.index?(i.index-=1,i.offset=e.getBlockAtIndex(i.index).getBlockBreakPosition()):("\n"===(n=e.getBlockAtIndex(i.index)).text.getStringAtRange([i.offset-1,i.offset])?i.offset-=1:i.offset=n.findLineBreakInDirectionFromPosition("forward",i.offset),i.offset!==n.getBlockBreakPosition()&&(r=e.positionFromLocation(i),e=e.insertBlockBreakAtRange([r,r+1]))),l=e.positionFromLocation(u),o=e.positionFromLocation(i),{document:e,range:t=_([l,o])}},e.prototype.convertLineBreaksToBlockBreaksInRange=function(t){var e,n,i;return n=(t=_(t))[0],i=this.getStringAtRange(t).slice(0,-1),e=this,i.replace(/.*?\n/g,function(t){return n+=t.length,e=e.insertBlockBreakAtRange([n-1,n])}),{document:e,range:t}},e.prototype.consolidateBlocksAtRange=function(t){var e,n,i,o,r;return r=(i=t=_(t))[0],n=i[1],o=this.locationFromPosition(r).index,e=this.locationFromPosition(n).index,new this.constructor(this.blockList.consolidateFromIndexToIndex(o,e))},e.prototype.getDocumentAtRange=function(t){var e;return t=_(t),e=this.blockList.getSplittableListInRange(t).toArray(),new this.constructor(e)},e.prototype.getStringAtRange=function(t){var e,n;return(n=t=_(t))[n.length-1]!==this.getLength()&&(e=-1),this.getDocumentAtRange(t).toString().slice(0,e)},e.prototype.getBlockAtIndex=function(t){return this.blockList.getObjectAtIndex(t)},e.prototype.getBlockAtPosition=function(t){var e;return e=this.locationFromPosition(t).index,this.getBlockAtIndex(e)},e.prototype.getTextAtIndex=function(t){var e;return null!=(e=this.getBlockAtIndex(t))?e.text:void 0},e.prototype.getTextAtPosition=function(t){var e;return e=this.locationFromPosition(t).index,this.getTextAtIndex(e)},e.prototype.getPieceAtPosition=function(t){var e,n,i;return e=(i=this.locationFromPosition(t)).index,n=i.offset,this.getTextAtIndex(e).getPieceAtPosition(n)},e.prototype.getCharacterAtPosition=function(t){var e,n,i;return e=(i=this.locationFromPosition(t)).index,n=i.offset,this.getTextAtIndex(e).getStringAtRange([n,n+1])},e.prototype.getLength=function(){return this.blockList.getEndPosition()},e.prototype.getBlocks=function(){return this.blockList.toArray()},e.prototype.getBlockCount=function(){return this.blockList.length},e.prototype.getEditCount=function(){return this.editCount},e.prototype.eachBlock=function(t){return this.blockList.eachObject(t)},e.prototype.eachBlockAtRange=function(t,e){var n,i,o,r,s,a,u,l,c,h,d,p;if(d=(a=t=_(t))[0],o=a[1],h=this.locationFromPosition(d),i=this.locationFromPosition(o),h.index===i.index)return n=this.getBlockAtIndex(h.index),p=[h.offset,i.offset],e(n,p,h.index);for(c=[],s=r=u=h.index,l=i.index;u<=l?r<=l:l<=r;s=u<=l?++r:--r)(n=this.getBlockAtIndex(s))?(p=function(){switch(s){case h.index:return[h.offset,n.text.getLength()];case i.index:return[0,i.offset];default:return[0,n.text.getLength()]}}(),c.push(e(n,p,s))):c.push(void 0);return c},e.prototype.getCommonAttributesAtRange=function(t){var n,e,i;return e=(t=_(t))[0],b(t)?this.getCommonAttributesAtPosition(e):(i=[],n=[],this.eachBlockAtRange(t,function(t,e){return e[0]!==e[1]?(i.push(t.text.getCommonAttributesAtRange(e)),n.push(h(t))):void 0}),k.Hash.fromCommonAttributesOfObjects(i).merge(k.Hash.fromCommonAttributesOfObjects(n)).toObject())},e.prototype.getCommonAttributesAtPosition=function(t){var e,n,i,o,r,s,a,u,l,c;if(r=(l=this.locationFromPosition(t)).index,u=l.offset,!(i=this.getBlockAtIndex(r)))return{};for(a in o=h(i),e=i.text.getAttributesAtPosition(u),n=i.text.getAttributesAtPosition(u-1),s=function(){var t,e;for(a in e=[],t=k.config.textAttributes)(c=t[a]).inheritable&&e.push(a);return e}(),n)((c=n[a])===e[a]||0<=p.call(s,a))&&(o[a]=c);return o},e.prototype.getRangeOfCommonAttributeAtPosition=function(t,e){var n,i,o,r,s,a,u,l;return o=(s=this.locationFromPosition(e)).index,r=s.offset,l=(a=this.getTextAtIndex(o).getExpandedRangeForAttributeAtOffset(t,r))[0],i=a[1],u=this.positionFromLocation({index:o,offset:l}),n=this.positionFromLocation({index:o,offset:i}),_([u,n])},e.prototype.getBaseBlockAttributes=function(){var i,o,t,e,r,s,n;for(i=this.getBlockAtIndex(0).getAttributes(),t=e=1,n=this.getBlockCount();1<=n?e<n:n<e;t=1<=n?++e:--e)o=this.getBlockAtIndex(t).getAttributes(),s=Math.min(i.length,o.length),i=function(){var t,e,n;for(n=[],r=t=0,e=s;(0<=e?t<e:e<t)&&o[r]===i[r];r=0<=e?++t:--t)n.push(o[r]);return n}();return i},h=function(t){var e,n;return n={},(e=t.getLastAttribute())&&(n[e]=!0),n},e.prototype.getAttachmentById=function(t){var e,n,i,o;for(n=0,i=(o=this.getAttachments()).length;n<i;n++)if((e=o[n]).id===t)return e},e.prototype.getAttachmentPieces=function(){var n;return n=[],this.blockList.eachObject(function(t){var e;return e=t.text,n=n.concat(e.getAttachmentPieces())}),n},e.prototype.getAttachments=function(){var t,e,n,i,o;for(o=[],t=0,e=(i=this.getAttachmentPieces()).length;t<e;t++)n=i[t],o.push(n.attachment);return o},e.prototype.getRangeOfAttachment=function(t){var e,n,i,o,r,s,a;for(n=e=o=0,i=(r=this.blockList.toArray()).length;e<i;n=++e){if(a=(s=r[n].text).getRangeOfAttachment(t))return _([o+a[0],o+a[1]]);o+=s.getLength()}},e.prototype.getLocationRangeOfAttachment=function(t){var e;return e=this.getRangeOfAttachment(t),this.locationRangeFromRange(e)},e.prototype.getAttachmentPieceForAttachment=function(t){var e,n,i,o;for(e=0,n=(o=this.getAttachmentPieces()).length;e<n;e++)if((i=o[e]).attachment===t)return i},e.prototype.findRangesForTextAttribute=function(e,t){var n,i,o,r,s,a,u,l,c,h;for(h=(null!=t?t:{}).withValue,u=[],l=[],r=function(t){return null!=h?t.getAttribute(e)===h:t.hasAttribute(e)},n=a=0,i=(c=this.getPieces()).length;n<i;n++)o=(s=c[n]).getLength(),r(s)&&(u[1]===a?u[1]=a+o:l.push(u=[a,a+o])),a+=o;return l},e.prototype.locationFromPosition=function(t){var e,n;return null!=(n=this.blockList.findIndexAndOffsetAtPosition(Math.max(0,t))).index?n:{index:(e=this.getBlocks()).length-1,offset:e[e.length-1].getLength()}},e.prototype.positionFromLocation=function(t){return this.blockList.findPositionAtIndexAndOffset(t.index,t.offset)},e.prototype.locationRangeFromPosition=function(t){return _(this.locationFromPosition(t))},e.prototype.locationRangeFromRange=function(t){var e,n,i,o;if(t=_(t))return o=t[0],n=t[1],i=this.locationFromPosition(o),e=this.locationFromPosition(n),_([i,e])},e.prototype.rangeFromLocationRange=function(t){var e,n;return t=_(t),e=this.positionFromLocation(t[0]),b(t)||(n=this.positionFromLocation(t[1])),_([e,n])},e.prototype.isEqualTo=function(t){return this.blockList.isEqualTo(null!=t?t.blockList:void 0)},e.prototype.getTexts=function(){var t,e,n,i,o;for(o=[],e=0,n=(i=this.getBlocks()).length;e<n;e++)t=i[e],o.push(t.text);return o},e.prototype.getPieces=function(){var t,e,n,i,o;for(n=[],t=0,e=(i=this.getTexts()).length;t<e;t++)o=i[t],n.push.apply(n,o.getPieces());return n},e.prototype.getObjects=function(){return this.getBlocks().concat(this.getTexts()).concat(this.getPieces())},e.prototype.toSerializableDocument=function(){var e;return e=[],this.blockList.eachObject(function(t){return e.push(t.copyWithText(t.text.toSerializableText()))}),new this.constructor(e)},e.prototype.toString=function(){return this.blockList.toString()},e.prototype.toJSON=function(){return this.blockList.toJSON()},e.prototype.toConsole=function(){var o;return JSON.stringify(function(){var t,e,n,i;for(i=[],t=0,e=(n=this.blockList.toArray()).length;t<e;t++)o=n[t],i.push(JSON.parse(o.text.toConsole()));return i}.call(this))},e}(k.Object)}.call(this),function(){k.LineBreakInsertion=function(){function t(t){var e;this.composition=t,this.document=this.composition.document,e=this.composition.getSelectedRange(),this.startPosition=e[0],this.endPosition=e[1],this.startLocation=this.document.locationFromPosition(this.startPosition),this.endLocation=this.document.locationFromPosition(this.endPosition),this.block=this.document.getBlockAtIndex(this.endLocation.index),this.breaksOnReturn=this.block.breaksOnReturn(),this.previousCharacter=this.block.text.getStringAtPosition(this.endLocation.offset-1),this.nextCharacter=this.block.text.getStringAtPosition(this.endLocation.offset)}return t.prototype.shouldInsertBlockBreak=function(){return this.block.hasAttributes()&&this.block.isListItem()&&!this.block.isEmpty()?0!==this.startLocation.offset:this.breaksOnReturn&&"\n"!==this.nextCharacter},t.prototype.shouldBreakFormattedBlock=function(){return this.block.hasAttributes()&&!this.block.isListItem()&&(this.breaksOnReturn&&"\n"===this.nextCharacter||"\n"===this.previousCharacter)},t.prototype.shouldDecreaseListLevel=function(){return this.block.hasAttributes()&&this.block.isListItem()&&this.block.isEmpty()},t.prototype.shouldPrependListItem=function(){return this.block.isListItem()&&0===this.startLocation.offset&&!this.block.isEmpty()},t.prototype.shouldRemoveLastBlockAttribute=function(){return this.block.hasAttributes()&&!this.block.isListItem()&&this.block.isEmpty()},t}()}.call(this),function(){var i,o,s,r,a,u,l,c,h,d,p=function(t,e){function n(){this.constructor=t}for(var i in e)f.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},f={}.hasOwnProperty;u=k.normalizeRange,h=k.rangesAreEqual,c=k.rangeIsCollapsed,l=k.objectsAreEqual,i=k.arrayStartsWith,d=k.summarizeArrayChange,s=k.getAllAttributeNames,r=k.getBlockConfig,a=k.getTextConfig,o=k.extend,k.Composition=function(t){function e(){this.document=new k.Document,this.attachments=[],this.currentAttributes={},this.revision=0}var n;return p(e,t),e.prototype.setDocument=function(t){var e;return t.isEqualTo(this.document)?void 0:(this.document=t,this.refreshAttachments(),this.revision++,null!=(e=this.delegate)&&"function"==typeof e.compositionDidChangeDocument?e.compositionDidChangeDocument(t):void 0)},e.prototype.getSnapshot=function(){return{document:this.document,selectedRange:this.getSelectedRange()}},e.prototype.loadSnapshot=function(t){var e,n,i,o;return e=t.document,o=t.selectedRange,null!=(n=this.delegate)&&"function"==typeof n.compositionWillLoadSnapshot&&n.compositionWillLoadSnapshot(),this.setDocument(null!=e?e:new k.Document),this.setSelection(null!=o?o:[0,0]),null!=(i=this.delegate)&&"function"==typeof i.compositionDidLoadSnapshot?i.compositionDidLoadSnapshot():void 0},e.prototype.insertText=function(t,e){var n,i,o,r;return r=(null!=e?e:{
updatePosition:!0}).updatePosition,i=this.getSelectedRange(),this.setDocument(this.document.insertTextAtRange(t,i)),n=(o=i[0])+t.getLength(),r&&this.setSelection(n),this.notifyDelegateOfInsertionAtRange([o,n])},e.prototype.insertBlock=function(t){var e;return null==t&&(t=new k.Block),e=new k.Document([t]),this.insertDocument(e)},e.prototype.insertDocument=function(t){var e,n,i;return null==t&&(t=new k.Document),n=this.getSelectedRange(),this.setDocument(this.document.insertDocumentAtRange(t,n)),e=(i=n[0])+t.getLength(),this.setSelection(e),this.notifyDelegateOfInsertionAtRange([i,e])},e.prototype.insertString=function(t,e){var n,i;return n=this.getCurrentTextAttributes(),i=k.Text.textForStringWithAttributes(t,n),this.insertText(i,e)},e.prototype.insertBlockBreak=function(){var t,e,n;return e=this.getSelectedRange(),this.setDocument(this.document.insertBlockBreakAtRange(e)),t=(n=e[0])+1,this.setSelection(t),this.notifyDelegateOfInsertionAtRange([n,t])},e.prototype.insertLineBreak=function(){var t,e;return(e=new k.LineBreakInsertion(this)).shouldDecreaseListLevel()?(this.decreaseListLevel(),this.setSelection(e.startPosition)):e.shouldPrependListItem()?(t=new k.Document([e.block.copyWithoutText()]),this.insertDocument(t)):e.shouldInsertBlockBreak()?this.insertBlockBreak():e.shouldRemoveLastBlockAttribute()?this.removeLastBlockAttribute():e.shouldBreakFormattedBlock()?this.breakFormattedBlock(e):this.insertString("\n")},e.prototype.insertHTML=function(t){var e,n,i,o;return e=k.Document.fromHTML(t),i=this.getSelectedRange(),this.setDocument(this.document.mergeDocumentAtRange(e,i)),n=(o=i[0])+e.getLength()-1,this.setSelection(n),this.notifyDelegateOfInsertionAtRange([o,n])},e.prototype.replaceHTML=function(t){var e,n,i;return e=k.Document.fromHTML(t).copyUsingObjectsFromDocument(this.document),n=this.getLocationRange({strict:!1}),i=this.document.rangeFromLocationRange(n),this.setDocument(e),this.setSelection(i)},e.prototype.insertFile=function(t){var e,n;return(null!=(n=this.delegate)?n.compositionShouldAcceptFile(t):void 0)?(e=k.Attachment.attachmentForFile(t),this.insertAttachment(e)):void 0},e.prototype.insertFiles=function(t){var e,n,i,o,r,s,a;for(a=new k.Text,o=0,r=t.length;o<r;o++)i=t[o],(null!=(s=this.delegate)?s.compositionShouldAcceptFile(i):void 0)&&(e=k.Attachment.attachmentForFile(i),n=k.Text.textForAttachmentWithAttributes(e,this.currentAttributes),a=a.appendText(n));return this.insertText(a)},e.prototype.insertAttachment=function(t){var e;return e=k.Text.textForAttachmentWithAttributes(t,this.currentAttributes),this.insertText(e)},e.prototype.deleteInDirection=function(t){var e,n,i,o,r,s,a;return o=this.getLocationRange(),r=this.getSelectedRange(),(s=c(r))?i="backward"===t&&0===o[0].offset:a=o[0].index!==o[1].index,!(i&&this.canDecreaseBlockAttributeLevel()&&((n=this.getBlock()).isListItem()?this.decreaseListLevel():this.decreaseBlockAttributeLevel(),this.setSelection(r[0]),n.isEmpty()))&&(s&&(r=this.getExpandedRangeInDirection(t),"backward"===t&&(e=this.getAttachmentAtRange(r))),e?(this.editAttachment(e),!1):(this.setDocument(this.document.removeTextAtRange(r)),this.setSelection(r[0]),!i&&!a&&void 0))},e.prototype.moveTextFromRange=function(t){var e;return e=this.getSelectedRange()[0],this.setDocument(this.document.moveTextFromRangeToPosition(t,e)),this.setSelection(e)},e.prototype.removeAttachment=function(t){var e;return(e=this.document.getRangeOfAttachment(t))?(this.stopEditingAttachment(),this.setDocument(this.document.removeTextAtRange(e)),this.setSelection(e[0])):void 0},e.prototype.removeLastBlockAttribute=function(){var t,e,n,i;return i=(n=this.getSelectedRange())[0],e=n[1],t=this.document.getBlockAtPosition(e),this.removeCurrentAttribute(t.getLastAttribute()),this.setSelection(i)},n=" ",e.prototype.insertPlaceholder=function(){return this.placeholderPosition=this.getPosition(),this.insertString(n)},e.prototype.selectPlaceholder=function(){return null!=this.placeholderPosition?(this.setSelectedRange([this.placeholderPosition,this.placeholderPosition+n.length]),this.getSelectedRange()):void 0},e.prototype.forgetPlaceholder=function(){return this.placeholderPosition=null},e.prototype.hasCurrentAttribute=function(t){var e;return null!=(e=this.currentAttributes[t])&&!1!==e},e.prototype.toggleCurrentAttribute=function(t){var e;return(e=!this.currentAttributes[t])?this.setCurrentAttribute(t,e):this.removeCurrentAttribute(t)},e.prototype.canSetCurrentAttribute=function(t){return r(t)?this.canSetCurrentBlockAttribute(t):this.canSetCurrentTextAttribute(t)},e.prototype.canSetCurrentTextAttribute=function(t){switch(t){case"href":return!this.selectionContainsAttachmentWithAttribute(t);default:return!0}},e.prototype.canSetCurrentBlockAttribute=function(){var t;if(t=this.getBlock())return!t.isTerminalBlock()},e.prototype.setCurrentAttribute=function(t,e){return r(t)?this.setBlockAttribute(t,e):(this.setTextAttribute(t,e),this.currentAttributes[t]=e,this.notifyDelegateOfCurrentAttributesChange())},e.prototype.setTextAttribute=function(t,e){var n,i;if(n=this.getSelectedRange())return n[0]!==n[1]?this.setDocument(this.document.addAttributeAtRange(t,e,n)):"href"===t?(i=k.Text.textForStringWithAttributes(e,{href:e}),this.insertText(i)):void 0},e.prototype.setBlockAttribute=function(t,e){var n;if(n=this.getSelectedRange())return this.canSetCurrentAttribute(t)?(this.getBlock(),this.setDocument(this.document.applyBlockAttributeAtRange(t,e,n)),this.setSelection(n)):void 0},e.prototype.removeCurrentAttribute=function(t){return r(t)?(this.removeBlockAttribute(t),this.updateCurrentAttributes()):(this.removeTextAttribute(t),delete this.currentAttributes[t],this.notifyDelegateOfCurrentAttributesChange())},e.prototype.removeTextAttribute=function(t){var e;if(e=this.getSelectedRange())return this.setDocument(this.document.removeAttributeAtRange(t,e))},e.prototype.removeBlockAttribute=function(t){var e;if(e=this.getSelectedRange())return this.setDocument(this.document.removeAttributeAtRange(t,e))},e.prototype.canDecreaseNestingLevel=function(){var t;return 0<(null!=(t=this.getBlock())?t.getNestingLevel():void 0)},e.prototype.canIncreaseNestingLevel=function(){var t,e,n;if(t=this.getBlock())return null!=(n=r(t.getLastNestableAttribute()))&&n.listAttribute?(e=this.getPreviousBlock())?i(e.getListItemAttributes(),t.getListItemAttributes()):void 0:0<t.getNestingLevel()},e.prototype.decreaseNestingLevel=function(){var t;if(t=this.getBlock())return this.setDocument(this.document.replaceBlock(t,t.decreaseNestingLevel()))},e.prototype.increaseNestingLevel=function(){var t;if(t=this.getBlock())return this.setDocument(this.document.replaceBlock(t,t.increaseNestingLevel()))},e.prototype.canDecreaseBlockAttributeLevel=function(){var t;return 0<(null!=(t=this.getBlock())?t.getAttributeLevel():void 0)},e.prototype.decreaseBlockAttributeLevel=function(){var t,e;return(t=null!=(e=this.getBlock())?e.getLastAttribute():void 0)?this.removeCurrentAttribute(t):void 0},e.prototype.decreaseListLevel=function(){var t,e,n,i,o,r;for(r=this.getSelectedRange()[0],n=o=this.document.locationFromPosition(r).index,t=this.getBlock().getAttributeLevel();(e=this.document.getBlockAtIndex(n+1))&&e.isListItem()&&e.getAttributeLevel()>t;)n++;return r=this.document.positionFromLocation({index:o,offset:0}),i=this.document.positionFromLocation({index:n,offset:0}),this.setDocument(this.document.removeLastListAttributeAtRange([r,i]))},e.prototype.updateCurrentAttributes=function(){var t,e,n,i,o,r;if(r=this.getSelectedRange({ignoreLock:!0})){for(e=this.document.getCommonAttributesAtRange(r),n=0,i=(o=s()).length;n<i;n++)e[t=o[n]]||this.canSetCurrentAttribute(t)||(e[t]=!1);if(!l(e,this.currentAttributes))return this.currentAttributes=e,this.notifyDelegateOfCurrentAttributesChange()}},e.prototype.getCurrentAttributes=function(){return o.call({},this.currentAttributes)},e.prototype.getCurrentTextAttributes=function(){var t,e,n,i;for(e in t={},n=this.currentAttributes)i=n[e],a(e)&&(t[e]=i);return t},e.prototype.freezeSelection=function(){return this.setCurrentAttribute("frozen",!0)},e.prototype.thawSelection=function(){return this.removeCurrentAttribute("frozen")},e.prototype.hasFrozenSelection=function(){return this.hasCurrentAttribute("frozen")},e.proxyMethod("getSelectionManager().getPointRange"),e.proxyMethod("getSelectionManager().setLocationRangeFromPointRange"),e.proxyMethod("getSelectionManager().locationIsCursorTarget"),e.proxyMethod("getSelectionManager().selectionIsExpanded"),e.proxyMethod("delegate?.getSelectionManager"),e.prototype.setSelection=function(t){var e,n;return e=this.document.locationRangeFromRange(t),null!=(n=this.delegate)?n.compositionDidRequestChangingSelectionToLocationRange(e):void 0},e.prototype.getSelectedRange=function(){var t;return(t=this.getLocationRange())?this.document.rangeFromLocationRange(t):void 0},e.prototype.setSelectedRange=function(t){var e;return e=this.document.locationRangeFromRange(t),this.getSelectionManager().setLocationRange(e)},e.prototype.getPosition=function(){var t;return(t=this.getLocationRange())?this.document.positionFromLocation(t[0]):void 0},e.prototype.getLocationRange=function(t){var e;return null!=(e=this.getSelectionManager().getLocationRange(t))?e:u({index:0,offset:0})},e.prototype.getExpandedRangeInDirection=function(t){var e,n,i;return i=(n=this.getSelectedRange())[0],e=n[1],"backward"===t?i=this.translateUTF16PositionFromOffset(i,-1):e=this.translateUTF16PositionFromOffset(e,1),u([i,e])},e.prototype.moveCursorInDirection=function(t){var e,n,i,o;return this.editingAttachment?i=this.document.getRangeOfAttachment(this.editingAttachment):(o=this.getSelectedRange(),i=this.getExpandedRangeInDirection(t),n=!h(o,i)),this.setSelectedRange("backward"===t?i[0]:i[1]),n&&(e=this.getAttachmentAtRange(i))?this.editAttachment(e):void 0},e.prototype.expandSelectionInDirection=function(t){var e;return e=this.getExpandedRangeInDirection(t),this.setSelectedRange(e)},e.prototype.expandSelectionForEditing=function(){return this.hasCurrentAttribute("href")?this.expandSelectionAroundCommonAttribute("href"):void 0},e.prototype.expandSelectionAroundCommonAttribute=function(t){var e,n;return e=this.getPosition(),n=this.document.getRangeOfCommonAttributeAtPosition(t,e),this.setSelectedRange(n)},e.prototype.selectionContainsAttachmentWithAttribute=function(t){var e,n,i,o;if(o=this.getSelectedRange()){for(e=0,n=(i=this.document.getDocumentAtRange(o).getAttachments()).length;e<n;e++)if(i[e].hasAttribute(t))return!0;return!1}},e.prototype.selectionIsInCursorTarget=function(){return this.editingAttachment||this.positionIsCursorTarget(this.getPosition())},e.prototype.positionIsCursorTarget=function(t){var e;return(e=this.document.locationFromPosition(t))?this.locationIsCursorTarget(e):void 0},e.prototype.positionIsBlockBreak=function(t){var e;return null!=(e=this.document.getPieceAtPosition(t))?e.isBlockBreak():void 0},e.prototype.getSelectedDocument=function(){var t;return(t=this.getSelectedRange())?this.document.getDocumentAtRange(t):void 0},e.prototype.getAttachments=function(){return this.attachments.slice(0)},e.prototype.refreshAttachments=function(){var t,e,n,i,o,r,s,a,u,l,c,h;for(n=this.document.getAttachments(),t=(a=d(this.attachments,n)).added,c=a.removed,this.attachments=n,i=0,r=c.length;i<r;i++)((e=c[i]).delegate=null)!=(u=this.delegate)&&"function"==typeof u.compositionDidRemoveAttachment&&u.compositionDidRemoveAttachment(e);for(h=[],o=0,s=t.length;o<s;o++)(e=t[o]).delegate=this,h.push(null!=(l=this.delegate)&&"function"==typeof l.compositionDidAddAttachment?l.compositionDidAddAttachment(e):void 0);return h},e.prototype.attachmentDidChangeAttributes=function(t){var e;return this.revision++,null!=(e=this.delegate)&&"function"==typeof e.compositionDidEditAttachment?e.compositionDidEditAttachment(t):void 0},e.prototype.attachmentDidChangePreviewURL=function(t){var e;return this.revision++,null!=(e=this.delegate)&&"function"==typeof e.compositionDidChangeAttachmentPreviewURL?e.compositionDidChangeAttachmentPreviewURL(t):void 0},e.prototype.editAttachment=function(t){var e;if(t!==this.editingAttachment)return this.stopEditingAttachment(),this.editingAttachment=t,null!=(e=this.delegate)&&"function"==typeof e.compositionDidStartEditingAttachment?e.compositionDidStartEditingAttachment(this.editingAttachment):void 0},e.prototype.stopEditingAttachment=function(){var t;if(this.editingAttachment)return null!=(t=this.delegate)&&"function"==typeof t.compositionDidStopEditingAttachment&&t.compositionDidStopEditingAttachment(this.editingAttachment),this.editingAttachment=null},e.prototype.canEditAttachmentCaption=function(){var t;return null!=(t=this.editingAttachment)?t.isPreviewable():void 0},e.prototype.updateAttributesForAttachment=function(t,e){return this.setDocument(this.document.updateAttributesForAttachment(t,e))},e.prototype.removeAttributeForAttachment=function(t,e){return this.setDocument(this.document.removeAttributeForAttachment(t,e))},e.prototype.breakFormattedBlock=function(t){var e,n,i,o,r;return n=t.document,e=t.block,r=[(o=t.startPosition)-1,o],e.getBlockBreakPosition()===t.startLocation.offset?(e.breaksOnReturn()&&"\n"===t.nextCharacter?o+=1:n=n.removeTextAtRange(r),r=[o,o]):"\n"===t.nextCharacter?"\n"===t.previousCharacter?r=[o-1,o+1]:(r=[o,o+1],o+=1):t.startLocation.offset-1!=0&&(o+=1),i=new k.Document([e.removeLastAttribute().copyWithoutText()]),this.setDocument(n.insertDocumentAtRange(i,r)),this.setSelection(o)},e.prototype.getPreviousBlock=function(){var t,e;return(e=this.getLocationRange())&&0<(t=e[0].index)?this.document.getBlockAtIndex(t-1):void 0},e.prototype.getBlock=function(){var t;return(t=this.getLocationRange())?this.document.getBlockAtIndex(t[0].index):void 0},e.prototype.getAttachmentAtRange=function(t){var e;return(e=this.document.getDocumentAtRange(t)).toString()===k.OBJECT_REPLACEMENT_CHARACTER+"\n"?e.getAttachments()[0]:void 0},e.prototype.notifyDelegateOfCurrentAttributesChange=function(){var t;return null!=(t=this.delegate)&&"function"==typeof t.compositionDidChangeCurrentAttributes?t.compositionDidChangeCurrentAttributes(this.currentAttributes):void 0},e.prototype.notifyDelegateOfInsertionAtRange=function(t){var e;return null!=(e=this.delegate)&&"function"==typeof e.compositionDidPerformInsertionAtRange?e.compositionDidPerformInsertionAtRange(t):void 0},e.prototype.translateUTF16PositionFromOffset=function(t,e){var n,i;return n=(i=this.document.toUTF16String()).offsetFromUCS2Offset(t),i.offsetToUCS2Offset(n+e)},e}(k.BasicObject)}.call(this),function(){var n=function(t,e){function n(){this.constructor=t}for(var i in e)o.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty;k.UndoManager=function(t){function e(t){this.composition=t,this.undoEntries=[],this.redoEntries=[]}var a;return n(e,t),e.prototype.recordUndoEntry=function(t,e){var n,i,o,r,s;return i=(r=null!=e?e:{}).context,n=r.consolidatable,o=this.undoEntries.slice(-1)[0],n&&a(o,t,i)?void 0:(s=this.createEntry({description:t,context:i}),this.undoEntries.push(s),this.redoEntries=[])},e.prototype.undo=function(){var t,e;return(e=this.undoEntries.pop())?(t=this.createEntry(e),this.redoEntries.push(t),this.composition.loadSnapshot(e.snapshot)):void 0},e.prototype.redo=function(){var t,e;return(t=this.redoEntries.pop())?(e=this.createEntry(t),this.undoEntries.push(e),this.composition.loadSnapshot(t.snapshot)):void 0},e.prototype.canUndo=function(){return 0<this.undoEntries.length},e.prototype.canRedo=function(){return 0<this.redoEntries.length},e.prototype.createEntry=function(t){var e,n,i;return n=(i=null!=t?t:{}).description,e=i.context,{description:null!=n?n.toString():void 0,context:JSON.stringify(e),snapshot:this.composition.getSnapshot()}},a=function(t,e,n){return(null!=t?t.description:void 0)===(null!=e?e.toString():void 0)&&(null!=t?t.context:void 0)===JSON.stringify(n)},e}(k.BasicObject)}.call(this),function(){k.Editor=function(){function t(t,e,n){this.composition=t,this.selectionManager=e,this.element=n,this.undoManager=new k.UndoManager(this.composition)}return t.prototype.loadDocument=function(t){return this.loadSnapshot({document:t,selectedRange:[0,0]})},t.prototype.loadHTML=function(t){return null==t&&(t=""),this.loadDocument(k.Document.fromHTML(t,{referenceElement:this.element}))},t.prototype.loadJSON=function(t){var e,n;return e=t.document,n=t.selectedRange,e=k.Document.fromJSON(e),this.loadSnapshot({document:e,selectedRange:n})},t.prototype.loadSnapshot=function(t){return this.undoManager=new k.UndoManager(this.composition),this.composition.loadSnapshot(t)},t.prototype.getDocument=function(){return this.composition.document},t.prototype.getSelectedDocument=function(){return this.composition.getSelectedDocument()},t.prototype.getSnapshot=function(){return this.composition.getSnapshot()},t.prototype.toJSON=function(){return this.getSnapshot()},t.prototype.deleteInDirection=function(t){return this.composition.deleteInDirection(t)},t.prototype.insertAttachment=function(t){return this.composition.insertAttachment(t)},t.prototype.insertDocument=function(t){return this.composition.insertDocument(t)},t.prototype.insertFile=function(t){return this.composition.insertFile(t)},t.prototype.insertHTML=function(t){return this.composition.insertHTML(t)},t.prototype.insertString=function(t){return this.composition.insertString(t)},t.prototype.insertText=function(t){return this.composition.insertText(t)},t.prototype.insertLineBreak=function(){return this.composition.insertLineBreak()},t.prototype.getSelectedRange=function(){return this.composition.getSelectedRange()},t.prototype.getPosition=function(){return this.composition.getPosition()},t.prototype.getClientRectAtPosition=function(t){var e;return e=this.getDocument().locationRangeFromRange([t,t+1]),this.selectionManager.getClientRectAtLocationRange(e)},t.prototype.expandSelectionInDirection=function(t){return this.composition.expandSelectionInDirection(t)},t.prototype.moveCursorInDirection=function(t){return this.composition.moveCursorInDirection(t)},t.prototype.setSelectedRange=function(t){return this.composition.setSelectedRange(t)},t.prototype.activateAttribute=function(t,e){return null==e&&(e=!0),this.composition.setCurrentAttribute(t,e)},t.prototype.attributeIsActive=function(t){return this.composition.hasCurrentAttribute(t)},t.prototype.canActivateAttribute=function(t){return this.composition.canSetCurrentAttribute(t)},t.prototype.deactivateAttribute=function(t){return this.composition.removeCurrentAttribute(t)},t.prototype.canDecreaseNestingLevel=function(){return this.composition.canDecreaseNestingLevel()},t.prototype.canIncreaseNestingLevel=function(){return this.composition.canIncreaseNestingLevel()},t.prototype.decreaseNestingLevel=function(){return this.canDecreaseNestingLevel()?this.composition.decreaseNestingLevel():void 0},t.prototype.increaseNestingLevel=function(){return this.canIncreaseNestingLevel()?this.composition.increaseNestingLevel():void 0},t.prototype.canDecreaseIndentationLevel=function(){return this.canDecreaseNestingLevel()},t.prototype.canIncreaseIndentationLevel=function(){return this.canIncreaseNestingLevel()},t.prototype.decreaseIndentationLevel=function(){return this.decreaseNestingLevel()},t.prototype.increaseIndentationLevel=function(){return this.increaseNestingLevel()},t.prototype.canRedo=function(){return this.undoManager.canRedo()},t.prototype.canUndo=function(){return this.undoManager.canUndo()},t.prototype.recordUndoEntry=function(t,e){var n,i,o;return i=(o=null!=e?e:{}).context,n=o.consolidatable,this.undoManager.recordUndoEntry(t,{context:i,consolidatable:n})},t.prototype.redo=function(){return this.canRedo()?this.undoManager.redo():void 0},t.prototype.undo=function(){return this.canUndo()?this.undoManager.undo():void 0},t}()}.call(this),function(){var n=function(t,e){function n(){this.constructor=t}for(var i in e)o.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty;k.ManagedAttachment=function(t){function e(t,e){var n;this.attachmentManager=t,this.attachment=e,n=this.attachment,this.id=n.id,this.file=n.file}return n(e,t),e.prototype.remove=function(){return this.attachmentManager.requestRemovalOfAttachment(this.attachment)},e.proxyMethod("attachment.getAttribute"),e.proxyMethod("attachment.hasAttribute"),e.proxyMethod("attachment.setAttribute"),e.proxyMethod("attachment.getAttributes"),e.proxyMethod("attachment.setAttributes"),e.proxyMethod("attachment.isPending"),e.proxyMethod("attachment.isPreviewable"),e.proxyMethod("attachment.getURL"),e.proxyMethod("attachment.getHref"),e.proxyMethod("attachment.getFilename"),e.proxyMethod("attachment.getFilesize"),e.proxyMethod("attachment.getFormattedFilesize"),e.proxyMethod("attachment.getExtension"),e.proxyMethod("attachment.getContentType"),e.proxyMethod("attachment.getFile"),e.proxyMethod("attachment.setFile"),e.proxyMethod("attachment.releaseFile"),e.proxyMethod("attachment.getUploadProgress"),e.proxyMethod("attachment.setUploadProgress"),e}(k.BasicObject)}.call(this),function(){var n=function(t,e){function n(){this.constructor=t}for(var i in e)o.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty;k.AttachmentManager=function(t){function e(t){var e,n,i;for(null==t&&(t=[]),this.managedAttachments={},n=0,i=t.length;n<i;n++)e=t[n],this.manageAttachment(e)}return n(e,t),e.prototype.getAttachments=function(){var t,e,n,i;for(e in i=[],n=this.managedAttachments)t=n[e],i.push(t);return i},e.prototype.manageAttachment=function(t){var e,n;return null!=(e=this.managedAttachments)[n=t.id]?e[n]:e[n]=new k.ManagedAttachment(this,t)},e.prototype.attachmentIsManaged=function(t){return t.id in this.managedAttachments},e.prototype.requestRemovalOfAttachment=function(t){var e;return this.attachmentIsManaged(t)&&null!=(e=this.delegate)&&"function"==typeof e.attachmentManagerDidRequestRemovalOfAttachment?e.attachmentManagerDidRequestRemovalOfAttachment(t):void 0},e.prototype.unmanageAttachment=function(t){var e;return e=this.managedAttachments[t.id],delete this.managedAttachments[t.id],e},e}(k.BasicObject)}.call(this),function(){var d,p,n,a,f,u,m,i,g,o,v;d=k.elementContainsNode,p=k.findChildIndexOfNode,f=k.nodeIsBlockStart,u=k.nodeIsBlockStartComment,a=k.nodeIsBlockContainer,m=k.nodeIsCursorTarget,i=k.nodeIsEmptyTextNode,g=k.nodeIsTextNode,n=k.nodeIsAttachmentElement,o=k.tagName,v=k.walkTree,k.LocationMapper=function(){function t(t){this.element=t}var s,c,h,e;return t.prototype.findLocationFromContainerAndOffset=function(t,e,n){var i,o,r,s,a,u,l;for(u=(null!=n?n:{strict:!0}).strict,r=!1,s={index:o=0,offset:0},(i=this.findAttachmentElementParentForNode(t))&&(t=i.parentNode,e=p(i)),l=v(this.element,{usingFilter:h});l.nextNode();){if((a=l.currentNode)===t&&g(t)){m(a)||(s.offset+=e);break}if(a.parentNode===t){if(o++===e)break}else if(!d(t,a)&&0<o)break;f(a,{strict:u})?(r&&s.index++,r=!(s.offset=0)):s.offset+=c(a)}return s},t.prototype.findContainerAndOffsetFromLocation=function(t){var e,n,i,o,r;if(0===t.index&&0===t.offset){for(e=this.element,o=0;e.firstChild;)if(e=e.firstChild,a(e)){o=1;break}return[e,o]}if(n=(r=this.findNodeAndOffsetFromLocation(t))[0],i=r[1],n){if(g(n))(e=n).textContent,o=t.offset-i;else{if(e=n.parentNode,!f(n.previousSibling)&&!a(e))for(;n===e.lastChild&&(e=(n=e).parentNode,!a(e)););o=p(n),0!==t.offset&&o++}return[e,o]}},t.prototype.findNodeAndOffsetFromLocation=function(t){var e,n,i,o,r,s,a,u;for(n=a=0,i=(u=this.getSignificantNodesForIndex(t.index)).length;n<i;n++){if(e=u[n],o=c(e),t.offset<=a+o)if(g(e)){if(r=e,s=a,t.offset===s&&m(r))break}else r||(r=e,s=a);if((a+=o)>t.offset)break}return[r,s]},t.prototype.findAttachmentElementParentForNode=function(t){for(;t&&t!==this.element;){if(n(t))return t;t=t.parentNode}},t.prototype.getSignificantNodesForIndex=function(t){var e,n,i,o,r;for(i=[],r=v(this.element,{usingFilter:s}),o=!1;r.nextNode();)if(n=r.currentNode,u(n)){if(null!=e?e++:e=0,e===t)o=!0;else if(o)break}else o&&i.push(n);return i},c=function(t){return t.nodeType===Node.TEXT_NODE?m(t)?0:t.textContent.length:"br"===o(t)||n(t)?1:0},s=function(t){return e(t)===NodeFilter.FILTER_ACCEPT?h(t):NodeFilter.FILTER_REJECT},e=function(t){return i(t)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT},h=function(t){return n(t.parentNode)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT},t}()}.call(this),function(){var c,h,n=[].slice;c=k.getDOMRange,h=k.setDOMRange,k.PointMapper=function(){function t(){}return t.prototype.createDOMRangeFromPoint=function(t){var e,n,i,o,r,s,a,u;if(a=t.x,u=t.y,document.caretPositionFromPoint)return i=(r=document.caretPositionFromPoint(a,u)).offsetNode,n=r.offset,(e=document.createRange()).setStart(i,n),e;if(document.caretRangeFromPoint)return document.caretRangeFromPoint(a,u);if(document.body.createTextRange){o=c();try{(s=document.body.createTextRange()).moveToPoint(a,u),s.select()}catch(l){}return e=c(),h(o),e}},t.prototype.getClientRectsForDOMRange=function(t){var e;return[(e=n.call(t.getClientRects()))[0],e[e.length-1]]},t}()}.call(this),function(){var i,o=function(t,e){return function(){return t.apply(e,arguments)}},r=function(t,e){function n(){this.constructor=t}for(var i in e)s.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},s={}.hasOwnProperty,a=[].indexOf||function(t){for(var e=0,n=this.length;e<n;e++)if(e in this&&this[e]===t)return e;return-1};i=k.getDOMRange,k.SelectionChangeObserver=function(t){function e(){this.run=o(this.run,this),this.update=o(this.update,this),this.selectionManagers=[]}var n;return r(e,t),e.prototype.start=function(){return this.started?void 0:(this.started=!0,"onselectionchange"in document?document.addEventListener("selectionchange",this.update,!0):this.run())},e.prototype.stop=function(){return this.started?(this.started=!1,document.removeEventListener("selectionchange",this.update,!0)):void 0},e.prototype.registerSelectionManager=function(t){return a.call(this.selectionManagers,t)<0?(this.selectionManagers.push(t),this.start()):void 0},e.prototype.unregisterSelectionManager=function(o){var r;return this.selectionManagers=function(){var t,e,n,i;for(i=[],t=0,e=(n=this.selectionManagers).length;t<e;t++)(r=n[t])!==o&&i.push(r);return i}.call(this),0===this.selectionManagers.length?this.stop():void 0},e.prototype.notifySelectionManagersOfSelectionChange=function(){var t,e,n,i,o;for(i=[],t=0,e=(n=this.selectionManagers).length;t<e;t++)o=n[t],i.push(o.selectionDidChange());return i},e.prototype.update=function(){var t;return t=i(),n(t,this.domRange)?void 0:(this.domRange=t,this.notifySelectionManagersOfSelectionChange())},e.prototype.reset=function(){return this.domRange=null,this.update()},e.prototype.run=function(){return this.started?(this.update(),requestAnimationFrame(this.run)):void 0},n=function(t,e){return(null!=t?t.startContainer:void 0)===(null!=e?e.startContainer:void 0)&&(null!=t?t.startOffset:void 0)===(null!=e?e.startOffset:void 0)&&(null!=t?t.endContainer:void 0)===(null!=e?e.endContainer:void 0)&&(null!=t?t.endOffset:void 0)===(null!=e?e.endOffset:void 0)},e}(k.BasicObject),null==k.selectionChangeObserver&&(k.selectionChangeObserver=new k.SelectionChangeObserver)}.call(this),function(){var a,n,i,u,o,r,s,l,c,h,d=function(t,e){return function(){return t.apply(e,arguments)}},p=function(t,e){function n(){this.constructor=t}for(var i in e)f.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},f={}.hasOwnProperty;i=k.getDOMSelection,n=k.getDOMRange,h=k.setDOMRange,a=k.elementContainsNode,r=k.nodeIsCursorTarget,o=k.innerElementIsActive,u=k.handleEvent,s=k.normalizeRange,l=k.rangeIsCollapsed,c=k.rangesAreEqual,k.SelectionManager=function(t){function e(t){this.element=t,this.selectionDidChange=d(this.selectionDidChange,this),this.didMouseDown=d(this.didMouseDown,this),this.locationMapper=new k.LocationMapper(this.element),this.pointMapper=new k.PointMapper,this.lockCount=0,u("mousedown",{onElement:this.element,withCallback:this.didMouseDown})}return p(e,t),e.prototype.getLocationRange=function(t){var e;return null==t&&(t={}),!1===t.strict?this.createLocationRangeFromDOMRange(n(),{strict:!1}):t.ignoreLock?this.currentLocationRange:null!=(e=this.lockedLocationRange)?e:this.currentLocationRange},e.prototype.setLocationRange=function(t){var e;if(!this.lockedLocationRange)return t=s(t),(e=this.createDOMRangeFromLocationRange(t))?(h(e),this.updateCurrentLocationRange(t)):void 0},e.prototype.setLocationRangeFromPointRange=function(t){var e,n;return t=s(t),n=this.getLocationAtPoint(t[0]),e=this.getLocationAtPoint(t[1]),this.setLocationRange([n,e])},e.prototype.getClientRectAtLocationRange=function(t){var e;return(e=this.createDOMRangeFromLocationRange(t))?this.getClientRectsForDOMRange(e)[1]:void 0},e.prototype.locationIsCursorTarget=function(t){var e,n;return e=(n=this.findNodeAndOffsetFromLocation(t))[0],n[1],r(e)},e.prototype.lock=function(){return 0==this.lockCount++?(this.updateCurrentLocationRange(),this.lockedLocationRange=this.getLocationRange()):void 0},e.prototype.unlock=function(){var t;return 0==--this.lockCount&&(t=this.lockedLocationRange,(this.lockedLocationRange=null)!=t)?this.setLocationRange(t):void 0},e.prototype.clearSelection=function(){var t;return null!=(t=i())?t.removeAllRanges():void 0},e.prototype.selectionIsCollapsed=function(){var t;return!0===(null!=(t=n())?t.collapsed:void 0)},e.prototype.selectionIsExpanded=function(){return!this.selectionIsCollapsed()},e.proxyMethod("locationMapper.findLocationFromContainerAndOffset"),e.proxyMethod("locationMapper.findContainerAndOffsetFromLocation"),e.proxyMethod("locationMapper.findNodeAndOffsetFromLocation"),e.proxyMethod("pointMapper.createDOMRangeFromPoint"),e.proxyMethod("pointMapper.getClientRectsForDOMRange"),e.prototype.didMouseDown=function(){return this.pauseTemporarily()},e.prototype.pauseTemporarily=function(){var o,r,n,i,s;return this.paused=!0,s=this,r=function(){var t,e;for(s.paused=!1,clearTimeout(i),t=0,e=n.length;t<e;t++)n[t].destroy();return a(document,s.element)?s.selectionDidChange():void 0},i=setTimeout(r,200),n=function(){var t,e,n,i;for(i=[],t=0,e=(n=["mousemove","keydown"]).length;t<e;t++)o=n[t],i.push(u(o,{onElement:document,withCallback:r}));return i}()},e.prototype.selectionDidChange=function(){return this.paused||o(this.element)?void 0:this.updateCurrentLocationRange()},e.prototype.updateCurrentLocationRange=function(t){var e;return(null!=t?t:t=this.createLocationRangeFromDOMRange(n()))&&!c(t,this.currentLocationRange)?(this.currentLocationRange=t,null!=(e=this.delegate)&&"function"==typeof e.locationRangeDidChange?e.locationRangeDidChange(this.currentLocationRange.slice(0)):void 0):void 0},e.prototype.createDOMRangeFromLocationRange=function(t){var e,n,i,o;return i=this.findContainerAndOffsetFromLocation(t[0]),n=l(t)?i:null!=(o=this.findContainerAndOffsetFromLocation(t[1]))?o:i,null!=i&&null!=n?((e=document.createRange()).setStart.apply(e,i),e.setEnd.apply(e,n),e):void 0},e.prototype.createLocationRangeFromDOMRange=function(t,e){var n,i;if(null!=t&&this.domRangeWithinElement(t)&&(i=this.findLocationFromContainerAndOffset(t.startContainer,t.startOffset,e)))return t.collapsed||(n=this.findLocationFromContainerAndOffset(t.endContainer,t.endOffset,e)),s([i,n])},e.prototype.getLocationAtPoint=function(t){var e,n;return(e=this.createDOMRangeFromPoint(t))&&null!=(n=this.createLocationRangeFromDOMRange(e))?n[0]:void 0},e.prototype.domRangeWithinElement=function(t){return t.collapsed?a(this.element,t.startContainer):a(this.element,t.startContainer)&&a(this.element,t.endContainer)},e}(k.BasicObject)}.call(this),function(){var n,i,o,r=function(t,e){function n(){this.constructor=t}for(var i in e)s.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},s={}.hasOwnProperty,a=[].slice;i=k.rangeIsCollapsed,o=k.rangesAreEqual,n=k.objectsAreEqual,k.EditorController=function(t){function e(t){var e,n;this.editorElement=t.editorElement,e=t.document,n=t.html,this.selectionManager=new k.SelectionManager(this.editorElement),(this.selectionManager.delegate=this).composition=new k.Composition,(this.composition.delegate=this).attachmentManager=new k.AttachmentManager(this.composition.getAttachments()),(this.attachmentManager.delegate=this).inputController=new k.InputController(this.editorElement),(this.inputController.delegate=this).inputController.responder=this.composition,this.compositionController=new k.CompositionController(this.editorElement,this.composition),
(this.compositionController.delegate=this).toolbarController=new k.ToolbarController(this.editorElement.toolbarElement),(this.toolbarController.delegate=this).editor=new k.Editor(this.composition,this.selectionManager,this.editorElement),null!=e?this.editor.loadDocument(e):this.editor.loadHTML(n)}return r(e,t),e.prototype.registerSelectionManager=function(){return k.selectionChangeObserver.registerSelectionManager(this.selectionManager)},e.prototype.unregisterSelectionManager=function(){return k.selectionChangeObserver.unregisterSelectionManager(this.selectionManager)},e.prototype.compositionDidChangeDocument=function(){return this.notifyEditorElement("document-change"),this.handlingInput?void 0:this.render()},e.prototype.compositionDidChangeCurrentAttributes=function(t){return this.currentAttributes=t,this.toolbarController.updateAttributes(this.currentAttributes),this.updateCurrentActions(),this.notifyEditorElement("attributes-change",{attributes:this.currentAttributes})},e.prototype.compositionDidPerformInsertionAtRange=function(t){return this.pasting?this.pastedRange=t:void 0},e.prototype.compositionShouldAcceptFile=function(t){return this.notifyEditorElement("file-accept",{file:t})},e.prototype.compositionDidAddAttachment=function(t){var e;return e=this.attachmentManager.manageAttachment(t),this.notifyEditorElement("attachment-add",{attachment:e})},e.prototype.compositionDidEditAttachment=function(t){var e;return this.compositionController.rerenderViewForObject(t),e=this.attachmentManager.manageAttachment(t),this.notifyEditorElement("attachment-edit",{attachment:e}),this.notifyEditorElement("change")},e.prototype.compositionDidChangeAttachmentPreviewURL=function(t){return this.compositionController.invalidateViewForObject(t),this.notifyEditorElement("change")},e.prototype.compositionDidRemoveAttachment=function(t){var e;return e=this.attachmentManager.unmanageAttachment(t),this.notifyEditorElement("attachment-remove",{attachment:e})},e.prototype.compositionDidStartEditingAttachment=function(t){return this.attachmentLocationRange=this.composition.document.getLocationRangeOfAttachment(t),this.compositionController.installAttachmentEditorForAttachment(t),this.selectionManager.setLocationRange(this.attachmentLocationRange)},e.prototype.compositionDidStopEditingAttachment=function(){return this.compositionController.uninstallAttachmentEditor(),this.attachmentLocationRange=null},e.prototype.compositionDidRequestChangingSelectionToLocationRange=function(t){return!this.loadingSnapshot||this.isFocused()?(this.requestedLocationRange=t,this.compositionRevisionWhenLocationRangeRequested=this.composition.revision,this.handlingInput?void 0:this.render()):void 0},e.prototype.compositionWillLoadSnapshot=function(){return this.loadingSnapshot=!0},e.prototype.compositionDidLoadSnapshot=function(){return this.compositionController.refreshViewCache(),this.render(),this.loadingSnapshot=!1},e.prototype.getSelectionManager=function(){return this.selectionManager},e.proxyMethod("getSelectionManager().setLocationRange"),e.proxyMethod("getSelectionManager().getLocationRange"),e.prototype.attachmentManagerDidRequestRemovalOfAttachment=function(t){return this.removeAttachment(t)},e.prototype.compositionControllerWillSyncDocumentView=function(){return this.inputController.editorWillSyncDocumentView(),this.selectionManager.lock(),this.selectionManager.clearSelection()},e.prototype.compositionControllerDidSyncDocumentView=function(){return this.inputController.editorDidSyncDocumentView(),this.selectionManager.unlock(),this.updateCurrentActions(),this.notifyEditorElement("sync")},e.prototype.compositionControllerDidRender=function(){return null!=this.requestedLocationRange&&(this.compositionRevisionWhenLocationRangeRequested===this.composition.revision&&this.selectionManager.setLocationRange(this.requestedLocationRange),this.requestedLocationRange=null,this.compositionRevisionWhenLocationRangeRequested=null),this.renderedCompositionRevision!==this.composition.revision&&(this.composition.updateCurrentAttributes(),this.notifyEditorElement("render")),this.renderedCompositionRevision=this.composition.revision},e.prototype.compositionControllerDidFocus=function(){return this.toolbarController.hideDialog(),this.notifyEditorElement("focus")},e.prototype.compositionControllerDidBlur=function(){return this.notifyEditorElement("blur")},e.prototype.compositionControllerDidSelectAttachment=function(t){return this.composition.editAttachment(t)},e.prototype.compositionControllerDidRequestDeselectingAttachment=function(t){var e,n;return e=null!=(n=this.attachmentLocationRange)?n:this.composition.document.getLocationRangeOfAttachment(t),this.selectionManager.setLocationRange(e[1])},e.prototype.compositionControllerWillUpdateAttachment=function(t){return this.editor.recordUndoEntry("Edit Attachment",{context:t.id,consolidatable:!0})},e.prototype.compositionControllerDidRequestRemovalOfAttachment=function(t){return this.removeAttachment(t)},e.prototype.inputControllerWillHandleInput=function(){return this.handlingInput=!0,this.requestedRender=!1},e.prototype.inputControllerDidRequestRender=function(){return this.requestedRender=!0},e.prototype.inputControllerDidHandleInput=function(){return this.handlingInput=!1,this.requestedRender?(this.requestedRender=!1,this.render()):void 0},e.prototype.inputControllerDidAllowUnhandledInput=function(){return this.notifyEditorElement("change")},e.prototype.inputControllerDidRequestReparse=function(){return this.reparse()},e.prototype.inputControllerWillPerformTyping=function(){return this.recordTypingUndoEntry()},e.prototype.inputControllerWillCutText=function(){return this.editor.recordUndoEntry("Cut")},e.prototype.inputControllerWillPaste=function(t){return this.editor.recordUndoEntry("Paste"),this.pasting=!0,this.notifyEditorElement("before-paste",{paste:t})},e.prototype.inputControllerDidPaste=function(t){return t.range=this.pastedRange,this.pastedRange=null,this.pasting=null,this.notifyEditorElement("paste",{paste:t})},e.prototype.inputControllerWillMoveText=function(){return this.editor.recordUndoEntry("Move")},e.prototype.inputControllerWillAttachFiles=function(){return this.editor.recordUndoEntry("Drop Files")},e.prototype.inputControllerDidReceiveKeyboardCommand=function(t){return this.toolbarController.applyKeyboardCommand(t)},e.prototype.inputControllerDidStartDrag=function(){return this.locationRangeBeforeDrag=this.selectionManager.getLocationRange()},e.prototype.inputControllerDidReceiveDragOverPoint=function(t){return this.selectionManager.setLocationRangeFromPointRange(t)},e.prototype.inputControllerDidCancelDrag=function(){return this.selectionManager.setLocationRange(this.locationRangeBeforeDrag),this.locationRangeBeforeDrag=null},e.prototype.locationRangeDidChange=function(t){return this.composition.updateCurrentAttributes(),this.updateCurrentActions(),this.attachmentLocationRange&&!o(this.attachmentLocationRange,t)&&this.composition.stopEditingAttachment(),this.notifyEditorElement("selection-change")},e.prototype.toolbarDidClickButton=function(){return this.getLocationRange()?void 0:this.setLocationRange({index:0,offset:0})},e.prototype.toolbarDidInvokeAction=function(t){return this.invokeAction(t)},e.prototype.toolbarDidToggleAttribute=function(t){return this.recordFormattingUndoEntry(),this.composition.toggleCurrentAttribute(t),this.render(),this.selectionFrozen?void 0:this.editorElement.focus()},e.prototype.toolbarDidUpdateAttribute=function(t,e){return this.recordFormattingUndoEntry(),this.composition.setCurrentAttribute(t,e),this.render(),this.selectionFrozen?void 0:this.editorElement.focus()},e.prototype.toolbarDidRemoveAttribute=function(t){return this.recordFormattingUndoEntry(),this.composition.removeCurrentAttribute(t),this.render(),this.selectionFrozen?void 0:this.editorElement.focus()},e.prototype.toolbarWillShowDialog=function(){return this.composition.expandSelectionForEditing(),this.freezeSelection()},e.prototype.toolbarDidShowDialog=function(t){return this.notifyEditorElement("toolbar-dialog-show",{dialogName:t})},e.prototype.toolbarDidHideDialog=function(t){return this.thawSelection(),this.editorElement.focus(),this.notifyEditorElement("toolbar-dialog-hide",{dialogName:t})},e.prototype.freezeSelection=function(){return this.selectionFrozen?void 0:(this.selectionManager.lock(),this.composition.freezeSelection(),this.selectionFrozen=!0,this.render())},e.prototype.thawSelection=function(){return this.selectionFrozen?(this.composition.thawSelection(),this.selectionManager.unlock(),this.selectionFrozen=!1,this.render()):void 0},e.prototype.actions={undo:{test:function(){return this.editor.canUndo()},perform:function(){return this.editor.undo()}},redo:{test:function(){return this.editor.canRedo()},perform:function(){return this.editor.redo()}},link:{test:function(){return this.editor.canActivateAttribute("href")}},increaseNestingLevel:{test:function(){return this.editor.canIncreaseNestingLevel()},perform:function(){return this.editor.increaseNestingLevel()&&this.render()}},decreaseNestingLevel:{test:function(){return this.editor.canDecreaseNestingLevel()},perform:function(){return this.editor.decreaseNestingLevel()&&this.render()}},increaseBlockLevel:{test:function(){return this.editor.canIncreaseNestingLevel()},perform:function(){return this.editor.increaseNestingLevel()&&this.render()}},decreaseBlockLevel:{test:function(){return this.editor.canDecreaseNestingLevel()},perform:function(){return this.editor.decreaseNestingLevel()&&this.render()}}},e.prototype.canInvokeAction=function(t){var e,n;return!!this.actionIsExternal(t)||!!(null!=(e=this.actions[t])&&null!=(n=e.test)?n.call(this):void 0)},e.prototype.invokeAction=function(t){var e,n;return this.actionIsExternal(t)?this.notifyEditorElement("action-invoke",{actionName:t}):null!=(e=this.actions[t])&&null!=(n=e.perform)?n.call(this):void 0},e.prototype.actionIsExternal=function(t){return/^x-./.test(t)},e.prototype.getCurrentActions=function(){var t,e;for(t in e={},this.actions)e[t]=this.canInvokeAction(t);return e},e.prototype.updateCurrentActions=function(){var t;return t=this.getCurrentActions(),n(t,this.currentActions)?void 0:(this.currentActions=t,this.toolbarController.updateActions(this.currentActions),this.notifyEditorElement("actions-change",{actions:this.currentActions}))},e.prototype.reparse=function(){return this.composition.replaceHTML(this.editorElement.innerHTML)},e.prototype.render=function(){return this.compositionController.render()},e.prototype.updateInputElement=function(){var t,e;return t=this.compositionController.getSerializableElement(),e=k.serializeToContentType(t,"text/html"),this.editorElement.setInputElementValue(e)},e.prototype.notifyEditorElement=function(t,e){switch(t){case"document-change":this.documentChangedSinceLastRender=!0;break;case"render":this.documentChangedSinceLastRender&&(this.documentChangedSinceLastRender=!1,this.notifyEditorElement("change"));break;case"change":case"attachment-add":case"attachment-edit":case"attachment-remove":this.updateInputElement()}return this.editorElement.notify(t,e)},e.prototype.removeAttachment=function(t){return this.editor.recordUndoEntry("Delete Attachment"),this.composition.removeAttachment(t),this.render()},e.prototype.recordFormattingUndoEntry=function(){var t;return t=this.selectionManager.getLocationRange(),i(t)?void 0:this.editor.recordUndoEntry("Formatting",{context:this.getUndoContext(),consolidatable:!0})},e.prototype.recordTypingUndoEntry=function(){return this.editor.recordUndoEntry("Typing",{context:this.getUndoContext(this.currentAttributes),consolidatable:!0})},e.prototype.getUndoContext=function(){var t;return t=1<=arguments.length?a.call(arguments,0):[],[this.getLocationContext(),this.getTimeContext()].concat(a.call(t))},e.prototype.getLocationContext=function(){var t;return t=this.selectionManager.getLocationRange(),i(t)?t[0].index:t},e.prototype.getTimeContext=function(){return 0<k.config.undoInterval?Math.floor((new Date).getTime()/k.config.undoInterval):0},e.prototype.isFocused=function(){var t;return this.editorElement===(null!=(t=this.editorElement.ownerDocument)?t.activeElement:void 0)},e}(k.Controller)}.call(this),function(){var t,e,n,i,o,r,s,a,u,l,c,h,d;i=k.makeElement,o=k.triggerEvent,e=k.handleEvent,n=k.handleEventOnce,t=k.AttachmentView.attachmentSelector,k.registerElement("trix-editor",(c=0,r=function(t){return!document.querySelector(":focus")&&t.hasAttribute("autofocus")&&document.querySelector("[autofocus]")===t?t.focus():void 0},h=function(t){return t.hasAttribute("contenteditable")?void 0:(t.setAttribute("contenteditable",""),n("focus",{onElement:t,withCallback:function(){return a(t)}}))},a=function(t){return l(t),d(t)},l=function(t){return("function"==typeof document.queryCommandSupported?document.queryCommandSupported("enableObjectResizing"):void 0)?(document.execCommand("enableObjectResizing",!1,!1),e("mscontrolselect",{onElement:t,preventDefault:!0})):void 0},d=function(){var t;return("function"==typeof document.queryCommandSupported?document.queryCommandSupported("DefaultParagraphSeparator"):void 0)&&("div"===(t=k.config.blockAttributes["default"].tagName)||"p"===t)?document.execCommand("DefaultParagraphSeparator",!1,t):void 0},s=/Trident.*rv:11/.test(navigator.userAgent),{defaultCSS:"%t:empty:not(:focus)::before {\n  content: attr(placeholder);\n  color: graytext;\n}\n\n%t a[contenteditable=false] {\n  cursor: text;\n}\n\n%t img {\n  max-width: 100%;\n  height: auto;\n}\n\n%t "+t+" figcaption textarea {\n  resize: none;\n}\n\n%t "+t+" figcaption textarea.trix-autoresize-clone {\n  position: absolute;\n  left: -9999px;\n  max-height: 0px;\n}\n\n%t "+t+" figcaption[data-trix-placeholder]:empty::before {\n  content: attr(data-trix-placeholder);\n  color: graytext;\n}\n\n%t [data-trix-cursor-target] {\n  display: "+(u=s?{display:"inline",width:"auto"}:{display:"inline-block",width:"1px"}).display+" !important;\n  width: "+u.width+" !important;\n  padding: 0 !important;\n  margin: 0 !important;\n  border: none !important;\n}\n\n%t [data-trix-cursor-target=left] {\n  vertical-align: top !important;\n  margin-left: -1px !important;\n}\n\n%t [data-trix-cursor-target=right] {\n  vertical-align: bottom !important;\n  margin-right: -1px !important;\n}",trixId:{get:function(){return this.hasAttribute("trix-id")?this.getAttribute("trix-id"):(this.setAttribute("trix-id",++c),this.trixId)}},toolbarElement:{get:function(){var t,e,n;return this.hasAttribute("toolbar")?null!=(e=this.ownerDocument)?e.getElementById(this.getAttribute("toolbar")):void 0:this.parentNode?(n="trix-toolbar-"+this.trixId,this.setAttribute("toolbar",n),t=i("trix-toolbar",{id:n}),this.parentNode.insertBefore(t,this),t):void 0}},inputElement:{get:function(){var t,e,n;return this.hasAttribute("input")?null!=(n=this.ownerDocument)?n.getElementById(this.getAttribute("input")):void 0:this.parentNode?(e="trix-input-"+this.trixId,this.setAttribute("input",e),t=i("input",{type:"hidden",id:e}),this.parentNode.insertBefore(t,this.nextElementSibling),t):void 0}},editor:{get:function(){var t;return null!=(t=this.editorController)?t.editor:void 0}},name:{get:function(){var t;return null!=(t=this.inputElement)?t.name:void 0}},value:{get:function(){var t;return null!=(t=this.inputElement)?t.value:void 0},set:function(t){var e;return this.defaultValue=t,null!=(e=this.editor)?e.loadHTML(this.defaultValue):void 0}},notify:function(t,e){return this.editorController?o("trix-"+t,{onElement:this,attributes:e}):void 0},setInputElementValue:function(t){var e;return null!=(e=this.inputElement)?e.value=t:void 0},createdCallback:function(){return h(this)},attachedCallback:function(){return this.hasAttribute("data-trix-internal")?void 0:(null==this.editorController&&(this.editorController=new k.EditorController({editorElement:this,html:this.defaultValue=this.value})),this.editorController.registerSelectionManager(),this.registerResetListener(),r(this),requestAnimationFrame((t=this,function(){return t.notify("initialize")})));var t},detachedCallback:function(){var t;return null!=(t=this.editorController)&&t.unregisterSelectionManager(),this.unregisterResetListener()},registerResetListener:function(){return this.resetListener=this.resetBubbled.bind(this),window.addEventListener("reset",this.resetListener,!1)},unregisterResetListener:function(){return window.removeEventListener("reset",this.resetListener,!1)},resetBubbled:function(t){var e;return t.target!==(null!=(e=this.inputElement)?e.form:void 0)||t.defaultPrevented?void 0:this.reset()},reset:function(){return this.value=this.defaultValue}}))}.call(this),function(){}.call(this)}).call(this),"object"==typeof module&&module.exports?module.exports=k:"function"==typeof define&&define.amd&&define(k)}.call(this),window.Element&&!Element.prototype.closest&&(Element.prototype.closest=function(t){var e,n=(this.document||this.ownerDocument).querySelectorAll(t),i=this;do{for(e=n.length;0<=--e&&n.item(e)!==i;);}while(e<0&&(i=i.parentElement));return i}),function(){for(var o=0,t=["ms","moz","webkit","o"],e=0;e<t.length&&!window.requestAnimationFrame;++e)window.requestAnimationFrame=window[t[e]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[t[e]+"CancelAnimationFrame"]||window[t[e]+"CancelRequestAnimationFrame"];window.requestAnimationFrame||(window.requestAnimationFrame=function(t){var e=(new Date).getTime(),n=Math.max(0,16-(e-o)),i=window.setTimeout(function(){t(e+n)},n);return o=e+n,i}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(t){clearTimeout(t)})}(),function(t,e){"function"==typeof define&&define.amd?define([],function(){return e(t)}):"object"==typeof exports?module.exports=e(t):t.SmoothScroll=e(t)}("undefined"!=typeof global?global:"undefined"!=typeof window?window:this,function(b){"use strict";var l="querySelector"in document&&"addEventListener"in b&&"requestAnimationFrame"in b&&"closest"in b.Element.prototype,w={ignore:"[data-scroll-ignore]",header:null,speed:500,offset:0,easing:"easeInOutCubic",customEasing:null,before:function(){},after:function(){}},x=function(){for(var n={},t=0,e=arguments.length,i=function(t){for(var e in t)t.hasOwnProperty(e)&&(n[e]=t[e])};t<e;t++){i(arguments[t])}return n},e=function(t){return parseInt(b.getComputedStyle(t).height,10)},c=function(t){"#"===t.charAt(0)&&(t=t.substr(1));for(var e,n=String(t),i=n.length,o=-1,r="",s=n.charCodeAt(0);++o<i;){if(0===(e=n.charCodeAt(o)))throw new InvalidCharacterError("Invalid character: the input contains U+0000.");1<=e&&e<=31||127==e||0===o&&48<=e&&e<=57||1===o&&48<=e&&e<=57&&45===s?r+="\\"+e.toString(16)+" ":r+=128<=e||45===e||95===e||48<=e&&e<=57||65<=e&&e<=90||97<=e&&e<=122?n.charAt(o):"\\"+n.charAt(o)}return"#"+r},A=function(t,e){var n;return"easeInQuad"===t.easing&&(n=e*e),"easeOutQuad"===t.easing&&(n=e*(2-e)),"easeInOutQuad"===t.easing&&(n=e<.5?2*e*e:(4-2*e)*e-1),"easeInCubic"===t.easing&&(n=e*e*e),"easeOutCubic"===t.easing&&(n=--e*e*e+1),"easeInOutCubic"===t.easing&&(n=e<.5?4*e*e*e:(e-1)*(2*e-2)*(2*e-2)+1),"easeInQuart"===t.easing&&(n=e*e*e*e),"easeOutQuart"===t.easing&&(n=1- --e*e*e*e),"easeInOutQuart"===t.easing&&(n=e<.5?8*e*e*e*e:1-8*--e*e*e*e),"easeInQuint"===t.easing&&(n=e*e*e*e*e),"easeOutQuint"===t.easing&&(n=1+--e*e*e*e*e),"easeInOutQuint"===t.easing&&(n=e<.5?16*e*e*e*e*e:1+16*--e*e*e*e*e),t.customEasing&&(n=t.customEasing(e)),n||e},E=function(){return Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight)},C=function(t,e,n){var i=0;if(t.offsetParent)for(;i+=t.offsetTop,t=t.offsetParent;);return i=Math.max(i-e-n,0)},T=function(t){return t?e(t)+t.offsetTop:0},S=function(t,e,n){n||(t.focus(),document.activeElement.id!==t.id&&(t.setAttribute("tabindex","-1"),t.focus(),t.style.outline="none"),b.scrollTo(0,e))},h=function(){return!!("matchMedia"in b&&b.matchMedia("(prefers-reduced-motion)").matches)};return function(o,t){var g,r,s,v,y,e,n,_={};_.cancelScroll=function(){cancelAnimationFrame(n)},_.animateScroll=function(i,o,t){var r=x(g||w,t||{}),s="[object Number]"===Object.prototype.toString.call(i),e=s||!i.tagName?null:i;if(s||e){var a=b.pageYOffset;r.header&&!v&&(v=document.querySelector(r.header)),y||(y=T(v));var u,n,l,c=s?i:C(e,y,parseInt("function"==typeof r.offset?r.offset():r.offset,10)),h=c-a,d=E(),p=0,f=function(t,e){var n=b.pageYOffset;if(t==e||n==e||(a<e&&b.innerHeight+n)>=d)return _.cancelScroll(),S(i,e,s),r.after(i,o),!(u=null)},m=function(t){u||(u=t),n=(p+=t-u)/parseInt(r.speed,10),l=a+h*A(r,n=1<n?1:n),b.scrollTo(0,Math.floor(l)),f(l,c)||(b.requestAnimationFrame(m),u=t)};0===b.pageYOffset&&b.scrollTo(0,0),r.before(i,o),_.cancelScroll(),b.requestAnimationFrame(m)}};var a=function(){r&&(r.id=r.getAttribute("data-scroll-id"),_.animateScroll(r,s),s=r=null)},i=function(t){if(!h(g)&&0===t.button&&!t.metaKey&&!t.ctrlKey&&(s=t.target.closest(o))&&"a"===s.tagName.toLowerCase()&&!t.target.closest(g.ignore)&&s.hostname===b.location.hostname&&s.pathname===b.location.pathname&&/#/.test(s.href)){var e;try{e=c(decodeURIComponent(s.hash))}catch(i){e=c(s.hash)}if("#"===e){t.preventDefault();var n=(r=document.body).id?r.id:"smooth-scroll-top";return r.setAttribute("data-scroll-id",n),r.id="",void(b.location.hash.substring(1)===n?a():b.location.hash=n)}(r=document.querySelector(e))&&(r.setAttribute("data-scroll-id",r.id),r.id="",s.hash===b.location.hash&&(t.preventDefault(),a()))}},u=function(){e||(e=setTimeout(function(){e=null,y=T(v)},66))};return _.destroy=function(){g&&(document.removeEventListener("click",i,!1),b.removeEventListener("resize",u,!1),_.cancelScroll(),n=e=y=v=s=r=g=null)},_.init=function(t){l&&(_.destroy(),g=x(w,t||{}),v=g.header?document.querySelector(g.header):null,y=T(v),document.addEventListener("click",i,!1),b.addEventListener("hashchange",a,!1),v&&b.addEventListener("resize",u,!1))},_.init(t),_}}),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.L={})}(this,function(t){"use strict";function u(t){var e,n,i,o;for(n=1,i=arguments.length;n<i;n++)for(e in o=arguments[n])t[e]=o[e];return t}function a(t,e){var n=Array.prototype.slice;if(t.bind)return t.bind.apply(t,n.call(arguments,1));var i=n.call(arguments,2);return function(){return t.apply(e,i.length?i.concat(n.call(arguments)):arguments)}}function l(t){return t._leaflet_id=t._leaflet_id||++te,t._leaflet_id}function e(t,e,n){var i,o,r,s;return s=function(){i=!1,o&&(r.apply(n,o),o=!1)},r=function(){i?o=arguments:(t.apply(n,arguments),setTimeout(s,e),i=!0)}}function n(t,e,n){var i=e[1],o=e[0],r=i-o;return t===i&&n?t:((t-o)%r+r)%r+o}function c(){return!1}function i(t,e){var n=Math.pow(10,void 0===e?6:e);return Math.round(t*n)/n}function o(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function h(t){return o(t).split(/\s+/)}function s(t,e){for(var n in t.hasOwnProperty("options")||(t.options=t.options?Qt(t.options):{}),e)t.options[n]=e[n];return t.options}function d(t,e,n){var i=[];for(var o in t)i.push(encodeURIComponent(n?o.toUpperCase():o)+"="+encodeURIComponent(t[o]));return(e&&-1!==e.indexOf("?")?"&":"?")+i.join("&")}function r(t,i){return t.replace(ee,function(t,e){var n=i[e];if(void 0===n)throw new Error("No value provided for variable "+t);return"function"==typeof n&&(n=n(i)),n})}function p(t,e){for(var n=0;n<t.length;n++)if(t[n]===e)return n;return-1}function f(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}function m(t){var e=+new Date,n=Math.max(0,16-(e-oe));return oe=e+n,window.setTimeout(t,n)}function E(t,e,n){if(!n||re!==m)return re.call(window,a(t,e));t.call(e)}function g(t){t&&se.call(window,t)}function v(){}function y(t){if("undefined"!=typeof L&&L&&L.Mixin){t=ne(t)?t:[t];for(var e=0;e<t.length;e++)t[e]===L.Mixin.Events&&console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.",(new Error).stack)}}function _(t,e,n){this.x=n?Math.round(t):t,this.y=n?Math.round(e):e}function b(t,e,n){return t instanceof _?t:ne(t)?new _(t[0],t[1]):null==t?t:"object"==typeof t&&"x"in t&&"y"in t?new _(t.x,t.y):new _(t,e,n)}function w(t,e){if(t)for(var n=e?[t,e]:t,i=0,o=n.length;i<o;i++)this.extend(n[i])}function x(t,e){return!t||t instanceof w?t:new w(t,e)}function A(t,e){if(t)for(var n=e?[t,e]:t,i=0,o=n.length;i<o;i++)this.extend(n[i])}function C(t,e){return t instanceof A?t:new A(t,e)}function T(t,e,n){if(isNaN(t)||isNaN(e))throw new Error("Invalid LatLng object: ("+t+", "+e+")");this.lat=+t,this.lng=+e,void 0!==n&&(this.alt=+n)}function S(t,e,n){return t instanceof T?t:ne(t)&&"object"!=typeof t[0]?3===t.length?new T(t[0],t[1],t[2]):2===t.length?new T(t[0],t[1]):null:null==t?t:"object"==typeof t&&"lat"in t?new T(t.lat,"lng"in t?t.lng:t.lon,t.alt):void 0===e?null:new T(t,e,n)}function k(t,e,n,i){if(ne(t))return this._a=t[0],this._b=t[1],this._c=t[2],void(this._d=t[3]);this._a=t,this._b=e,this._c=n,this._d=i}function P(t,e,n,i){return new k(t,e,n,i)}function D(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function O(t,e){var n,i,o,r,s,a,u="";for(n=0,o=t.length;n<o;n++){for(i=0,r=(s=t[n]).length;i<r;i++)u+=(i?"L":"M")+(a=s[i]).x+" "+a.y;u+=e?Xe?"z":"x":""}return u||"M0 0"}function I(t){return 0<=navigator.userAgent.toLowerCase().indexOf(t)}function R(t,e,n,i){return"touchstart"===e?M(t,n,i):"touchmove"===e?H(t,n,i):"touchend"===e&&W(t,n,i),this}function N(t,e,n){var i=t["_leaflet_"+e+n];return"touchstart"===e?t.removeEventListener(en,i,!1):"touchmove"===e?t.removeEventListener(nn,i,!1):"touchend"===e&&(t.removeEventListener(on,i,!1),t.removeEventListener(rn,i,!1)),this}function M(t,e,n){var i=a(function(t){if("mouse"!==t.pointerType&&t.MSPOINTER_TYPE_MOUSE&&t.pointerType!==t.MSPOINTER_TYPE_MOUSE){if(!(sn.indexOf(t.target.tagName)<0))return;X(t)}z(t,e)});t["_leaflet_touchstart"+n]=i,t.addEventListener(en,i,!1),un||(document.documentElement.addEventListener(en,B,!0),document.documentElement.addEventListener(nn,j,!0),document.documentElement.addEventListener(on,F,!0),document.documentElement.addEventListener(rn,F,!0),un=!0)}function B(t){an[t.pointerId]=t,ln++}function j(t){an[t.pointerId]&&(an[t.pointerId]=t)}function F(t){delete an[t.pointerId],ln--}function z(t,e){for(var n in t.touches=[],an)t.touches.push(an[n]);t.changedTouches=[t],e(t)}function H(t,e,n){var i=function(t){(t.pointerType!==t.MSPOINTER_TYPE_MOUSE&&"mouse"!==t.pointerType||0!==t.buttons)&&z(t,e)};t["_leaflet_touchmove"+n]=i,t.addEventListener(nn,i,!1)}function W(t,e,n){var i=function(t){z(t,e)};t["_leaflet_touchend"+n]=i,t.addEventListener(on,i,!1),t.addEventListener(rn,i,!1)}function q(t,o,e){function n(t){var e;if(Ze){if(!Ce||"mouse"===t.pointerType)return;e=ln}else e=t.touches.length;if(!(1<e)){var n=Date.now(),i=n-(r||n);s=t.touches?t.touches[0]:t,a=0<i&&i<=u,r=n}}function i(t){if(a&&!s.cancelBubble){if(Ze){if(!Ce||"mouse"===t.pointerType)return;var e,n,i={};for(n in s)e=s[n],i[n]=e&&e.bind?e.bind(s):e;s=i}s.type="dblclick",o(s),r=null}}var r,s,a=!1,u=250;return t[dn+cn+e]=n,t[dn+hn+e]=i,t[dn+"dblclick"+e]=o,t.addEventListener(cn,n,!1),t.addEventListener(hn,i,!1),t.addEventListener("dblclick",o,!1),this}function V(t,e){var n=t[dn+cn+e],i=t[dn+hn+e],o=t[dn+"dblclick"+e];return t.removeEventListener(cn,n,!1),t.removeEventListener(hn,i,!1),Ce||t.removeEventListener("dblclick",o,!1),this}function U(t,e,n,i){if("object"==typeof e)for(var o in e)K(t,o,e[o],n);else for(var r=0,s=(e=h(e)).length;r<s;r++)K(t,e[r],n,i);return this}function Z(t,e,n,i){if("object"==typeof e)for(var o in e)G(t,o,e[o],n);else if(e)for(var r=0,s=(e=h(e)).length;r<s;r++)G(t,e[r],n,i);else{for(var a in t[pn])G(t,a,t[pn][a]);delete t[pn]}return this}function K(e,t,n,i){var o=t+l(n)+(i?"_"+l(i):"");if(e[pn]&&e[pn][o])return this;var r=function(t){return n.call(i||e,t||window.event)},s=r;Ze&&0===t.indexOf("touch")?R(e,t,r,o):!Ke||"dblclick"!==t||!q||Ze&&Oe?"addEventListener"in e?"mousewheel"===t?e.addEventListener("onwheel"in e?"wheel":"mousewheel",r,!1):"mouseenter"===t||"mouseleave"===t?(r=function(t){t=t||window.event,ot(e,t)&&s(t)},e.addEventListener("mouseenter"===t?"mouseover":"mouseout",r,!1)):("click"===t&&Se&&(r=function(t){rt(t,s)}),e.addEventListener(t,r,!1)):"attachEvent"in e&&e.attachEvent("on"+t,r):q(e,r,o),e[pn]=e[pn]||{},e[pn][o]=r}function G(t,e,n,i){var o=e+l(n)+(i?"_"+l(i):""),r=t[pn]&&t[pn][o];if(!r)return this;Ze&&0===e.indexOf("touch")?N(t,e,o):!Ke||"dblclick"!==e||!V||Ze&&Oe?"removeEventListener"in t?"mousewheel"===e?t.removeEventListener("onwheel"in t?"wheel":"mousewheel",r,!1):t.removeEventListener("mouseenter"===e?"mouseover":"mouseleave"===e?"mouseout":e,r,!1):"detachEvent"in t&&t.detachEvent("on"+e,r):V(t,o),t[pn][o]=null}function J(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,it(t),this}function $(t){return K(t,"mousewheel",J),this}function Y(t){return U(t,"mousedown touchstart dblclick",J),K(t,"click",nt),this}function X(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function Q(t){return X(t),J(t),this}function tt(t,e){if(!e)return new _(t.clientX,t.clientY);var n=e.getBoundingClientRect(),i=n.width/e.offsetWidth||1,o=n.height/e.offsetHeight||1;return new _(t.clientX/i-n.left-e.clientLeft,t.clientY/o-n.top-e.clientTop)}function et(t){return Ce?t.wheelDeltaY/2:t.deltaY&&0===t.deltaMode?-t.deltaY/fn:t.deltaY&&1===t.deltaMode?20*-t.deltaY:t.deltaY&&2===t.deltaMode?60*-t.deltaY:t.deltaX||t.deltaZ?0:t.wheelDelta?(t.wheelDeltaY||t.wheelDelta)/2:t.detail&&Math.abs(t.detail)<32765?20*-t.detail:t.detail?t.detail/-32765*60:0}function nt(t){mn[t.type]=!0}function it(t){var e=mn[t.type];return mn[t.type]=!1,e}function ot(t,e){var n=e.relatedTarget;if(!n)return!0;try{for(;n&&n!==t;)n=n.parentNode}catch(t){return!1}return n!==t}function rt(t,e){var n=t.timeStamp||t.originalEvent&&t.originalEvent.timeStamp,i=me&&n-me;i&&100<i&&i<500||t.target._simulatedClick&&!t._simulated?Q(t):(me=n,e(t))}function st(t){return"string"==typeof t?document.getElementById(t):t}function at(t,e){var n=t.style[e]||t.currentStyle&&t.currentStyle[e];if((!n||"auto"===n)&&document.defaultView){var i=document.defaultView.getComputedStyle(t,null);n=i?i[e]:null}return"auto"===n?null:n}function ut(t,e,n){var i=document.createElement(t);return i.className=e||"",n&&n.appendChild(i),i}function lt(t){var e=t.parentNode;e&&e.removeChild(t)}function ct(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function ht(t){var e=t.parentNode;e.lastChild!==t&&e.appendChild(t)}function dt(t){var e=t.parentNode;e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function pt(t,e){if(void 0!==t.classList)return t.classList.contains(e);var n=vt(t);return 0<n.length&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(n)}function ft(t,e){if(void 0!==t.classList)for(var n=h(e),i=0,o=n.length;i<o;i++)t.classList.add(n[i]);else if(!pt(t,e)){var r=vt(t);gt(t,(r?r+" ":"")+e)}}function mt(t,e){void 0!==t.classList?t.classList.remove(e):gt(t,o((" "+vt(t)+" ").replace(" "+e+" "," ")))}function gt(t,e){void 0===t.className.baseVal?t.className=e:t.className.baseVal=e}function vt(t){return void 0===t.className.baseVal?t.className:t.className.baseVal}function yt(t,e){"opacity"in t.style?t.style.opacity=e:"filter"in t.style&&_t(t,e)}function _t(t,e){var n=!1,i="DXImageTransform.Microsoft.Alpha";try{n=t.filters.item(i)}catch(t){if(1===e)return}e=Math.round(100*e),n?(n.Enabled=100!==e,n.Opacity=e):t.style.filter+=" progid:"+i+"(opacity="+e+")"}function bt(t){for(var e=document.documentElement.style,n=0;n<t.length;n++)if(t[n]in e)return t[n];return!1}function wt(t,e,n){var i=e||new _(0,0);t.style[vn]=(je?"translate("+i.x+"px,"+i.y+"px)":"translate3d("+i.x+"px,"+i.y+"px,0)")+(n?" scale("+n+")":"")}function xt(t,e){t._leaflet_pos=e,He?wt(t,e):(t.style.left=e.x+"px",t.style.top=e.y+"px")}function At(t){return t._leaflet_pos||new _(0,0)}function Et(){U(window,"dragstart",X)}function Ct(){Z(window,"dragstart",X)}function Tt(t){for(;-1===t.tabIndex;)t=t.parentNode;t.style&&(St(),xn=(wn=t).style.outline,t.style.outline="none",U(window,"keydown",St))}function St(){wn&&(wn.style.outline=xn,xn=wn=void 0,Z(window,"keydown",St))}function Lt(t,e){if(!e||!t.length)return t.slice();var n=e*e;return Pt(t=Ot(t,n),n)}function kt(t,e,n){return Math.sqrt(Bt(t,e,n,!0))}function Pt(t,e){var n=t.length,i=new(typeof Uint8Array!=void 0+""?Uint8Array:Array)(n);i[0]=i[n-1]=1,Dt(t,i,e,0,n-1);var o,r=[];for(o=0;o<n;o++)i[o]&&r.push(t[o]);return r}function Dt(t,e,n,i,o){var r,s,a,u=0;for(s=i+1;s<=o-1;s++)(a=Bt(t[s],t[i],t[o],!0))>u&&(r=s,u=a);n<u&&(e[r]=1,Dt(t,e,n,i,r),Dt(t,e,n,r,o))}function Ot(t,e){
for(var n=[t[0]],i=1,o=0,r=t.length;i<r;i++)Mt(t[i],t[o])>e&&(n.push(t[i]),o=i);return o<r-1&&n.push(t[r-1]),n}function It(t,e,n,i,o){var r,s,a,u=i?In:Nt(t,n),l=Nt(e,n);for(In=l;;){if(!(u|l))return[t,e];if(u&l)return!1;a=Nt(s=Rt(t,e,r=u||l,n,o),n),r===u?(t=s,u=a):(e=s,l=a)}}function Rt(t,e,n,i,o){var r,s,a=e.x-t.x,u=e.y-t.y,l=i.min,c=i.max;return 8&n?(r=t.x+a*(c.y-t.y)/u,s=c.y):4&n?(r=t.x+a*(l.y-t.y)/u,s=l.y):2&n?(r=c.x,s=t.y+u*(c.x-t.x)/a):1&n&&(r=l.x,s=t.y+u*(l.x-t.x)/a),new _(r,s,o)}function Nt(t,e){var n=0;return t.x<e.min.x?n|=1:t.x>e.max.x&&(n|=2),t.y<e.min.y?n|=4:t.y>e.max.y&&(n|=8),n}function Mt(t,e){var n=e.x-t.x,i=e.y-t.y;return n*n+i*i}function Bt(t,e,n,i){var o,r=e.x,s=e.y,a=n.x-r,u=n.y-s,l=a*a+u*u;return 0<l&&(1<(o=((t.x-r)*a+(t.y-s)*u)/l)?(r=n.x,s=n.y):0<o&&(r+=a*o,s+=u*o)),a=t.x-r,u=t.y-s,i?a*a+u*u:new _(r,s)}function jt(t){return!ne(t[0])||"object"!=typeof t[0][0]&&void 0!==t[0][0]}function Ft(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),jt(t)}function zt(t,e,n){var i,o,r,s,a,u,l,c,h,d=[1,4,2,8];for(o=0,l=t.length;o<l;o++)t[o]._code=Nt(t[o],e);for(s=0;s<4;s++){for(c=d[s],i=[],o=0,r=(l=t.length)-1;o<l;r=o++)a=t[o],u=t[r],a._code&c?u._code&c||((h=Rt(u,a,c,e,n))._code=Nt(h,e),i.push(h)):(u._code&c&&((h=Rt(u,a,c,e,n))._code=Nt(h,e),i.push(h)),i.push(a));t=i}return t}function Ht(t,e){var n,i,o,r,s="Feature"===t.type?t.geometry:t,a=s?s.coordinates:null,u=[],l=e&&e.pointToLayer,c=e&&e.coordsToLatLng||Wt;if(!a&&!s)return null;switch(s.type){case"Point":return n=c(a),l?l(t,n):new ti(n);case"MultiPoint":for(o=0,r=a.length;o<r;o++)n=c(a[o]),u.push(l?l(t,n):new ti(n));return new $n(u);case"LineString":case"MultiLineString":return i=qt(a,"LineString"===s.type?0:1,c),new oi(i,e);case"Polygon":case"MultiPolygon":return i=qt(a,"Polygon"===s.type?1:2,c),new ri(i,e);case"GeometryCollection":for(o=0,r=s.geometries.length;o<r;o++){var h=Ht({geometry:s.geometries[o],type:"Feature",properties:t.properties},e);h&&u.push(h)}return new $n(u);default:throw new Error("Invalid GeoJSON object.")}}function Wt(t){return new T(t[1],t[0],t[2])}function qt(t,e,n){for(var i,o=[],r=0,s=t.length;r<s;r++)i=e?qt(t[r],e-1,n):(n||Wt)(t[r]),o.push(i);return o}function Vt(t,e){return e="number"==typeof e?e:6,void 0!==t.alt?[i(t.lng,e),i(t.lat,e),i(t.alt,e)]:[i(t.lng,e),i(t.lat,e)]}function Ut(t,e,n,i){for(var o=[],r=0,s=t.length;r<s;r++)o.push(e?Ut(t[r],e-1,n,i):Vt(t[r],i));return!e&&n&&o.push(o[0]),o}function Zt(t,e){return t.feature?u({},t.feature,{geometry:e}):Kt(e)}function Kt(t){return"Feature"===t.type||"FeatureCollection"===t.type?t:{type:"Feature",properties:{},geometry:t}}function Gt(t,e){return new si(t,e)}function Jt(t,e){return new gi(t,e)}function $t(t){return Ye?new _i(t):null}function Yt(t){return Xe||Qe?new Ai(t):null}var Xt=Object.freeze;Object.freeze=function(t){return t};var Qt=Object.create||function(){function e(){}return function(t){return e.prototype=t,new e}}(),te=0,ee=/\{ *([\w_-]+) *\}/g,ne=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},ie="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=",oe=0,re=window.requestAnimationFrame||f("RequestAnimationFrame")||m,se=window.cancelAnimationFrame||f("CancelAnimationFrame")||f("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)},ae=(Object.freeze||Object)({freeze:Xt,extend:u,create:Qt,bind:a,lastId:te,stamp:l,throttle:e,wrapNum:n,falseFn:c,formatNum:i,trim:o,splitWords:h,setOptions:s,getParamString:d,template:r,isArray:ne,indexOf:p,emptyImageUrl:ie,requestFn:re,cancelFn:se,requestAnimFrame:E,cancelAnimFrame:g});v.extend=function(t){var e=function(){this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},n=e.__super__=this.prototype,i=Qt(n);for(var o in(i.constructor=e).prototype=i,this)this.hasOwnProperty(o)&&"prototype"!==o&&"__super__"!==o&&(e[o]=this[o]);return t.statics&&(u(e,t.statics),delete t.statics),t.includes&&(y(t.includes),u.apply(null,[i].concat(t.includes)),delete t.includes),i.options&&(t.options=u(Qt(i.options),t.options)),u(i,t),i._initHooks=[],i.callInitHooks=function(){if(!this._initHooksCalled){n.callInitHooks&&n.callInitHooks.call(this),this._initHooksCalled=!0;for(var t=0,e=i._initHooks.length;t<e;t++)i._initHooks[t].call(this)}},e},v.include=function(t){return u(this.prototype,t),this},v.mergeOptions=function(t){return u(this.prototype.options,t),this},v.addInitHook=function(t){var e=Array.prototype.slice.call(arguments,1),n="function"==typeof t?t:function(){this[t].apply(this,e)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(n),this};var ue={on:function(t,e,n){if("object"==typeof t)for(var i in t)this._on(i,t[i],e);else for(var o=0,r=(t=h(t)).length;o<r;o++)this._on(t[o],e,n);return this},off:function(t,e,n){if(t)if("object"==typeof t)for(var i in t)this._off(i,t[i],e);else for(var o=0,r=(t=h(t)).length;o<r;o++)this._off(t[o],e,n);else delete this._events;return this},_on:function(t,e,n){this._events=this._events||{};var i=this._events[t];i||(i=[],this._events[t]=i),n===this&&(n=void 0);for(var o={fn:e,ctx:n},r=i,s=0,a=r.length;s<a;s++)if(r[s].fn===e&&r[s].ctx===n)return;r.push(o)},_off:function(t,e,n){var i,o,r;if(this._events&&(i=this._events[t]))if(e){if(n===this&&(n=void 0),i)for(o=0,r=i.length;o<r;o++){var s=i[o];if(s.ctx===n&&s.fn===e)return s.fn=c,this._firingCount&&(this._events[t]=i=i.slice()),void i.splice(o,1)}}else{for(o=0,r=i.length;o<r;o++)i[o].fn=c;delete this._events[t]}},fire:function(t,e,n){if(!this.listens(t,n))return this;var i=u({},e,{type:t,target:this,sourceTarget:e&&e.sourceTarget||this});if(this._events){var o=this._events[t];if(o){this._firingCount=this._firingCount+1||1;for(var r=0,s=o.length;r<s;r++){var a=o[r];a.fn.call(a.ctx||this,i)}this._firingCount--}}return n&&this._propagateEvent(i),this},listens:function(t,e){var n=this._events&&this._events[t];if(n&&n.length)return!0;if(e)for(var i in this._eventParents)if(this._eventParents[i].listens(t,e))return!0;return!1},once:function(t,e,n){if("object"==typeof t){for(var i in t)this.once(i,t[i],e);return this}var o=a(function(){this.off(t,e,n).off(t,o,n)},this);return this.on(t,e,n).on(t,o,n)},addEventParent:function(t){return this._eventParents=this._eventParents||{},this._eventParents[l(t)]=t,this},removeEventParent:function(t){return this._eventParents&&delete this._eventParents[l(t)],this},_propagateEvent:function(t){for(var e in this._eventParents)this._eventParents[e].fire(t.type,u({layer:t.target,propagatedFrom:t.target},t),!0)}};ue.addEventListener=ue.on,ue.removeEventListener=ue.clearAllEventListeners=ue.off,ue.addOneTimeEventListener=ue.once,ue.fireEvent=ue.fire,ue.hasEventListeners=ue.listens;var le=v.extend(ue),ce=Math.trunc||function(t){return 0<t?Math.floor(t):Math.ceil(t)};_.prototype={clone:function(){return new _(this.x,this.y)},add:function(t){return this.clone()._add(b(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(b(t))},_subtract:function(t){return this.x-=t.x,this.y-=t.y,this},divideBy:function(t){return this.clone()._divideBy(t)},_divideBy:function(t){return this.x/=t,this.y/=t,this},multiplyBy:function(t){return this.clone()._multiplyBy(t)},_multiplyBy:function(t){return this.x*=t,this.y*=t,this},scaleBy:function(t){return new _(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new _(this.x/t.x,this.y/t.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=ce(this.x),this.y=ce(this.y),this},distanceTo:function(t){var e=(t=b(t)).x-this.x,n=t.y-this.y;return Math.sqrt(e*e+n*n)},equals:function(t){return(t=b(t)).x===this.x&&t.y===this.y},contains:function(t){return t=b(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+i(this.x)+", "+i(this.y)+")"}},w.prototype={extend:function(t){return t=b(t),this.min||this.max?(this.min.x=Math.min(t.x,this.min.x),this.max.x=Math.max(t.x,this.max.x),this.min.y=Math.min(t.y,this.min.y),this.max.y=Math.max(t.y,this.max.y)):(this.min=t.clone(),this.max=t.clone()),this},getCenter:function(t){return new _((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return new _(this.min.x,this.max.y)},getTopRight:function(){return new _(this.max.x,this.min.y)},getTopLeft:function(){return this.min},getBottomRight:function(){return this.max},getSize:function(){return this.max.subtract(this.min)},contains:function(t){var e,n;return(t="number"==typeof t[0]||t instanceof _?b(t):x(t))instanceof w?(e=t.min,n=t.max):e=n=t,e.x>=this.min.x&&n.x<=this.max.x&&e.y>=this.min.y&&n.y<=this.max.y},intersects:function(t){t=x(t);var e=this.min,n=this.max,i=t.min,o=t.max,r=o.x>=e.x&&i.x<=n.x,s=o.y>=e.y&&i.y<=n.y;return r&&s},overlaps:function(t){t=x(t);var e=this.min,n=this.max,i=t.min,o=t.max,r=o.x>e.x&&i.x<n.x,s=o.y>e.y&&i.y<n.y;return r&&s},isValid:function(){return!(!this.min||!this.max)}},A.prototype={extend:function(t){var e,n,i=this._southWest,o=this._northEast;if(t instanceof T)n=e=t;else{if(!(t instanceof A))return t?this.extend(S(t)||C(t)):this;if(e=t._southWest,n=t._northEast,!e||!n)return this}return i||o?(i.lat=Math.min(e.lat,i.lat),i.lng=Math.min(e.lng,i.lng),o.lat=Math.max(n.lat,o.lat),o.lng=Math.max(n.lng,o.lng)):(this._southWest=new T(e.lat,e.lng),this._northEast=new T(n.lat,n.lng)),this},pad:function(t){var e=this._southWest,n=this._northEast,i=Math.abs(e.lat-n.lat)*t,o=Math.abs(e.lng-n.lng)*t;return new A(new T(e.lat-i,e.lng-o),new T(n.lat+i,n.lng+o))},getCenter:function(){return new T((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new T(this.getNorth(),this.getWest())},getSouthEast:function(){return new T(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(t){t="number"==typeof t[0]||t instanceof T||"lat"in t?S(t):C(t);var e,n,i=this._southWest,o=this._northEast;return t instanceof A?(e=t.getSouthWest(),n=t.getNorthEast()):e=n=t,e.lat>=i.lat&&n.lat<=o.lat&&e.lng>=i.lng&&n.lng<=o.lng},intersects:function(t){t=C(t);var e=this._southWest,n=this._northEast,i=t.getSouthWest(),o=t.getNorthEast(),r=o.lat>=e.lat&&i.lat<=n.lat,s=o.lng>=e.lng&&i.lng<=n.lng;return r&&s},overlaps:function(t){t=C(t);var e=this._southWest,n=this._northEast,i=t.getSouthWest(),o=t.getNorthEast(),r=o.lat>e.lat&&i.lat<n.lat,s=o.lng>e.lng&&i.lng<n.lng;return r&&s},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t,e){return!!t&&(t=C(t),this._southWest.equals(t.getSouthWest(),e)&&this._northEast.equals(t.getNorthEast(),e))},isValid:function(){return!(!this._southWest||!this._northEast)}};var he,de={latLngToPoint:function(t,e){var n=this.projection.project(t),i=this.scale(e);return this.transformation._transform(n,i)},pointToLatLng:function(t,e){var n=this.scale(e),i=this.transformation.untransform(t,n);return this.projection.unproject(i)},project:function(t){return this.projection.project(t)},unproject:function(t){return this.projection.unproject(t)},scale:function(t){return 256*Math.pow(2,t)},zoom:function(t){return Math.log(t/256)/Math.LN2},getProjectedBounds:function(t){if(this.infinite)return null;var e=this.projection.bounds,n=this.scale(t);return new w(this.transformation.transform(e.min,n),this.transformation.transform(e.max,n))},infinite:!(T.prototype={equals:function(t,e){return!!t&&(t=S(t),Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng))<=(void 0===e?1e-9:e))},toString:function(t){return"LatLng("+i(this.lat,t)+", "+i(this.lng,t)+")"},distanceTo:function(t){return pe.distance(this,S(t))},wrap:function(){return pe.wrapLatLng(this)},toBounds:function(t){var e=180*t/40075017,n=e/Math.cos(Math.PI/180*this.lat);return C([this.lat-e,this.lng-n],[this.lat+e,this.lng+n])},clone:function(){return new T(this.lat,this.lng,this.alt)}}),wrapLatLng:function(t){var e=this.wrapLng?n(t.lng,this.wrapLng,!0):t.lng;return new T(this.wrapLat?n(t.lat,this.wrapLat,!0):t.lat,e,t.alt)},wrapLatLngBounds:function(t){var e=t.getCenter(),n=this.wrapLatLng(e),i=e.lat-n.lat,o=e.lng-n.lng;if(0===i&&0===o)return t;var r=t.getSouthWest(),s=t.getNorthEast();return new A(new T(r.lat-i,r.lng-o),new T(s.lat-i,s.lng-o))}},pe=u({},de,{wrapLng:[-180,180],R:6371e3,distance:function(t,e){var n=Math.PI/180,i=t.lat*n,o=e.lat*n,r=Math.sin((e.lat-t.lat)*n/2),s=Math.sin((e.lng-t.lng)*n/2),a=r*r+Math.cos(i)*Math.cos(o)*s*s,u=2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a));return this.R*u}}),fe={R:6378137,MAX_LATITUDE:85.0511287798,project:function(t){var e=Math.PI/180,n=this.MAX_LATITUDE,i=Math.max(Math.min(n,t.lat),-n),o=Math.sin(i*e);return new _(this.R*t.lng*e,this.R*Math.log((1+o)/(1-o))/2)},unproject:function(t){var e=180/Math.PI;return new T((2*Math.atan(Math.exp(t.y/this.R))-Math.PI/2)*e,t.x*e/this.R)},bounds:(he=6378137*Math.PI,new w([-he,-he],[he,he]))};k.prototype={transform:function(t,e){return this._transform(t.clone(),e)},_transform:function(t,e){return e=e||1,t.x=e*(this._a*t.x+this._b),t.y=e*(this._c*t.y+this._d),t},untransform:function(t,e){return e=e||1,new _((t.x/e-this._b)/this._a,(t.y/e-this._d)/this._c)}};var me,ge,ve,ye,_e,be=u({},pe,{code:"EPSG:3857",projection:fe,transformation:(_e=.5/(Math.PI*fe.R),P(_e,.5,-_e,.5))}),we=u({},be,{code:"EPSG:900913"}),xe=document.documentElement.style,Ae="ActiveXObject"in window,Ee=Ae&&!document.addEventListener,Ce="msLaunchUri"in navigator&&!("documentMode"in document),Te=I("webkit"),Se=I("android"),Le=I("android 2")||I("android 3"),ke=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),Pe=Se&&I("Google")&&ke<537&&!("AudioNode"in window),De=!!window.opera,Oe=I("chrome"),Ie=I("gecko")&&!Te&&!De&&!Ae,Re=!Oe&&I("safari"),Ne=I("phantom"),Me="OTransition"in xe,Be=0===navigator.platform.indexOf("Win"),je=Ae&&"transition"in xe,Fe="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!Le,ze="MozPerspective"in xe,He=!window.L_DISABLE_3D&&(je||Fe||ze)&&!Me&&!Ne,We="undefined"!=typeof orientation||I("mobile"),qe=We&&Te,Ve=We&&Fe,Ue=!window.PointerEvent&&window.MSPointerEvent,Ze=!(!window.PointerEvent&&!Ue),Ke=!window.L_NO_TOUCH&&(Ze||"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch),Ge=We&&De,Je=We&&Ie,$e=1<(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI),Ye=!!document.createElement("canvas").getContext,Xe=!(!document.createElementNS||!D("svg").createSVGRect),Qe=!Xe&&function(){try{var t=document.createElement("div");t.innerHTML='<v:shape adj="1"/>';var e=t.firstChild;return e.style.behavior="url(#default#VML)",e&&"object"==typeof e.adj}catch(t){return!1}}(),tn=(Object.freeze||Object)({ie:Ae,ielt9:Ee,edge:Ce,webkit:Te,android:Se,android23:Le,androidStock:Pe,opera:De,chrome:Oe,gecko:Ie,safari:Re,phantom:Ne,opera12:Me,win:Be,ie3d:je,webkit3d:Fe,gecko3d:ze,any3d:He,mobile:We,mobileWebkit:qe,mobileWebkit3d:Ve,msPointer:Ue,pointer:Ze,touch:Ke,mobileOpera:Ge,mobileGecko:Je,retina:$e,canvas:Ye,svg:Xe,vml:Qe}),en=Ue?"MSPointerDown":"pointerdown",nn=Ue?"MSPointerMove":"pointermove",on=Ue?"MSPointerUp":"pointerup",rn=Ue?"MSPointerCancel":"pointercancel",sn=["INPUT","SELECT","OPTION"],an={},un=!1,ln=0,cn=Ue?"MSPointerDown":Ze?"pointerdown":"touchstart",hn=Ue?"MSPointerUp":Ze?"pointerup":"touchend",dn="_leaflet_",pn="_leaflet_events",fn=Be&&Oe?2*window.devicePixelRatio:Ie?window.devicePixelRatio:1,mn={},gn=(Object.freeze||Object)({on:U,off:Z,stopPropagation:J,disableScrollPropagation:$,disableClickPropagation:Y,preventDefault:X,stop:Q,getMousePosition:tt,getWheelDelta:et,fakeStop:nt,skipped:it,isExternalTarget:ot,addListener:U,removeListener:Z}),vn=bt(["transform","WebkitTransform","OTransform","MozTransform","msTransform"]),yn=bt(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),_n="webkitTransition"===yn||"OTransition"===yn?yn+"End":"transitionend";if("onselectstart"in document)ge=function(){U(window,"selectstart",X)},ve=function(){Z(window,"selectstart",X)};else{var bn=bt(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);ge=function(){if(bn){var t=document.documentElement.style;ye=t[bn],t[bn]="none"}},ve=function(){bn&&(document.documentElement.style[bn]=ye,ye=void 0)}}var wn,xn,An=(Object.freeze||Object)({TRANSFORM:vn,TRANSITION:yn,TRANSITION_END:_n,get:st,getStyle:at,create:ut,remove:lt,empty:ct,toFront:ht,toBack:dt,hasClass:pt,addClass:ft,removeClass:mt,setClass:gt,getClass:vt,setOpacity:yt,testProp:bt,setTransform:wt,setPosition:xt,getPosition:At,disableTextSelection:ge,enableTextSelection:ve,disableImageDrag:Et,enableImageDrag:Ct,preventOutline:Tt,restoreOutline:St}),En=le.extend({run:function(t,e,n,i){this.stop(),this._el=t,this._inProgress=!0,this._duration=n||.25,this._easeOutPower=1/Math.max(i||.5,.2),this._startPos=At(t),this._offset=e.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=E(this._animate,this),this._step()},_step:function(t){var e=+new Date-this._startTime,n=1e3*this._duration;e<n?this._runFrame(this._easeOut(e/n),t):(this._runFrame(1),this._complete())},_runFrame:function(t,e){var n=this._startPos.add(this._offset.multiplyBy(t));e&&n._round(),xt(this._el,n),this.fire("step")},_complete:function(){g(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),Cn=le.extend({options:{crs:be,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:function(t,e){e=s(this,e),this._initContainer(t),this._initLayout(),this._onResize=a(this._onResize,this),this._initEvents(),e.maxBounds&&this.setMaxBounds(e.maxBounds),void 0!==e.zoom&&(this._zoom=this._limitZoom(e.zoom)),e.center&&void 0!==e.zoom&&this.setView(S(e.center),e.zoom,{reset:!0}),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this.callInitHooks(),this._zoomAnimated=yn&&He&&!Ge&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),U(this._proxy,_n,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(t,e,n){return e=void 0===e?this._zoom:this._limitZoom(e),t=this._limitCenter(S(t),e,this.options.maxBounds),n=n||{},this._stop(),this._loaded&&!n.reset&&!0!==n&&(void 0!==n.animate&&(n.zoom=u({animate:n.animate},n.zoom),n.pan=u({animate:n.animate,duration:n.duration},n.pan)),this._zoom!==e?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,e,n.zoom):this._tryAnimatedPan(t,n.pan))?clearTimeout(this._sizeTimer):this._resetView(t,e),this},setZoom:function(t,e){return this._loaded?this.setView(this.getCenter(),t,{zoom:e}):(this._zoom=t,this)},zoomIn:function(t,e){return t=t||(He?this.options.zoomDelta:1),this.setZoom(this._zoom+t,e)},zoomOut:function(t,e){return t=t||(He?this.options.zoomDelta:1),this.setZoom(this._zoom-t,e)},setZoomAround:function(t,e,n){var i=this.getZoomScale(e),o=this.getSize().divideBy(2),r=(t instanceof _?t:this.latLngToContainerPoint(t)).subtract(o).multiplyBy(1-1/i),s=this.containerPointToLatLng(o.add(r));return this.setView(s,e,{zoom:n})},_getBoundsCenterZoom:function(t,e){e=e||{},t=t.getBounds?t.getBounds():C(t);var n=b(e.paddingTopLeft||e.padding||[0,0]),i=b(e.paddingBottomRight||e.padding||[0,0]),o=this.getBoundsZoom(t,!1,n.add(i));if((o="number"==typeof e.maxZoom?Math.min(e.maxZoom,o):o)===1/0)return{center:t.getCenter(),zoom:o};var r=i.subtract(n).divideBy(2),s=this.project(t.getSouthWest(),o),a=this.project(t.getNorthEast(),o);return{center:this.unproject(s.add(a).divideBy(2).add(r),o),zoom:o}},fitBounds:function(t,e){if(!(t=C(t)).isValid())throw new Error("Bounds are not valid.");var n=this._getBoundsCenterZoom(t,e);return this.setView(n.center,n.zoom,e)},fitWorld:function(t){return this.fitBounds([[-90,-180],[90,180]],t)},panTo:function(t,e){return this.setView(t,this._zoom,{pan:e})},panBy:function(t,e){if(e=e||{},!(t=b(t).round()).x&&!t.y)return this.fire("moveend");if(!0!==e.animate&&!this.getSize().contains(t))return this._resetView(this.unproject(this.project(this.getCenter()).add(t)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new En,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),e.noMoveStart||this.fire("movestart"),!1!==e.animate){ft(this._mapPane,"leaflet-pan-anim");var n=this._getMapPanePos().subtract(t).round();this._panAnim.run(this._mapPane,n,e.duration||.25,e.easeLinearity)}else this._rawPanBy(t),this.fire("move").fire("moveend");return this},flyTo:function(n,i,t){function e(t){var e=(g*g-m*m+(t?-1:1)*_*_*v*v)/(2*(t?g:m)*_*v),n=Math.sqrt(e*e+1)-e;return n<1e-9?-18:Math.log(n)}function o(t){return(Math.exp(t)-Math.exp(-t))/2}function r(t){return(Math.exp(t)+Math.exp(-t))/2}function s(t){return o(t)/r(t)}function a(t){return m*(r(b)/r(b+y*t))}function u(t){return m*(r(b)*s(b+y*t)-o(b))/_}function l(t){return 1-Math.pow(1-t,1.5)}function c(){var t=(Date.now()-w)/A,e=l(t)*x;t<=1?(this._flyToFrame=E(c,this),this._move(this.unproject(h.add(d.subtract(h).multiplyBy(u(e)/v)),f),this.getScaleZoom(m/a(e),f),{flyTo:!0})):this._move(n,i)._moveEnd(!0)}if(!1===(t=t||{}).animate||!He)return this.setView(n,i,t);this._stop();var h=this.project(this.getCenter()),d=this.project(n),p=this.getSize(),f=this._zoom;n=S(n),i=void 0===i?f:i;var m=Math.max(p.x,p.y),g=m*this.getZoomScale(f,i),v=d.distanceTo(h)||1,y=1.42,_=y*y,b=e(0),w=Date.now(),x=(e(1)-b)/y,A=t.duration?1e3*t.duration:1e3*x*.8;return this._moveStart(!0,t.noMoveStart),c.call(this),this},flyToBounds:function(t,e){var n=this._getBoundsCenterZoom(t,e);return this.flyTo(n.center,n.zoom,e)},setMaxBounds:function(t){return(t=C(t)).isValid()?(this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this.options.maxBounds=t,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this.off("moveend",this._panInsideMaxBounds))},setMinZoom:function(t){var e=this.options.minZoom;return this.options.minZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(t):this},setMaxZoom:function(t){var e=this.options.maxZoom;return this.options.maxZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,e){this._enforcingBounds=!0;var n=this.getCenter(),i=this._limitCenter(n,this._zoom,C(t));return n.equals(i)||this.panTo(i,e),this._enforcingBounds=!1,this},invalidateSize:function(t){if(!this._loaded)return this;t=u({animate:!1,pan:!0},!0===t?{animate:!0}:t);var e=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var n=this.getSize(),i=e.divideBy(2).round(),o=n.divideBy(2).round(),r=i.subtract(o);return r.x||r.y?(t.animate&&t.pan?this.panBy(r):(t.pan&&this._rawPanBy(r),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(a(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:n})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){if(t=this._locateOptions=u({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var e=a(this._handleGeolocationResponse,this),n=a(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,n,t):navigator.geolocation.getCurrentPosition(e,n,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){var e=t.code,n=t.message||(1===e?"permission denied":2===e?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:"Geolocation error: "+n+"."})},_handleGeolocationResponse:function(t){var e=new T(t.coords.latitude,t.coords.longitude),n=e.toBounds(t.coords.accuracy),i=this._locateOptions;if(i.setView){var o=this.getBoundsZoom(n);this.setView(e,i.maxZoom?Math.min(o,i.maxZoom):o)}var r={latlng:e,bounds:n,timestamp:t.timestamp};for(var s in t.coords)"number"==typeof t.coords[s]&&(r[s]=t.coords[s]);this.fire("locationfound",r)},addHandler:function(t,e){if(!e)return this;var n=this[t]=new e(this);return this._handlers.push(n),this.options[t]&&n.enable(),this},remove:function(){if(this._initEvents(!0),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch(t){this._container._leaflet_id=void 0,this._containerId=void 0}var t;for(t in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),lt(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[t].remove();for(t in this._panes)lt(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){var n=ut("div","leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),e||this._mapPane);return t&&(this._panes[t]=n),n},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter:this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds();return new A(this.unproject(t.getBottomLeft()),this.unproject(t.getTopRight()))},getMinZoom:function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,n){t=C(t),n=b(n||[0,0]);var i=this.getZoom()||0,o=this.getMinZoom(),r=this.getMaxZoom(),s=t.getNorthWest(),a=t.getSouthEast(),u=this.getSize().subtract(n),l=x(this.project(a,i),this.project(s,i)).getSize(),c=He?this.options.zoomSnap:1,h=u.x/l.x,d=u.y/l.y,p=e?Math.max(h,d):Math.min(h,d);return i=this.getScaleZoom(p,i),c&&(i=Math.round(i/(c/100))*(c/100),i=e?Math.ceil(i/c)*c:Math.floor(i/c)*c),Math.max(o,Math.min(r,i))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new _(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,e){var n=this._getTopLeftPoint(t,e);return new w(n,n.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(void 0===t?this.getZoom():t)},getPane:function(t){return"string"==typeof t?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,e){var n=this.options.crs;return e=void 0===e?this._zoom:e,n.scale(t)/n.scale(e)},getScaleZoom:function(t,e){var n=this.options.crs;e=void 0===e?this._zoom:e;var i=n.zoom(t*n.scale(e));return isNaN(i)?1/0:i},project:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.latLngToPoint(S(t),e)},unproject:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.pointToLatLng(b(t),e)},layerPointToLatLng:function(t){var e=b(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){return this.project(S(t))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(S(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(C(t))},distance:function(t,e){return this.options.crs.distance(S(t),S(e))},containerPointToLayerPoint:function(t){return b(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return b(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(b(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(S(t)))},mouseEventToContainerPoint:function(t){return tt(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var e=this._container=st(t);if(!e)throw new Error("Map container not found.");if(e._leaflet_id)throw new Error("Map container is already initialized.");U(e,"scroll",this._onScroll,this),this._containerId=l(e)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&He,ft(t,"leaflet-container"+(Ke?" leaflet-touch":"")+($e?" leaflet-retina":"")+(Ee?" leaflet-oldie":"")+(Re?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var e=at(t,"position");"absolute"!==e&&"relative"!==e&&"fixed"!==e&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),xt(this._mapPane,new _(0,0)),this.createPane("tilePane"),this.createPane("shadowPane"),this.createPane("overlayPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(ft(t.markerPane,"leaflet-zoom-hide"),ft(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e){xt(this._mapPane,new _(0,0));var n=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");var i=this._zoom!==e;this._moveStart(i,!1)._move(t,e)._moveEnd(i),this.fire("viewreset"),n&&this.fire("load")},_moveStart:function(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this},_move:function(t,e,n){void 0===e&&(e=this._zoom);var i=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),(i||n&&n.pinch)&&this.fire("zoom",n),this.fire("move",n)},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return g(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){xt(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(t){this._targets={};var e=t?Z:U;e((this._targets[l(this._container)]=this)._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress",this._handleDOMEvent,this),this.options.trackResize&&e(window,"resize",this._onResize,this),He&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){g(this._resizeRequest),this._resizeRequest=E(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,e){for(var n,i=[],o="mouseout"===e||"mouseover"===e,r=t.target||t.srcElement,s=!1;r;){if((n=this._targets[l(r)])&&("click"===e||"preclick"===e)&&!t._simulated&&this._draggableMoved(n)){s=!0;break}if(n&&n.listens(e,!0)){if(o&&!ot(r,t))break;if(i.push(n),o)break}if(r===this._container)break;r=r.parentNode}return i.length||s||o||!ot(r,t)||(i=[this]),i},_handleDOMEvent:function(t){if(this._loaded&&!it(t)){var e=t.type
;"mousedown"!==e&&"keypress"!==e||Tt(t.target||t.srcElement),this._fireDOMEvent(t,e)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,e,n){if("click"===t.type){var i=u({},t);i.type="preclick",this._fireDOMEvent(i,i.type,n)}if(!t._stopped&&(n=(n||[]).concat(this._findEventTargets(t,e))).length){var o=n[0];"contextmenu"===e&&o.listens(e,!0)&&X(t);var r={originalEvent:t};if("keypress"!==t.type){var s=o.getLatLng&&(!o._radius||o._radius<=10);r.containerPoint=s?this.latLngToContainerPoint(o.getLatLng()):this.mouseEventToContainerPoint(t),r.layerPoint=this.containerPointToLayerPoint(r.containerPoint),r.latlng=s?o.getLatLng():this.layerPointToLatLng(r.layerPoint)}for(var a=0;a<n.length;a++)if(n[a].fire(e,r,!0),r.originalEvent._stopped||!1===n[a].options.bubblingMouseEvents&&-1!==p(this._mouseEvents,e))return}},_draggableMoved:function(t){return(t=t.dragging&&t.dragging.enabled()?t:this).dragging&&t.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var t=0,e=this._handlers.length;t<e;t++)this._handlers[t].disable()},whenReady:function(t,e){return this._loaded?t.call(e||this,{target:this}):this.on("load",t,e),this},_getMapPanePos:function(){return At(this._mapPane)||new _(0,0)},_moved:function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},_getTopLeftPoint:function(t,e){return(t&&void 0!==e?this._getNewPixelOrigin(t,e):this.getPixelOrigin()).subtract(this._getMapPanePos())},_getNewPixelOrigin:function(t,e){var n=this.getSize()._divideBy(2);return this.project(t,e)._subtract(n)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(t,e,n){var i=this._getNewPixelOrigin(n,e);return this.project(t,e)._subtract(i)},_latLngBoundsToNewLayerBounds:function(t,e,n){var i=this._getNewPixelOrigin(n,e);return x([this.project(t.getSouthWest(),e)._subtract(i),this.project(t.getNorthWest(),e)._subtract(i),this.project(t.getSouthEast(),e)._subtract(i),this.project(t.getNorthEast(),e)._subtract(i)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitCenter:function(t,e,n){if(!n)return t;var i=this.project(t,e),o=this.getSize().divideBy(2),r=new w(i.subtract(o),i.add(o)),s=this._getBoundsOffset(r,n,e);return s.round().equals([0,0])?t:this.unproject(i.add(s),e)},_limitOffset:function(t,e){if(!e)return t;var n=this.getPixelBounds(),i=new w(n.min.add(t),n.max.add(t));return t.add(this._getBoundsOffset(i,e))},_getBoundsOffset:function(t,e,n){var i=x(this.project(e.getNorthEast(),n),this.project(e.getSouthWest(),n)),o=i.min.subtract(t.min),r=i.max.subtract(t.max);return new _(this._rebound(o.x,-r.x),this._rebound(o.y,-r.y))},_rebound:function(t,e){return 0<t+e?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))},_limitZoom:function(t){var e=this.getMinZoom(),n=this.getMaxZoom(),i=He?this.options.zoomSnap:1;return i&&(t=Math.round(t/i)*i),Math.max(e,Math.min(n,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){mt(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){var n=this._getCenterOffset(t)._trunc();return!(!0!==(e&&e.animate)&&!this.getSize().contains(n)||(this.panBy(n,e),0))},_createAnimProxy:function(){var t=this._proxy=ut("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",function(t){var e=vn,n=this._proxy.style[e];wt(this._proxy,this.project(t.center,t.zoom),this.getZoomScale(t.zoom,1)),n===this._proxy.style[e]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",function(){var t=this.getCenter(),e=this.getZoom();wt(this._proxy,this.project(t,e),this.getZoomScale(e,1))},this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){lt(this._proxy),delete this._proxy},_catchTransitionEnd:function(t){this._animatingZoom&&0<=t.propertyName.indexOf("transform")&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,e,n){if(this._animatingZoom)return!0;if(n=n||{},!this._zoomAnimated||!1===n.animate||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var i=this.getZoomScale(e),o=this._getCenterOffset(t)._divideBy(1-1/i);return!(!0!==n.animate&&!this.getSize().contains(o)||(E(function(){this._moveStart(!0,!1)._animateZoom(t,e,!0)},this),0))},_animateZoom:function(t,e,n,i){this._mapPane&&(n&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,ft(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:i}),setTimeout(a(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&mt(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom),E(function(){this._moveEnd(!0)},this))}}),Tn=v.extend({options:{position:"topright"},initialize:function(t){s(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var e=this._container=this.onAdd(t),n=this.getPosition(),i=t._controlCorners[n];return ft(e,"leaflet-control"),-1!==n.indexOf("bottom")?i.insertBefore(e,i.firstChild):i.appendChild(e),this},remove:function(){return this._map&&(lt(this._container),this.onRemove&&this.onRemove(this._map),this._map=null),this},_refocusOnMap:function(t){this._map&&t&&0<t.screenX&&0<t.screenY&&this._map.getContainer().focus()}}),Sn=function(t){return new Tn(t)};Cn.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){function t(t,e){var n=o+t+" "+o+e;i[t+e]=ut("div",n,r)}var i=this._controlCorners={},o="leaflet-",r=this._controlContainer=ut("div",o+"control-container",this._container);t("top","left"),t("top","right"),t("bottom","left"),t("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)lt(this._controlCorners[t]);lt(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var Ln=Tn.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,e,n,i){return n<i?-1:i<n?1:0}},initialize:function(t,e,n){for(var i in s(this,n),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,t)this._addLayer(t[i],i);for(i in e)this._addLayer(e[i],i,!0)},onAdd:function(t){this._initLayout(),this._update(),(this._map=t).on("zoomend",this._checkDisabledLayers,this);for(var e=0;e<this._layers.length;e++)this._layers[e].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(t){return Tn.prototype.addTo.call(this,t),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var t=0;t<this._layers.length;t++)this._layers[t].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(t,e){return this._addLayer(t,e),this._map?this._update():this},addOverlay:function(t,e){return this._addLayer(t,e,!0),this._map?this._update():this},removeLayer:function(t){t.off("add remove",this._onLayerChange,this);var e=this._getLayer(l(t));return e&&this._layers.splice(this._layers.indexOf(e),1),this._map?this._update():this},expand:function(){ft(this._container,"leaflet-control-layers-expanded"),this._form.style.height=null;var t=this._map.getSize().y-(this._container.offsetTop+50);return t<this._form.clientHeight?(ft(this._form,"leaflet-control-layers-scrollbar"),this._form.style.height=t+"px"):mt(this._form,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return mt(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var t="leaflet-control-layers",e=this._container=ut("div",t),n=this.options.collapsed;e.setAttribute("aria-haspopup",!0),Y(e),$(e);var i=this._form=ut("form",t+"-list");n&&(this._map.on("click",this.collapse,this),Se||U(e,{mouseenter:this.expand,mouseleave:this.collapse},this));var o=this._layersLink=ut("a",t+"-toggle",e);o.href="#",o.title="Layers",Ke?(U(o,"click",Q),U(o,"click",this.expand,this)):U(o,"focus",this.expand,this),n||this.expand(),this._baseLayersList=ut("div",t+"-base",i),this._separator=ut("div",t+"-separator",i),this._overlaysList=ut("div",t+"-overlays",i),e.appendChild(i)},_getLayer:function(t){for(var e=0;e<this._layers.length;e++)if(this._layers[e]&&l(this._layers[e].layer)===t)return this._layers[e]},_addLayer:function(t,e,n){this._map&&t.on("add remove",this._onLayerChange,this),this._layers.push({layer:t,name:e,overlay:n}),this.options.sortLayers&&this._layers.sort(a(function(t,e){return this.options.sortFunction(t.layer,e.layer,t.name,e.name)},this)),this.options.autoZIndex&&t.setZIndex&&(this._lastZIndex++,t.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;ct(this._baseLayersList),ct(this._overlaysList),this._layerControlInputs=[];var t,e,n,i,o=0;for(n=0;n<this._layers.length;n++)i=this._layers[n],this._addItem(i),e=e||i.overlay,t=t||!i.overlay,o+=i.overlay?0:1;return this.options.hideSingleBase&&(t=t&&1<o,this._baseLayersList.style.display=t?"":"none"),this._separator.style.display=e&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var e=this._getLayer(l(t.target)),n=e.overlay?"add"===t.type?"overlayadd":"overlayremove":"add"===t.type?"baselayerchange":null;n&&this._map.fire(n,e)},_createRadioElement:function(t,e){var n='<input type="radio" class="leaflet-control-layers-selector" name="'+t+'"'+(e?' checked="checked"':"")+"/>",i=document.createElement("div");return i.innerHTML=n,i.firstChild},_addItem:function(t){var e,n=document.createElement("label"),i=this._map.hasLayer(t.layer);t.overlay?((e=document.createElement("input")).type="checkbox",e.className="leaflet-control-layers-selector",e.defaultChecked=i):e=this._createRadioElement("leaflet-base-layers",i),this._layerControlInputs.push(e),e.layerId=l(t.layer),U(e,"click",this._onInputClick,this);var o=document.createElement("span");o.innerHTML=" "+t.name;var r=document.createElement("div");return n.appendChild(r),r.appendChild(e),r.appendChild(o),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(n),this._checkDisabledLayers(),n},_onInputClick:function(){var t,e,n=this._layerControlInputs,i=[],o=[];this._handlingClick=!0;for(var r=n.length-1;0<=r;r--)t=n[r],e=this._getLayer(t.layerId).layer,t.checked?i.push(e):t.checked||o.push(e);for(r=0;r<o.length;r++)this._map.hasLayer(o[r])&&this._map.removeLayer(o[r]);for(r=0;r<i.length;r++)this._map.hasLayer(i[r])||this._map.addLayer(i[r]);this._handlingClick=!1,this._refocusOnMap()},_checkDisabledLayers:function(){for(var t,e,n=this._layerControlInputs,i=this._map.getZoom(),o=n.length-1;0<=o;o--)t=n[o],e=this._getLayer(t.layerId).layer,t.disabled=void 0!==e.options.minZoom&&i<e.options.minZoom||void 0!==e.options.maxZoom&&i>e.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expand:function(){return this.expand()},_collapse:function(){return this.collapse()}}),kn=Tn.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"&#x2212;",zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",n=ut("div",e+" leaflet-bar"),i=this.options;return this._zoomInButton=this._createButton(i.zoomInText,i.zoomInTitle,e+"-in",n,this._zoomIn),this._zoomOutButton=this._createButton(i.zoomOutText,i.zoomOutTitle,e+"-out",n,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),n},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(t.shiftKey?3:1))},_zoomOut:function(t){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,e,n,i,o){var r=ut("a",n,i);return r.innerHTML=t,r.href="#",r.title=e,r.setAttribute("role","button"),r.setAttribute("aria-label",e),Y(r),U(r,"click",Q),U(r,"click",o,this),U(r,"click",this._refocusOnMap,this),r},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";mt(this._zoomInButton,e),mt(this._zoomOutButton,e),(this._disabled||t._zoom===t.getMinZoom())&&ft(this._zoomOutButton,e),(this._disabled||t._zoom===t.getMaxZoom())&&ft(this._zoomInButton,e)}});Cn.mergeOptions({zoomControl:!0}),Cn.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new kn,this.addControl(this.zoomControl))});var Pn=Tn.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e=ut("div","leaflet-control-scale"),n=this.options;return this._addScales(n,"leaflet-control-scale-line",e),t.on(n.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),e},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,n){t.metric&&(this._mScale=ut("div",e,n)),t.imperial&&(this._iScale=ut("div",e,n))},_update:function(){var t=this._map,e=t.getSize().y/2,n=t.distance(t.containerPointToLatLng([0,e]),t.containerPointToLatLng([this.options.maxWidth,e]));this._updateScales(n)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var e=this._getRoundNum(t),n=e<1e3?e+" m":e/1e3+" km";this._updateScale(this._mScale,n,e/t)},_updateImperial:function(t){var e,n,i,o=3.2808399*t;5280<o?(e=o/5280,n=this._getRoundNum(e),this._updateScale(this._iScale,n+" mi",n/e)):(i=this._getRoundNum(o),this._updateScale(this._iScale,i+" ft",i/o))},_updateScale:function(t,e,n){t.style.width=Math.round(this.options.maxWidth*n)+"px",t.innerHTML=e},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1),n=t/e;return e*(n=10<=n?10:5<=n?5:3<=n?3:2<=n?2:1)}}),Dn=Tn.extend({options:{position:"bottomright",prefix:'<a href="http://leafletjs.com" title="A JS library for interactive maps">Leaflet</a>'},initialize:function(t){s(this,t),this._attributions={}},onAdd:function(t){for(var e in(t.attributionControl=this)._container=ut("div","leaflet-control-attribution"),Y(this._container),t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return this._update(),this._container},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t&&(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update()),this},removeAttribution:function(t){return t&&this._attributions[t]&&(this._attributions[t]--,this._update()),this},_update:function(){if(this._map){var t=[];for(var e in this._attributions)this._attributions[e]&&t.push(e);var n=[];this.options.prefix&&n.push(this.options.prefix),t.length&&n.push(t.join(", ")),this._container.innerHTML=n.join(" | ")}}});Cn.mergeOptions({attributionControl:!0}),Cn.addInitHook(function(){this.options.attributionControl&&(new Dn).addTo(this)}),Tn.Layers=Ln,Tn.Zoom=kn,Tn.Scale=Pn,Tn.Attribution=Dn,Sn.layers=function(t,e,n){return new Ln(t,e,n)},Sn.zoom=function(t){return new kn(t)},Sn.scale=function(t){return new Pn(t)},Sn.attribution=function(t){return new Dn(t)};var On=v.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled||(this._enabled=!0,this.addHooks()),this},disable:function(){return this._enabled&&(this._enabled=!1,this.removeHooks()),this},enabled:function(){return!!this._enabled}});On.addTo=function(t,e){return t.addHandler(e,this),this};var In,Rn,Nn={Events:ue},Mn=Ke?"touchstart mousedown":"mousedown",Bn={mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},jn={mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"},Fn=le.extend({options:{clickTolerance:3},initialize:function(t,e,n,i){s(this,i),this._element=t,this._dragStartTarget=e||t,this._preventOutline=n},enable:function(){this._enabled||(U(this._dragStartTarget,Mn,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(Fn._dragging===this&&this.finishDrag(),Z(this._dragStartTarget,Mn,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(!t._simulated&&this._enabled&&(this._moved=!1,!pt(this._element,"leaflet-zoom-anim")&&!(Fn._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||((Fn._dragging=this)._preventOutline&&Tt(this._element),Et(),ge(),this._moving)))){this.fire("down");var e=t.touches?t.touches[0]:t;this._startPoint=new _(e.clientX,e.clientY),U(document,jn[t.type],this._onMove,this),U(document,Bn[t.type],this._onUp,this)}},_onMove:function(t){if(!t._simulated&&this._enabled)if(t.touches&&1<t.touches.length)this._moved=!0;else{var e=t.touches&&1===t.touches.length?t.touches[0]:t,n=new _(e.clientX,e.clientY).subtract(this._startPoint);(n.x||n.y)&&(Math.abs(n.x)+Math.abs(n.y)<this.options.clickTolerance||(X(t),this._moved||(this.fire("dragstart"),this._moved=!0,this._startPos=At(this._element).subtract(n),ft(document.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,window.SVGElementInstance&&this._lastTarget instanceof SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),ft(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(n),this._moving=!0,g(this._animRequest),this._lastEvent=t,this._animRequest=E(this._updatePosition,this,!0)))}},_updatePosition:function(){var t={originalEvent:this._lastEvent};this.fire("predrag",t),xt(this._element,this._newPos),this.fire("drag",t)},_onUp:function(t){!t._simulated&&this._enabled&&this.finishDrag()},finishDrag:function(){for(var t in mt(document.body,"leaflet-dragging"),this._lastTarget&&(mt(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),jn)Z(document,jn[t],this._onMove,this),Z(document,Bn[t],this._onUp,this);Ct(),ve(),this._moved&&this._moving&&(g(this._animRequest),this.fire("dragend",{distance:this._newPos.distanceTo(this._startPos)})),this._moving=!1,Fn._dragging=!1}}),zn=(Object.freeze||Object)({simplify:Lt,pointToSegmentDistance:kt,closestPointOnSegment:function(t,e,n){return Bt(t,e,n)},clipSegment:It,_getEdgeIntersection:Rt,_getBitCode:Nt,_sqClosestPointOnSegment:Bt,isFlat:jt,_flat:Ft}),Hn=(Object.freeze||Object)({clipPolygon:zt}),Wn={project:function(t){return new _(t.lng,t.lat)},unproject:function(t){return new T(t.y,t.x)},bounds:new w([-180,-90],[180,90])},qn={R:6378137,R_MINOR:6356752.314245179,bounds:new w([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(t){var e=Math.PI/180,n=this.R,i=t.lat*e,o=this.R_MINOR/n,r=Math.sqrt(1-o*o),s=r*Math.sin(i),a=Math.tan(Math.PI/4-i/2)/Math.pow((1-s)/(1+s),r/2);return i=-n*Math.log(Math.max(a,1e-10)),new _(t.lng*e*n,i)},unproject:function(t){for(var e,n=180/Math.PI,i=this.R,o=this.R_MINOR/i,r=Math.sqrt(1-o*o),s=Math.exp(-t.y/i),a=Math.PI/2-2*Math.atan(s),u=0,l=.1;u<15&&1e-7<Math.abs(l);u++)e=r*Math.sin(a),e=Math.pow((1-e)/(1+e),r/2),a+=l=Math.PI/2-2*Math.atan(s*e)-a;return new T(a*n,t.x*n/i)}},Vn=(Object.freeze||Object)({LonLat:Wn,Mercator:qn,SphericalMercator:fe}),Un=u({},pe,{code:"EPSG:3395",projection:qn,transformation:(Rn=.5/(Math.PI*qn.R),P(Rn,.5,-Rn,.5))}),Zn=u({},pe,{code:"EPSG:4326",projection:Wn,transformation:P(1/180,1,-1/180,.5)}),Kn=u({},de,{projection:Wn,transformation:P(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,e){var n=e.lng-t.lng,i=e.lat-t.lat;return Math.sqrt(n*n+i*i)},infinite:!0});de.Earth=pe,de.EPSG3395=Un,de.EPSG3857=be,de.EPSG900913=we,de.EPSG4326=Zn,de.Simple=Kn;var Gn=le.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(t){return t.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(t){return t&&t.removeLayer(this),this},getPane:function(t){return this._map.getPane(t?this.options[t]||t:this.options.pane)},addInteractiveTarget:function(t){return this._map._targets[l(t)]=this},removeInteractiveTarget:function(t){return delete this._map._targets[l(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var e=t.target;if(e.hasLayer(this)){if(this._map=e,this._zoomAnimated=e._zoomAnimated,this.getEvents){var n=this.getEvents();e.on(n,this),this.once("remove",function(){e.off(n,this)},this)}this.onAdd(e),this.getAttribution&&e.attributionControl&&e.attributionControl.addAttribution(this.getAttribution()),this.fire("add"),e.fire("layeradd",{layer:this})}}});Cn.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var e=l(t);return this._layers[e]||((this._layers[e]=t)._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t)),this},removeLayer:function(t){var e=l(t);return this._layers[e]&&(this._loaded&&t.onRemove(this),t.getAttribution&&this.attributionControl&&this.attributionControl.removeAttribution(t.getAttribution()),delete this._layers[e],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null),this},hasLayer:function(t){return!!t&&l(t)in this._layers},eachLayer:function(t,e){for(var n in this._layers)t.call(e,this._layers[n]);return this},_addLayers:function(t){for(var e=0,n=(t=t?ne(t)?t:[t]:[]).length;e<n;e++)this.addLayer(t[e])},_addZoomLimit:function(t){!isNaN(t.options.maxZoom)&&isNaN(t.options.minZoom)||(this._zoomBoundLayers[l(t)]=t,this._updateZoomLevels())},_removeZoomLimit:function(t){var e=l(t);this._zoomBoundLayers[e]&&(delete this._zoomBoundLayers[e],this._updateZoomLevels())},_updateZoomLevels:function(){var t=1/0,e=-1/0,n=this._getZoomSpan();for(var i in this._zoomBoundLayers){var o=this._zoomBoundLayers[i].options;t=void 0===o.minZoom?t:Math.min(t,o.minZoom),e=void 0===o.maxZoom?e:Math.max(e,o.maxZoom)}this._layersMaxZoom=e===-1/0?void 0:e,this._layersMinZoom=t===1/0?void 0:t,n!==this._getZoomSpan()&&this.fire("zoomlevelschange"),void 0===this.options.maxZoom&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var Jn=Gn.extend({initialize:function(t,e){var n,i;if(s(this,e),this._layers={},t)for(n=0,i=t.length;n<i;n++)this.addLayer(t[n])},addLayer:function(t){var e=this.getLayerId(t);return this._layers[e]=t,this._map&&this._map.addLayer(t),this},removeLayer:function(t){var e=t in this._layers?t:this.getLayerId(t);return this._map&&this._layers[e]&&this._map.removeLayer(this._layers[e]),delete this._layers[e],this},hasLayer:function(t){return!!t&&(t in this._layers||this.getLayerId(t)in this._layers)},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(t){var e,n,i=Array.prototype.slice.call(arguments,1);for(e in this._layers)(n=this._layers[e])[t]&&n[t].apply(n,i);return this},onAdd:function(t){this.eachLayer(t.addLayer,t)},onRemove:function(t){this.eachLayer(t.removeLayer,t)},eachLayer:function(t,e){for(var n in this._layers)t.call(e,this._layers[n]);return this},getLayer:function(t){return this._layers[t]},getLayers:function(){var t=[];return this.eachLayer(t.push,t),t},setZIndex:function(t){return this.invoke("setZIndex",t)},getLayerId:function(t){return l(t)}}),$n=Jn.extend({addLayer:function(t){return this.hasLayer(t)?this:(t.addEventParent(this),Jn.prototype.addLayer.call(this,t),this.fire("layeradd",{layer:t}))},removeLayer:function(t){return this.hasLayer(t)?(t in this._layers&&(t=this._layers[t]),t.removeEventParent(this),Jn.prototype.removeLayer.call(this,t),this.fire("layerremove",{layer:t})):this},setStyle:function(t){return this.invoke("setStyle",t)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var t=new A;for(var e in this._layers){var n=this._layers[e];t.extend(n.getBounds?n.getBounds():n.getLatLng())}return t}}),Yn=v.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0]},initialize:function(t){s(this,t)},createIcon:function(t){return this._createIcon("icon",t)},createShadow:function(t){return this._createIcon("shadow",t)},_createIcon:function(t,e){var n=this._getIconUrl(t);if(!n){if("icon"===t)throw new Error("iconUrl not set in Icon options (see the docs).");return null}var i=this._createImg(n,e&&"IMG"===e.tagName?e:null);return this._setIconStyles(i,t),i},_setIconStyles:function(t,e){var n=this.options,i=n[e+"Size"];"number"==typeof i&&(i=[i,i]);var o=b(i),r=b("shadow"===e&&n.shadowAnchor||n.iconAnchor||o&&o.divideBy(2,!0));t.className="leaflet-marker-"+e+" "+(n.className||""),r&&(t.style.marginLeft=-r.x+"px",t.style.marginTop=-r.y+"px"),o&&(t.style.width=o.x+"px",t.style.height=o.y+"px")},_createImg:function(t,e){return(e=e||document.createElement("img")).src=t,e},_getIconUrl:function(t){return $e&&this.options[t+"RetinaUrl"]||this.options[t+"Url"]}}),Xn=Yn.extend({options:{iconUrl:"marker-icon.png",iconRetinaUrl:"marker-icon-2x.png",shadowUrl:"marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:function(t){return Xn.imagePath||(Xn.imagePath=this._detectIconPath()),(this.options.imagePath||Xn.imagePath)+Yn.prototype._getIconUrl.call(this,t)},_detectIconPath:function(){var t=ut("div","leaflet-default-icon-path",document.body),e=at(t,"background-image")||at(t,"backgroundImage");return document.body.removeChild(t),null===e||0!==e.indexOf("url")?"":e.replace(/^url\(["']?/,"").replace(/marker-icon\.png["']?\)$/,"")}}),Qn=On.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new Fn(t,t,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),ft(t,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),this._marker._icon&&mt(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(t){var e=this._marker,n=e._map,i=this._marker.options.autoPanSpeed,o=this._marker.options.autoPanPadding,r=L.DomUtil.getPosition(e._icon),s=n.getPixelBounds(),a=n.getPixelOrigin(),u=x(s.min._subtract(a).add(o),s.max._subtract(a).subtract(o));if(!u.contains(r)){var l=b((Math.max(u.max.x,r.x)-u.max.x)/(s.max.x-u.max.x)-(Math.min(u.min.x,r.x)-u.min.x)/(s.min.x-u.min.x),(Math.max(u.max.y,r.y)-u.max.y)/(s.max.y-u.max.y)-(Math.min(u.min.y,r.y)-u.min.y)/(s.min.y-u.min.y)).multiplyBy(i);n.panBy(l,{animate:!1}),this._draggable._newPos._add(l),this._draggable._startPos._add(l),L.DomUtil.setPosition(e._icon,this._draggable._newPos),this._onDrag(t),this._panRequest=E(this._adjustPan.bind(this,t))}},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup().fire("movestart").fire("dragstart")},_onPreDrag:function(t){this._marker.options.autoPan&&(g(this._panRequest),this._panRequest=E(this._adjustPan.bind(this,t)))},_onDrag:function(t){var e=this._marker,n=e._shadow,i=At(e._icon),o=e._map.layerPointToLatLng(i);n&&xt(n,i),e._latlng=o,t.latlng=o,t.oldLatLng=this._oldLatLng,e.fire("move",t).fire("drag",t)},_onDragEnd:function(t){g(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",t)}}),ti=Gn.extend({options:{icon:new Xn,interactive:!0,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10,keyboard:!0,title:"",alt:"",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",bubblingMouseEvents:!1},initialize:function(t,e){s(this,e),this._latlng=S(t)},onAdd:function(t){this._zoomAnimated=this._zoomAnimated&&t.options.markerZoomAnimation,this._zoomAnimated&&t.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(t){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&t.off("zoomanim",this._animateZoom,this),this._removeIcon(),this._removeShadow()},getEvents:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(t){var e=this._latlng;return this._latlng=S(t),this.update(),this.fire("move",{oldLatLng:e,latlng:this._latlng})},setZIndexOffset:function(t){return this.options.zIndexOffset=t,this.update()},setIcon:function(t){return this.options.icon=t,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){if(this._icon&&this._map){var t=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(t)}return this},_initIcon:function(){var t=this.options,e="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),n=t.icon.createIcon(this._icon),i=!1;n!==this._icon&&(this._icon&&this._removeIcon(),i=!0,t.title&&(n.title=t.title),"IMG"===n.tagName&&(n.alt=t.alt||"")),ft(n,e),t.keyboard&&(n.tabIndex="0"),this._icon=n,t.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex});var o=t.icon.createShadow(this._shadow),r=!1;o!==this._shadow&&(this._removeShadow(),r=!0),o&&(ft(o,e),o.alt=""),this._shadow=o,t.opacity<1&&this._updateOpacity(),i&&this.getPane().appendChild(this._icon),this._initInteraction(),o&&r&&this.getPane("shadowPane").appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),lt(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&lt(this._shadow),this._shadow=null},_setPos:function(t){xt(this._icon,t),this._shadow&&xt(this._shadow,t),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(t){this._icon.style.zIndex=this._zIndex+t},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round();this._setPos(e)},_initInteraction:function(){if(this.options.interactive&&(ft(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),Qn)){var t=this.options.draggable;this.dragging&&(t=this.dragging.enabled(),this.dragging.disable()),this.dragging=new Qn(this),t&&this.dragging.enable()}},setOpacity:function(t){return this.options.opacity=t,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var t=this.options.opacity;yt(this._icon,t),this._shadow&&yt(this._shadow,t)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}}),ei=Gn.extend({options:{stroke:!0,color:"#3388ff",weight:3,opacity:1,lineCap:"round",lineJoin:"round",dashArray:null,dashOffset:null,fill:!1,fillColor:null,fillOpacity:.2,fillRule:"evenodd",interactive:!0,bubblingMouseEvents:!0},beforeAdd:function(t){this._renderer=t.getRenderer(this)},onAdd:function(){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)},onRemove:function(){this._renderer._removePath(this)},redraw:function(){return this._map&&this._renderer._updatePath(this),this},setStyle:function(t){return s(this,t),this._renderer&&this._renderer._updateStyle(this),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},getElement:function(){return this._path},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+this._renderer.options.tolerance}}),ni=ei.extend({options:{fill:!0,radius:10},initialize:function(t,e){s(this,e),this._latlng=S(t),this._radius=this.options.radius},setLatLng:function(t){return this._latlng=S(t),this.redraw(),this.fire("move",{latlng:this._latlng})},
getLatLng:function(){return this._latlng},setRadius:function(t){return this.options.radius=this._radius=t,this.redraw()},getRadius:function(){return this._radius},setStyle:function(t){var e=t&&t.radius||this._radius;return ei.prototype.setStyle.call(this,t),this.setRadius(e),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var t=this._radius,e=this._radiusY||t,n=this._clickTolerance(),i=[t+n,e+n];this._pxBounds=new w(this._point.subtract(i),this._point.add(i))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},_containsPoint:function(t){return t.distanceTo(this._point)<=this._radius+this._clickTolerance()}}),ii=ni.extend({initialize:function(t,e,n){if("number"==typeof e&&(e=u({},n,{radius:e})),s(this,e),this._latlng=S(t),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(t){return this._mRadius=t,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var t=[this._radius,this._radiusY||this._radius];return new A(this._map.layerPointToLatLng(this._point.subtract(t)),this._map.layerPointToLatLng(this._point.add(t)))},setStyle:ei.prototype.setStyle,_project:function(){var t=this._latlng.lng,e=this._latlng.lat,n=this._map,i=n.options.crs;if(i.distance===pe.distance){var o=Math.PI/180,r=this._mRadius/pe.R/o,s=n.project([e+r,t]),a=n.project([e-r,t]),u=s.add(a).divideBy(2),l=n.unproject(u).lat,c=Math.acos((Math.cos(r*o)-Math.sin(e*o)*Math.sin(l*o))/(Math.cos(e*o)*Math.cos(l*o)))/o;(isNaN(c)||0===c)&&(c=r/Math.cos(Math.PI/180*e)),this._point=u.subtract(n.getPixelOrigin()),this._radius=isNaN(c)?0:u.x-n.project([l,t-c]).x,this._radiusY=u.y-s.y}else{var h=i.unproject(i.project(this._latlng).subtract([this._mRadius,0]));this._point=n.latLngToLayerPoint(this._latlng),this._radius=this._point.x-n.latLngToLayerPoint(h).x}this._updateBounds()}}),oi=ei.extend({options:{smoothFactor:1,noClip:!1},initialize:function(t,e){s(this,e),this._setLatLngs(t)},getLatLngs:function(){return this._latlngs},setLatLngs:function(t){return this._setLatLngs(t),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(t){for(var e,n,i=1/0,o=null,r=Bt,s=0,a=this._parts.length;s<a;s++)for(var u=this._parts[s],l=1,c=u.length;l<c;l++){var h=r(t,e=u[l-1],n=u[l],!0);h<i&&(i=h,o=r(t,e,n))}return o&&(o.distance=Math.sqrt(i)),o},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");var t,e,n,i,o,r,s,a=this._rings[0],u=a.length;if(!u)return null;for(e=t=0;t<u-1;t++)e+=a[t].distanceTo(a[t+1])/2;if(0===e)return this._map.layerPointToLatLng(a[0]);for(i=t=0;t<u-1;t++)if(o=a[t],r=a[t+1],(i+=n=o.distanceTo(r))>e)return s=(i-e)/n,this._map.layerPointToLatLng([r.x-s*(r.x-o.x),r.y-s*(r.y-o.y)])},getBounds:function(){return this._bounds},addLatLng:function(t,e){return e=e||this._defaultShape(),t=S(t),e.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new A,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return jt(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var e=[],n=jt(t),i=0,o=t.length;i<o;i++)n?(e[i]=S(t[i]),this._bounds.extend(e[i])):e[i]=this._convertLatLngs(t[i]);return e},_project:function(){var t=new w;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,t);var e=this._clickTolerance(),n=new _(e,e);this._bounds.isValid()&&t.isValid()&&(t.min._subtract(n),t.max._add(n),this._pxBounds=t)},_projectLatlngs:function(t,e,n){var i,o,r=t[0]instanceof T,s=t.length;if(r){for(o=[],i=0;i<s;i++)o[i]=this._map.latLngToLayerPoint(t[i]),n.extend(o[i]);e.push(o)}else for(i=0;i<s;i++)this._projectLatlngs(t[i],e,n)},_clipPoints:function(){var t=this._renderer._bounds;if(this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else{var e,n,i,o,r,s,a,u=this._parts;for(i=e=0,o=this._rings.length;e<o;e++)for(n=0,r=(a=this._rings[e]).length;n<r-1;n++)(s=It(a[n],a[n+1],t,n,!0))&&(u[i]=u[i]||[],u[i].push(s[0]),s[1]===a[n+1]&&n!==r-2||(u[i].push(s[1]),i++))}},_simplifyPoints:function(){for(var t=this._parts,e=this.options.smoothFactor,n=0,i=t.length;n<i;n++)t[n]=Lt(t[n],e)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(t,e){var n,i,o,r,s,a,u=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(n=0,r=this._parts.length;n<r;n++)for(i=0,o=(s=(a=this._parts[n]).length)-1;i<s;o=i++)if((e||0!==i)&&kt(t,a[o],a[i])<=u)return!0;return!1}});oi._flat=Ft;var ri=oi.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");var t,e,n,i,o,r,s,a,u,l=this._rings[0],c=l.length;if(!c)return null;for(r=s=a=0,t=0,e=c-1;t<c;e=t++)n=l[t],i=l[e],o=n.y*i.x-i.y*n.x,s+=(n.x+i.x)*o,a+=(n.y+i.y)*o,r+=3*o;return u=0===r?l[0]:[s/r,a/r],this._map.layerPointToLatLng(u)},_convertLatLngs:function(t){var e=oi.prototype._convertLatLngs.call(this,t),n=e.length;return 2<=n&&e[0]instanceof T&&e[0].equals(e[n-1])&&e.pop(),e},_setLatLngs:function(t){oi.prototype._setLatLngs.call(this,t),jt(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return jt(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,e=this.options.weight,n=new _(e,e);if(t=new w(t.min.subtract(n),t.max.add(n)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else for(var i,o=0,r=this._rings.length;o<r;o++)(i=zt(this._rings[o],t,!0)).length&&this._parts.push(i)},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(t){var e,n,i,o,r,s,a,u,l=!1;if(!this._pxBounds.contains(t))return!1;for(o=0,a=this._parts.length;o<a;o++)for(r=0,s=(u=(e=this._parts[o]).length)-1;r<u;s=r++)n=e[r],i=e[s],n.y>t.y!=i.y>t.y&&t.x<(i.x-n.x)*(t.y-n.y)/(i.y-n.y)+n.x&&(l=!l);return l||oi.prototype._containsPoint.call(this,t,!0)}}),si=$n.extend({initialize:function(t,e){s(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,n,i,o=ne(t)?t:t.features;if(o){for(e=0,n=o.length;e<n;e++)((i=o[e]).geometries||i.geometry||i.features||i.coordinates)&&this.addData(i);return this}var r=this.options;if(r.filter&&!r.filter(t))return this;var s=Ht(t,r);return s?(s.feature=Kt(t),s.defaultOptions=s.options,this.resetStyle(s),r.onEachFeature&&r.onEachFeature(t,s),this.addLayer(s)):this},resetStyle:function(t){return t.options=u({},t.defaultOptions),this._setLayerStyle(t,this.options.style),this},setStyle:function(e){return this.eachLayer(function(t){this._setLayerStyle(t,e)},this)},_setLayerStyle:function(t,e){"function"==typeof e&&(e=e(t.feature)),t.setStyle&&t.setStyle(e)}}),ai={toGeoJSON:function(t){return Zt(this,{type:"Point",coordinates:Vt(this.getLatLng(),t)})}};ti.include(ai),ii.include(ai),ni.include(ai),oi.include({toGeoJSON:function(t){var e=!jt(this._latlngs);return Zt(this,{type:(e?"Multi":"")+"LineString",coordinates:Ut(this._latlngs,e?1:0,!1,t)})}}),ri.include({toGeoJSON:function(t){var e=!jt(this._latlngs),n=e&&!jt(this._latlngs[0]),i=Ut(this._latlngs,n?2:e?1:0,!0,t);return e||(i=[i]),Zt(this,{type:(n?"Multi":"")+"Polygon",coordinates:i})}}),Jn.include({toMultiPoint:function(e){var n=[];return this.eachLayer(function(t){n.push(t.toGeoJSON(e).geometry.coordinates)}),Zt(this,{type:"MultiPoint",coordinates:n})},toGeoJSON:function(i){var t=this.feature&&this.feature.geometry&&this.feature.geometry.type;if("MultiPoint"===t)return this.toMultiPoint(i);var o="GeometryCollection"===t,r=[];return this.eachLayer(function(t){if(t.toGeoJSON){var e=t.toGeoJSON(i);if(o)r.push(e.geometry);else{var n=Kt(e);"FeatureCollection"===n.type?r.push.apply(r,n.features):r.push(n)}}}),o?Zt(this,{geometries:r,type:"GeometryCollection"}):{type:"FeatureCollection",features:r}}});var ui=Gt,li=Gn.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,e,n){this._url=t,this._bounds=C(e),s(this,n)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(ft(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){lt(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(t){return this.options.opacity=t,this._image&&this._updateOpacity(),this},setStyle:function(t){return t.opacity&&this.setOpacity(t.opacity),this},bringToFront:function(){return this._map&&ht(this._image),this},bringToBack:function(){return this._map&&dt(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=C(t),this._map&&this._reset(),this},getEvents:function(){var t={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var t="IMG"===this._url.tagName,e=this._image=t?this._url:ut("img");ft(e,"leaflet-image-layer"),this._zoomAnimated&&ft(e,"leaflet-zoom-animated"),this.options.className&&ft(e,this.options.className),e.onselectstart=c,e.onmousemove=c,e.onload=a(this.fire,this,"load"),e.onerror=a(this._overlayOnError,this,"error"),this.options.crossOrigin&&(e.crossOrigin=""),this.options.zIndex&&this._updateZIndex(),t?this._url=e.src:(e.src=this._url,e.alt=this.options.alt)},_animateZoom:function(t){var e=this._map.getZoomScale(t.zoom),n=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;wt(this._image,n,e)},_reset:function(){var t=this._image,e=new w(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),n=e.getSize();xt(t,e.min),t.style.width=n.x+"px",t.style.height=n.y+"px"},_updateOpacity:function(){yt(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var t=this.options.errorOverlayUrl;t&&this._url!==t&&(this._url=t,this._image.src=t)}}),ci=li.extend({options:{autoplay:!0,loop:!0},_initImage:function(){var t="VIDEO"===this._url.tagName,e=this._image=t?this._url:ut("video");if(ft(e,"leaflet-image-layer"),this._zoomAnimated&&ft(e,"leaflet-zoom-animated"),e.onselectstart=c,e.onmousemove=c,e.onloadeddata=a(this.fire,this,"load"),t){for(var n=e.getElementsByTagName("source"),i=[],o=0;o<n.length;o++)i.push(n[o].src);this._url=0<n.length?i:[e.src]}else{ne(this._url)||(this._url=[this._url]),e.autoplay=!!this.options.autoplay,e.loop=!!this.options.loop;for(var r=0;r<this._url.length;r++){var s=ut("source");s.src=this._url[r],e.appendChild(s)}}}}),hi=Gn.extend({options:{offset:[0,7],className:"",pane:"popupPane"},initialize:function(t,e){s(this,t),this._source=e},onAdd:function(t){this._zoomAnimated=t._zoomAnimated,this._container||this._initLayout(),t._fadeAnimated&&yt(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),t._fadeAnimated&&yt(this._container,1),this.bringToFront()},onRemove:function(t){t._fadeAnimated?(yt(this._container,0),this._removeTimeout=setTimeout(a(lt,void 0,this._container),200)):lt(this._container)},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=S(t),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(t){return this._content=t,this.update(),this},getElement:function(){return this._container},update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},getEvents:function(){var t={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&ht(this._container),this},bringToBack:function(){return this._map&&dt(this._container),this},_updateContent:function(){if(this._content){var t=this._contentNode,e="function"==typeof this._content?this._content(this._source||this):this._content;if("string"==typeof e)t.innerHTML=e;else{for(;t.hasChildNodes();)t.removeChild(t.firstChild);t.appendChild(e)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var t=this._map.latLngToLayerPoint(this._latlng),e=b(this.options.offset),n=this._getAnchor();this._zoomAnimated?xt(this._container,t.add(n)):e=e.add(t).add(n);var i=this._containerBottom=-e.y,o=this._containerLeft=-Math.round(this._containerWidth/2)+e.x;this._container.style.bottom=i+"px",this._container.style.left=o+"px"}},_getAnchor:function(){return[0,0]}}),di=hi.extend({options:{maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,closeOnEscapeKey:!0,className:""},openOn:function(t){return t.openPopup(this),this},onAdd:function(t){hi.prototype.onAdd.call(this,t),t.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof ei||this._source.on("preclick",J))},onRemove:function(t){hi.prototype.onRemove.call(this,t),t.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof ei||this._source.off("preclick",J))},getEvents:function(){var t=hi.prototype.getEvents.call(this);return(void 0!==this.options.closeOnClick?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(t.preclick=this._close),this.options.keepInView&&(t.moveend=this._adjustPan),t},_close:function(){this._map&&this._map.closePopup(this)},_initLayout:function(){var t="leaflet-popup",e=this._container=ut("div",t+" "+(this.options.className||"")+" leaflet-zoom-animated"),n=this._wrapper=ut("div",t+"-content-wrapper",e);if(this._contentNode=ut("div",t+"-content",n),Y(n),$(this._contentNode),U(n,"contextmenu",J),this._tipContainer=ut("div",t+"-tip-container",e),this._tip=ut("div",t+"-tip",this._tipContainer),this.options.closeButton){var i=this._closeButton=ut("a",t+"-close-button",e);i.href="#close",i.innerHTML="&#215;",U(i,"click",this._onCloseButtonClick,this)}},_updateLayout:function(){var t=this._contentNode,e=t.style;e.width="",e.whiteSpace="nowrap";var n=t.offsetWidth;n=Math.min(n,this.options.maxWidth),n=Math.max(n,this.options.minWidth),e.width=n+1+"px",e.whiteSpace="",e.height="";var i=t.offsetHeight,o=this.options.maxHeight;o&&o<i?(e.height=o+"px",ft(t,"leaflet-popup-scrolled")):mt(t,"leaflet-popup-scrolled"),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),n=this._getAnchor();xt(this._container,e.add(n))},_adjustPan:function(){if(!(!this.options.autoPan||this._map._panAnim&&this._map._panAnim._inProgress)){var t=this._map,e=parseInt(at(this._container,"marginBottom"),10)||0,n=this._container.offsetHeight+e,i=this._containerWidth,o=new _(this._containerLeft,-n-this._containerBottom);o._add(At(this._container));var r=t.layerPointToContainerPoint(o),s=b(this.options.autoPanPadding),a=b(this.options.autoPanPaddingTopLeft||s),u=b(this.options.autoPanPaddingBottomRight||s),l=t.getSize(),c=0,h=0;r.x+i+u.x>l.x&&(c=r.x+i-l.x+u.x),r.x-c-a.x<0&&(c=r.x-a.x),r.y+n+u.y>l.y&&(h=r.y+n-l.y+u.y),r.y-h-a.y<0&&(h=r.y-a.y),(c||h)&&t.fire("autopanstart").panBy([c,h])}},_onCloseButtonClick:function(t){this._close(),Q(t)},_getAnchor:function(){return b(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}});Cn.mergeOptions({closePopupOnClick:!0}),Cn.include({openPopup:function(t,e,n){return t instanceof di||(t=new di(n).setContent(t)),e&&t.setLatLng(e),this.hasLayer(t)?this:(this._popup&&this._popup.options.autoClose&&this.closePopup(),this._popup=t,this.addLayer(t))},closePopup:function(t){return t&&t!==this._popup||(t=this._popup,this._popup=null),t&&this.removeLayer(t),this}}),Gn.include({bindPopup:function(t,e){return t instanceof di?(s(t,e),(this._popup=t)._source=this):(this._popup&&!e||(this._popup=new di(e,this)),this._popup.setContent(t)),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t,e){if(t instanceof Gn||(e=t,t=this),t instanceof $n)for(var n in this._layers){t=this._layers[n];break}return e||(e=t.getCenter?t.getCenter():t.getLatLng()),this._popup&&this._map&&(this._popup._source=t,this._popup.update(),this._map.openPopup(this._popup,e)),this},closePopup:function(){return this._popup&&this._popup._close(),this},togglePopup:function(t){return this._popup&&(this._popup._map?this.closePopup():this.openPopup(t)),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){var e=t.layer||t.target;this._popup&&this._map&&(Q(t),e instanceof ei?this.openPopup(t.layer||t.target,t.latlng):this._map.hasLayer(this._popup)&&this._popup._source===e?this.closePopup():this.openPopup(e,t.latlng))},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}});var pi=hi.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,interactive:!1,opacity:.9},onAdd:function(t){hi.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&this._source.fire("tooltipopen",{tooltip:this},!0)},onRemove:function(t){hi.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&this._source.fire("tooltipclose",{tooltip:this},!0)},getEvents:function(){var t=hi.prototype.getEvents.call(this);return Ke&&!this.options.permanent&&(t.preclick=this._close),t},_close:function(){this._map&&this._map.closeTooltip(this)},_initLayout:function(){var t="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=ut("div",t)},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e=this._map,n=this._container,i=e.latLngToContainerPoint(e.getCenter()),o=e.layerPointToContainerPoint(t),r=this.options.direction,s=n.offsetWidth,a=n.offsetHeight,u=b(this.options.offset),l=this._getAnchor();"top"===r?t=t.add(b(-s/2+u.x,-a+u.y+l.y,!0)):"bottom"===r?t=t.subtract(b(s/2-u.x,-u.y,!0)):"center"===r?t=t.subtract(b(s/2+u.x,a/2-l.y+u.y,!0)):"right"===r||"auto"===r&&o.x<i.x?(r="right",t=t.add(b(u.x+l.x,l.y-a/2+u.y,!0))):(r="left",t=t.subtract(b(s+l.x-u.x,a/2-l.y-u.y,!0))),mt(n,"leaflet-tooltip-right"),mt(n,"leaflet-tooltip-left"),mt(n,"leaflet-tooltip-top"),mt(n,"leaflet-tooltip-bottom"),ft(n,"leaflet-tooltip-"+r),xt(n,t)},_updatePosition:function(){var t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)},setOpacity:function(t){this.options.opacity=t,this._container&&yt(this._container,t)},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);this._setPosition(e)},_getAnchor:function(){return b(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}});Cn.include({openTooltip:function(t,e,n){return t instanceof pi||(t=new pi(n).setContent(t)),e&&t.setLatLng(e),this.hasLayer(t)?this:this.addLayer(t)},closeTooltip:function(t){return t&&this.removeLayer(t),this}}),Gn.include({bindTooltip:function(t,e){return t instanceof pi?(s(t,e),(this._tooltip=t)._source=this):(this._tooltip&&!e||(this._tooltip=new pi(e,this)),this._tooltip.setContent(t)),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(t){if(t||!this._tooltipHandlersAdded){var e=t?"off":"on",n={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?n.add=this._openTooltip:(n.mouseover=this._openTooltip,n.mouseout=this.closeTooltip,this._tooltip.options.sticky&&(n.mousemove=this._moveTooltip),Ke&&(n.click=this._openTooltip)),this[e](n),this._tooltipHandlersAdded=!t}},openTooltip:function(t,e){if(t instanceof Gn||(e=t,t=this),t instanceof $n)for(var n in this._layers){t=this._layers[n];break}return e||(e=t.getCenter?t.getCenter():t.getLatLng()),this._tooltip&&this._map&&(this._tooltip._source=t,this._tooltip.update(),this._map.openTooltip(this._tooltip,e),this._tooltip.options.interactive&&this._tooltip._container&&(ft(this._tooltip._container,"leaflet-clickable"),this.addInteractiveTarget(this._tooltip._container))),this},closeTooltip:function(){return this._tooltip&&(this._tooltip._close(),this._tooltip.options.interactive&&this._tooltip._container&&(mt(this._tooltip._container,"leaflet-clickable"),this.removeInteractiveTarget(this._tooltip._container))),this},toggleTooltip:function(t){return this._tooltip&&(this._tooltip._map?this.closeTooltip():this.openTooltip(t)),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(t){return this._tooltip&&this._tooltip.setContent(t),this},getTooltip:function(){return this._tooltip},_openTooltip:function(t){var e=t.layer||t.target;this._tooltip&&this._map&&this.openTooltip(e,this._tooltip.options.sticky?t.latlng:void 0)},_moveTooltip:function(t){var e,n,i=t.latlng;this._tooltip.options.sticky&&t.originalEvent&&(e=this._map.mouseEventToContainerPoint(t.originalEvent),n=this._map.containerPointToLayerPoint(e),i=this._map.layerPointToLatLng(n)),this._tooltip.setLatLng(i)}});var fi=Yn.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(t){var e=t&&"DIV"===t.tagName?t:document.createElement("div"),n=this.options;if(e.innerHTML=!1!==n.html?n.html:"",n.bgPos){var i=b(n.bgPos);e.style.backgroundPosition=-i.x+"px "+-i.y+"px"}return this._setIconStyles(e,"icon"),e},createShadow:function(){return null}});Yn.Default=Xn;var mi=Gn.extend({options:{tileSize:256,opacity:1,updateWhenIdle:We,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(t){s(this,t)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView(),this._update()},beforeAdd:function(t){t._addZoomLimit(this)},onRemove:function(t){this._removeAllTiles(),lt(this._container),t._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(ht(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(dt(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(t){return this.options.opacity=t,this._updateOpacity(),this},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){return this._map&&(this._removeAllTiles(),this._update()),this},getEvents:function(){var t={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=e(this._onMoveEnd,this.options.updateInterval,this)),t.move=this._onMove),this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},createTile:function(){return document.createElement("div")},getTileSize:function(){var t=this.options.tileSize;return t instanceof _?t:new _(t,t)},_updateZIndex:function(){this._container&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(t){for(var e,n=this.getPane().children,i=-t(-1/0,1/0),o=0,r=n.length;o<r;o++)e=n[o].style.zIndex,n[o]!==this._container&&e&&(i=t(i,+e));isFinite(i)&&(this.options.zIndex=i+t(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!Ee){yt(this._container,this.options.opacity);var t=+new Date,e=!1,n=!1;for(var i in this._tiles){var o=this._tiles[i];if(o.current&&o.loaded){var r=Math.min(1,(t-o.loaded)/200);yt(o.el,r),r<1?e=!0:(o.active?n=!0:this._onOpaqueTile(o),o.active=!0)}}n&&!this._noPrune&&this._pruneTiles(),e&&(g(this._fadeFrame),this._fadeFrame=E(this._updateOpacity,this))}},_onOpaqueTile:c,_initContainer:function(){this._container||(this._container=ut("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var t=this._tileZoom,e=this.options.maxZoom;if(void 0!==t){for(var n in this._levels)this._levels[n].el.children.length||n===t?(this._levels[n].el.style.zIndex=e-Math.abs(t-n),this._onUpdateLevel(n)):(lt(this._levels[n].el),this._removeTilesAtZoom(n),this._onRemoveLevel(n),delete this._levels[n]);var i=this._levels[t],o=this._map;return i||((i=this._levels[t]={}).el=ut("div","leaflet-tile-container leaflet-zoom-animated",this._container),i.el.style.zIndex=e,i.origin=o.project(o.unproject(o.getPixelOrigin()),t).round(),i.zoom=t,this._setZoomTransform(i,o.getCenter(),o.getZoom()),i.el.offsetWidth,this._onCreateLevel(i)),this._level=i}},_onUpdateLevel:c,_onRemoveLevel:c,_onCreateLevel:c,_pruneTiles:function(){if(this._map){var t,e,n=this._map.getZoom();if(n>this.options.maxZoom||n<this.options.minZoom)this._removeAllTiles();else{for(t in this._tiles)(e=this._tiles[t]).retain=e.current;for(t in this._tiles)if((e=this._tiles[t]).current&&!e.active){var i=e.coords;this._retainParent(i.x,i.y,i.z,i.z-5)||this._retainChildren(i.x,i.y,i.z,i.z+2)}for(t in this._tiles)this._tiles[t].retain||this._removeTile(t)}}},_removeTilesAtZoom:function(t){for(var e in this._tiles)this._tiles[e].coords.z===t&&this._removeTile(e)},_removeAllTiles:function(){for(var t in this._tiles)this._removeTile(t)},_invalidateAll:function(){for(var t in this._levels)lt(this._levels[t].el),this._onRemoveLevel(t),delete this._levels[t];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(t,e,n,i){var o=Math.floor(t/2),r=Math.floor(e/2),s=n-1,a=new _(+o,+r);a.z=+s;var u=this._tileCoordsToKey(a),l=this._tiles[u];return l&&l.active?l.retain=!0:(l&&l.loaded&&(l.retain=!0),i<s&&this._retainParent(o,r,s,i))},_retainChildren:function(t,e,n,i){for(var o=2*t;o<2*t+2;o++)for(var r=2*e;r<2*e+2;r++){var s=new _(o,r);s.z=n+1;var a=this._tileCoordsToKey(s),u=this._tiles[a];u&&u.active?u.retain=!0:(u&&u.loaded&&(u.retain=!0),n+1<i&&this._retainChildren(o,r,n+1,i))}},_resetView:function(t){var e=t&&(t.pinch||t.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),e,e)},_animateZoom:function(t){this._setView(t.center,t.zoom,!0,t.noUpdate)},_clampZoom:function(t){var e=this.options;return void 0!==e.minNativeZoom&&t<e.minNativeZoom?e.minNativeZoom:void 0!==e.maxNativeZoom&&e.maxNativeZoom<t?e.maxNativeZoom:t},_setView:function(t,e,n,i){var o=this._clampZoom(Math.round(e));(void 0!==this.options.maxZoom&&o>this.options.maxZoom||void 0!==this.options.minZoom&&o<this.options.minZoom)&&(o=void 0);var r=this.options.updateWhenZooming&&o!==this._tileZoom;i&&!r||(this._tileZoom=o,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),void 0!==o&&this._update(t),n||this._pruneTiles(),this._noPrune=!!n),this._setZoomTransforms(t,e)},_setZoomTransforms:function(t,e){for(var n in this._levels)this._setZoomTransform(this._levels[n],t,e)},_setZoomTransform:function(t,e,n){var i=this._map.getZoomScale(n,t.zoom),o=t.origin.multiplyBy(i).subtract(this._map._getNewPixelOrigin(e,n)).round();He?wt(t.el,o,i):xt(t.el,o)},_resetGrid:function(){var t=this._map,e=t.options.crs,n=this._tileSize=this.getTileSize(),i=this._tileZoom,o=this._map.getPixelWorldBounds(this._tileZoom);o&&(this._globalTileRange=this._pxBoundsToTileRange(o)),this._wrapX=e.wrapLng&&!this.options.noWrap&&[Math.floor(t.project([0,e.wrapLng[0]],i).x/n.x),Math.ceil(t.project([0,e.wrapLng[1]],i).x/n.y)],this._wrapY=e.wrapLat&&!this.options.noWrap&&[Math.floor(t.project([e.wrapLat[0],0],i).y/n.x),Math.ceil(t.project([e.wrapLat[1],0],i).y/n.y)]},_onMoveEnd:function(){this._map&&!this._map._animatingZoom&&this._update()},_getTiledPixelBounds:function(t){var e=this._map,n=e._animatingZoom?Math.max(e._animateToZoom,e.getZoom()):e.getZoom(),i=e.getZoomScale(n,this._tileZoom),o=e.project(t,this._tileZoom).floor(),r=e.getSize().divideBy(2*i);return new w(o.subtract(r),o.add(r))},_update:function(t){var e=this._map;if(e){var n=this._clampZoom(e.getZoom());if(void 0===t&&(t=e.getCenter()),void 0!==this._tileZoom){var i=this._getTiledPixelBounds(t),o=this._pxBoundsToTileRange(i),r=o.getCenter(),s=[],a=this.options.keepBuffer,u=new w(o.getBottomLeft().subtract([a,-a]),o.getTopRight().add([a,-a]));if(!(isFinite(o.min.x)&&isFinite(o.min.y)&&isFinite(o.max.x)&&isFinite(o.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var l in this._tiles){var c=this._tiles[l].coords;c.z===this._tileZoom&&u.contains(new _(c.x,c.y))||(this._tiles[l].current=!1)}if(1<Math.abs(n-this._tileZoom))this._setView(t,n);else{for(var h=o.min.y;h<=o.max.y;h++)for(var d=o.min.x;d<=o.max.x;d++){var p=new _(d,h);if(p.z=this._tileZoom,this._isValidTile(p)){var f=this._tiles[this._tileCoordsToKey(p)];f?f.current=!0:s.push(p)}}if(s.sort(function(t,e){return t.distanceTo(r)-e.distanceTo(r)}),0!==s.length){this._loading||(this._loading=!0,this.fire("loading"));var m=document.createDocumentFragment();for(d=0;d<s.length;d++)this._addTile(s[d],m);this._level.el.appendChild(m)}}}}},_isValidTile:function(t){var e=this._map.options.crs;if(!e.infinite){var n=this._globalTileRange;if(!e.wrapLng&&(t.x<n.min.x||t.x>n.max.x)||!e.wrapLat&&(t.y<n.min.y||t.y>n.max.y))return!1}if(!this.options.bounds)return!0;var i=this._tileCoordsToBounds(t);return C(this.options.bounds).overlaps(i)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var e=this._map,n=this.getTileSize(),i=t.scaleBy(n),o=i.add(n);return[e.unproject(i,t.z),e.unproject(o,t.z)]},_tileCoordsToBounds:function(t){var e=this._tileCoordsToNwSe(t),n=new A(e[0],e[1]);return this.options.noWrap||(n=this._map.wrapLatLngBounds(n)),n},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var e=t.split(":"),n=new _(+e[0],+e[1]);return n.z=+e[2],n},_removeTile:function(t){var e=this._tiles[t];e&&(Pe||e.el.setAttribute("src",ie),lt(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){ft(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=c,t.onmousemove=c,Ee&&this.options.opacity<1&&yt(t,this.options.opacity),Se&&!Le&&(t.style.WebkitBackfaceVisibility="hidden")},_addTile:function(t,e){var n=this._getTilePos(t),i=this._tileCoordsToKey(t),o=this.createTile(this._wrapCoords(t),a(this._tileReady,this,t));this._initTile(o),this.createTile.length<2&&E(a(this._tileReady,this,t,null,o)),xt(o,n),this._tiles[i]={el:o,coords:t,current:!0},e.appendChild(o),this.fire("tileloadstart",{tile:o,coords:t})},_tileReady:function(t,e,n){if(this._map){e&&this.fire("tileerror",{error:e,tile:n,coords:t});var i=this._tileCoordsToKey(t);(n=this._tiles[i])&&(n.loaded=+new Date,this._map._fadeAnimated?(yt(n.el,0),g(this._fadeFrame),this._fadeFrame=E(this._updateOpacity,this)):(n.active=!0,this._pruneTiles()),e||(ft(n.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:n.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,
this.fire("load"),Ee||!this._map._fadeAnimated?E(this._pruneTiles,this):setTimeout(a(this._pruneTiles,this),250)))}},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new _(this._wrapX?n(t.x,this._wrapX):t.x,this._wrapY?n(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new w(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}}),gi=mi.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1},initialize:function(t,e){this._url=t,(e=s(this,e)).detectRetina&&$e&&0<e.maxZoom&&(e.tileSize=Math.floor(e.tileSize/2),e.zoomReverse?(e.zoomOffset--,e.minZoom++):(e.zoomOffset++,e.maxZoom--),e.minZoom=Math.max(0,e.minZoom)),"string"==typeof e.subdomains&&(e.subdomains=e.subdomains.split("")),Se||this.on("tileunload",this._onTileRemove)},setUrl:function(t,e){return this._url=t,e||this.redraw(),this},createTile:function(t,e){var n=document.createElement("img");return U(n,"load",a(this._tileOnLoad,this,e,n)),U(n,"error",a(this._tileOnError,this,e,n)),this.options.crossOrigin&&(n.crossOrigin=""),n.alt="",n.setAttribute("role","presentation"),n.src=this.getTileUrl(t),n},getTileUrl:function(t){var e={r:$e?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var n=this._globalTileRange.max.y-t.y;this.options.tms&&(e.y=n),e["-y"]=n}return r(this._url,u(e,this.options))},_tileOnLoad:function(t,e){Ee?setTimeout(a(t,this,null,e),0):t(null,e)},_tileOnError:function(t,e,n){var i=this.options.errorTileUrl;i&&e.getAttribute("src")!==i&&(e.src=i),t(n,e)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,e=this.options.maxZoom;return this.options.zoomReverse&&(t=e-t),t+this.options.zoomOffset},_getSubdomain:function(t){var e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]},_abortLoading:function(){var t,e;for(t in this._tiles)this._tiles[t].coords.z!==this._tileZoom&&((e=this._tiles[t].el).onload=c,e.onerror=c,e.complete||(e.src=ie,lt(e),delete this._tiles[t]))}}),vi=gi.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(t,e){this._url=t;var n=u({},this.defaultWmsParams);for(var i in e)i in this.options||(n[i]=e[i]);var o=(e=s(this,e)).detectRetina&&$e?2:1,r=this.getTileSize();n.width=r.x*o,n.height=r.y*o,this.wmsParams=n},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var e=1.3<=this._wmsVersion?"crs":"srs";this.wmsParams[e]=this._crs.code,gi.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._tileCoordsToNwSe(t),n=this._crs,i=x(n.project(e[0]),n.project(e[1])),o=i.min,r=i.max,s=(1.3<=this._wmsVersion&&this._crs===Zn?[o.y,o.x,r.y,r.x]:[o.x,o.y,r.x,r.y]).join(","),a=L.TileLayer.prototype.getTileUrl.call(this,t);return a+d(this.wmsParams,a,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+s},setParams:function(t,e){return u(this.wmsParams,t),e||this.redraw(),this}});gi.WMS=vi,Jt.wms=function(t,e){return new vi(t,e)};var yi=Gn.extend({options:{padding:.1,tolerance:0},initialize:function(t){s(this,t),l(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),this._zoomAnimated&&ft(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var t={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),t},_onAnimZoom:function(t){this._updateTransform(t.center,t.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(t,e){var n=this._map.getZoomScale(e,this._zoom),i=At(this._container),o=this._map.getSize().multiplyBy(.5+this.options.padding),r=this._map.project(this._center,e),s=this._map.project(t,e).subtract(r),a=o.multiplyBy(-n).add(i).add(o).subtract(s);He?wt(this._container,a,n):xt(this._container,a)},_reset:function(){for(var t in this._update(),this._updateTransform(this._center,this._zoom),this._layers)this._layers[t]._reset()},_onZoomEnd:function(){for(var t in this._layers)this._layers[t]._project()},_updatePaths:function(){for(var t in this._layers)this._layers[t]._update()},_update:function(){var t=this.options.padding,e=this._map.getSize(),n=this._map.containerPointToLayerPoint(e.multiplyBy(-t)).round();this._bounds=new w(n,n.add(e.multiplyBy(1+2*t)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),_i=yi.extend({getEvents:function(){var t=yi.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){yi.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");U(t,"mousemove",e(this._onMouseMove,32,this),this),U(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),U(t,"mouseout",this._handleMouseOut,this),this._ctx=t.getContext("2d")},_destroyContainer:function(){delete this._ctx,lt(this._container),Z(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){for(var t in this._redrawBounds=null,this._layers)this._layers[t]._update();this._redraw()}},_update:function(){if(!this._map._animatingZoom||!this._bounds){this._drawnLayers={},yi.prototype._update.call(this);var t=this._bounds,e=this._container,n=t.getSize(),i=$e?2:1;xt(e,t.min),e.width=i*n.x,e.height=i*n.y,e.style.width=n.x+"px",e.style.height=n.y+"px",$e&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){yi.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t);var e=(this._layers[l(t)]=t)._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=e),this._drawLast=e,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var e=t._order,n=e.next,i=e.prev;n?n.prev=i:this._drawLast=i,i?i.next=n:this._drawFirst=n,delete t._order,delete this._layers[L.stamp(t)],this._requestRedraw(t)},_updatePath:function(t){this._extendRedrawBounds(t),t._project(),t._update(),this._requestRedraw(t)},_updateStyle:function(t){this._updateDashArray(t),this._requestRedraw(t)},_updateDashArray:function(t){if(t.options.dashArray){var e,n=t.options.dashArray.split(","),i=[];for(e=0;e<n.length;e++)i.push(Number(n[e]));t.options._dashArray=i}},_requestRedraw:function(t){this._map&&(this._extendRedrawBounds(t),this._redrawRequest=this._redrawRequest||E(this._redraw,this))},_extendRedrawBounds:function(t){if(t._pxBounds){var e=(t.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new w,this._redrawBounds.extend(t._pxBounds.min.subtract([e,e])),this._redrawBounds.extend(t._pxBounds.max.add([e,e]))}},_redraw:function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},_clear:function(){var t=this._redrawBounds;if(t){var e=t.getSize();this._ctx.clearRect(t.min.x,t.min.y,e.x,e.y)}else this._ctx.clearRect(0,0,this._container.width,this._container.height)},_draw:function(){var t,e=this._redrawBounds;if(this._ctx.save(),e){var n=e.getSize();this._ctx.beginPath(),this._ctx.rect(e.min.x,e.min.y,n.x,n.y),this._ctx.clip()}this._drawing=!0;for(var i=this._drawFirst;i;i=i.next)t=i.layer,(!e||t._pxBounds&&t._pxBounds.intersects(e))&&t._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(t,e){if(this._drawing){var n,i,o,r,s=t._parts,a=s.length,u=this._ctx;if(a){for(this._drawnLayers[t._leaflet_id]=t,u.beginPath(),n=0;n<a;n++){for(i=0,o=s[n].length;i<o;i++)r=s[n][i],u[i?"lineTo":"moveTo"](r.x,r.y);e&&u.closePath()}this._fillStroke(u,t)}}},_updateCircle:function(t){if(this._drawing&&!t._empty()){var e=t._point,n=this._ctx,i=Math.max(Math.round(t._radius),1),o=(Math.max(Math.round(t._radiusY),1)||i)/i;this._drawnLayers[t._leaflet_id]=t,1!==o&&(n.save(),n.scale(1,o)),n.beginPath(),n.arc(e.x,e.y/o,i,0,2*Math.PI,!1),1!==o&&n.restore(),this._fillStroke(n,t)}},_fillStroke:function(t,e){var n=e.options;n.fill&&(t.globalAlpha=n.fillOpacity,t.fillStyle=n.fillColor||n.color,t.fill(n.fillRule||"evenodd")),n.stroke&&0!==n.weight&&(t.setLineDash&&t.setLineDash(e.options&&e.options._dashArray||[]),t.globalAlpha=n.opacity,t.lineWidth=n.weight,t.strokeStyle=n.color,t.lineCap=n.lineCap,t.lineJoin=n.lineJoin,t.stroke())},_onClick:function(t){for(var e,n,i=this._map.mouseEventToLayerPoint(t),o=this._drawFirst;o;o=o.next)(e=o.layer).options.interactive&&e._containsPoint(i)&&!this._map._draggableMoved(e)&&(n=e);n&&(nt(t),this._fireEvent([n],t))},_onMouseMove:function(t){if(this._map&&!this._map.dragging.moving()&&!this._map._animatingZoom){var e=this._map.mouseEventToLayerPoint(t);this._handleMouseHover(t,e)}},_handleMouseOut:function(t){var e=this._hoveredLayer;e&&(mt(this._container,"leaflet-interactive"),this._fireEvent([e],t,"mouseout"),this._hoveredLayer=null)},_handleMouseHover:function(t,e){for(var n,i,o=this._drawFirst;o;o=o.next)(n=o.layer).options.interactive&&n._containsPoint(e)&&(i=n);i!==this._hoveredLayer&&(this._handleMouseOut(t),i&&(ft(this._container,"leaflet-interactive"),this._fireEvent([i],t,"mouseover"),this._hoveredLayer=i)),this._hoveredLayer&&this._fireEvent([this._hoveredLayer],t)},_fireEvent:function(t,e,n){this._map._fireDOMEvent(e,n||e.type,t)},_bringToFront:function(t){var e=t._order,n=e.next,i=e.prev;n&&((n.prev=i)?i.next=n:n&&(this._drawFirst=n),e.prev=this._drawLast,(this._drawLast.next=e).next=null,this._drawLast=e,this._requestRedraw(t))},_bringToBack:function(t){var e=t._order,n=e.next,i=e.prev;i&&((i.next=n)?n.prev=i:i&&(this._drawLast=i),e.prev=null,e.next=this._drawFirst,this._drawFirst.prev=e,this._drawFirst=e,this._requestRedraw(t))}}),bi=function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(t){return document.createElement("<lvml:"+t+' class="lvml">')}}catch(t){return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}}(),wi={_initContainer:function(){this._container=ut("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(yi.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=bi("shape");ft(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=bi("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[l(t)]=t},_addPath:function(t){var e=t._container;this._container.appendChild(e),t.options.interactive&&t.addInteractiveTarget(e)},_removePath:function(t){var e=t._container;lt(e),t.removeInteractiveTarget(e),delete this._layers[l(t)]},_updateStyle:function(t){var e=t._stroke,n=t._fill,i=t.options,o=t._container;o.stroked=!!i.stroke,o.filled=!!i.fill,i.stroke?(e||(e=t._stroke=bi("stroke")),o.appendChild(e),e.weight=i.weight+"px",e.color=i.color,e.opacity=i.opacity,i.dashArray?e.dashStyle=ne(i.dashArray)?i.dashArray.join(" "):i.dashArray.replace(/( *, *)/g," "):e.dashStyle="",e.endcap=i.lineCap.replace("butt","flat"),e.joinstyle=i.lineJoin):e&&(o.removeChild(e),t._stroke=null),i.fill?(n||(n=t._fill=bi("fill")),o.appendChild(n),n.color=i.fillColor||i.color,n.opacity=i.fillOpacity):n&&(o.removeChild(n),t._fill=null)},_updateCircle:function(t){var e=t._point.round(),n=Math.round(t._radius),i=Math.round(t._radiusY||n);this._setPath(t,t._empty()?"M0 0":"AL "+e.x+","+e.y+" "+n+","+i+" 0,23592600")},_setPath:function(t,e){t._path.v=e},_bringToFront:function(t){ht(t._container)},_bringToBack:function(t){dt(t._container)}},xi=Qe?bi:D,Ai=yi.extend({getEvents:function(){var t=yi.prototype.getEvents.call(this);return t.zoomstart=this._onZoomStart,t},_initContainer:function(){this._container=xi("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=xi("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){lt(this._container),Z(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_onZoomStart:function(){this._update()},_update:function(){if(!this._map._animatingZoom||!this._bounds){yi.prototype._update.call(this);var t=this._bounds,e=t.getSize(),n=this._container;this._svgSize&&this._svgSize.equals(e)||(this._svgSize=e,n.setAttribute("width",e.x),n.setAttribute("height",e.y)),xt(n,t.min),n.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update")}},_initPath:function(t){var e=t._path=xi("path");t.options.className&&ft(e,t.options.className),t.options.interactive&&ft(e,"leaflet-interactive"),this._updateStyle(t),this._layers[l(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){lt(t._path),t.removeInteractiveTarget(t._path),delete this._layers[l(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var e=t._path,n=t.options;e&&(n.stroke?(e.setAttribute("stroke",n.color),e.setAttribute("stroke-opacity",n.opacity),e.setAttribute("stroke-width",n.weight),e.setAttribute("stroke-linecap",n.lineCap),e.setAttribute("stroke-linejoin",n.lineJoin),n.dashArray?e.setAttribute("stroke-dasharray",n.dashArray):e.removeAttribute("stroke-dasharray"),n.dashOffset?e.setAttribute("stroke-dashoffset",n.dashOffset):e.removeAttribute("stroke-dashoffset")):e.setAttribute("stroke","none"),n.fill?(e.setAttribute("fill",n.fillColor||n.color),e.setAttribute("fill-opacity",n.fillOpacity),e.setAttribute("fill-rule",n.fillRule||"evenodd")):e.setAttribute("fill","none"))},_updatePoly:function(t,e){this._setPath(t,O(t._parts,e))},_updateCircle:function(t){var e=t._point,n=Math.max(Math.round(t._radius),1),i="a"+n+","+(Math.max(Math.round(t._radiusY),1)||n)+" 0 1,0 ",o=t._empty()?"M0 0":"M"+(e.x-n)+","+e.y+i+2*n+",0 "+i+2*-n+",0 ";this._setPath(t,o)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){ht(t._path)},_bringToBack:function(t){dt(t._path)}});Qe&&Ai.include(wi),Cn.include({getRenderer:function(t){var e=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer;return e||(e=this._renderer=this.options.preferCanvas&&$t()||Yt()),this.hasLayer(e)||this.addLayer(e),e},_getPaneRenderer:function(t){if("overlayPane"===t||void 0===t)return!1;var e=this._paneRenderers[t];return void 0===e&&(e=Ai&&Yt({pane:t})||_i&&$t({pane:t}),this._paneRenderers[t]=e),e}});var Ei=ri.extend({initialize:function(t,e){ri.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return[(t=C(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});Ai.create=xi,Ai.pointsToPath=O,si.geometryToLayer=Ht,si.coordsToLatLng=Wt,si.coordsToLatLngs=qt,si.latLngToCoords=Vt,si.latLngsToCoords=Ut,si.getFeature=Zt,si.asFeature=Kt,Cn.mergeOptions({boxZoom:!0});var Ci=On.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)},addHooks:function(){U(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Z(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){lt(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||1!==t.which&&1!==t.button)return!1;this._clearDeferredResetState(),this._resetState(),ge(),Et(),this._startPoint=this._map.mouseEventToContainerPoint(t),U(document,{contextmenu:Q,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=ut("div","leaflet-zoom-box",this._container),ft(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var e=new w(this._point,this._startPoint),n=e.getSize();xt(this._box,e.min),this._box.style.width=n.x+"px",this._box.style.height=n.y+"px"},_finish:function(){this._moved&&(lt(this._box),mt(this._container,"leaflet-crosshair")),ve(),Ct(),Z(document,{contextmenu:Q,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){if((1===t.which||1===t.button)&&(this._finish(),this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(a(this._resetState,this),0);var e=new A(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(e).fire("boxzoomend",{boxZoomBounds:e})}},_onKeyDown:function(t){27===t.keyCode&&this._finish()}});Cn.addInitHook("addHandler","boxZoom",Ci),Cn.mergeOptions({doubleClickZoom:!0});var Ti=On.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var e=this._map,n=e.getZoom(),i=e.options.zoomDelta,o=t.originalEvent.shiftKey?n-i:n+i;"center"===e.options.doubleClickZoom?e.setZoom(o):e.setZoomAround(t.containerPoint,o)}});Cn.addInitHook("addHandler","doubleClickZoom",Ti),Cn.mergeOptions({dragging:!0,inertia:!Le,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var Si=On.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new Fn(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),t.on("zoomend",this._onZoomEnd,this),t.whenReady(this._onZoomEnd,this))}ft(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){mt(this._map._container,"leaflet-grab"),mt(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t=this._map;if(t._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var e=C(this._map.options.maxBounds);this._offsetLimit=x(this._map.latLngToContainerPoint(e.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(e.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){if(this._map.options.inertia){var e=this._lastTime=+new Date,n=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(n),this._times.push(e),this._prunePositions(e)}this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;1<this._positions.length&&50<t-this._times[0];)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var t=this._map.getSize().divideBy(2),e=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=e.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(t,e){return t-(t-e)*this._viscosity},_onPreDragLimit:function(){if(this._viscosity&&this._offsetLimit){var t=this._draggable._newPos.subtract(this._draggable._startPos),e=this._offsetLimit;t.x<e.min.x&&(t.x=this._viscousLimit(t.x,e.min.x)),t.y<e.min.y&&(t.y=this._viscousLimit(t.y,e.min.y)),t.x>e.max.x&&(t.x=this._viscousLimit(t.x,e.max.x)),t.y>e.max.y&&(t.y=this._viscousLimit(t.y,e.max.y)),this._draggable._newPos=this._draggable._startPos.add(t)}},_onPreDragWrap:function(){var t=this._worldWidth,e=Math.round(t/2),n=this._initialWorldOffset,i=this._draggable._newPos.x,o=(i-e+n)%t+e-n,r=(i+e+n)%t-e-n,s=Math.abs(o+n)<Math.abs(r+n)?o:r;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=s},_onDragEnd:function(t){var e=this._map,n=e.options,i=!n.inertia||this._times.length<2;if(e.fire("dragend",t),i)e.fire("moveend");else{this._prunePositions(+new Date);var o=this._lastPos.subtract(this._positions[0]),r=(this._lastTime-this._times[0])/1e3,s=n.easeLinearity,a=o.multiplyBy(s/r),u=a.distanceTo([0,0]),l=Math.min(n.inertiaMaxSpeed,u),c=a.multiplyBy(l/u),h=l/(n.inertiaDeceleration*s),d=c.multiplyBy(-h/2).round();d.x||d.y?(d=e._limitOffset(d,e.options.maxBounds),E(function(){e.panBy(d,{duration:h,easeLinearity:s,noMoveStart:!0,animate:!0})})):e.fire("moveend")}}});Cn.addInitHook("addHandler","dragging",Si),Cn.mergeOptions({keyboard:!0,keyboardPanDelta:80});var Li=On.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(t){this._map=t,this._setPanDelta(t.options.keyboardPanDelta),this._setZoomDelta(t.options.zoomDelta)},addHooks:function(){var t=this._map._container;t.tabIndex<=0&&(t.tabIndex="0"),U(t,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),Z(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},_onMouseDown:function(){if(!this._focused){var t=document.body,e=document.documentElement,n=t.scrollTop||e.scrollTop,i=t.scrollLeft||e.scrollLeft;this._map._container.focus(),window.scrollTo(i,n)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(t){var e,n,i=this._panKeys={},o=this.keyCodes;for(e=0,n=o.left.length;e<n;e++)i[o.left[e]]=[-1*t,0];for(e=0,n=o.right.length;e<n;e++)i[o.right[e]]=[t,0];for(e=0,n=o.down.length;e<n;e++)i[o.down[e]]=[0,t];for(e=0,n=o.up.length;e<n;e++)i[o.up[e]]=[0,-1*t]},_setZoomDelta:function(t){var e,n,i=this._zoomKeys={},o=this.keyCodes;for(e=0,n=o.zoomIn.length;e<n;e++)i[o.zoomIn[e]]=t;for(e=0,n=o.zoomOut.length;e<n;e++)i[o.zoomOut[e]]=-t},_addHooks:function(){U(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){Z(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var e,n=t.keyCode,i=this._map;if(n in this._panKeys){if(i._panAnim&&i._panAnim._inProgress)return;e=this._panKeys[n],t.shiftKey&&(e=b(e).multiplyBy(3)),i.panBy(e),i.options.maxBounds&&i.panInsideBounds(i.options.maxBounds)}else if(n in this._zoomKeys)i.setZoom(i.getZoom()+(t.shiftKey?3:1)*this._zoomKeys[n]);else{if(27!==n||!i._popup||!i._popup.options.closeOnEscapeKey)return;i.closePopup()}Q(t)}}});Cn.addInitHook("addHandler","keyboard",Li),Cn.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var ki=On.extend({addHooks:function(){U(this._map._container,"mousewheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){Z(this._map._container,"mousewheel",this._onWheelScroll,this)},_onWheelScroll:function(t){var e=et(t),n=this._map.options.wheelDebounceTime;this._delta+=e,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);var i=Math.max(n-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(a(this._performZoom,this),i),Q(t)},_performZoom:function(){var t=this._map,e=t.getZoom(),n=this._map.options.zoomSnap||0;t._stop();var i=this._delta/(4*this._map.options.wheelPxPerZoomLevel),o=4*Math.log(2/(1+Math.exp(-Math.abs(i))))/Math.LN2,r=n?Math.ceil(o/n)*n:o,s=t._limitZoom(e+(0<this._delta?r:-r))-e;this._delta=0,this._startTime=null,s&&("center"===t.options.scrollWheelZoom?t.setZoom(e+s):t.setZoomAround(this._lastMousePos,e+s))}});Cn.addInitHook("addHandler","scrollWheelZoom",ki),Cn.mergeOptions({tap:!0,tapTolerance:15});var Pi=On.extend({addHooks:function(){U(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Z(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(t.touches){if(X(t),this._fireClick=!0,1<t.touches.length)return this._fireClick=!1,void clearTimeout(this._holdTimeout);var e=t.touches[0],n=e.target;this._startPos=this._newPos=new _(e.clientX,e.clientY),n.tagName&&"a"===n.tagName.toLowerCase()&&ft(n,"leaflet-active"),this._holdTimeout=setTimeout(a(function(){this._isTapValid()&&(this._fireClick=!1,this._onUp(),this._simulateEvent("contextmenu",e))},this),1e3),this._simulateEvent("mousedown",e),U(document,{touchmove:this._onMove,touchend:this._onUp},this)}},_onUp:function(t){if(clearTimeout(this._holdTimeout),Z(document,{touchmove:this._onMove,touchend:this._onUp},this),this._fireClick&&t&&t.changedTouches){var e=t.changedTouches[0],n=e.target;n&&n.tagName&&"a"===n.tagName.toLowerCase()&&mt(n,"leaflet-active"),this._simulateEvent("mouseup",e),this._isTapValid()&&this._simulateEvent("click",e)}},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_onMove:function(t){var e=t.touches[0];this._newPos=new _(e.clientX,e.clientY),this._simulateEvent("mousemove",e)},_simulateEvent:function(t,e){var n=document.createEvent("MouseEvents");n._simulated=!0,e.target._simulatedClick=!0,n.initMouseEvent(t,!0,!0,window,1,e.screenX,e.screenY,e.clientX,e.clientY,!1,!1,!1,!1,0,null),e.target.dispatchEvent(n)}});Ke&&!Ze&&Cn.addInitHook("addHandler","tap",Pi),Cn.mergeOptions({touchZoom:Ke&&!Le,bounceAtZoomLimits:!0});var Di=On.extend({addHooks:function(){ft(this._map._container,"leaflet-touch-zoom"),U(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){mt(this._map._container,"leaflet-touch-zoom"),Z(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var e=this._map;if(t.touches&&2===t.touches.length&&!e._animatingZoom&&!this._zooming){var n=e.mouseEventToContainerPoint(t.touches[0]),i=e.mouseEventToContainerPoint(t.touches[1]);this._centerPoint=e.getSize()._divideBy(2),this._startLatLng=e.containerPointToLatLng(this._centerPoint),"center"!==e.options.touchZoom&&(this._pinchStartLatLng=e.containerPointToLatLng(n.add(i)._divideBy(2))),this._startDist=n.distanceTo(i),this._startZoom=e.getZoom(),this._moved=!1,this._zooming=!0,e._stop(),U(document,"touchmove",this._onTouchMove,this),U(document,"touchend",this._onTouchEnd,this),X(t)}},_onTouchMove:function(t){if(t.touches&&2===t.touches.length&&this._zooming){var e=this._map,n=e.mouseEventToContainerPoint(t.touches[0]),i=e.mouseEventToContainerPoint(t.touches[1]),o=n.distanceTo(i)/this._startDist;if(this._zoom=e.getScaleZoom(o,this._startZoom),!e.options.bounceAtZoomLimits&&(this._zoom<e.getMinZoom()&&o<1||this._zoom>e.getMaxZoom()&&1<o)&&(this._zoom=e._limitZoom(this._zoom)),"center"===e.options.touchZoom){if(this._center=this._startLatLng,1===o)return}else{var r=n._add(i)._divideBy(2)._subtract(this._centerPoint);if(1===o&&0===r.x&&0===r.y)return;this._center=e.unproject(e.project(this._pinchStartLatLng,this._zoom).subtract(r),this._zoom)}this._moved||(e._moveStart(!0,!1),this._moved=!0),g(this._animRequest);var s=a(e._move,e,this._center,this._zoom,{pinch:!0,round:!1});this._animRequest=E(s,this,!0),X(t)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,g(this._animRequest),Z(document,"touchmove",this._onTouchMove),Z(document,"touchend",this._onTouchEnd),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))):this._zooming=!1}});Cn.addInitHook("addHandler","touchZoom",Di),Cn.BoxZoom=Ci,Cn.DoubleClickZoom=Ti,Cn.Drag=Si,Cn.Keyboard=Li,Cn.ScrollWheelZoom=ki,Cn.Tap=Pi,Cn.TouchZoom=Di;var Oi=window.L;window.L=t,Object.freeze=Xt,t.version="1.3.1",t.noConflict=function(){return window.L=Oi,this},t.Control=Tn,t.control=Sn,t.Browser=tn,t.Evented=le,t.Mixin=Nn,t.Util=ae,t.Class=v,t.Handler=On,t.extend=u,t.bind=a,t.stamp=l,t.setOptions=s,t.DomEvent=gn,t.DomUtil=An,t.PosAnimation=En,t.Draggable=Fn,t.LineUtil=zn,t.PolyUtil=Hn,t.Point=_,t.point=b,t.Bounds=w,t.bounds=x,t.Transformation=k,t.transformation=P,t.Projection=Vn,t.LatLng=T,t.latLng=S,t.LatLngBounds=A,t.latLngBounds=C,t.CRS=de,t.GeoJSON=si,t.geoJSON=Gt,t.geoJson=ui,t.Layer=Gn,t.LayerGroup=Jn,t.layerGroup=function(t,e){return new Jn(t,e)},t.FeatureGroup=$n,t.featureGroup=function(t){return new $n(t)},t.ImageOverlay=li,t.imageOverlay=function(t,e,n){return new li(t,e,n)},t.VideoOverlay=ci,t.videoOverlay=function(t,e,n){return new ci(t,e,n)},t.DivOverlay=hi,t.Popup=di,t.popup=function(t,e){return new di(t,e)},t.Tooltip=pi,t.tooltip=function(t,e){return new pi(t,e)},t.Icon=Yn,t.icon=function(t){return new Yn(t)},t.DivIcon=fi,t.divIcon=function(t){return new fi(t)},t.Marker=ti,t.marker=function(t,e){return new ti(t,e)},t.TileLayer=gi,t.tileLayer=Jt,t.GridLayer=mi,t.gridLayer=function(t){return new mi(t)},t.SVG=Ai,t.svg=Yt,t.Renderer=yi,t.Canvas=_i,t.canvas=$t,t.Path=ei,t.CircleMarker=ni,t.circleMarker=function(t,e){return new ni(t,e)},t.Circle=ii,t.circle=function(t,e,n){return new ii(t,e,n)},t.Polyline=oi,t.polyline=function(t,e){return new oi(t,e)},t.Polygon=ri,t.polygon=function(t,e){return new ri(t,e)},t.Rectangle=Ei,t.rectangle=function(t,e){return new Ei(t,e)},t.Map=Cn,t.map=function(t,e){return new Cn(t,e)}}),function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.ClipboardJS=e():t.ClipboardJS=e()}(this,function(){return function(n){function i(t){if(o[t])return o[t].exports;var e=o[t]={i:t,l:!1,exports:{}};return n[t].call(e.exports,e,e.exports,i),e.l=!0,e.exports}var o={};return i.m=n,i.c=o,i.i=function(t){return t},i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},i.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=3)}([function(t,e,n){var i,o,r,s;s=function(t,e){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var o=n(e),r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s=function(){function i(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)}}return function(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t}}(),a=function(){function e(t){i(this,e),this.resolveOptions(t),this.initSelection()}return s(e,[{key:"resolveOptions",value:function(t){var e=0<arguments.length&&t!==undefined?t:{};this.action=e.action,this.container=e.container,this.emitter=e.emitter,this.target=e.target,this.text=e.text,this.trigger=e.trigger,this.selectedText=""}},{key:"initSelection",value:function(){this.text?this.selectFake():this.target&&this.selectTarget()}},{key:"selectFake",value:function(){var t=this,e="rtl"==document.documentElement.getAttribute("dir");this.removeFake(),this.fakeHandlerCallback=function(){return t.removeFake()},this.fakeHandler=this.container.addEventListener("click",this.fakeHandlerCallback)||!0,this.fakeElem=document.createElement("textarea"),this.fakeElem.style.fontSize="12pt",this.fakeElem.style.border="0",this.fakeElem.style.padding="0",this.fakeElem.style.margin="0",this.fakeElem.style.position="absolute",this.fakeElem.style[e?"right":"left"]="-9999px";var n=window.pageYOffset||document.documentElement.scrollTop;this.fakeElem.style.top=n+"px",this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=this.text,
this.container.appendChild(this.fakeElem),this.selectedText=(0,o["default"])(this.fakeElem),this.copyText()}},{key:"removeFake",value:function(){this.fakeHandler&&(this.container.removeEventListener("click",this.fakeHandlerCallback),this.fakeHandler=null,this.fakeHandlerCallback=null),this.fakeElem&&(this.container.removeChild(this.fakeElem),this.fakeElem=null)}},{key:"selectTarget",value:function(){this.selectedText=(0,o["default"])(this.target),this.copyText()}},{key:"copyText",value:function(){var t=void 0;try{t=document.execCommand(this.action)}catch(e){t=!1}this.handleResult(t)}},{key:"handleResult",value:function(t){this.emitter.emit(t?"success":"error",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})}},{key:"clearSelection",value:function(){this.trigger&&this.trigger.focus(),window.getSelection().removeAllRanges()}},{key:"destroy",value:function(){this.removeFake()}},{key:"action",set:function(t){var e=0<arguments.length&&t!==undefined?t:"copy";if(this._action=e,"copy"!==this._action&&"cut"!==this._action)throw new Error('Invalid "action" value, use either "copy" or "cut"')},get:function(){return this._action}},{key:"target",set:function(t){if(t!==undefined){if(!t||"object"!==(void 0===t?"undefined":r(t))||1!==t.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===this.action&&t.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===this.action&&(t.hasAttribute("readonly")||t.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');this._target=t}},get:function(){return this._target}}]),e}();t.exports=a},o=[t,n(7)],(r="function"==typeof(i=s)?i.apply(e,o):i)===undefined||(t.exports=r)},function(t,e,n){function i(t,e,n){if(!t&&!e&&!n)throw new Error("Missing required arguments");if(!a.string(e))throw new TypeError("Second argument must be a String");if(!a.fn(n))throw new TypeError("Third argument must be a Function");if(a.node(t))return o(t,e,n);if(a.nodeList(t))return r(t,e,n);if(a.string(t))return s(t,e,n);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}function o(t,e,n){return t.addEventListener(e,n),{destroy:function(){t.removeEventListener(e,n)}}}function r(t,e,n){return Array.prototype.forEach.call(t,function(t){t.addEventListener(e,n)}),{destroy:function(){Array.prototype.forEach.call(t,function(t){t.removeEventListener(e,n)})}}}function s(t,e,n){return u(document.body,t,e,n)}var a=n(6),u=n(5);t.exports=i},function(t){function e(){}e.prototype={on:function(t,e,n){var i=this.e||(this.e={});return(i[t]||(i[t]=[])).push({fn:e,ctx:n}),this},once:function(t,e,n){function i(){o.off(t,i),e.apply(n,arguments)}var o=this;return i._=e,this.on(t,i,n)},emit:function(t){for(var e=[].slice.call(arguments,1),n=((this.e||(this.e={}))[t]||[]).slice(),i=0,o=n.length;i<o;i++)n[i].fn.apply(n[i].ctx,e);return this},off:function(t,e){var n=this.e||(this.e={}),i=n[t],o=[];if(i&&e)for(var r=0,s=i.length;r<s;r++)i[r].fn!==e&&i[r].fn._!==e&&o.push(i[r]);return o.length?n[t]=o:delete n[t],this}},t.exports=e},function(t,e,n){var i,o,r,s;s=function(t,e,n,i){"use strict";function o(t){return t&&t.__esModule?t:{"default":t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function u(t,e){var n="data-clipboard-"+t;if(e.hasAttribute(n))return e.getAttribute(n)}var l=o(e),c=o(n),h=o(i),d="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},p=function(){function i(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)}}return function(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t}}(),f=function(){function i(t,e){r(this,i);var n=s(this,(i.__proto__||Object.getPrototypeOf(i)).call(this));return n.resolveOptions(e),n.listenClick(t),n}return a(i,c["default"]),p(i,[{key:"resolveOptions",value:function(t){var e=0<arguments.length&&t!==undefined?t:{};this.action="function"==typeof e.action?e.action:this.defaultAction,this.target="function"==typeof e.target?e.target:this.defaultTarget,this.text="function"==typeof e.text?e.text:this.defaultText,this.container="object"===d(e.container)?e.container:document.body}},{key:"listenClick",value:function(t){var e=this;this.listener=(0,h["default"])(t,"click",function(t){return e.onClick(t)})}},{key:"onClick",value:function(t){var e=t.delegateTarget||t.currentTarget;this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=new l["default"]({action:this.action(e),target:this.target(e),text:this.text(e),container:this.container,trigger:e,emitter:this})}},{key:"defaultAction",value:function(t){return u("action",t)}},{key:"defaultTarget",value:function(t){var e=u("target",t);if(e)return document.querySelector(e)}},{key:"defaultText",value:function(t){return u("text",t)}},{key:"destroy",value:function(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)}}],[{key:"isSupported",value:function(t){var e=0<arguments.length&&t!==undefined?t:["copy","cut"],n="string"==typeof e?[e]:e,i=!!document.queryCommandSupported;return n.forEach(function(t){i=i&&!!document.queryCommandSupported(t)}),i}}]),i}();t.exports=f},o=[t,n(0),n(2),n(1)],(r="function"==typeof(i=s)?i.apply(e,o):i)===undefined||(t.exports=r)},function(t){function e(t,e){for(;t&&t.nodeType!==n;){if("function"==typeof t.matches&&t.matches(e))return t;t=t.parentNode}}var n=9;if("undefined"!=typeof Element&&!Element.prototype.matches){var i=Element.prototype;i.matches=i.matchesSelector||i.mozMatchesSelector||i.msMatchesSelector||i.oMatchesSelector||i.webkitMatchesSelector}t.exports=e},function(t,e,n){function r(t,e,n,i,o){var r=s.apply(this,arguments);return t.addEventListener(n,r,o),{destroy:function(){t.removeEventListener(n,r,o)}}}function i(t,e,n,i,o){return"function"==typeof t.addEventListener?r.apply(null,arguments):"function"==typeof n?r.bind(null,document).apply(null,arguments):("string"==typeof t&&(t=document.querySelectorAll(t)),Array.prototype.map.call(t,function(t){return r(t,e,n,i,o)}))}function s(e,n,t,i){return function(t){t.delegateTarget=o(t.target,n),t.delegateTarget&&i.call(e,t)}}var o=n(4);t.exports=i},function(t,n){n.node=function(t){return t!==undefined&&t instanceof HTMLElement&&1===t.nodeType},n.nodeList=function(t){var e=Object.prototype.toString.call(t);return t!==undefined&&("[object NodeList]"===e||"[object HTMLCollection]"===e)&&"length"in t&&(0===t.length||n.node(t[0]))},n.string=function(t){return"string"==typeof t||t instanceof String},n.fn=function(t){return"[object Function]"===Object.prototype.toString.call(t)}},function(t){function e(t){var e;if("SELECT"===t.nodeName)t.focus(),e=t.value;else if("INPUT"===t.nodeName||"TEXTAREA"===t.nodeName){var n=t.hasAttribute("readonly");n||t.setAttribute("readonly",""),t.select(),t.setSelectionRange(0,t.value.length),n||t.removeAttribute("readonly"),e=t.value}else{t.hasAttribute("contenteditable")&&t.focus();var i=window.getSelection(),o=document.createRange();o.selectNodeContents(t),i.removeAllRanges(),i.addRange(o),e=i.toString()}return e}t.exports=e}])}),function(){var t=this;(function(){(function(){var n=[].slice;this.ActionCable={INTERNAL:{message_types:{welcome:"welcome",ping:"ping",confirmation:"confirm_subscription",rejection:"reject_subscription"},default_mount_path:"/cable",protocols:["actioncable-v1-json","actioncable-unsupported"]},WebSocket:window.WebSocket,logger:window.console,createConsumer:function(t){var e;return null==t&&(t=null!=(e=this.getConfig("url"))?e:this.INTERNAL.default_mount_path),new u.Consumer(this.createWebSocketURL(t))},getConfig:function(t){var e;return null!=(e=document.head.querySelector("meta[name='action-cable-"+t+"']"))?e.getAttribute("content"):void 0},createWebSocketURL:function(t){var e;return t&&!/^wss?:/i.test(t)?((e=document.createElement("a")).href=t,e.href=e.href,e.protocol=e.protocol.replace("http","ws"),e.href):t},startDebugging:function(){return this.debugging=!0},stopDebugging:function(){return this.debugging=null},log:function(){var t,e;if(t=1<=arguments.length?n.call(arguments,0):[],this.debugging)return t.push(Date.now()),(e=this.logger).log.apply(e,["[ActionCable]"].concat(n.call(t)))}}}).call(this)}).call(t);var u=t.ActionCable;(function(){(function(){var i=function(t,e){return function(){return t.apply(e,arguments)}};u.ConnectionMonitor=function(){function t(t){this.connection=t,this.visibilityDidChange=i(this.visibilityDidChange,this),this.reconnectAttempts=0}var o,e,n;return t.pollInterval={min:3,max:30},t.staleThreshold=6,t.prototype.start=function(){if(!this.isRunning())return this.startedAt=e(),delete this.stoppedAt,this.startPolling(),document.addEventListener("visibilitychange",this.visibilityDidChange),u.log("ConnectionMonitor started. pollInterval = "+this.getPollInterval()+" ms")},t.prototype.stop=function(){if(this.isRunning())return this.stoppedAt=e(),this.stopPolling(),document.removeEventListener("visibilitychange",this.visibilityDidChange),u.log("ConnectionMonitor stopped")},t.prototype.isRunning=function(){return null!=this.startedAt&&null==this.stoppedAt},t.prototype.recordPing=function(){return this.pingedAt=e()},t.prototype.recordConnect=function(){return this.reconnectAttempts=0,this.recordPing(),delete this.disconnectedAt,u.log("ConnectionMonitor recorded connect")},t.prototype.recordDisconnect=function(){return this.disconnectedAt=e(),u.log("ConnectionMonitor recorded disconnect")},t.prototype.startPolling=function(){return this.stopPolling(),this.poll()},t.prototype.stopPolling=function(){return clearTimeout(this.pollTimeout)},t.prototype.poll=function(){return this.pollTimeout=setTimeout((t=this,function(){return t.reconnectIfStale(),t.poll()}),this.getPollInterval());var t},t.prototype.getPollInterval=function(){var t,e,n,i;return n=(i=this.constructor.pollInterval).min,e=i.max,t=5*Math.log(this.reconnectAttempts+1),Math.round(1e3*o(t,n,e))},t.prototype.reconnectIfStale=function(){if(this.connectionIsStale())return u.log("ConnectionMonitor detected stale connection. reconnectAttempts = "+this.reconnectAttempts+", pollInterval = "+this.getPollInterval()+" ms, time disconnected = "+n(this.disconnectedAt)+" s, stale threshold = "+this.constructor.staleThreshold+" s"),this.reconnectAttempts++,this.disconnectedRecently()?u.log("ConnectionMonitor skipping reopening recent disconnect"):(u.log("ConnectionMonitor reopening"),this.connection.reopen())},t.prototype.connectionIsStale=function(){var t;return n(null!=(t=this.pingedAt)?t:this.startedAt)>this.constructor.staleThreshold},t.prototype.disconnectedRecently=function(){return this.disconnectedAt&&n(this.disconnectedAt)<this.constructor.staleThreshold},t.prototype.visibilityDidChange=function(){if("visible"===document.visibilityState)return setTimeout((t=this,function(){if(t.connectionIsStale()||!t.connection.isOpen())return u.log("ConnectionMonitor reopening stale connection on visibilitychange. visbilityState = "+document.visibilityState),t.connection.reopen()}),200);var t},e=function(){return(new Date).getTime()},n=function(t){return(e()-t)/1e3},o=function(t,e,n){return Math.max(e,Math.min(n,t))},t}()}).call(this),function(){var t,o,e,n,i,r=[].slice,s=function(t,e){return function(){return t.apply(e,arguments)}},a=[].indexOf||function(t){for(var e=0,n=this.length;e<n;e++)if(e in this&&this[e]===t)return e;return-1};n=u.INTERNAL,o=n.message_types,e=n.protocols,i=2<=e.length?r.call(e,0,t=e.length-1):(t=0,[]),e[t++],u.Connection=function(){function t(t){this.consumer=t,this.open=s(this.open,this),this.subscriptions=this.consumer.subscriptions,this.monitor=new u.ConnectionMonitor(this),this.disconnected=!0}return t.reopenDelay=500,t.prototype.send=function(t){return!!this.isOpen()&&(this.webSocket.send(JSON.stringify(t)),!0)},t.prototype.open=function(){return this.isActive()?(u.log("Attempted to open WebSocket, but existing socket is "+this.getState()),!1):(u.log("Opening WebSocket, current state is "+this.getState()+", subprotocols: "+e),null!=this.webSocket&&this.uninstallEventHandlers(),this.webSocket=new u.WebSocket(this.consumer.url,e),this.installEventHandlers(),this.monitor.start(),!0)},t.prototype.close=function(t){var e;if((null!=t?t:{allowReconnect:!0}).allowReconnect||this.monitor.stop(),this.isActive())return null!=(e=this.webSocket)?e.close():void 0},t.prototype.reopen=function(){var t;if(u.log("Reopening WebSocket, current state is "+this.getState()),!this.isActive())return this.open();try{return this.close()}catch(e){return t=e,u.log("Failed to reopen WebSocket",t)}finally{u.log("Reopening WebSocket in "+this.constructor.reopenDelay+"ms"),setTimeout(this.open,this.constructor.reopenDelay)}},t.prototype.getProtocol=function(){var t;return null!=(t=this.webSocket)?t.protocol:void 0},t.prototype.isOpen=function(){return this.isState("open")},t.prototype.isActive=function(){return this.isState("open","connecting")},t.prototype.isProtocolSupported=function(){var t;return t=this.getProtocol(),0<=a.call(i,t)},t.prototype.isState=function(){var t,e;return e=1<=arguments.length?r.call(arguments,0):[],t=this.getState(),0<=a.call(e,t)},t.prototype.getState=function(){var t,e;for(e in WebSocket)if(WebSocket[e]===(null!=(t=this.webSocket)?t.readyState:void 0))return e.toLowerCase();return null},t.prototype.installEventHandlers=function(){var t,e;for(t in this.events)e=this.events[t].bind(this),this.webSocket["on"+t]=e},t.prototype.uninstallEventHandlers=function(){var t;for(t in this.events)this.webSocket["on"+t]=function(){}},t.prototype.events={message:function(t){var e,n,i;if(this.isProtocolSupported())switch(e=(i=JSON.parse(t.data)).identifier,n=i.message,i.type){case o.welcome:return this.monitor.recordConnect(),this.subscriptions.reload();case o.ping:return this.monitor.recordPing();case o.confirmation:return this.subscriptions.notify(e,"connected");case o.rejection:return this.subscriptions.reject(e);default:return this.subscriptions.notify(e,"received",n)}},open:function(){if(u.log("WebSocket onopen event, using '"+this.getProtocol()+"' subprotocol"),this.disconnected=!1,!this.isProtocolSupported())return u.log("Protocol is unsupported. Stopping monitor and disconnecting."),this.close({allowReconnect:!1})},close:function(){if(u.log("WebSocket onclose event"),!this.disconnected)return this.disconnected=!0,this.monitor.recordDisconnect(),this.subscriptions.notifyAll("disconnected",{willAttemptReconnect:this.monitor.isRunning()})},error:function(){return u.log("WebSocket onerror event")}},t}()}.call(this),function(){var l=[].slice;u.Subscriptions=function(){function t(t){this.consumer=t,this.subscriptions=[]}return t.prototype.create=function(t,e){var n,i,o;return i="object"==typeof(n=t)?n:{channel:n},o=new u.Subscription(this.consumer,i,e),this.add(o)},t.prototype.add=function(t){return this.subscriptions.push(t),this.consumer.ensureActiveConnection(),this.notify(t,"initialized"),this.sendCommand(t,"subscribe"),t},t.prototype.remove=function(t){return this.forget(t),this.findAll(t.identifier).length||this.sendCommand(t,"unsubscribe"),t},t.prototype.reject=function(t){var e,n,i,o,r;for(o=[],e=0,n=(i=this.findAll(t)).length;e<n;e++)r=i[e],this.forget(r),this.notify(r,"rejected"),o.push(r);return o},t.prototype.forget=function(o){var r;return this.subscriptions=function(){var t,e,n,i;for(i=[],t=0,e=(n=this.subscriptions).length;t<e;t++)(r=n[t])!==o&&i.push(r);return i}.call(this),o},t.prototype.findAll=function(t){var e,n,i,o,r;for(o=[],e=0,n=(i=this.subscriptions).length;e<n;e++)(r=i[e]).identifier===t&&o.push(r);return o},t.prototype.reload=function(){var t,e,n,i,o;for(i=[],t=0,e=(n=this.subscriptions).length;t<e;t++)o=n[t],i.push(this.sendCommand(o,"subscribe"));return i},t.prototype.notifyAll=function(t){var e,n,i,o,r,s,a;for(n=t,e=2<=arguments.length?l.call(arguments,1):[],s=[],i=0,o=(r=this.subscriptions).length;i<o;i++)a=r[i],s.push(this.notify.apply(this,[a,n].concat(l.call(e))));return s},t.prototype.notify=function(t,e){var n,i,o,r,s,a,u;for(a=t,i=e,n=3<=arguments.length?l.call(arguments,2):[],s=[],o=0,r=(u="string"==typeof a?this.findAll(a):[a]).length;o<r;o++)a=u[o],s.push("function"==typeof a[i]?a[i].apply(a,n):void 0);return s},t.prototype.sendCommand=function(t,e){var n;return n=t.identifier,this.consumer.send({command:e,identifier:n})},t}()}.call(this),function(){u.Subscription=function(){function t(t,e,n){this.consumer=t,null==e&&(e={}),this.identifier=JSON.stringify(e),i(this,n)}var i;return t.prototype.perform=function(t,e){return null==e&&(e={}),e.action=t,this.send(e)},t.prototype.send=function(t){return this.consumer.send({command:"message",identifier:this.identifier,data:JSON.stringify(t)})},t.prototype.unsubscribe=function(){return this.consumer.subscriptions.remove(this)},i=function(t,e){var n,i;if(null!=e)for(n in e)i=e[n],t[n]=i;return t},t}()}.call(this),function(){u.Consumer=function(){function t(t){this.url=t,this.subscriptions=new u.Subscriptions(this),this.connection=new u.Connection(this)}return t.prototype.send=function(t){return this.connection.send(t)},t.prototype.connect=function(){return this.connection.open()},t.prototype.disconnect=function(){return this.connection.close({allowReconnect:!1})},t.prototype.ensureActiveConnection=function(){if(!this.connection.isActive())return this.connection.open()},t}()}.call(this)}).call(this),"object"==typeof module&&module.exports?module.exports=u:"function"==typeof define&&define.amd&&define(u)}.call(this),function(){this.App||(this.App={}),App.cable=ActionCable.createConsumer()}.call(this),function(){var t,e,n;$(document).on("turbolinks:load",function(){return t(),e(),n()}),t=function(){return document.addEventListener("trix-file-accept",function(t){return t.preventDefault()})},e=function(){var t,e,n,i,o,r,s,a,u;return!!document.querySelector("#map")&&(u=$("#map").data("token"),e=$("#map").data("latitude"),n=$("#map").data("longitude"),t=$("#map").data("event-title"),o=$("#map").data("marker-url"),r=$("#map").data("marker-2x-url"),a=$("#map").data("shadow-url"),i=L.map("map").setView([e,n],15),L.tileLayer("https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token="+u,{attribution:'Map data &copy; <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Imagery \xa9 <a href="http://mapbox.com">Mapbox</a>',maxZoom:19,id:"mapbox.streets",accessToken:u}).addTo(i),s=L.icon({iconUrl:o,retinaUrl:r,shadowUrl:a}),L.marker([e,n],{icon:s}).addTo(i).bindPopup(t),i.scrollWheelZoom.disable())},n=function(){return new SmoothScroll('a[href*="#"]')}}.call(this),function(){var t;$(document).on("turbolinks:load",function(){return t()}),t=function(){var t,e,n;return t="#btn-group-link",new ClipboardJS(t).on("success",function(){return n()}),n=function(){return $(t).tooltip("enable"),$(t).tooltip("show")},$(t).on("shown.bs.tooltip",function(){return setTimeout(e,1e3)}),e=function(){return $(t).tooltip("hide"),$(t).tooltip("disable")}}}.call(this),function(t,e){var n=e(t,t.document);t.lazySizes=n,"object"==typeof module&&module.exports&&(module.exports=n)}(window,function(i,c){"use strict";if(c.getElementsByClassName){var h,d,n,o,e,r,s,a,t,p=c.documentElement,u=i.Date,l=i.HTMLPictureElement,f="addEventListener",m="getAttribute",g=i[f],v=i.setTimeout,y=i.requestAnimationFrame||v,_=i.requestIdleCallback,b=/^picture$/i,w=["load","error","lazyincluded","_lazyloaded"],x={},A=Array.prototype.forEach,E=function(t,e){return x[e]||(x[e]=new RegExp("(\\s|^)"+e+"(\\s|$)")),x[e].test(t[m]("class")||"")&&x[e]},C=function(t,e){E(t,e)||t.setAttribute("class",(t[m]("class")||"").trim()+" "+e)},T=function(t,e){var n;(n=E(t,e))&&t.setAttribute("class",(t[m]("class")||"").replace(n," "))},S=function(e,n,t){var i=t?f:"removeEventListener";t&&S(e,n),w.forEach(function(t){e[i](t,n)})},L=function(t,e,n,i,o){var r=c.createEvent("CustomEvent");return n||(n={}),n.instance=h,r.initCustomEvent(e,!i,!o,n),t.dispatchEvent(r),r},k=function(t,e){var n;!l&&(n=i.picturefill||d.pf)?n({reevaluate:!0,elements:[t]}):e&&e.src&&(t.src=e.src)},P=function(t,e){return(getComputedStyle(t,null)||{})[e]},D=function(t,e,n){for(n=n||t.offsetWidth;n<d.minSize&&e&&!t._lazysizesWidth;)n=e.offsetWidth,e=e.parentNode;return n},O=(r=[],s=e=[],a=function(){var t=s;for(s=e.length?r:e,o=!(n=!0);t.length;)t.shift()();n=!1},(t=function(t,e){n&&!e?t.apply(this,arguments):(s.push(t),o||(o=!0,(c.hidden?v:y)(a)))})._lsFlush=a,t),I=function(n,t){return t?function(){O(n)}:function(){var t=this,e=arguments;O(function(){n.apply(t,e)})}},R=function(t){var n,i=0,o=d.throttleDelay,r=d.ricTimeout,e=function(){n=!1,i=u.now(),t()},s=_&&49<r?function(){_(e,{timeout:r}),r!==d.ricTimeout&&(r=d.ricTimeout)}:I(function(){v(e)},!0);return function(t){var e;(t=!0===t)&&(r=33),n||(n=!0,(e=o-(u.now()-i))<0&&(e=0),t||e<9?s():v(s,e))}},N=function(t){var e,n,i=99,o=function(){e=null,t()},r=function(){var t=u.now()-n;t<i?v(r,i-t):(_||o)(o)};return function(){n=u.now(),e||(e=v(r,i))}};!function(){var t,e={lazyClass:"lazyload",loadedClass:"lazyloaded",loadingClass:"lazyloading",preloadClass:"lazypreload",errorClass:"lazyerror",autosizesClass:"lazyautosizes",srcAttr:"data-src",srcsetAttr:"data-srcset",sizesAttr:"data-sizes",minSize:40,customMedia:{},init:!0,expFactor:1.5,hFac:.8,loadMode:2,loadHidden:!0,ricTimeout:0,throttleDelay:125};for(t in d=i.lazySizesConfig||i.lazysizesConfig||{},e)t in d||(d[t]=e[t]);i.lazySizesConfig=d,v(function(){d.init&&wt()})}();var M,B,j,F,z,H,W,q,V,U,Z,K,G,J,$,Y,X,Q,tt,et,nt,it,ot,rt,st,at,ut,lt,ct,ht,dt,pt,ft,mt,gt,vt,yt,_t=($=/^img$/i,Y=/^iframe$/i,X="onscroll"in i&&!/glebot/.test(navigator.userAgent),et=tt=Q=0,nt=-1,it=function(t){et--,t&&t.target&&S(t.target,it),(!t||et<0||!t.target)&&(et=0)},ot=function(t,e){var n,i=t,o="hidden"==P(c.body,"visibility")||"hidden"!=P(t,"visibility");for(q-=e,Z+=e,V-=e,U+=e;o&&(i=i.offsetParent)&&i!=c.body&&i!=p;)(o=0<(P(i,"opacity")||1))&&"visible"!=P(i,"overflow")&&(n=i.getBoundingClientRect(),o=U>n.left&&V<n.right&&Z>n.top-1&&q<n.bottom+1);return o},st=R(rt=function(){var t,e,n,i,o,r,s,a,u,l=h.elements;if((F=d.loadMode)&&et<8&&(t=l.length)){e=0,nt++,null==G&&("expand"in d||(d.expand=500<p.clientHeight&&500<p.clientWidth?500:370),K=d.expand,G=K*d.expFactor),tt<G&&et<1&&2<nt&&2<F&&!c.hidden?(tt=G,nt=0):tt=1<F&&1<nt&&et<6?K:Q;for(;e<t;e++)if(l[e]&&!l[e]._lazyRace)if(X)if((a=l[e][m]("data-expand"))&&(r=1*a)||(r=tt),u!==r&&(H=innerWidth+r*J,W=innerHeight+r,s=-1*r,u=r),n=l[e].getBoundingClientRect(),(Z=n.bottom)>=s&&(q=n.top)<=W&&(U=n.right)>=s*J&&(V=n.left)<=H&&(Z||U||V||q)&&(d.loadHidden||"hidden"!=P(l[e],"visibility"))&&(B&&et<3&&!a&&(F<3||nt<4)||ot(l[e],r))){if(pt(l[e]),o=!0,9<et)break}else!o&&B&&!i&&et<4&&nt<4&&2<F&&(M[0]||d.preloadAfterLoad)&&(M[0]||!a&&(Z||U||V||q||"auto"!=l[e][m](d.sizesAttr)))&&(i=M[0]||l[e]);else pt(l[e]);i&&!o&&pt(i)}}),ut=I(at=function(t){C(t.target,d.loadedClass),T(t.target,d.loadingClass),S(t.target,lt),L(t.target,"lazyloaded")}),lt=function(t){ut({target:t.target})},ct=function(t,e){try{t.contentWindow.location.replace(e)}catch(n){t.src=e}},ht=function(t){var e,n=t[m](d.srcsetAttr);(e=d.customMedia[t[m]("data-media")||t[m]("media")])&&t.setAttribute("media",e),n&&t.setAttribute("srcset",n)},dt=I(function(t,e,n,i,o){var r,s,a,u,l,c;(l=L(t,"lazybeforeunveil",e)).defaultPrevented||(i&&(n?C(t,d.autosizesClass):t.setAttribute("sizes",i)),s=t[m](d.srcsetAttr),r=t[m](d.srcAttr),o&&(u=(a=t.parentNode)&&b.test(a.nodeName||"")),c=e.firesLoad||"src"in t&&(s||r||u),l={target:t},c&&(S(t,it,!0),clearTimeout(j),j=v(it,2500),C(t,d.loadingClass),S(t,lt,!0)),u&&A.call(a.getElementsByTagName("source"),ht),s?t.setAttribute("srcset",s):r&&!u&&(Y.test(t.nodeName)?ct(t,r):t.src=r),o&&(s||u)&&k(t,{src:r})),t._lazyRace&&delete t._lazyRace,T(t,d.lazyClass),O(function(){(!c||t.complete&&1<t.naturalWidth)&&(c?it(l):et--,at(l))},!0)}),ft=function(){if(!B)if(u.now()-z<999)v(ft,999);else{var t=N(function(){d.loadMode=3,st()});B=!0,d.loadMode=3,st(),g("scroll",function(){3==d.loadMode&&(d.loadMode=2),t()},!0)}},{_:function(){z=u.now(),h.elements=c.getElementsByClassName(d.lazyClass),M=c.getElementsByClassName(d.lazyClass+" "+d.preloadClass),J=d.hFac,g("scroll",st,!0),g("resize",st,!0),i.MutationObserver?new MutationObserver(st).observe(p,{childList:!0,subtree:!0,attributes:!0}):(p[f]("DOMNodeInserted",st,!0),p[f]("DOMAttrModified",st,!0),setInterval(st,999)),g("hashchange",st,!0),["focus","mouseover","click","load","transitionend","animationend","webkitAnimationEnd"].forEach(function(t){c[f](t,st,!0)}),/d$|^c/.test(c.readyState)?ft():(g("load",ft),c[f]("DOMContentLoaded",st),v(ft,2e4)),h.elements.length?(rt(),O._lsFlush()):st()},checkElems:st,unveil:pt=function(t){var e,n=$.test(t.nodeName),i=n&&(t[m](d.sizesAttr)||t[m]("sizes")),o="auto"==i;(!o&&B||!n||!t[m]("src")&&!t.srcset||t.complete||E(t,d.errorClass)||!E(t,d.lazyClass))&&(e=L(t,"lazyunveilread").detail,o&&bt.updateElem(t,!0,t.offsetWidth),t._lazyRace=!0,et++,dt(t,e,o,i,n))}}),bt=(gt=I(function(t,e,n,i){var o,r,s;if(t._lazysizesWidth=i,i+="px",t.setAttribute("sizes",i),b.test(e.nodeName||""))for(r=0,s=(o=e.getElementsByTagName("source")).length;r<s;r++)o[r].setAttribute("sizes",i);n.detail.dataAttr||k(t,n.detail)}),vt=function(t,e,n){var i,o=t.parentNode;o&&(n=D(t,o,n),(i=L(t,"lazybeforesizes",{width:n,dataAttr:!!e})).defaultPrevented||(n=i.detail.width)&&n!==t._lazysizesWidth&&gt(t,o,i,n))},{_:function(){mt=c.getElementsByClassName(d.autosizesClass),g("resize",yt)},checkElems:yt=N(function(){var t,e=mt.length;if(e)for(t=0;t<e;t++)vt(mt[t])}),updateElem:vt}),wt=function(){wt.i||(wt.i=!0,bt._(),_t._())};return h={cfg:d,autoSizer:bt,loader:_t,init:wt,uP:k,aC:C,rC:T,hC:E,fire:L,gW:D,rAF:O}}}),function(t,e){var n=function(){e(t.lazySizes),t.removeEventListener("lazyunveilread",n,!0)};e=e.bind(null,t,t.document),"object"==typeof module&&module.exports?e(require("lazysizes")):t.lazySizes?n():t.addEventListener("lazyunveilread",n,!0)}(window,function(t,o,r){"use strict";function s(t,e){if(!l[t]){var n=o.createElement(e?"link":"script"),i=o.getElementsByTagName("script")[0];e?(n.rel="stylesheet",n.href=t):n.src=t,l[t]=!0,l[n.src||n.href]=!0,i.parentNode.insertBefore(n,i)}}var a,u,l={};o.addEventListener&&(a=function(t,e){var n=o.createElement("img");n.onload=function(){n.onload=null,n.onerror=null,n=null,e()},n.onerror=n.onload,n.src=t,n&&n.complete&&n.onload&&n.onload()},addEventListener("lazybeforeunveil",function(t){var e,n,i;t.detail.instance==r&&(t.defaultPrevented||("none"==t.target.preload&&(t.target.preload="auto"),(e=t.target.getAttribute("data-link"))&&s(e,!0),(e=t.target.getAttribute("data-script"))&&s(e),(e=t.target.getAttribute("data-require"))&&(r.cfg.requireJs?r.cfg.requireJs([e]):s(e)),(n=t.target.getAttribute("data-bg"))&&(t.detail.firesLoad=!0,a(n,function(){t.target.style.backgroundImage="url("+(u.test(n)?JSON.stringify(n):n)+")",t.detail.firesLoad=!1,r.fire(t.target,"_lazyloaded",{},!0,!0)})),(i=t.target.getAttribute("data-poster"))&&(t.detail.firesLoad=!0,a(i,function(){t.target.poster=i,t.detail.firesLoad=!1,r.fire(t.target,"_lazyloaded",{},!0,!0)}))))},!(u=/\(|\)|\s|'/)))}),function(){$(document).on("turbolinks:load",function(){return lazySizes.init()})}.call(this);